source: 3DVCSoftware/trunk/source/Lib/TLibDecoder/TDecCAVLC.h @ 1191

Last change on this file since 1191 was 1179, checked in by tech, 10 years ago

Merged branch 13.1-dev0@1178.

  • Property svn:eol-style set to native
File size: 7.7 KB
RevLine 
[5]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
[56]4 * granted under this license. 
[5]5 *
[1179]6* Copyright (c) 2010-2015, ITU/ISO/IEC
[5]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.
[56]17 *  * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
[5]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 */
[2]33
34/** \file     TDecCAVLC.h
35    \brief    CAVLC decoder class (header)
36*/
37
38#ifndef __TDECCAVLC__
39#define __TDECCAVLC__
40
41#if _MSC_VER > 1000
42#pragma once
43#endif // _MSC_VER > 1000
44
45#include "TDecEntropy.h"
[608]46#include "SyntaxElementParser.h"
[2]47
[56]48//! \ingroup TLibDecoder
49//! \{
50
[2]51// ====================================================================================================================
52// Class definition
53// ====================================================================================================================
[1179]54#if H_3D_ANNEX_SELECTION_FIX
55class TDecTop;
56#endif
[2]57
58/// CAVLC decoder class
[608]59class TDecCavlc : public SyntaxElementParser, public TDecEntropyIf
[2]60{
61public:
62  TDecCavlc();
63  virtual ~TDecCavlc();
64 
65protected:
[56]66  void  parseShortTermRefPicSet            (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx);
[2]67 
[1179]68
69#if !HHI_CAM_PARA_K0052
[608]70#if H_3D
[2]71  Int**    m_aaiTempScale;
72  Int**    m_aaiTempOffset;
[608]73#endif
[1179]74#endif
75#if H_3D_ANNEX_SELECTION_FIX
76  TDecTop*  m_decTop;
77#endif
[964]78
[1179]79
[2]80public:
[56]81
82  /// rest entropy coder by intial QP and IDC in CABAC
[608]83  Void  resetEntropy        ( TComSlice* /*pcSlice*/  )     { assert(0); };
[56]84  Void  setBitstream        ( TComInputBitstream* p )   { m_pcBitstream = p; }
[2]85  Void  parseTransformSubdivFlag( UInt& ruiSubdivFlag, UInt uiLog2TransformBlockSize );
86  Void  parseQtCbf          ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth, UInt uiDepth );
[608]87  Void  parseQtRootCbf      ( UInt uiAbsPartIdx, UInt& uiQtRootCbf );
[77]88  Void  parseVPS            ( TComVPS* pcVPS );
[622]89#if H_MV
90  Void  parseVPSExtension   ( TComVPS* pcVPS ); 
[738]91  Void  parseRepFormat      ( Int i, TComRepFormat* curRepFormat, TComRepFormat* prevRepFormat );
[622]92  Void  parseVPSVUI         ( TComVPS* pcVPS );
[964]93  Void  parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ); 
[738]94  Void  parseDpbSize        ( TComVPS* pcVPS ); 
[964]95  Void  parseVpsVuiBspHrdParameters( TComVPS* pcVPS ); 
[738]96#endif
[622]97
98#if H_MV
99  Void  parseSPSExtension   ( TComSPS* pcSPS ); 
100#endif
[608]101#if H_3D
[1124]102  Void  parseVPS3dExtension  ( TComVPS* pcVPS ); 
103  Void  parseSPS3dExtension ( TComSPS* pcSPS );
104  Void  parseSPS            ( TComSPS* pcSPS );
105#else
[56]106  Void  parseSPS            ( TComSPS* pcSPS );
[2]107#endif
[758]108
[1066]109#if H_MV
110  Void  parsePPSMultilayerExtension( TComPPS* pcPPS );
111#endif
112
113
[773]114#if H_3D
[758]115  Void  parsePPS            ( TComPPS* pcPPS, TComVPS* pcVPS );
116  Void  parsePPSExtension   ( TComPPS* pcPPS, TComVPS* pcVPS );
117#else
[608]118  Void  parsePPS            ( TComPPS* pcPPS);
[758]119#endif
[1179]120#if H_3D_ANNEX_SELECTION_FIX
121  Void  setDecTop           ( TDecTop* decTop ) { m_decTop = decTop; }; 
122#endif
[608]123  Void  parseVUI            ( TComVUI* pcVUI, TComSPS* pcSPS );
124  Void  parseSEI            ( SEIMessages& );
125  Void  parsePTL            ( TComPTL *rpcPTL, Bool profilePresentFlag, Int maxNumSubLayersMinus1 );
126  Void  parseProfileTier    (ProfileTierLevel *ptl);
127  Void  parseHrdParameters  (TComHRD *hrd, Bool cprms_present_flag, UInt tempLevelHigh);
[976]128#if H_MV
[964]129  Void  parseSliceHeader    ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx);
130#else
[608]131  Void  parseSliceHeader    ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager);
[964]132#endif
[2]133  Void  parseTerminatingBit ( UInt& ruiBit );
134 
[56]135  Void  parseMVPIdx         ( Int& riMVPIdx );
[2]136 
137  Void  parseSkipFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
[1179]138#if SEC_DEPTH_INTRA_SKIP_MODE_K0033
139  Void  parseDIS            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
140#else
[1084]141#if H_3D_SINGLE_DEPTH
[1039]142  Void  parseSingleDepthMode        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
[1179]143#endif
144#endif
[608]145  Void  parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
146  Void parseMergeFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
147  Void parseMergeIndex      ( TComDataCU* pcCU, UInt& ruiMergeIndex );
148#if H_3D_ARP
149  Void parseARPW            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
150#endif
151#if H_3D_IC
[189]152  Void  parseICFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
153#endif
[655]154#if H_3D_INTER_SDC
[833]155  Void  parseDeltaDC        ( TComDataCU* pcCU, UInt absPartIdx, UInt depth );
156  Void  parseSDCFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
[5]157#endif
[833]158#if H_3D_DBBP
159  Void  parseDBBPFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
160#endif
[2]161  Void parseSplitFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
162  Void parsePartSize        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
163  Void parsePredMode        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
164 
165  Void parseIntraDirLumaAng ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
166 
167  Void parseIntraDirChroma  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
168 
[608]169  Void parseInterDir        ( TComDataCU* pcCU, UInt& ruiInterDir, UInt uiAbsPartIdx );
170  Void parseRefFrmIdx       ( TComDataCU* pcCU, Int& riRefFrmIdx,  RefPicList eRefList );
[2]171  Void parseMvd             ( TComDataCU* pcCU, UInt uiAbsPartAddr,UInt uiPartIdx,    UInt uiDepth, RefPicList eRefList );
172 
173  Void parseDeltaQP         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
174  Void parseCoeffNxN        ( TComDataCU* pcCU, TCoeff* pcCoef, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt uiDepth, TextType eTType );
[608]175  Void parseTransformSkipFlags ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt width, UInt height, UInt uiDepth, TextType eTType);
176
[56]177  Void parseIPCMInfo        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth);
178
[608]179  Void updateContextTables  ( SliceType /*eSliceType*/, Int /*iQp*/ ) { return; }
[2]180
[56]181  Void xParsePredWeightTable ( TComSlice* pcSlice );
182  Void  parseScalingList               ( TComScalingList* scalingList );
183  Void xDecodeScalingList    ( TComScalingList *scalingList, UInt sizeId, UInt listId);
[1179]184
185#if H_3D_ANNEX_SELECTION_FIX
186  TDecTop*  getDecTop()      { return m_decTop; };
187#endif
188
[56]189protected:
190  Bool  xMoreRbspData();
191};
[2]192
[56]193//! \}
194
[2]195#endif // !defined(AFX_TDECCAVLC_H__9732DD64_59B0_4A41_B29E_1A5B18821EAD__INCLUDED_)
196
Note: See TracBrowser for help on using the repository browser.