• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  * Copyright (C) 2018 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 ******************************************************************************
23 * @file ihevce_trace.h
24 *
25 * @brief
26 *  This file contains entropy and cabac trace related structures and macros
27 *
28 * @author
29 *    Ittiam
30 ******************************************************************************
31 */
32 
33 #ifndef _IHEVCE_TRACE_H_
34 #define _IHEVCE_TRACE_H_
35 
36 #define ENABLE_TRACE 0
37 
38 /*****************************************************************************/
39 /* Constant Macros                                                           */
40 /*****************************************************************************/
41 /* strings assigned for prefix names */
42 // clang-format off
43 #define SEQ_LEVEL             "SEQ"    /*!< prefix string for sequence params */
44 #define HRD_LEVEL             "HRD"    /*!< prefix string for hrd params */
45 #define PIC_LEVEL             "PIC_INFO"    /*!< prefix string for picture params */
46 #define SLICE_LEVEL           "SLICE"  /*!< prefix string for slice params */
47 #define MB_LEVEL              "MB"     /*!< prefix string for MB params */
48 #define ECD_DATA              "ECD"
49 #define LYR_COEFF_LEVEL       "LYR"    /*!< prefix string for current layer tx levels */
50 #define ACC_COEFF_LEVEL       "LYR"    /*!< prefix string for accumulated tx levels/coeffs */
51 #define ACC_COEFFS            "LYR"    /*!< prefix string for accumulated coeffs */
52 #define LYR_DIFF_SIG          "LYR"    /*!< prefix string for MB params */
53 #define LYR_IP_SIG            "LYR"    /*!< prefix string for MB params */
54 #define RES_CHANGE_SIG        "RES CGE"
55 #define REF_BASE_DEBLK        "REF BASE"    /*!< refix string for ref base parameters */
56 #define TARGET_DEBLK          "TGT"    /*!< prefix string for target layer parameters */
57 #define TARGET_MC             "TGT"    /*!< prefix string for target layer parameters */
58 #define DUMMY                 "NOT VALID"
59 // clang-format on
60 
61 #define TRACE(a) ihevce_trace((a))
62 
63 /*****************************************************************************/
64 /* Enums                                                                     */
65 /*****************************************************************************/
66 typedef enum
67 {
68     IHEVCE_FALSE = 0,
69     IHEVCE_TRUE = 1
70 } IHEVCE_BOOL_T;
71 
72 // clang-format off
73 typedef enum
74 {
75     TRACE_SEQ             = 0x00000001,   /*!< sequence params dump enable */
76     TRACE_PIC             = 0x00000002,   /*!< picparams dump enable */
77     TRACE_SLICE           = 0x00000004,   /*!< slice params dump enable */
78     TRACE_MB_PARAMS       = 0x00000008,   /*!< mb level decoded dump enable */
79     TRACE_MB_INF_PARAMS   = 0x00000010,   /*!< mb level inferred dumping enable */
80     TRACE_ECD_DATA        = 0x00000020,   /*!< ECD data dump */
81     TRACE_LYR_COEFF_LEVEL = 0x00000040,   /*!< Current layer coeff levels */
82     TRACE_ACC_COEFF_LEVEL = 0x00000080,   /*!< Accumulated coffs/level */
83     TRACE_ACC_COEFFS      = 0x00000100,   /*!< Accumulated coeffs */
84     TRACE_LYR_DIFF_SIG    = 0x00000200,   /*!< layer level differential signal */
85     TRACE_LYR_IP_SIG      = 0x00000400,   /*!< layer level Intra pred signal */
86     TRACE_INTRA_UPSMPL_SIG= 0x00000800,   /*!< Intra upsampled data */
87     TRACE_RES_UPSMPL_SIG  = 0x00001000,   /*!< Residual upsampled data */
88     TRACE_BS_INFO         = 0x00002000,   /*!< BS information */
89     TRACE_RES_CGE_MV      = 0x00100000,   /*!< Res change Motion vectors */
90     TRACE_RES_CGE_MODE    = 0x00200000,   /*!< Res change MB modes */
91     TRACE_RES_CGE_DATA    = 0x00400000,   /*!< Res change data */
92     TRACE_TGT_MC_PRED     = 0x00800000,   /*!< moiton comp pred sugnal dump enable */
93     TRACE_TGT_LYR_DEBLK   = 0x08000000,   /*!< Input to target layer deblocking */
94     TRACE_REF_BASE_DEBLK  = 0x10000000,   /*!< deblocked data dumping enable */
95     TRACE_ALL             = 0xFFFFFFFF    /*!< all params dumping enable */
96 }TRACE_PREFIX_T;
97 // clang-format on
98 
99 /*****************************************************************************/
100 /* Globals                                                                   */
101 /*****************************************************************************/
102 extern const char *g_api1_prefix_name[32];
103 
104 /* Dummy macros when trace is disabled */
105 #define ENTROPY_TRACE(syntax_string, value)
106 
107 #define AEV_TRACE(string, value, range)
108 
109 /*****************************************************************************/
110 /* Extern Function Declarations                                              */
111 /*****************************************************************************/
112 WORD32 ihevce_trace(UWORD32 u4_prefix);
113 
114 #endif  //_IHEVCE_TRACE_H_
115