Changeset 5 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecCu.cpp
- Timestamp:
- 12 Dec 2011, 18:35:44 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r2 r5 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-2011, 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 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 1 34 2 35 … … 160 193 UInt uiBPelY = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1; 161 194 162 #if MW_MVI_SIGNALLING_MODE == 0163 if( pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE )164 {165 m_pcEntropyDecoder->decodeMvInheritanceFlag( pcCU, uiAbsPartIdx, uiDepth );166 167 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth )168 {169 assert( pcCU->getZorderIdxInCU() == 0 );170 TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() );171 pcCU->copyTextureMotionDataFrom( pcTextureCU, uiDepth, pcCU->getZorderIdxInCU() + uiAbsPartIdx, uiAbsPartIdx );172 173 UInt uiCurrPartNumb = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1);174 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ )175 {176 const UChar uhNewDepth = max( uiDepth, pcTextureCU->getDepth( uiAbsPartIdx + ui ) );177 if( pcCU->getPredictionMode( uiAbsPartIdx + ui ) == MODE_SKIP )178 pcCU->setPredictionMode( uiAbsPartIdx + ui, MODE_INTER );179 assert( pcCU->getPredictionMode( uiAbsPartIdx + ui ) == MODE_INTER );180 pcCU->setPartitionSize( uiAbsPartIdx + ui, SIZE_NxN );181 pcCU->setDepth( uiAbsPartIdx + ui, uhNewDepth );182 pcCU->setWidth( uiAbsPartIdx + ui, g_uiMaxCUWidth>>uhNewDepth );183 pcCU->setHeight( uiAbsPartIdx + ui, g_uiMaxCUHeight>>uhNewDepth );184 }185 }186 }187 #endif188 189 195 if( ( uiRPelX < pcCU->getSlice()->getSPS()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getSPS()->getHeight() ) ) 190 196 { 197 #if HHI_MPI 191 198 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 || uiDepth < pcCU->getTextureModeDepth( uiAbsPartIdx ) ) 199 #endif 192 200 m_pcEntropyDecoder->decodeSplitFlag( pcCU, uiAbsPartIdx, uiDepth ); 193 201 } … … 220 228 221 229 // decode CU mode and the partition size 230 #if HHI_MPI 222 231 if( !pcCU->getSlice()->isIntra() && pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 ) 232 #else 233 if( !pcCU->getSlice()->isIntra() ) 234 #endif 223 235 { 224 236 m_pcEntropyDecoder->decodeSkipFlag( pcCU, uiAbsPartIdx, uiDepth ); … … 262 274 } 263 275 #endif 264 #if MW_MVI_SIGNALLING_MODE == 1276 #if HHI_MPI 265 277 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth ) 266 278 { … … 281 293 #endif 282 294 295 #if HHI_INTER_VIEW_RESIDUAL_PRED 283 296 m_pcEntropyDecoder->decodeResPredFlag( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 ); 297 #endif 284 298 return; 285 299 } 286 300 301 #if HHI_MPI 287 302 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 ) 288 303 { 304 #endif 289 305 m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth ); 290 306 … … 294 310 m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]); 295 311 312 #if HHI_MPI 296 313 if( !pcCU->isIntra( uiAbsPartIdx ) ) 297 314 { 298 315 m_ppcCU[uiDepth] ->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); 299 316 m_ppcCU[uiDepth] ->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 ); 317 #if HHI_INTER_VIEW_RESIDUAL_PRED 300 318 m_pcEntropyDecoder->decodeResPredFlag ( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth], 0 ); 301 } 302 303 #if MW_MVI_SIGNALLING_MODE == 1 319 #endif 320 } 321 304 322 if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth ) 305 323 { … … 335 353 } 336 354 } 337 #endif 338 } 355 } 356 #endif 357 339 358 UInt uiCurrWidth = pcCU->getWidth ( uiAbsPartIdx ); 340 359 UInt uiCurrHeight = pcCU->getHeight( uiAbsPartIdx ); … … 402 421 Void TDecCu::xReconInter( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 403 422 { 404 #if MW_MVI_SIGNALLING_MODE == 1423 #if HHI_MPI 405 424 if( pcCU->getTextureModeDepth( 0 ) != -1 ) 406 425 pcCU->setPartSizeSubParts( SIZE_NxN, 0, uiDepth ); … … 410 429 m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] ); 411 430 412 #if MW_MVI_SIGNALLING_MODE == 1431 #if HHI_MPI 413 432 if( pcCU->getTextureModeDepth( 0 ) != -1 ) 414 433 pcCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 415 434 #endif 416 435 436 #if HHI_INTER_VIEW_RESIDUAL_PRED 417 437 if( pcCU->getResPredFlag( 0 ) ) 418 438 { … … 422 442 m_ppcYuvReco[uiDepth]->add( m_ppcYuvResPred[uiDepth], pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) ); 423 443 } 424 444 #endif 445 425 446 // inter recon 426 447 xDecodeInterTexture( pcCU, 0, uiDepth ); … … 433 454 else 434 455 { 456 #if HHI_INTER_VIEW_RESIDUAL_PRED 435 457 if( pcCU->getResPredFlag( 0 ) ) 436 458 { 437 459 m_ppcYuvReco[uiDepth]->clip( pcCU->getWidth( 0 ), pcCU->getHeight( 0 ) ); 438 460 } 461 #endif 439 462 m_ppcYuvReco[uiDepth]->copyPartToPartYuv( m_ppcYuvReco[uiDepth],0, pcCU->getWidth( 0 ),pcCU->getHeight( 0 )); 440 463 } … … 647 670 bAboveAvail, bLeftAvail ); 648 671 649 #if HHI_DMM_ INTRA672 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 650 673 if( uiLumaPredMode > MAX_MODE_ID_INTRA_DIR ) 651 674 {
Note: See TracChangeset for help on using the changeset viewer.