summaryrefslogtreecommitdiffstats
path: root/decoder/impeg2d_debug.h
blob: 5780427c347a04e0489c555bf9a4111a14604f4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/******************************************************************************
 *
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 *****************************************************************************
 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
*/
/*****************************************************************************/
/*                                                                           */
/*  File Name         : c_coding_example.h                                   */
/*                                                                           */
/*  Description       : This file contains all the necessary examples to     */
/*                      establish a consistent use of Ittiam C coding        */
/*                      standards (based on Indian Hill C Standards)         */
/*                                                                           */
/*  List of Functions : <List the functions defined in this file>            */
/*                                                                           */
/*  Issues / Problems : None                                                 */
/*                                                                           */
/*  Revision History  :                                                      */
/*                                                                           */
/*         DD MM YYYY   Author(s)       Changes (Describe the changes made)  */
/*         10 01 2005   Ittiam          Draft                                */
/*                                                                           */
/*****************************************************************************/
#ifndef __IMPEG2D_DEBUG_H__
#define __IMPEG2D_DEBUG_H__


/*************************************************************************/
/* DEBUG                                                                 */
/*************************************************************************/
#define DEBUG_MB        0


#if DEBUG_MB
void impeg2d_trace_mb_start(UWORD32 mb_x, UWORD32 mb_y);
void impeg2d_frm_num_set(void);
UWORD32 impeg2d_frm_num_get(void);

#define IMPEG2D_TRACE_MB_START(mb_x, mb_y) void impeg2d_trace_mb_start(UWORD32 mb_x, UWORD32 mb_y);
#define IMPEG2D_FRM_NUM_SET()              void impeg2d_frm_num_set(void);
#define IMPEG2D_FRM_NUM_GET()              UWORD32 impeg2d_frm_num_get(void);
#else
#define IMPEG2D_TRACE_MB_START(mb_x, mb_y)
#define IMPEG2D_FRM_NUM_SET()
#define IMPEG2D_FRM_NUM_GET()
#endif


#define STATISTICS  0

#if STATISTICS
void impeg2d_idct_inp_statistics(WORD16 *pi2_idct_inp, WORD32 non_zero_cols, WORD32 non_zero_rows);
void impeg2d_iqnt_inp_statistics(WORD16 *pi2_iqnt_inp, WORD32 non_zero_cols, WORD32 non_zero_rows);
void impeg2d_print_statistics(void);
#define IMPEG2D_IDCT_INP_STATISTICS(pi2_idct_inp, non_zero_cols, non_zero_rows)  impeg2d_idct_inp_statistics(pi2_idct_inp, non_zero_cols, non_zero_rows)
#define IMPEG2D_IQNT_INP_STATISTICS(pi2_iqnt_inp, non_zero_cols, non_zero_rows)  impeg2d_iqnt_inp_statistics(pi2_iqnt_inp, non_zero_cols, non_zero_rows)
#define IMPEG2D_PRINT_STATISTICS()            impeg2d_print_statistics()
#else
#define IMPEG2D_IDCT_INP_STATISTICS(pi2_idct_inp, non_zero_cols, non_zero_rows)
#define IMPEG2D_IQNT_INP_STATISTICS(pi2_iqnt_inp, non_zero_cols, non_zero_rows)
#define IMPEG2D_PRINT_STATISTICS()
#endif


#if 0
#define PROFILE_DIS_SKIP_MB
#define PROFILE_DIS_MC
#define PROFILE_DIS_INVQUANT
#define PROFILE_DIS_IDCT
#define PROFILE_DIS_MEMSET_RESBUF
#endif


#ifdef PROFILE_DIS_SKIP_MB
#define PROFILE_DISABLE_SKIP_MB() return;
#else
#define PROFILE_DISABLE_SKIP_MB()
#endif

#ifdef PROFILE_DIS_MC
#define PROFILE_DISABLE_MC_IF0 if(0)
#define PROFILE_DISABLE_MC_RETURN return;
#else
#define PROFILE_DISABLE_MC_IF0
#define PROFILE_DISABLE_MC_RETURN
#endif

#ifdef PROFILE_DIS_INVQUANT
#define PROFILE_DISABLE_INVQUANT_IF0 if(0)
#else
#define PROFILE_DISABLE_INVQUANT_IF0
#endif

#ifdef PROFILE_DIS_IDCT
#define PROFILE_DISABLE_IDCT_IF0 if(0)
#else
#define PROFILE_DISABLE_IDCT_IF0
#endif

#ifdef PROFILE_DIS_MEMSET_RESBUF
#define PROFILE_DISABLE_MEMSET_RESBUF_IF0 if(0)
#else
#define PROFILE_DISABLE_MEMSET_RESBUF_IF0
#endif


#endif /* __IMPEG2D_DEBUG_H__ */