[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 | * |
---|
[872] | 6 | * Copyright (c) 2010-2014, 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 | // ==================================================================================================================== |
---|
| 54 | |
---|
| 55 | /// CAVLC decoder class |
---|
[608] | 56 | class TDecCavlc : public SyntaxElementParser, public TDecEntropyIf |
---|
[2] | 57 | { |
---|
| 58 | public: |
---|
| 59 | TDecCavlc(); |
---|
| 60 | virtual ~TDecCavlc(); |
---|
| 61 | |
---|
| 62 | protected: |
---|
[56] | 63 | void parseShortTermRefPicSet (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx); |
---|
[2] | 64 | |
---|
[608] | 65 | #if H_3D |
---|
[2] | 66 | Int** m_aaiTempScale; |
---|
| 67 | Int** m_aaiTempOffset; |
---|
[608] | 68 | #endif |
---|
[964] | 69 | |
---|
[2] | 70 | public: |
---|
[56] | 71 | |
---|
| 72 | /// rest entropy coder by intial QP and IDC in CABAC |
---|
[608] | 73 | Void resetEntropy ( TComSlice* /*pcSlice*/ ) { assert(0); }; |
---|
[56] | 74 | Void setBitstream ( TComInputBitstream* p ) { m_pcBitstream = p; } |
---|
[2] | 75 | Void parseTransformSubdivFlag( UInt& ruiSubdivFlag, UInt uiLog2TransformBlockSize ); |
---|
| 76 | Void parseQtCbf ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth, UInt uiDepth ); |
---|
[608] | 77 | Void parseQtRootCbf ( UInt uiAbsPartIdx, UInt& uiQtRootCbf ); |
---|
[77] | 78 | Void parseVPS ( TComVPS* pcVPS ); |
---|
[622] | 79 | #if H_MV |
---|
| 80 | Void parseVPSExtension ( TComVPS* pcVPS ); |
---|
[738] | 81 | Void parseRepFormat ( Int i, TComRepFormat* curRepFormat, TComRepFormat* prevRepFormat ); |
---|
[622] | 82 | Void parseVPSVUI ( TComVPS* pcVPS ); |
---|
[964] | 83 | Void parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ); |
---|
[738] | 84 | Void parseDpbSize ( TComVPS* pcVPS ); |
---|
[964] | 85 | Void parseVpsVuiBspHrdParameters( TComVPS* pcVPS ); |
---|
[738] | 86 | #endif |
---|
[622] | 87 | |
---|
| 88 | #if H_MV |
---|
| 89 | Void parseSPSExtension ( TComSPS* pcSPS ); |
---|
| 90 | #endif |
---|
[608] | 91 | #if H_3D |
---|
[622] | 92 | Void parseVPSExtension2 ( TComVPS* pcVPS ); |
---|
| 93 | Void parseSPSExtension2 ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); |
---|
[608] | 94 | Void parseSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ); |
---|
[56] | 95 | #else |
---|
| 96 | Void parseSPS ( TComSPS* pcSPS ); |
---|
[2] | 97 | #endif |
---|
[758] | 98 | |
---|
[773] | 99 | #if H_3D |
---|
[758] | 100 | Void parsePPS ( TComPPS* pcPPS, TComVPS* pcVPS ); |
---|
| 101 | Void parsePPSExtension ( TComPPS* pcPPS, TComVPS* pcVPS ); |
---|
| 102 | #else |
---|
[608] | 103 | Void parsePPS ( TComPPS* pcPPS); |
---|
[758] | 104 | #endif |
---|
| 105 | |
---|
[608] | 106 | Void parseVUI ( TComVUI* pcVUI, TComSPS* pcSPS ); |
---|
| 107 | Void parseSEI ( SEIMessages& ); |
---|
| 108 | Void parsePTL ( TComPTL *rpcPTL, Bool profilePresentFlag, Int maxNumSubLayersMinus1 ); |
---|
| 109 | Void parseProfileTier (ProfileTierLevel *ptl); |
---|
| 110 | Void parseHrdParameters (TComHRD *hrd, Bool cprms_present_flag, UInt tempLevelHigh); |
---|
[976] | 111 | #if H_MV |
---|
[964] | 112 | Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx); |
---|
| 113 | #else |
---|
[608] | 114 | Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager); |
---|
[964] | 115 | #endif |
---|
[2] | 116 | Void parseTerminatingBit ( UInt& ruiBit ); |
---|
| 117 | |
---|
[56] | 118 | Void parseMVPIdx ( Int& riMVPIdx ); |
---|
[2] | 119 | |
---|
| 120 | Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
[608] | 121 | Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
| 122 | Void parseMergeFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ); |
---|
| 123 | Void parseMergeIndex ( TComDataCU* pcCU, UInt& ruiMergeIndex ); |
---|
| 124 | #if H_3D_ARP |
---|
| 125 | Void parseARPW ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
| 126 | #endif |
---|
| 127 | #if H_3D_IC |
---|
[189] | 128 | Void parseICFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
| 129 | #endif |
---|
[655] | 130 | #if H_3D_INTER_SDC |
---|
[833] | 131 | Void parseDeltaDC ( TComDataCU* pcCU, UInt absPartIdx, UInt depth ); |
---|
| 132 | Void parseSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
[5] | 133 | #endif |
---|
[833] | 134 | #if H_3D_DBBP |
---|
| 135 | Void parseDBBPFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
| 136 | #endif |
---|
[2] | 137 | Void parseSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
| 138 | Void parsePartSize ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
| 139 | Void parsePredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
| 140 | |
---|
| 141 | Void parseIntraDirLumaAng ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
| 142 | |
---|
| 143 | Void parseIntraDirChroma ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
| 144 | |
---|
[608] | 145 | Void parseInterDir ( TComDataCU* pcCU, UInt& ruiInterDir, UInt uiAbsPartIdx ); |
---|
| 146 | Void parseRefFrmIdx ( TComDataCU* pcCU, Int& riRefFrmIdx, RefPicList eRefList ); |
---|
[2] | 147 | Void parseMvd ( TComDataCU* pcCU, UInt uiAbsPartAddr,UInt uiPartIdx, UInt uiDepth, RefPicList eRefList ); |
---|
| 148 | |
---|
| 149 | Void parseDeltaQP ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); |
---|
| 150 | Void parseCoeffNxN ( TComDataCU* pcCU, TCoeff* pcCoef, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt uiDepth, TextType eTType ); |
---|
[608] | 151 | Void parseTransformSkipFlags ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt width, UInt height, UInt uiDepth, TextType eTType); |
---|
| 152 | |
---|
[56] | 153 | Void parseIPCMInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth); |
---|
| 154 | |
---|
[608] | 155 | Void updateContextTables ( SliceType /*eSliceType*/, Int /*iQp*/ ) { return; } |
---|
[2] | 156 | |
---|
[56] | 157 | Void xParsePredWeightTable ( TComSlice* pcSlice ); |
---|
| 158 | Void parseScalingList ( TComScalingList* scalingList ); |
---|
| 159 | Void xDecodeScalingList ( TComScalingList *scalingList, UInt sizeId, UInt listId); |
---|
| 160 | protected: |
---|
| 161 | Bool xMoreRbspData(); |
---|
| 162 | }; |
---|
[2] | 163 | |
---|
[56] | 164 | //! \} |
---|
| 165 | |
---|
[2] | 166 | #endif // !defined(AFX_TDECCAVLC_H__9732DD64_59B0_4A41_B29E_1A5B18821EAD__INCLUDED_) |
---|
| 167 | |
---|