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

Last change on this file since 539 was 539, checked in by orange, 11 years ago

Integrated QTLPC and added new line mark at the end of TComWedgelet.cpp for MERL

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