source: 3DVCSoftware/branches/HTM-DEV-0.3-dev1/source/Lib/TLibDecoder/TDecCu.cpp @ 459

Last change on this file since 459 was 459, checked in by hhi, 11 years ago

Integation of depth intra methods in macro H_3D_DIM, including:

  • DMM coding modes in H_3D_DIM_DMM.
  • RBC coding mode in H_3D_DIM_RBC.
  • Property svn:eol-style set to native
File size: 33.0 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-2013, 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     TDecCu.cpp
35    \brief    CU decoder class
36*/
37
38#include "TDecCu.h"
39
40//! \ingroup TLibDecoder
41//! \{
42
43// ====================================================================================================================
44// Constructor / destructor / create / destroy
45// ====================================================================================================================
46
47TDecCu::TDecCu()
48{
49  m_ppcYuvResi = NULL;
50  m_ppcYuvReco = NULL;
51  m_ppcCU      = NULL;
52}
53
54TDecCu::~TDecCu()
55{
56}
57
58Void TDecCu::init( TDecEntropy* pcEntropyDecoder, TComTrQuant* pcTrQuant, TComPrediction* pcPrediction)
59{
60  m_pcEntropyDecoder  = pcEntropyDecoder;
61  m_pcTrQuant         = pcTrQuant;
62  m_pcPrediction      = pcPrediction;
63}
64
65/**
66 \param    uiMaxDepth    total number of allowable depth
67 \param    uiMaxWidth    largest CU width
68 \param    uiMaxHeight   largest CU height
69 */
70Void TDecCu::create( UInt uiMaxDepth, UInt uiMaxWidth, UInt uiMaxHeight )
71{
72  m_uiMaxDepth = uiMaxDepth+1;
73 
74  m_ppcYuvResi = new TComYuv*[m_uiMaxDepth-1];
75  m_ppcYuvReco = new TComYuv*[m_uiMaxDepth-1];
76  m_ppcCU      = new TComDataCU*[m_uiMaxDepth-1];
77 
78  UInt uiNumPartitions;
79  for ( UInt ui = 0; ui < m_uiMaxDepth-1; ui++ )
80  {
81    uiNumPartitions = 1<<( ( m_uiMaxDepth - ui - 1 )<<1 );
82    UInt uiWidth  = uiMaxWidth  >> ui;
83    UInt uiHeight = uiMaxHeight >> ui;
84   
85    m_ppcYuvResi[ui] = new TComYuv;    m_ppcYuvResi[ui]->create( uiWidth, uiHeight );
86    m_ppcYuvReco[ui] = new TComYuv;    m_ppcYuvReco[ui]->create( uiWidth, uiHeight );
87    m_ppcCU     [ui] = new TComDataCU; m_ppcCU     [ui]->create( uiNumPartitions, uiWidth, uiHeight, true, uiMaxWidth >> (m_uiMaxDepth - 1) );
88  }
89 
90  m_bDecodeDQP = false;
91
92  // initialize partition order.
93  UInt* piTmp = &g_auiZscanToRaster[0];
94  initZscanToRaster(m_uiMaxDepth, 1, 0, piTmp);
95  initRasterToZscan( uiMaxWidth, uiMaxHeight, m_uiMaxDepth );
96 
97  // initialize conversion matrix from partition index to pel
98  initRasterToPelXY( uiMaxWidth, uiMaxHeight, m_uiMaxDepth );
99}
100
101Void TDecCu::destroy()
102{
103  for ( UInt ui = 0; ui < m_uiMaxDepth-1; ui++ )
104  {
105    m_ppcYuvResi[ui]->destroy(); delete m_ppcYuvResi[ui]; m_ppcYuvResi[ui] = NULL;
106    m_ppcYuvReco[ui]->destroy(); delete m_ppcYuvReco[ui]; m_ppcYuvReco[ui] = NULL;
107    m_ppcCU     [ui]->destroy(); delete m_ppcCU     [ui]; m_ppcCU     [ui] = NULL;
108  }
109 
110  delete [] m_ppcYuvResi; m_ppcYuvResi = NULL;
111  delete [] m_ppcYuvReco; m_ppcYuvReco = NULL;
112  delete [] m_ppcCU     ; m_ppcCU      = NULL;
113}
114
115// ====================================================================================================================
116// Public member functions
117// ====================================================================================================================
118
119/** \param    pcCU        pointer of CU data
120 \param    ruiIsLast   last data?
121 */
122Void TDecCu::decodeCU( TComDataCU* pcCU, UInt& ruiIsLast )
123{
124  if ( pcCU->getSlice()->getPPS()->getUseDQP() )
125  {
126    setdQPFlag(true);
127  }
128
129  // start from the top level CU
130  xDecodeCU( pcCU, 0, 0, ruiIsLast);
131}
132
133/** \param    pcCU        pointer of CU data
134 */
135Void TDecCu::decompressCU( TComDataCU* pcCU )
136{
137  xDecompressCU( pcCU, 0,  0 );
138}
139
140// ====================================================================================================================
141// Protected member functions
142// ====================================================================================================================
143
144/**decode end-of-slice flag
145 * \param pcCU
146 * \param uiAbsPartIdx
147 * \param uiDepth
148 * \returns Bool
149 */
150Bool TDecCu::xDecodeSliceEnd( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth)
151{
152  UInt uiIsLast;
153  TComPic* pcPic = pcCU->getPic();
154  TComSlice * pcSlice = pcPic->getSlice(pcPic->getCurrSliceIdx());
155  UInt uiCurNumParts    = pcPic->getNumPartInCU() >> (uiDepth<<1);
156  UInt uiWidth = pcSlice->getSPS()->getPicWidthInLumaSamples();
157  UInt uiHeight = pcSlice->getSPS()->getPicHeightInLumaSamples();
158  UInt uiGranularityWidth = g_uiMaxCUWidth;
159  UInt uiPosX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
160  UInt uiPosY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
161
162  if(((uiPosX+pcCU->getWidth(uiAbsPartIdx))%uiGranularityWidth==0||(uiPosX+pcCU->getWidth(uiAbsPartIdx)==uiWidth))
163    &&((uiPosY+pcCU->getHeight(uiAbsPartIdx))%uiGranularityWidth==0||(uiPosY+pcCU->getHeight(uiAbsPartIdx)==uiHeight)))
164  {
165    m_pcEntropyDecoder->decodeTerminatingBit( uiIsLast );
166  }
167  else
168  {
169    uiIsLast=0;
170  }
171 
172  if(uiIsLast) 
173  {
174    if(pcSlice->isNextSliceSegment()&&!pcSlice->isNextSlice()) 
175    {
176      pcSlice->setSliceSegmentCurEndCUAddr(pcCU->getSCUAddr()+uiAbsPartIdx+uiCurNumParts);
177    }
178    else 
179    {
180      pcSlice->setSliceCurEndCUAddr(pcCU->getSCUAddr()+uiAbsPartIdx+uiCurNumParts);
181      pcSlice->setSliceSegmentCurEndCUAddr(pcCU->getSCUAddr()+uiAbsPartIdx+uiCurNumParts);
182    }
183  }
184
185  return uiIsLast>0;
186}
187
188/** decode CU block recursively
189 * \param pcCU
190 * \param uiAbsPartIdx
191 * \param uiDepth
192 * \returns Void
193 */
194
195Void TDecCu::xDecodeCU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt& ruiIsLast)
196{
197  TComPic* pcPic = pcCU->getPic();
198  UInt uiCurNumParts    = pcPic->getNumPartInCU() >> (uiDepth<<1);
199  UInt uiQNumParts      = uiCurNumParts>>2;
200 
201  Bool bBoundary = false;
202  UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
203  UInt uiRPelX   = uiLPelX + (g_uiMaxCUWidth>>uiDepth)  - 1;
204  UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
205  UInt uiBPelY   = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1;
206 
207  TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx());
208  Bool bStartInCU = pcCU->getSCUAddr()+uiAbsPartIdx+uiCurNumParts>pcSlice->getSliceSegmentCurStartCUAddr()&&pcCU->getSCUAddr()+uiAbsPartIdx<pcSlice->getSliceSegmentCurStartCUAddr();
209  if((!bStartInCU) && ( uiRPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiBPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
210  {
211    m_pcEntropyDecoder->decodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth );
212  }
213  else
214  {
215    bBoundary = true;
216  }
217 
218  if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth ) ) || bBoundary )
219  {
220    UInt uiIdx = uiAbsPartIdx;
221    if( (g_uiMaxCUWidth>>uiDepth) == pcCU->getSlice()->getPPS()->getMinCuDQPSize() && pcCU->getSlice()->getPPS()->getUseDQP())
222    {
223      setdQPFlag(true);
224      pcCU->setQPSubParts( pcCU->getRefQP(uiAbsPartIdx), uiAbsPartIdx, uiDepth ); // set QP to default QP
225    }
226
227    for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++ )
228    {
229      uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiIdx] ];
230      uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiIdx] ];
231     
232      Bool bSubInSlice = pcCU->getSCUAddr()+uiIdx+uiQNumParts>pcSlice->getSliceSegmentCurStartCUAddr();
233      if ( bSubInSlice )
234      {
235        if ( !ruiIsLast && ( uiLPelX < pcCU->getSlice()->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcCU->getSlice()->getSPS()->getPicHeightInLumaSamples() ) )
236        {
237          xDecodeCU( pcCU, uiIdx, uiDepth+1, ruiIsLast );
238        }
239        else
240        {
241          pcCU->setOutsideCUPart( uiIdx, uiDepth+1 );
242        }
243      }
244     
245      uiIdx += uiQNumParts;
246    }
247    if( (g_uiMaxCUWidth>>uiDepth) == pcCU->getSlice()->getPPS()->getMinCuDQPSize() && pcCU->getSlice()->getPPS()->getUseDQP())
248    {
249      if ( getdQPFlag() )
250      {
251        UInt uiQPSrcPartIdx;
252        if ( pcPic->getCU( pcCU->getAddr() )->getSliceSegmentStartCU(uiAbsPartIdx) != pcSlice->getSliceSegmentCurStartCUAddr() )
253        {
254          uiQPSrcPartIdx = pcSlice->getSliceSegmentCurStartCUAddr() % pcPic->getNumPartInCU();
255        }
256        else
257        {
258          uiQPSrcPartIdx = uiAbsPartIdx;
259        }
260        pcCU->setQPSubParts( pcCU->getRefQP( uiQPSrcPartIdx ), uiAbsPartIdx, uiDepth ); // set QP to default QP
261      }
262    }
263    return;
264  }
265 
266  if( (g_uiMaxCUWidth>>uiDepth) >= pcCU->getSlice()->getPPS()->getMinCuDQPSize() && pcCU->getSlice()->getPPS()->getUseDQP())
267  {
268    setdQPFlag(true);
269    pcCU->setQPSubParts( pcCU->getRefQP(uiAbsPartIdx), uiAbsPartIdx, uiDepth ); // set QP to default QP
270  }
271
272  if (pcCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
273  {
274    m_pcEntropyDecoder->decodeCUTransquantBypassFlag( pcCU, uiAbsPartIdx, uiDepth );
275  }
276 
277  // decode CU mode and the partition size
278  if( !pcCU->getSlice()->isIntra())
279  {
280    m_pcEntropyDecoder->decodeSkipFlag( pcCU, uiAbsPartIdx, uiDepth );
281  }
282 
283  if( pcCU->isSkipped(uiAbsPartIdx) )
284  {
285    m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 );
286    m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 );
287    TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS << 1]; // double length for mv of both lists
288    UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
289    Int numValidMergeCand = 0;
290    for( UInt ui = 0; ui < m_ppcCU[uiDepth]->getSlice()->getMaxNumMergeCand(); ++ui )
291    {
292      uhInterDirNeighbours[ui] = 0;
293    }
294    m_pcEntropyDecoder->decodeMergeIndex( pcCU, 0, uiAbsPartIdx, uiDepth );
295    UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx);
296    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
297    pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
298
299    TComMv cTmpMv( 0, 0 );
300    for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
301    {       
302      if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 )
303      {
304        pcCU->setMVPIdxSubParts( 0, RefPicList( uiRefListIdx ), uiAbsPartIdx, 0, uiDepth);
305        pcCU->setMVPNumSubParts( 0, RefPicList( uiRefListIdx ), uiAbsPartIdx, 0, uiDepth);
306        pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
307        pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
308      }
309    }
310    xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
311    return;
312  }
313
314  m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
315  m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth );
316
317  if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N )
318  {
319    m_pcEntropyDecoder->decodeIPCMInfo( pcCU, uiAbsPartIdx, uiDepth );
320
321    if(pcCU->getIPCMFlag(uiAbsPartIdx))
322    {
323      xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
324      return;
325    }
326  }
327
328  UInt uiCurrWidth      = pcCU->getWidth ( uiAbsPartIdx );
329  UInt uiCurrHeight     = pcCU->getHeight( uiAbsPartIdx );
330 
331  // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
332  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
333 
334  // Coefficient decoding
335  Bool bCodeDQP = getdQPFlag();
336  m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP );
337  setdQPFlag( bCodeDQP );
338  xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
339}
340
341Void TDecCu::xFinishDecodeCU( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt& ruiIsLast)
342{
343  if(  pcCU->getSlice()->getPPS()->getUseDQP())
344  {
345    pcCU->setQPSubParts( getdQPFlag()?pcCU->getRefQP(uiAbsPartIdx):pcCU->getCodedQP(), uiAbsPartIdx, uiDepth ); // set QP
346  }
347
348  ruiIsLast = xDecodeSliceEnd( pcCU, uiAbsPartIdx, uiDepth);
349}
350
351Void TDecCu::xDecompressCU( TComDataCU* pcCU, UInt uiAbsPartIdx,  UInt uiDepth )
352{
353  TComPic* pcPic = pcCU->getPic();
354 
355  Bool bBoundary = false;
356  UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
357  UInt uiRPelX   = uiLPelX + (g_uiMaxCUWidth>>uiDepth)  - 1;
358  UInt uiTPelY   = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ];
359  UInt uiBPelY   = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1;
360 
361  UInt uiCurNumParts    = pcPic->getNumPartInCU() >> (uiDepth<<1);
362  TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx());
363  Bool bStartInCU = pcCU->getSCUAddr()+uiAbsPartIdx+uiCurNumParts>pcSlice->getSliceSegmentCurStartCUAddr()&&pcCU->getSCUAddr()+uiAbsPartIdx<pcSlice->getSliceSegmentCurStartCUAddr();
364  if(bStartInCU||( uiRPelX >= pcSlice->getSPS()->getPicWidthInLumaSamples() ) || ( uiBPelY >= pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
365  {
366    bBoundary = true;
367  }
368 
369  if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth ) ) || bBoundary )
370  {
371    UInt uiNextDepth = uiDepth + 1;
372    UInt uiQNumParts = pcCU->getTotalNumPart() >> (uiNextDepth<<1);
373    UInt uiIdx = uiAbsPartIdx;
374    for ( UInt uiPartIdx = 0; uiPartIdx < 4; uiPartIdx++ )
375    {
376      uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiIdx] ];
377      uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiIdx] ];
378     
379      Bool binSlice = (pcCU->getSCUAddr()+uiIdx+uiQNumParts>pcSlice->getSliceSegmentCurStartCUAddr())&&(pcCU->getSCUAddr()+uiIdx<pcSlice->getSliceSegmentCurEndCUAddr());
380      if(binSlice&&( uiLPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) )
381      {
382        xDecompressCU(pcCU, uiIdx, uiNextDepth );
383      }
384     
385      uiIdx += uiQNumParts;
386    }
387    return;
388  }
389 
390  // Residual reconstruction
391  m_ppcYuvResi[uiDepth]->clear();
392 
393  m_ppcCU[uiDepth]->copySubCU( pcCU, uiAbsPartIdx, uiDepth );
394 
395  switch( m_ppcCU[uiDepth]->getPredictionMode(0) )
396  {
397    case MODE_INTER:
398      xReconInter( m_ppcCU[uiDepth], uiDepth );
399      break;
400    case MODE_INTRA:
401      xReconIntraQT( m_ppcCU[uiDepth], uiDepth );
402      break;
403    default:
404      assert(0);
405      break;
406  }
407  if ( m_ppcCU[uiDepth]->isLosslessCoded(0) && (m_ppcCU[uiDepth]->getIPCMFlag(0) == false))
408  {
409    xFillPCMBuffer(m_ppcCU[uiDepth], uiDepth);
410  }
411 
412  xCopyToPic( m_ppcCU[uiDepth], pcPic, uiAbsPartIdx, uiDepth );
413}
414
415Void TDecCu::xReconInter( TComDataCU* pcCU, UInt uiDepth )
416{
417 
418  // inter prediction
419  m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] );
420 
421  // inter recon
422  xDecodeInterTexture( pcCU, 0, uiDepth );
423 
424  // clip for only non-zero cbp case
425  if  ( ( pcCU->getCbf( 0, TEXT_LUMA ) ) || ( pcCU->getCbf( 0, TEXT_CHROMA_U ) ) || ( pcCU->getCbf(0, TEXT_CHROMA_V ) ) )
426  {
427    m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ) );
428  }
429  else
430  {
431    m_ppcYuvReco[uiDepth]->copyPartToPartYuv( m_ppcYuvReco[uiDepth],0, pcCU->getWidth( 0 ),pcCU->getHeight( 0 ));
432  }
433}
434
435Void
436TDecCu::xIntraRecLumaBlk( TComDataCU* pcCU,
437                         UInt        uiTrDepth,
438                         UInt        uiAbsPartIdx,
439                         TComYuv*    pcRecoYuv,
440                         TComYuv*    pcPredYuv, 
441                         TComYuv*    pcResiYuv )
442{
443  UInt    uiWidth           = pcCU     ->getWidth   ( 0 ) >> uiTrDepth;
444  UInt    uiHeight          = pcCU     ->getHeight  ( 0 ) >> uiTrDepth;
445  UInt    uiStride          = pcRecoYuv->getStride  ();
446  Pel*    piReco            = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
447  Pel*    piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
448  Pel*    piResi            = pcResiYuv->getLumaAddr( uiAbsPartIdx );
449 
450  UInt    uiNumCoeffInc     = ( pcCU->getSlice()->getSPS()->getMaxCUWidth() * pcCU->getSlice()->getSPS()->getMaxCUHeight() ) >> ( pcCU->getSlice()->getSPS()->getMaxCUDepth() << 1 );
451  TCoeff* pcCoeff           = pcCU->getCoeffY() + ( uiNumCoeffInc * uiAbsPartIdx );
452 
453  UInt    uiLumaPredMode    = pcCU->getLumaIntraDir     ( uiAbsPartIdx );
454 
455  UInt    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
456  Pel*    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
457  UInt    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
458  Bool    useTransformSkip  = pcCU->getTransformSkip(uiAbsPartIdx, TEXT_LUMA);
459  //===== init availability pattern =====
460  Bool  bAboveAvail = false;
461  Bool  bLeftAvail  = false;
462  pcCU->getPattern()->initPattern   ( pcCU, uiTrDepth, uiAbsPartIdx );
463  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, uiTrDepth, 
464                                     m_pcPrediction->getPredicBuf       (),
465                                     m_pcPrediction->getPredicBufWidth  (),
466                                     m_pcPrediction->getPredicBufHeight (),
467                                     bAboveAvail, bLeftAvail );
468 
469  //===== get prediction signal =====
470#if H_3D_DIM
471  if( isDimMode( uiLumaPredMode ) )
472  {
473    m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight );
474  }
475  else
476  {
477#endif
478  m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
479#if H_3D_DIM
480  }
481#endif
482 
483  //===== inverse transform =====
484  m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0), TEXT_LUMA, pcCU->getSlice()->getSPS()->getQpBDOffsetY(), 0 );
485
486  Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)TEXT_LUMA];
487  assert(scalingListType < 6);
488  m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA, pcCU->getLumaIntraDir( uiAbsPartIdx ), piResi, uiStride, pcCoeff, uiWidth, uiHeight, scalingListType, useTransformSkip );
489
490 
491  //===== reconstruction =====
492  Pel* pPred      = piPred;
493  Pel* pResi      = piResi;
494  Pel* pReco      = piReco;
495  Pel* pRecIPred  = piRecIPred;
496  for( UInt uiY = 0; uiY < uiHeight; uiY++ )
497  {
498    for( UInt uiX = 0; uiX < uiWidth; uiX++ )
499    {
500      pReco    [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] );
501      pRecIPred[ uiX ] = pReco[ uiX ];
502    }
503    pPred     += uiStride;
504    pResi     += uiStride;
505    pReco     += uiStride;
506    pRecIPred += uiRecIPredStride;
507  }
508}
509
510
511Void
512TDecCu::xIntraRecChromaBlk( TComDataCU* pcCU,
513                           UInt        uiTrDepth,
514                           UInt        uiAbsPartIdx,
515                           TComYuv*    pcRecoYuv,
516                           TComYuv*    pcPredYuv, 
517                           TComYuv*    pcResiYuv,
518                           UInt        uiChromaId )
519{
520  UInt uiFullDepth  = pcCU->getDepth( 0 ) + uiTrDepth;
521  UInt uiLog2TrSize = g_aucConvertToBit[ pcCU->getSlice()->getSPS()->getMaxCUWidth() >> uiFullDepth ] + 2;
522
523  if( uiLog2TrSize == 2 )
524  {
525    assert( uiTrDepth > 0 );
526    uiTrDepth--;
527    UInt uiQPDiv = pcCU->getPic()->getNumPartInCU() >> ( ( pcCU->getDepth( 0 ) + uiTrDepth ) << 1 );
528    Bool bFirstQ = ( ( uiAbsPartIdx % uiQPDiv ) == 0 );
529    if( !bFirstQ )
530    {
531      return;
532    }
533  }
534 
535  TextType  eText             = ( uiChromaId > 0 ? TEXT_CHROMA_V : TEXT_CHROMA_U );
536  UInt      uiWidth           = pcCU     ->getWidth   ( 0 ) >> ( uiTrDepth + 1 );
537  UInt      uiHeight          = pcCU     ->getHeight  ( 0 ) >> ( uiTrDepth + 1 );
538  UInt      uiStride          = pcRecoYuv->getCStride ();
539  Pel*      piReco            = ( uiChromaId > 0 ? pcRecoYuv->getCrAddr( uiAbsPartIdx ) : pcRecoYuv->getCbAddr( uiAbsPartIdx ) );
540  Pel*      piPred            = ( uiChromaId > 0 ? pcPredYuv->getCrAddr( uiAbsPartIdx ) : pcPredYuv->getCbAddr( uiAbsPartIdx ) );
541  Pel*      piResi            = ( uiChromaId > 0 ? pcResiYuv->getCrAddr( uiAbsPartIdx ) : pcResiYuv->getCbAddr( uiAbsPartIdx ) );
542 
543  UInt      uiNumCoeffInc     = ( ( pcCU->getSlice()->getSPS()->getMaxCUWidth() * pcCU->getSlice()->getSPS()->getMaxCUHeight() ) >> ( pcCU->getSlice()->getSPS()->getMaxCUDepth() << 1 ) ) >> 2;
544  TCoeff*   pcCoeff           = ( uiChromaId > 0 ? pcCU->getCoeffCr() : pcCU->getCoeffCb() ) + ( uiNumCoeffInc * uiAbsPartIdx );
545 
546  UInt      uiChromaPredMode  = pcCU->getChromaIntraDir( 0 );
547 
548  UInt      uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
549  Pel*      piRecIPred        = ( uiChromaId > 0 ? pcCU->getPic()->getPicYuvRec()->getCrAddr( pcCU->getAddr(), uiZOrder ) : pcCU->getPic()->getPicYuvRec()->getCbAddr( pcCU->getAddr(), uiZOrder ) );
550  UInt      uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getCStride();
551  Bool      useTransformSkipChroma = pcCU->getTransformSkip(uiAbsPartIdx,eText);
552  //===== init availability pattern =====
553  Bool  bAboveAvail = false;
554  Bool  bLeftAvail  = false;
555  pcCU->getPattern()->initPattern         ( pcCU, uiTrDepth, uiAbsPartIdx );
556
557  pcCU->getPattern()->initAdiPatternChroma( pcCU, uiAbsPartIdx, uiTrDepth,
558                                           m_pcPrediction->getPredicBuf       (),
559                                           m_pcPrediction->getPredicBufWidth  (),
560                                           m_pcPrediction->getPredicBufHeight (),
561                                           bAboveAvail, bLeftAvail );
562  Int* pPatChroma   = ( uiChromaId > 0 ? pcCU->getPattern()->getAdiCrBuf( uiWidth, uiHeight, m_pcPrediction->getPredicBuf() ) : pcCU->getPattern()->getAdiCbBuf( uiWidth, uiHeight, m_pcPrediction->getPredicBuf() ) );
563 
564  //===== get prediction signal =====
565  {
566    if( uiChromaPredMode == DM_CHROMA_IDX )
567    {
568      uiChromaPredMode = pcCU->getLumaIntraDir( 0 );
569#if H_3D_DIM
570      mapDepthModeToIntraDir( uiChromaPredMode );
571#endif
572    }
573    m_pcPrediction->predIntraChromaAng( pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 
574  }
575
576  //===== inverse transform =====
577  Int curChromaQpOffset;
578  if(eText == TEXT_CHROMA_U)
579  {
580    curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCbQpOffset() + pcCU->getSlice()->getSliceQpDeltaCb();
581  }
582  else
583  {
584    curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCrQpOffset() + pcCU->getSlice()->getSliceQpDeltaCr();
585  }
586  m_pcTrQuant->setQPforQuant  ( pcCU->getQP(0), eText, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset );
587
588  Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)eText];
589  assert(scalingListType < 6);
590  m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eText, REG_DCT, piResi, uiStride, pcCoeff, uiWidth, uiHeight, scalingListType, useTransformSkipChroma );
591
592  //===== reconstruction =====
593  Pel* pPred      = piPred;
594  Pel* pResi      = piResi;
595  Pel* pReco      = piReco;
596  Pel* pRecIPred  = piRecIPred;
597  for( UInt uiY = 0; uiY < uiHeight; uiY++ )
598  {
599    for( UInt uiX = 0; uiX < uiWidth; uiX++ )
600    {
601      pReco    [ uiX ] = ClipC( pPred[ uiX ] + pResi[ uiX ] );
602      pRecIPred[ uiX ] = pReco[ uiX ];
603    }
604    pPred     += uiStride;
605    pResi     += uiStride;
606    pReco     += uiStride;
607    pRecIPred += uiRecIPredStride;
608  }
609}
610
611
612Void
613TDecCu::xReconIntraQT( TComDataCU* pcCU, UInt uiDepth )
614{
615  UInt  uiInitTrDepth = ( pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1 );
616  UInt  uiNumPart     = pcCU->getNumPartInter();
617  UInt  uiNumQParts   = pcCU->getTotalNumPart() >> 2;
618 
619  if (pcCU->getIPCMFlag(0))
620  {
621    xReconPCM( pcCU, uiDepth );
622    return;
623  }
624
625  for( UInt uiPU = 0; uiPU < uiNumPart; uiPU++ )
626  {
627    xIntraLumaRecQT( pcCU, uiInitTrDepth, uiPU * uiNumQParts, m_ppcYuvReco[uiDepth], m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth] );
628  } 
629
630  for( UInt uiPU = 0; uiPU < uiNumPart; uiPU++ )
631  {
632    xIntraChromaRecQT( pcCU, uiInitTrDepth, uiPU * uiNumQParts, m_ppcYuvReco[uiDepth], m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth] );
633  }
634
635}
636
637/** Function for deriving recontructed PU/CU Luma sample with QTree structure
638 * \param pcCU pointer of current CU
639 * \param uiTrDepth current tranform split depth
640 * \param uiAbsPartIdx  part index
641 * \param pcRecoYuv pointer to reconstructed sample arrays
642 * \param pcPredYuv pointer to prediction sample arrays
643 * \param pcResiYuv pointer to residue sample arrays
644 *
645 \ This function dervies recontructed PU/CU Luma sample with recursive QTree structure
646 */
647Void
648TDecCu::xIntraLumaRecQT( TComDataCU* pcCU,
649                     UInt        uiTrDepth,
650                     UInt        uiAbsPartIdx,
651                     TComYuv*    pcRecoYuv,
652                     TComYuv*    pcPredYuv, 
653                     TComYuv*    pcResiYuv )
654{
655  UInt uiFullDepth  = pcCU->getDepth(0) + uiTrDepth;
656  UInt uiTrMode     = pcCU->getTransformIdx( uiAbsPartIdx );
657  if( uiTrMode == uiTrDepth )
658  {
659    xIntraRecLumaBlk  ( pcCU, uiTrDepth, uiAbsPartIdx, pcRecoYuv, pcPredYuv, pcResiYuv );
660  }
661  else
662  {
663    UInt uiNumQPart  = pcCU->getPic()->getNumPartInCU() >> ( ( uiFullDepth + 1 ) << 1 );
664    for( UInt uiPart = 0; uiPart < 4; uiPart++ )
665    {
666      xIntraLumaRecQT( pcCU, uiTrDepth + 1, uiAbsPartIdx + uiPart * uiNumQPart, pcRecoYuv, pcPredYuv, pcResiYuv );
667    }
668  }
669}
670
671/** Function for deriving recontructed PU/CU chroma samples with QTree structure
672 * \param pcCU pointer of current CU
673 * \param uiTrDepth current tranform split depth
674 * \param uiAbsPartIdx  part index
675 * \param pcRecoYuv pointer to reconstructed sample arrays
676 * \param pcPredYuv pointer to prediction sample arrays
677 * \param pcResiYuv pointer to residue sample arrays
678 *
679 \ This function dervies recontructed PU/CU chroma samples with QTree recursive structure
680 */
681Void
682TDecCu::xIntraChromaRecQT( TComDataCU* pcCU,
683                     UInt        uiTrDepth,
684                     UInt        uiAbsPartIdx,
685                     TComYuv*    pcRecoYuv,
686                     TComYuv*    pcPredYuv, 
687                     TComYuv*    pcResiYuv )
688{
689  UInt uiFullDepth  = pcCU->getDepth(0) + uiTrDepth;
690  UInt uiTrMode     = pcCU->getTransformIdx( uiAbsPartIdx );
691  if( uiTrMode == uiTrDepth )
692  {
693    xIntraRecChromaBlk( pcCU, uiTrDepth, uiAbsPartIdx, pcRecoYuv, pcPredYuv, pcResiYuv, 0 );
694    xIntraRecChromaBlk( pcCU, uiTrDepth, uiAbsPartIdx, pcRecoYuv, pcPredYuv, pcResiYuv, 1 );
695  }
696  else
697  {
698    UInt uiNumQPart  = pcCU->getPic()->getNumPartInCU() >> ( ( uiFullDepth + 1 ) << 1 );
699    for( UInt uiPart = 0; uiPart < 4; uiPart++ )
700    {
701      xIntraChromaRecQT( pcCU, uiTrDepth + 1, uiAbsPartIdx + uiPart * uiNumQPart, pcRecoYuv, pcPredYuv, pcResiYuv );
702    }
703  }
704}
705
706Void TDecCu::xCopyToPic( TComDataCU* pcCU, TComPic* pcPic, UInt uiZorderIdx, UInt uiDepth )
707{
708  UInt uiCUAddr = pcCU->getAddr();
709 
710  m_ppcYuvReco[uiDepth]->copyToPicYuv  ( pcPic->getPicYuvRec (), uiCUAddr, uiZorderIdx );
711 
712  return;
713}
714
715Void TDecCu::xDecodeInterTexture ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
716{
717  UInt    uiWidth    = pcCU->getWidth ( uiAbsPartIdx );
718  UInt    uiHeight   = pcCU->getHeight( uiAbsPartIdx );
719  TCoeff* piCoeff;
720 
721  Pel*    pResi;
722  UInt    trMode = pcCU->getTransformIdx( uiAbsPartIdx );
723 
724  // Y
725  piCoeff = pcCU->getCoeffY();
726  pResi = m_ppcYuvResi[uiDepth]->getLumaAddr();
727
728  m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), TEXT_LUMA, pcCU->getSlice()->getSPS()->getQpBDOffsetY(), 0 );
729
730  m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_LUMA, pResi, 0, m_ppcYuvResi[uiDepth]->getStride(), uiWidth, uiHeight, trMode, 0, piCoeff );
731 
732  // Cb and Cr
733  Int curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCbQpOffset() + pcCU->getSlice()->getSliceQpDeltaCb();
734  m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), TEXT_CHROMA, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset );
735
736  uiWidth  >>= 1;
737  uiHeight >>= 1;
738  piCoeff = pcCU->getCoeffCb(); pResi = m_ppcYuvResi[uiDepth]->getCbAddr();
739  m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_CHROMA_U, pResi, 0, m_ppcYuvResi[uiDepth]->getCStride(), uiWidth, uiHeight, trMode, 0, piCoeff );
740
741  curChromaQpOffset = pcCU->getSlice()->getPPS()->getChromaCrQpOffset() + pcCU->getSlice()->getSliceQpDeltaCr();
742  m_pcTrQuant->setQPforQuant( pcCU->getQP( uiAbsPartIdx ), TEXT_CHROMA, pcCU->getSlice()->getSPS()->getQpBDOffsetC(), curChromaQpOffset );
743
744  piCoeff = pcCU->getCoeffCr(); pResi = m_ppcYuvResi[uiDepth]->getCrAddr();
745  m_pcTrQuant->invRecurTransformNxN ( pcCU, 0, TEXT_CHROMA_V, pResi, 0, m_ppcYuvResi[uiDepth]->getCStride(), uiWidth, uiHeight, trMode, 0, piCoeff );
746}
747
748/** Function for deriving reconstructed luma/chroma samples of a PCM mode CU.
749 * \param pcCU pointer to current CU
750 * \param uiPartIdx part index
751 * \param piPCM pointer to PCM code arrays
752 * \param piReco pointer to reconstructed sample arrays
753 * \param uiStride stride of reconstructed sample arrays
754 * \param uiWidth CU width
755 * \param uiHeight CU height
756 * \param ttText texture component type
757 * \returns Void
758 */
759Void TDecCu::xDecodePCMTexture( TComDataCU* pcCU, UInt uiPartIdx, Pel *piPCM, Pel* piReco, UInt uiStride, UInt uiWidth, UInt uiHeight, TextType ttText)
760{
761  UInt uiX, uiY;
762  Pel* piPicReco;
763  UInt uiPicStride;
764  UInt uiPcmLeftShiftBit; 
765
766  if( ttText == TEXT_LUMA )
767  {
768    uiPicStride   = pcCU->getPic()->getPicYuvRec()->getStride();
769    piPicReco = pcCU->getPic()->getPicYuvRec()->getLumaAddr(pcCU->getAddr(), pcCU->getZorderIdxInCU()+uiPartIdx);
770    uiPcmLeftShiftBit = g_bitDepthY - pcCU->getSlice()->getSPS()->getPCMBitDepthLuma();
771  }
772  else
773  {
774    uiPicStride = pcCU->getPic()->getPicYuvRec()->getCStride();
775
776    if( ttText == TEXT_CHROMA_U )
777    {
778      piPicReco = pcCU->getPic()->getPicYuvRec()->getCbAddr(pcCU->getAddr(), pcCU->getZorderIdxInCU()+uiPartIdx);
779    }
780    else
781    {
782      piPicReco = pcCU->getPic()->getPicYuvRec()->getCrAddr(pcCU->getAddr(), pcCU->getZorderIdxInCU()+uiPartIdx);
783    }
784    uiPcmLeftShiftBit = g_bitDepthC - pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();
785  }
786
787  for( uiY = 0; uiY < uiHeight; uiY++ )
788  {
789    for( uiX = 0; uiX < uiWidth; uiX++ )
790    {
791      piReco[uiX] = (piPCM[uiX] << uiPcmLeftShiftBit);
792      piPicReco[uiX] = piReco[uiX];
793    }
794    piPCM += uiWidth;
795    piReco += uiStride;
796    piPicReco += uiPicStride;
797  }
798}
799
800/** Function for reconstructing a PCM mode CU.
801 * \param pcCU pointer to current CU
802 * \param uiDepth CU Depth
803 * \returns Void
804 */
805Void TDecCu::xReconPCM( TComDataCU* pcCU, UInt uiDepth )
806{
807  // Luma
808  UInt uiWidth  = (g_uiMaxCUWidth >> uiDepth);
809  UInt uiHeight = (g_uiMaxCUHeight >> uiDepth);
810
811  Pel* piPcmY = pcCU->getPCMSampleY();
812  Pel* piRecoY = m_ppcYuvReco[uiDepth]->getLumaAddr(0, uiWidth);
813
814  UInt uiStride = m_ppcYuvResi[uiDepth]->getStride();
815
816  xDecodePCMTexture( pcCU, 0, piPcmY, piRecoY, uiStride, uiWidth, uiHeight, TEXT_LUMA);
817
818  // Cb and Cr
819  UInt uiCWidth  = (uiWidth>>1);
820  UInt uiCHeight = (uiHeight>>1);
821
822  Pel* piPcmCb = pcCU->getPCMSampleCb();
823  Pel* piPcmCr = pcCU->getPCMSampleCr();
824  Pel* pRecoCb = m_ppcYuvReco[uiDepth]->getCbAddr();
825  Pel* pRecoCr = m_ppcYuvReco[uiDepth]->getCrAddr();
826
827  UInt uiCStride = m_ppcYuvReco[uiDepth]->getCStride();
828
829  xDecodePCMTexture( pcCU, 0, piPcmCb, pRecoCb, uiCStride, uiCWidth, uiCHeight, TEXT_CHROMA_U);
830  xDecodePCMTexture( pcCU, 0, piPcmCr, pRecoCr, uiCStride, uiCWidth, uiCHeight, TEXT_CHROMA_V);
831}
832
833/** Function for filling the PCM buffer of a CU using its reconstructed sample array
834 * \param pcCU pointer to current CU
835 * \param uiDepth CU Depth
836 * \returns Void
837 */
838Void TDecCu::xFillPCMBuffer(TComDataCU* pCU, UInt depth)
839{
840  // Luma
841  UInt width  = (g_uiMaxCUWidth >> depth);
842  UInt height = (g_uiMaxCUHeight >> depth);
843
844  Pel* pPcmY = pCU->getPCMSampleY();
845  Pel* pRecoY = m_ppcYuvReco[depth]->getLumaAddr(0, width);
846
847  UInt stride = m_ppcYuvReco[depth]->getStride();
848
849  for(Int y = 0; y < height; y++ )
850  {
851    for(Int x = 0; x < width; x++ )
852    {
853      pPcmY[x] = pRecoY[x];
854    }
855    pPcmY += width;
856    pRecoY += stride;
857  }
858
859  // Cb and Cr
860  UInt widthC  = (width>>1);
861  UInt heightC = (height>>1);
862
863  Pel* pPcmCb = pCU->getPCMSampleCb();
864  Pel* pPcmCr = pCU->getPCMSampleCr();
865  Pel* pRecoCb = m_ppcYuvReco[depth]->getCbAddr();
866  Pel* pRecoCr = m_ppcYuvReco[depth]->getCrAddr();
867
868  UInt strideC = m_ppcYuvReco[depth]->getCStride();
869
870  for(Int y = 0; y < heightC; y++ )
871  {
872    for(Int x = 0; x < widthC; x++ )
873    {
874      pPcmCb[x] = pRecoCb[x];
875      pPcmCr[x] = pRecoCr[x];
876    }
877    pPcmCr += widthC;
878    pPcmCb += widthC;
879    pRecoCb += strideC;
880    pRecoCr += strideC;
881  }
882
883}
884
885//! \}
Note: See TracBrowser for help on using the repository browser.