- Timestamp:
- 5 Apr 2015, 23:05:17 (10 years ago)
- Location:
- branches/HTM-13.1-dev0
- Files:
-
- 1 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp
r1164 r1173 781 781 // segmentation of texture block --> mask IDs 782 782 Pel* pDepthBlockStart = pDepthPels; 783 783 784 784 // first compute average of depth block for thresholding 785 785 Int iSumDepth = 0; … … 790 790 uiMaxDepth = pDepthPels[ 0 ]; 791 791 iSumDepth = pDepthPels[ 0 ]; 792 792 UInt t=0; 793 793 Int iPictureWidth = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getWidth(); 794 794 Int iPictureHeight = pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getPicYuvRec()->getHeight(); … … 796 796 if( pcCU->getSlice()->getDepthRefinementFlag( ) ) 797 797 { 798 798 cDv.setVer(0); 799 799 } 800 800 Int iBlkX = ( pcCU->getAddr() % pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUWidth + g_auiRasterToPelX[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getHor()+2)>>2); 801 801 Int iBlkY = ( pcCU->getAddr() / pcCU->getSlice()->getIvPic (true, pcCU->getDvInfo(0).m_aVIdxCan)->getFrameWidthInCU() ) * g_uiMaxCUHeight + g_auiRasterToPelY[ g_auiZscanToRaster[ pcCU->getZorderIdxInCU() ] ]+ ((cDv.getVer()+2)>>2); 802 if (iBlkX>(Int)(iPictureWidth - uiWidth))803 {804 iSumDepth += pDepthPels[ iPictureWidth - iBlkX - 1 ];805 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ iPictureWidth - iBlkX - 1 ]);806 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ iPictureWidth - iBlkX - 1 ]);807 }808 else809 {810 iSumDepth += pDepthPels[ uiWidth - 1 ];811 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiWidth - 1 ]);812 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiWidth - 1 ]);813 }814 if (iBlkY>(Int)(iPictureHeight - uiHeight))815 {816 iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ];817 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]);818 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]);819 }820 else821 {822 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) ];823 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);824 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]);825 }826 if (iBlkY>(Int)(iPictureHeight - uiHeight) && iBlkX>(Int)(iPictureWidth - uiWidth))827 {828 iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ];829 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]);830 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]);831 }832 else if (iBlkY>(Int)(iPictureHeight - uiHeight))833 {834 iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ];835 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]);836 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]);837 }838 else if (iBlkX>(Int)(iPictureWidth - uiWidth))839 {840 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ];841 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]);842 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]);843 }844 else845 {846 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ];847 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);848 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]);849 }802 if (iBlkX>(Int)(iPictureWidth - uiWidth)) 803 { 804 iSumDepth += pDepthPels[ iPictureWidth - iBlkX - 1 ]; 805 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ iPictureWidth - iBlkX - 1 ]); 806 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ iPictureWidth - iBlkX - 1 ]); 807 } 808 else 809 { 810 iSumDepth += pDepthPels[ uiWidth - 1 ]; 811 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiWidth - 1 ]); 812 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiWidth - 1 ]); 813 } 814 if (iBlkY>(Int)(iPictureHeight - uiHeight)) 815 { 816 iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]; 817 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]); 818 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) ]); 819 } 820 else 821 { 822 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) ]; 823 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]); 824 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) ]); 825 } 826 if (iBlkY>(Int)(iPictureHeight - uiHeight) && iBlkX>(Int)(iPictureWidth - uiWidth)) 827 { 828 iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]; 829 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]); 830 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + iPictureWidth - iBlkX - 1 ]); 831 } 832 else if (iBlkY>(Int)(iPictureHeight - uiHeight)) 833 { 834 iSumDepth += pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]; 835 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]); 836 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (iPictureHeight - iBlkY - 1) + uiWidth - 1 ]); 837 } 838 else if (iBlkX>(Int)(iPictureWidth - uiWidth)) 839 { 840 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]; 841 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]); 842 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + iPictureWidth - iBlkX - 1 ]); 843 } 844 else 845 { 846 iSumDepth += pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]; 847 uiMinDepth = std::min( uiMinDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]); 848 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]); 849 } 850 850 #else 851 851 iSumDepth = pDepthPels[ 0 ]; … … 864 864 uiMaxDepth = std::max( uiMaxDepth, (Int)pDepthPels[ uiDepthStride * (uiHeight - 1) + uiWidth - 1 ]); 865 865 #endif 866 866 867 867 // don't generate mask for blocks with small depth range (encoder decision) 868 868 if( uiMaxDepth - uiMinDepth < 10 ) … … 870 870 return false; 871 871 } 872 872 873 873 AOF(uiWidth==uiHeight); 874 874 Int iMean = iSumDepth >> 2; 875 875 876 876 // start again for segmentation 877 877 pDepthPels = pDepthBlockStart; 878 878 879 879 Bool bInvertMask = pDepthPels[0]>iMean; // top-left segment needs to be mapped to partIdx 0 880 880 881 881 // generate mask 882 882 UInt uiSumPix[2] = {0,0}; … … 894 894 { 895 895 depthPel = pDepthPels[x]; 896 896 t=x; 897 897 } 898 898 #else 899 899 Int depthPel = pDepthPels[x]; 900 900 #endif 901 901 902 902 // decide which segment this pixel belongs to 903 903 Int ucSegment = (Int)(depthPel>iMean); 904 904 905 905 if( bInvertMask ) 906 906 { 907 907 ucSegment = 1-ucSegment; 908 908 } 909 909 910 910 // count pixels for each segment 911 911 uiSumPix[ucSegment]++; 912 912 913 913 // set mask value 914 914 pMask[x] = (Bool)ucSegment; 915 915 } 916 916 917 917 // next row 918 918 #if HS_DBBP_CLEAN_K0048 919 919 if (!(iBlkY+y+1>iPictureHeight)) 920 920 #endif 921 pDepthPels += uiDepthStride;921 pDepthPels += uiDepthStride; 922 922 pMask += MAX_CU_SIZE; 923 923 } 924 924 925 925 // don't generate valid mask for tiny segments (encoder decision) 926 926 // each segment needs to cover at least 1/8th of block … … 930 930 return false; 931 931 } 932 932 933 933 // all good 934 934 return true; -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComRom.cpp
r1172 r1173 391 391 Bool g_tracePU = false; 392 392 Bool g_traceTU = false; 393 Bool g_disableNumbering = true;393 Bool g_disableNumbering = false; 394 394 Bool g_disableHLSTrace = false; 395 UInt64 g_stopAtCounter = 0;395 UInt64 g_stopAtCounter = 937234; 396 396 Bool g_traceCopyBack = false; 397 397 Bool g_decTraceDispDer = false; 398 398 Bool g_decTraceMvFromMerge = false; 399 399 Bool g_decTracePicOutput = false; 400 Bool g_stopAtPos = false; 401 Bool g_outputPos = false; 402 Bool g_traceCameraParameters = true; 400 Bool g_stopAtPos = true; 401 Bool g_outputPos = true; 402 Bool g_traceCameraParameters = false; 403 Bool g_encNumberOfWrittenBits = true; 403 404 #endif 404 405 #endif … … 607 608 if ( stopAtCU ) // Stop at CU with specific size 608 609 { 609 stopFlag = ( cuPelX == 0 ) && ( cuPelY == 0 ) && ( cuWidth == 16 ) && ( cuHeight == 16);610 stopFlag = ( cuPelX == 0 ) && ( cuPelY == 0 ) && ( cuWidth == 8 ) && ( cuHeight == 8 ); 610 611 } 611 612 else -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComRom.h
r1172 r1173 230 230 231 231 #ifndef ENC_DEC_TRACE 232 #define ENC_DEC_TRACE 0 232 #define ENC_DEC_TRACE 0 233 233 #endif 234 234 … … 266 266 extern Bool g_outputPos; // Output position 267 267 extern Bool g_traceCameraParameters; // Trace camera parameters 268 extern Bool g_encNumberOfWrittenBits;// Trace number of written bits 268 269 269 270 #define DTRACE_CU(x,y) writeToTraceFile( x,y, g_traceCU ); -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TComSlice.h
r1172 r1173 1200 1200 #endif 1201 1201 #endif 1202 1202 1203 #if HHI_INTER_COMP_PRED_K0052 1203 1204 #if HHI_CAM_PARA_K0052 … … 1216 1217 assert( 0 ); 1217 1218 return -1; 1218 }; 1219 }; 1219 1220 1220 1221 #if HHI_CAM_PARA_K0052 … … 1404 1405 #else 1405 1406 UInt getCamParPrecision () { return m_uiCamParPrecision; } 1407 1406 1408 Bool getCamParPresent ( Int viewIndex ) { return m_bCamParPresent[viewIndex]; } 1407 1409 Void setCamParPresent ( Int viewIndex, Bool val ) { m_bCamParPresent[viewIndex] = val; } … … 3037 3039 3038 3040 for( Int i = 0; i <= numCurCmpLIds - 1; i++ ) 3039 { 3041 { 3040 3042 m_inCmpRefViewIdcs.push_back( getVPS()->getViewOrderIdx( curCmpLIds[ i ] )); 3041 3043 #if HHI_CAM_PARA_K0052 -
branches/HTM-13.1-dev0/source/Lib/TLibCommon/TypeDef.h
r1172 r1173 335 335 #define HHI_RES_PRED_K0052 1 336 336 #define HHI_CAM_PARA_K0052 1 337 #define HHI_MOVE_SYN_K0052 1 337 338 #define H_3D_ANNEX_SELECTION_FIX 1 338 339 #endif -
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r1172 r1173 559 559 m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth ); 560 560 561 #if !HHI_MOVE_SYN_K0052 561 562 #if H_3D_DIM_SDC 562 563 m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 563 564 #endif 565 #endif 564 566 if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) 565 567 { … … 568 570 if(pcCU->getIPCMFlag(uiAbsPartIdx)) 569 571 { 572 #if HHI_MOVE_SYN_K0052 573 #if H_3D_DIM_SDC 574 m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 575 #endif 576 #endif 570 577 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); 571 578 #if H_3D_IV_MERGE … … 581 588 // prediction mode ( Intra : direction mode, Inter : Mv, reference idx ) 582 589 m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]); 590 583 591 // Coefficient decoding 584 592 Bool bCodeDQP = getdQPFlag(); -
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
r1170 r1173 161 161 { 162 162 m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth ); 163 163 #if !HHI_MOVE_SYN_K0052 164 164 #if H_3D_DBBP 165 165 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) … … 168 168 } 169 169 #endif 170 #endif 170 171 } 171 172 … … 175 176 { 176 177 decodeIntraDirModeLuma ( pcCU, uiAbsPartIdx, uiDepth ); 178 #if HHI_MOVE_SYN_K0052 179 decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth ); 180 #endif 177 181 #if H_3D_DIM_SDC 178 182 #if H_3D_DISABLE_CHROMA 183 #if !HHI_MOVE_SYN_K0052 179 184 if(!pcCU->getSDCFlag(uiAbsPartIdx) && !pcCU->getSlice()->getIsDepth() ) 185 #else 186 if(!pcCU->getSlice()->getIsDepth() ) 187 #endif 180 188 #else 181 189 if(!pcCU->getSDCFlag(uiAbsPartIdx)) … … 257 265 pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx); 258 266 #endif 267 #if HHI_MOVE_SYN_K0052 259 268 for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) 260 269 { … … 265 274 //DTRACE_PU("x1", uiTPelY) 266 275 #endif 276 277 ////// Parse PUs syntax 267 278 decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx ); 268 279 if ( pcCU->getMergeFlag( uiSubPartIdx ) ) 269 280 { 270 decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth ); 281 decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth ); 282 } 283 else 284 { 285 decodeInterDirPU( pcCU, uiSubPartIdx, uiDepth, uiPartIdx ); 286 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 287 { 288 if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 ) 289 { 290 decodeRefFrmIdxPU( pcCU, uiSubPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) ); 291 decodeMvdPU ( pcCU, uiSubPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) ); 292 decodeMVPIdxPU ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) ); 293 } 294 } 295 } 296 } 297 298 ////// Parse CUs extension syntax 299 decodeDBBPFlag( pcCU, uiAbsPartIdx, uiDepth ); 300 decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth ); 301 302 #if H_3D_ARP 303 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 304 #endif 305 #if H_3D_IC 306 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 307 #endif 308 309 ////// Decode motion vectors 310 for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) 311 { 312 if ( pcCU->getMergeFlag( uiSubPartIdx ) ) 313 { 271 314 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 272 #if H_3D_ARP273 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth );274 #endif275 #if H_3D_IC276 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );277 #endif278 315 #if H_3D_DBBP 279 316 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false ) … … 408 445 else 409 446 { 447 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 448 { 449 if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 ) 450 { 451 decodeMvsAMVP ( pcSubCU, uiSubPartIdx-uiAbsPartIdx, uiDepth, uiPartIdx, RefPicList( uiRefListIdx ) ); 452 } 453 } 454 } 455 456 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) ) 457 { 458 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMv( TComMv(0,0), ePartSize, uiSubPartIdx, uiDepth, uiPartIdx); 459 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllRefIdx( -1, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx); 460 pcCU->setInterDirSubParts( 1, uiSubPartIdx, uiPartIdx, uiDepth); 461 } 462 } 463 #else 464 for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) 465 { 466 #if H_MV_ENC_DEC_TRAC 467 DTRACE_PU_S("=========== prediction_unit ===========\n") 468 // ToDo: 469 //DTRACE_PU("x0", uiLPelX) 470 //DTRACE_PU("x1", uiTPelY) 471 #endif 472 decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx ); 473 if ( pcCU->getMergeFlag( uiSubPartIdx ) ) 474 { 475 decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth ); 476 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 477 #if H_3D_ARP 478 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 479 #endif 480 #if H_3D_IC 481 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 482 #endif 483 #if H_3D_DBBP 484 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false ) 485 #else 486 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 ) 487 #endif 488 { 489 pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 490 if ( !isMerged ) 491 { 492 #if H_3D_VSP 493 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 494 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 495 #if H_3D_SPIVMP 496 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 497 #endif 498 pcSubCU->initAvailableFlags(); 499 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 500 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 501 #if H_3D_SPIVMP 502 , pcMvFieldSP, puhInterDirSP 503 #endif 504 , numValidMergeCand ); 505 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 506 #if H_3D_SPIVMP 507 , bSPIVMPFlag 508 #endif 509 , numValidMergeCand ); 510 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 511 512 #else 513 #if H_3D 514 pcSubCU->initAvailableFlags(); 515 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 516 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 517 518 #else 519 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 520 #endif 521 #endif 522 isMerged = true; 523 } 524 pcSubCU->setPartSizeSubParts( ePartSize, 0, uiDepth ); 525 } 526 else 527 { 528 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 529 #if H_3D_VSP 530 Int vspFlag[MRG_MAX_NUM_CANDS_MEM]; 531 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 532 #if H_3D_SPIVMP 533 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 534 #endif 535 pcSubCU->initAvailableFlags(); 536 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 537 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 538 #if H_3D_SPIVMP 539 , pcMvFieldSP, puhInterDirSP 540 #endif 541 ,numValidMergeCand, uiMergeIndex ); 542 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 543 #if H_3D_SPIVMP 544 , bSPIVMPFlag 545 #endif 546 ,numValidMergeCand ); 547 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 548 #else 549 #if H_3D 550 pcSubCU->initAvailableFlags(); 551 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 552 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 553 #else 554 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 555 #endif 556 #endif 557 } 558 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 559 560 TComMv cTmpMv( 0, 0 ); 561 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 562 { 563 if ( pcCU->getSlice()->getNumRefIdx( RefPicList( uiRefListIdx ) ) > 0 ) 564 { 565 pcCU->setMVPIdxSubParts( 0, RefPicList( uiRefListIdx ), uiSubPartIdx, uiPartIdx, uiDepth); 566 pcCU->setMVPNumSubParts( 0, RefPicList( uiRefListIdx ), uiSubPartIdx, uiPartIdx, uiDepth); 567 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 568 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvField( cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ], ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 569 #if H_3D_VSP 570 #if H_3D_DBBP 571 if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 && !pcCU->getDBBPFlag( uiAbsPartIdx ) ) 572 #else 573 if( pcCU->getVSPFlag( uiSubPartIdx ) != 0 ) 574 #endif 575 { 576 if ( uhInterDirNeighbours[ uiMergeIndex ] & (1<<uiRefListIdx) ) 577 { 578 UInt dummy; 579 Int vspSize; 580 Int width, height; 581 pcCU->getPartIndexAndSize( uiPartIdx, dummy, width, height, uiSubPartIdx, pcCU->getTotalNumPart()==256 ); 582 pcCU->setMvFieldPUForVSP( pcCU, uiSubPartIdx, width, height, RefPicList( uiRefListIdx ), cMvFieldNeighbours[ 2*uiMergeIndex + uiRefListIdx ].getRefIdx(), vspSize ); 583 pcCU->setVSPFlag( uiSubPartIdx, vspSize ); 584 } 585 } 586 #endif 587 } 588 } 589 #if H_3D_SPIVMP 590 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 591 if (bSPIVMPFlag[uiMergeIndex] != 0) 592 { 593 Int iWidth, iHeight; 594 UInt uiIdx; 595 pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true ); 596 597 UInt uiSPAddr; 598 599 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 600 601 pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 602 603 for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++) 604 { 605 pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr); 606 pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight); 607 pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight); 608 pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight); 609 } 610 } 611 #endif 612 } 613 else 614 { 410 615 decodeInterDirPU( pcCU, uiSubPartIdx, uiDepth, uiPartIdx ); 411 616 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) … … 432 637 } 433 638 } 639 #endif 434 640 #if H_3D_SPIVMP 435 641 delete[] pcMvFieldSP; … … 500 706 } 501 707 708 #if HHI_MOVE_SYN_K0052 502 709 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ) 503 710 { 504 711 Int iMVPIdx = -1; 505 506 TComMv cZeroMv( 0, 0 );507 TComMv cMv = cZeroMv;508 Int iRefIdx = -1;509 510 TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList );511 AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo();512 513 iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr);514 cMv = cZeroMv;515 712 516 713 if ( (pcSubCU->getInterDir(uiPartAddr) & ( 1 << eRefList )) ) … … 530 727 #endif 531 728 } 729 pcSubCU->setMVPIdxSubParts( iMVPIdx, eRefList, uiPartAddr, uiPartIdx, uiDepth ); 730 } 731 732 Void TDecEntropy::decodeMvsAMVP( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ) 733 { 734 TComMv cZeroMv( 0, 0 ); 735 TComMv cMv = cZeroMv; 736 Int iRefIdx = -1; 737 738 TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList ); 739 AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo(); 740 741 iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr); 742 cMv = cZeroMv; 743 744 pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo); 745 pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth); 746 if ( iRefIdx >= 0 ) 747 { 748 m_pcPrediction->getMvPredAMVP( pcSubCU, uiPartIdx, uiPartAddr, eRefList, cMv); 749 cMv += pcSubCUMvField->getMvd( uiPartAddr ); 750 } 751 752 PartSize ePartSize = pcSubCU->getPartitionSize( uiPartAddr ); 753 pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx); 754 } 755 756 #else 757 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ) 758 { 759 Int iMVPIdx = -1; 760 761 TComMv cZeroMv( 0, 0 ); 762 TComMv cMv = cZeroMv; 763 Int iRefIdx = -1; 764 765 TComCUMvField* pcSubCUMvField = pcSubCU->getCUMvField( eRefList ); 766 AMVPInfo* pAMVPInfo = pcSubCUMvField->getAMVPInfo(); 767 768 iRefIdx = pcSubCUMvField->getRefIdx(uiPartAddr); 769 cMv = cZeroMv; 770 771 if ( (pcSubCU->getInterDir(uiPartAddr) & ( 1 << eRefList )) ) 772 { 773 m_pcEntropyDecoderIf->parseMVPIdx( iMVPIdx ); 774 #if H_MV_ENC_DEC_TRAC 775 #if ENC_DEC_TRACE 776 if ( eRefList == REF_PIC_LIST_0 ) 777 { 778 DTRACE_PU("mvp_l0_flag", iMVPIdx) 779 } 780 else 781 { 782 DTRACE_PU("mvp_l1_flag", iMVPIdx) 783 } 784 #endif 785 #endif 786 } 532 787 pcSubCU->fillMvpCand(uiPartIdx, uiPartAddr, eRefList, iRefIdx, pAMVPInfo); 533 788 pcSubCU->setMVPNumSubParts(pAMVPInfo->iN, eRefList, uiPartAddr, uiPartIdx, uiDepth); … … 542 797 pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx); 543 798 } 544 799 #endif 545 800 Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU) 546 801 { … … 876 1131 { 877 1132 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 1133 #if HHI_MOVE_SYN_K0052 1134 if ( pcCU->isSkipped( uiAbsPartIdx ) ) 1135 { 1136 return; 1137 } 1138 #endif 1139 878 1140 879 1141 if( ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->getSlice()->getInterSdcFlag() ) || … … 895 1157 Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 896 1158 { 897 m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth ); 1159 #if HHI_MOVE_SYN_K0052 1160 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) 1161 { 1162 #endif 1163 m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth ); 1164 #if HHI_MOVE_SYN_K0052 1165 } 1166 #endif 898 1167 } 899 1168 #endif -
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecEntropy.h
r1163 r1173 152 152 Void decodeMvdPU ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 153 153 Void decodeMVPIdxPU ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 154 154 #if HHI_MOVE_SYN_K0052 155 Void decodeMvsAMVP ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 156 #endif 155 157 Void setEntropyDecoder ( TDecEntropyIf* p ); 156 158 Void setBitstream ( TComInputBitstream* p ) { m_pcEntropyDecoderIf->setBitstream(p); } -
branches/HTM-13.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r1172 r1173 2191 2191 2192 2192 m_pcTDecBinIf->decodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) ); 2193 2193 DTRACE_CU("dc_only_flag", uiSymbol) 2194 2194 if( uiSymbol ) 2195 2195 { -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r1172 r1173 1622 1622 m_pcEntropyCoder->encodePartSize( pcCU, uiAbsPartIdx, uiDepth ); 1623 1623 1624 #if !HHI_MOVE_SYN_K0052 1624 1625 #if H_3D_DIM_SDC 1625 1626 m_pcEntropyCoder->encodeSDCFlag( pcCU, uiAbsPartIdx, false ); 1626 1627 #endif 1628 #endif 1627 1629 if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) 1628 1630 { 1629 1631 m_pcEntropyCoder->encodeIPCMInfo( pcCU, uiAbsPartIdx ); 1630 1631 1632 if(pcCU->getIPCMFlag(uiAbsPartIdx)) 1632 1633 { 1634 #if HHI_MOVE_SYN_K0052 1635 #if H_3D_DIM_SDC 1636 m_pcEntropyCoder->encodeSDCFlag( pcCU, uiAbsPartIdx, false ); 1637 #endif 1638 #endif 1633 1639 // Encode slice finish 1634 1640 finishCU(pcCU,uiAbsPartIdx,uiDepth); … … 1639 1645 // prediction Info ( Intra : direction mode, Inter : Mv, reference idx ) 1640 1646 m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx ); 1641 1647 #if HHI_MOVE_SYN_K0052 1648 m_pcEntropyCoder->encodeDBBPFlag( pcCU, uiAbsPartIdx ); 1649 #if H_3D_DIM_SDC 1650 m_pcEntropyCoder->encodeSDCFlag( pcCU, uiAbsPartIdx, false ); 1651 #endif 1652 #endif 1642 1653 #if H_3D_ARP 1643 1654 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); … … 2832 2843 m_pcEntropyCoder->encodePredMode( rpcTempCU, 0, true ); 2833 2844 m_pcEntropyCoder->encodePartSize( rpcTempCU, 0, uiDepth, true ); 2845 #if !HHI_MOVE_SYN_K0052 2834 2846 #if H_3D_DIM_SDC 2835 2847 m_pcEntropyCoder->encodeSDCFlag( rpcTempCU, 0, true ); 2836 2848 #endif 2849 #endif 2837 2850 m_pcEntropyCoder->encodePredInfo( rpcTempCU, 0, true ); 2838 2851 m_pcEntropyCoder->encodeIPCMInfo(rpcTempCU, 0, true ); 2852 #if HHI_MOVE_SYN_K0052 2853 #if H_3D_DIM_SDC 2854 m_pcEntropyCoder->encodeSDCFlag( rpcTempCU, 0, true ); 2855 #endif 2856 #endif 2839 2857 2840 2858 // Encode Coefficients … … 2908 2926 m_pcEntropyCoder->encodePredMode ( rpcTempCU, 0, true ); 2909 2927 m_pcEntropyCoder->encodePartSize ( rpcTempCU, 0, uiDepth, true ); 2928 #if !HHI_MOVE_SYN_K0052 2910 2929 #if H_3D_DIM_SDC 2911 2930 m_pcEntropyCoder->encodeSDCFlag( rpcTempCU, 0, true ); 2912 2931 #endif 2932 #endif 2913 2933 m_pcEntropyCoder->encodeIPCMInfo ( rpcTempCU, 0, true ); 2914 2934 #if HHI_MOVE_SYN_K0052 2935 #if H_3D_DIM_SDC 2936 m_pcEntropyCoder->encodeSDCFlag( rpcTempCU, 0, true ); 2937 #endif 2938 #endif 2915 2939 m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]); 2916 2940 -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
r1170 r1173 271 271 m_pcEntropyCoderIf->codePartSize( pcCU, uiAbsPartIdx, uiDepth ); 272 272 273 #if !HHI_MOVE_SYN_K0052 273 274 #if H_3D_DBBP 274 275 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) … … 276 277 encodeDBBPFlag(pcCU, uiAbsPartIdx, bRD); 277 278 } 279 #endif 278 280 #endif 279 281 } … … 861 863 Void TEncEntropy::encodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 862 864 { 863 if( bRD ) 864 { 865 uiAbsPartIdx = 0; 866 } 867 m_pcEntropyCoderIf->codeDBBPFlag( pcCU, uiAbsPartIdx ); 865 #if HHI_MOVE_SYN_K0052 866 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && 867 ( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || 868 pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && 869 pcCU->getWidth(uiAbsPartIdx) > 8 && 870 pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) 871 { 872 #endif 873 if( bRD ) 874 { 875 uiAbsPartIdx = 0; 876 } 877 m_pcEntropyCoderIf->codeDBBPFlag( pcCU, uiAbsPartIdx ); 878 #if HHI_MOVE_SYN_K0052 879 } 880 #endif 868 881 } 869 882 #endif -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncEntropy.h
r1163 r1173 151 151 Void resetBits () { m_pcEntropyCoderIf->resetBits(); } 152 152 Void resetCoeffCost () { m_pcEntropyCoderIf->resetCoeffCost(); } 153 UInt getNumberOfWrittenBits () { return m_pcEntropyCoderIf->getNumberOfWrittenBits(); } 153 UInt getNumberOfWrittenBits () 154 { 155 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC 156 Bool oldJustDoIt = g_bJustDoIt; 157 g_bJustDoIt = true; 158 writeToTraceFile( "NumberOfWrittenBits", m_pcEntropyCoderIf->getNumberOfWrittenBits(), g_encNumberOfWrittenBits ); 159 g_bJustDoIt = oldJustDoIt; 160 #endif 161 return m_pcEntropyCoderIf->getNumberOfWrittenBits(); 162 } 154 163 UInt getCoeffCost () { return m_pcEntropyCoderIf->getCoeffCost(); } 155 164 Void resetEntropy () { m_pcEntropyCoderIf->resetEntropy(); } -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
r1172 r1173 2367 2367 UInt uiSymbol = pcCU->getSDCFlag( uiAbsPartIdx ) ? 1 : 0; 2368 2368 UInt uiCtxSDCFlag = pcCU->getCtxSDCFlag( uiAbsPartIdx ); 2369 2369 DTRACE_CU("dc_only_flag", uiSymbol) 2370 2370 m_pcBinIf->encodeBin( uiSymbol, m_cSDCFlagSCModel.get( 0, 0, uiCtxSDCFlag ) ); 2371 2371 } -
branches/HTM-13.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r1169 r1173 924 924 #endif 925 925 #endif 926 m_pcEntropyCoder->encodePredMode( pcCU, 0, true );926 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); 927 927 } 928 928 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 … … 948 948 #endif 949 949 #endif 950 m_pcEntropyCoder ->encodePartSize( pcCU, 0, pcCU->getDepth(0), true ); 951 950 m_pcEntropyCoder ->encodePartSize( pcCU, 0, pcCU->getDepth(0), true ); 951 952 #if !HHI_MOVE_SYN_K0052 952 953 #if H_3D_DIM_SDC 953 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 954 #endif 955 if (pcCU->isIntra(0) && pcCU->getPartitionSize(0) == SIZE_2Nx2N ) 956 { 957 m_pcEntropyCoder->encodeIPCMInfo( pcCU, 0, true ); 958 959 if ( pcCU->getIPCMFlag (0)) 960 { 961 return; 962 } 963 } 954 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 955 #endif 956 #endif 957 if (pcCU->isIntra(0) && pcCU->getPartitionSize(0) == SIZE_2Nx2N ) 958 { 959 m_pcEntropyCoder->encodeIPCMInfo( pcCU, 0, true ); 960 if ( pcCU->getIPCMFlag (0)) 961 { 962 #if HHI_MOVE_SYN_K0052 963 #if H_3D_DIM_SDC 964 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 965 #endif 966 #endif 967 return; 968 } 969 } 964 970 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 965 971 } 966 972 #else 967 973 #if H_3D_SINGLE_DEPTH 968 }974 } 969 975 #endif 970 976 #endif … … 975 981 #else 976 982 #if H_3D_SINGLE_DEPTH 977 978 979 #endif 980 #endif 981 // luma prediction mode982 if( pcCU->getPartitionSize(0) == SIZE_2Nx2N )983 {984 if( uiAbsPartIdx == 0 )985 {986 m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, 0 );983 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx)) 984 { 985 #endif 986 #endif 987 // luma prediction mode 988 if( pcCU->getPartitionSize(0) == SIZE_2Nx2N ) 989 { 990 if( uiAbsPartIdx == 0 ) 991 { 992 m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, 0 ); 987 993 #if H_3D_DIM_SDC 988 if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( 0 ) ) && getDimType( pcCU->getLumaIntraDir( 0 ) ) < DIM_NUM_TYPE ) 989 { 990 m_pcEntropyCoder->encodeDeltaDC( pcCU, 0 ); 991 } 992 #endif 993 } 994 } 995 else 996 { 997 UInt uiQNumParts = pcCU->getTotalNumPart() >> 2; 998 if( uiTrDepth == 0 ) 999 { 1000 assert( uiAbsPartIdx == 0 ); 1001 for( UInt uiPart = 0; uiPart < 4; uiPart++ ) 1002 { 1003 m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiPart * uiQNumParts ); 994 #if HHI_MOVE_SYN_K0052 1004 995 #if H_3D_DIM_SDC 1005 if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( uiPart * uiQNumParts ) ) && getDimType( pcCU->getLumaIntraDir( uiPart * uiQNumParts ) ) < DIM_NUM_TYPE ) 996 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 997 #endif 998 #endif 999 if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( 0 ) ) && getDimType( pcCU->getLumaIntraDir( 0 ) ) < DIM_NUM_TYPE ) 1006 1000 { 1007 m_pcEntropyCoder->encodeDeltaDC( pcCU, uiPart * uiQNumParts);1001 m_pcEntropyCoder->encodeDeltaDC( pcCU, 0 ); 1008 1002 } 1009 1003 #endif 1010 1004 } 1011 1005 } 1012 else if( ( uiAbsPartIdx % uiQNumParts ) == 0 ) 1013 { 1014 m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiAbsPartIdx ); 1006 else 1007 { 1008 UInt uiQNumParts = pcCU->getTotalNumPart() >> 2; 1009 if( uiTrDepth == 0 ) 1010 { 1011 assert( uiAbsPartIdx == 0 ); 1012 for( UInt uiPart = 0; uiPart < 4; uiPart++ ) 1013 { 1014 m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiPart * uiQNumParts ); 1015 1016 #if HHI_MOVE_SYN_K0052 1017 } 1018 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 1019 for( UInt uiPart = 0; uiPart < 4; uiPart++ ) 1020 { 1021 #endif 1015 1022 #if H_3D_DIM_SDC 1016 if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( uiAbsPartIdx ) ) && getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx ) ) < DIM_NUM_TYPE ) 1017 { 1018 m_pcEntropyCoder->encodeDeltaDC( pcCU, uiAbsPartIdx ); 1019 } 1020 #endif 1021 } 1022 } 1023 if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( uiPart * uiQNumParts ) ) && getDimType( pcCU->getLumaIntraDir( uiPart * uiQNumParts ) ) < DIM_NUM_TYPE ) 1024 { 1025 m_pcEntropyCoder->encodeDeltaDC( pcCU, uiPart * uiQNumParts ); 1026 } 1027 #endif 1028 } 1029 } 1030 else if( ( uiAbsPartIdx % uiQNumParts ) == 0 ) 1031 { 1032 m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiAbsPartIdx ); 1033 #if H_3D_DIM_SDC 1034 #if HHI_MOVE_SYN_K0052 1035 if( uiAbsPartIdx == 0 ) 1036 { 1037 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 1038 } 1039 #endif 1040 if( pcCU->getSlice()->getIsDepth() && ( !pcCU->getSDCFlag( uiAbsPartIdx ) ) && getDimType( pcCU->getLumaIntraDir( uiAbsPartIdx ) ) < DIM_NUM_TYPE ) 1041 { 1042 m_pcEntropyCoder->encodeDeltaDC( pcCU, uiAbsPartIdx ); 1043 } 1044 #endif 1045 } 1046 } 1023 1047 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 1024 }1048 } 1025 1049 #else 1026 1050 #if H_3D_SINGLE_DEPTH … … 2294 2318 2295 2319 m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth( 0 ), true ); 2320 #if !HHI_MOVE_SYN_K0052 2296 2321 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 2322 #endif 2297 2323 2298 2324 // encode pred direction + DC residual data 2299 2325 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 2326 #if HHI_MOVE_SYN_K0052 2327 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 2328 #endif 2329 2300 2330 Bool bDummy = false; 2301 2331 m_pcEntropyCoder->encodeCoeff( pcCU, 0, pcCU->getDepth( 0 ), uiWidth, uiHeight, bDummy ); … … 7490 7520 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); 7491 7521 m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true ); 7522 #if !HHI_MOVE_SYN_K0052 7492 7523 #if H_3D_DIM_SDC 7493 7524 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 7494 7525 #endif 7526 #endif 7495 7527 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 7528 #if HHI_MOVE_SYN_K0052 7529 #if H_3D_DIM_SDC 7530 m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true ); 7531 #endif 7532 #endif 7496 7533 #if H_3D_ARP 7497 m_pcEntropyCoder->encodeARPW( pcCU , 0 );7534 m_pcEntropyCoder->encodeARPW( pcCU , 0 ); 7498 7535 #endif 7499 7536 #if H_3D_IC 7500 7537 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 7538 #endif 7539 #if HHI_MOVE_SYN_K0052 7540 m_pcEntropyCoder->encodeDBBPFlag( pcCU, 0, true ); 7501 7541 #endif 7502 7542 Bool bDummy = false;
Note: See TracChangeset for help on using the changeset viewer.