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 #ifndef _IH264D_DEBUG_H_
21 #define _IH264D_DEBUG_H_
22 
23 /*!
24  **************************************************************************
25  * \file ih264d_debug.h
26  *
27  * \brief
28  *    Contains declarations used for debugging
29  *
30  * \date
31  *    2/12/2002
32  *
33  * \author  AI
34  **************************************************************************
35  */
36 #ifdef DEBUG_DEC
37 #define H264_DEC_DEBUG_PRINT(...) printf("\n[H264_DEBUG] %s/%d:: ", __FUNCTION__, __LINE__);printf(__VA_ARGS__)
38 #else //DEBUG_DEC
39 #define H264_DEC_DEBUG_PRINT(...) {}
40 #endif //DEBUG_DEC
41 #define   STRENGTH_DEBLOCKING         0 //sanjeev
42 #define DEBUG_RECONSTRUCT_LUMA    0
43 #define DEBUG_RECONSTRUCT_CHROMA  0
44 
45 #define DEBUG_IDCT                0
46 #define DEBUG_LUMA_IDCT           0
47 #define DEBUG_REF_IDCT            0
48 
49 #define BIN_BIT_RATIO             0
50 #define MB_PART_HIST              0
51 
52 #define MB_INTRA_PREDICTION       1
53 
54 #ifdef WIN32
55 #define CHK_PURIFY                0
56 #else
57 #define CHK_PURIFY                0
58 #endif
59 
60 #if MB_INTRA_PREDICTION
61 #define MB_INTRA_CHROMA_PREDICTION_ON 1
62 #define MB_INTRA_4x4_PREDICTION_ON    1
63 #define MB_INTRA_16x16_PREDICTION_ON  1
64 #endif
65 
66 #define   TRACE                   0
67 #define   DEBUG_CABAC             0
68 #define   DEBUG_ABS_MVD           0
69 #define   DEBUG_INTRA_PRED_MODES  0
70 #define   DEBUG_DEBLOCKING        0
71 
72 #define COPYTHECONTEXT(s,val)
73 #define PRINT_TRACE
74 #define PRINT_TRACE_CAB
75 #define SWITCHOFFTRACE
76 #define SWITCHONTRACE
77 #define SWITCHOFFTRACECABAC
78 #define SWITCHONTRACECABAC
79 
80 #define INC_BIN_COUNT(ps_cab_env)
81 #define INC_DECISION_BINS(ps_cab_env)
82 #define INC_BYPASS_BINS(ps_cab_env)
83 #define INC_SYM_COUNT(ps_cab_env)
84 #define PRINT_BIN_BIT_RATIO(ps_dec)
85 #define RESET_BIN_COUNTS(ps_cab_env)
86 
87 
88 #ifdef PROFILE_DIS_DEBLK
89 #define PROFILE_DISABLE_DEBLK() return;
90 #else
91 #define PROFILE_DISABLE_DEBLK() ;
92 #endif
93 
94 #ifdef PROFILE_DIS_IQ_IT_RECON
95 #define PROFILE_DISABLE_IQ_IT_RECON()   if (0)
96 #define PROFILE_DISABLE_IQ_IT_RECON_RETURN()   return;
97 #else
98 #define PROFILE_DISABLE_IQ_IT_RECON() ;
99 #define PROFILE_DISABLE_IQ_IT_RECON_RETURN() ;
100 #endif
101 
102 #ifdef PROFILE_DIS_INTRA_PRED
103 #define PROFILE_DISABLE_INTRA_PRED() if (0)
104 #else
105 #define PROFILE_DISABLE_INTRA_PRED() ;
106 #endif
107 
108 #ifdef PROFILE_DIS_UNPACK
109 #define PROFILE_DISABLE_UNPACK_LUMA() return 0;
110 #define PROFILE_DISABLE_UNPACK_CHROMA() return ;
111 #else
112 #define PROFILE_DISABLE_UNPACK_LUMA() ;
113 #define PROFILE_DISABLE_UNPACK_CHROMA() ;
114 #endif
115 
116 #ifdef PROFILE_DIS_INTER_PRED
117 #define PROFILE_DISABLE_INTER_PRED() return;
118 #else
119 #define PROFILE_DISABLE_INTER_PRED() ;
120 #endif
121 
122 #ifdef PROFILE_DIS_BOUNDARY_STRENGTH
123 #define PROFILE_DISABLE_BOUNDARY_STRENGTH() return;
124 #else
125 #define PROFILE_DISABLE_BOUNDARY_STRENGTH() ;
126 #endif
127 
128 #ifdef PROFILE_DIS_MB_PART_INFO
129 #define PROFILE_DISABLE_MB_PART_INFO() return 0;
130 #else
131 #define PROFILE_DISABLE_MB_PART_INFO() ;
132 #endif
133 
134 #endif /* _IH264D_DEBUG_H_ */
135 
136