source: 3DVCSoftware/branches/0.2-HHI/source/Lib/TLibCommon/TypeDef.h @ 20

Last change on this file since 20 was 20, checked in by hschwarz, 12 years ago

HHI+Sony modifications

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