source: 3DVCSoftware/branches/HTM-11.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp @ 1029

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

Merged 11.2-dev1-MediaTek@1004.

  • Property svn:eol-style set to native
File size: 32.4 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     TDecEntropy.cpp
35    \brief    entropy decoder class
36*/
37
38#include "TDecEntropy.h"
39
40//! \ingroup TLibDecoder
41//! \{
42
43Void TDecEntropy::setEntropyDecoder         ( TDecEntropyIf* p )
44{
45  m_pcEntropyDecoderIf = p;
46}
47
48#include "TLibCommon/TComSampleAdaptiveOffset.h"
49
50Void TDecEntropy::decodeSkipFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
51{
52  m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
53}
54#if MTK_SINGLE_DEPTH_MODE_I0095
55Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
56{
57  if ( !pcCU->getSlice()->getIsDepth() )
58  {
59    return;
60  }
61  if(!pcCU->getSlice()->getApplySingleDepthMode())
62  {
63     return;
64  }
65  m_pcEntropyDecoderIf->parseSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );
66}
67#endif
68Void TDecEntropy::decodeCUTransquantBypassFlag(TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
69{
70  m_pcEntropyDecoderIf->parseCUTransquantBypassFlag( pcCU, uiAbsPartIdx, uiDepth );
71}
72
73/** decode merge flag
74 * \param pcSubCU
75 * \param uiAbsPartIdx
76 * \param uiDepth
77 * \param uiPUIdx
78 * \returns Void
79 */
80Void TDecEntropy::decodeMergeFlag( TComDataCU* pcSubCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx )
81{ 
82  // at least one merge candidate exists
83  m_pcEntropyDecoderIf->parseMergeFlag( pcSubCU, uiAbsPartIdx, uiDepth, uiPUIdx );
84}
85
86/** decode merge index
87 * \param pcCU
88 * \param uiPartIdx
89 * \param uiAbsPartIdx
90 * \param puhInterDirNeighbours pointer to list of inter direction from the casual neighbours
91 * \param pcMvFieldNeighbours pointer to list of motion vector field from the casual neighbours
92 * \param uiDepth
93 * \returns Void
94 */
95Void TDecEntropy::decodeMergeIndex( TComDataCU* pcCU, UInt uiPartIdx, UInt uiAbsPartIdx, UInt uiDepth )
96{
97  UInt uiMergeIndex = 0;
98  m_pcEntropyDecoderIf->parseMergeIndex( pcCU, uiMergeIndex );
99  pcCU->setMergeIndexSubParts( uiMergeIndex, uiAbsPartIdx, uiPartIdx, uiDepth );
100}
101
102#if H_3D_ARP
103Void TDecEntropy::decodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
104{
105  if( !pcCU->getSlice()->getARPStepNum() || pcCU->isIntra( uiAbsPartIdx ) )
106  {
107    return;
108  }
109
110  if( pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N )
111  {
112    pcCU->setARPWSubParts( 0 , uiAbsPartIdx, uiDepth );
113  }
114  else
115  {
116    m_pcEntropyDecoderIf->parseARPW( pcCU , uiAbsPartIdx , uiDepth );
117  }
118}
119#endif
120
121#if H_3D_IC
122Void TDecEntropy::decodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
123{
124  pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
125
126  if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 )
127  {
128    return;
129  }
130
131  if( !pcCU->getSlice()->getApplyIC() )
132    return;
133
134  if( pcCU->isICFlagRequired( uiAbsPartIdx ) )
135    m_pcEntropyDecoderIf->parseICFlag( pcCU, uiAbsPartIdx, uiDepth );
136}
137#endif
138
139Void TDecEntropy::decodeSplitFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
140{
141  m_pcEntropyDecoderIf->parseSplitFlag( pcCU, uiAbsPartIdx, uiDepth );
142}
143
144Void TDecEntropy::decodePredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
145{
146  m_pcEntropyDecoderIf->parsePredMode( pcCU, uiAbsPartIdx, uiDepth );
147}
148
149Void TDecEntropy::decodePartSize( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
150{
151  m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth );
152 
153#if H_3D_DBBP
154
155#if SEC_DBBP_EXPLICIT_SIG_I0077
156#if SEC_DBBP_DISALLOW_8x8_I0078
157  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 )
158#else
159  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) )
160#endif
161#else
162#if SEC_DBBP_DISALLOW_8x8_I0078
163  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getWidth(uiAbsPartIdx) > 8 )
164#else
165  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) )
166#endif
167#endif
168  {
169    decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth);
170#if !SEC_DBBP_EXPLICIT_SIG_I0077   
171    if( pcCU->getDBBPFlag(uiAbsPartIdx) )
172    {
173     
174      // get collocated depth block
175      UInt uiDepthStride = 0;
176      Pel* pDepthPels = NULL;
177      pDepthPels = pcCU->getVirtualDepthBlock(uiAbsPartIdx, pcCU->getWidth(uiAbsPartIdx), pcCU->getHeight(uiAbsPartIdx), uiDepthStride);
178     
179      AOF( pDepthPels != NULL );
180      AOF( uiDepthStride != 0 );
181     
182      // derive true partitioning for this CU based on depth
183      // (needs to be done in parsing process as motion vector predictors are also derived during parsing)
184      PartSize eVirtualPartSize = m_pcPrediction->getPartitionSizeFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(uiAbsPartIdx));
185      AOF( eVirtualPartSize != SIZE_NONE );
186     
187      pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth);
188     
189      // make sure that DBBP flag is set for both segments
190      UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;
191      pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth);
192      pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx+uiPUOffset, 1, uiDepth);
193    }
194#endif
195  }
196#endif
197}
198
199Void TDecEntropy::decodePredInfo    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU )
200{
201  if( pcCU->isIntra( uiAbsPartIdx ) )                                 // If it is Intra mode, encode intra prediction mode.
202  {
203    decodeIntraDirModeLuma  ( pcCU, uiAbsPartIdx, uiDepth );
204#if H_3D_DIM_SDC
205    if(!pcCU->getSDCFlag(uiAbsPartIdx))
206#endif
207    decodeIntraDirModeChroma( pcCU, uiAbsPartIdx, uiDepth );
208  }
209  else                                                                // if it is Inter mode, encode motion vector and reference index
210  {
211    decodePUWise( pcCU, uiAbsPartIdx, uiDepth, pcSubCU );
212  }
213}
214
215/** Parse I_PCM information.
216 * \param pcCU  pointer to CUpointer to CU
217 * \param uiAbsPartIdx CU index
218 * \param uiDepth CU depth
219 * \returns Void
220 */
221Void TDecEntropy::decodeIPCMInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
222{
223  if(!pcCU->getSlice()->getSPS()->getUsePCM()
224    || pcCU->getWidth(uiAbsPartIdx) > (1<<pcCU->getSlice()->getSPS()->getPCMLog2MaxSize())
225    || pcCU->getWidth(uiAbsPartIdx) < (1<<pcCU->getSlice()->getSPS()->getPCMLog2MinSize()) )
226  {
227    return;
228  }
229 
230  m_pcEntropyDecoderIf->parseIPCMInfo( pcCU, uiAbsPartIdx, uiDepth );
231}
232
233Void TDecEntropy::decodeIntraDirModeLuma  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
234{
235  m_pcEntropyDecoderIf->parseIntraDirLumaAng( pcCU, uiAbsPartIdx, uiDepth );
236}
237
238Void TDecEntropy::decodeIntraDirModeChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
239{
240  m_pcEntropyDecoderIf->parseIntraDirChroma( pcCU, uiAbsPartIdx, uiDepth );
241}
242
243/** decode motion information for every PU block.
244 * \param pcCU
245 * \param uiAbsPartIdx
246 * \param uiDepth
247 * \param pcSubCU
248 * \returns Void
249 */
250Void TDecEntropy::decodePUWise( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU )
251{
252  PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
253  UInt uiNumPU = ( ePartSize == SIZE_2Nx2N ? 1 : ( ePartSize == SIZE_NxN ? 4 : 2 ) );
254  UInt uiPUOffset = ( g_auiPUOffset[UInt( ePartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;
255
256#if H_3D_IV_MERGE
257  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists
258  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM];
259#else
260  TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists
261  UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
262#endif
263#if H_3D_SPIVMP
264  Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
265  TComMvField*  pcMvFieldSP;
266  UChar* puhInterDirSP;
267  pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2]; 
268  puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()]; 
269#endif
270  for ( UInt ui = 0; ui < pcCU->getSlice()->getMaxNumMergeCand(); ui++ )
271  {
272    uhInterDirNeighbours[ui] = 0;
273  }
274  Int numValidMergeCand = 0;
275  Bool isMerged = false;
276
277  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
278  pcSubCU->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 );
279#if H_3D_IV_MERGE
280  pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx);
281#endif
282  for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset )
283  {
284#if H_MV_ENC_DEC_TRAC
285    DTRACE_PU_S("=========== prediction_unit ===========\n")
286    // ToDo:
287    //DTRACE_PU("x0", uiLPelX)
288    //DTRACE_PU("x1", uiTPelY)
289#endif
290    decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
291    if ( pcCU->getMergeFlag( uiSubPartIdx ) )
292    {
293      decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
294      UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
295#if H_3D_ARP
296      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
297#endif
298#if H_3D_IC
299      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
300#endif
301#if H_3D_DBBP
302      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )
303#else
304      if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 ) 
305#endif
306      {
307        pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
308        if ( !isMerged )
309        {
310#if H_3D_VSP
311          Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
312          memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
313          InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
314#if H_3D_SPIVMP
315          memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
316#endif
317          pcSubCU->initAvailableFlags();
318          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
319          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours
320            , inheritedVSPDisInfo
321#if H_3D_SPIVMP
322            , pcMvFieldSP, puhInterDirSP
323#endif
324            , numValidMergeCand );
325          pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
326#if H_3D_SPIVMP
327            , bSPIVMPFlag
328#endif
329            , numValidMergeCand );
330          pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
331
332          if(vspFlag[uiMergeIndex])
333          {
334            pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth);
335          }
336#else
337#if H_3D
338          pcSubCU->initAvailableFlags();
339          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
340          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
341
342#else
343          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
344#endif
345#endif
346          isMerged = true;
347        }
348        pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth );
349      }
350      else
351      {
352        uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
353#if H_3D_VSP
354        Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
355        memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
356        InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
357#if H_3D_SPIVMP
358        memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
359#endif
360        pcSubCU->initAvailableFlags();
361        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
362        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours
363          , inheritedVSPDisInfo
364#if H_3D_SPIVMP
365          , pcMvFieldSP, puhInterDirSP
366#endif
367          ,numValidMergeCand, uiMergeIndex );
368        pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag
369#if H_3D_SPIVMP
370          , bSPIVMPFlag
371#endif
372          ,numValidMergeCand );
373        pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
374        if(vspFlag[uiMergeIndex])
375        {
376          pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeIndex].m_acDvInfo, uiSubPartIdx, uiPartIdx, uiDepth);
377        }
378#else
379#if H_3D
380        pcSubCU->initAvailableFlags();
381        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
382        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
383#else
384        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
385#endif
386#endif
387      }
388      pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
389
390#if H_3D_DDD
391      if( uiMergeIndex == pcSubCU->getUseDDDCandIdx() )
392      {
393          assert( pcCU->getSlice()->getViewIndex() != 0 );
394          pcCU->setUseDDD( true, uiSubPartIdx, uiPartIdx, uiDepth );
395          pcCU->setDDDepthSubParts( pcSubCU->getDDTmpDepth(),uiSubPartIdx, uiPartIdx, uiDepth );
396      }
397      else
398      {
399          pcCU->setUseDDD( false, uiSubPartIdx, uiPartIdx, uiDepth );
400      }
401#endif
402
403      TComMv cTmpMv( 0, 0 );
404      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
405      {       
406        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
407        {
408          pcCU->setMVPIdxSubParts( 0, RefPicList( uiRefListIdx ), uiSubPartIdx, uiPartIdx, uiDepth);
409          pcCU->setMVPNumSubParts( 0, RefPicList( uiRefListIdx ), uiSubPartIdx, uiPartIdx, uiDepth);
410          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
411          pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx );
412#if H_3D_VSP
413#if H_3D_DBBP
414          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) )
415#else
416          if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 )
417#endif
418          {
419            if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) )
420            {
421              UInt dummy;
422              Int vspSize;
423              Int width, height;
424              pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 );
425              pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize );
426              pcCU->setVSPFlag( uiSubPartIdx, vspSize );
427            }
428          }
429#endif
430        }
431      }
432#if H_3D_SPIVMP
433      pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 
434      if (bSPIVMPFlag[uiMergeIndex] != 0)
435      {
436        Int iWidth, iHeight;
437        UInt uiIdx;
438        pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true );
439
440        UInt uiSPAddr;
441
442        Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
443
444        pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
445
446        for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++)
447        {
448          pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr);
449          pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight);
450          pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight);
451          pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight);
452        }
453      }
454#endif
455    }
456    else
457    {
458      decodeInterDirPU( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
459      for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
460      {       
461        if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
462        {
463          decodeRefFrmIdxPU( pcCU,    uiSubPartIdx,              uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
464          decodeMvdPU      ( pcCU,    uiSubPartIdx,              uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
465          decodeMVPIdxPU   ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) );
466        }
467      }
468#if H_3D_ARP
469      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
470#endif
471#if H_3D_IC
472      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
473#endif
474    }
475#if H_3D_VSP
476    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) && (pcCU->getVSPFlag(uiSubPartIdx) == 0))
477#else
478    if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) )
479#endif
480    {
481      pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMv( TComMv(0,0), ePartSize, uiSubPartIdx, uiDepth, uiPartIdx);
482      pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllRefIdx( -1, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx);
483      pcCU->setInterDirSubParts( 1, uiSubPartIdx, uiPartIdx, uiDepth);
484    }
485  }
486#if H_3D_SPIVMP
487  delete[] pcMvFieldSP;
488  delete[] puhInterDirSP;
489#endif
490  return;
491}
492
493/** decode inter direction for a PU block
494 * \param pcCU
495 * \param uiAbsPartIdx
496 * \param uiDepth
497 * \param uiPartIdx
498 * \returns Void
499 */
500Void TDecEntropy::decodeInterDirPU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx )
501{
502  UInt uiInterDir;
503
504  if ( pcCU->getSlice()->isInterP() )
505  {
506    uiInterDir = 1;
507  }
508  else
509  {
510    m_pcEntropyDecoderIf->parseInterDir( pcCU, uiInterDir, uiAbsPartIdx );
511  }
512
513  pcCU->setInterDirSubParts( uiInterDir, uiAbsPartIdx, uiPartIdx, uiDepth );
514}
515
516Void TDecEntropy::decodeRefFrmIdxPU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
517{
518  Int iRefFrmIdx = 0;
519  Int iParseRefFrmIdx = pcCU->getInterDir( uiAbsPartIdx ) & ( 1 << eRefList );
520
521  if ( pcCU->getSlice()->getNumRefIdx( eRefList ) > 1 && iParseRefFrmIdx )
522  {
523    m_pcEntropyDecoderIf->parseRefFrmIdx( pcCU, iRefFrmIdx, eRefList );
524  }
525  else if ( !iParseRefFrmIdx )
526  {
527    iRefFrmIdx = NOT_VALID;
528  }
529  else
530  {
531    iRefFrmIdx = 0;
532  }
533
534  PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
535  pcCU->getCUMvField( eRefList )->setAllRefIdx( iRefFrmIdx, ePartSize, uiAbsPartIdx, uiDepth, uiPartIdx );
536}
537
538/** decode motion vector difference for a PU block
539 * \param pcCU
540 * \param uiAbsPartIdx
541 * \param uiDepth
542 * \param uiPartIdx
543 * \param eRefList
544 * \returns Void
545 */
546Void TDecEntropy::decodeMvdPU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
547{
548  if ( pcCU->getInterDir( uiAbsPartIdx ) & ( 1 << eRefList ) )
549  {
550    m_pcEntropyDecoderIf->parseMvd( pcCU, uiAbsPartIdx, uiPartIdx, uiDepth, eRefList );
551  }
552}
553
554Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList )
555{
556  Int iMVPIdx = -1;
557
558  TComMv cZeroMv( 0, 0 );
559  TComMv cMv     = cZeroMv;
560  Int    iRefIdx = -1;
561
562  TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList );
563  AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo();
564
565  iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr);
566  cMv = cZeroMv;
567
568  if ( (pcSubCU->getInterDir(uiPartAddr) & ( 1 << eRefList )) )
569  {
570    m_pcEntropyDecoderIf->parseMVPIdx( iMVPIdx );
571#if H_MV_ENC_DEC_TRAC
572#if ENC_DEC_TRACE
573    if ( eRefList == REF_PIC_LIST_0 )
574    {
575      DTRACE_PU("mvp_l0_flag", iMVPIdx)
576    }
577    else
578    {
579      DTRACE_PU("mvp_l1_flag", iMVPIdx)
580    }
581#endif
582#endif
583  }
584  pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo);
585  pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth);
586  pcSubCU->setMVPIdxSubParts( iMVPIdx, eRefList, uiPartAddr, uiPartIdx, uiDepth );
587  if ( iRefIdx >= 0 )
588  {
589    m_pcPrediction->getMvPredAMVP( pcSubCU, uiPartIdx, uiPartAddr, eRefList, cMv);
590    cMv += pcSubCUMvField->getMvd( uiPartAddr );
591  }
592
593  PartSize ePartSize = pcSubCU->getPartitionSize( uiPartAddr );
594  pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx);
595}
596
597Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU)
598{
599  UInt uiSubdiv;
600  const UInt uiLog2TrafoSize = g_aucConvertToBit[pcCU->getSlice()->getSPS()->getMaxCUWidth()]+2 - uiDepth;
601
602  if(uiTrIdx==0)
603  {
604    m_bakAbsPartIdxCU = uiAbsPartIdx;
605  }
606  if( uiLog2TrafoSize == 2 )
607  {
608    UInt partNum = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 );
609    if( ( uiAbsPartIdx % partNum ) == 0 )
610    {
611      m_uiBakAbsPartIdx   = uiAbsPartIdx;
612      m_uiBakChromaOffset = offsetChroma;
613    }
614  }
615  if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && uiDepth == pcCU->getDepth(uiAbsPartIdx) )
616  {
617    uiSubdiv = 1;
618  }
619  else if( (pcCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthInter() == 1) && (pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER) && ( pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) && (uiDepth == pcCU->getDepth(uiAbsPartIdx)) )
620  {
621    uiSubdiv = (uiLog2TrafoSize > quadtreeTULog2MinSizeInCU);
622  }
623  else if( uiLog2TrafoSize > pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() )
624  {
625    uiSubdiv = 1;
626  }
627  else if( uiLog2TrafoSize == pcCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() )
628  {
629    uiSubdiv = 0;
630  }
631  else if( uiLog2TrafoSize == quadtreeTULog2MinSizeInCU )
632  {
633    uiSubdiv = 0;
634  }
635  else
636  {
637    assert( uiLog2TrafoSize > quadtreeTULog2MinSizeInCU );
638    m_pcEntropyDecoderIf->parseTransformSubdivFlag( uiSubdiv, 5 - uiLog2TrafoSize );
639  }
640 
641  const UInt uiTrDepth = uiDepth - pcCU->getDepth( uiAbsPartIdx );
642  {
643    const Bool bFirstCbfOfCU = uiTrDepth == 0;
644    if( bFirstCbfOfCU )
645    {
646      pcCU->setCbfSubParts( 0, TEXT_CHROMA_U, uiAbsPartIdx, uiDepth );
647      pcCU->setCbfSubParts( 0, TEXT_CHROMA_V, uiAbsPartIdx, uiDepth );
648    }
649    if( bFirstCbfOfCU || uiLog2TrafoSize > 2 )
650    {
651      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )
652      {
653        m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth );
654      }
655      if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )
656      {
657        m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );
658      }
659    }
660    else
661    {
662      pcCU->setCbfSubParts( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) << uiTrDepth, TEXT_CHROMA_U, uiAbsPartIdx, uiDepth );
663      pcCU->setCbfSubParts( pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) << uiTrDepth, TEXT_CHROMA_V, uiAbsPartIdx, uiDepth );
664    }
665  }
666 
667  if( uiSubdiv )
668  {
669    UInt size;
670    width  >>= 1;
671    height >>= 1;
672    size = width*height;
673    uiTrIdx++;
674    ++uiDepth;
675    const UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1);
676    const UInt uiStartAbsPartIdx = uiAbsPartIdx;
677    UInt uiYCbf = 0;
678    UInt uiUCbf = 0;
679    UInt uiVCbf = 0;
680   
681    for( Int i = 0; i < 4; i++ )
682    {
683      xDecodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP, quadtreeTULog2MinSizeInCU );
684      uiYCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrDepth+1 );
685      uiUCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth+1 );
686      uiVCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth+1 );
687      uiAbsPartIdx += uiQPartNum;
688      offsetLuma += size;  offsetChroma += (size>>2);
689    }
690   
691    for( UInt ui = 0; ui < 4 * uiQPartNum; ++ui )
692    {
693      pcCU->getCbf( TEXT_LUMA     )[uiStartAbsPartIdx + ui] |= uiYCbf << uiTrDepth;
694      pcCU->getCbf( TEXT_CHROMA_U )[uiStartAbsPartIdx + ui] |= uiUCbf << uiTrDepth;
695      pcCU->getCbf( TEXT_CHROMA_V )[uiStartAbsPartIdx + ui] |= uiVCbf << uiTrDepth;
696    }
697  }
698  else
699  {
700    assert( uiDepth >= pcCU->getDepth( uiAbsPartIdx ) );
701    pcCU->setTrIdxSubParts( uiTrDepth, uiAbsPartIdx, uiDepth );
702   
703#if !H_MV_ENC_DEC_TRAC
704    {
705      DTRACE_CABAC_VL( g_nSymbolCounter++ );
706      DTRACE_CABAC_T( "\tTrIdx: abspart=" );
707      DTRACE_CABAC_V( uiAbsPartIdx );
708      DTRACE_CABAC_T( "\tdepth=" );
709      DTRACE_CABAC_V( uiDepth );
710      DTRACE_CABAC_T( "\ttrdepth=" );
711      DTRACE_CABAC_V( uiTrDepth );
712      DTRACE_CABAC_T( "\n" );
713    }
714#endif
715   
716    pcCU->setCbfSubParts ( 0, TEXT_LUMA, uiAbsPartIdx, uiDepth );
717    if( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
718    {
719      pcCU->setCbfSubParts( 1 << uiTrDepth, TEXT_LUMA, uiAbsPartIdx, uiDepth );
720    }
721    else
722    {
723      m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_LUMA, uiTrDepth, uiDepth );
724    }
725
726
727    // transform_unit begin
728    UInt cbfY = pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA    , uiTrIdx );
729    UInt cbfU = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrIdx );
730    UInt cbfV = pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrIdx );
731    if( uiLog2TrafoSize == 2 )
732    {
733      UInt partNum = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 );
734      if( ( uiAbsPartIdx % partNum ) == (partNum - 1) )
735      {
736        cbfU = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_U, uiTrIdx );
737        cbfV = pcCU->getCbf( m_uiBakAbsPartIdx, TEXT_CHROMA_V, uiTrIdx );
738      }
739    }
740    if ( cbfY || cbfU || cbfV )
741    {
742      // dQP: only for LCU
743      if ( pcCU->getSlice()->getPPS()->getUseDQP() )
744      {
745        if ( bCodeDQP )
746        {
747          decodeQP( pcCU, m_bakAbsPartIdxCU);
748          bCodeDQP = false;
749        }
750      }
751    }
752    if( cbfY )
753    {
754      Int trWidth = width;
755      Int trHeight = height;
756      m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffY()+offsetLuma), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_LUMA );
757    }
758    if( uiLog2TrafoSize > 2 )
759    {
760      Int trWidth = width >> 1;
761      Int trHeight = height >> 1;
762      if( cbfU )
763      {
764        m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCb()+offsetChroma), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_U );
765      }
766      if( cbfV )
767      {
768        m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCr()+offsetChroma), uiAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_V );
769      }
770    }
771    else
772    {
773      UInt partNum = pcCU->getPic()->getNumPartInCU() >> ( ( uiDepth - 1 ) << 1 );
774      if( ( uiAbsPartIdx % partNum ) == (partNum - 1) )
775      {
776        Int trWidth = width;
777        Int trHeight = height;
778        if( cbfU )
779        {
780          m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCb()+m_uiBakChromaOffset), m_uiBakAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_U );
781        }
782        if( cbfV )
783        {
784          m_pcEntropyDecoderIf->parseCoeffNxN( pcCU, (pcCU->getCoeffCr()+m_uiBakChromaOffset), m_uiBakAbsPartIdx, trWidth, trHeight, uiDepth, TEXT_CHROMA_V );
785        }
786      }
787    }
788    // transform_unit end
789  }
790}
791
792Void TDecEntropy::decodeQP          ( TComDataCU* pcCU, UInt uiAbsPartIdx )
793{
794  if ( pcCU->getSlice()->getPPS()->getUseDQP() )
795  {
796    m_pcEntropyDecoderIf->parseDeltaQP( pcCU, uiAbsPartIdx, pcCU->getDepth( uiAbsPartIdx ) );
797  }
798}
799
800
801/** decode coefficients
802 * \param pcCU
803 * \param uiAbsPartIdx
804 * \param uiDepth
805 * \param uiWidth
806 * \param uiHeight
807 * \returns Void
808 */
809Void TDecEntropy::decodeCoeff( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, Bool& bCodeDQP )
810{
811  UInt uiMinCoeffSize = pcCU->getPic()->getMinCUWidth()*pcCU->getPic()->getMinCUHeight();
812  UInt uiLumaOffset   = uiMinCoeffSize*uiAbsPartIdx;
813  UInt uiChromaOffset = uiLumaOffset>>2;
814#if H_3D_DIM_SDC
815  if( pcCU->getSDCFlag( uiAbsPartIdx ) && pcCU->isIntra( uiAbsPartIdx) )
816  {
817    assert( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N );
818    assert( pcCU->getTransformIdx(uiAbsPartIdx) == 0 );
819    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_LUMA) == 1 );
820    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
821    assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
822  }
823
824#if H_3D_INTER_SDC
825  if( pcCU->getSDCFlag( uiAbsPartIdx ) && !pcCU->isIntra( uiAbsPartIdx) )
826  {
827    assert( !pcCU->isSkipped( uiAbsPartIdx ) );
828    assert( !pcCU->isIntra( uiAbsPartIdx) );
829    assert( pcCU->getSlice()->getIsDepth() );
830  }
831#endif
832  if( pcCU->getSlice()->getIsDepth() && ( pcCU->getSDCFlag( uiAbsPartIdx ) || pcCU->isIntra( uiAbsPartIdx ) ) )
833  {
834    Int iPartNum = ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) ? 4 : 1;
835    UInt uiPartOffset = ( pcCU->getPic()->getNumPartInCU() >> ( pcCU->getDepth( uiAbsPartIdx ) << 1 ) ) >> 2;
836 
837    if( !pcCU->getSDCFlag( uiAbsPartIdx ) )
838    {
839      for( Int iPart = 0; iPart < iPartNum; iPart++ )
840      {
841        if( getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx + uiPartOffset*iPart ) ) < DIM_NUM_TYPE ) 
842        {
843          m_pcEntropyDecoderIf->parseDeltaDC( pcCU, uiAbsPartIdx + uiPartOffset*iPart, uiDepth + ( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_NxN ) );
844        }
845      }
846    }
847    else
848    {
849      m_pcEntropyDecoderIf->parseDeltaDC( pcCU, uiAbsPartIdx, uiDepth );
850      return;
851    }
852  }
853#endif
854
855  if( pcCU->isIntra(uiAbsPartIdx) )
856  {
857  }
858  else
859  {
860    UInt uiQtRootCbf = 1;
861    if( !( pcCU->getPartitionSize( uiAbsPartIdx) == SIZE_2Nx2N && pcCU->getMergeFlag( uiAbsPartIdx ) ) )
862    {
863      m_pcEntropyDecoderIf->parseQtRootCbf( uiAbsPartIdx, uiQtRootCbf );
864    }
865    if ( !uiQtRootCbf )
866    {
867      pcCU->setCbfSubParts( 0, 0, 0, uiAbsPartIdx, uiDepth );
868      pcCU->setTrIdxSubParts( 0 , uiAbsPartIdx, uiDepth );
869      return;
870    }
871   
872  }
873
874  Int getQuadtreeTULog2MinSizeInCU = pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx);
875
876  xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, bCodeDQP, getQuadtreeTULog2MinSizeInCU );
877}
878
879#if H_3D_INTER_SDC
880Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
881{
882  pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth );
883
884  if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getInterSDCFlag( pcCU->getSlice()->getLayerIdInVps() ) ) || 
885    ( pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getVPS()->getVpsDepthModesFlag( pcCU->getSlice()->getLayerIdInVps() ) ) )
886  {
887    return;
888  }
889
890  if( !pcCU->getSlice()->getIsDepth() || pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N || pcCU->isSkipped( uiAbsPartIdx ) )
891  {
892    return;
893  }
894
895  assert( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );
896  m_pcEntropyDecoderIf->parseSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
897}
898#endif
899#if H_3D_DBBP
900Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
901{
902  m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth );
903}
904#endif
905
906//! \}
Note: See TracBrowser for help on using the repository browser.