HEVC Test Model (HM)  HM-16.3
TDecCAVLC.h
Go to the documentation of this file.
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-2015, ITU/ISO/IEC
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions are met:
11  *
12  * * Redistributions of source code must retain the above copyright notice,
13  * this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  * * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
18  * be used to endorse or promote products derived from this software without
19  * specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
25  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31  * THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
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"
46 #include "SyntaxElementParser.h"
47 
50 
51 // ====================================================================================================================
52 // Class definition
53 // ====================================================================================================================
54 
57 {
58 public:
59  TDecCavlc();
60  virtual ~TDecCavlc();
61 
62 protected:
63 
65 
66 public:
67 
69  Void resetEntropy ( TComSlice* /*pcSlice*/ ) { assert(0); };
71  Void parseTransformSubdivFlag( UInt& ruiSubdivFlag, UInt uiLog2TransformBlockSize );
72  Void parseQtCbf ( class TComTU &rTu, const ComponentID compID, const Bool lowestLevel );
73  Void parseQtRootCbf ( UInt uiAbsPartIdx, UInt& uiQtRootCbf );
74  Void parseVPS ( TComVPS* pcVPS );
75  Void parseSPS ( TComSPS* pcSPS );
76  Void parsePPS ( TComPPS* pcPPS );
77  Void parseVUI ( TComVUI* pcVUI, TComSPS* pcSPS );
79  Void parsePTL ( TComPTL *rpcPTL, Bool profilePresentFlag, Int maxNumSubLayersMinus1 );
80  Void parseProfileTier (ProfileTierLevel *ptl, const Bool bIsSubLayer);
81  Void parseHrdParameters (TComHRD *hrd, Bool cprms_present_flag, UInt tempLevelHigh);
82  Void parseSliceHeader ( TComSlice* pcSlice, ParameterSetManager *parameterSetManager);
83  Void parseTerminatingBit ( UInt& ruiBit );
84  Void parseRemainingBytes ( Bool noTrailingBytesExpected );
85 
86  Void parseMVPIdx ( Int& riMVPIdx );
87 
88  Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
89  Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
90  Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
91  Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex );
92  Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
93  Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
94  Void parsePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
95 
96  Void parseIntraDirLumaAng ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
97  Void parseIntraDirChroma ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
98 
99  Void parseInterDir ( TComDataCU* pcCU, UInt& ruiInterDir, UInt uiAbsPartIdx );
100  Void parseRefFrmIdx ( TComDataCU* pcCU, Int& riRefFrmIdx, RefPicList eRefList );
101  Void parseMvd ( TComDataCU* pcCU, UInt uiAbsPartAddr,UInt uiPartIdx, UInt uiDepth, RefPicList eRefList );
102 
104 
105  Void parseDeltaQP ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
106  Void parseChromaQpAdjustment( TComDataCU* cu, UInt absPartIdx, UInt depth);
107 
108  Void parseCoeffNxN ( class TComTU &rTu, ComponentID compID );
109 
110  Void parseTransformSkipFlags ( class TComTU &rTu, ComponentID component );
111 
112  Void parseIPCMInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth);
113 
114  Void xParsePredWeightTable ( TComSlice* pcSlice, const TComSPS *sps );
115  Void parseScalingList ( TComScalingList* scalingList );
116  Void xDecodeScalingList ( TComScalingList *scalingList, UInt sizeId, UInt listId);
117 
119 
120 protected:
122 };
123 
125 
126 #endif // !defined(AFX_TDECCAVLC_H__9732DD64_59B0_4A41_B29E_1A5B18821EAD__INCLUDED_)
Void parseQtCbf(class TComTU &rTu, const ComponentID compID, const Bool lowestLevel)
Definition: TDecCAVLC.cpp:1763
Void parseSliceHeader(TComSlice *pcSlice, ParameterSetManager *parameterSetManager)
Definition: TDecCAVLC.cpp:918
CU data structure class.
Definition: TComDataCU.h:64
Void parseInterDir(TComDataCU *pcCU, UInt &ruiInterDir, UInt uiAbsPartIdx)
Definition: TDecCAVLC.cpp:1708
Void parsePPS(TComPPS *pcPPS)
Definition: TDecCAVLC.cpp:181
Void parseChromaQpAdjustment(TComDataCU *cu, UInt absPartIdx, UInt depth)
Definition: TDecCAVLC.cpp:1748
Void parseTerminatingBit(UInt &ruiBit)
Definition: TDecCAVLC.cpp:1620
void Void
Definition: TypeDef.h:285
Void parseCUTransquantBypassFlag(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Definition: TDecCAVLC.cpp:1660
Void xParsePredWeightTable(TComSlice *pcSlice, const TComSPS *sps)
parse explicit wp tables
Definition: TDecCAVLC.cpp:1793
virtual ~TDecCavlc()
Definition: TDecCAVLC.cpp:76
unsigned int UInt
Definition: TypeDef.h:297
Void parseTransformSubdivFlag(UInt &ruiSubdivFlag, UInt uiLog2TransformBlockSize)
Definition: TDecCAVLC.cpp:1758
Void parseSEI(SEIMessages &)
SCALING_LIST class.
Definition: TComSlice.h:150
CAVLC decoder class.
Definition: TDecCAVLC.h:56
Void parsePredMode(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Definition: TDecCAVLC.cpp:1680
Void parseVUI(TComVUI *pcVUI, TComSPS *pcSPS)
Definition: TDecCAVLC.cpp:410
Void parseDeltaQP(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Definition: TDecCAVLC.cpp:1728
entropy decoder pure class
Definition: TDecEntropy.h:61
Void parseQtRootCbf(UInt uiAbsPartIdx, UInt &uiQtRootCbf)
Definition: TDecCAVLC.cpp:1768
TComInputBitstream * m_pcBitstream
Void parseRefFrmIdx(TComDataCU *pcCU, Int &riRefFrmIdx, RefPicList eRefList)
Definition: TDecCAVLC.cpp:1713
Void parseMergeFlag(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx)
Definition: TDecCAVLC.cpp:1778
entropy decoder class (header)
Void setBitstream(TComInputBitstream *p)
Definition: TDecCAVLC.h:70
Void xDecodeScalingList(TComScalingList *scalingList, UInt sizeId, UInt listId)
Definition: TDecCAVLC.cpp:1972
Void parseScalingList(TComScalingList *scalingList)
Definition: TDecCAVLC.cpp:1915
bool Bool
Definition: TypeDef.h:286
Void parseRemainingBytes(Bool noTrailingBytesExpected)
Definition: TDecCAVLC.cpp:1634
Void parseVPS(TComVPS *pcVPS)
Definition: TDecCAVLC.cpp:826
Parsing functionality high level syntax.
PPS class.
Definition: TComSlice.h:977
Void parsePTL(TComPTL *rpcPTL, Bool profilePresentFlag, Int maxNumSubLayersMinus1)
Definition: TDecCAVLC.cpp:1512
Void parseCrossComponentPrediction(class TComTU &rTu, ComponentID compID)
Definition: TDecCAVLC.cpp:1723
RefPicList
reference list index
Definition: TypeDef.h:415
Void resetEntropy(TComSlice *)
rest entropy coder by intial QP and IDC in CABAC
Definition: TDecCAVLC.h:69
Void parseIntraDirChroma(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Definition: TDecCAVLC.cpp:1703
Void parsePartSize(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Definition: TDecCAVLC.cpp:1675
Definition: TComTU.h:48
Void parseSkipFlag(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Definition: TDecCAVLC.cpp:1655
Void parseMvd(TComDataCU *pcCU, UInt uiAbsPartAddr, UInt uiPartIdx, UInt uiDepth, RefPicList eRefList)
Definition: TDecCAVLC.cpp:1718
Void parseSPS(TComSPS *pcSPS)
Definition: TDecCAVLC.cpp:583
Void parseTransformSkipFlags(class TComTU &rTu, ComponentID component)
Definition: TDecCAVLC.cpp:1773
Void parseExplicitRdpcmMode(TComTU &rTu, ComponentID compID)
Definition: TDecCAVLC.cpp:2025
Void parseIntraDirLumaAng(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Definition: TDecCAVLC.cpp:1698
Void parseCoeffNxN(class TComTU &rTu, ComponentID compID)
Definition: TDecCAVLC.cpp:1753
Void parseHrdParameters(TComHRD *hrd, Bool cprms_present_flag, UInt tempLevelHigh)
Definition: TDecCAVLC.cpp:505
std::list< SEI * > SEIMessages
Definition: SEI.h:479
int Int
Definition: TypeDef.h:296
Bool xMoreRbspData()
Definition: TDecCAVLC.cpp:1996
ComponentID
Definition: TypeDef.h:368
Void parseSplitFlag(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Definition: TDecCAVLC.cpp:1670
Void parseShortTermRefPicSet(TComSPS *pcSPS, TComReferencePictureSet *pcRPS, Int idx)
Definition: TDecCAVLC.cpp:85
Void parseMVPIdx(Int &riMVPIdx)
Definition: TDecCAVLC.cpp:1665
Void parseProfileTier(ProfileTierLevel *ptl, const Bool bIsSubLayer)
Definition: TDecCAVLC.cpp:1550
Void parseMergeIndex(TComDataCU *pcCU, UInt &ruiMergeIndex)
Definition: TDecCAVLC.cpp:1783
Reference Picture Set class.
Definition: TComSlice.h:65
slice header class
Definition: TComSlice.h:1198
Void parseIPCMInfo(TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
Definition: TDecCAVLC.cpp:1693
SPS class.
Definition: TComSlice.h:722