source: 3DVCSoftware/branches/HTM-DEV-0.3-dev1/source/Lib/TLibCommon/TypeDef.h @ 485

Last change on this file since 485 was 485, checked in by rwth, 11 years ago
  • code cleanup for H_3D_DIM_DLT
  • Property svn:eol-style set to native
File size: 25.8 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-2013, 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
45/////////////////////////////////////////////////////////////////////////////////////////
46///////////////////////////////// EXTENSION SELECTION /////////////////////////////////// 
47/////////////////////////////////////////////////////////////////////////////////////////
48
49/* HEVC_EXT might be defined by compiler/makefile options.
50   
51   Linux makefiles support the following settings:   
52   make             -> HEVC_EXT not defined   
53   make HEVC_EXT=0  -> H_MV=0 H_3D=0   --> plain HM
54   make HEVC_EXT=1  -> H_MV=1 H_3D=0   --> MV only
55   make HEVC_EXT=2  -> H_MV=1 H_3D=1   --> full 3D
56*/
57
58#ifndef HEVC_EXT
59#define HEVC_EXT                    2
60#endif
61
62#if ( HEVC_EXT < 0 )||( HEVC_EXT > 2 )
63#error HEVC_EXT must be in the range of 0 to 2, inclusive.
64#endif
65
66#define H_MV          ( HEVC_EXT != 0)
67#define H_3D          ( HEVC_EXT == 2)
68
69/////////////////////////////////////////////////////////////////////////////////////////
70///////////////////////////////////   MAJOR DEFINES   /////////////////////////////////// 
71/////////////////////////////////////////////////////////////////////////////////////////
72
73#if H_3D
74#define H_3D_PDM_CAM_PARAS                0 ///< PDM related parts of camera parameters, should be removed if not used anymore.
75#define H_3D_VSO                          1   // VSO, View synthesis optimization, includes:
76                                              // HHI_VSO
77                                              // HHI_VSO_LS_TABLE_M23714 enable table base Lagrange multiplier optimization
78                                              // SAIT_VSO_EST_A0033, JCT3V-A0033 modification 3
79                                              // LGE_WVSO_A0119
80#define H_3D_DIM                          1   // DIM, Depth intra modes, includes:
81                                              // HHI_DMM_WEDGE_INTRA
82                                              // HHI_DMM_PRED_TEX
83                                              // FIX_WEDGE_NOFLOAT_D0036
84                                              // LGE_EDGE_INTRA_A0070
85                                              // LGE_DMM3_SIMP_C0044
86                                              // QC_DC_PREDICTOR_D0183
87                                              // HHI_DELTADC_DLT_D0035
88                                              // PKU_QC_DEPTH_INTRA_UNI_D0195
89                                              // RWTH_SDC_DLT_B0036
90                                              // INTEL_SDC64_D0193
91                                              // RWTH_SDC_CTX_SIMPL_D0032
92                                              // LGE_CONCATENATE_D0141
93                                              // FIX_SDC_ENC_RD_WVSO_D0163
94                                              // MTK_SAMPLE_BASED_SDC_D0110
95#define H_3D_FIX                          1   // Temporary for minor fixes
96#endif
97
98/////////////////////////////////////////////////////////////////////////////////////////
99///////////////////////////////////   DERIVED DEFINES /////////////////////////////////// 
100/////////////////////////////////////////////////////////////////////////////////////////
101
102///// ***** VIEW SYNTHESIS OPTIMIZAION *********
103#if H_3D_VSO                                 
104#define H_3D_VSO_DIST_INT                 1   // Allow negative synthesized view distortion change
105#define H_3D_VSO_COLOR_PLANES             1   // Compute VSO distortion on color planes
106#define H_3D_VSO_EARLY_SKIP               1   // LGE_VSO_EARLY_SKIP_A0093, A0093 modification 4
107#define H_3D_VSO_RM_ASSERTIONS            0   // Output VSO assertions
108#define H_3D_VSO_SYNTH_DIST_OUT           0   // Output of synthesized view distortion instead of depth distortion in encoder output
109#define H_3D_VSO_FIX                      0   // This fix should be enabled after verification
110#endif
111
112///// ***** DEPTH INTRA MODES *********
113#if H_3D_DIM
114#define H_3D_DIM_DMM                      1   // Depth Modeling Modes
115#define H_3D_DIM_RBC                      1   // Region Boundary Chain mode
116#define H_3D_DIM_SDC                      1   // Simplified Depth Coding method
117#define H_3D_DIM_DLT                      1   // Depth Lookup Table
118#define H_3D_DIM_ENC                      1   // Depth Intra encoder optimizations, includes:
119                                              // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
120                                              // LG_ZEROINTRADEPTHRESI_A0087
121#endif
122
123/////////////////////////////////////////////////////////////////////////////////////////
124///////////////////////////////////   HM RELATED DEFINES ////////////////////////////////
125/////////////////////////////////////////////////////////////////////////////////////////
126
127#define FIX1071 1 ///< Temporary fix for issue #1071
128
129#define L0208_SOP_DESCRIPTION_SEI     1 ///< L0208: add SOP descrioption SEI
130#define MAX_NUM_PICS_IN_SOP           1024
131
132#define K0180_SCALABLE_NESTING_SEI  1   ///JCTVC-K0180 scalable nesting sei message
133#define MAX_NESTING_NUM_OPS         1024
134#define MAX_NESTING_NUM_LAYER       64
135
136#define J0149_TONE_MAPPING_SEI        1 ///< J0149: Tone mapping information SEI
137#define L0363_DU_BIT_RATE             1 ///< L0363: add bit_rate_du_value_minus1 to HRD parameters
138#define L0328_SPLICING                1 ///< L0328: splicing support in HRD
139#define L0044_DU_DPB_OUTPUT_DELAY_HRD 1 ///< L0044: Include dpb_output_delay_du_length_minus1 in hrd_parameters(), dpb_output_du_delay in
140                                        ///<        picture timing SEI and DU information SEI
141#define L0045_PERSISTENCE_FLAGS  1      ///< L0045: Replace "repetition_period" syntax elements in SEI with "persistence_flag"
142#define L0045_NON_NESTED_SEI_RESTRICTIONS 1 ///< L0045; Include restriction on the order of APS and non-nested BP, PT and DU info SEI messages
143#define L0044_CPB_DPB_DELAY_OFFSET 1  ///< L0044: Include syntax elements cpb_delay_offset and dpb_delay_offset in the BP SEI message
144#define L0047_APS_FLAGS            1  ///< L0047: Include full_random_access_flag and no_param_set_update_flag in the active parameter set SEI message
145#define L0043_TIMING_INFO          1  ///< L0043: Timing information is signalled in VUI outside hrd_parameters()
146#define L0046_RENAME_PROG_SRC_IDC  1  ///< L0046: Rename progressive_source_idc to source_scan_type
147#define L0045_CONDITION_SIGNALLING 1  ///< L0045: Condition the signaling of some syntax elements in picture timing SEI message
148#define L0043_MSS_IDC 1
149#define L0116_ENTRY_POINT 1
150#define L0363_MORE_BITS 1
151#define L0363_MVP_POC 1
152#define L0363_BYTE_ALIGN 1
153#define L0363_SEI_ALLOW_SUFFIX 1
154#define L0323_LIMIT_DEFAULT_LIST_SIZE 1
155#define L0046_CONSTRAINT_FLAGS 1
156#define L0255_MOVE_PPS_FLAGS       1  ///< move some flags to earlier positions in the PPS
157#define L0444_FPA_TYPE             1  ///< allow only FPA types 3, 4 and 5
158#define L0372 1
159#define SIGNAL_BITRATE_PICRATE_IN_VPS               0  ///< K0125: Signal bit_rate and pic_rate in VPS
160#define L0232_RD_PENALTY           1  ///< L0232: RD-penalty for 32x32 TU for intra in non-intra slices
161#define L0386_DB_METRIC            1  ///< L0386: non-normative blockiness metric (automatically configures deblocking parameters in bitstream)
162#define L0323_DPB                     1 ///< L0323: Specification of active reference indices and decoded picture buffer
163
164#define L0034_COMBINED_LIST_CLEANUP 1
165
166#define MAX_VPS_NUM_HRD_PARAMETERS                1
167#define MAX_VPS_OP_SETS_PLUS1                     1024
168#if H_MV
169#define MAX_VPS_NUH_LAYER_ID_PLUS1  64
170#define MAX_NUM_SCALABILITY_TYPES   16
171#define ENC_CFG_CONSOUT_SPACE       29           
172#else
173#define MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1  1
174#endif
175
176#define RATE_CONTROL_LAMBDA_DOMAIN                  1  ///< JCTVC-K0103, rate control by R-lambda model
177#define L0033_RC_BUGFIX                             1  ///< JCTVC-L0033, bug fix for R-lambda model based rate control
178
179#define MAX_CPB_CNT                     32  ///< Upper bound of (cpb_cnt_minus1 + 1)
180#define MAX_NUM_LAYER_IDS               64
181#if H_MV
182#define MAX_NUM_LAYERS                  64
183#endif
184
185#define COEF_REMAIN_BIN_REDUCTION        3 ///< indicates the level at which the VLC
186                                           ///< transitions from Golomb-Rice to TU+EG(k)
187
188#define CU_DQP_TU_CMAX 5                   ///< max number bins for truncated unary
189#define CU_DQP_EG_k 0                      ///< expgolomb order
190
191#define SBH_THRESHOLD                    4  ///< I0156: value of the fixed SBH controlling threshold
192 
193#define SEQUENCE_LEVEL_LOSSLESS           0  ///< H0530: used only for sequence or frame-level lossless coding
194
195#define DISABLING_CLIP_FOR_BIPREDME         1  ///< Ticket #175
196 
197#define C1FLAG_NUMBER               8 // maximum number of largerThan1 flag coded in one chunk :  16 in HM5
198#define C2FLAG_NUMBER               1 // maximum number of largerThan2 flag coded in one chunk:  16 in HM5
199
200#define REMOVE_SAO_LCU_ENC_CONSTRAINTS_3 1  ///< disable the encoder constraint that conditionally disable SAO for chroma for entire slice in interleaved mode
201
202#define REMOVE_SINGLE_SEI_EXTENSION_FLAGS 1 ///< remove display orientation SEI extension flag (there is a generic SEI extension mechanism now)
203
204#define SAO_ENCODING_CHOICE              1  ///< I0184: picture early termination
205#if SAO_ENCODING_CHOICE
206#define SAO_ENCODING_RATE                0.75
207#define SAO_ENCODING_CHOICE_CHROMA       1 ///< J0044: picture early termination Luma and Chroma are handled separately
208#if SAO_ENCODING_CHOICE_CHROMA
209#define SAO_ENCODING_RATE_CHROMA         0.5
210#endif
211#endif
212
213#define MAX_NUM_VPS                16
214#define MAX_NUM_SPS                16
215#define MAX_NUM_PPS                64
216
217
218
219#define WEIGHTED_CHROMA_DISTORTION  1   ///< F386: weighting of chroma for RDO
220#define RDOQ_CHROMA_LAMBDA          1   ///< F386: weighting of chroma for RDOQ
221#define SAO_CHROMA_LAMBDA           1   ///< F386: weighting of chroma for SAO
222
223#define MIN_SCAN_POS_CROSS          4
224
225#define FAST_BIT_EST                1   ///< G763: Table-based bit estimation for CABAC
226
227#define MLS_GRP_NUM                         64     ///< G644 : Max number of coefficient groups, max(16, 64)
228#define MLS_CG_SIZE                         4      ///< G644 : Coefficient group size of 4x4
229
230#define ADAPTIVE_QP_SELECTION               1      ///< G382: Adaptive reconstruction levels, non-normative part for adaptive QP selection
231#if ADAPTIVE_QP_SELECTION
232#define ARL_C_PRECISION                     7      ///< G382: 7-bit arithmetic precision
233#define LEVEL_RANGE                         30     ///< G382: max coefficient level in statistics collection
234#endif
235
236#define NS_HAD                               0
237
238#define HHI_RQT_INTRA_SPEEDUP             1           ///< tests one best mode with full rqt
239#define HHI_RQT_INTRA_SPEEDUP_MOD         0           ///< tests two best modes with full rqt
240
241#if HHI_RQT_INTRA_SPEEDUP_MOD && !HHI_RQT_INTRA_SPEEDUP
242#error
243#endif
244
245#define VERBOSE_RATE 0 ///< Print additional rate information in encoder
246
247#define AMVP_DECIMATION_FACTOR            4
248
249#define SCAN_SET_SIZE                     16
250#define LOG2_SCAN_SET_SIZE                4
251
252#define FAST_UDI_MAX_RDMODE_NUM               35          ///< maximum number of RD comparison in fast-UDI estimation loop
253
254#define ZERO_MVD_EST                          0           ///< Zero Mvd Estimation in normal mode
255
256#define NUM_INTRA_MODE 36
257#if !REMOVE_LM_CHROMA
258#define LM_CHROMA_IDX  35
259#endif
260
261#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.
262#define AUTO_INTER_RPS                  1           ///< Enable/disable the automatic generation of refIdc from the deltaPOC and Used by current from the config file.
263#define PRINT_RPS_INFO                  0           ///< Enable/disable the printing of bits used to send the RPS.
264                                                    // using one nearest frame as reference frame, and the other frames are high quality (POC%4==0) frames (1+X)
265                                                    // this should be done with encoder only decision
266                                                    // but because of the absence of reference frame management, the related code was hard coded currently
267
268#define RVM_VCEGAM10_M 4
269
270#define PLANAR_IDX             0
271#define VER_IDX                26                    // index for intra VERTICAL   mode
272#define HOR_IDX                10                    // index for intra HORIZONTAL mode
273#define DC_IDX                 1                     // index for intra DC mode
274#define NUM_CHROMA_MODE        5                     // total number of chroma modes
275#define DM_CHROMA_IDX          36                    // chroma mode index for derived from luma intra mode
276
277
278#define FAST_UDI_USE_MPM 1
279
280#define RDO_WITHOUT_DQP_BITS              0           ///< Disable counting dQP bits in RDO-based mode decision
281
282#define FULL_NBIT 0 ///< When enabled, compute costs using full sample bitdepth.  When disabled, compute costs as if it is 8-bit source video.
283#if FULL_NBIT
284# define DISTORTION_PRECISION_ADJUSTMENT(x) 0
285#else
286# define DISTORTION_PRECISION_ADJUSTMENT(x) (x)
287#endif
288
289#define LOG2_MAX_NUM_COLUMNS_MINUS1        7
290#define LOG2_MAX_NUM_ROWS_MINUS1           7
291#define LOG2_MAX_COLUMN_WIDTH              13
292#define LOG2_MAX_ROW_HEIGHT                13
293
294#define MATRIX_MULT                             0   // Brute force matrix multiplication instead of partial butterfly
295
296#define REG_DCT 65535
297
298#define AMP_SAD                               1           ///< dedicated SAD functions for AMP
299#define AMP_ENC_SPEEDUP                       1           ///< encoder only speed-up by AMP mode skipping
300#if AMP_ENC_SPEEDUP
301#define AMP_MRG                               1           ///< encoder only force merge for AMP partition (no motion search for AMP)
302#endif
303
304#define SCALING_LIST_OUTPUT_RESULT    0 //JCTVC-G880/JCTVC-G1016 quantization matrices
305
306#define CABAC_INIT_PRESENT_FLAG     1
307
308// ====================================================================================================================
309// Basic type redefinition
310// ====================================================================================================================
311
312typedef       void                Void;
313typedef       bool                Bool;
314
315typedef       char                Char;
316typedef       unsigned char       UChar;
317typedef       short               Short;
318typedef       unsigned short      UShort;
319typedef       int                 Int;
320typedef       unsigned int        UInt;
321typedef       double              Double;
322typedef       float               Float;
323
324// ====================================================================================================================
325// 64-bit integer type
326// ====================================================================================================================
327
328#ifdef _MSC_VER
329typedef       __int64             Int64;
330
331#if _MSC_VER <= 1200 // MS VC6
332typedef       __int64             UInt64;   // MS VC6 does not support unsigned __int64 to double conversion
333#else
334typedef       unsigned __int64    UInt64;
335#endif
336
337#else
338
339typedef       long long           Int64;
340typedef       unsigned long long  UInt64;
341
342#endif
343
344// ====================================================================================================================
345// Type definition
346// ====================================================================================================================
347
348typedef       UChar           Pxl;        ///< 8-bit pixel type
349typedef       Short           Pel;        ///< 16-bit pixel type
350typedef       Int             TCoeff;     ///< transform coefficient
351
352#if H_3D_VSO
353// ====================================================================================================================
354// Define Distortion Types
355// ====================================================================================================================
356typedef       Int64           RMDist;     ///< renderer model distortion
357
358#if H_3D_VSO_DIST_INT
359typedef       Int              Dist;       ///< RDO distortion
360typedef       Int64            Dist64; 
361#define       RDO_DIST_MIN     MIN_INT
362#define       RDO_DIST_MAX     MAX_INT
363#else
364typedef       UInt             Dist;       ///< RDO distortion
365typedef       UInt64           Dist; 
366#define       RDO_DIST_MIN     0
367#define       RDO_DIST_MAX     MAX_UINT
368#endif
369#endif
370/// parameters for adaptive loop filter
371class TComPicSym;
372
373// Slice / Slice segment encoding modes
374enum SliceConstraint
375{
376  NO_SLICES              = 0,          ///< don't use slices / slice segments
377  FIXED_NUMBER_OF_LCU    = 1,          ///< Limit maximum number of largest coding tree blocks in a slice / slice segments
378  FIXED_NUMBER_OF_BYTES  = 2,          ///< Limit maximum number of bytes in a slice / slice segment
379  FIXED_NUMBER_OF_TILES  = 3,          ///< slices / slice segments span an integer number of tiles
380};
381
382#define NUM_DOWN_PART 4
383
384enum SAOTypeLen
385{
386  SAO_EO_LEN    = 4, 
387  SAO_BO_LEN    = 4,
388  SAO_MAX_BO_CLASSES = 32
389};
390
391enum SAOType
392{
393  SAO_EO_0 = 0, 
394  SAO_EO_1,
395  SAO_EO_2, 
396  SAO_EO_3,
397  SAO_BO,
398  MAX_NUM_SAO_TYPE
399};
400
401typedef struct _SaoQTPart
402{
403  Int         iBestType;
404  Int         iLength;
405  Int         subTypeIdx ;                 ///< indicates EO class or BO band position
406  Int         iOffset[4];
407  Int         StartCUX;
408  Int         StartCUY;
409  Int         EndCUX;
410  Int         EndCUY;
411
412  Int         PartIdx;
413  Int         PartLevel;
414  Int         PartCol;
415  Int         PartRow;
416
417  Int         DownPartsIdx[NUM_DOWN_PART];
418  Int         UpPartIdx;
419
420  Bool        bSplit;
421
422  //---- encoder only start -----//
423  Bool        bProcessed;
424  Double      dMinCost;
425  Int64       iMinDist;
426  Int         iMinRate;
427  //---- encoder only end -----//
428} SAOQTPart;
429
430typedef struct _SaoLcuParam
431{
432  Bool       mergeUpFlag;
433  Bool       mergeLeftFlag;
434  Int        typeIdx;
435  Int        subTypeIdx;                  ///< indicates EO class or BO band position
436  Int        offset[4];
437  Int        partIdx;
438  Int        partIdxTmp;
439  Int        length;
440} SaoLcuParam;
441
442struct SAOParam
443{
444  Bool       bSaoFlag[2];
445  SAOQTPart* psSaoPart[3];
446  Int        iMaxSplitLevel;
447  Bool         oneUnitFlag[3];
448  SaoLcuParam* saoLcuParam[3];
449  Int          numCuInHeight;
450  Int          numCuInWidth;
451  ~SAOParam();
452};
453
454/// parameters for deblocking filter
455typedef struct _LFCUParam
456{
457  Bool bInternalEdge;                     ///< indicates internal edge
458  Bool bLeftEdge;                         ///< indicates left edge
459  Bool bTopEdge;                          ///< indicates top edge
460} LFCUParam;
461
462// ====================================================================================================================
463// Enumeration
464// ====================================================================================================================
465
466/// supported slice type
467enum SliceType
468{
469  B_SLICE,
470  P_SLICE,
471  I_SLICE
472};
473
474/// chroma formats (according to semantics of chroma_format_idc)
475enum ChromaFormat
476{
477  CHROMA_400  = 0,
478  CHROMA_420  = 1,
479  CHROMA_422  = 2,
480  CHROMA_444  = 3
481};
482
483/// supported partition shape
484enum PartSize
485{
486  SIZE_2Nx2N,           ///< symmetric motion partition,  2Nx2N
487  SIZE_2NxN,            ///< symmetric motion partition,  2Nx N
488  SIZE_Nx2N,            ///< symmetric motion partition,   Nx2N
489  SIZE_NxN,             ///< symmetric motion partition,   Nx N
490  SIZE_2NxnU,           ///< asymmetric motion partition, 2Nx( N/2) + 2Nx(3N/2)
491  SIZE_2NxnD,           ///< asymmetric motion partition, 2Nx(3N/2) + 2Nx( N/2)
492  SIZE_nLx2N,           ///< asymmetric motion partition, ( N/2)x2N + (3N/2)x2N
493  SIZE_nRx2N,           ///< asymmetric motion partition, (3N/2)x2N + ( N/2)x2N
494  SIZE_NONE = 15
495};
496
497/// supported prediction type
498enum PredMode
499{
500  MODE_INTER,           ///< inter-prediction mode
501  MODE_INTRA,           ///< intra-prediction mode
502  MODE_NONE = 15
503};
504
505/// texture component type
506enum TextType
507{
508  TEXT_LUMA,            ///< luma
509  TEXT_CHROMA,          ///< chroma (U+V)
510  TEXT_CHROMA_U,        ///< chroma U
511  TEXT_CHROMA_V,        ///< chroma V
512  TEXT_ALL,             ///< Y+U+V
513  TEXT_NONE = 15
514};
515
516/// reference list index
517enum RefPicList
518{
519  REF_PIC_LIST_0 = 0,   ///< reference list 0
520  REF_PIC_LIST_1 = 1,   ///< reference list 1
521#if !L0034_COMBINED_LIST_CLEANUP
522  REF_PIC_LIST_C = 2,   ///< combined reference list for uni-prediction in B-Slices
523#endif
524  REF_PIC_LIST_X = 100  ///< special mark
525};
526
527/// distortion function index
528enum DFunc
529{
530  DF_DEFAULT  = 0,
531  DF_SSE      = 1,      ///< general size SSE
532  DF_SSE4     = 2,      ///<   4xM SSE
533  DF_SSE8     = 3,      ///<   8xM SSE
534  DF_SSE16    = 4,      ///<  16xM SSE
535  DF_SSE32    = 5,      ///<  32xM SSE
536  DF_SSE64    = 6,      ///<  64xM SSE
537  DF_SSE16N   = 7,      ///< 16NxM SSE
538 
539  DF_SAD      = 8,      ///< general size SAD
540  DF_SAD4     = 9,      ///<   4xM SAD
541  DF_SAD8     = 10,     ///<   8xM SAD
542  DF_SAD16    = 11,     ///<  16xM SAD
543  DF_SAD32    = 12,     ///<  32xM SAD
544  DF_SAD64    = 13,     ///<  64xM SAD
545  DF_SAD16N   = 14,     ///< 16NxM SAD
546 
547  DF_SADS     = 15,     ///< general size SAD with step
548  DF_SADS4    = 16,     ///<   4xM SAD with step
549  DF_SADS8    = 17,     ///<   8xM SAD with step
550  DF_SADS16   = 18,     ///<  16xM SAD with step
551  DF_SADS32   = 19,     ///<  32xM SAD with step
552  DF_SADS64   = 20,     ///<  64xM SAD with step
553  DF_SADS16N  = 21,     ///< 16NxM SAD with step
554 
555  DF_HADS     = 22,     ///< general size Hadamard with step
556  DF_HADS4    = 23,     ///<   4xM HAD with step
557  DF_HADS8    = 24,     ///<   8xM HAD with step
558  DF_HADS16   = 25,     ///<  16xM HAD with step
559  DF_HADS32   = 26,     ///<  32xM HAD with step
560  DF_HADS64   = 27,     ///<  64xM HAD with step
561  DF_HADS16N  = 28,     ///< 16NxM HAD with step
562#if H_3D_VSO
563  DF_VSD      = 29,      ///< general size VSD
564  DF_VSD4     = 30,      ///<   4xM VSD
565  DF_VSD8     = 31,      ///<   8xM VSD
566  DF_VSD16    = 32,      ///<  16xM VSD
567  DF_VSD32    = 33,      ///<  32xM VSD
568  DF_VSD64    = 34,      ///<  64xM VSD
569  DF_VSD16N   = 35,      ///< 16NxM VSD
570#endif
571
572#if AMP_SAD
573  DF_SAD12    = 43,
574  DF_SAD24    = 44,
575  DF_SAD48    = 45,
576
577  DF_SADS12   = 46,
578  DF_SADS24   = 47,
579  DF_SADS48   = 48,
580
581  DF_SSE_FRAME = 50     ///< Frame-based SSE
582#else
583  DF_SSE_FRAME = 33     ///< Frame-based SSE
584#endif
585};
586
587/// index for SBAC based RD optimization
588enum CI_IDX
589{
590  CI_CURR_BEST = 0,     ///< best mode index
591  CI_NEXT_BEST,         ///< next best index
592  CI_TEMP_BEST,         ///< temporal index
593  CI_CHROMA_INTRA,      ///< chroma intra index
594  CI_QT_TRAFO_TEST,
595  CI_QT_TRAFO_ROOT,
596  CI_NUM,               ///< total number
597};
598
599/// motion vector predictor direction used in AMVP
600enum MVP_DIR
601{
602  MD_LEFT = 0,          ///< MVP of left block
603  MD_ABOVE,             ///< MVP of above block
604  MD_ABOVE_RIGHT,       ///< MVP of above right block
605  MD_BELOW_LEFT,        ///< MVP of below left block
606  MD_ABOVE_LEFT         ///< MVP of above left block
607};
608
609/// coefficient scanning type used in ACS
610enum COEFF_SCAN_TYPE
611{
612  SCAN_DIAG = 0,         ///< up-right diagonal scan
613  SCAN_HOR,              ///< horizontal first scan
614  SCAN_VER               ///< vertical first scan
615};
616
617namespace Profile
618{
619  enum Name
620  {
621    NONE = 0,
622    MAIN = 1,
623    MAIN10 = 2,
624    MAINSTILLPICTURE = 3,
625#if H_MV
626    MAINSTEREO = 4,
627    MAINMULTIVIEW = 5,
628#if H_3D
629    MAIN3D = 6, 
630#endif
631#endif
632  };
633}
634
635namespace Level
636{
637  enum Tier
638  {
639    MAIN = 0,
640    HIGH = 1,
641  };
642
643  enum Name
644  {
645    NONE     = 0,
646    LEVEL1   = 30,
647    LEVEL2   = 60,
648    LEVEL2_1 = 63,
649    LEVEL3   = 90,
650    LEVEL3_1 = 93,
651    LEVEL4   = 120,
652    LEVEL4_1 = 123,
653    LEVEL5   = 150,
654    LEVEL5_1 = 153,
655    LEVEL5_2 = 156,
656    LEVEL6   = 180,
657    LEVEL6_1 = 183,
658    LEVEL6_2 = 186,
659  };
660}
661//! \}
662
663#if H_MV
664/// scalability types
665  enum ScalabilityType
666  {
667    VIEW_ID  = 0,
668#if H_3D
669    DEPTH_ID = 1,   
670#endif   
671  };
672#endif
673#if H_3D
674  // Renderer
675  enum BlenMod
676  {
677    BLEND_NONE  = -1,
678    BLEND_AVRG  = 0,
679    BLEND_LEFT  = 1,
680    BLEND_RIGHT = 2,
681    BLEND_GEN   =  3
682  };
683
684 
685  enum
686  {
687    VIEWPOS_INVALID = -1,
688    VIEWPOS_LEFT    = 0,
689    VIEWPOS_RIGHT   = 1,
690    VIEWPOS_MERGED  = 2
691  };
692
693
694#endif
695#endif
Note: See TracBrowser for help on using the repository browser.