[313] | 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 |
---|
[1029] | 4 | * granted under this license. |
---|
[313] | 5 | * |
---|
[1259] | 6 | * Copyright (c) 2010-2015, ITU/ISO/IEC |
---|
[313] | 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 | |
---|
[1212] | 48 | #if CGS_3D_ASYMLUT |
---|
[713] | 49 | class TCom3DAsymLUT; |
---|
| 50 | #endif |
---|
[313] | 51 | //! \ingroup TLibDecoder |
---|
| 52 | //! \{ |
---|
| 53 | |
---|
| 54 | // ==================================================================================================================== |
---|
| 55 | // Class definition |
---|
| 56 | // ==================================================================================================================== |
---|
| 57 | |
---|
| 58 | /// CAVLC decoder class |
---|
| 59 | class TDecCavlc : public SyntaxElementParser, public TDecEntropyIf |
---|
| 60 | { |
---|
| 61 | public: |
---|
| 62 | TDecCavlc(); |
---|
| 63 | virtual ~TDecCavlc(); |
---|
[1029] | 64 | |
---|
[313] | 65 | protected: |
---|
[1029] | 66 | |
---|
| 67 | Void parseShortTermRefPicSet (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx); |
---|
| 68 | |
---|
[313] | 69 | public: |
---|
| 70 | |
---|
| 71 | /// rest entropy coder by intial QP and IDC in CABAC |
---|
| 72 | Void resetEntropy ( TComSlice* /*pcSlice*/ ) { assert(0); }; |
---|
| 73 | Void setBitstream ( TComInputBitstream* p ) { m_pcBitstream = p; } |
---|
| 74 | Void parseTransformSubdivFlag( UInt& ruiSubdivFlag, UInt uiLog2TransformBlockSize ); |
---|
[1029] | 75 | Void parseQtCbf ( class TComTU &rTu, const ComponentID compID, const Bool lowestLevel ); |
---|
[313] | 76 | Void parseQtRootCbf ( UInt uiAbsPartIdx, UInt& uiQtRootCbf ); |
---|
| 77 | Void parseVPS ( TComVPS* pcVPS ); |
---|
[1145] | 78 | Void parseSPS ( TComSPS* pcSPS ); |
---|
[1029] | 79 | #if !SVC_EXTENSION |
---|
| 80 | Void parsePPS ( TComPPS* pcPPS ); |
---|
[713] | 81 | #endif |
---|
[313] | 82 | Void parseVUI ( TComVUI* pcVUI, TComSPS* pcSPS ); |
---|
| 83 | Void parseSEI ( SEIMessages& ); |
---|
| 84 | Void parsePTL ( TComPTL *rpcPTL, Bool profilePresentFlag, Int maxNumSubLayersMinus1 ); |
---|
[1257] | 85 | Void parseProfileTier (ProfileTierLevel *ptl, const Bool bIsSubLayer); |
---|
[313] | 86 | Void parseHrdParameters (TComHRD *hrd, Bool cprms_present_flag, UInt tempLevelHigh); |
---|
[1235] | 87 | Void parseSliceHeader ( TComSlice* pcSlice, ParameterSetManager *parameterSetManager); |
---|
[313] | 88 | Void parseTerminatingBit ( UInt& ruiBit ); |
---|
[1029] | 89 | Void parseRemainingBytes ( Bool noTrailingBytesExpected ); |
---|
| 90 | |
---|
| 91 | Void parseMVPIdx ( Int& riMVPIdx ); |
---|
| 92 | |
---|
| 93 | Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
| 94 | Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
[313] | 95 | Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); |
---|
| 96 | Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex ); |
---|
| 97 | Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
| 98 | Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
| 99 | Void parsePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
[1029] | 100 | |
---|
[313] | 101 | Void parseIntraDirLumaAng ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
| 102 | Void parseIntraDirChroma ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
[1029] | 103 | |
---|
[313] | 104 | Void parseInterDir ( TComDataCU* pcCU, UInt& ruiInterDir, UInt uiAbsPartIdx ); |
---|
[1029] | 105 | Void parseRefFrmIdx ( TComDataCU* pcCU, Int& riRefFrmIdx, RefPicList eRefList ); |
---|
[313] | 106 | Void parseMvd ( TComDataCU* pcCU, UInt uiAbsPartAddr,UInt uiPartIdx, UInt uiDepth, RefPicList eRefList ); |
---|
[1029] | 107 | |
---|
| 108 | Void parseCrossComponentPrediction( class TComTU &rTu, ComponentID compID ); |
---|
| 109 | |
---|
[313] | 110 | Void parseDeltaQP ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
[1029] | 111 | Void parseChromaQpAdjustment( TComDataCU* cu, UInt absPartIdx, UInt depth); |
---|
[313] | 112 | |
---|
[1029] | 113 | Void parseCoeffNxN ( class TComTU &rTu, ComponentID compID ); |
---|
| 114 | |
---|
| 115 | Void parseTransformSkipFlags ( class TComTU &rTu, ComponentID component ); |
---|
| 116 | |
---|
[313] | 117 | Void parseIPCMInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth); |
---|
| 118 | |
---|
[1235] | 119 | Void xParsePredWeightTable ( TComSlice* pcSlice, const TComSPS *sps ); |
---|
[1029] | 120 | Void parseScalingList ( TComScalingList* scalingList ); |
---|
[313] | 121 | Void xDecodeScalingList ( TComScalingList *scalingList, UInt sizeId, UInt listId); |
---|
[1029] | 122 | |
---|
| 123 | Void parseExplicitRdpcmMode( TComTU &rTu, ComponentID compID ); |
---|
| 124 | |
---|
[313] | 125 | protected: |
---|
| 126 | Bool xMoreRbspData(); |
---|
[713] | 127 | |
---|
[1029] | 128 | #if SVC_EXTENSION |
---|
| 129 | public: |
---|
| 130 | Void parseVPSExtension ( TComVPS* pcVPS ); |
---|
| 131 | Void defaultVPSExtension ( TComVPS* pcVPS ); |
---|
| 132 | Void parseVPSVUI ( TComVPS* pcVPS ); |
---|
| 133 | Void defaultVPSVUI ( TComVPS* pcVPS ); |
---|
| 134 | Void parseRepFormat ( RepFormat *repFormat, RepFormat *repFormatPrev ); |
---|
| 135 | Void parseVpsDpbSizeTable( TComVPS *vps ); |
---|
| 136 | Void parseVpsVuiBspHrdParams( TComVPS *vps ); |
---|
| 137 | Void parseSPSExtension ( TComSPS* pcSPS ); |
---|
[1212] | 138 | #if CGS_3D_ASYMLUT |
---|
[1029] | 139 | Void parsePPS ( TComPPS* pcPPS, TCom3DAsymLUT * pc3DAsymLUT , Int nLayerID ); |
---|
| 140 | #else |
---|
| 141 | Void parsePPS ( TComPPS* pcPPS ); |
---|
| 142 | #endif |
---|
| 143 | |
---|
| 144 | protected: |
---|
[1212] | 145 | #if CGS_3D_ASYMLUT |
---|
[713] | 146 | Void xParse3DAsymLUT( TCom3DAsymLUT * pc3DAsymLUT ); |
---|
| 147 | Void xParse3DAsymLUTOctant( TCom3DAsymLUT * pc3DAsymLUT , Int nDepth , Int yIdx , Int uIdx , Int vIdx , Int nLength ); |
---|
[826] | 148 | Void xReadParam( Int& param, Int flc_bits ); |
---|
[713] | 149 | #endif |
---|
[1029] | 150 | #endif //SVC_EXTENSION |
---|
| 151 | |
---|
[313] | 152 | }; |
---|
| 153 | |
---|
| 154 | //! \} |
---|
| 155 | |
---|
| 156 | #endif // !defined(AFX_TDECCAVLC_H__9732DD64_59B0_4A41_B29E_1A5B18821EAD__INCLUDED_) |
---|