• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright (C) 2015 The Android Open Source Project
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *****************************************************************************
18  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19 */
20 /**
21 *******************************************************************************
22 * @file
23 *  ihevc_typedefs.h
24 *
25 * @brief
26 *  Type definitions used in the code
27 *
28 *
29 * @remarks
30 *  None
31 *
32 *******************************************************************************
33 */
34 #ifndef _IME_STATISTICS_H_
35 #define _IME_STATISTICS_H_
36 #define DEBUG_HISTOGRAM_ENABLE 0
37 #define SAD_EXIT_STATS 0
38 
39 
40 #if SAD_EXIT_STATS
41 
42 /**
43 ******************************************************************************
44 * @brief  While computing sad, if we want to do a early exit, how often we
45 * should check if the sad computed till now has exceeded min sad param is
46 * chosen statistically.
47 * ******************************************************************************
48 */
49 extern UWORD32 gu4_16x16_sad_ee_stats[16+1];
50 extern UWORD32 gu4_16x8_sad_ee_stats[8+1];
51 
52 /**
53 ******************************************************************************
54 *  @brief print sad early exit stats
55 ******************************************************************************
56 */
57 extern void print_sad_ee_stats(void);
58 
59 #define GATHER_16x16_SAD_EE_STATS(gu4_16x16_sad_ee_stats, i) \
60                 gu4_16x16_sad_ee_stats[i]++;
61 #define GATHER_16x8_SAD_EE_STATS(gu4_16x8_sad_ee_stats, i) \
62                 gu4_16x8_sad_ee_stats[i]++;
63 
64 #else
65 
66 #define GATHER_16x16_SAD_EE_STATS(gu4_16x16_sad_ee_stats, i)
67 #define GATHER_16x8_SAD_EE_STATS(gu4_16x8_sad_ee_stats, i)
68 
69 #endif
70 
71 
72 #if DEBUG_HISTOGRAM_ENABLE
73 #define DEBUG_HISTOGRAM_INIT() debug_histogram_init()
74 #define DEBUG_HISTOGRAM_DUMP(condition) if(condition) debug_histogram_dump()
75 #define DEBUG_MV_HISTOGRAM_ADD(mv_x, mv_y) debug_mv_histogram_add(mv_x, mv_y)
76 #define DEBUG_SAD_HISTOGRAM_ADD(sad, level) debug_sad_histogram_add(sad, level)
77 #else
78 #define DEBUG_HISTOGRAM_INIT()
79 #define DEBUG_HISTOGRAM_DUMP(condition)
80 #define DEBUG_MV_HISTOGRAM_ADD(mv_x, mv_y)
81 #define DEBUG_SAD_HISTOGRAM_ADD(sad, level)
82 #endif
83 
84 
85 
86 #endif /*_IME_STATISTICS_H_*/
87