source: SHVCSoftware/branches/SHM-2.1-dev/source/Lib/TLibCommon/TypeDef.h @ 364

Last change on this file since 364 was 306, checked in by seregin, 12 years ago

increase DPB

File size: 24.2 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#define SVC_EXTENSION                    1
42
43#define SYNTAX_BYTES                     10      ///< number of bytes taken by syntaxes per 4x4 block [RefIdxL0(1byte), RefIdxL1(1byte), MVxL0(2bytes), MVyL0(2bytes), MVxL1(2bytes), MVyL1(2bytes)]
44
45#if SVC_EXTENSION
46#define MAX_LAYERS                       2      ///< max number of layers the codec is supposed to handle
47
48#define M0464_TILE_BOUNDARY_ALIGNED_FLAG 1      ///< VUI flag to indicate tile boundary alignment
49#define M0463_VUI_EXT_ILP_REF            1      ///< VUI extension inter-layer dependency offset signalling
50#define SPS_EXTENSION                    1      ///< Define sps_extension() syntax structure
51#define SCALED_REF_LAYER_OFFSET_FLAG     0      ///< M0309: Signal scaled reference layer offsets in SPS
52#define SCALED_REF_LAYER_OFFSETS         1      ///< M0309: Signal scaled reference layer offsets in SPS
53
54#define VPS_RENAME                       1      ///< Rename variables max_layer_id and num_layer_sets_minus1 in VPS
55#define VPS_EXTNS                        1      ///< Include function structure for VPS extensions
56#if VPS_EXTNS
57#define VPS_EXTN_MASK_AND_DIM_INFO       1      ///< Include avc_base_layer_flag, splitting_flag, scalability mask and dimension related info
58#define VPS_EXTN_OP_LAYER_SETS           1      ///< Include output layer sets in VPS extension
59#define VPS_EXTN_PROFILE_INFO            1      ///< Include profile information for layer sets in VPS extension
60#define VPS_EXTN_DIRECT_REF_LAYERS       1      ///< Include indication of direct dependency of layers in VPS extension
61#define VPS_OUTPUT_LAYER_SET_IDX         1      ///< M0268: Signal output_layer_set_idx[i] as output_layer_set_idx_minus1[i]
62#define VPS_MOVE_DIR_DEPENDENCY_FLAG     1      ///< M0268: Move the syntax element direct_dependency_flag to follow the syntax element dimension_id
63#define VPS_PROFILE_OUTPUT_LAYERS        1      ///< M0268: Signal profile information and output layer information as in Sec. 3 of M0268v2
64#define SPS_SUB_LAYER_INFO               1      ///< M0268: Do not signal sps_max_sub_layers_minus1 and sps_temporal_id_nesting_flag for nuh_layer_id greater than 0
65#define VPS_SPLIT_FLAG                   1      ///< M0163: Do not signal dimension_id and the last dimension_id_len_minus1, when splitting_flag is equal to 1.
66#define M0457_PREDICTION_INDICATIONS     1
67#define M0040_ADAPTIVE_RESOLUTION_CHANGE 1
68#endif
69
70#define SH_DISCARDABLE_FLAG              1      ///< M0152: Use one reserved flag in the slice header for discardable flag
71
72#define DERIVE_LAYER_ID_LIST_VARIABLES   1      ///< Derived variables based on the variables in VPS - for use in syntax table parsing
73
74#define SVC_COL_BLK                      1      ///< get co-located block
75#define SVC_UPSAMPLING                   1      ///< upsampling filters
76#define CHROMA_UPSAMPLING                1      ///< L0335: Chroma upsampling with 5 bits coefficients
77
78#define SIMPLIFIED_MV_POS_SCALING        1      ///< M0133/M0449: inter-layer MV scaling and pixel mapping position calculation
79#define ILP_DECODED_PICTURE              1      ///< M0274: use decoded picture for inter-layer prediction
80#define JCTVC_M0259_LAMBDAREFINEMENT     1      ///< JCTVC-M0259: lambda refinement (encoder only optimization)
81#define RESTR_CHK                        1      ///< JCTVC-M0208 proposal 1
82#define ILP_RAP                          1      ///< JCTVC-M0208 proposal 3
83
84#define REF_IDX_FRAMEWORK                1      ///< inter-layer reference framework
85
86#define IDR_ALIGNMENT                    1      ///< align IDR picures across layers
87
88#define AVC_BASE                         1      ///< YUV BL reading for AVC base SVC
89#if AVC_BASE
90#define AVC_SYNTAX                       0      ///< Syntax reading for AVC base
91#endif
92
93#if REF_IDX_FRAMEWORK
94#define REF_IDX_ME_ZEROMV                1      ///< L0051: use zero motion for inter-layer reference picture (without fractional ME)
95#define ENCODER_FAST_MODE                1      ///< L0174: enable encoder fast mode. TestMethod 1 is enabled by setting to 1 and TestMethod 2 is enable by setting to 2. By default it is set to 1.
96#define REF_IDX_MFM                      1      ///< L0336: motion vector mapping of inter-layer reference picture
97#define JCTVC_M0458_INTERLAYER_RPS_SIG   1      ///< implementation of JCTVC-L0178
98#if JCTVC_M0458_INTERLAYER_RPS_SIG
99#define ZERO_NUM_DIRECT_LAYERS           1      ///< support of zero direct reference layers
100#define MAX_ONE_RESAMPLING_DIRECT_LAYERS 1      ///< Allow maximum of one resampling process for direct reference layers
101#endif
102#define JCTVC_M0203_INTERLAYER_PRED_IDC  1      ///< implementation of JCTVC-M0203 Inter-layer Prediction Indication
103#if JCTVC_M0203_INTERLAYER_PRED_IDC
104#define ILR_RESTR                        1     ///< JCTVC-M0209 Inter-layer RPS and RPL
105#endif
106#define M0457_COL_PICTURE_SIGNALING      1
107
108#if !VPS_EXTN_DIRECT_REF_LAYERS || !M0457_PREDICTION_INDICATIONS || !JCTVC_M0458_INTERLAYER_RPS_SIG
109#define M0457_IL_SAMPLE_PRED_ONLY_FLAG   0
110#else
111#define M0457_IL_SAMPLE_PRED_ONLY_FLAG   0
112#endif
113
114#else
115#define INTRA_BL                         1      ///< inter-layer texture prediction
116
117#if INTRA_BL
118#define INTRA_BL_DST4x4                  1      ///< L0067/L0204: DST4x4 for Intra BL
119#define NO_RESIDUAL_FLAG_FOR_BLPRED      1      ///< L0437: Root cbf for Intra_BL
120#define IL_MRG_SIMPLIFIED_PRUNING        1      ///< M0124: simplified pruning, Only the left and above candidates are checked with BL-C candidate for redundancy removal
121#define INTRA_BL_CTX_CHANGE              1      ///< M0075: spatial dependency removal for IntraBL flag context derivation
122
123// Hooks
124#define SVC_MVP                          1      ///< motion hook for merge mode as an example
125#if !AVC_BASE && !AVC_SYNTAX
126#define SVC_BL_CAND_INTRA                0      ///< Intra Base Mode Prediction hook as an example
127#endif
128
129#endif
130#endif
131
132#define FAST_INTRA_SHVC                  1      ///< M0115: reduction number of intra modes in the EL (encoder only)
133#if FAST_INTRA_SHVC
134  #define NB_REMAIN_MODES                2      ///< nb of remaining modes (M0115)
135#endif
136
137#define RC_SHVC_HARMONIZATION            1  ///< JCTVC-M0037, rate control for SHVC
138
139#else
140#define ILP_DECODED_PICTURE              0
141#define SYNTAX_OUTPUT                    0
142#endif // SVC_EXTENSION
143
144
145//! \ingroup TLibCommon
146//! \{
147
148#define FIX1071 1 ///< fix for issue #1071
149#define M0043_LAYERS_PRESENT_SEI         0 ///< M0043: add layers present SEI
150
151#define MAX_NUM_PICS_IN_SOP           1024
152
153#define MAX_NESTING_NUM_OPS         1024
154#define MAX_NESTING_NUM_LAYER       64
155
156#if VPS_EXTN_MASK_AND_DIM_INFO
157#define MAX_VPS_NUM_SCALABILITY_TYPES             16
158#endif
159#if VPS_RENAME
160#define MAX_VPS_LAYER_SETS_PLUS1                  1024
161#define MAX_VPS_LAYER_ID_PLUS1                    MAX_LAYERS
162#else
163#define MAX_VPS_NUM_HRD_PARAMETERS                1
164#define MAX_VPS_OP_SETS_PLUS1                     1024
165#define MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1  1
166#endif
167#define RATE_CONTROL_LAMBDA_DOMAIN                  1  ///< JCTVC-K0103, rate control by R-lambda model
168#define M0036_RC_IMPROVEMENT                        1  ///< JCTVC-M0036, improvement for R-lambda model based rate control
169#define TICKET_1090_FIX                             1
170
171#define RC_FIX                                      1  /// suggested fix for M0036
172#define RATE_CONTROL_INTRA                          1  ///< JCTVC-M0257, rate control for intra
173
174#define MAX_CPB_CNT                     32  ///< Upper bound of (cpb_cnt_minus1 + 1)
175#define MAX_NUM_LAYER_IDS                64
176
177#define COEF_REMAIN_BIN_REDUCTION        3 ///< indicates the level at which the VLC
178                                           ///< transitions from Golomb-Rice to TU+EG(k)
179
180#define CU_DQP_TU_CMAX 5                   ///< max number bins for truncated unary
181#define CU_DQP_EG_k 0                      ///< expgolomb order
182
183#define SBH_THRESHOLD                    4  ///< I0156: value of the fixed SBH controlling threshold
184 
185#define SEQUENCE_LEVEL_LOSSLESS           0  ///< H0530: used only for sequence or frame-level lossless coding
186
187#define DISABLING_CLIP_FOR_BIPREDME         1  ///< Ticket #175
188 
189#define C1FLAG_NUMBER               8 // maximum number of largerThan1 flag coded in one chunk :  16 in HM5
190#define C2FLAG_NUMBER               1 // maximum number of largerThan2 flag coded in one chunk:  16 in HM5
191
192#define REMOVE_SAO_LCU_ENC_CONSTRAINTS_3 1  ///< disable the encoder constraint that conditionally disable SAO for chroma for entire slice in interleaved mode
193
194#define SAO_ENCODING_CHOICE              1  ///< I0184: picture early termination
195#if SAO_ENCODING_CHOICE
196#define SAO_ENCODING_RATE                0.75
197#define SAO_ENCODING_CHOICE_CHROMA       1 ///< J0044: picture early termination Luma and Chroma are handled separately
198#if SAO_ENCODING_CHOICE_CHROMA
199#define SAO_ENCODING_RATE_CHROMA         0.5
200#endif
201#endif
202
203#define MAX_NUM_VPS                16
204#define MAX_NUM_SPS                16
205#define MAX_NUM_PPS                64
206
207#define WEIGHTED_CHROMA_DISTORTION  1   ///< F386: weighting of chroma for RDO
208#define RDOQ_CHROMA_LAMBDA          1   ///< F386: weighting of chroma for RDOQ
209#define SAO_CHROMA_LAMBDA           1   ///< F386: weighting of chroma for SAO
210
211#define MIN_SCAN_POS_CROSS          4
212
213#define FAST_BIT_EST                1   ///< G763: Table-based bit estimation for CABAC
214
215#define MLS_GRP_NUM                         64     ///< G644 : Max number of coefficient groups, max(16, 64)
216#define MLS_CG_SIZE                         4      ///< G644 : Coefficient group size of 4x4
217
218#define ADAPTIVE_QP_SELECTION               1      ///< G382: Adaptive reconstruction levels, non-normative part for adaptive QP selection
219#if ADAPTIVE_QP_SELECTION
220#define ARL_C_PRECISION                     7      ///< G382: 7-bit arithmetic precision
221#define LEVEL_RANGE                         30     ///< G382: max coefficient level in statistics collection
222#endif
223
224#define NS_HAD                               0
225
226#define HHI_RQT_INTRA_SPEEDUP             1           ///< tests one best mode with full rqt
227#define HHI_RQT_INTRA_SPEEDUP_MOD         0           ///< tests two best modes with full rqt
228
229#if HHI_RQT_INTRA_SPEEDUP_MOD && !HHI_RQT_INTRA_SPEEDUP
230#error
231#endif
232
233#define VERBOSE_RATE 0 ///< Print additional rate information in encoder
234
235#define AMVP_DECIMATION_FACTOR            4
236
237#define SCAN_SET_SIZE                     16
238#define LOG2_SCAN_SET_SIZE                4
239
240#define FAST_UDI_MAX_RDMODE_NUM               35          ///< maximum number of RD comparison in fast-UDI estimation loop
241
242#define ZERO_MVD_EST                          0           ///< Zero Mvd Estimation in normal mode
243
244#define NUM_INTRA_MODE 36
245#if !REMOVE_LM_CHROMA
246#define LM_CHROMA_IDX  35
247#endif
248
249#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.
250#define AUTO_INTER_RPS                  1           ///< Enable/disable the automatic generation of refIdc from the deltaPOC and Used by current from the config file.
251#define PRINT_RPS_INFO                  0           ///< Enable/disable the printing of bits used to send the RPS.
252                                                    // using one nearest frame as reference frame, and the other frames are high quality (POC%4==0) frames (1+X)
253                                                    // this should be done with encoder only decision
254                                                    // but because of the absence of reference frame management, the related code was hard coded currently
255
256#define RVM_VCEGAM10_M 4
257
258#define PLANAR_IDX             0
259#define VER_IDX                26                    // index for intra VERTICAL   mode
260#define HOR_IDX                10                    // index for intra HORIZONTAL mode
261#define DC_IDX                 1                     // index for intra DC mode
262#define NUM_CHROMA_MODE        5                     // total number of chroma modes
263#define DM_CHROMA_IDX          36                    // chroma mode index for derived from luma intra mode
264
265
266#define FAST_UDI_USE_MPM 1
267
268#define RDO_WITHOUT_DQP_BITS              0           ///< Disable counting dQP bits in RDO-based mode decision
269
270#define FULL_NBIT 0 ///< When enabled, compute costs using full sample bitdepth.  When disabled, compute costs as if it is 8-bit source video.
271#if FULL_NBIT
272# define DISTORTION_PRECISION_ADJUSTMENT(x) 0
273#else
274# define DISTORTION_PRECISION_ADJUSTMENT(x) (x)
275#endif
276
277#define LOG2_MAX_NUM_COLUMNS_MINUS1        7
278#define LOG2_MAX_NUM_ROWS_MINUS1           7
279#define LOG2_MAX_COLUMN_WIDTH              13
280#define LOG2_MAX_ROW_HEIGHT                13
281
282#define MATRIX_MULT                             0   // Brute force matrix multiplication instead of partial butterfly
283
284#define REG_DCT 65535
285
286#define AMP_SAD                               1           ///< dedicated SAD functions for AMP
287#define AMP_ENC_SPEEDUP                       1           ///< encoder only speed-up by AMP mode skipping
288#if AMP_ENC_SPEEDUP
289#define AMP_MRG                               1           ///< encoder only force merge for AMP partition (no motion search for AMP)
290#endif
291
292#define SCALING_LIST_OUTPUT_RESULT    0 //JCTVC-G880/JCTVC-G1016 quantization matrices
293
294#define CABAC_INIT_PRESENT_FLAG     1
295
296// ====================================================================================================================
297// Basic type redefinition
298// ====================================================================================================================
299
300typedef       void                Void;
301typedef       bool                Bool;
302
303typedef       char                Char;
304typedef       unsigned char       UChar;
305typedef       short               Short;
306typedef       unsigned short      UShort;
307typedef       int                 Int;
308typedef       unsigned int        UInt;
309typedef       double              Double;
310typedef       float               Float;
311
312// ====================================================================================================================
313// 64-bit integer type
314// ====================================================================================================================
315
316#ifdef _MSC_VER
317typedef       __int64             Int64;
318
319#if _MSC_VER <= 1200 // MS VC6
320typedef       __int64             UInt64;   // MS VC6 does not support unsigned __int64 to double conversion
321#else
322typedef       unsigned __int64    UInt64;
323#endif
324
325#else
326
327typedef       long long           Int64;
328typedef       unsigned long long  UInt64;
329
330#endif
331
332// ====================================================================================================================
333// Type definition
334// ====================================================================================================================
335
336typedef       UChar           Pxl;        ///< 8-bit pixel type
337typedef       Short           Pel;        ///< 16-bit pixel type
338typedef       Int             TCoeff;     ///< transform coefficient
339
340/// parameters for adaptive loop filter
341class TComPicSym;
342
343// Slice / Slice segment encoding modes
344enum SliceConstraint
345{
346  NO_SLICES              = 0,          ///< don't use slices / slice segments
347  FIXED_NUMBER_OF_LCU    = 1,          ///< Limit maximum number of largest coding tree blocks in a slice / slice segments
348  FIXED_NUMBER_OF_BYTES  = 2,          ///< Limit maximum number of bytes in a slice / slice segment
349  FIXED_NUMBER_OF_TILES  = 3,          ///< slices / slice segments span an integer number of tiles
350};
351
352#define NUM_DOWN_PART 4
353
354enum SAOTypeLen
355{
356  SAO_EO_LEN    = 4, 
357  SAO_BO_LEN    = 4,
358  SAO_MAX_BO_CLASSES = 32
359};
360
361enum SAOType
362{
363  SAO_EO_0 = 0, 
364  SAO_EO_1,
365  SAO_EO_2, 
366  SAO_EO_3,
367  SAO_BO,
368  MAX_NUM_SAO_TYPE
369};
370
371typedef struct _SaoQTPart
372{
373  Int         iBestType;
374  Int         iLength;
375  Int         subTypeIdx ;                 ///< indicates EO class or BO band position
376  Int         iOffset[4];
377  Int         StartCUX;
378  Int         StartCUY;
379  Int         EndCUX;
380  Int         EndCUY;
381
382  Int         PartIdx;
383  Int         PartLevel;
384  Int         PartCol;
385  Int         PartRow;
386
387  Int         DownPartsIdx[NUM_DOWN_PART];
388  Int         UpPartIdx;
389
390  Bool        bSplit;
391
392  //---- encoder only start -----//
393  Bool        bProcessed;
394  Double      dMinCost;
395  Int64       iMinDist;
396  Int         iMinRate;
397  //---- encoder only end -----//
398} SAOQTPart;
399
400typedef struct _SaoLcuParam
401{
402  Bool       mergeUpFlag;
403  Bool       mergeLeftFlag;
404  Int        typeIdx;
405  Int        subTypeIdx;                  ///< indicates EO class or BO band position
406  Int        offset[4];
407  Int        partIdx;
408  Int        partIdxTmp;
409  Int        length;
410} SaoLcuParam;
411
412struct SAOParam
413{
414  Bool       bSaoFlag[2];
415  SAOQTPart* psSaoPart[3];
416  Int        iMaxSplitLevel;
417  Bool         oneUnitFlag[3];
418  SaoLcuParam* saoLcuParam[3];
419  Int          numCuInHeight;
420  Int          numCuInWidth;
421  ~SAOParam();
422};
423
424/// parameters for deblocking filter
425typedef struct _LFCUParam
426{
427  Bool bInternalEdge;                     ///< indicates internal edge
428  Bool bLeftEdge;                         ///< indicates left edge
429  Bool bTopEdge;                          ///< indicates top edge
430} LFCUParam;
431
432// ====================================================================================================================
433// Enumeration
434// ====================================================================================================================
435
436/// supported slice type
437enum SliceType
438{
439  B_SLICE,
440  P_SLICE,
441  I_SLICE
442};
443
444/// chroma formats (according to semantics of chroma_format_idc)
445enum ChromaFormat
446{
447  CHROMA_400  = 0,
448  CHROMA_420  = 1,
449  CHROMA_422  = 2,
450  CHROMA_444  = 3
451};
452
453/// supported partition shape
454enum PartSize
455{
456  SIZE_2Nx2N,           ///< symmetric motion partition,  2Nx2N
457  SIZE_2NxN,            ///< symmetric motion partition,  2Nx N
458  SIZE_Nx2N,            ///< symmetric motion partition,   Nx2N
459  SIZE_NxN,             ///< symmetric motion partition,   Nx N
460  SIZE_2NxnU,           ///< asymmetric motion partition, 2Nx( N/2) + 2Nx(3N/2)
461  SIZE_2NxnD,           ///< asymmetric motion partition, 2Nx(3N/2) + 2Nx( N/2)
462  SIZE_nLx2N,           ///< asymmetric motion partition, ( N/2)x2N + (3N/2)x2N
463  SIZE_nRx2N,           ///< asymmetric motion partition, (3N/2)x2N + ( N/2)x2N
464  SIZE_NONE = 15
465};
466
467/// supported prediction type
468enum PredMode
469{
470  MODE_INTER,           ///< inter-prediction mode
471  MODE_INTRA,           ///< intra-prediction mode
472#if INTRA_BL
473  MODE_INTRA_BL,        ///< inter-layer intra-prediction mode
474#endif
475  MODE_NONE = 15
476};
477
478/// texture component type
479enum TextType
480{
481  TEXT_LUMA,            ///< luma
482  TEXT_CHROMA,          ///< chroma (U+V)
483  TEXT_CHROMA_U,        ///< chroma U
484  TEXT_CHROMA_V,        ///< chroma V
485  TEXT_ALL,             ///< Y+U+V
486  TEXT_NONE = 15
487};
488
489/// reference list index
490enum RefPicList
491{
492  REF_PIC_LIST_0 = 0,   ///< reference list 0
493  REF_PIC_LIST_1 = 1,   ///< reference list 1
494  REF_PIC_LIST_X = 100  ///< special mark
495};
496
497/// distortion function index
498enum DFunc
499{
500  DF_DEFAULT  = 0,
501  DF_SSE      = 1,      ///< general size SSE
502  DF_SSE4     = 2,      ///<   4xM SSE
503  DF_SSE8     = 3,      ///<   8xM SSE
504  DF_SSE16    = 4,      ///<  16xM SSE
505  DF_SSE32    = 5,      ///<  32xM SSE
506  DF_SSE64    = 6,      ///<  64xM SSE
507  DF_SSE16N   = 7,      ///< 16NxM SSE
508 
509  DF_SAD      = 8,      ///< general size SAD
510  DF_SAD4     = 9,      ///<   4xM SAD
511  DF_SAD8     = 10,     ///<   8xM SAD
512  DF_SAD16    = 11,     ///<  16xM SAD
513  DF_SAD32    = 12,     ///<  32xM SAD
514  DF_SAD64    = 13,     ///<  64xM SAD
515  DF_SAD16N   = 14,     ///< 16NxM SAD
516 
517  DF_SADS     = 15,     ///< general size SAD with step
518  DF_SADS4    = 16,     ///<   4xM SAD with step
519  DF_SADS8    = 17,     ///<   8xM SAD with step
520  DF_SADS16   = 18,     ///<  16xM SAD with step
521  DF_SADS32   = 19,     ///<  32xM SAD with step
522  DF_SADS64   = 20,     ///<  64xM SAD with step
523  DF_SADS16N  = 21,     ///< 16NxM SAD with step
524 
525  DF_HADS     = 22,     ///< general size Hadamard with step
526  DF_HADS4    = 23,     ///<   4xM HAD with step
527  DF_HADS8    = 24,     ///<   8xM HAD with step
528  DF_HADS16   = 25,     ///<  16xM HAD with step
529  DF_HADS32   = 26,     ///<  32xM HAD with step
530  DF_HADS64   = 27,     ///<  64xM HAD with step
531  DF_HADS16N  = 28,     ///< 16NxM HAD with step
532 
533#if AMP_SAD
534  DF_SAD12    = 43,
535  DF_SAD24    = 44,
536  DF_SAD48    = 45,
537
538  DF_SADS12   = 46,
539  DF_SADS24   = 47,
540  DF_SADS48   = 48,
541
542  DF_SSE_FRAME = 50     ///< Frame-based SSE
543#else
544  DF_SSE_FRAME = 33     ///< Frame-based SSE
545#endif
546};
547
548/// index for SBAC based RD optimization
549enum CI_IDX
550{
551  CI_CURR_BEST = 0,     ///< best mode index
552  CI_NEXT_BEST,         ///< next best index
553  CI_TEMP_BEST,         ///< temporal index
554  CI_CHROMA_INTRA,      ///< chroma intra index
555  CI_QT_TRAFO_TEST,
556  CI_QT_TRAFO_ROOT,
557  CI_NUM,               ///< total number
558};
559
560/// motion vector predictor direction used in AMVP
561enum MVP_DIR
562{
563  MD_LEFT = 0,          ///< MVP of left block
564  MD_ABOVE,             ///< MVP of above block
565  MD_ABOVE_RIGHT,       ///< MVP of above right block
566  MD_BELOW_LEFT,        ///< MVP of below left block
567  MD_ABOVE_LEFT         ///< MVP of above left block
568};
569
570/// coefficient scanning type used in ACS
571enum COEFF_SCAN_TYPE
572{
573  SCAN_DIAG = 0,         ///< up-right diagonal scan
574  SCAN_HOR,              ///< horizontal first scan
575  SCAN_VER               ///< vertical first scan
576};
577
578namespace Profile
579{
580  enum Name
581  {
582    NONE = 0,
583    MAIN = 1,
584    MAIN10 = 2,
585    MAINSTILLPICTURE = 3,
586  };
587}
588
589namespace Level
590{
591  enum Tier
592  {
593    MAIN = 0,
594    HIGH = 1,
595  };
596
597  enum Name
598  {
599    NONE     = 0,
600    LEVEL1   = 30,
601    LEVEL2   = 60,
602    LEVEL2_1 = 63,
603    LEVEL3   = 90,
604    LEVEL3_1 = 93,
605    LEVEL4   = 120,
606    LEVEL4_1 = 123,
607    LEVEL5   = 150,
608    LEVEL5_1 = 153,
609    LEVEL5_2 = 156,
610    LEVEL6   = 180,
611    LEVEL6_1 = 183,
612    LEVEL6_2 = 186,
613  };
614}
615//! \}
616
617#endif
Note: See TracBrowser for help on using the repository browser.