Changeset 1196 in 3DVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 4 May 2015, 17:47:40 (10 years ago)
- Location:
- trunk/source/Lib/TLibDecoder
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1179 r1196 39 39 #include "SEIread.h" 40 40 #include "TDecSlice.h" 41 #if H_3D _ANNEX_SELECTION_FIX41 #if H_3D 42 42 #include "TDecTop.h" 43 43 #endif … … 93 93 TDecCavlc::TDecCavlc() 94 94 { 95 #if !HHI_CAM_PARA_K005296 #if H_3D97 m_aaiTempScale = new Int* [ MAX_NUM_LAYERS ];98 m_aaiTempOffset = new Int* [ MAX_NUM_LAYERS ];99 for( UInt uiVId = 0; uiVId < MAX_NUM_LAYERS; uiVId++ )100 {101 m_aaiTempScale [ uiVId ] = new Int [ MAX_NUM_LAYERS ];102 m_aaiTempOffset [ uiVId ] = new Int [ MAX_NUM_LAYERS ];103 }104 #endif105 #endif106 95 } 107 96 108 97 TDecCavlc::~TDecCavlc() 109 98 { 110 #if !HHI_CAM_PARA_K0052111 #if H_3D112 for( UInt uiVId = 0; uiVId < MAX_NUM_LAYERS; uiVId++ )113 {114 delete [] m_aaiTempScale [ uiVId ];115 delete [] m_aaiTempOffset [ uiVId ];116 }117 delete [] m_aaiTempScale;118 delete [] m_aaiTempOffset;119 #endif120 #endif121 99 } 122 100 … … 1048 1026 READ_FLAG( uiCode, "qt_pred_flag" ); sps3dExt->setQtPredFlag( d, uiCode == 1 ); 1049 1027 READ_FLAG( uiCode, "inter_sdc_flag" ); sps3dExt->setInterSdcFlag( d, uiCode == 1 ); 1050 #if SEC_DEPTH_INTRA_SKIP_MODE_K00331051 1028 READ_FLAG( uiCode, "intra_skip_flag" ); sps3dExt->setDepthIntraSkipFlag( d, uiCode == 1 ); 1052 #else1053 READ_FLAG( uiCode, "intra_single_flag" ); sps3dExt->setIntraSingleFlag( d, uiCode == 1 );1054 #endif1055 1029 } 1056 1030 } … … 1063 1037 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 1064 1038 READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 ); 1065 #if FIX_TICKET_951066 1039 if (pcPPS->getPpsInferScalingListFlag()) 1067 1040 { 1068 1041 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode ); 1069 1042 } 1070 #else1071 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );1072 #endif1073 1043 1074 1044 UInt numRefLocOffsets;; … … 1336 1306 } 1337 1307 1338 #if HHI_INTER_COMP_PRED_K00521339 1308 #if H_3D 1340 1309 pcVPS->initViewCompLayer( ); 1341 #endif1342 1310 #endif 1343 1311 … … 1929 1897 Void TDecCavlc::parseVPS3dExtension( TComVPS* pcVPS ) 1930 1898 { 1931 #if HHI_CAM_PARA_K00521932 1899 UInt uiCode; 1933 1900 READ_UVLC( uiCode, "cp_precision"); pcVPS->setCpPrecision( uiCode ) ; … … 1959 1926 } 1960 1927 pcVPS->deriveCpPresentFlag(); 1961 #else1962 UInt uiCode;1963 1964 UInt uiCamParPrecision = 0;1965 Bool bCamParSlice = false;1966 Bool bCamParPresentFlag = false;1967 1968 READ_UVLC( uiCamParPrecision, "cp_precision" );1969 #if HHI_VIEW_ID_LIST_I5_J01071970 for (Int n = 1; n < pcVPS->getNumViews(); n++)1971 {1972 Int viewIndex = pcVPS->getViewOIdxList( n );1973 #else1974 for (UInt viewIndex=1; viewIndex<pcVPS->getNumViews(); viewIndex++)1975 {1976 #endif1977 pcVPS->setCamParPresent ( viewIndex, false );1978 pcVPS->setHasCamParInSliceHeader( viewIndex, false );1979 READ_FLAG( uiCode, "cp_present_flag[i]" ); bCamParPresentFlag = ( uiCode == 1);1980 if ( bCamParPresentFlag )1981 {1982 READ_FLAG( uiCode, "cp_in_slice_segment_header_flag[i]" ); bCamParSlice = ( uiCode == 1);1983 if ( !bCamParSlice )1984 {1985 #if HHI_VIEW_ID_LIST_I5_J01071986 for( UInt m = 0; m < n; n++ )1987 {1988 Int uiBaseIndex = pcVPS->getViewOIdxList ( m );1989 Int iCode;1990 READ_SVLC( iCode, "vps_cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ viewIndex ] = iCode;1991 READ_SVLC( iCode, "vps_cp_off" ); m_aaiTempOffset [ uiBaseIndex ][ viewIndex ] = iCode;1992 READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];1993 READ_SVLC( iCode, "vps_cp_inv_off_plus_off" ); m_aaiTempOffset [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];1994 }1995 }1996 pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );1997 #else1998 for( UInt uiBaseIndex = 0; uiBaseIndex < viewIndex; uiBaseIndex++ )1999 {2000 Int iCode;2001 READ_SVLC( iCode, "vps_cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ viewIndex ] = iCode;2002 READ_SVLC( iCode, "vps_cp_off" ); m_aaiTempOffset [ uiBaseIndex ][ viewIndex ] = iCode;2003 READ_SVLC( iCode, "vps_cp_inv_scale_plus_scale" ); m_aaiTempScale [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ viewIndex ];2004 READ_SVLC( iCode, "vps_cp_inv_off_plus_off" ); m_aaiTempOffset [ viewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ viewIndex ];2005 }2006 }2007 pcVPS->initCamParaVPS( viewIndex, bCamParPresentFlag, uiCamParPrecision, bCamParSlice, m_aaiTempScale, m_aaiTempOffset );2008 #endif2009 }2010 }2011 #endif2012 1928 } 2013 1929 #endif … … 2070 1986 #endif 2071 1987 rpcSlice->setSPS(sps); 2072 #if !HHI_INTER_COMP_PRED_K00522073 #if H_3D2074 rpcSlice->init3dToolParameters();2075 #endif2076 #endif2077 1988 rpcSlice->setPPS(pps); 2078 1989 if( pps->getDependentSliceSegmentsEnabledFlag() && ( !firstSliceSegmentInPic )) … … 2468 2379 } 2469 2380 } 2470 #if HHI_INTER_COMP_PRED_K00522471 2381 #if H_3D 2472 2382 if ( getDecTop()->decProcAnnexI() ) … … 2481 2391 #endif 2482 2392 #endif 2483 #endif2484 2393 if(sps->getUseSAO()) 2485 2394 { … … 2488 2397 if( rpcSlice->getSPS()->getChromaFormatIdc() != 0 ) 2489 2398 { 2490 READ_FLAG(uiCode, "slice_sao_chroma_flag"); rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode);2491 }2399 READ_FLAG(uiCode, "slice_sao_chroma_flag"); rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode); 2400 } 2492 2401 else 2493 2402 { 2494 2403 rpcSlice->setSaoEnabledFlagChroma( false ); 2495 2404 } 2496 2497 2405 #else 2498 2406 READ_FLAG(uiCode, "slice_sao_chroma_flag"); rpcSlice->setSaoEnabledFlagChroma((Bool)uiCode); … … 2662 2570 } 2663 2571 #if H_3D_IC 2664 #if H_3D_ANNEX_SELECTION_FIX2665 2572 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) 2666 2573 && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 2667 2574 && getDecTop()->decProcAnnexI() 2668 2575 ) 2669 #else2670 else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth() && vps->getNumRefListLayers( layerId ) > 0 )2671 #endif2672 2576 { 2673 2577 UInt uiCodeTmp = 0; … … 2766 2670 rpcSlice->setLFCrossSliceBoundaryFlag( (uiCode==1)?true:false); 2767 2671 2768 #if HHI_CAM_PARA_K00522769 2672 #if H_3D 2770 2673 if ( getDecTop()->decProcAnnexI() ) … … 2784 2687 } 2785 2688 #endif 2786 #endif2787 2689 } 2788 2690 … … 2808 2710 } 2809 2711 2810 #if !HHI_CAM_PARA_K00522811 #if H_3D2812 #if H_3D_FCO2813 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && rpcSlice->getIsDepth() )2814 #else2815 if( rpcSlice->getVPS()->hasCamParInSliceHeader( rpcSlice->getViewIndex() ) && !rpcSlice->getIsDepth() )2816 #endif2817 {2818 UInt uiViewIndex = rpcSlice->getViewIndex();2819 for( UInt uiBaseIndex = 0; uiBaseIndex < uiViewIndex; uiBaseIndex++ )2820 {2821 READ_SVLC( iCode, "cp_scale" ); m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ] = iCode;2822 READ_SVLC( iCode, "cp_off" ); m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ] = iCode;2823 READ_SVLC( iCode, "cp_inv_scale_plus_scale" ); m_aaiTempScale [ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempScale [ uiBaseIndex ][ uiViewIndex ];2824 READ_SVLC( iCode, "cp_inv_off_plus_off" ); m_aaiTempOffset[ uiViewIndex ][ uiBaseIndex ] = iCode - m_aaiTempOffset[ uiBaseIndex ][ uiViewIndex ];2825 }2826 rpcSlice->setCamparaSlice( m_aaiTempScale, m_aaiTempOffset );2827 }2828 #endif2829 #endif2830 2712 2831 2713 if(pps->getSliceHeaderExtensionPresentFlag()) … … 3100 2982 assert(0); 3101 2983 } 3102 3103 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 2984 #if H_3D 3104 2985 Void TDecCavlc::parseDIS( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ ) 3105 2986 { 3106 2987 assert(0); 3107 2988 } 3108 #else3109 #if H_3D_SINGLE_DEPTH3110 Void TDecCavlc::parseSingleDepthMode( TComDataCU* /*pcCU*/, UInt /*uiAbsPartIdx*/, UInt /*uiDepth*/ )3111 {3112 assert(0);3113 }3114 #endif3115 2989 #endif 3116 2990 -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r1179 r1196 52 52 // Class definition 53 53 // ==================================================================================================================== 54 #if H_3D _ANNEX_SELECTION_FIX54 #if H_3D 55 55 class TDecTop; 56 56 #endif 57 58 57 /// CAVLC decoder class 59 58 class TDecCavlc : public SyntaxElementParser, public TDecEntropyIf … … 66 65 void parseShortTermRefPicSet (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx); 67 66 68 69 #if !HHI_CAM_PARA_K005270 67 #if H_3D 71 Int** m_aaiTempScale;72 Int** m_aaiTempOffset;73 #endif74 #endif75 #if H_3D_ANNEX_SELECTION_FIX76 68 TDecTop* m_decTop; 77 69 #endif … … 118 110 Void parsePPS ( TComPPS* pcPPS); 119 111 #endif 120 #if H_3D _ANNEX_SELECTION_FIX112 #if H_3D 121 113 Void setDecTop ( TDecTop* decTop ) { m_decTop = decTop; }; 122 114 #endif … … 136 128 137 129 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 138 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033130 #if H_3D 139 131 Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 140 #else141 #if H_3D_SINGLE_DEPTH142 Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );143 #endif144 132 #endif 145 133 Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 182 170 Void parseScalingList ( TComScalingList* scalingList ); 183 171 Void xDecodeScalingList ( TComScalingList *scalingList, UInt sizeId, UInt listId); 184 185 #if H_3D_ANNEX_SELECTION_FIX 172 #if H_3D 186 173 TDecTop* getDecTop() { return m_decTop; }; 187 174 #endif -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r1179 r1196 310 310 #if H_3D_NBDV 311 311 DisInfo DvInfo; 312 #if !SEC_ARP_REM_ENC_RESTRICT_K0035313 DvInfo.bDV = false;314 #endif315 312 DvInfo.m_acNBDV.setZero(); 316 313 DvInfo.m_aVIdxCan = 0; … … 347 344 if( pcCU->getSlice()->getIsDepth()) 348 345 { 349 #if SEC_ARP_REM_ENC_RESTRICT_K0035350 346 m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo); 351 #else352 DvInfo.bDV = m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo);353 #endif354 347 } 355 348 else … … 359 352 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() ) //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done. 360 353 { 361 #if SEC_ARP_REM_ENC_RESTRICT_K0035362 354 m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true); 363 #else364 DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo, true);365 #endif366 355 } 367 356 else 368 357 #endif 369 358 { 370 #if SEC_ARP_REM_ENC_RESTRICT_K0035371 359 m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo); 372 #else373 DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);374 #endif375 360 } 376 361 #if H_3D_IV_MERGE … … 545 530 return; 546 531 } 547 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033532 #if H_3D 548 533 m_pcEntropyDecoder->decodeDIS( pcCU, uiAbsPartIdx, uiDepth ); 549 534 if(!pcCU->getDISFlag(uiAbsPartIdx)) 550 535 { 551 #else552 #if H_3D_SINGLE_DEPTH553 m_pcEntropyDecoder->decodeSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );554 if(!pcCU->getSingleDepthFlag(uiAbsPartIdx))555 {556 #endif557 536 #endif 558 537 m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth ); 559 538 m_pcEntropyDecoder->decodePartSize( pcCU, uiAbsPartIdx, uiDepth ); 560 539 561 #if !HHI_MOVE_SYN_K0052562 #if H_3D_DIM_SDC563 m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth );564 #endif565 #endif566 540 if (pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) 567 541 { … … 570 544 if(pcCU->getIPCMFlag(uiAbsPartIdx)) 571 545 { 572 #if HHI_MOVE_SYN_K0052573 546 #if H_3D_DIM_SDC 574 547 m_pcEntropyDecoder->decodeSDCFlag( pcCU, uiAbsPartIdx, uiDepth ); 575 #endif576 548 #endif 577 549 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); … … 593 565 m_pcEntropyDecoder->decodeCoeff( pcCU, uiAbsPartIdx, uiDepth, uiCurrWidth, uiCurrHeight, bCodeDQP ); 594 566 setdQPFlag( bCodeDQP ); 595 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 596 } 597 #else 598 #if H_3D_SINGLE_DEPTH 599 } 600 #endif 567 #if H_3D 568 } 601 569 #endif 602 570 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast ); … … 625 593 UInt uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ]; 626 594 UInt uiBPelY = uiTPelY + (g_uiMaxCUHeight>>uiDepth) - 1; 627 595 628 596 UInt uiCurNumParts = pcPic->getNumPartInCU() >> (uiDepth<<1); 629 597 TComSlice * pcSlice = pcCU->getPic()->getSlice(pcCU->getPic()->getCurrSliceIdx()); … … 633 601 bBoundary = true; 634 602 } 635 603 636 604 if( ( ( uiDepth < pcCU->getDepth( uiAbsPartIdx ) ) && ( uiDepth < g_uiMaxCUDepth - g_uiAddCUDepth ) ) || bBoundary ) 637 605 { … … 643 611 uiLPelX = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiIdx] ]; 644 612 uiTPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiIdx] ]; 645 613 646 614 Bool binSlice = (pcCU->getSCUAddr()+uiIdx+uiQNumParts>pcSlice->getSliceSegmentCurStartCUAddr())&&(pcCU->getSCUAddr()+uiIdx<pcSlice->getSliceSegmentCurEndCUAddr()); 647 615 if(binSlice&&( uiLPelX < pcSlice->getSPS()->getPicWidthInLumaSamples() ) && ( uiTPelY < pcSlice->getSPS()->getPicHeightInLumaSamples() ) ) … … 649 617 xDecompressCU(pcCU, uiIdx, uiNextDepth ); 650 618 } 651 619 652 620 uiIdx += uiQNumParts; 653 621 } … … 657 625 // Residual reconstruction 658 626 m_ppcYuvResi[uiDepth]->clear(); 659 627 660 628 m_ppcCU[uiDepth]->copySubCU( pcCU, uiAbsPartIdx, uiDepth ); 661 629 662 630 switch( m_ppcCU[uiDepth]->getPredictionMode(0) ) 663 631 { 664 632 case MODE_INTER: 665 633 #if H_3D_DBBP 666 667 668 669 670 671 634 if( m_ppcCU[uiDepth]->getDBBPFlag(0) ) 635 { 636 xReconInterDBBP( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth ); 637 } 638 else 639 { 672 640 #endif 673 641 #if H_3D_INTER_SDC … … 679 647 { 680 648 #endif 681 xReconInter( m_ppcCU[uiDepth], uiDepth );649 xReconInter( m_ppcCU[uiDepth], uiDepth ); 682 650 #if H_3D_INTER_SDC 683 651 } 684 652 #endif 685 653 #if H_3D_DBBP 686 687 #endif 688 689 690 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033691 692 693 694 654 } 655 #endif 656 break; 657 case MODE_INTRA: 658 #if H_3D 659 if( m_ppcCU[uiDepth]->getDISFlag(0) ) 660 { 661 xReconDIS( m_ppcCU[uiDepth], 0, uiDepth ); 662 } 695 663 #if H_3D_DIM_SDC 696 else if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 697 { 698 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 699 } 700 #endif 701 else 702 #else 703 #if H_3D_SINGLE_DEPTH 704 if( m_ppcCU[uiDepth]->getSingleDepthFlag(0) ) 705 xReconIntraSingleDepth( m_ppcCU[uiDepth], 0, uiDepth ); 706 #if H_3D_DIM_SDC 707 else if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 708 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 709 #endif 710 else 711 #else 712 #if H_3D_DIM_SDC 713 if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 714 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 715 else 716 #endif 717 #endif 664 else if( m_ppcCU[uiDepth]->getSDCFlag(0) ) 665 { 666 xReconIntraSDC( m_ppcCU[uiDepth], 0, uiDepth ); 667 } 668 #endif 669 else 718 670 #endif 719 671 xReconIntraQT( m_ppcCU[uiDepth], uiDepth ); 720 721 722 723 672 break; 673 default: 674 assert(0); 675 break; 724 676 } 725 677 if ( m_ppcCU[uiDepth]->isLosslessCoded(0) && (m_ppcCU[uiDepth]->getIPCMFlag(0) == false)) … … 727 679 xFillPCMBuffer(m_ppcCU[uiDepth], uiDepth); 728 680 } 729 681 730 682 xCopyToPic( m_ppcCU[uiDepth], pcPic, uiAbsPartIdx, uiDepth ); 731 683 } … … 751 703 } 752 704 753 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033705 #if H_3D 754 706 Void TDecCu::xReconDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 755 707 { … … 828 780 } 829 781 } 830 #else 831 #if H_3D_SINGLE_DEPTH 832 Void TDecCu::xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 833 { 834 UInt uiWidth = pcCU->getWidth ( 0 ); 835 UInt uiHeight = pcCU->getHeight ( 0 ); 836 837 TComYuv* pcRecoYuv = m_ppcYuvReco[uiDepth]; 838 839 UInt uiStride = pcRecoYuv->getStride (); 840 Pel* piReco = pcRecoYuv->getLumaAddr( uiAbsPartIdx ); 841 842 843 AOF( uiWidth == uiHeight ); 844 AOF( uiAbsPartIdx == 0 ); 845 846 //construction of depth candidates 847 Pel testDepth; 848 Pel DepthNeighbours[2]; 849 Int index =0; 850 for( Int i = 0; (i < 2) && (index<SINGLE_DEPTH_MODE_CAND_LIST_SIZE) ; i++ ) 851 { 852 if(!pcCU->getNeighDepth (0, uiAbsPartIdx, &testDepth, i)) 853 { 854 continue; 855 } 856 DepthNeighbours[index]=testDepth; 857 index++; 858 } 859 860 if(index==0) 861 { 862 DepthNeighbours[index]=1<<(g_bitDepthY-1); 863 index++; 864 } 865 866 if(index==1) 867 { 868 DepthNeighbours[index]=ClipY(DepthNeighbours[0] + 1 ); 869 index++; 870 } 871 872 for( UInt uiY = 0; uiY < uiHeight; uiY++ ) 873 { 874 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 875 { 876 piReco[ uiX ] =DepthNeighbours[(Int)pcCU->getSingleDepthValue(uiAbsPartIdx)]; 877 } 878 piReco += uiStride; 879 } 880 881 // clear UV 882 UInt uiStrideC = pcRecoYuv->getCStride(); 883 Pel *pRecCb = pcRecoYuv->getCbAddr(); 884 Pel *pRecCr = pcRecoYuv->getCrAddr(); 885 886 for (Int y=0; y<uiHeight/2; y++) 887 { 888 for (Int x=0; x<uiWidth/2; x++) 889 { 890 pRecCb[x] = 1<<(g_bitDepthC-1); 891 pRecCr[x] = 1<<(g_bitDepthC-1); 892 } 893 894 pRecCb += uiStrideC; 895 pRecCr += uiStrideC; 896 } 897 } 898 #endif 899 #endif 900 782 #endif 901 783 #if H_3D_INTER_SDC 902 784 Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) … … 962 844 // compute mask by segmenting depth block 963 845 Bool pMask[MAX_CU_SIZE*MAX_CU_SIZE]; 964 #if HS_DBBP_CLEAN_K0048965 846 Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask, pcCU); 966 #else967 Bool bValidMask = m_pcPrediction->getSegmentMaskFromDepth(pDepthPels, uiDepthStride, pcCU->getWidth(0), pcCU->getHeight(0), pMask);968 #endif969 847 AOF(bValidMask); 970 848 971 D BBPTmpData* pDBBPTmpData = pcCU->getDBBPTmpData();849 DbbpTmpData* pDBBPTmpData = pcCU->getDBBPTmpData(); 972 850 TComYuv* apSegPredYuv[2] = { m_ppcYuvReco[uiDepth], m_ppcYuvRecoDBBP[uiDepth] }; 973 851 -
trunk/source/Lib/TLibDecoder/TDecCu.h
r1179 r1196 123 123 Void setdQPFlag ( Bool b ) { m_bDecodeDQP = b; } 124 124 Void xFillPCMBuffer (TComDataCU* pCU, UInt depth); 125 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033125 #if H_3D 126 126 Void xReconDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 127 #else128 #if H_3D_SINGLE_DEPTH129 Void xReconIntraSingleDepth( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );130 #endif131 127 #endif 132 128 #if H_3D_DIM_SDC -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r1179 r1196 52 52 m_pcEntropyDecoderIf->parseSkipFlag( pcCU, uiAbsPartIdx, uiDepth ); 53 53 } 54 55 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 54 #if H_3D 56 55 Void TDecEntropy::decodeDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 57 56 { … … 63 62 m_pcEntropyDecoderIf->parseDIS( pcCU, uiAbsPartIdx, uiDepth ); 64 63 } 65 #else66 #if H_3D_SINGLE_DEPTH67 Void TDecEntropy::decodeSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )68 {69 if( !pcCU->getSlice()->getIntraSingleFlag() )70 {71 return;72 }73 74 m_pcEntropyDecoderIf->parseSingleDepthMode( pcCU, uiAbsPartIdx, uiDepth );75 }76 #endif77 64 #endif 78 65 … … 161 148 { 162 149 m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth ); 163 #if !HHI_MOVE_SYN_K0052164 #if H_3D_DBBP165 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() )166 {167 decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth);168 }169 #endif170 #endif171 150 } 172 151 … … 176 155 { 177 156 decodeIntraDirModeLuma ( pcCU, uiAbsPartIdx, uiDepth ); 178 #if H HI_MOVE_SYN_K0052157 #if H_3D_DIM_SDC 179 158 decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth ); 180 #endif181 #if H_3D_DIM_SDC182 159 #if H_3D_DISABLE_CHROMA 183 #if !HHI_MOVE_SYN_K0052184 if(!pcCU->getSDCFlag(uiAbsPartIdx) && !pcCU->getSlice()->getIsDepth() )185 #else186 160 if(!pcCU->getSDCFlag(uiAbsPartIdx) && pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 187 #endif188 161 #else 189 162 if(!pcCU->getSDCFlag(uiAbsPartIdx)) … … 247 220 #endif 248 221 #if H_3D_SPIVMP 249 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 250 TComMvField* pcMvFieldSP; 251 UChar* puhInterDirSP; 252 pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2]; 253 puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()]; 222 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 223 TComMvField* pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2]; 224 UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()]; 254 225 #endif 255 226 for ( UInt ui = 0; ui < pcCU->getSlice()->getMaxNumMergeCand(); ui++ ) … … 265 236 pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx); 266 237 #endif 267 #if H HI_MOVE_SYN_K0052238 #if H_3D 268 239 for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) 269 240 { … … 475 446 decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth ); 476 447 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 477 #if H_3D_ARP478 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth );479 #endif480 #if H_3D_IC481 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );482 #endif483 #if H_3D_DBBP484 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 && pcCU->getDBBPFlag(uiAbsPartIdx) == false )485 #else486 448 if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 ) 487 #endif488 449 { 489 450 pcSubCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth ); 490 451 if ( !isMerged ) 491 452 { 492 #if H_3D_VSP493 Int vspFlag[MRG_MAX_NUM_CANDS_MEM];494 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);495 #if H_3D_SPIVMP496 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);497 #endif498 pcSubCU->initAvailableFlags();499 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);500 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours501 #if H_3D_SPIVMP502 , pcMvFieldSP, puhInterDirSP503 #endif504 , numValidMergeCand );505 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag506 #if H_3D_SPIVMP507 , bSPIVMPFlag508 #endif509 , numValidMergeCand );510 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );511 512 #else513 #if H_3D514 pcSubCU->initAvailableFlags();515 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);516 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );517 518 #else519 453 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 520 #endif521 #endif522 454 isMerged = true; 523 455 } … … 527 459 { 528 460 uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 529 #if H_3D_VSP530 Int vspFlag[MRG_MAX_NUM_CANDS_MEM];531 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);532 #if H_3D_SPIVMP533 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);534 #endif535 pcSubCU->initAvailableFlags();536 461 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 537 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours538 #if H_3D_SPIVMP539 , pcMvFieldSP, puhInterDirSP540 #endif541 ,numValidMergeCand, uiMergeIndex );542 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag543 #if H_3D_SPIVMP544 , bSPIVMPFlag545 #endif546 ,numValidMergeCand );547 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );548 #else549 #if H_3D550 pcSubCU->initAvailableFlags();551 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );552 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );553 #else554 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );555 #endif556 #endif557 462 } 558 463 pcCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); … … 567 472 pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( cTmpMv, ePartSize, uiSubPartIdx, uiDepth, uiPartIdx ); 568 473 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 474 } 475 } 612 476 } 613 477 else … … 623 487 } 624 488 } 625 #if H_3D_ARP626 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth );627 #endif628 #if H_3D_IC629 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );630 #endif631 489 } 632 490 if ( (pcCU->getInterDir(uiSubPartIdx) == 3) && pcSubCU->isBipredRestriction(uiPartIdx) ) … … 706 564 } 707 565 708 #if H HI_MOVE_SYN_K0052566 #if H_3D 709 567 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ) 710 568 { … … 753 611 pcSubCU->getCUMvField( eRefList )->setAllMv(cMv, ePartSize, uiPartAddr, 0, uiPartIdx); 754 612 } 755 756 613 #else 757 614 Void TDecEntropy::decodeMVPIdxPU( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ) … … 798 655 } 799 656 #endif 657 800 658 Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU) 801 659 { … … 869 727 if (pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 870 728 { 871 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) )872 {873 m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth );874 }875 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) )876 {877 m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth );878 }879 }880 else881 {729 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) ) 730 { 731 m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth, uiDepth ); 732 } 733 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth - 1 ) ) 734 { 735 m_pcEntropyDecoderIf->parseQtCbf( pcCU, uiAbsPartIdx, TEXT_CHROMA_V, uiTrDepth, uiDepth ); 736 } 737 } 738 else 739 { 882 740 if( bFirstCbfOfCU || pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth - 1 ) ) 883 741 { … … 1131 989 { 1132 990 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 1133 #if HHI_MOVE_SYN_K00521134 991 if ( pcCU->isSkipped( uiAbsPartIdx ) ) 1135 992 { 1136 993 return; 1137 994 } 1138 #endif1139 995 1140 996 … … 1157 1013 Void TDecEntropy::decodeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 1158 1014 { 1159 #if HHI_MOVE_SYN_K00521160 1015 if( pcCU->getSlice()->getDepthBasedBlkPartFlag() && (pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_2NxN || pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_Nx2N) && pcCU->getWidth(uiAbsPartIdx) > 8 && pcCU->getSlice()->getDefaultRefViewIdxAvailableFlag() ) 1161 1016 { 1162 #endif1163 1017 m_pcEntropyDecoderIf->parseDBBPFlag( pcCU, uiAbsPartIdx, uiDepth ); 1164 #if HHI_MOVE_SYN_K0052 1165 } 1166 #endif 1018 } 1167 1019 } 1168 1020 #endif -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r1179 r1196 85 85 public: 86 86 virtual Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 87 #if SEC_DEPTH_INTRA_SKIP_MODE_K003387 #if H_3D 88 88 virtual Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; 89 #else90 #if H_3D_SINGLE_DEPTH91 virtual Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;92 #endif93 89 #endif 94 90 virtual Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0; … … 152 148 Void decodeMvdPU ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 153 149 Void decodeMVPIdxPU ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 154 #if HHI_MOVE_SYN_K0052 155 Void decodeMvsAMVP ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList ); 156 #endif 150 #if H_3D 151 Void decodeMvsAMVP ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, 152 RefPicList eRefList ); 153 #endif 157 154 Void setEntropyDecoder ( TDecEntropyIf* p ); 158 155 Void setBitstream ( TComInputBitstream* p ) { m_pcEntropyDecoderIf->setBitstream(p); } … … 177 174 Void decodeSplitFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 178 175 Void decodeSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 179 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033176 #if H_3D 180 177 Void decodeDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ; 181 #else182 #if H_3D_SINGLE_DEPTH183 Void decodeSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;184 #endif185 178 #endif 186 179 Void decodeCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); -
trunk/source/Lib/TLibDecoder/TDecGop.h
r1179 r1196 63 63 // Class definition 64 64 // ==================================================================================================================== 65 #if H_3D _ANNEX_SELECTION_FIX65 #if H_3D 66 66 class TDecTop; 67 67 #endif … … 83 83 TDecSlice* m_pcSliceDecoder; 84 84 TComLoopFilter* m_pcLoopFilter; 85 #if H_3D _ANNEX_SELECTION_FIX85 #if H_3D 86 86 TDecTop* m_decTop; 87 87 #endif -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r1179 r1196 52 52 , m_cCUSplitFlagSCModel ( 1, 1, NUM_SPLIT_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels ) 53 53 , m_cCUSkipFlagSCModel ( 1, 1, NUM_SKIP_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 54 #if SEC_DEPTH_INTRA_SKIP_MODE_K003354 #if H_3D 55 55 , m_cCUDISFlagSCModel ( 1, 1, NUM_DIS_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 56 56 , m_cCUDISTypeSCModel ( 1, 1, NUM_DIS_TYPE_CTX , m_contextModels + m_numContextModels, m_numContextModels) 57 #else58 #if H_3D_SINGLE_DEPTH59 , m_cCUSingleDepthFlagSCModel ( 1, 1, NUM_SINGLEDEPTH_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels)60 , m_cSingleDepthValueSCModel ( 1, 1, NUM_SINGLE_DEPTH_VALUE_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels)61 #endif62 57 #endif 63 58 , m_cCUMergeFlagExtSCModel ( 1, 1, NUM_MERGE_FLAG_EXT_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 141 136 m_cCUSplitFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SPLIT_FLAG ); 142 137 m_cCUSkipFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SKIP_FLAG ); 143 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033138 #if H_3D 144 139 m_cCUDISFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_FLAG ); 145 140 m_cCUDISTypeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DIS_TYPE ); 146 #else147 #if H_3D_SINGLE_DEPTH148 m_cCUSingleDepthFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLEDEPTH_FLAG );149 m_cSingleDepthValueSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );150 #endif151 141 #endif 152 142 m_cCUMergeFlagExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT ); … … 217 207 m_cCUSplitFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SPLIT_FLAG ); 218 208 m_cCUSkipFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SKIP_FLAG ); 219 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033209 #if H_3D 220 210 m_cCUDISFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_FLAG ); 221 211 m_cCUDISTypeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DIS_TYPE ); 222 #else223 #if H_3D_SINGLE_DEPTH224 m_cCUSingleDepthFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLEDEPTH_FLAG );225 m_cSingleDepthValueSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SINGLE_DEPTH_VALUE_DATA );226 #endif227 212 #endif 228 213 m_cCUMergeFlagExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT ); … … 461 446 UInt uiSymbol; 462 447 463 448 m_pcTDecBinIf->decodeBinTrm(uiSymbol); 464 449 465 450 #if H_MV_ENC_DEC_TRAC 466 467 #endif 468 469 451 DTRACE_CU("pcm_flag", uiSymbol) 452 #endif 453 if (uiSymbol) 454 { 470 455 Bool bIpcmFlag = true; 471 456 … … 500 485 piPCMSample += uiWidth; 501 486 } 502 503 504 487 #if H_3D_DISABLE_CHROMA 505 488 if( pcCU->getSlice()->getSPS()->getChromaFormatIdc() != 0 ) 506 489 { 507 490 #endif 508 piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset;509 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;510 uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;511 uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();512 513 for(uiY = 0; uiY < uiHeight; uiY++)514 {515 for(uiX = 0; uiX < uiWidth; uiX++)516 {517 UInt uiSample;518 m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample);519 piPCMSample[uiX] = uiSample;520 }521 piPCMSample += uiWidth;522 }523 524 piPCMSample = pcCU->getPCMSampleCr() + uiChromaOffset;525 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2;526 uiHeight = pcCU->getHeight(uiAbsPartIdx)/2;527 uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma();528 529 for(uiY = 0; uiY < uiHeight; uiY++)530 {531 for(uiX = 0; uiX < uiWidth; uiX++)532 {533 UInt uiSample;534 m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample);535 piPCMSample[uiX] = uiSample;536 }537 piPCMSample += uiWidth;538 }491 piPCMSample = pcCU->getPCMSampleCb() + uiChromaOffset; 492 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2; 493 uiHeight = pcCU->getHeight(uiAbsPartIdx)/2; 494 uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma(); 495 496 for(uiY = 0; uiY < uiHeight; uiY++) 497 { 498 for(uiX = 0; uiX < uiWidth; uiX++) 499 { 500 UInt uiSample; 501 m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample); 502 piPCMSample[uiX] = uiSample; 503 } 504 piPCMSample += uiWidth; 505 } 506 507 piPCMSample = pcCU->getPCMSampleCr() + uiChromaOffset; 508 uiWidth = pcCU->getWidth(uiAbsPartIdx)/2; 509 uiHeight = pcCU->getHeight(uiAbsPartIdx)/2; 510 uiSampleBits = pcCU->getSlice()->getSPS()->getPCMBitDepthChroma(); 511 512 for(uiY = 0; uiY < uiHeight; uiY++) 513 { 514 for(uiX = 0; uiX < uiWidth; uiX++) 515 { 516 UInt uiSample; 517 m_pcTDecBinIf->xReadPCMCode(uiSampleBits, uiSample); 518 piPCMSample[uiX] = uiSample; 519 } 520 piPCMSample += uiWidth; 521 } 539 522 #if H_3D_DISABLE_CHROMA 540 523 } 541 524 #endif 542 543 544 525 m_pcTDecBinIf->start(); 545 526 } … … 594 575 #endif 595 576 } 596 597 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033 577 #if H_3D 598 578 Void TDecSbac::parseDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 599 579 { … … 639 619 } 640 620 } 641 #else 642 #if H_3D_SINGLE_DEPTH 643 Void TDecSbac::parseSingleDepthMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 644 { 645 pcCU->setSingleDepthFlagSubParts( false, uiAbsPartIdx, uiDepth ); 646 UInt uiSymbol = 0; 647 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUSingleDepthFlagSCModel.get( 0, 0, 0 ) ); 648 if( uiSymbol ) 649 { 650 pcCU->setSingleDepthFlagSubParts( true, uiAbsPartIdx, uiDepth ); 651 pcCU->setSkipFlagSubParts( false, uiAbsPartIdx, uiDepth ); 652 pcCU->setSDCFlagSubParts( false, uiAbsPartIdx, uiDepth ); 653 pcCU->setPredModeSubParts( MODE_INTRA, uiAbsPartIdx, uiDepth ); 654 pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth ); 655 pcCU->setLumaIntraDirSubParts (DC_IDX, uiAbsPartIdx, uiDepth ); 656 pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 657 pcCU->setMergeFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 658 pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth); 659 pcCU->setCbfSubParts(0, 1, 1, uiAbsPartIdx, uiDepth); 660 661 UInt absValDeltaDC = 0; 662 663 UInt uiUnaryIdx = 0; 664 UInt uiNumCand = SINGLE_DEPTH_MODE_CAND_LIST_SIZE; 665 if ( uiNumCand > 1 ) 666 { 667 for( ; uiUnaryIdx < uiNumCand - 1; ++uiUnaryIdx ) 668 { 669 UInt uiSymbol2 = 0; 670 if ( uiUnaryIdx==0 ) 671 { 672 m_pcTDecBinIf->decodeBin( uiSymbol2, m_cSingleDepthValueSCModel.get( 0, 0, 0 ) ); 673 } 674 else 675 { 676 m_pcTDecBinIf->decodeBinEP( uiSymbol2); 677 } 678 if( uiSymbol2 == 0 ) 679 { 680 break; 681 } 682 } 683 } 684 absValDeltaDC = uiUnaryIdx; 685 pcCU->setSingleDepthValueSubParts((Pel)absValDeltaDC,uiAbsPartIdx, 0, uiDepth); 686 } 687 } 688 #endif 689 #endif 690 621 #endif 691 622 /** parse merge flag 692 623 * \param pcCU … … 772 703 #if H_3D_QTLPC 773 704 Bool bParseSplitFlag = true; 774 775 776 705 Bool bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag(); 777 706 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); … … 810 739 #endif 811 740 pcCU->setDepthSubParts( uiDepth + uiSymbol, uiAbsPartIdx ); 812 741 813 742 return; 814 743 } … … 827 756 #if H_3D_QTLPC 828 757 Bool bParsePartSize = true; 829 758 830 759 Bool bLimQtPredFlag = pcCU->getPic()->getSlice(0)->getQtPredFlag(); 831 760 TComPic *pcTexture = pcCU->getSlice()->getTexturePic(); … … 859 788 #endif 860 789 861 790 862 791 if ( pcCU->isIntra( uiAbsPartIdx ) ) 863 792 { … … 866 795 { 867 796 #endif 868 uiSymbol = 1;797 uiSymbol = 1; 869 798 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth ) 870 799 { … … 899 828 { 900 829 #endif 901 UInt uiMaxNumBits = 2; 902 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) ) 903 { 904 uiMaxNumBits ++; 905 } 906 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 907 { 908 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 909 if ( uiSymbol ) 910 { 911 break; 912 } 913 uiMode++; 914 } 915 eMode = (PartSize) uiMode; 916 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 917 { 918 if (eMode == SIZE_2NxN) 919 { 920 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 )); 921 if (uiSymbol == 0) 830 UInt uiMaxNumBits = 2; 831 if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth && !( (g_uiMaxCUWidth>>uiDepth) == 8 && (g_uiMaxCUHeight>>uiDepth) == 8 ) ) 832 { 833 uiMaxNumBits ++; 834 } 835 for ( UInt ui = 0; ui < uiMaxNumBits; ui++ ) 836 { 837 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, ui) ); 838 if ( uiSymbol ) 922 839 { 923 m_pcTDecBinIf->decodeBinEP(uiSymbol); 924 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 840 break; 925 841 } 926 } 927 else if (eMode == SIZE_Nx2N) 928 { 929 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 )); 930 if (uiSymbol == 0) 842 uiMode++; 843 } 844 eMode = (PartSize) uiMode; 845 if ( pcCU->getSlice()->getSPS()->getAMPAcc( uiDepth ) ) 846 { 847 if (eMode == SIZE_2NxN) 931 848 { 932 m_pcTDecBinIf->decodeBinEP(uiSymbol); 933 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 849 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 )); 850 if (uiSymbol == 0) 851 { 852 m_pcTDecBinIf->decodeBinEP(uiSymbol); 853 eMode = (uiSymbol == 0? SIZE_2NxnU : SIZE_2NxnD); 854 } 934 855 } 935 } 936 } 856 else if (eMode == SIZE_Nx2N) 857 { 858 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 )); 859 if (uiSymbol == 0) 860 { 861 m_pcTDecBinIf->decodeBinEP(uiSymbol); 862 eMode = (uiSymbol == 0? SIZE_nLx2N : SIZE_nRx2N); 863 } 864 } 865 } 937 866 #if H_3D_QTLPC 938 867 } … … 1060 989 { 1061 990 #endif 1062 m_pcTDecBinIf->decodeBin( symbol, m_cCUIntraPredSCModel.get( 0, 0, 0) );1063 mpmPred[j] = symbol;991 m_pcTDecBinIf->decodeBin( symbol, m_cCUIntraPredSCModel.get( 0, 0, 0) ); 992 mpmPred[j] = symbol; 1064 993 #if H_MV_ENC_DEC_TRAC 1065 DTRACE_CU("prev_intra_luma_pred_flag", symbol)994 DTRACE_CU("prev_intra_luma_pred_flag", symbol) 1066 995 #endif 1067 996 #if H_3D_DIM … … 1075 1004 { 1076 1005 #endif 1077 Int preds[3] = {-1, -1, -1}; 1078 Int predNum = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds); 1079 if (mpmPred[j]) 1080 { 1081 m_pcTDecBinIf->decodeBinEP( symbol ); 1082 if (symbol) 1006 Int preds[3] = {-1, -1, -1}; 1007 Int predNum = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds); 1008 if (mpmPred[j]) 1083 1009 { 1084 1010 m_pcTDecBinIf->decodeBinEP( symbol ); 1085 symbol++; 1086 } 1011 if (symbol) 1012 { 1013 m_pcTDecBinIf->decodeBinEP( symbol ); 1014 symbol++; 1015 } 1087 1016 #if H_MV_ENC_DEC_TRAC 1088 DTRACE_CU("mpm_idx", symbol)1089 #endif 1090 intraPredMode = preds[symbol];1091 }1092 else1093 {1094 m_pcTDecBinIf->decodeBinsEP( symbol, 5 );1095 intraPredMode = symbol;1017 DTRACE_CU("mpm_idx", symbol) 1018 #endif 1019 intraPredMode = preds[symbol]; 1020 } 1021 else 1022 { 1023 m_pcTDecBinIf->decodeBinsEP( symbol, 5 ); 1024 intraPredMode = symbol; 1096 1025 #if H_MV_ENC_DEC_TRAC 1097 DTRACE_CU("rem_intra_luma_pred_mode", symbol)1026 DTRACE_CU("rem_intra_luma_pred_mode", symbol) 1098 1027 #endif 1099 //postponed sorting of MPMs (only in remaining branch)1100 if (preds[0] > preds[1])1101 {1102 std::swap(preds[0], preds[1]);1103 }1104 if (preds[0] > preds[2])1105 {1106 std::swap(preds[0], preds[2]);1107 }1108 if (preds[1] > preds[2])1109 {1110 std::swap(preds[1], preds[2]);1111 }1112 for ( Int i = 0; i < predNum; i++ )1113 {1114 intraPredMode += ( intraPredMode >= preds[i] );1115 }1116 }1117 pcCU->setLumaIntraDirSubParts( (UChar)intraPredMode, absPartIdx+partOffset*j, depth );1028 //postponed sorting of MPMs (only in remaining branch) 1029 if (preds[0] > preds[1]) 1030 { 1031 std::swap(preds[0], preds[1]); 1032 } 1033 if (preds[0] > preds[2]) 1034 { 1035 std::swap(preds[0], preds[2]); 1036 } 1037 if (preds[1] > preds[2]) 1038 { 1039 std::swap(preds[1], preds[2]); 1040 } 1041 for ( Int i = 0; i < predNum; i++ ) 1042 { 1043 intraPredMode += ( intraPredMode >= preds[i] ); 1044 } 1045 } 1046 pcCU->setLumaIntraDirSubParts( (UChar)intraPredMode, absPartIdx+partOffset*j, depth ); 1118 1047 #if H_3D_DIM 1119 1048 } … … 1133 1062 DTRACE_CU("intra_chroma_pred_mode", uiSymbol ) 1134 1063 #endif 1135 uiSymbol = DM_CHROMA_IDX;1064 uiSymbol = DM_CHROMA_IDX; 1136 1065 } 1137 1066 else … … 1143 1072 DTRACE_CU("intra_chroma_pred_mode", uiIPredMode ) 1144 1073 #endif 1145 UInt uiAllowedChromaDir[ NUM_CHROMA_MODE ];1074 UInt uiAllowedChromaDir[ NUM_CHROMA_MODE ]; 1146 1075 pcCU->getAllowedChromaDir( uiAbsPartIdx, uiAllowedChromaDir ); 1147 1076 uiSymbol = uiAllowedChromaDir[ uiIPredMode ]; -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r1179 r1196 125 125 126 126 Void parseSkipFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 127 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033127 #if H_3D 128 128 Void parseDIS ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); 129 #else130 #if H_3D_SINGLE_DEPTH131 Void parseSingleDepthMode ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );132 #endif133 129 #endif 134 130 Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ); … … 182 178 ContextModel3DBuffer m_cCUSplitFlagSCModel; 183 179 ContextModel3DBuffer m_cCUSkipFlagSCModel; 184 #if SEC_DEPTH_INTRA_SKIP_MODE_K0033180 #if H_3D 185 181 ContextModel3DBuffer m_cCUDISFlagSCModel; 186 182 ContextModel3DBuffer m_cCUDISTypeSCModel; 187 #else188 #if H_3D_SINGLE_DEPTH189 ContextModel3DBuffer m_cCUSingleDepthFlagSCModel;190 ContextModel3DBuffer m_cSingleDepthValueSCModel;191 #endif192 183 #endif 193 184 ContextModel3DBuffer m_cCUMergeFlagExtSCModel; -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r1179 r1196 76 76 xDeleteArray( m_adBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 77 77 xDeleteArray( m_aiBaseViewShiftLUT, MAX_NUM_LAYERS, MAX_NUM_LAYERS, 2 ); 78 #if HHI_CAM_PARA_K005279 78 xDeleteArray( m_receivedIdc, m_vps->getNumViews() ); 80 #else81 xDeleteArray( m_receivedIdc, m_uiMaxViewIndex + 1 );82 #endif83 79 } 84 80 … … 95 91 m_firstReceivedPoc = -2; 96 92 97 #if HHI_CAM_PARA_K005298 93 for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++) 99 94 { … … 134 129 } 135 130 136 #else137 m_uiMaxViewIndex = -1;138 for (Int i = 0; i <= vps->getMaxLayersMinus1(); i++)139 {140 Int curViewIdx = m_vps->getViewIndex( m_vps->getLayerIdInNuh( i ));141 m_bCamParsVaryOverTime = m_bCamParsVaryOverTime || vps->hasCamParInSliceHeader( curViewIdx );142 m_uiMaxViewIndex = std::max( m_uiMaxViewIndex, curViewIdx ) ;143 }144 assert( m_receivedIdc == NULL );145 m_receivedIdc = new Int*[ m_uiMaxViewIndex + 1];146 for (Int i = 0; i <= m_uiMaxViewIndex; i++)147 {148 m_receivedIdc[i] = new Int[ m_uiMaxViewIndex + 1 ];149 }150 151 xResetReceivedIdc( true );152 153 for (Int viewIndex = 0; viewIndex <= m_uiMaxViewIndex ; viewIndex++ )154 {155 if (m_vps->getCamParPresent( viewIndex ) )156 {157 if( !m_vps->hasCamParInSliceHeader( viewIndex ) )158 {159 for (Int baseViewIndex = 0; baseViewIndex < viewIndex ; baseViewIndex++ )160 {161 m_receivedIdc [ baseViewIndex ][ viewIndex ] = -1;162 m_aaiCodedScale [ baseViewIndex ][ viewIndex ] = m_vps->getCodedScale (viewIndex) [ baseViewIndex ];163 m_aaiCodedOffset[ baseViewIndex ][ viewIndex ] = m_vps->getCodedOffset (viewIndex) [ baseViewIndex ];164 165 m_receivedIdc [ viewIndex ][ baseViewIndex ] = -1;166 m_aaiCodedScale [ viewIndex ][ baseViewIndex ] = m_vps->getInvCodedScale (viewIndex) [ baseViewIndex ];167 m_aaiCodedOffset[ viewIndex ][ baseViewIndex ] = m_vps->getInvCodedOffset(viewIndex) [ baseViewIndex ];168 xInitLUTs( baseViewIndex, viewIndex, m_aaiCodedScale[ baseViewIndex ][ viewIndex ], m_aaiCodedOffset[ baseViewIndex ][ viewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );169 xInitLUTs( viewIndex, baseViewIndex, m_aaiCodedScale[ viewIndex ][ baseViewIndex ], m_aaiCodedOffset[ viewIndex ][ baseViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT );170 }171 }172 }173 }174 }175 176 #endif177 131 178 132 … … 181 135 CamParsCollector::xResetReceivedIdc( Bool overWriteFlag ) 182 136 { 183 #if HHI_CAM_PARA_K0052184 137 for (Int i = 0; i < m_vps->getNumViews(); i++) 185 138 { 186 139 for (Int j = 0; j < m_vps->getNumViews(); j++) 187 140 { 188 #else189 for (Int i = 0; i <= m_uiMaxViewIndex; i++)190 {191 for (Int j = 0; j <= m_uiMaxViewIndex; j++)192 {193 #endif194 141 if ( overWriteFlag || ( m_receivedIdc[i][j] != -1 ) ) 195 142 { … … 232 179 CamParsCollector::xInitLUTs( UInt uiSourceView, UInt uiTargetView, Int iScale, Int iOffset, Double****& radLUT, Int****& raiLUT) 233 180 { 234 #if HHI_CAM_PARA_K0052235 181 Int iLog2DivLuma = m_uiBitDepthForLUT + m_vps->getCpPrecision() + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 ); 236 #else237 Int iLog2DivLuma = m_uiBitDepthForLUT + m_vps->getCamParPrecision() + 1 - m_iLog2Precision; AOF( iLog2DivLuma > 0 );238 #endif239 182 Int iLog2DivChroma = iLog2DivLuma + 1; 240 183 … … 313 256 } 314 257 315 #if HHI_CAM_PARA_K0052316 258 UInt voiInVps = m_vps->getVoiInVps(pcSlice->getViewIndex()); 317 259 if( m_vps->getCpInSliceSegmentHeaderFlag( voiInVps ) ) // check consistency of slice parameters here … … 348 290 } 349 291 } 350 #else351 UInt uiViewIndex = pcSlice->getViewIndex();352 if( m_vps->getCamParPresent( uiViewIndex ) )353 {354 if( m_vps->hasCamParInSliceHeader( uiViewIndex ) ) // check consistency of slice parameters here355 {356 for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ )357 {358 if ( m_receivedIdc[ uiViewIndex ][ uiBaseViewIndex ] != 0 )359 {360 AOF( m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedScale () [ uiBaseViewIndex ] );361 AOF( m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ] == pcSlice->getInvCodedOffset() [ uiBaseViewIndex ] );362 }363 else364 {365 m_receivedIdc [ uiViewIndex ][ uiBaseViewIndex ] = 1;366 m_aaiCodedScale [ uiViewIndex ][ uiBaseViewIndex ] = pcSlice->getInvCodedScale () [ uiBaseViewIndex ];367 m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ] = pcSlice->getInvCodedOffset() [ uiBaseViewIndex ];368 xInitLUTs( uiViewIndex, uiBaseViewIndex, m_aaiCodedScale[ uiViewIndex ][ uiBaseViewIndex ], m_aaiCodedOffset[ uiViewIndex ][ uiBaseViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);369 }370 if ( m_receivedIdc[ uiBaseViewIndex ][ uiViewIndex ] != 0 )371 {372 AOF( m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedScale () [ uiBaseViewIndex ] );373 AOF( m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ] == pcSlice->getCodedOffset () [ uiBaseViewIndex ] );374 }375 else376 {377 m_receivedIdc [ uiBaseViewIndex ][ uiViewIndex ] = 1;378 m_aaiCodedScale [ uiBaseViewIndex ][ uiViewIndex ] = pcSlice->getCodedScale () [ uiBaseViewIndex ];379 m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ] = pcSlice->getCodedOffset () [ uiBaseViewIndex ];380 xInitLUTs( uiBaseViewIndex, uiViewIndex, m_aaiCodedScale[ uiBaseViewIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseViewIndex ][ uiViewIndex ], m_adBaseViewShiftLUT, m_aiBaseViewShiftLUT);381 }382 }383 }384 }385 #endif386 387 388 292 } 389 293 … … 408 312 if( iPOC == m_firstReceivedPoc ) 409 313 { 410 #if HHI_CAM_PARA_K0052411 314 fprintf( m_pCodedScaleOffsetFile, "#ViewOrderIdx ViewIdVal\n" ); 412 315 fprintf( m_pCodedScaleOffsetFile, "#------------ -------------\n" ); … … 436 339 m_aaiCodedScale [ baseVoiInVps ][ voiInVps ], 437 340 m_aaiCodedOffset[ baseVoiInVps ][ voiInVps ], m_vps->getCpPrecision() ); 438 #else439 fprintf( m_pCodedScaleOffsetFile, "# ViewIndex ViewId\n" );440 fprintf( m_pCodedScaleOffsetFile, "#----------- ------------\n" );441 for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )442 {443 fprintf( m_pCodedScaleOffsetFile, "%12d %12d\n", uiViewIndex, m_vps->getViewIdVal( uiViewIndex ) );444 }445 fprintf( m_pCodedScaleOffsetFile, "\n\n");446 fprintf( m_pCodedScaleOffsetFile, "# StartFrame EndFrame TargetView BaseView CodedScale CodedOffset Precision\n" );447 fprintf( m_pCodedScaleOffsetFile, "#----------- ------------ ------------ ------------ ------------ ------------ ------------\n" );448 }449 if( iPOC == m_firstReceivedPoc || m_bCamParsVaryOverTime )450 {451 Int iS = iPOC;452 Int iE = ( m_bCamParsVaryOverTime ? iPOC : ~( 1 << 31 ) );453 #if HHI_CAM_PARA_K0052454 for( UInt uiViewIndex = 0; uiViewIndex < m_vps->getNumViews(); uiViewIndex++ )455 {456 for( UInt uiBaseIndex = 0; uiBaseIndex < m_vps->getNumViews(); uiBaseIndex++ )457 #else458 for( UInt uiViewIndex = 0; uiViewIndex <= m_uiMaxViewIndex; uiViewIndex++ )459 {460 for( UInt uiBaseIndex = 0; uiBaseIndex <= m_uiMaxViewIndex; uiBaseIndex++ )461 #endif462 {463 if( uiViewIndex != uiBaseIndex )464 {465 if ( m_receivedIdc[uiBaseIndex][uiViewIndex] != 0 )466 {467 #if HHI_CAM_PARA_K0052468 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",469 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCpPrecision() );470 #else471 fprintf( m_pCodedScaleOffsetFile, "%12d %12d %12d %12d %12d %12d %12d\n",472 iS, iE, uiViewIndex, uiBaseIndex, m_aaiCodedScale[ uiBaseIndex ][ uiViewIndex ], m_aaiCodedOffset[ uiBaseIndex ][ uiViewIndex ], m_vps->getCamParPrecision() );473 #endif474 #endif475 341 } 476 342 } … … 481 347 } 482 348 #endif 349 483 350 TDecTop::TDecTop() 484 351 { … … 556 423 initROM(); 557 424 #endif 558 #if H_3D _ANNEX_SELECTION_FIX425 #if H_3D 559 426 m_cCavlcDecoder.setDecTop( this ); 560 427 #endif … … 867 734 868 735 #endif 869 #if H_3D870 #if !HHI_INTER_COMP_PRED_K0052871 m_apcSlicePilot->init3dToolParameters();872 #endif873 #endif874 736 pps->setSPS(sps); 875 737 pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumTileColumnsMinus1() + 1) : 1); … … 1098 960 xActivateParameterSets(); 1099 961 1100 #if SONY_MV_V_CONST_C0078962 #if H_MV 1101 963 //Check Multiview Main profile constraint in G.11.1.1 1102 964 // When ViewOrderIdx[ i ] derived according to any active VPS is equal to 1 … … 1230 1092 pcPic->setViewIndex( getViewIndex() ); 1231 1093 pcPic->setIsDepth ( getIsDepth () ); 1232 #endif1233 #endif1234 #if HHI_RES_PRED_K00521235 1094 pcSlice->setIvPicLists( m_ivPicLists ); 1236 1095 #endif 1096 #endif 1097 1098 1099 1237 1100 1238 1101 if (bNextSlice) … … 1271 1134 1272 1135 #if H_3D 1273 #if !HHI_RES_PRED_K00521274 pcSlice->setIvPicLists( m_ivPicLists );1275 #endif1276 1277 #if HHI_INTER_COMP_PRED_K00521278 1136 pcSlice->checkInCompPredRefLayers(); 1279 1137 #if H_3D_IV_MERGE … … 1284 1142 #endif 1285 1143 #endif 1286 #else1287 #if H_3D_IV_MERGE1288 #if H_3D_FCO1289 //assert( !getIsDepth() );1290 #else1291 assert( !getIsDepth() || ( pcSlice->getTexturePic() != 0 ) );1292 #endif1293 #endif1294 #endif1295 1144 #endif 1296 1145 #if H_MV … … 1347 1196 #if H_3D_TMVP 1348 1197 if(pcSlice->getLayerId()) 1198 { 1349 1199 pcSlice->generateAlterRefforTMVP(); 1200 } 1350 1201 #endif 1351 1202 } … … 1800 1651 } 1801 1652 1802 #if H_MV1803 1653 Void TDecTop::xCeckNoClrasOutput() 1804 1654 { … … 1834 1684 return allRefLayersInitilizedFlag; 1835 1685 } 1686 1687 #if H_3D 1688 Void TDecTop::setProfileIdc() 1689 { 1690 if (m_targetOptLayerSetIdx != -1 ) 1691 { 1692 TComVPS* vps = getPrefetchedVPS(); 1693 Int lsIdx = vps->olsIdxToLsIdx( m_targetOptLayerSetIdx ); 1694 Int lIdx = -1; 1695 for (Int j = 0; j < vps->getNumLayersInIdList( lsIdx ); j++ ) 1696 { 1697 if ( vps->getLayerSetLayerIdList( lsIdx, j ) == getLayerId() ) 1698 { 1699 lIdx = j; 1700 break; 1701 } 1702 } 1703 assert( lIdx != -1 ); 1704 1705 Int profileIdc = vps->getPTL( vps->getProfileTierLevelIdx( m_targetOptLayerSetIdx, lIdx ) )->getGeneralPTL()->getProfileIdc(); 1706 assert( profileIdc == 1 || profileIdc == 6 || profileIdc == 8 ); 1707 m_profileIdc = profileIdc; 1708 }; 1709 } 1836 1710 #endif 1837 1711 #endif -
trunk/source/Lib/TLibDecoder/TDecTop.h
r1179 r1196 97 97 TComVPS* m_vps; 98 98 Int** m_receivedIdc; 99 #if!HHI_CAM_PARA_K0052100 Int m_uiMaxViewIndex;101 #endif102 99 Int m_lastPoc; 103 100 Int m_firstReceivedPoc; … … 244 241 Bool m_isDepth; 245 242 CamParsCollector* m_pcCamParsCollector; 246 #endif247 #if H_3D_ANNEX_SELECTION_FIX248 243 Int m_profileIdc; 249 244 #endif … … 305 300 Bool getIsDepth () { return m_isDepth; } 306 301 Void setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; } 307 #endif 308 #if H_3D_ANNEX_SELECTION_FIX 309 Void setProfileIdc() 310 { 311 if (m_targetOptLayerSetIdx != -1 ) 312 { 313 TComVPS* vps = getPrefetchedVPS(); 314 Int lsIdx = vps->olsIdxToLsIdx( m_targetOptLayerSetIdx ); 315 Int lIdx = -1; 316 for (Int j = 0; j < vps->getNumLayersInIdList( lsIdx ); j++ ) 317 { 318 if ( vps->getLayerSetLayerIdList( lsIdx, j ) == getLayerId() ) 319 { 320 lIdx = j; 321 break; 322 } 323 } 324 assert( lIdx != -1 ); 325 326 Int profileIdc = vps->getPTL( vps->getProfileTierLevelIdx( m_targetOptLayerSetIdx, lIdx ) )->getGeneralPTL()->getProfileIdc(); 327 assert( profileIdc == 1 || profileIdc == 6 || profileIdc == 8 ); 328 m_profileIdc = profileIdc; 329 }; 330 } 302 303 Void setProfileIdc(); 331 304 Bool decProcAnnexI() { assert( m_profileIdc != -1 ); return ( m_profileIdc == 8); } 332 305 #endif 333 334 306 #endif 335 307 protected:
Note: See TracChangeset for help on using the changeset viewer.