source: 3DVCSoftware/tags/0.2r1/source/Lib/TLibCommon/TypeDef.h @ 255

Last change on this file since 255 was 5, checked in by hhi, 13 years ago

Clean version with cfg-files

  • 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-2011, 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 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
42//>>>>> HHI 3DV tools >>>>>
43#define HHI_INTER_VIEW_MOTION_PRED      1   // inter-view motion parameter prediction
44#define HHI_INTER_VIEW_RESIDUAL_PRED    1   // inter-view residual prediction
45#define HHI_FULL_PEL_DEPTH_MAP_MV_ACC   1   // full-pel mv accuracy for depth maps
46#define HHI_MPI                         1   // motion parameter inheritance from texture picture for depth map coding
47#define HHI_INTERVIEW_SKIP              1   // skipping of residual for renderable regions
48#define HHI_INTERVIEW_SKIP_LAMBDA_SCALE 1   // scaling of lambda in cost calculation in rederable regions
49#define HHI_VSO                         1   // view synthesis optimization
50#define HHI_VSO_COLOR_PLANES            1   // view synthesis optimization in color planes
51#define HHI_VSO_DIST_INT                1   // view synthesis optimization integer distorition in rdo process
52
53#if HHI_INTERVIEW_SKIP_LAMBDA_SCALE && !HHI_INTERVIEW_SKIP
54  #error "HHI_INTERVIEW_SKIP_LAMBDA_SCALE cannot be enabled if HHI_INTERVIEW_SKIP is not"
55#endif
56
57#define HHI_DMM_WEDGE_INTRA             1   // depth model modes independent on texture (explicit and intra-predicted Wedgelet prediction)
58#define HHI_DMM_PRED_TEX                1   // depth model model dependent on texture (inter-component Wedgelet and Contour prediction )
59
60#define HHI_NO_LowDelayCoding           0   // old-fashioned encoder control, should be adapted to hm5.0
61//<<<<< HHI 3DV tools <<<<<
62
63
64////////////////////////////
65// AHG18 Weighted Prediction defines section start
66////////////////////////////
67#define WEIGHT_PRED           ///< enable AVC based weighted prediction
68
69//////////////////////////
70// AHG18 Weighted Prediction defines section end
71//////////////////////////
72
73////////////////////////////
74// JCT-VC E start
75////////////////////////////
76
77#define E253                              1
78
79////////////////////////////
80// JCT-VC E end
81////////////////////////////
82
83
84
85#define HHI_DISABLE_INTER_NxN_SPLIT       1           ///< TN: disable redundant use of pu-mode NxN for CTBs larger 8x8 (inter only)
86#define HHI_RMP_SWITCH                    0
87
88#define HHI_RQT_FORCE_SPLIT_NxN           0           ///< MSHK: force split flags of residual quadtree for NxN PUs such that transform blocks are guaranteed to not span NxN PUs
89#define HHI_RQT_FORCE_SPLIT_RECT          0           ///< MSHK: force split flags of residual quadtree for rectangular PUs such that transform blocks are guaranteed to not span rectangular PUs
90#define HHI_RQT_INTRA_SPEEDUP             1           ///< tests one best mode with full rqt
91#define HHI_RQT_INTRA_SPEEDUP_MOD         0           ///< tests two best modes with full rqt
92
93#define PART_MRG                          1            // If the number of partitions is two and size > 8, only merging mode is enabled for the first partition & do not code merge_flag for the first partition
94#define HHI_MRG_SKIP                      1            // (JCTVC-E481 - merge skip) replaces the AMVP based skip by merge based skip (E481 - MERGE skip)
95
96#if HHI_RQT_INTRA_SPEEDUP_MOD && !HHI_RQT_INTRA_SPEEDUP
97#error
98#endif
99
100#if ( HHI_RQT_FORCE_SPLIT_NxN || HHI_RQT_FORCE_SPLIT_RECT)
101#define HHI_RQT_FORCE_SPLIT_ACC2_PU       1
102#else
103#define HHI_RQT_FORCE_SPLIT_ACC2_PU       0
104#endif
105
106// COLOCATED PREDICTOR
107// FOR MERGE
108#define MRG_NEIGH_COL                     1           ///< use of colocated MB in MERGE
109#define FT_TCTR_MRG                       1           ///< central colocated in MERGE
110#if !FT_TCTR_MRG
111#define PANASONIC_MERGETEMPORALEXT        1           ///<
112#endif
113#define MTK_TMVP_H_MRG                    1           ///< (JCTVC-E481 - D125 2.1) right-bottom collocated for merge
114#define PANASONIC_MRG_TMVP_REFIDX         1           ///< (JCTVC-E481 - D274 (2) ) refidx derivation for merge TMVP
115// FOR AMVP
116#define AMVP_NEIGH_COL                    1           ///< use of colocated MB in AMVP
117#define FT_TCTR_AMVP                      1           ///< central colocated in AMVP
118#if !FT_TCTR_AMVP
119#define PANASONIC_AMVPTEMPORALEXT         1           ///<
120#endif
121#define MTK_TMVP_H_AMVP                   1           ///< (JCTVC-E481 - D125 2.1) right-bottom collocated for amvp
122// FOR BOTH
123#define PANASONIC_AMVPTEMPORALMOD         1           ///< (JCTVC-E481 - D125 2.4' / D274 3')
124#define AMVP_BUFFERCOMPRESS               1           ///< motion vector buffer compression
125#define AMVP_DECIMATION_FACTOR            4
126#define MV_COMPRESS_MODE_REFIDX           1           ///< (JCTVC-E147) compress all inter prediction parameters according to 1)
127
128#define HIGH_ACCURACY_BI                  1          // High precision bi-prediction JCTVC-D321
129#define REMOVE_INTERMEDIATE_CLIPPING      1          // No intermediate clipping in bi-prediction JCTVC-E242
130
131////////////////
132// E494 (E227/E338/E344/E489/E494): PCP SIGMAP + REDUCED CONTEXTS
133////////////////
134
135#define PCP_SIGMAP_SIMPLE_LAST            1
136#define SIMPLE_CONTEXT_SIG                1
137
138
139#define QC_MOD_LCEC                       1           // JCTVC-D374: modified LCEC coeff. coding
140#define LCEC_INTRA_MODE                   1           // JCTVC-D366: improved luma intra mode coding
141#define QC_MOD_LCEC_RDOQ                  1           // JCTVC-D374: improved RDOQ
142#define QC_LCEC_INTER_MODE                1
143#define QC_MDIS                           1           // JCTVC-D282: enable mode dependent intra smoothing
144#define QC_MDCS                           1           // JCTVC-D393: mode dependent coefficients coding
145#if QC_MOD_LCEC
146#define RUNLEVEL_TABLE_CUT                1           // JCTVC-E384: Run-Level table size reduction
147#if RUNLEVEL_TABLE_CUT
148#define CAVLC_COEF_LRG_BLK                1           // JCTVC-E383: enable large block coeff. coding
149#endif
150#endif
151
152
153#define ENABLE_FORCECOEFF0  0
154
155/* Rounding control */
156//#define ROUNDING_CONTROL_BIPRED ///< From JCTVC-B074 This part of the code is not needed anymore : KU
157#define TRANS_PRECISION_EXT     ///< From JCTVC-B074
158
159#define HHI_RQT_DISABLE_SUB                   0           ///< disabling subtree whose node size is smaller than partition size
160
161#define FAST_UDI_MAX_RDMODE_NUM               35          ///< maximum number of RD comparison in fast-UDI estimation loop
162
163#define SAMSUNG_FAST_UDI_MODESET              0           ///< 0: {9,9,4,4,5} (default) and 1: {9,9,9,9,5} for {4x4,8x8,16x16,32x32,64x64}
164
165#define ZERO_MVD_EST                          0           ///< Zero Mvd Estimation in normal mode
166
167#define LM_CHROMA                             1           // JCTVC-E266: Chroma intra prediction based on luma signal
168
169#define UNIFY_INTER_TABLE                     1           // JCTVC-E381 CAVLC: Inter pred coding
170
171#define DCM_RDCOST_TEMP_FIX //Enables temporary bug fixes to RD cost computation
172
173#define DCM_DECODING_REFRESH              1           ///< enable/disable decoding refresh (IDR and CDR)
174#if DCM_DECODING_REFRESH
175#define DCM_SKIP_DECODING_FRAMES          1           ///< enable/disable the random access by the decoder
176#endif
177
178#define DCM_SIMPLIFIED_MVP                1           ///< enable/disable the simplified motion vector prediction(D231)
179#if DCM_SIMPLIFIED_MVP
180#define MTK_AMVP_SMVP_DERIVATION          1              ///< (JCTVC-E481 - D125 2.1) amvp spatial candidate derivation
181#define TI_AMVP_SMVP_SIMPLIFIED           1              ///< (JCTVC-E481 - F)amvp spatial candidate simplified scanning
182#endif
183
184#define DCM_COMB_LIST                  1           ///< Use of combined list for uni-prediction in B-slices
185
186#define ADD_PLANAR_MODE                   1           ///< enable/disable Planar mode for intra prediction (JCTVC-E321)
187#if ADD_PLANAR_MODE
188#define NUM_INTRA_MODE                    35
189#define PLANAR_IDX                        (NUM_INTRA_MODE-1)
190#endif
191
192#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
193#define DMM_WEDGEMODEL_MIN_SIZE           4           
194#define DMM_WEDGEMODEL_MAX_SIZE          32
195#define DMM_WEDGE_PREDDIR_DELTAEND_MAX    4           
196
197#if ADD_PLANAR_MODE
198#define  MAX_MODE_ID_INTRA_DIR            34
199#else
200#define  MAX_MODE_ID_INTRA_DIR            33
201#endif
202#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
203enum MODE_IDX
204{
205  DMM_WEDGE_FULL_IDX         = MAX_MODE_ID_INTRA_DIR+1,
206  DMM_WEDGE_FULL_D_IDX       = MAX_MODE_ID_INTRA_DIR+2,
207  DMM_WEDGE_PREDTEX_IDX      = MAX_MODE_ID_INTRA_DIR+3,
208  DMM_WEDGE_PREDTEX_D_IDX    = MAX_MODE_ID_INTRA_DIR+4,
209  DMM_CONTOUR_PREDTEX_IDX    = MAX_MODE_ID_INTRA_DIR+5,
210  DMM_CONTOUR_PREDTEX_D_IDX  = MAX_MODE_ID_INTRA_DIR+6,
211  DMM_WEDGE_PREDDIR_IDX      = MAX_MODE_ID_INTRA_DIR+7,
212  DMM_WEDGE_PREDDIR_D_IDX    = MAX_MODE_ID_INTRA_DIR+8
213};
214#elif HHI_DMM_WEDGE_INTRA && !HHI_DMM_PRED_TEX
215enum MODE_IDX
216{
217  DMM_WEDGE_FULL_IDX         = MAX_MODE_ID_INTRA_DIR+1,
218  DMM_WEDGE_FULL_D_IDX       = MAX_MODE_ID_INTRA_DIR+2,
219  DMM_WEDGE_PREDDIR_IDX      = MAX_MODE_ID_INTRA_DIR+3,
220  DMM_WEDGE_PREDDIR_D_IDX    = MAX_MODE_ID_INTRA_DIR+4
221};
222#elif !HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
223enum MODE_IDX
224{
225  DMM_WEDGE_PREDTEX_IDX      = MAX_MODE_ID_INTRA_DIR+1,
226  DMM_WEDGE_PREDTEX_D_IDX    = MAX_MODE_ID_INTRA_DIR+2,
227  DMM_CONTOUR_PREDTEX_IDX    = MAX_MODE_ID_INTRA_DIR+3,
228  DMM_CONTOUR_PREDTEX_D_IDX  = MAX_MODE_ID_INTRA_DIR+4,
229};
230#endif
231#endif
232
233#define TSB_ALF_HEADER                 1           // Send ALF ON/OFF flag in slice header
234#define IBDI_DISTORTION                0           ///< enable/disable SSE modification when IBDI is used (JCTVC-D152)
235#define FIXED_ROUNDING_FRAME_MEMORY    0           ///< enable/disable fixed rounding to 8-bitdepth of frame memory when IBDI is used
236
237#define MS_LCEC_ONE_FRAME               1           // change the initial table in LCEC when there is up to one reference frame in each list, JCTVC-D141
238#define MS_LCEC_LOOKUP_TABLE_MAX_VALUE  1           // use the information of the max position in the lookup table, JCTVC-D141
239#define MS_LCEC_LOOKUP_TABLE_EXCEPTION  1           // deal with the case when the number of reference frames is greater than 2, JCTVC-D141
240#define MS_LCEC_UNI_EXCEPTION_THRES     1           // for GPB case, uni-prediction, > MS_LCEC_UNI_EXCEPTION_THRES is exception
241#define CAVLC_COUNTER_ADAPT             1          // counter based CAVLC adaptation, JCTVC-E143
242#if CAVLC_COUNTER_ADAPT
243#define CAVLC_RQT_CBP                   1           //CAVLC coding of cbf and split flag, JCTVC-E404
244#endif
245
246
247#define AVOID_ZERO_MERGE_CANDIDATE      1           // (JCTVC-E146/E118) insert zero MV if no merge candidates are available
248#define CHANGE_MERGE_CONTEXT            1           // (JCTVC-E146/E118) change merge flag context derivation
249#define CHANGE_GET_MERGE_CANDIDATE      1           // (JCTVC-E146/E118) merge flag parsing independent of number of merge candidates
250#if CHANGE_GET_MERGE_CANDIDATE && !CHANGE_MERGE_CONTEXT
251#error CHANGE_GET_MERGE_CANDIDATE can only be defined with CHANGE_MERGE_CONTEXT
252#endif
253
254#define MTK_DISABLE_INTRA_NxN_SPLIT       1           ///< Disable use of PUs-mode NxN for CUs larger 8x8 (intra only)
255#define MTK_NONCROSS_INLOOP_FILTER        1           ///< Allow non-cross-slice-boundary in-loop filtering, including DB & ALF (JCTVC-D128)
256
257#define RVM_VCEGAM10 1 // RVM model proposed in VCEG-AM10
258#if RVM_VCEGAM10
259#define RVM_VCEGAM10_M 4
260#endif
261
262#define MTK_DCM_MPM 1 // MostProbableModeSignaling
263
264#define FAST_UDI_USE_MPM 1
265#define SONY_SIG_CTX 1
266#define SNY_DQP                          1           ///< syntax change of dQP (JCT-VC D258)
267
268#define TI_ALF_MAX_VSIZE_7 1
269
270#define CHROMA_CODEWORD 1                             ///< enable new intra chroma mode encoding by setting to 1. setting to 0 should yield same results as TMuC 0.9
271#define CHROMA_CODEWORD_SWITCH  1                     ///< Switch the places of the last two codewords
272
273#define FULL_NBIT 0 ///< When enabled, does not use g_uiBitIncrement anymore to support > 8 bit data
274
275/////////////////////////////////
276// AHG SLICES defines section start
277/////////////////////////////////
278#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
279#define AD_HOC_SLICES_FIXED_NUMBER_OF_BYTES_IN_SLICE    2          ///< OPTION IDENTIFIER. mode==2 -> Limit maximum number of bins/bits in a slice
280
281// Entropy slice options
282#define SHARP_FIXED_NUMBER_OF_LCU_IN_ENTROPY_SLICE            1          ///< OPTION IDENTIFIER. Limit maximum number of largest coding tree blocks in an entropy slice
283#define SHARP_MULTIPLE_CONSTRAINT_BASED_ENTROPY_SLICE         2          ///< OPTION IDENTIFIER. Limit maximum number of bins/bits in an entropy slice
284/////////////////////////////////
285// AHG SLICES defines section end
286/////////////////////////////////
287
288#define CONSTRAINED_INTRA_PRED            1           // JCTVC-D086: constrained intra prediction
289
290#define MTK_SAO                           1           // JCTVC-E049: Sample adaptive offset
291
292#define MQT_ALF_NPASS                       1
293
294#define MQT_BA_RA                        1  // JCTVC-E323+E046
295#if MQT_BA_RA
296#define VAR_SIZE_H           4
297#define VAR_SIZE_W           4
298#define NO_VAR_BIN          16
299#endif
300
301#if QC_MDIS
302#define MN_MDIS_SIMPLIFICATION       1       ///< JCTVC-E069: simplification of MDIS
303#endif
304#define MN_DC_PRED_FILTER            1       ///< JCTVC-E069: DC prediction samples filtering
305
306#define MVD_CTX            1           // JCTVC-E324: Modified context selection for MVD
307#define PARALLEL_DEBLK_DECISION      1 // JCTC-E224: Parallel decisions
308#define PARALLEL_MERGED_DEBLK        1 // JCTC-E224, JCTVC-E181: Parallel decisions + Parallel filtering
309#define REFERENCE_SAMPLE_PADDING                1   // JCTVC-E488 padding of unavailable reference samples for intra prediction
310
311#define E243_CORE_TRANSFORMS                    1
312#if E243_CORE_TRANSFORMS
313#define MATRIX_MULT                             0   // Brute force matrix multiplication instead of partial butterfly
314#endif
315
316// Discrete Sine Transform (DST) Type - 7
317// Currently DST operates with E-243 only
318#define INTRA_DST_TYPE_7                      1           // JCTVC-E125 4x4 DST
319#if INTRA_DST_TYPE_7
320#define REG_DCT 65535
321#if !E243_CORE_TRANSFORMS                   // E243_CORE_TRANSFORMS should be ON when DST is used
322#error "E243_CORE_TRANSFORMS should be ON"
323#endif
324#endif
325
326// ====================================================================================================================
327// Basic type redefinition
328// ====================================================================================================================
329
330typedef       void                Void;
331typedef       bool                Bool;
332
333typedef       char                Char;
334typedef       unsigned char       UChar;
335typedef       short               Short;
336typedef       unsigned short      UShort;
337typedef       int                 Int;
338typedef       unsigned int        UInt;
339typedef       long                Long;
340typedef       unsigned long       ULong;
341typedef       double              Double;
342
343// ====================================================================================================================
344// 64-bit integer type
345// ====================================================================================================================
346
347#ifdef _MSC_VER
348typedef       __int64             Int64;
349
350#if _MSC_VER <= 1200 // MS VC6
351typedef       __int64             UInt64;   // MS VC6 does not support unsigned __int64 to double conversion
352#else
353typedef       unsigned __int64    UInt64;
354#endif
355
356#else
357
358typedef       long long           Int64;
359typedef       unsigned long long  UInt64;
360
361#endif
362
363// ====================================================================================================================
364// Type definition
365// ====================================================================================================================
366
367typedef       UChar           Pxl;        ///< 8-bit pixel type
368typedef       Short           Pel;        ///< 16-bit pixel type
369typedef       Int             TCoeff;     ///< transform coefficient
370
371
372
373// ====================================================================================================================
374// Define Distortion Types
375// ====================================================================================================================
376typedef       Int64           RMDist;     ///< renderer model distortion
377
378#if HHI_VSO_DIST_INT
379typedef       Int              Dist;       ///< RDO distortion
380#define       RDO_DIST_MIN     MIN_INT
381#define       RDO_DIST_MAX     MAX_INT
382#else
383typedef       UInt             Dist;       ///< RDO distortion
384#define       RDO_DIST_MIN     0
385#define       RDO_DIST_MAX     MAX_UINT
386#endif
387
388/// parameters for adaptive loop filter
389class TComPicSym;
390
391#if MTK_SAO
392
393#define NUM_DOWN_PART 4
394
395enum QAOTypeLen
396{
397  SAO_EO_LEN    = 4,
398  SAO_EO_LEN_2D = 6,
399  SAO_BO_LEN    = 16
400};
401
402enum QAOType
403{
404  SAO_EO_0 = 0,
405  SAO_EO_1,
406  SAO_EO_2,
407  SAO_EO_3,
408  SAO_BO_0,
409  SAO_BO_1,
410  MAX_NUM_SAO_TYPE
411};
412
413typedef struct _SaoQTPart
414{
415  Bool        bEnableFlag;
416  Int         iBestType;
417  Int         iLength;
418  Int         iOffset[32];
419
420  Int         StartCUX;
421  Int         StartCUY;
422  Int         EndCUX;
423  Int         EndCUY;
424
425  Int         part_xs;
426  Int         part_xe;
427  Int         part_ys;
428  Int         part_ye;
429  Int         part_width;
430  Int         part_height;
431
432  Int         PartIdx;
433  Int         PartLevel;
434  Int         PartCol;
435  Int         PartRow;
436
437  Int         DownPartsIdx[NUM_DOWN_PART];
438  Int         UpPartIdx;
439
440  Int*        pSubPartList;
441  Int         iLengthSubPartList;
442
443  Bool        bBottomLevel;
444  Bool        bSplit;
445  //    Bool        bAvailable;
446
447  //---- encoder only start -----//
448  Int64***    pppiCorr; //[filt_type][corr_row][corr_col]
449  Int**       ppCoeff;  //[filt_type][coeff]
450  Bool        bProcessed;
451  Double      dMinCost;
452  Int64       iMinDist;
453  Int         iMinRate;
454  //---- encoder only end -----//
455} SAOQTPart;
456
457struct _SaoParam
458{
459  Bool       bSaoFlag;
460  SAOQTPart* psSaoPart;
461  Int        iMaxSplitLevel;
462  Int        iNumClass[MAX_NUM_SAO_TYPE];
463};
464
465#endif
466
467struct _AlfParam
468{
469  Int alf_flag;                           ///< indicates use of ALF
470  Int cu_control_flag;                    ///< coding unit based control flag
471  Int chroma_idc;                         ///< indicates use of ALF for chroma
472#if TI_ALF_MAX_VSIZE_7
473  Int tap;                                ///< number of filter taps - horizontal
474  Int tapV;                               ///< number of filter taps - vertical
475#else
476  Int tap;                                ///< number of filter taps
477#endif
478  Int num_coeff;                          ///< number of filter coefficients
479  Int *coeff;                             ///< filter coefficient array
480  Int tap_chroma;                         ///< number of filter taps (chroma)
481  Int num_coeff_chroma;                   ///< number of filter coefficients (chroma)
482  Int *coeff_chroma;                      ///< filter coefficient array (chroma)
483  //CodeAux related
484  Int realfiltNo;
485  Int filtNo;
486#if MQT_BA_RA
487  Int filterPattern[NO_VAR_BIN];
488#else
489  Int filterPattern[16];
490#endif
491  Int startSecondFilter;
492  Int noFilters;
493#if MQT_BA_RA
494  Int varIndTab[NO_VAR_BIN];
495#else
496  Int varIndTab[16];
497#endif
498
499  //Coeff send related
500  Int filters_per_group_diff; //this can be updated using codedVarBins
501  Int filters_per_group;
502#if MQT_BA_RA
503  Int codedVarBins[NO_VAR_BIN];
504#else
505  Int codedVarBins[16];
506#endif
507  Int forceCoeff0;
508  Int predMethod;
509  Int **coeffmulti;
510  Int minKStart;
511  Int maxScanVal;
512  Int kMinTab[42];
513#if TSB_ALF_HEADER
514  UInt num_alf_cu_flag;
515  UInt num_cus_in_frame;
516  UInt alf_max_depth;
517  UInt *alf_cu_flag;
518#endif
519
520#if MQT_BA_RA
521  Int alf_pcr_region_flag;
522#endif
523};
524
525/// parameters for deblocking filter
526typedef struct _LFCUParam
527{
528  Bool bInternalEdge;                     ///< indicates internal edge
529  Bool bLeftEdge;                         ///< indicates left edge
530  Bool bTopEdge;                          ///< indicates top edge
531} LFCUParam;
532
533/// parapeters for TENTM coefficient VLC
534typedef struct _LastCoeffStruct
535{
536  int level;
537  int last_pos;
538} LastCoeffStruct;
539
540// ====================================================================================================================
541// Enumeration
542// ====================================================================================================================
543
544/// supported slice type
545enum SliceType
546{
547  I_SLICE,
548  P_SLICE,
549  B_SLICE
550};
551
552/// supported partition shape
553enum PartSize
554{
555  SIZE_2Nx2N,           ///< symmetric motion partition,  2Nx2N
556  SIZE_2NxN,            ///< symmetric motion partition,  2Nx N
557  SIZE_Nx2N,            ///< symmetric motion partition,   Nx2N
558  SIZE_NxN,             ///< symmetric motion partition,   Nx N
559
560  SIZE_NONE = 15
561};
562
563//GT
564enum InterViewReference
565{
566  PREVVIEW = 0,
567  CURRVIEW = 1,
568  NEXTVIEW = 2
569};
570
571/// supported prediction type
572enum PredMode
573{
574  MODE_SKIP,            ///< SKIP mode
575  MODE_INTER,           ///< inter-prediction mode
576  MODE_INTRA,           ///< intra-prediction mode
577  MODE_NONE = 15
578};
579
580/// texture component type
581enum TextType
582{
583  TEXT_LUMA,            ///< luma
584  TEXT_CHROMA,          ///< chroma (U+V)
585  TEXT_CHROMA_U,        ///< chroma U
586  TEXT_CHROMA_V,        ///< chroma V
587  TEXT_ALL,             ///< Y+U+V
588  TEXT_NONE = 15
589};
590
591enum
592{
593  VIEWPOS_INVALID = -1,
594  VIEWPOS_LEFT    = 0,
595  VIEWPOS_RIGHT   = 1,
596  VIEWPOS_MERGED  = 2
597};
598
599/// reference list index
600enum RefPicList
601{
602  REF_PIC_LIST_0 = 0,   ///< reference list 0
603  REF_PIC_LIST_1 = 1,   ///< reference list 1
604#if DCM_COMB_LIST
605  REF_PIC_LIST_C = 2,   ///< combined reference list for uni-prediction in B-Slices
606#endif
607  REF_PIC_LIST_X = 100  ///< special mark
608};
609
610/// distortion function index
611enum DFunc
612{
613  DF_DEFAULT  = 0,
614  DF_SSE      = 1,      ///< general size SSE
615  DF_SSE4     = 2,      ///<   4xM SSE
616  DF_SSE8     = 3,      ///<   8xM SSE
617  DF_SSE16    = 4,      ///<  16xM SSE
618  DF_SSE32    = 5,      ///<  32xM SSE
619  DF_SSE64    = 6,      ///<  64xM SSE
620  DF_SSE16N   = 7,      ///< 16NxM SSE
621
622  DF_SAD      = 8,      ///< general size SAD
623  DF_SAD4     = 9,      ///<   4xM SAD
624  DF_SAD8     = 10,     ///<   8xM SAD
625  DF_SAD16    = 11,     ///<  16xM SAD
626  DF_SAD32    = 12,     ///<  32xM SAD
627  DF_SAD64    = 13,     ///<  64xM SAD
628  DF_SAD16N   = 14,     ///< 16NxM SAD
629
630  DF_SADS     = 15,     ///< general size SAD with step
631  DF_SADS4    = 16,     ///<   4xM SAD with step
632  DF_SADS8    = 17,     ///<   8xM SAD with step
633  DF_SADS16   = 18,     ///<  16xM SAD with step
634  DF_SADS32   = 19,     ///<  32xM SAD with step
635  DF_SADS64   = 20,     ///<  64xM SAD with step
636  DF_SADS16N  = 21,     ///< 16NxM SAD with step
637
638  DF_HADS     = 22,     ///< general size Hadamard with step
639  DF_HADS4    = 23,     ///<   4xM HAD with step
640  DF_HADS8    = 24,     ///<   8xM HAD with step
641  DF_HADS16   = 25,     ///<  16xM HAD with step
642  DF_HADS32   = 26,     ///<  32xM HAD with step
643  DF_HADS64   = 27,     ///<  64xM HAD with step
644  DF_HADS16N  = 28,     ///< 16NxM HAD with step
645
646  DF_SSE_FRAME = 33     ///< Frame-based SSE
647};
648
649
650/// index for SBAC based RD optimization
651enum CI_IDX
652{
653  CI_CURR_BEST = 0,     ///< best mode index
654  CI_NEXT_BEST,         ///< next best index
655  CI_TEMP_BEST,         ///< temporal index
656  CI_CHROMA_INTRA,      ///< chroma intra index
657  CI_QT_TRAFO_TEST,
658  CI_QT_TRAFO_ROOT,
659  CI_NUM,               ///< total number
660};
661
662/// motion vector predictor direction used in AMVP
663enum MVP_DIR
664{
665  MD_LEFT = 0,          ///< MVP of left block
666  MD_ABOVE,             ///< MVP of above block
667  MD_ABOVE_RIGHT,       ///< MVP of above right block
668  MD_BELOW_LEFT,        ///< MVP of below left block
669  MD_ABOVE_LEFT         ///< MVP of above left block
670};
671
672/// motion vector prediction mode used in AMVP
673enum AMVP_MODE
674{
675  AM_NONE = 0,          ///< no AMVP mode
676  AM_EXPL,              ///< explicit signalling of motion vector index
677};
678
679/// interpolation filter type
680enum InterpFilterType
681{
682  IPF_SAMSUNG_DIF_DEFAULT = 0,          ///< Samsung DCT-based filter
683  IPF_HHI_4TAP_MOMS,                    ///< HHI 4-tap MOMS filter
684  IPF_HHI_6TAP_MOMS,                    ///< HHI 6-tap MOMS filter
685  IPF_LAST
686};
687
688#if QC_MDCS
689/// coefficient scanning type used in ACS
690enum COEFF_SCAN_TYPE
691{
692  SCAN_ZIGZAG = 0,      ///< typical zigzag scan
693  SCAN_HOR,             ///< horizontal first scan
694  SCAN_VER              ///< vertical first scan
695};
696#endif //QC_MDCS
697
698#endif
699
Note: See TracBrowser for help on using the repository browser.