source: 3DVCSoftware/trunk/source/Lib/TLibCommon/TypeDef.h @ 42

Last change on this file since 42 was 42, checked in by tech, 12 years ago

Nokia (Flexible Coding Order)
Ericsson ( High Level Syntax )
changes

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