source: 3DVCSoftware/branches/HTM-6.2-dev0/source/Lib/TLibCommon/TypeDef.h @ 433

Last change on this file since 433 was 433, checked in by tech, 11 years ago

Merged HTM-6.2-dev3-RWTH-Fix Rev. 415

  • Property svn:eol-style set to native
File size: 43.4 KB
Line 
1/* The copyright in this software is being made available under the BSD
2 * License, included below. This software may be subject to other third party
3 * and contributor rights, including patent rights, and no such rights are
4 * granted under this license.
5 *
6 * Copyright (c) 2010-2012, ITU/ISO/IEC
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 *
12 *  * Redistributions of source code must retain the above copyright notice,
13 *    this list of conditions and the following disclaimer.
14 *  * Redistributions in binary form must reproduce the above copyright notice,
15 *    this list of conditions and the following disclaimer in the documentation
16 *    and/or other materials provided with the distribution.
17 *  * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
18 *    be used to endorse or promote products derived from this software without
19 *    specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34/** \file     TypeDef.h
35    \brief    Define basic types, new types and enumerations
36*/
37
38#ifndef _TYPEDEF__
39#define _TYPEDEF__
40
41//! \ingroup TLibCommon
42//! \{
43
44// MV-HEVC
45#define QC_IV_AS_LT_B0046                 1   //JCT3V-B0046: inter-view reference pictures are treated as long-term pictures
46#define QC_REM_IDV_B0046                  1   //JCT3V-B0046: removal of IDV NAL unit type
47#define DV_V_RESTRICTION_B0037            1   //JCT3V-B0037: disparity vector vertical range restriction
48#define QC_TMVP_IDX_MOD_B0046             1   //JCT3V-B0046: the reference index for temporal merging candidate is set to 0, as defined in HEVC
49
50// 3D-HEVC
51#define QC_MVHEVC_B0046                   0   //JCT3V-B0046: disable 3DHEVC tools
52
53#if !QC_MVHEVC_B0046
54
55///// ***** DMM *********
56#define HHI_DMM_WEDGE_INTRA               1   // depth model modes independent on texture (explicit and intra-predicted Wedgelet prediction)
57#define HHI_DMM_PRED_TEX                  1   // depth model modes dependent on texture (inter-component Wedgelet and Contour prediction )
58                                              // HHIQC_DMMFASTSEARCH_B0039, fast Wedgelet search for DMM modes 1 and 3
59                                              // HHI_DMM_DELTADC_Q1_C0034   JCT3V-C0034: no quantization and fast encoder search for DMM delta DC values
60                                              // FIX_DMM_CTX_INIT_C0034 JCT3V-C0034 fix for wrong init type of DMM contexts (UChar instead of Short)
61#define FIX_WEDGE_NOFLOAT_D0036           1   // JCT3V-D0036: Fix for aligning SW and spec (Wedgelet segmentation line generation without float)
62
63#define LGE_EDGE_INTRA_A0070              1   // JCT3V-A0070
64#define LGE_DMM3_SIMP_C0044               1
65
66#define QC_DC_PREDICTOR_D0183             1   // JCT3V-D0183: Simplified DC predictor for depth intra modes
67
68///// ***** SDC *********
69#define RWTH_SDC_DLT_B0036                1   // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table
70                                              // SAIT_SDC_C0096 JCT3V-C0096: Improved Simple Depth Coding(removal of DMM2 among four SDC modes(DC, Planar, DMM1 and DMM2))
71                                              // FIX_SDC_ENC_C0143, JCT3V-C0143 fix for unnecessary encoder checks in case of SDC
72#if RWTH_SDC_DLT_B0036
73#define HHI_DELTADC_DLT_D0035             1   // JCT3V-D0035: DLT for DMM deltaDC coding
74#define INTEL_SDC64_D0193                 1   // JCT3V-D0193: SDC binary clean up (use a 1 bit binary code to signal sdc_pred_mode when CU size is 64x64)
75#define RWTH_SDC_CTX_SIMPL_D0032          1   // JCT3V-D0032: CABAC Context Reduction for Simplified Depth Coding
76#define LGE_CONCATENATE_D0141                 1 // JCT3V-D0141: concatenate binarization for residual index coding
77#endif
78#define FIX_SDC_ENC_RD_WVSO_D0163         1   // JCT3V-D0163: fix for SDC encoder rd-cost (VSO -> WVSO)
79
80#define PKU_QC_DEPTH_INTRA_UNI_D0195      1   // JCT3V-D0195: unified syntax table for depth intra coding tools
81#define MTK_SAMPLE_BASED_SDC_D0110        1   // JCT3V-D0110: sample based SDC
82///// ***** TMVP/AMVP *********
83#define TMVP_DEPTH_SWITCH                 1   // JCT3V-B0092 additional encoder option only
84#define QC_TMVP_MRG_REFIDX_C0047          1   // only enabled when QC_TMVP_IDX_MOD_B0046 is enabled.
85#define INTER_VIEW_VECTOR_SCALING_C0115   1   // JCT3V-C0115 Inter-view vector scaling for TMVP & flag
86#define INTER_VIEW_VECTOR_SCALING_C0116   1   // JCT3V-C0116 Inter-view vector scaling for AMVP
87
88///// ***** INTERVIEW MOTION PARAMETER PREDICTION *********
89#define H3D_IVMP                          1   // Inter-view motion parameter prediction
90                                              // HHI_INTER_VIEW_MOTION_PRED
91                                              // SAIT_IMPROV_MOTION_PRED_M24829, improved inter-view motion vector prediction
92                                              // SHARP_INTERVIEW_DECOUPLE_B0111, decoupling inter-view candidate
93                                              // QC_MRG_CANS_B0048             , JCT3V-B0048, B0086, B0069
94                                              // OL_DISMV_POS_B0069            , different pos for disparity MV candidate, B0069
95                                              // MTK_INTERVIEW_MERGE_A0049     , second part
96                                              // QC_C0051_FIXED_BY_MTK             1   // Bug fix for C0051 implementation
97                                              // QC_AMVP_MRG_UNIFY_IVCAN_C0051     1
98#define SEC_TWO_CANDIDATES_FOR_AMVP_D0122 1   // SEC_TWO_CANDIDATES_FOR_AMVP_D0122, fixing # of AMVP candidates 3 to 2
99
100
101///// ***** INTERVIEW RESIDUAL PREDICTION *********
102#define H3D_IVRP                          1   // Inter-view residual prediction
103                                              // HHI_INTER_VIEW_RESIDUAL_PRED
104                                              // QC_SIMPLIFIEDIVRP_M24938
105                                              // MTK_C0138_FIXED                   // Fix for IBP coding structure in view direction (not CTC)
106                                              // MTK_MDIVRP_C0138
107                                              // LG_RESTRICTEDRESPRED_M24766       1   // Restricted inter-view residual prediction
108                                              // FIX_LG_RESTRICTEDRESPRED_M24766   1
109
110#define QC_ARP_D0177            1             ////< advanced residual prediction
111#if QC_ARP_D0177
112#define QC_ARP_WFNR                       3
113#define QC_ARP_WARNING_FIX                1   // Fix warning message for ARP
114#endif
115///// ***** DISPARITY VECTOR DERIVATION *********
116#define H3D_NBDV                          1   // Neighboring block disparity derivation
117                                              // JCT3V-A0097
118                                              // LGE_DVMCP_A0126
119                                              // LGE_DVMCP_MEM_REDUCTION_B0135     
120                                              // DV_DERIVATION_PARALLEL_B0096, enable parallel derivation of disparity vector
121                                              // QC_SIMPLE_NBDV_B0047
122                                              // FIX_LGE_DVMCP_B0133
123                                              // LGE_IVMP_PARALLEL_MERGE_B0136, B0136 support of parallel merge/skip in disparity vector derivation
124                                              // FIX_LGE_IVMP_PARALLEL_MERGE_B0136
125
126                                              // QC_NBDV_LDB_FIX_C0055
127                                              // MTK_SAIT_TEMPORAL_FIRST_ORDER_C0141_C0097
128                                              // MTK_RELEASE_DV_CONSTRAINT_C0129   
129                                              // MTK_SIMPLIFY_DVTC_C0135           
130                                              // FIX_CHROMA_RESIDUAL_C0129         
131#define QC_CU_NBDV_D0181                  1
132
133#define SEC_DEFAULT_DV_D0112              1
134
135///// ***** MOTION PARAMETER INHERITANCE  *********
136#define MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137   1   // JCT3V-C0137
137#define HHI_MPI                           0   // motion parameter inheritance from texture picture for depth map coding
138#if HHI_MPI
139#define FIX_MPI_B0065                     1   // JCT3V-B0065, fix the MPI bug when RQT is off
140#endif
141#define MTK_UNCONSTRAINED_MVI_B0083       1    //JCT3V-B0083
142
143///// ***** VIEW SYNTHESIS OPTIMIZAION *********
144#define HHI_VSO                           1
145#define HHI_VSO_LS_TABLE_M23714           1   // m23714, enable table base Lagrange multiplier optimization
146#define HHI_VSO_DIST_INT                  1   // Allow negative synthesized view distortion change
147#define HHI_VSO_COLOR_PLANES              1   // Compute VSO distortion on color planes
148#define HHI_VSO_RM_ASSERTIONS             0   // Output VSO assertions
149#define HHI_VSO_SYNTH_DIST_OUT            0   // Output of synthesized view distortion instead of depth distortion in encoder output
150#define SAIT_VSO_EST_A0033                1   // JCT3V-A0033 modification 3
151#define LGE_VSO_EARLY_SKIP_A0093          1   // JCT3V-A0093 modification 4
152#define LGE_WVSO_A0119                    1   // JCT3V-A0119 & JCT3V-B0131 Depth Metric with a weighted depth fidelity term
153
154
155///// ***** ILLUMINATION COMPENSATON *********
156#define LGE_ILLUCOMP_B0045                1   // JCT2-B0045 Illumination compensation for Luma and Chroma
157                                              // LGE_ILLUCOMP_B0045_ENCSIMP
158                                              // FIX_LGE_ILLUCOMP_B0045           
159#if LGE_ILLUCOMP_B0045
160#define LGE_ILLUCOMP_DEPTH_C0046          1   // JCT2-C0046 Apply illumination compensation to depth
161#if LGE_ILLUCOMP_DEPTH_C0046
162#define FIX_ILLUCOMP_DEPTH                1
163#endif
164#endif
165
166#define SHARP_ILLUCOMP_PARSE_D0060        1   // JCT3V-D0060 Removal of IC's parsing dependency
167
168///// ***** INTERVIEW SKIP *********
169#define HHI_INTERVIEW_SKIP                1
170
171///// ***** QUADTREE LIMITATION *********
172#define H3D_QTL                            1 // OL_QTLIMIT_dPREDCODING_B0068 //JCT3V-B0068
173                                             // HHI_QTLPC_RAU_OFF_C0160     // JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units
174
175///// ***** OTHERS *********
176#define LG_ZEROINTRADEPTHRESI_A0087       1   // JCT2-A0087
177#define HHI_FULL_PEL_DEPTH_MAP_MV_ACC     1   // full-pel mv accuracy for depth maps
178#define VIDYO_VPS_INTEGRATION             1   // Integration of VPS
179#define HHI_DEPTH_INTRA_SEARCH_RAU_C0160  1   // JCT3V-C0160 change 1: full Intra search in depth random access units
180#define FIX_POZNAN_CABAC_INIT_FLAG        1
181#define FIX_LGE_WP_FOR_3D_C0223           1   // JCT3V-C0223 Weighted Prediction Bug-fix for 3D-HEVC. Caution! There is still crush using WP with Residual Prediction.
182#define FIX_APPENCTOP_T_ONLY              1   // For Texture-only coding
183
184#define LGE_ROUND_OFFSET_D0135            1   // JCT3V-D0135 Rounding offset
185#define LGE_SAO_MIGRATION_D0091           1
186#if LGE_SAO_MIGRATION_D0091
187#define SAO_SKIP_RIGHT                   1  ///< H1101: disallow using unavailable pixel during RDO
188#define SAO_ENCODING_CHOICE              1  ///< I0184: picture early termination
189#if SAO_ENCODING_CHOICE
190#define SAO_ENCODING_RATE                0.75
191#define SAO_ENCODING_CHOICE_CHROMA       1 ///< J0044: picture early termination Luma and Chroma are handled separatenly
192#if SAO_ENCODING_CHOICE_CHROMA
193#define SAO_ENCODING_RATE_CHROMA         0.5
194#define SAO_ENCODING_CHOICE_CHROMA_BF    1 ///  K0156: Bug fix for SAO selection consistency
195#endif
196#endif
197#endif
198
199///// ***** FCO  *********
200#define FLEX_CODING_ORDER_M23723          1
201#if FLEX_CODING_ORDER_M23723
202#define DISABLE_FCO_FOR_VSO               0 // Optional compile settings to disable VSO with FCO.
203#define FCO_DVP_REFINE_C0132_C0170        0 // depth oriented disparity vector prediction from JCT3V-C0132 and JCT3V-C0170
204#define FCO_FIX                           0 // Bug fix for C0137 and C0152 on FCO
205#define FCO_FIX_SPS_CHANGE                0 // Sending camera parameters in SPS of depth for depth to disparity conversion used by VSP and DoDVP
206#else
207#define DISABLE_FCO_FOR_VSO               0 // Optional compile settings to disable VSO with FCO.
208#define FCO_DVP_REFINE_C0132_C0170        0 // depth oriented disparity vector prediction from JCT3V-C0132 and JCT3V-C0170
209#define FCO_FIX                           0 // Fixing bugs from HTM 6.0 which
210#define FCO_FIX_SPS_CHANGE                0 // Fixing bugs from HTM 6.0 which
211#endif
212
213///// ***** VSP *********
214#define MERL_VSP_C0152                       1 // JCT3V-C0152: 1: enable VSP-related tools; 0: disable VSP-related tools
215                                               // LGE_SIMP_DVP_REFINE_C0112
216                                               // MERL_MTK_VSP_DVP_REFINE_C0152_C0131
217#if MERL_VSP_C0152
218
219
220#define FIX_MERGE_D                          1 // Fix to compile merged version
221
222
223#define MERL_General_Fix                     0 // General fix by MERL
224#define MERL_VSP_C0152_BugFix_ForNoDepthCase 1 // MERL bugfix for test condition of no depth
225#define QC_BVSP_CleanUP_D0191                    1
226
227#define MTK_D0156                 1
228#define LGE_VSP_INHERIT_D0092     1
229
230#define MERL_VSP_COMPENSATION_C0152          1 // JCT3V-C0152: 1: add VSP merge candidate to merging candidate list; 0: not to add (nocand).
231
232#define MERL_VSP_BLOCKSIZE_C0152             4 // JCT3V-C0152: VSP block size, supported values: 1, 2 and 4.
233#if MERL_VSP_BLOCKSIZE_C0152 == 1
234#define MERL_CVSP_D0165                      1 // JCT3V-D0165: 1: enable CVSP; 0: disable CVSP.
235#else
236#define MERL_CVSP_D0165                      0 // JCT3V-D0165: 1: enable CVSP; 0: disable CVSP.
237#endif
238#if LGE_VSP_INHERIT_D0092
239#define VSP_MERGE_POS                        3 // JCT3V-C0152: fixed position of VSP candidate in merge list, supported values: 3.
240#else
241#define VSP_MERGE_POS                        5 // JCT3V-C0152: fixed position of VSP candidate in merge list, supported values: 5.
242#endif                                               // MTK_DVPREFINE_BVSP_BUG_FIX               1
243#define MTK_DEPTH_TO_DISP_D0138              1 // JCT3V-D0138: Use max among four corners for DoNBDV and BVSP
244
245#if MERL_General_Fix
246#define MTK_LGE_VSP_DEPTH_OFF_D0105_D0139    1 // JCT3V-D0105/JCT3V-D0139: disable VSP for depth map
247#define MTK_VSP_USING_NBDV_D0105             1 // JCT3V-D0105: use NBDV instead of DoNBDV for BVSP
248#endif
249
250#if MERL_General_Fix
251#define MERL_VSP_NBDV_RefVId_Fix_D0166       1 // JCT3V-D0166: 1: fix the NBDV with ref view selectioin; 0: always use base view with refViewIdx=0
252#else
253#define MERL_VSP_NBDV_RefVId_Fix_D0166       0
254#endif
255
256#if MERL_VSP_NBDV_RefVId_Fix_D0166
257#define MERL_Bi_VSP_D0166                    1 // JCT3V-D0166: 1: add supporting for Bi-VSP, the code under the macro can also handle uni-direction VSP
258#else
259#define MERL_Bi_VSP_D0166                    0
260#endif
261
262#else // !MERL_VSP_C0152
263#define MERL_VSP_COMPENSATION_C0152          0 // JCT3V-C0152: 1: add VSP merge candidate to merging candidate list; 0: not to add
264#define MERL_VSP_BLOCKSIZE_C0152             4 // JCT3V-C0152: VSP block size, supported values: 1, 2 and 4.
265#define MERL_VSP_C0152_BugFix_ForNoDepthCase 0 // MERL bugfix for test condition of no depth
266#define MERL_CVSP_D0165                      0 // JCT3V-D0165: 1: enable CVSP; 0: disable CVSP.
267#define MERL_VSP_NBDV_RefVId_Fix_D0166       0 // JCT3V-D0166: 1: fix the NBDV with ref view selectioin; 0: always use base view with refViewIdx=0
268#define MERL_Bi_VSP_D0166                    0 // JCT3V-D0166: 1: add supporting for Bi-VSP, the code under the macro can also handle uni-direction VSP
269#define MTK_VSP_USING_NBDV_D0105             0
270#define MERL_General_Fix                     0
271#endif
272
273#if !MERL_General_Fix
274#define MTK_LGE_VSP_DEPTH_OFF_D0105_D0139    1 // JCT3V-D0105/JCT3V-D0139: disable VSP for depth map
275#define MTK_VSP_USING_NBDV_D0105             1 // JCT3V-D0105: use NBDV instead of DoNBDV for BVSP
276#endif
277
278///// ***** DERIVED PARAMETERS *********
279#if H3D_NBDV                   
280#define DIS_CANS                          1
281#define MCP_DIS_CANS                      7
282#endif                                 
283
284#define HHI_INTERVIEW_SKIP_LAMBDA_SCALE   1
285
286#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
287#define DMM_WEDGEMODEL_MIN_SIZE           4
288#define DMM_WEDGEMODEL_MAX_SIZE          32
289#define DMM_WEDGE_PREDDIR_DELTAEND_MAX    4
290#endif
291
292#if LGE_EDGE_INTRA_A0070
293#define LGE_EDGE_INTRA_MIN_SIZE           4
294#define LGE_EDGE_INTRA_MAX_SIZE           32
295#define LGE_EDGE_INTRA_THRESHOLD          20
296#define LGE_EDGE_INTRA_MAX_EDGE_NUM_PER_4x4 8
297#define LGE_EDGE_INTRA_DELTA_DC           1
298#define LGE_EDGE_INTRA_PIXEL_DIFFERENCE   1
299#endif
300
301
302#if H3D_NBDV                           
303#define DVFROM_LEFTBELOW                  1
304#define DVFROM_LEFT                       2
305#define DVFROM_ABOVERIGHT                 3
306#define DVFROM_ABOVE                      4
307#define DVFROM_ABOVELEFT                  5
308#define DVFROM_COL                        6
309#endif
310
311
312#if HHI_DMM_PRED_TEX || HHI_DMM_WEDGE_INTRA
313#define DMM3_SIMPLIFY_TR                  1
314#endif
315
316
317#if RWTH_SDC_DLT_B0036
318#define Log2( n ) ( log((double)n) / log(2.0) )
319#define HS_REFERENCE_SUBSAMPLE_C0154      1
320#endif
321
322#define HHI_MPI_MERGE_POS                 0
323#endif
324
325
326///// ***** HM 6.1 *********
327
328//// REMOVED HM 6.1 Guard macros (corresponding to macros removed in HM 6.3.1)
329/*
330#define SKIPFRAME_BUGFIX                  1 ///< bug fix to enable skipFrame at decoder
331#define START_DECODING_AT_CRA             1 ///< H0496, start decoding at clear random access point
332#define NO_COMBINED_PARALLEL              1 ///< Disallow any combined usage of parallel tools among Tile, EntropySlice and Wavefont
333#define PARALLEL_MERGE                    1 ///< H0082 parallel merge/skip
334#define MVP_AT_ENTROPYSLICE_BOUNDARY      1  //< H0362 enable motion prediction accross entropy slice boundary
335#define FAST_DECISION_FOR_MRG_RD_COST     1  ////< H0178: Fast Decision for Merge 2Nx2N RDCost
336#define PIC_CROPPING                      1  ///< Picture cropping and size constraints
337#define NAL_REF_FLAG                      1  ///< Change nal_ref_idc to nal_ref_flag (JCTVC-F463)
338#define REMOVE_DIV_OPERATION      1  ///< H0238: Simplified intra horizontal and vertical filtering
339#define LOGI_INTRA_NAME_3MPM      1  ///< H0407: logical Intra mode naming (sequential angular mode numbering) and 3 MPM mode coding
340#define LEVEL_CTX_LUMA_RED        1  ///<H0130: Luma level context reduction
341#define REMOVE_INFER_SIGGRP       1  ///<H0131: Remove inferred significant_coeff_group_flag
342#define SET_MERGE_TMVP_REFIDX     1  ///< H0278/H0199: Setting the merge TMVP refidx to 0 for the non-first partition
343#define MULTILEVEL_SIGMAP_EXT     1  ///< H0526: multi-level significance map extended to smaller TUs
344#define MULTIBITS_DATA_HIDING     1  ///< H0481: multiple sign bit hiding
345#define DEQUANT_CLIPPING          1  ///< H0312/H0541: transformed coefficients clipping before de-quantization
346#define REMOVE_NON_SCALED         1 ///< H0164/H0250: Removal of non-scaled merge candidate
347#define MRG_IDX_CTX_RED           1 ///< H0251: Merge index context reduction
348#define SIMP_MRG_PRUN             1 ///< H0252: simplification of merge pruning process
349#define AMVP_PRUNING_SIMPLIFICATION         1     ///H0316: simplify the pruning process of AMVP by exempting the temporal candidate
350#define AMVP_ZERO_CHECKING_REMOVAL          1     ///H0239/H0316: remove zero motion vector checking of AMVP
351#define H0111_MVD_L1_ZERO         1  ///< H0111: modification of bi-prediction
352#define CLIPSCALEDMVP               1  ///< H0216: Clipping scaled MV to 16 bit
353#define UNIFIED_TRANSFORM_TREE      1   ///< H0123: unified tree structure for TU
354#define SIGMAP_CTX_SUBBLOCK       1 ///< H0290: 4x4 sub-block based region for significant_flag context selection
355#define LAST_CTX_REDUCTION        1  ///< H0537/H514: contexts reduction for last position coding
356#define AMP_CTX                   1 ///<H0545: context reduction for asymmetric partition
357#define RESTRICT_GR1GR2FLAG_NUMBER    1 ///< H0554: Throughput improvement of CABAC coefficients level coding
358#define EIGHT_BITS_RICE_CODE        1 ///< H0498 : 8 bits rice codes
359#define SAO_UNIT_INTERLEAVING      1   ///< H0273
360#define ALF_SINGLE_FILTER_SHAPE    1     //< !!! H0068: Single filter type : 9x7 cross + 3x3 square
361#define ALF_16_BA_GROUPS        1     ///< H0409 16 BA groups
362#define LCU_SYNTAX_ALF          1     ///< H0274 LCU-syntax ALF
363#define ALF_CHROMA_COEF_PRED_HARMONIZATION 1 ///< H0483: ALF chroma coeff pred harmonization
364#define CABAC_LINEAR_INIT       1     ///< H0535 : linear CABAC initialization
365#define UNIFIED_TRANSFORM       1     ///< H0492: unify square and non-square transform
366#define G519_TU_AMP_NSQT_HARMONIZATION  1   ///< G519: Harmonization of implicit TU, AMP and NSQT
367#define CHROMA_MODE_CODING                   1     //H0326/H0475 : 2-length fixed, bypass coding for chroma intra prediction mode
368#define NSQT_LFFIX                           1     ///< Bug fix related to NSQT and deblocking filter
369#define H0736_AVC_STYLE_QP_RANGE             1    ///< H0736: AVC style qp range and wrapping.
370#define H0204_QP_PREDICTION                  1    ///< H0204: improved QP prediction
371#define BURST_IPCM                        1           ///< H0051: Burst IPCM
372#define H0137_0138_LIST_MODIFICATION      1           // Enabled reference picture lists combination (H0137) and reference picture list modification (H0138) updates
373#define LTRP_MULT                       1           ///< enable/disable multiple long term reference pictures with same POC LSB
374#define OL_FLUSH 1          // Set to 1 to enable Wavefront Flush.
375#define FIXED_NUMBER_OF_TILES_SLICE_MODE                1
376#define SCALING_LIST                  1 //JCTVC-H0230/H0461/H0237
377#define DEFAULT_DC                    1 // JCTVC-H0242
378#define RPS_IN_SPS                    1 // Adopted during discussion of JCTVC-H0423
379#define H0412_REF_PIC_LIST_RESTRICTION 1
380#define H0566_TLA                     1
381#define H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER 1
382#define DBL_H0473_PART_1          1   //Deblocking filtering simplification
383#define DBL_CONTROL               1   //PPS deblocking_filter_control_present_flag (JCTVC-H0398); condition for inherit params flag in SH (JCTVC-H0424)
384#define DBL_STRONG_FILTER_CLIP    1   //Introduction of strong filter clipping in deblocking filter (JCTVC-H0275)
385#define H0388                       1 // JCTVC-H0388
386#define TILES_WPP_ENTRY_POINT_SIGNALLING        1 // JCTVC-H0556. Assumes either Tiles is ON or WPP is ON (not both simultaneously).
387#define REMOVE_TILE_DEPENDENCE                  1 // remove tile_boundary_independence_flag and dependent tiles
388#define TILES_OR_ENTROPY_SYNC_IDC               1 // tiles_or_entropy_coding_sync_idc flag
389#define COMPLETE_SLICES_IN_TILE     1 // Among the constraints between slices and tiles, all slices within a tile shall be complete (JCTVC-H0348/JCTVC-H0463) for SliceMode 1&2
390#define WPP_SIMPLIFICATION          1 // JCTVC-H0349/JCTVC-0517
391*/
392
393
394#define LOSSLESS_CODING                   1 ///< H0530: lossless and lossy (mixed) coding
395#if LOSSLESS_CODING
396#define SEQUENCE_LEVEL_LOSSLESS           0 ///< H0530: used only for sequence or frame-level lossless coding
397#endif
398
399#define LOG2_PARALLEL_MERGE_LEVEL_MINUS2  0 //< H0082 parallel merge level 0-> 4x4, 1-> 8x8, 2->16x16, 3->32x32, 4->64x64
400
401#if LOG2_PARALLEL_MERGE_LEVEL_MINUS2
402#define CU_BASED_MRG_CAND_LIST            1  //< H0240: single merge candidate list for all PUs inside a 8x8 CU conditioned on LOG2_PARALLEL_MERGE_LEVEL_MINUS2 > 0
403#define FIX_CU_BASED_MRG_CAND_LIST_B0136  1  //< B0136 bug fix for CU_BASED_MRG_CAND_LIST
404#endif
405
406#define DISABLING_CLIP_FOR_BIPREDME         1  ///< Ticket #175
407#define SIGMAP_CONST_AT_HIGH_FREQUENCY      1      ///< H0095 method2.1: const significance map at high freaquency
408
409#define C1FLAG_NUMBER               8 // maximum number of largerThan1 flag coded in one chunk :  16 in HM5
410#define C2FLAG_NUMBER               1 // maximum number of largerThan2 flag coded in one chunk:  16 in HM5
411
412#if !LGE_SAO_MIGRATION_D0091
413#define REMOVE_SAO_LCU_ENC_CONSTRAINTS_1 0  ///< disable the encoder constraint that does not test SAO/BO mode for chroma in interleaved mode
414#define REMOVE_SAO_LCU_ENC_CONSTRAINTS_2 0  ///< disable the encoder constraint that reduce the range of SAO/EO for chroma in interleaved mode
415#endif
416#define REMOVE_SAO_LCU_ENC_CONSTRAINTS_3 0  ///< disable the encoder constraint that conditionally disable SAO for chroma for entire slice in interleaved mode
417#define COLLOCATED_REF_IDX      1           ///< H0442: signal collocated reference index
418
419
420#define MAX_NUM_SPS                32
421#define MAX_NUM_PPS                256
422#define MAX_NUM_APS                32         //< !!!KS: number not defined in WD yet
423
424#define MRG_MAX_NUM_CANDS_SIGNALED         5   //<G091: value of maxNumMergeCand signaled in slice header
425
426#define WEIGHTED_CHROMA_DISTORTION  1   ///< F386: weighting of chroma for RDO
427#define RDOQ_CHROMA_LAMBDA          1   ///< F386: weighting of chroma for RDOQ
428#define ALF_CHROMA_LAMBDA           1   ///< F386: weighting of chroma for ALF
429#define SAO_CHROMA_LAMBDA           1   ///< F386: weighting of chroma for SAO
430
431#define MIN_SCAN_POS_CROSS          4
432
433#define FAST_BIT_EST                1   ///< G763: Table-based bit estimation for CABAC
434
435
436#define MLS_GRP_NUM                         64     ///< G644 : Max number of coefficient groups, max(16, 64)
437#define MLS_CG_SIZE                         4      ///< G644 : Coefficient group size of 4x4
438
439#define ADAPTIVE_QP_SELECTION               1      ///< G382: Adaptive reconstruction levels, non-normative part for adaptive QP selection
440#if ADAPTIVE_QP_SELECTION
441#define ARL_C_PRECISION                     7      ///< G382: 7-bit arithmetic precision
442#define LEVEL_RANGE                         30     ///< G382: max coefficient level in statistics collection
443#endif
444
445
446#define NS_HAD                               1
447
448#define APS_BITS_FOR_SAO_BYTE_LENGTH 12
449#define APS_BITS_FOR_ALF_BYTE_LENGTH 8
450
451
452
453#define HHI_RQT_INTRA_SPEEDUP             1           ///< tests one best mode with full rqt
454#define HHI_RQT_INTRA_SPEEDUP_MOD         0           ///< tests two best modes with full rqt
455
456
457
458#if HHI_RQT_INTRA_SPEEDUP_MOD && !HHI_RQT_INTRA_SPEEDUP
459#error
460#endif
461
462
463
464#define VERBOSE_RATE 0                               ///< Print additional rate information in encoder
465
466#define AMVP_DECIMATION_FACTOR            4
467
468#define SCAN_SET_SIZE                     16
469#define LOG2_SCAN_SET_SIZE                4
470
471#if LGE_EDGE_INTRA_A0070
472#if LGE_EDGE_INTRA_DELTA_DC
473#define FAST_UDI_MAX_RDMODE_NUM               37          ///< maximum number of RD comparison in fast-UDI estimation loop
474#else
475#define FAST_UDI_MAX_RDMODE_NUM               36          ///< maximum number of RD comparison in fast-UDI estimation loop
476#endif
477#else
478#define FAST_UDI_MAX_RDMODE_NUM               35          ///< maximum number of RD comparison in fast-UDI estimation loop
479#endif
480
481#define ZERO_MVD_EST                          0           ///< Zero Mvd Estimation in normal mode
482
483#define NUM_INTRA_MODE 36
484#define LM_CHROMA_IDX  35
485
486#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
487enum MODE_IDX
488{
489  DMM_WEDGE_FULL_IDX         = NUM_INTRA_MODE,
490  DMM_WEDGE_FULL_D_IDX       = NUM_INTRA_MODE+1,
491  DMM_WEDGE_PREDTEX_IDX      = NUM_INTRA_MODE+2,
492  DMM_WEDGE_PREDTEX_D_IDX    = NUM_INTRA_MODE+3,
493  DMM_CONTOUR_PREDTEX_IDX    = NUM_INTRA_MODE+4,
494  DMM_CONTOUR_PREDTEX_D_IDX  = NUM_INTRA_MODE+5,
495  DMM_WEDGE_PREDDIR_IDX      = NUM_INTRA_MODE+6,
496  DMM_WEDGE_PREDDIR_D_IDX    = NUM_INTRA_MODE+7
497};
498#define NUM_DMM_MODE 8
499#elif HHI_DMM_WEDGE_INTRA && !HHI_DMM_PRED_TEX
500enum MODE_IDX
501{
502  DMM_WEDGE_FULL_IDX         = NUM_INTRA_MODE,
503  DMM_WEDGE_FULL_D_IDX       = NUM_INTRA_MODE+1,
504  DMM_WEDGE_PREDDIR_IDX      = NUM_INTRA_MODE+2,
505  DMM_WEDGE_PREDDIR_D_IDX    = NUM_INTRA_MODE+3
506};
507#define NUM_DMM_MODE 4
508#elif !HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
509enum MODE_IDX
510{
511  DMM_WEDGE_PREDTEX_IDX      = NUM_INTRA_MODE,
512  DMM_WEDGE_PREDTEX_D_IDX    = NUM_INTRA_MODE+1,
513  DMM_CONTOUR_PREDTEX_IDX    = NUM_INTRA_MODE+2,
514  DMM_CONTOUR_PREDTEX_D_IDX  = NUM_INTRA_MODE+3,
515};
516#define NUM_DMM_MODE 4
517#endif
518
519#if LGE_EDGE_INTRA_A0070
520#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
521#define EDGE_INTRA_IDX  (NUM_INTRA_MODE+NUM_DMM_MODE)
522#endif // HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
523#if LGE_EDGE_INTRA_DELTA_DC
524#define EDGE_INTRA_DELTA_IDX          (EDGE_INTRA_IDX+1)
525#endif
526#endif // LGE_EDGE_INTRA
527
528#define IBDI_DISTORTION                0           ///< enable/disable SSE modification when IBDI is used (JCTVC-D152)
529#define FIXED_ROUNDING_FRAME_MEMORY    0           ///< enable/disable fixed rounding to 8-bitdepth of frame memory when IBDI is used
530
531#define WRITE_BACK                      1           ///< Enable/disable the encoder to replace the deltaPOC and Used by current from the config file with the values derived by the refIdc parameter.
532#define PRINT_RPS_INFO                  0           ///< Enable/disable the printing of bits used to send the RPS.
533                                                    // using one nearest frame as reference frame, and the other frames are high quality (POC%4==0) frames (1+X)
534                                                    // this should be done with encoder only decision
535                                                    // but because of the absence of reference frame management, the related code was hard coded currently
536#define OL_FLUSH_ALIGN 0    // Align flush to byte boundary.  This preserves byte operations in CABAC (faster) but at the expense of an average
537                            // of 4 bits per flush.
538                            // Setting to 0 will slow cabac by an as yet unknown amount.
539                            // This is here just to perform timing tests -- OL_FLUSH_ALIGN should be 0 for WPP.
540
541#define RVM_VCEGAM10_M         4
542
543#define PLANAR_IDX             0
544#define VER_IDX                26                    // index for intra VERTICAL   mode
545#define HOR_IDX                10                    // index for intra HORIZONTAL mode
546#define DC_IDX                 1                     // index for intra DC mode
547#define NUM_CHROMA_MODE        6                     // total number of chroma modes
548#define DM_CHROMA_IDX          36                    // chroma mode index for derived from luma intra mode
549
550
551#define FAST_UDI_USE_MPM 1
552
553#define RDO_WITHOUT_DQP_BITS              0           ///< Disable counting dQP bits in RDO-based mode decision
554
555#define FULL_NBIT 0 ///< When enabled, does not use g_uiBitIncrement anymore to support > 8 bit data
556
557
558#define AD_HOC_SLICES_FIXED_NUMBER_OF_LCU_IN_SLICE      1          ///< OPTION IDENTIFIER. mode==1 -> Limit maximum number of largest coding tree blocks in a slice
559#define AD_HOC_SLICES_FIXED_NUMBER_OF_BYTES_IN_SLICE    2          ///< OPTION IDENTIFIER. mode==2 -> Limit maximum number of bins/bits in a slice
560#define AD_HOC_SLICES_FIXED_NUMBER_OF_TILES_IN_SLICE    3
561
562// Entropy slice options
563#define SHARP_FIXED_NUMBER_OF_LCU_IN_ENTROPY_SLICE            1          ///< OPTION IDENTIFIER. Limit maximum number of largest coding tree blocks in an entropy slice
564#define SHARP_MULTIPLE_CONSTRAINT_BASED_ENTROPY_SLICE         2          ///< OPTION IDENTIFIER. Limit maximum number of bins/bits in an entropy slice
565
566#define LOG2_MAX_NUM_COLUMNS_MINUS1        7
567#define LOG2_MAX_NUM_ROWS_MINUS1           7
568#define LOG2_MAX_COLUMN_WIDTH              13
569#define LOG2_MAX_ROW_HEIGHT                13
570
571#define MAX_MARKER_PER_NALU                 1000
572
573#define MATRIX_MULT                             0   // Brute force matrix multiplication instead of partial butterfly
574
575#define REG_DCT 65535
576
577#define AMP_SAD                               1           ///< dedicated SAD functions for AMP
578#define AMP_ENC_SPEEDUP                       1           ///< encoder only speed-up by AMP mode skipping
579#if AMP_ENC_SPEEDUP
580#define AMP_MRG                               1           ///< encoder only force merge for AMP partition (no motion search for AMP)
581#endif
582
583#define SCALING_LIST_OUTPUT_RESULT    0 //JCTVC-G880/JCTVC-G1016 quantization matrices
584#define H0566_TLA_SET_FOR_SWITCHING_POINTS 1
585
586
587#define CABAC_INIT_FLAG             1 // JCTVC-H0540
588#define CABAC_INIT_PRESENT_FLAG     1
589
590
591// ====================================================================================================================
592// VPS INTEGRATION
593// ====================================================================================================================
594#if !QC_MVHEVC_B0046
595#if VIDYO_VPS_INTEGRATION
596#define MAX_NUM_VPS 10
597#endif
598#else
599#define MAX_NUM_VPS 1
600#endif
601
602
603// ====================================================================================================================
604// Basic type redefinition
605// ====================================================================================================================
606
607typedef       void                Void;
608typedef       bool                Bool;
609
610typedef       char                Char;
611typedef       unsigned char       UChar;
612typedef       short               Short;
613typedef       unsigned short      UShort;
614typedef       int                 Int;
615typedef       unsigned int        UInt;
616typedef       double              Double;
617
618// ====================================================================================================================
619// 64-bit integer type
620// ====================================================================================================================
621
622#ifdef _MSC_VER
623typedef       __int64             Int64;
624
625#if _MSC_VER <= 1200 // MS VC6
626typedef       __int64             UInt64;   // MS VC6 does not support unsigned __int64 to double conversion
627#else
628typedef       unsigned __int64    UInt64;
629#endif
630
631#else
632
633typedef       long long           Int64;
634typedef       unsigned long long  UInt64;
635
636#endif
637
638// ====================================================================================================================
639// Type definition
640// ====================================================================================================================
641
642typedef       UChar           Pxl;        ///< 8-bit pixel type
643typedef       Short           Pel;        ///< 16-bit pixel type
644typedef       Int             TCoeff;     ///< transform coefficient
645
646
647// ====================================================================================================================
648// Define Distortion Types
649// ====================================================================================================================
650typedef       Int64           RMDist;     ///< renderer model distortion
651
652#if HHI_VSO_DIST_INT
653typedef       Int              Dist;       ///< RDO distortion
654#define       RDO_DIST_MIN     MIN_INT
655#define       RDO_DIST_MAX     MAX_INT
656#else
657typedef       UInt             Dist;       ///< RDO distortion
658#define       RDO_DIST_MIN     0
659#define       RDO_DIST_MAX     MAX_UINT
660#endif
661
662/// parameters for adaptive loop filter
663class TComPicSym;
664
665#define NUM_DOWN_PART 4
666
667enum SAOTypeLen
668{
669  SAO_EO_LEN    = 4,
670  SAO_BO_LEN    = 4,
671  SAO_MAX_BO_CLASSES = 32
672};
673
674enum SAOType
675{
676  SAO_EO_0 = 0,
677  SAO_EO_1,
678  SAO_EO_2,
679  SAO_EO_3,
680  SAO_BO,
681  MAX_NUM_SAO_TYPE
682};
683
684typedef struct _SaoQTPart
685{
686  Int         iBestType;
687  Int         iLength;
688#if LGE_SAO_MIGRATION_D0091
689  Int         subTypeIdx ;                 ///< indicates EO class or BO band position
690#else
691  Int         bandPosition ;
692#endif
693  Int         iOffset[4];
694  Int         StartCUX;
695  Int         StartCUY;
696  Int         EndCUX;
697  Int         EndCUY;
698
699  Int         PartIdx;
700  Int         PartLevel;
701  Int         PartCol;
702  Int         PartRow;
703
704  Int         DownPartsIdx[NUM_DOWN_PART];
705  Int         UpPartIdx;
706
707  Bool        bSplit;
708
709  //---- encoder only start -----//
710  Bool        bProcessed;
711  Double      dMinCost;
712  Int64       iMinDist;
713  Int         iMinRate;
714  //---- encoder only end -----//
715} SAOQTPart;
716
717typedef struct _SaoLcuParam
718{
719  Bool       mergeUpFlag;
720  Bool       mergeLeftFlag;
721  Int        typeIdx;
722#if LGE_SAO_MIGRATION_D0091
723  Int        subTypeIdx;
724#else
725  Int        bandPosition;
726#endif
727  Int        offset[4];
728#if !LGE_SAO_MIGRATION_D0091
729  Int        runDiff;
730  Int        run;
731#endif
732  Int        partIdx;
733  Int        partIdxTmp;
734  Int        length;
735} SaoLcuParam;
736
737struct SAOParam
738{
739  Bool       bSaoFlag[3];
740  SAOQTPart* psSaoPart[3];
741  Int        iMaxSplitLevel;
742  Int        iNumClass[MAX_NUM_SAO_TYPE];
743  Bool         oneUnitFlag[3];
744  SaoLcuParam* saoLcuParam[3];
745  Int          numCuInHeight;
746  Int          numCuInWidth;
747  ~SAOParam();
748};
749
750struct ALFParam
751{
752  Int alf_flag;                           ///< indicates use of ALF
753  Int num_coeff;                          ///< number of filter coefficients
754  Int filter_shape;
755  Int *filterPattern;
756  Int startSecondFilter;
757  Int filters_per_group;
758  Int predMethod;
759  Int *nbSPred;
760  Int **coeffmulti;
761  Int minKStart;
762  Int componentID;
763  Int* kMinTab;
764  //constructor, operator
765  ALFParam():componentID(-1){}
766  ALFParam(Int cID){create(cID);}
767  ALFParam(const ALFParam& src) {*this = src;}
768  ~ALFParam(){destroy();}
769  const ALFParam& operator= (const ALFParam& src);
770private:
771  Void create(Int cID);
772  Void destroy();
773  Void copy(const ALFParam& src);
774};
775
776struct AlfUnitParam
777{
778  Int   mergeType;
779  Bool  isEnabled;
780  Bool  isNewFilt;
781  Int   storedFiltIdx;
782  ALFParam* alfFiltParam;
783  //constructor, operator
784  AlfUnitParam();
785  AlfUnitParam(const AlfUnitParam& src){ *this = src;}
786  const AlfUnitParam& operator= (const AlfUnitParam& src);
787  Bool operator == (const AlfUnitParam& cmp);
788};
789
790struct AlfParamSet
791{
792  Bool isEnabled[3];
793  Bool isUniParam[3];
794  Int  numLCUInWidth;
795  Int  numLCUInHeight;
796  Int  numLCU;
797  AlfUnitParam* alfUnitParam[3];
798  //constructor, operator
799  AlfParamSet(){create();}
800  ~AlfParamSet(){destroy();}
801  Void create(Int width =0, Int height=0, Int num=0);
802  Void init();
803  Void releaseALFParam();
804  Void createALFParam();
805private:
806  Void destroy();
807};
808
809
810
811/// parameters for deblocking filter
812typedef struct _LFCUParam
813{
814  Bool bInternalEdge;                     ///< indicates internal edge
815  Bool bLeftEdge;                         ///< indicates left edge
816  Bool bTopEdge;                          ///< indicates top edge
817} LFCUParam;
818
819// ====================================================================================================================
820// Enumeration
821// ====================================================================================================================
822
823/// supported slice type
824enum SliceType
825{
826  I_SLICE,
827  P_SLICE,
828  B_SLICE
829};
830
831/// chroma formats (according to semantics of chroma_format_idc)
832enum ChromaFormat
833{
834  CHROMA_400  = 0,
835  CHROMA_420  = 1,
836  CHROMA_422  = 2,
837  CHROMA_444  = 3
838};
839
840/// supported partition shape
841enum PartSize
842{
843  SIZE_2Nx2N,           ///< symmetric motion partition,  2Nx2N
844  SIZE_2NxN,            ///< symmetric motion partition,  2Nx N
845  SIZE_Nx2N,            ///< symmetric motion partition,   Nx2N
846  SIZE_NxN,             ///< symmetric motion partition,   Nx N
847  SIZE_2NxnU,           ///< asymmetric motion partition, 2Nx( N/2) + 2Nx(3N/2)
848  SIZE_2NxnD,           ///< asymmetric motion partition, 2Nx(3N/2) + 2Nx( N/2)
849  SIZE_nLx2N,           ///< asymmetric motion partition, ( N/2)x2N + (3N/2)x2N
850  SIZE_nRx2N,           ///< asymmetric motion partition, (3N/2)x2N + ( N/2)x2N
851  SIZE_NONE = 15
852};
853
854
855enum BlenMod
856{
857    BLEND_NONE  = -1,
858    BLEND_AVRG  = 0,
859    BLEND_LEFT  = 1,
860    BLEND_RIGHT = 2,
861    BLEND_GEN   =  3
862};
863
864/// supported prediction type
865enum PredMode
866{
867  MODE_SKIP,            ///< SKIP mode
868  MODE_INTER,           ///< inter-prediction mode
869  MODE_INTRA,           ///< intra-prediction mode
870  MODE_NONE = 15
871};
872
873/// texture component type
874enum TextType
875{
876  TEXT_LUMA,            ///< luma
877  TEXT_CHROMA,          ///< chroma (U+V)
878  TEXT_CHROMA_U,        ///< chroma U
879  TEXT_CHROMA_V,        ///< chroma V
880  TEXT_ALL,             ///< Y+U+V
881  TEXT_NONE = 15
882};
883
884/// reference list index
885enum RefPicList
886{
887  REF_PIC_LIST_0 = 0,   ///< reference list 0
888  REF_PIC_LIST_1 = 1,   ///< reference list 1
889  REF_PIC_LIST_C = 2,   ///< combined reference list for uni-prediction in B-Slices
890  REF_PIC_LIST_X = 100  ///< special mark
891};
892
893/// distortion function index
894enum DFunc
895{
896  DF_DEFAULT  = 0,
897  DF_SSE      = 1,      ///< general size SSE
898  DF_SSE4     = 2,      ///<   4xM SSE
899  DF_SSE8     = 3,      ///<   8xM SSE
900  DF_SSE16    = 4,      ///<  16xM SSE
901  DF_SSE32    = 5,      ///<  32xM SSE
902  DF_SSE64    = 6,      ///<  64xM SSE
903  DF_SSE16N   = 7,      ///< 16NxM SSE
904
905  DF_SAD      = 8,      ///< general size SAD
906  DF_SAD4     = 9,      ///<   4xM SAD
907  DF_SAD8     = 10,     ///<   8xM SAD
908  DF_SAD16    = 11,     ///<  16xM SAD
909  DF_SAD32    = 12,     ///<  32xM SAD
910  DF_SAD64    = 13,     ///<  64xM SAD
911  DF_SAD16N   = 14,     ///< 16NxM SAD
912
913  DF_SADS     = 15,     ///< general size SAD with step
914  DF_SADS4    = 16,     ///<   4xM SAD with step
915  DF_SADS8    = 17,     ///<   8xM SAD with step
916  DF_SADS16   = 18,     ///<  16xM SAD with step
917  DF_SADS32   = 19,     ///<  32xM SAD with step
918  DF_SADS64   = 20,     ///<  64xM SAD with step
919  DF_SADS16N  = 21,     ///< 16NxM SAD with step
920
921  DF_HADS     = 22,     ///< general size Hadamard with step
922  DF_HADS4    = 23,     ///<   4xM HAD with step
923  DF_HADS8    = 24,     ///<   8xM HAD with step
924  DF_HADS16   = 25,     ///<  16xM HAD with step
925  DF_HADS32   = 26,     ///<  32xM HAD with step
926  DF_HADS64   = 27,     ///<  64xM HAD with step
927  DF_HADS16N  = 28,     ///< 16NxM HAD with step
928
929#if SAIT_VSO_EST_A0033
930  DF_VSD      = 29,      ///< general size VSD
931  DF_VSD4     = 30,      ///<   4xM VSD
932  DF_VSD8     = 31,      ///<   8xM VSD
933  DF_VSD16    = 32,      ///<  16xM VSD
934  DF_VSD32    = 33,      ///<  32xM VSD
935  DF_VSD64    = 34,      ///<  64xM VSD
936  DF_VSD16N   = 35,      ///< 16NxM VSD
937#endif
938
939
940#if AMP_SAD
941  DF_SAD12    = 43,
942  DF_SAD24    = 44,
943  DF_SAD48    = 45,
944
945  DF_SADS12   = 46,
946  DF_SADS24   = 47,
947  DF_SADS48   = 48,
948
949  DF_SSE_FRAME = 50     ///< Frame-based SSE
950#else
951  DF_SSE_FRAME = 33     ///< Frame-based SSE
952#endif
953};
954
955/// index for SBAC based RD optimization
956enum CI_IDX
957{
958  CI_CURR_BEST = 0,     ///< best mode index
959  CI_NEXT_BEST,         ///< next best index
960  CI_TEMP_BEST,         ///< temporal index
961  CI_CHROMA_INTRA,      ///< chroma intra index
962  CI_QT_TRAFO_TEST,
963  CI_QT_TRAFO_ROOT,
964  CI_NUM,               ///< total number
965};
966
967/// motion vector predictor direction used in AMVP
968enum MVP_DIR
969{
970  MD_LEFT = 0,          ///< MVP of left block
971  MD_ABOVE,             ///< MVP of above block
972  MD_ABOVE_RIGHT,       ///< MVP of above right block
973  MD_BELOW_LEFT,        ///< MVP of below left block
974  MD_ABOVE_LEFT         ///< MVP of above left block
975};
976
977/// motion vector prediction mode used in AMVP
978enum AMVP_MODE
979{
980  AM_NONE = 0,          ///< no AMVP mode
981  AM_EXPL,              ///< explicit signalling of motion vector index
982};
983
984/// coefficient scanning type used in ACS
985enum COEFF_SCAN_TYPE
986{
987  SCAN_ZIGZAG = 0,      ///< typical zigzag scan
988  SCAN_HOR,             ///< horizontal first scan
989  SCAN_VER,              ///< vertical first scan
990  SCAN_DIAG              ///< up-right diagonal scan
991};
992
993// Renderer
994enum
995{
996  VIEWPOS_INVALID = -1,
997  VIEWPOS_LEFT    = 0,
998  VIEWPOS_RIGHT   = 1,
999  VIEWPOS_MERGED  = 2
1000};
1001
1002//! \}
1003
1004#endif
1005
1006
Note: See TracBrowser for help on using the repository browser.