source: 3DVCSoftware/trunk/source/Lib/TLibCommon/TypeDef.h @ 461

Last change on this file since 461 was 461, checked in by tech, 11 years ago
  • Added NCKU_BUG_FIX related to disparity derivation.
  • Added coding results.
  • Changed version number.
  • Property svn:eol-style set to native
File size: 43.5 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                     1// 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#define NCKU_BUG_FIX                         1 // NCKU bug fix on MTK_DEPTH_TO_DISP_D0138
245
246#if MERL_General_Fix
247#define MTK_LGE_VSP_DEPTH_OFF_D0105_D0139    1 // JCT3V-D0105/JCT3V-D0139: disable VSP for depth map
248#define MTK_VSP_USING_NBDV_D0105             1 // JCT3V-D0105: use NBDV instead of DoNBDV for BVSP
249#endif
250
251#if MERL_General_Fix
252#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
253#else
254#define MERL_VSP_NBDV_RefVId_Fix_D0166       0
255#endif
256
257#if MERL_VSP_NBDV_RefVId_Fix_D0166
258#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
259#else
260#define MERL_Bi_VSP_D0166                    0
261#endif
262
263#else // !MERL_VSP_C0152
264#define MERL_VSP_COMPENSATION_C0152          0 // JCT3V-C0152: 1: add VSP merge candidate to merging candidate list; 0: not to add
265#define MERL_VSP_BLOCKSIZE_C0152             4 // JCT3V-C0152: VSP block size, supported values: 1, 2 and 4.
266#define MERL_VSP_C0152_BugFix_ForNoDepthCase 0 // MERL bugfix for test condition of no depth
267#define MERL_CVSP_D0165                      0 // JCT3V-D0165: 1: enable CVSP; 0: disable CVSP.
268#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
269#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
270#define MTK_VSP_USING_NBDV_D0105             0
271#define MERL_General_Fix                     0
272#endif
273
274#if !MERL_General_Fix
275#define MTK_LGE_VSP_DEPTH_OFF_D0105_D0139    1 // JCT3V-D0105/JCT3V-D0139: disable VSP for depth map
276#define MTK_VSP_USING_NBDV_D0105             1 // JCT3V-D0105: use NBDV instead of DoNBDV for BVSP
277#endif
278
279///// ***** DERIVED PARAMETERS *********
280#if H3D_NBDV                   
281#define DIS_CANS                          1
282#define MCP_DIS_CANS                      7
283#endif                                 
284
285#define HHI_INTERVIEW_SKIP_LAMBDA_SCALE   1
286
287#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
288#define DMM_WEDGEMODEL_MIN_SIZE           4
289#define DMM_WEDGEMODEL_MAX_SIZE          32
290#define DMM_WEDGE_PREDDIR_DELTAEND_MAX    4
291#endif
292
293#if LGE_EDGE_INTRA_A0070
294#define LGE_EDGE_INTRA_MIN_SIZE           4
295#define LGE_EDGE_INTRA_MAX_SIZE           32
296#define LGE_EDGE_INTRA_THRESHOLD          20
297#define LGE_EDGE_INTRA_MAX_EDGE_NUM_PER_4x4 8
298#define LGE_EDGE_INTRA_DELTA_DC           1
299#define LGE_EDGE_INTRA_PIXEL_DIFFERENCE   1
300#endif
301
302
303#if H3D_NBDV                           
304#define DVFROM_LEFTBELOW                  1
305#define DVFROM_LEFT                       2
306#define DVFROM_ABOVERIGHT                 3
307#define DVFROM_ABOVE                      4
308#define DVFROM_ABOVELEFT                  5
309#define DVFROM_COL                        6
310#endif
311
312
313#if HHI_DMM_PRED_TEX || HHI_DMM_WEDGE_INTRA
314#define DMM3_SIMPLIFY_TR                  1
315#endif
316
317
318#if RWTH_SDC_DLT_B0036
319#define Log2( n ) ( log((double)n) / log(2.0) )
320#define HS_REFERENCE_SUBSAMPLE_C0154      1
321#endif
322
323#define HHI_MPI_MERGE_POS                 0
324#endif
325
326
327///// ***** HM 6.1 *********
328
329//// REMOVED HM 6.1 Guard macros (corresponding to macros removed in HM 6.3.1)
330/*
331#define SKIPFRAME_BUGFIX                  1 ///< bug fix to enable skipFrame at decoder
332#define START_DECODING_AT_CRA             1 ///< H0496, start decoding at clear random access point
333#define NO_COMBINED_PARALLEL              1 ///< Disallow any combined usage of parallel tools among Tile, EntropySlice and Wavefont
334#define PARALLEL_MERGE                    1 ///< H0082 parallel merge/skip
335#define MVP_AT_ENTROPYSLICE_BOUNDARY      1  //< H0362 enable motion prediction accross entropy slice boundary
336#define FAST_DECISION_FOR_MRG_RD_COST     1  ////< H0178: Fast Decision for Merge 2Nx2N RDCost
337#define PIC_CROPPING                      1  ///< Picture cropping and size constraints
338#define NAL_REF_FLAG                      1  ///< Change nal_ref_idc to nal_ref_flag (JCTVC-F463)
339#define REMOVE_DIV_OPERATION      1  ///< H0238: Simplified intra horizontal and vertical filtering
340#define LOGI_INTRA_NAME_3MPM      1  ///< H0407: logical Intra mode naming (sequential angular mode numbering) and 3 MPM mode coding
341#define LEVEL_CTX_LUMA_RED        1  ///<H0130: Luma level context reduction
342#define REMOVE_INFER_SIGGRP       1  ///<H0131: Remove inferred significant_coeff_group_flag
343#define SET_MERGE_TMVP_REFIDX     1  ///< H0278/H0199: Setting the merge TMVP refidx to 0 for the non-first partition
344#define MULTILEVEL_SIGMAP_EXT     1  ///< H0526: multi-level significance map extended to smaller TUs
345#define MULTIBITS_DATA_HIDING     1  ///< H0481: multiple sign bit hiding
346#define DEQUANT_CLIPPING          1  ///< H0312/H0541: transformed coefficients clipping before de-quantization
347#define REMOVE_NON_SCALED         1 ///< H0164/H0250: Removal of non-scaled merge candidate
348#define MRG_IDX_CTX_RED           1 ///< H0251: Merge index context reduction
349#define SIMP_MRG_PRUN             1 ///< H0252: simplification of merge pruning process
350#define AMVP_PRUNING_SIMPLIFICATION         1     ///H0316: simplify the pruning process of AMVP by exempting the temporal candidate
351#define AMVP_ZERO_CHECKING_REMOVAL          1     ///H0239/H0316: remove zero motion vector checking of AMVP
352#define H0111_MVD_L1_ZERO         1  ///< H0111: modification of bi-prediction
353#define CLIPSCALEDMVP               1  ///< H0216: Clipping scaled MV to 16 bit
354#define UNIFIED_TRANSFORM_TREE      1   ///< H0123: unified tree structure for TU
355#define SIGMAP_CTX_SUBBLOCK       1 ///< H0290: 4x4 sub-block based region for significant_flag context selection
356#define LAST_CTX_REDUCTION        1  ///< H0537/H514: contexts reduction for last position coding
357#define AMP_CTX                   1 ///<H0545: context reduction for asymmetric partition
358#define RESTRICT_GR1GR2FLAG_NUMBER    1 ///< H0554: Throughput improvement of CABAC coefficients level coding
359#define EIGHT_BITS_RICE_CODE        1 ///< H0498 : 8 bits rice codes
360#define SAO_UNIT_INTERLEAVING      1   ///< H0273
361#define ALF_SINGLE_FILTER_SHAPE    1     //< !!! H0068: Single filter type : 9x7 cross + 3x3 square
362#define ALF_16_BA_GROUPS        1     ///< H0409 16 BA groups
363#define LCU_SYNTAX_ALF          1     ///< H0274 LCU-syntax ALF
364#define ALF_CHROMA_COEF_PRED_HARMONIZATION 1 ///< H0483: ALF chroma coeff pred harmonization
365#define CABAC_LINEAR_INIT       1     ///< H0535 : linear CABAC initialization
366#define UNIFIED_TRANSFORM       1     ///< H0492: unify square and non-square transform
367#define G519_TU_AMP_NSQT_HARMONIZATION  1   ///< G519: Harmonization of implicit TU, AMP and NSQT
368#define CHROMA_MODE_CODING                   1     //H0326/H0475 : 2-length fixed, bypass coding for chroma intra prediction mode
369#define NSQT_LFFIX                           1     ///< Bug fix related to NSQT and deblocking filter
370#define H0736_AVC_STYLE_QP_RANGE             1    ///< H0736: AVC style qp range and wrapping.
371#define H0204_QP_PREDICTION                  1    ///< H0204: improved QP prediction
372#define BURST_IPCM                        1           ///< H0051: Burst IPCM
373#define H0137_0138_LIST_MODIFICATION      1           // Enabled reference picture lists combination (H0137) and reference picture list modification (H0138) updates
374#define LTRP_MULT                       1           ///< enable/disable multiple long term reference pictures with same POC LSB
375#define OL_FLUSH 1          // Set to 1 to enable Wavefront Flush.
376#define FIXED_NUMBER_OF_TILES_SLICE_MODE                1
377#define SCALING_LIST                  1 //JCTVC-H0230/H0461/H0237
378#define DEFAULT_DC                    1 // JCTVC-H0242
379#define RPS_IN_SPS                    1 // Adopted during discussion of JCTVC-H0423
380#define H0412_REF_PIC_LIST_RESTRICTION 1
381#define H0566_TLA                     1
382#define H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER 1
383#define DBL_H0473_PART_1          1   //Deblocking filtering simplification
384#define DBL_CONTROL               1   //PPS deblocking_filter_control_present_flag (JCTVC-H0398); condition for inherit params flag in SH (JCTVC-H0424)
385#define DBL_STRONG_FILTER_CLIP    1   //Introduction of strong filter clipping in deblocking filter (JCTVC-H0275)
386#define H0388                       1 // JCTVC-H0388
387#define TILES_WPP_ENTRY_POINT_SIGNALLING        1 // JCTVC-H0556. Assumes either Tiles is ON or WPP is ON (not both simultaneously).
388#define REMOVE_TILE_DEPENDENCE                  1 // remove tile_boundary_independence_flag and dependent tiles
389#define TILES_OR_ENTROPY_SYNC_IDC               1 // tiles_or_entropy_coding_sync_idc flag
390#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
391#define WPP_SIMPLIFICATION          1 // JCTVC-H0349/JCTVC-0517
392*/
393
394
395#define LOSSLESS_CODING                   1 ///< H0530: lossless and lossy (mixed) coding
396#if LOSSLESS_CODING
397#define SEQUENCE_LEVEL_LOSSLESS           0 ///< H0530: used only for sequence or frame-level lossless coding
398#endif
399
400#define LOG2_PARALLEL_MERGE_LEVEL_MINUS2  0 //< H0082 parallel merge level 0-> 4x4, 1-> 8x8, 2->16x16, 3->32x32, 4->64x64
401
402#if LOG2_PARALLEL_MERGE_LEVEL_MINUS2
403#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
404#define FIX_CU_BASED_MRG_CAND_LIST_B0136  1  //< B0136 bug fix for CU_BASED_MRG_CAND_LIST
405#endif
406
407#define DISABLING_CLIP_FOR_BIPREDME         1  ///< Ticket #175
408#define SIGMAP_CONST_AT_HIGH_FREQUENCY      1      ///< H0095 method2.1: const significance map at high freaquency
409
410#define C1FLAG_NUMBER               8 // maximum number of largerThan1 flag coded in one chunk :  16 in HM5
411#define C2FLAG_NUMBER               1 // maximum number of largerThan2 flag coded in one chunk:  16 in HM5
412
413#if !LGE_SAO_MIGRATION_D0091
414#define REMOVE_SAO_LCU_ENC_CONSTRAINTS_1 0  ///< disable the encoder constraint that does not test SAO/BO mode for chroma in interleaved mode
415#define REMOVE_SAO_LCU_ENC_CONSTRAINTS_2 0  ///< disable the encoder constraint that reduce the range of SAO/EO for chroma in interleaved mode
416#endif
417#define REMOVE_SAO_LCU_ENC_CONSTRAINTS_3 0  ///< disable the encoder constraint that conditionally disable SAO for chroma for entire slice in interleaved mode
418#define COLLOCATED_REF_IDX      1           ///< H0442: signal collocated reference index
419
420
421#define MAX_NUM_SPS                32
422#define MAX_NUM_PPS                256
423#define MAX_NUM_APS                32         //< !!!KS: number not defined in WD yet
424
425#define MRG_MAX_NUM_CANDS_SIGNALED         5   //<G091: value of maxNumMergeCand signaled in slice header
426
427#define WEIGHTED_CHROMA_DISTORTION  1   ///< F386: weighting of chroma for RDO
428#define RDOQ_CHROMA_LAMBDA          1   ///< F386: weighting of chroma for RDOQ
429#define ALF_CHROMA_LAMBDA           1   ///< F386: weighting of chroma for ALF
430#define SAO_CHROMA_LAMBDA           1   ///< F386: weighting of chroma for SAO
431
432#define MIN_SCAN_POS_CROSS          4
433
434#define FAST_BIT_EST                1   ///< G763: Table-based bit estimation for CABAC
435
436
437#define MLS_GRP_NUM                         64     ///< G644 : Max number of coefficient groups, max(16, 64)
438#define MLS_CG_SIZE                         4      ///< G644 : Coefficient group size of 4x4
439
440#define ADAPTIVE_QP_SELECTION               1      ///< G382: Adaptive reconstruction levels, non-normative part for adaptive QP selection
441#if ADAPTIVE_QP_SELECTION
442#define ARL_C_PRECISION                     7      ///< G382: 7-bit arithmetic precision
443#define LEVEL_RANGE                         30     ///< G382: max coefficient level in statistics collection
444#endif
445
446
447#define NS_HAD                               1
448
449#define APS_BITS_FOR_SAO_BYTE_LENGTH 12
450#define APS_BITS_FOR_ALF_BYTE_LENGTH 8
451
452
453
454#define HHI_RQT_INTRA_SPEEDUP             1           ///< tests one best mode with full rqt
455#define HHI_RQT_INTRA_SPEEDUP_MOD         0           ///< tests two best modes with full rqt
456
457
458
459#if HHI_RQT_INTRA_SPEEDUP_MOD && !HHI_RQT_INTRA_SPEEDUP
460#error
461#endif
462
463
464
465#define VERBOSE_RATE 0                               ///< Print additional rate information in encoder
466
467#define AMVP_DECIMATION_FACTOR            4
468
469#define SCAN_SET_SIZE                     16
470#define LOG2_SCAN_SET_SIZE                4
471
472#if LGE_EDGE_INTRA_A0070
473#if LGE_EDGE_INTRA_DELTA_DC
474#define FAST_UDI_MAX_RDMODE_NUM               37          ///< maximum number of RD comparison in fast-UDI estimation loop
475#else
476#define FAST_UDI_MAX_RDMODE_NUM               36          ///< maximum number of RD comparison in fast-UDI estimation loop
477#endif
478#else
479#define FAST_UDI_MAX_RDMODE_NUM               35          ///< maximum number of RD comparison in fast-UDI estimation loop
480#endif
481
482#define ZERO_MVD_EST                          0           ///< Zero Mvd Estimation in normal mode
483
484#define NUM_INTRA_MODE 36
485#define LM_CHROMA_IDX  35
486
487#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
488enum MODE_IDX
489{
490  DMM_WEDGE_FULL_IDX         = NUM_INTRA_MODE,
491  DMM_WEDGE_FULL_D_IDX       = NUM_INTRA_MODE+1,
492  DMM_WEDGE_PREDTEX_IDX      = NUM_INTRA_MODE+2,
493  DMM_WEDGE_PREDTEX_D_IDX    = NUM_INTRA_MODE+3,
494  DMM_CONTOUR_PREDTEX_IDX    = NUM_INTRA_MODE+4,
495  DMM_CONTOUR_PREDTEX_D_IDX  = NUM_INTRA_MODE+5,
496  DMM_WEDGE_PREDDIR_IDX      = NUM_INTRA_MODE+6,
497  DMM_WEDGE_PREDDIR_D_IDX    = NUM_INTRA_MODE+7
498};
499#define NUM_DMM_MODE 8
500#elif HHI_DMM_WEDGE_INTRA && !HHI_DMM_PRED_TEX
501enum MODE_IDX
502{
503  DMM_WEDGE_FULL_IDX         = NUM_INTRA_MODE,
504  DMM_WEDGE_FULL_D_IDX       = NUM_INTRA_MODE+1,
505  DMM_WEDGE_PREDDIR_IDX      = NUM_INTRA_MODE+2,
506  DMM_WEDGE_PREDDIR_D_IDX    = NUM_INTRA_MODE+3
507};
508#define NUM_DMM_MODE 4
509#elif !HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
510enum MODE_IDX
511{
512  DMM_WEDGE_PREDTEX_IDX      = NUM_INTRA_MODE,
513  DMM_WEDGE_PREDTEX_D_IDX    = NUM_INTRA_MODE+1,
514  DMM_CONTOUR_PREDTEX_IDX    = NUM_INTRA_MODE+2,
515  DMM_CONTOUR_PREDTEX_D_IDX  = NUM_INTRA_MODE+3,
516};
517#define NUM_DMM_MODE 4
518#endif
519
520#if LGE_EDGE_INTRA_A0070
521#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
522#define EDGE_INTRA_IDX  (NUM_INTRA_MODE+NUM_DMM_MODE)
523#endif // HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
524#if LGE_EDGE_INTRA_DELTA_DC
525#define EDGE_INTRA_DELTA_IDX          (EDGE_INTRA_IDX+1)
526#endif
527#endif // LGE_EDGE_INTRA
528
529#define IBDI_DISTORTION                0           ///< enable/disable SSE modification when IBDI is used (JCTVC-D152)
530#define FIXED_ROUNDING_FRAME_MEMORY    0           ///< enable/disable fixed rounding to 8-bitdepth of frame memory when IBDI is used
531
532#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.
533#define PRINT_RPS_INFO                  0           ///< Enable/disable the printing of bits used to send the RPS.
534                                                    // using one nearest frame as reference frame, and the other frames are high quality (POC%4==0) frames (1+X)
535                                                    // this should be done with encoder only decision
536                                                    // but because of the absence of reference frame management, the related code was hard coded currently
537#define OL_FLUSH_ALIGN 0    // Align flush to byte boundary.  This preserves byte operations in CABAC (faster) but at the expense of an average
538                            // of 4 bits per flush.
539                            // Setting to 0 will slow cabac by an as yet unknown amount.
540                            // This is here just to perform timing tests -- OL_FLUSH_ALIGN should be 0 for WPP.
541
542#define RVM_VCEGAM10_M         4
543
544#define PLANAR_IDX             0
545#define VER_IDX                26                    // index for intra VERTICAL   mode
546#define HOR_IDX                10                    // index for intra HORIZONTAL mode
547#define DC_IDX                 1                     // index for intra DC mode
548#define NUM_CHROMA_MODE        6                     // total number of chroma modes
549#define DM_CHROMA_IDX          36                    // chroma mode index for derived from luma intra mode
550
551
552#define FAST_UDI_USE_MPM 1
553
554#define RDO_WITHOUT_DQP_BITS              0           ///< Disable counting dQP bits in RDO-based mode decision
555
556#define FULL_NBIT 0 ///< When enabled, does not use g_uiBitIncrement anymore to support > 8 bit data
557
558
559#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
560#define AD_HOC_SLICES_FIXED_NUMBER_OF_BYTES_IN_SLICE    2          ///< OPTION IDENTIFIER. mode==2 -> Limit maximum number of bins/bits in a slice
561#define AD_HOC_SLICES_FIXED_NUMBER_OF_TILES_IN_SLICE    3
562
563// Entropy slice options
564#define SHARP_FIXED_NUMBER_OF_LCU_IN_ENTROPY_SLICE            1          ///< OPTION IDENTIFIER. Limit maximum number of largest coding tree blocks in an entropy slice
565#define SHARP_MULTIPLE_CONSTRAINT_BASED_ENTROPY_SLICE         2          ///< OPTION IDENTIFIER. Limit maximum number of bins/bits in an entropy slice
566
567#define LOG2_MAX_NUM_COLUMNS_MINUS1        7
568#define LOG2_MAX_NUM_ROWS_MINUS1           7
569#define LOG2_MAX_COLUMN_WIDTH              13
570#define LOG2_MAX_ROW_HEIGHT                13
571
572#define MAX_MARKER_PER_NALU                 1000
573
574#define MATRIX_MULT                             0   // Brute force matrix multiplication instead of partial butterfly
575
576#define REG_DCT 65535
577
578#define AMP_SAD                               1           ///< dedicated SAD functions for AMP
579#define AMP_ENC_SPEEDUP                       1           ///< encoder only speed-up by AMP mode skipping
580#if AMP_ENC_SPEEDUP
581#define AMP_MRG                               1           ///< encoder only force merge for AMP partition (no motion search for AMP)
582#endif
583
584#define SCALING_LIST_OUTPUT_RESULT    0 //JCTVC-G880/JCTVC-G1016 quantization matrices
585#define H0566_TLA_SET_FOR_SWITCHING_POINTS 1
586
587
588#define CABAC_INIT_FLAG             1 // JCTVC-H0540
589#define CABAC_INIT_PRESENT_FLAG     1
590
591
592// ====================================================================================================================
593// VPS INTEGRATION
594// ====================================================================================================================
595#if !QC_MVHEVC_B0046
596#if VIDYO_VPS_INTEGRATION
597#define MAX_NUM_VPS 10
598#endif
599#else
600#define MAX_NUM_VPS 1
601#endif
602
603
604// ====================================================================================================================
605// Basic type redefinition
606// ====================================================================================================================
607
608typedef       void                Void;
609typedef       bool                Bool;
610
611typedef       char                Char;
612typedef       unsigned char       UChar;
613typedef       short               Short;
614typedef       unsigned short      UShort;
615typedef       int                 Int;
616typedef       unsigned int        UInt;
617typedef       double              Double;
618
619// ====================================================================================================================
620// 64-bit integer type
621// ====================================================================================================================
622
623#ifdef _MSC_VER
624typedef       __int64             Int64;
625
626#if _MSC_VER <= 1200 // MS VC6
627typedef       __int64             UInt64;   // MS VC6 does not support unsigned __int64 to double conversion
628#else
629typedef       unsigned __int64    UInt64;
630#endif
631
632#else
633
634typedef       long long           Int64;
635typedef       unsigned long long  UInt64;
636
637#endif
638
639// ====================================================================================================================
640// Type definition
641// ====================================================================================================================
642
643typedef       UChar           Pxl;        ///< 8-bit pixel type
644typedef       Short           Pel;        ///< 16-bit pixel type
645typedef       Int             TCoeff;     ///< transform coefficient
646
647
648// ====================================================================================================================
649// Define Distortion Types
650// ====================================================================================================================
651typedef       Int64           RMDist;     ///< renderer model distortion
652
653#if HHI_VSO_DIST_INT
654typedef       Int              Dist;       ///< RDO distortion
655#define       RDO_DIST_MIN     MIN_INT
656#define       RDO_DIST_MAX     MAX_INT
657#else
658typedef       UInt             Dist;       ///< RDO distortion
659#define       RDO_DIST_MIN     0
660#define       RDO_DIST_MAX     MAX_UINT
661#endif
662
663/// parameters for adaptive loop filter
664class TComPicSym;
665
666#define NUM_DOWN_PART 4
667
668enum SAOTypeLen
669{
670  SAO_EO_LEN    = 4,
671  SAO_BO_LEN    = 4,
672  SAO_MAX_BO_CLASSES = 32
673};
674
675enum SAOType
676{
677  SAO_EO_0 = 0,
678  SAO_EO_1,
679  SAO_EO_2,
680  SAO_EO_3,
681  SAO_BO,
682  MAX_NUM_SAO_TYPE
683};
684
685typedef struct _SaoQTPart
686{
687  Int         iBestType;
688  Int         iLength;
689#if LGE_SAO_MIGRATION_D0091
690  Int         subTypeIdx ;                 ///< indicates EO class or BO band position
691#else
692  Int         bandPosition ;
693#endif
694  Int         iOffset[4];
695  Int         StartCUX;
696  Int         StartCUY;
697  Int         EndCUX;
698  Int         EndCUY;
699
700  Int         PartIdx;
701  Int         PartLevel;
702  Int         PartCol;
703  Int         PartRow;
704
705  Int         DownPartsIdx[NUM_DOWN_PART];
706  Int         UpPartIdx;
707
708  Bool        bSplit;
709
710  //---- encoder only start -----//
711  Bool        bProcessed;
712  Double      dMinCost;
713  Int64       iMinDist;
714  Int         iMinRate;
715  //---- encoder only end -----//
716} SAOQTPart;
717
718typedef struct _SaoLcuParam
719{
720  Bool       mergeUpFlag;
721  Bool       mergeLeftFlag;
722  Int        typeIdx;
723#if LGE_SAO_MIGRATION_D0091
724  Int        subTypeIdx;
725#else
726  Int        bandPosition;
727#endif
728  Int        offset[4];
729#if !LGE_SAO_MIGRATION_D0091
730  Int        runDiff;
731  Int        run;
732#endif
733  Int        partIdx;
734  Int        partIdxTmp;
735  Int        length;
736} SaoLcuParam;
737
738struct SAOParam
739{
740  Bool       bSaoFlag[3];
741  SAOQTPart* psSaoPart[3];
742  Int        iMaxSplitLevel;
743  Int        iNumClass[MAX_NUM_SAO_TYPE];
744  Bool         oneUnitFlag[3];
745  SaoLcuParam* saoLcuParam[3];
746  Int          numCuInHeight;
747  Int          numCuInWidth;
748  ~SAOParam();
749};
750
751struct ALFParam
752{
753  Int alf_flag;                           ///< indicates use of ALF
754  Int num_coeff;                          ///< number of filter coefficients
755  Int filter_shape;
756  Int *filterPattern;
757  Int startSecondFilter;
758  Int filters_per_group;
759  Int predMethod;
760  Int *nbSPred;
761  Int **coeffmulti;
762  Int minKStart;
763  Int componentID;
764  Int* kMinTab;
765  //constructor, operator
766  ALFParam():componentID(-1){}
767  ALFParam(Int cID){create(cID);}
768  ALFParam(const ALFParam& src) {*this = src;}
769  ~ALFParam(){destroy();}
770  const ALFParam& operator= (const ALFParam& src);
771private:
772  Void create(Int cID);
773  Void destroy();
774  Void copy(const ALFParam& src);
775};
776
777struct AlfUnitParam
778{
779  Int   mergeType;
780  Bool  isEnabled;
781  Bool  isNewFilt;
782  Int   storedFiltIdx;
783  ALFParam* alfFiltParam;
784  //constructor, operator
785  AlfUnitParam();
786  AlfUnitParam(const AlfUnitParam& src){ *this = src;}
787  const AlfUnitParam& operator= (const AlfUnitParam& src);
788  Bool operator == (const AlfUnitParam& cmp);
789};
790
791struct AlfParamSet
792{
793  Bool isEnabled[3];
794  Bool isUniParam[3];
795  Int  numLCUInWidth;
796  Int  numLCUInHeight;
797  Int  numLCU;
798  AlfUnitParam* alfUnitParam[3];
799  //constructor, operator
800  AlfParamSet(){create();}
801  ~AlfParamSet(){destroy();}
802  Void create(Int width =0, Int height=0, Int num=0);
803  Void init();
804  Void releaseALFParam();
805  Void createALFParam();
806private:
807  Void destroy();
808};
809
810
811
812/// parameters for deblocking filter
813typedef struct _LFCUParam
814{
815  Bool bInternalEdge;                     ///< indicates internal edge
816  Bool bLeftEdge;                         ///< indicates left edge
817  Bool bTopEdge;                          ///< indicates top edge
818} LFCUParam;
819
820// ====================================================================================================================
821// Enumeration
822// ====================================================================================================================
823
824/// supported slice type
825enum SliceType
826{
827  I_SLICE,
828  P_SLICE,
829  B_SLICE
830};
831
832/// chroma formats (according to semantics of chroma_format_idc)
833enum ChromaFormat
834{
835  CHROMA_400  = 0,
836  CHROMA_420  = 1,
837  CHROMA_422  = 2,
838  CHROMA_444  = 3
839};
840
841/// supported partition shape
842enum PartSize
843{
844  SIZE_2Nx2N,           ///< symmetric motion partition,  2Nx2N
845  SIZE_2NxN,            ///< symmetric motion partition,  2Nx N
846  SIZE_Nx2N,            ///< symmetric motion partition,   Nx2N
847  SIZE_NxN,             ///< symmetric motion partition,   Nx N
848  SIZE_2NxnU,           ///< asymmetric motion partition, 2Nx( N/2) + 2Nx(3N/2)
849  SIZE_2NxnD,           ///< asymmetric motion partition, 2Nx(3N/2) + 2Nx( N/2)
850  SIZE_nLx2N,           ///< asymmetric motion partition, ( N/2)x2N + (3N/2)x2N
851  SIZE_nRx2N,           ///< asymmetric motion partition, (3N/2)x2N + ( N/2)x2N
852  SIZE_NONE = 15
853};
854
855
856enum BlenMod
857{
858    BLEND_NONE  = -1,
859    BLEND_AVRG  = 0,
860    BLEND_LEFT  = 1,
861    BLEND_RIGHT = 2,
862    BLEND_GEN   =  3
863};
864
865/// supported prediction type
866enum PredMode
867{
868  MODE_SKIP,            ///< SKIP mode
869  MODE_INTER,           ///< inter-prediction mode
870  MODE_INTRA,           ///< intra-prediction mode
871  MODE_NONE = 15
872};
873
874/// texture component type
875enum TextType
876{
877  TEXT_LUMA,            ///< luma
878  TEXT_CHROMA,          ///< chroma (U+V)
879  TEXT_CHROMA_U,        ///< chroma U
880  TEXT_CHROMA_V,        ///< chroma V
881  TEXT_ALL,             ///< Y+U+V
882  TEXT_NONE = 15
883};
884
885/// reference list index
886enum RefPicList
887{
888  REF_PIC_LIST_0 = 0,   ///< reference list 0
889  REF_PIC_LIST_1 = 1,   ///< reference list 1
890  REF_PIC_LIST_C = 2,   ///< combined reference list for uni-prediction in B-Slices
891  REF_PIC_LIST_X = 100  ///< special mark
892};
893
894/// distortion function index
895enum DFunc
896{
897  DF_DEFAULT  = 0,
898  DF_SSE      = 1,      ///< general size SSE
899  DF_SSE4     = 2,      ///<   4xM SSE
900  DF_SSE8     = 3,      ///<   8xM SSE
901  DF_SSE16    = 4,      ///<  16xM SSE
902  DF_SSE32    = 5,      ///<  32xM SSE
903  DF_SSE64    = 6,      ///<  64xM SSE
904  DF_SSE16N   = 7,      ///< 16NxM SSE
905
906  DF_SAD      = 8,      ///< general size SAD
907  DF_SAD4     = 9,      ///<   4xM SAD
908  DF_SAD8     = 10,     ///<   8xM SAD
909  DF_SAD16    = 11,     ///<  16xM SAD
910  DF_SAD32    = 12,     ///<  32xM SAD
911  DF_SAD64    = 13,     ///<  64xM SAD
912  DF_SAD16N   = 14,     ///< 16NxM SAD
913
914  DF_SADS     = 15,     ///< general size SAD with step
915  DF_SADS4    = 16,     ///<   4xM SAD with step
916  DF_SADS8    = 17,     ///<   8xM SAD with step
917  DF_SADS16   = 18,     ///<  16xM SAD with step
918  DF_SADS32   = 19,     ///<  32xM SAD with step
919  DF_SADS64   = 20,     ///<  64xM SAD with step
920  DF_SADS16N  = 21,     ///< 16NxM SAD with step
921
922  DF_HADS     = 22,     ///< general size Hadamard with step
923  DF_HADS4    = 23,     ///<   4xM HAD with step
924  DF_HADS8    = 24,     ///<   8xM HAD with step
925  DF_HADS16   = 25,     ///<  16xM HAD with step
926  DF_HADS32   = 26,     ///<  32xM HAD with step
927  DF_HADS64   = 27,     ///<  64xM HAD with step
928  DF_HADS16N  = 28,     ///< 16NxM HAD with step
929
930#if SAIT_VSO_EST_A0033
931  DF_VSD      = 29,      ///< general size VSD
932  DF_VSD4     = 30,      ///<   4xM VSD
933  DF_VSD8     = 31,      ///<   8xM VSD
934  DF_VSD16    = 32,      ///<  16xM VSD
935  DF_VSD32    = 33,      ///<  32xM VSD
936  DF_VSD64    = 34,      ///<  64xM VSD
937  DF_VSD16N   = 35,      ///< 16NxM VSD
938#endif
939
940
941#if AMP_SAD
942  DF_SAD12    = 43,
943  DF_SAD24    = 44,
944  DF_SAD48    = 45,
945
946  DF_SADS12   = 46,
947  DF_SADS24   = 47,
948  DF_SADS48   = 48,
949
950  DF_SSE_FRAME = 50     ///< Frame-based SSE
951#else
952  DF_SSE_FRAME = 33     ///< Frame-based SSE
953#endif
954};
955
956/// index for SBAC based RD optimization
957enum CI_IDX
958{
959  CI_CURR_BEST = 0,     ///< best mode index
960  CI_NEXT_BEST,         ///< next best index
961  CI_TEMP_BEST,         ///< temporal index
962  CI_CHROMA_INTRA,      ///< chroma intra index
963  CI_QT_TRAFO_TEST,
964  CI_QT_TRAFO_ROOT,
965  CI_NUM,               ///< total number
966};
967
968/// motion vector predictor direction used in AMVP
969enum MVP_DIR
970{
971  MD_LEFT = 0,          ///< MVP of left block
972  MD_ABOVE,             ///< MVP of above block
973  MD_ABOVE_RIGHT,       ///< MVP of above right block
974  MD_BELOW_LEFT,        ///< MVP of below left block
975  MD_ABOVE_LEFT         ///< MVP of above left block
976};
977
978/// motion vector prediction mode used in AMVP
979enum AMVP_MODE
980{
981  AM_NONE = 0,          ///< no AMVP mode
982  AM_EXPL,              ///< explicit signalling of motion vector index
983};
984
985/// coefficient scanning type used in ACS
986enum COEFF_SCAN_TYPE
987{
988  SCAN_ZIGZAG = 0,      ///< typical zigzag scan
989  SCAN_HOR,             ///< horizontal first scan
990  SCAN_VER,              ///< vertical first scan
991  SCAN_DIAG              ///< up-right diagonal scan
992};
993
994// Renderer
995enum
996{
997  VIEWPOS_INVALID = -1,
998  VIEWPOS_LEFT    = 0,
999  VIEWPOS_RIGHT   = 1,
1000  VIEWPOS_MERGED  = 2
1001};
1002
1003//! \}
1004
1005#endif
1006
1007
Note: See TracBrowser for help on using the repository browser.