source: SHVCSoftware/trunk/source/Lib/TLibDecoder/TDecCAVLC.h @ 774

Last change on this file since 774 was 713, checked in by seregin, 11 years ago

merge with SHM-6-dev

  • Property svn:eol-style set to native
File size: 6.7 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-2014, 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
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"
46#include "SyntaxElementParser.h"
47
48#if Q0048_CGS_3D_ASYMLUT
49class TCom3DAsymLUT;
50#endif
51//! \ingroup TLibDecoder
52//! \{
53
54// ====================================================================================================================
55// Class definition
56// ====================================================================================================================
57
58/// CAVLC decoder class
59class TDecCavlc : public SyntaxElementParser, public TDecEntropyIf
60{
61public:
62  TDecCavlc();
63  virtual ~TDecCavlc();
64 
65protected:
66  void  parseShortTermRefPicSet            (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx);
67 
68public:
69
70  /// rest entropy coder by intial QP and IDC in CABAC
71  Void  resetEntropy        ( TComSlice* /*pcSlice*/  )     { assert(0); };
72  Void  setBitstream        ( TComInputBitstream* p )   { m_pcBitstream = p; }
73  Void  parseTransformSubdivFlag( UInt& ruiSubdivFlag, UInt uiLog2TransformBlockSize );
74  Void  parseQtCbf          ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth, UInt uiDepth );
75  Void  parseQtRootCbf      ( UInt uiAbsPartIdx, UInt& uiQtRootCbf );
76  Void  parseVPS            ( TComVPS* pcVPS );
77#if SPS_EXTENSION
78#if VPS_EXTNS
79  Void  parseVPSExtension   ( TComVPS* pcVPS );
80  Void  defaultVPSExtension ( TComVPS* pcVPS );
81#endif
82
83#if VPS_VUI
84  Void  parseVPSVUI   ( TComVPS* pcVPS );
85  Void  defaultVPSVUI ( TComVPS* pcVPS );
86#endif
87#if REPN_FORMAT_IN_VPS
88  Void  parseRepFormat      ( RepFormat *repFormat, RepFormat *repFormatPrev );
89#endif
90#if VPS_DPB_SIZE_TABLE
91  Void  parseVpsDpbSizeTable( TComVPS *vps );
92#endif
93#if SPS_DPB_PARAMS
94  Void  parseSPS            ( TComSPS* pcSPS ); // it should be removed after macro clean up
95#else
96  Void  parseSPS            ( TComSPS* pcSPS, ParameterSetManagerDecoder *parameterSetManager );
97#endif
98  Void  parseSPSExtension    ( TComSPS* pcSPS );
99#else //SVC_EXTENSION
100  Void  parseSPS            ( TComSPS* pcSPS );
101#endif //SVC_EXTENSION
102  Void  parsePPS            ( TComPPS* pcPPS
103#if Q0048_CGS_3D_ASYMLUT
104    , TCom3DAsymLUT * pc3DAsymLUT , Int nLayerID
105#endif
106    );
107  Void  parseVUI            ( TComVUI* pcVUI, TComSPS* pcSPS );
108  Void  parseSEI            ( SEIMessages& );
109  Void  parsePTL            ( TComPTL *rpcPTL, Bool profilePresentFlag, Int maxNumSubLayersMinus1 );
110  Void  parseProfileTier    (ProfileTierLevel *ptl);
111  Void  parseHrdParameters  (TComHRD *hrd, Bool cprms_present_flag, UInt tempLevelHigh);
112  Void  parseSliceHeader    ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager);
113  Void  parseTerminatingBit ( UInt& ruiBit );
114 
115  Void  parseMVPIdx         ( Int& riMVPIdx );
116 
117  Void  parseSkipFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
118  Void  parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
119  Void parseMergeFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
120  Void parseMergeIndex      ( TComDataCU* pcCU, UInt& ruiMergeIndex );
121  Void parseSplitFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
122  Void parsePartSize        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
123  Void parsePredMode        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
124 
125  Void parseIntraDirLumaAng ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
126 
127  Void parseIntraDirChroma  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
128 
129  Void parseInterDir        ( TComDataCU* pcCU, UInt& ruiInterDir, UInt uiAbsPartIdx );
130  Void parseRefFrmIdx       ( TComDataCU* pcCU, Int& riRefFrmIdx,  RefPicList eRefList );
131  Void parseMvd             ( TComDataCU* pcCU, UInt uiAbsPartAddr,UInt uiPartIdx,    UInt uiDepth, RefPicList eRefList );
132 
133  Void parseDeltaQP         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
134  Void parseCoeffNxN        ( TComDataCU* pcCU, TCoeff* pcCoef, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt uiDepth, TextType eTType );
135  Void parseTransformSkipFlags ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt width, UInt height, UInt uiDepth, TextType eTType);
136
137  Void parseIPCMInfo        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth);
138
139  Void updateContextTables  ( SliceType /*eSliceType*/, Int /*iQp*/ ) { return; }
140
141  Void xParsePredWeightTable ( TComSlice* pcSlice );
142  Void  parseScalingList               ( TComScalingList* scalingList );
143  Void xDecodeScalingList    ( TComScalingList *scalingList, UInt sizeId, UInt listId);
144protected:
145  Bool  xMoreRbspData();
146
147#if Q0048_CGS_3D_ASYMLUT
148  Void xParse3DAsymLUT( TCom3DAsymLUT * pc3DAsymLUT );
149  Void xParse3DAsymLUTOctant( TCom3DAsymLUT * pc3DAsymLUT , Int nDepth , Int yIdx , Int uIdx , Int vIdx , Int nLength );
150#endif
151};
152
153//! \}
154
155#endif // !defined(AFX_TDECCAVLC_H__9732DD64_59B0_4A41_B29E_1A5B18821EAD__INCLUDED_)
156
Note: See TracBrowser for help on using the repository browser.