Changeset 976 in 3DVCSoftware
- Timestamp:
- 7 Jul 2014, 17:27:51 (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 2 deleted
- 41 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppDecoder/TAppDecTop.cpp
r964 r976 71 71 #endif 72 72 73 #if H_MV _HLS_7_VPS_P0300_2773 #if H_MV 74 74 m_markedForOutput = false; 75 75 #endif … … 161 161 Int pocLastPic = -MAX_INT; 162 162 163 #if H_MV_HLS_7_VPS_P0300_27164 163 Int layerIdLastPic = -MAX_INT; 165 #endif166 164 Int layerIdCurrPic = 0; 167 165 … … 216 214 || (nalu.m_nalUnitType == NAL_UNIT_VPS && nalu.m_layerId > 0) 217 215 || (nalu.m_nalUnitType == NAL_UNIT_EOB && nalu.m_layerId > 0) 218 #if H_MV_HLS_8_MIS_Q0177_47219 216 || (nalu.m_nalUnitType == NAL_UNIT_EOS && nalu.m_layerId > 0) 220 #endif221 217 ) 222 218 { … … 237 233 // - nalu.isSlice() == true 238 234 239 #if H_MV_HLS_7_VPS_P0300_27240 235 if ( nalu.m_nalUnitType == NAL_UNIT_VPS ) 241 236 { … … 244 239 { 245 240 TComVPS* vps = m_vps; 246 #else247 // Update TargetDecLayerIdList only when not specified by layer id file, specification by file might actually out of conformance.248 if (nalu.m_nalUnitType == NAL_UNIT_VPS && m_targetDecLayerIdSetFileEmpty )249 {250 TComVPS* vps = m_tDecTop[decIdx]->getPrefetchedVPS();251 #endif252 241 if ( m_targetOptLayerSetIdx == -1 ) 253 242 { … … 255 244 m_targetOptLayerSetIdx = vps->getVpsNumLayerSetsMinus1(); 256 245 } 257 #if H_MV_HLS_8_HRD_Q0102_08 246 258 247 for (Int dI = 0; dI < m_numDecoders; dI++ ) 259 248 { 260 249 m_tDecTop[decIdx]->setTargetOptLayerSetIdx( m_targetOptLayerSetIdx ); 261 250 } 262 #endif263 251 264 252 if ( m_targetOptLayerSetIdx < 0 || m_targetOptLayerSetIdx >= vps->getNumOutputLayerSets() ) … … 269 257 m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx ); 270 258 } 271 #if H_MV_HLS_7_VPS_P0300_27 272 } 273 #endif 259 } 274 260 #if H_3D 275 261 if (nalu.m_nalUnitType == NAL_UNIT_VPS ) … … 289 275 if ( bNewPicture || !bitstreamFile ) 290 276 { 291 #if H_MV_HLS_7_VPS_P0300_27292 277 layerIdLastPic = layerIdCurrPic; 293 #endif294 278 layerIdCurrPic = nalu.m_layerId; 295 279 pocLastPic = pocCurrPic; … … 340 324 assert( decIdxLastPic != -1 ); 341 325 m_tDecTop[decIdxLastPic]->endPicDecoding(poc, pcListPic, m_targetDecLayerIdSet ); 342 #if H_MV_HLS_7_VPS_P0300_27343 326 xMarkForOutput( allLayersDecoded, poc, layerIdLastPic ); 344 #endif345 327 #else 346 328 m_cTDecTop.executeLoopFilters(poc, pcListPic); … … 664 646 const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window(); 665 647 648 const Bool isTff = pcPicTop->isTopField(); 649 #if H_MV 650 assert( conf .getScaledFlag() ); 651 assert( defDisp.getScaledFlag() ); 652 #if ENC_DEC_TRACE 653 g_bJustDoIt = true; 654 writeToTraceFile( "OutputPic Poc" , pcPic->getPOC (), g_decTracePicOutput ); 655 writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput ); 656 g_bJustDoIt = false; 657 #endif 658 m_tVideoIOYuvReconFile[decIdx]->write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), 659 #else 660 m_cTVideoIOYuvReconFile.write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), 661 #endif 662 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 663 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 664 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 665 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), isTff ); 666 } 667 668 // update POC of display order 669 #if H_MV 670 m_pocLastDisplay[decIdx] = pcPic->getPOC(); 671 #else 672 m_iPOCLastDisplay = pcPicBottom->getPOC(); 673 #endif 674 675 // erase non-referenced picture in the reference picture list after display 676 if ( !pcPicTop->getSlice(0)->isReferenced() && pcPicTop->getReconMark() == true ) 677 { 678 #if !DYN_REF_FREE 679 pcPicTop->setReconMark(false); 680 681 // mark it should be extended later 682 pcPicTop->getPicYuvRec()->setBorderExtension( false ); 683 684 #else 685 pcPicTop->destroy(); 686 pcListPic->erase( iterPic ); 687 iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised! 688 continue; 689 #endif 690 } 691 if ( !pcPicBottom->getSlice(0)->isReferenced() && pcPicBottom->getReconMark() == true ) 692 { 693 #if !DYN_REF_FREE 694 pcPicBottom->setReconMark(false); 695 696 // mark it should be extended later 697 pcPicBottom->getPicYuvRec()->setBorderExtension( false ); 698 699 #else 700 pcPicBottom->destroy(); 701 pcListPic->erase( iterPic ); 702 iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised! 703 continue; 704 #endif 705 } 706 pcPicTop->setOutputMark(false); 707 pcPicBottom->setOutputMark(false); 708 } 709 } 710 } 711 else if (!pcPic->isField()) //Frame Decoding 712 { 713 iterPic = pcListPic->begin(); 714 while (iterPic != pcListPic->end()) 715 { 716 pcPic = *(iterPic); 717 718 #if H_MV 719 if(pcPic->getOutputMark() && pcPic->getPOC() > m_pocLastDisplay[decIdx] && 720 (numPicsNotYetDisplayed > numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid)) 721 #else 722 if(pcPic->getOutputMark() && pcPic->getPOC() > m_iPOCLastDisplay && 723 (numPicsNotYetDisplayed > numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid)) 724 #endif 725 { 726 // write to file 727 numPicsNotYetDisplayed--; 728 if(pcPic->getSlice(0)->isReferenced() == false) 729 { 730 dpbFullness--; 731 } 732 #if H_MV 733 if ( m_pchReconFiles[decIdx] ) 734 #else 735 if ( m_pchReconFile ) 736 #endif 737 { 738 const Window &conf = pcPic->getConformanceWindow(); 739 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 740 #if H_MV 741 assert( conf .getScaledFlag() ); 742 assert( defDisp.getScaledFlag() ); 743 #if ENC_DEC_TRACE 744 g_bJustDoIt = true; 745 writeToTraceFile( "OutputPic Poc" , pcPic->getPOC (), g_decTracePicOutput ); 746 writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput ); 747 g_bJustDoIt = false; 748 #endif 749 m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(), 750 #else 751 m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec(), 752 #endif 753 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(), 754 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(), 755 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(), 756 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() ); 757 } 758 759 // update POC of display order 760 #if H_MV 761 m_pocLastDisplay[decIdx] = pcPic->getPOC(); 762 #else 763 m_iPOCLastDisplay = pcPic->getPOC(); 764 #endif 765 766 // erase non-referenced picture in the reference picture list after display 767 if ( !pcPic->getSlice(0)->isReferenced() && pcPic->getReconMark() == true ) 768 { 769 #if !DYN_REF_FREE 770 pcPic->setReconMark(false); 771 772 // mark it should be extended later 773 pcPic->getPicYuvRec()->setBorderExtension( false ); 774 775 #else 776 pcPic->destroy(); 777 pcListPic->erase( iterPic ); 778 iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised! 779 continue; 780 #endif 781 } 782 pcPic->setOutputMark(false); 783 #if H_MV 784 pcPic->setPicOutputFlag(false); 785 #endif 786 } 787 788 iterPic++; 789 } 790 } 791 } 792 /** \param pcListPic list of pictures to be written to file 793 \todo DYN_REF_FREE should be revised 794 */ 795 #if H_MV 796 Void TAppDecTop::xFlushOutput( TComList<TComPic*>* pcListPic, Int decIdx ) 797 #else 798 Void TAppDecTop::xFlushOutput( TComList<TComPic*>* pcListPic ) 799 #endif 800 { 801 if(!pcListPic || pcListPic->empty()) 802 { 803 return; 804 } 805 TComList<TComPic*>::iterator iterPic = pcListPic->begin(); 806 807 iterPic = pcListPic->begin(); 808 TComPic* pcPic = *(iterPic); 809 810 if (pcPic->isField()) //Field Decoding 811 { 812 TComList<TComPic*>::iterator endPic = pcListPic->end(); 813 endPic--; 814 TComPic *pcPicTop, *pcPicBottom = NULL; 815 while (iterPic != endPic) 816 { 817 pcPicTop = *(iterPic); 818 iterPic++; 819 pcPicBottom = *(iterPic); 820 821 if ( pcPicTop->getOutputMark() && pcPicBottom->getOutputMark() && !(pcPicTop->getPOC()%2) && (pcPicBottom->getPOC() == pcPicTop->getPOC()+1) ) 822 { 823 // write to file 824 #if H_MV 825 if ( m_pchReconFiles[decIdx] ) 826 #else 827 if ( m_pchReconFile ) 828 #endif 829 { 830 const Window &conf = pcPicTop->getConformanceWindow(); 831 const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window(); 666 832 const Bool isTff = pcPicTop->isTopField(); 667 833 #if H_MV … … 686 852 // update POC of display order 687 853 #if H_MV 688 m_pocLastDisplay[decIdx] = pcPic->getPOC(); 689 #else 690 m_iPOCLastDisplay = pcPicBottom->getPOC(); 691 #endif 692 854 m_pocLastDisplay[decIdx] = pcPic->getPOC(); 855 #else 856 m_iPOCLastDisplay = pcPicBottom->getPOC(); 857 #endif 693 858 // erase non-referenced picture in the reference picture list after display 694 859 if ( !pcPicTop->getSlice(0)->isReferenced() && pcPicTop->getReconMark() == true ) … … 724 889 pcPicTop->setOutputMark(false); 725 890 pcPicBottom->setOutputMark(false); 726 } 727 } 728 } 729 else if (!pcPic->isField()) //Frame Decoding 730 { 731 iterPic = pcListPic->begin(); 891 892 #if !DYN_REF_FREE 893 if(pcPicTop) 894 { 895 pcPicTop->destroy(); 896 delete pcPicTop; 897 pcPicTop = NULL; 898 } 899 #endif 900 } 901 } 902 if(pcPicBottom) 903 { 904 pcPicBottom->destroy(); 905 delete pcPicBottom; 906 pcPicBottom = NULL; 907 } 908 } 909 else //Frame decoding 910 { 732 911 while (iterPic != pcListPic->end()) 733 912 { 734 913 pcPic = *(iterPic); 735 736 #if H_MV 737 if(pcPic->getOutputMark() && pcPic->getPOC() > m_pocLastDisplay[decIdx] && 738 (numPicsNotYetDisplayed > numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid)) 739 #else 740 if(pcPic->getOutputMark() && pcPic->getPOC() > m_iPOCLastDisplay && 741 (numPicsNotYetDisplayed > numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid)) 742 #endif 914 915 if ( pcPic->getOutputMark() ) 743 916 { 744 917 // write to file 745 numPicsNotYetDisplayed--;746 if(pcPic->getSlice(0)->isReferenced() == false)747 {748 dpbFullness--;749 }750 918 #if H_MV 751 919 if ( m_pchReconFiles[decIdx] ) … … 756 924 const Window &conf = pcPic->getConformanceWindow(); 757 925 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window(); 758 #if H_MV759 assert( conf .getScaledFlag() );760 assert( defDisp.getScaledFlag() );761 #if ENC_DEC_TRACE762 g_bJustDoIt = true;763 writeToTraceFile( "OutputPic Poc" , pcPic->getPOC (), g_decTracePicOutput );764 writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput );765 g_bJustDoIt = false;766 #endif767 m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(),768 #else769 m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec(),770 #endif771 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),772 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),773 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),774 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() );775 }776 777 // update POC of display order778 #if H_MV779 m_pocLastDisplay[decIdx] = pcPic->getPOC();780 #else781 m_iPOCLastDisplay = pcPic->getPOC();782 #endif783 784 // erase non-referenced picture in the reference picture list after display785 if ( !pcPic->getSlice(0)->isReferenced() && pcPic->getReconMark() == true )786 {787 #if !DYN_REF_FREE788 pcPic->setReconMark(false);789 790 // mark it should be extended later791 pcPic->getPicYuvRec()->setBorderExtension( false );792 793 #else794 pcPic->destroy();795 pcListPic->erase( iterPic );796 iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!797 continue;798 #endif799 }800 pcPic->setOutputMark(false);801 #if H_MV_HLS_7_VPS_P0300_27802 pcPic->setPicOutputFlag(false);803 #endif804 }805 806 iterPic++;807 }808 }809 }810 /** \param pcListPic list of pictures to be written to file811 \todo DYN_REF_FREE should be revised812 */813 #if H_MV814 Void TAppDecTop::xFlushOutput( TComList<TComPic*>* pcListPic, Int decIdx )815 #else816 Void TAppDecTop::xFlushOutput( TComList<TComPic*>* pcListPic )817 #endif818 {819 if(!pcListPic || pcListPic->empty())820 {821 return;822 }823 TComList<TComPic*>::iterator iterPic = pcListPic->begin();824 825 iterPic = pcListPic->begin();826 TComPic* pcPic = *(iterPic);827 828 if (pcPic->isField()) //Field Decoding829 {830 TComList<TComPic*>::iterator endPic = pcListPic->end();831 endPic--;832 TComPic *pcPicTop, *pcPicBottom = NULL;833 while (iterPic != endPic)834 {835 pcPicTop = *(iterPic);836 iterPic++;837 pcPicBottom = *(iterPic);838 839 if ( pcPicTop->getOutputMark() && pcPicBottom->getOutputMark() && !(pcPicTop->getPOC()%2) && (pcPicBottom->getPOC() == pcPicTop->getPOC()+1) )840 {841 // write to file842 #if H_MV843 if ( m_pchReconFiles[decIdx] )844 #else845 if ( m_pchReconFile )846 #endif847 {848 const Window &conf = pcPicTop->getConformanceWindow();849 const Window &defDisp = m_respectDefDispWindow ? pcPicTop->getDefDisplayWindow() : Window();850 const Bool isTff = pcPicTop->isTopField();851 926 #if H_MV 852 927 assert( conf .getScaledFlag() ); … … 858 933 g_bJustDoIt = false; 859 934 #endif 860 m_tVideoIOYuvReconFile[decIdx]->write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),861 #else862 m_cTVideoIOYuvReconFile.write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(),863 #endif864 conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),865 conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),866 conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),867 conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(), isTff );868 }869 870 // update POC of display order871 #if H_MV872 m_pocLastDisplay[decIdx] = pcPic->getPOC();873 #else874 m_iPOCLastDisplay = pcPicBottom->getPOC();875 #endif876 // erase non-referenced picture in the reference picture list after display877 if ( !pcPicTop->getSlice(0)->isReferenced() && pcPicTop->getReconMark() == true )878 {879 #if !DYN_REF_FREE880 pcPicTop->setReconMark(false);881 882 // mark it should be extended later883 pcPicTop->getPicYuvRec()->setBorderExtension( false );884 885 #else886 pcPicTop->destroy();887 pcListPic->erase( iterPic );888 iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!889 continue;890 #endif891 }892 if ( !pcPicBottom->getSlice(0)->isReferenced() && pcPicBottom->getReconMark() == true )893 {894 #if !DYN_REF_FREE895 pcPicBottom->setReconMark(false);896 897 // mark it should be extended later898 pcPicBottom->getPicYuvRec()->setBorderExtension( false );899 900 #else901 pcPicBottom->destroy();902 pcListPic->erase( iterPic );903 iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!904 continue;905 #endif906 }907 pcPicTop->setOutputMark(false);908 pcPicBottom->setOutputMark(false);909 910 #if !DYN_REF_FREE911 if(pcPicTop)912 {913 pcPicTop->destroy();914 delete pcPicTop;915 pcPicTop = NULL;916 }917 #endif918 }919 }920 if(pcPicBottom)921 {922 pcPicBottom->destroy();923 delete pcPicBottom;924 pcPicBottom = NULL;925 }926 }927 else //Frame decoding928 {929 while (iterPic != pcListPic->end())930 {931 pcPic = *(iterPic);932 933 if ( pcPic->getOutputMark() )934 {935 // write to file936 #if H_MV937 if ( m_pchReconFiles[decIdx] )938 #else939 if ( m_pchReconFile )940 #endif941 {942 const Window &conf = pcPic->getConformanceWindow();943 const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();944 #if H_MV945 assert( conf .getScaledFlag() );946 assert( defDisp.getScaledFlag() );947 #if ENC_DEC_TRACE948 g_bJustDoIt = true;949 writeToTraceFile( "OutputPic Poc" , pcPic->getPOC (), g_decTracePicOutput );950 writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput );951 g_bJustDoIt = false;952 #endif953 935 m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(), 954 936 #else … … 985 967 } 986 968 pcPic->setOutputMark(false); 987 #if H_MV _HLS_7_VPS_P0300_27969 #if H_MV 988 970 pcPic->setPicOutputFlag(false); 989 971 #endif … … 1061 1043 m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists ); 1062 1044 m_tDecTop[ decIdx ]->setLayerInitilizedFlags( m_layerInitilizedFlags ); 1063 #if H_MV_HLS_8_HRD_Q0102_081064 1045 m_tDecTop[ decIdx ]->setTargetOptLayerSetIdx( m_targetOptLayerSetIdx ); 1065 #endif1066 1046 1067 1047 #if H_3D … … 1099 1079 } 1100 1080 1101 1102 #if H_MV_HLS_7_VPS_P0300_271103 1081 Void TAppDecTop::xMarkForOutput( Bool allLayersDecoded, Int pocLastPic, Int layerIdLastPic ) 1104 1082 { … … 1152 1130 } 1153 1131 } 1154 #endif 1132 1133 Void TAppDecTop::xMarkAltOutPic( Int targetOutputLayer, Int pocLastPic ) 1134 { 1135 Int optLayerIdxInVps = m_vps->getLayerIdInNuh( targetOutputLayer ); 1136 Int highestNuhLayerId = -1; 1137 TComPic* picWithHighestNuhLayerId = NULL; 1138 for (Int dIdx = 0; dIdx < m_numDecoders; dIdx++) 1139 { 1140 Int curLayerId = m_tDecTop[dIdx]->getLayerId(); 1141 Int curLayerIdxInVps = m_vps->getLayerIdInNuh( curLayerId ); 1142 if ( m_vps->getInDirectDependencyFlag(optLayerIdxInVps, curLayerIdxInVps ) ) 1143 { 1144 TComPic* curPic = m_ivPicLists.getPic( curLayerId, pocLastPic ); 1145 if (curPic != NULL) 1146 { 1147 if (curPic->getReconMark() && curPic->getPicOutputFlag() ) 1148 { 1149 curPic->setOutputMark ( false ); 1150 curPic->setPicOutputFlag( false ); 1151 if ( curLayerId > highestNuhLayerId) 1152 { 1153 highestNuhLayerId = curLayerId ; 1154 picWithHighestNuhLayerId = curPic; 1155 } 1156 } 1157 } 1158 } 1159 } 1160 if ( picWithHighestNuhLayerId != NULL ) 1161 { 1162 picWithHighestNuhLayerId->setPicOutputFlag(true); 1163 picWithHighestNuhLayerId->setOutputMark (true); 1164 } 1165 } 1166 1155 1167 #endif 1156 1168 //! \} -
trunk/source/App/TAppDecoder/TAppDecTop.h
r964 r976 68 68 TComPicLists m_ivPicLists; ///< picture buffers of decoder instances 69 69 Bool m_layerInitilizedFlags[ MAX_NUM_LAYER_IDS ]; ///< for layerwise startup 70 #if H_MV_HLS_7_VPS_P0300_2771 70 TComVPS* m_vps; ///< active VPS 72 #endif73 71 #else 74 72 TDecTop m_cTDecTop; ///< decoder class … … 79 77 Int m_pocLastDisplay [ MAX_NUM_LAYERS ]; ///< last POC in display order 80 78 Bool m_reconOpen [ MAX_NUM_LAYERS ]; ///< reconstruction file opened 79 Bool m_markedForOutput; 81 80 #else 82 81 Int m_iPOCLastDisplay; ///< last POC in display order 83 82 #endif 84 #if H_MV_HLS_7_VPS_P0300_2785 Bool m_markedForOutput;86 #endif87 88 83 89 84 #if H_3D … … 107 102 Void xWriteOutput ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file 108 103 109 #if H_MV_HLS_7_VPS_P0300_27110 104 Void xMarkForOutput ( Bool allLayersDecoded, Int pocLastPic, Int layerIdLastPic ); 111 Void xMarkAltOutPic ( Int targetOutputLayer, Int pocLastPic ) 112 { 113 Int optLayerIdxInVps = m_vps->getLayerIdInNuh( targetOutputLayer ); 114 Int highestNuhLayerId = -1; 115 TComPic* picWithHighestNuhLayerId = NULL; 116 for (Int dIdx = 0; dIdx < m_numDecoders; dIdx++) 117 { 118 Int curLayerId = m_tDecTop[dIdx]->getLayerId(); 119 Int curLayerIdxInVps = m_vps->getLayerIdInNuh( curLayerId ); 120 if ( m_vps->getInDirectDependencyFlag(optLayerIdxInVps, curLayerIdxInVps ) ) 121 { 122 TComPic* curPic = m_ivPicLists.getPic( curLayerId, pocLastPic ); 123 if (curPic != NULL) 124 { 125 if (curPic->getReconMark() && curPic->getPicOutputFlag() ) 126 { 127 curPic->setOutputMark ( false ); 128 curPic->setPicOutputFlag( false ); 129 if ( curLayerId > highestNuhLayerId) 130 { 131 highestNuhLayerId = curLayerId ; 132 picWithHighestNuhLayerId = curPic; 133 } 134 } 135 } 136 } 137 } 138 if ( picWithHighestNuhLayerId != NULL ) 139 { 140 picWithHighestNuhLayerId->setPicOutputFlag(true); 141 picWithHighestNuhLayerId->setOutputMark (true); 142 } 143 } 144 #endif 105 Void xMarkAltOutPic ( Int targetOutputLayer, Int pocLastPic ); 145 106 146 107 Void xFlushOutput ( TComList<TComPic*>* pcListPic, Int layerId ); ///< flush all remaining decoded pictures to file -
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r964 r976 393 393 ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , std::vector<Int>(0,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set") 394 394 ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set") 395 #if H_MV_HLS_7_VPS_P0300_27396 395 ("AltOutputLayerFlag", m_altOutputLayerFlag , std::vector<Bool>(1,0), "Alt output layer flag") 397 #endif398 396 ("ProfileLevelTierIdx", m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier") 399 397 … … 523 521 #if H_3D_IC 524 522 ("IlluCompEnable", m_abUseIC, true, "Enable illumination compensation") 525 #if MTK_LOW_LATENCY_IC_ENCODING_H0086526 523 ("IlluCompLowLatencyEnc", m_bUseLowLatencyICEnc, false, "Enable low-latency illumination compensation encoding") 527 #endif528 524 #endif 529 525 #if H_3D_INTER_SDC … … 1058 1054 xResizeVector( m_wppInUseFlag ); 1059 1055 1060 #if H_MV_HLS_7_VPS_P0300_271061 1056 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + (Int) m_outputLayerSetIdx.size(); olsIdx++) 1062 1057 { 1063 1058 m_altOutputLayerFlag.push_back( false ); 1064 1059 } 1065 #endif1066 1060 #else 1067 1061 m_aidQP = new Int[ m_framesToBeEncoded + m_iGOPSize + 1 ]; … … 1465 1459 } 1466 1460 1467 #if H_MV_HLS_7_VPS_P0300_271468 1461 xConfirmPara( m_altOutputLayerFlag.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" ); 1469 #endif1470 1462 xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" ); 1471 1463 … … 2515 2507 #if H_3D_IC 2516 2508 printf( "IlluCompEnable:%d ", m_abUseIC); 2517 #if MTK_LOW_LATENCY_IC_ENCODING_H00862518 2509 printf ("IlluCompLowLatencyEnc:%d ", m_bUseLowLatencyICEnc); 2519 #endif2520 2510 #endif 2521 2511 #if H_3D_NBDV_REF -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r964 r976 94 94 std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets 95 95 std::vector<Int> m_profileLevelTierIdx; ///< Indices of of profile level tier 96 #if H_MV_HLS_7_VPS_P0300_2797 96 std::vector<Bool> m_altOutputLayerFlag; ///< Alt output layer flag 98 #endif99 97 100 98 // Dependencies … … 140 138 #if H_3D_IC 141 139 Bool m_abUseIC; 142 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 143 Bool m_bUseLowLatencyICEnc; 144 #endif 140 Bool m_bUseLowLatencyICEnc; 145 141 #endif 146 142 #if H_3D_NBDV_REF -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r964 r976 58 58 { 59 59 60 #if H_MV _HLS_860 #if H_MV 61 61 m_vps = new TComVPS; 62 #endif 63 #if !H_MV 62 #else 64 63 m_iFrameRcvd = 0; 65 64 #endif … … 70 69 TAppEncTop::~TAppEncTop() 71 70 { 72 #if H_MV _HLS_871 #if H_MV 73 72 if (m_vps) 74 73 { … … 82 81 { 83 82 #if H_MV 84 #if H_MV_HLS_885 83 TComVPS& vps = (*m_vps); 86 #else87 TComVPS& vps = m_vps;88 #endif89 84 #else 90 85 TComVPS vps; … … 193 188 m_cTEncTop.setDWeight ( isDepth ? m_iDWeight : 0 ); 194 189 #endif // H_3D_VSO 195 #if H_3D_ARP && !QC_IV_PRED_CONSTRAINT_H0137196 //====== Advanced Inter-view Residual Prediction =========197 m_cTEncTop.setUseAdvRP ( ( isDepth || 0==layerIdInVps ) ? 0 : m_uiUseAdvResPred );198 m_cTEncTop.setARPStepNum ( ( isDepth || 0==layerIdInVps ) ? 1 : H_3D_ARP_WFNR );199 #endif200 190 #if H_3D_SPIVMP 201 191 m_cTEncTop.setSubPULog2Size (( isDepth || 0==layerIdInVps ) ? 0 : m_iSubPULog2Size ); … … 204 194 #if H_3D_IC 205 195 m_cTEncTop.setUseIC ( vps.getViewIndex( layerId ) == 0 || isDepth ? false : m_abUseIC ); 206 #if MTK_LOW_LATENCY_IC_ENCODING_H0086207 196 m_cTEncTop.setUseICLowLatencyEnc ( m_bUseLowLatencyICEnc ); 208 #endif209 197 #endif 210 198 //========== Depth intra modes ========== … … 708 696 { 709 697 #if H_3D 710 #if H_MV_HLS_8711 698 for ( Int viewIndex = 0; viewIndex < m_vps->getNumViews(); viewIndex++ ) 712 699 { 713 700 m_vps->initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(), 714 701 m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() ); 715 #else716 for ( Int viewIndex = 0; viewIndex < m_vps.getNumViews(); viewIndex++ )717 {718 m_vps.initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(),719 m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() );720 #endif721 702 } 722 703 #endif … … 1299 1280 1300 1281 Int defaultDirectDependencyType = -1; 1301 #if MV_FIX_DEP_TYPES1302 1282 Bool defaultDirectDependencyFlag = false; 1303 #else1304 Bool defaultDirectDependencyFlag = true;1305 #endif1306 1283 1307 1284 for( Int depLayer = 1; depLayer < m_numberOfLayers; depLayer++ ) … … 1322 1299 { 1323 1300 defaultDirectDependencyType = curDirectDependencyType; 1324 #if MV_FIX_DEP_TYPES1325 1301 defaultDirectDependencyFlag = true; 1326 #endif1327 1302 } 1328 1303 … … 1514 1489 Void TAppEncTop::xSetRepFormat( TComVPS& vps ) 1515 1490 { 1516 #if H_MV_HLS_8_PMS_Q0195_201517 1491 vps.setRepFormatIdxPresentFlag( false ); 1518 #else1519 vps.setRepFormatIdxPresentFlag( true );1520 #endif1521 1492 vps.setVpsNumRepFormatsMinus1 ( 0 ); 1522 1493 … … 1534 1505 assert( vps.getRepFormat( 0 ) == NULL ); 1535 1506 vps.setRepFormat( 0 , repFormat ); 1536 1537 #if !H_MV_HLS_8_PMS_Q0195_201538 for(Int i = 0; i <= vps.getMaxLayersMinus1(); i++ )1539 {1540 vps.setVpsRepFormatIdx( i , 0 );1541 }1542 #endif1543 1507 } 1544 1508 … … 1551 1515 assert ( dpbSize != 0 ); 1552 1516 1553 #if H_MV_HLS_8_HRD_Q0102_081554 1517 for( Int i = 0; i < vps.getNumOutputLayerSets(); i++ ) 1555 #else1556 for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ )1557 #endif1558 1518 { 1559 #if H_MV_HLS_8_MIS_Q0102_301560 1519 Int currLsIdx = vps.olsIdxToLsIdx( i ); 1561 #endif1562 1520 std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i ); 1563 1521 Bool subLayerFlagInfoPresentFlag = false; 1564 1522 1565 #if H_MV_HLS_8_MIS_Q0102_301566 1523 for( Int j = 0; j <= vps.getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ ) 1567 #else1568 for( Int j = 0; j <= vps.getMaxSubLayersInLayerSetMinus1( i ); j++ )1569 #endif1570 1524 { 1571 1525 Bool subLayerDpbInfoPresentFlag = false; 1572 #if H_MV_HLS_8_MIS_Q0102_30 || H_MV_HLS_8_DBP_NODOC_421573 1526 assert( vps.getNumLayersInIdList( currLsIdx ) == targetDecLayerIdList.size() ); 1574 1527 for( Int k = 0; k < vps.getNumLayersInIdList( currLsIdx ); k++ ) 1575 #else1576 assert( vps.getNumSubDpbs( vps.olsIdxToLsIdx( i ) ) == targetDecLayerIdList.size() );1577 for( Int k = 0; k < vps.getNumSubDpbs( vps.olsIdxToLsIdx( i )); k++ )1578 #endif1579 1528 { 1580 1529 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] ); 1581 #if H_MV_HLS7_GEN1582 // TBD. Some derivation based on output layer set might be added here.1583 #endif1584 1530 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 ); 1585 1531 if ( j > 0 ) … … 1642 1588 // Additional output layer sets + profileLevelTierIdx 1643 1589 vps.setDefaultOutputLayerIdc ( m_defaultOutputLayerIdc ); 1644 #if H_MV_HLS_8_SYN_39_191645 1590 vps.setNumAddLayerSets ( 0 ); 1646 1591 vps.setNumAddOlss ( numAddOuputLayerSets ); 1647 #else1648 vps.setNumAddLayerSets ( numAddOuputLayerSets );1649 #endif1650 1592 vps.initTargetLayerIdLists(); 1651 1593 … … 1696 1638 vps.setProfileLevelTierIdx( olsIdx, m_profileLevelTierIdx[ olsIdx ] ); 1697 1639 } 1698 #if H_MV_HLS_7_VPS_P0300_27 1640 1699 1641 if ( vps.getNumOutputLayersInOutputLayerSet( olsIdx ) == 1 && 1700 1642 vps.getNumDirectRefLayers( vps.getOlsHighestOutputLayerId( olsIdx ) ) ) … … 1710 1652 } 1711 1653 } 1712 #else1713 vps.setAltOutputLayerFlag( olsIdx , false);1714 #endif1715 1654 } 1716 1655 } … … 1869 1808 1870 1809 #if H_3D_ARP 1871 #if QC_IV_PRED_CONSTRAINT_H01371872 1810 vps.setUseAdvRP ( layer, ( isDepth || isLayerZero || !vps.getNumDirectRefLayers(layer) ) ? 0 : m_uiUseAdvResPred ); 1873 1811 vps.setARPStepNum ( layer, ( isDepth || isLayerZero || !vps.getNumDirectRefLayers(layer) ) ? 1 : H_3D_ARP_WFNR ); 1874 #else1875 vps.setUseAdvRP ( layer, ( isDepth || isLayerZero ) ? 0 : m_uiUseAdvResPred );1876 vps.setARPStepNum ( layer, ( isDepth || isLayerZero ) ? 1 : H_3D_ARP_WFNR );1877 #endif1878 1812 #endif 1879 1813 #if H_3D_SPIVMP … … 1893 1827 1894 1828 #if H_3D_IV_MERGE 1895 #if QC_IV_PRED_CONSTRAINT_H01371896 1829 if( !vps.getNumDirectRefLayers(layer) ) 1897 1830 { … … 1900 1833 else 1901 1834 { 1902 #endif 1903 if( isDepth ) 1904 { 1905 vps.setIvMvPredFlag ( layer, (layer != 1) && m_ivMvPredFlag[1] ); 1906 } 1907 else 1908 { 1909 vps.setIvMvPredFlag ( layer, !isLayerZero && m_ivMvPredFlag[0] ); 1910 } 1911 #if QC_IV_PRED_CONSTRAINT_H0137 1912 } 1913 #endif 1835 if( isDepth ) 1836 { 1837 vps.setIvMvPredFlag ( layer, (layer != 1) && m_ivMvPredFlag[1] ); 1838 } 1839 else 1840 { 1841 vps.setIvMvPredFlag ( layer, !isLayerZero && m_ivMvPredFlag[0] ); 1842 } 1843 } 1914 1844 #endif 1915 1845 #if H_3D_NBDV_REF … … 1917 1847 #endif 1918 1848 #if H_3D_VSP 1919 #if QC_IV_PRED_CONSTRAINT_H01371920 1849 vps.setViewSynthesisPredFlag( layer, !isLayerZero && !isDepth && vps.getNumDirectRefLayers(layer) && m_viewSynthesisPredFlag ); 1921 #else1922 vps.setViewSynthesisPredFlag( layer, !isLayerZero && !isDepth && m_viewSynthesisPredFlag );1923 #endif1924 1850 #endif 1925 1851 #if H_3D_DBBP -
trunk/source/App/TAppEncoder/TAppEncTop.h
r964 r976 75 75 76 76 TComPicLists m_ivPicLists; ///< picture buffers of encoder instances 77 #if H_MV _HLS_877 #if H_MV 78 78 TComVPS* m_vps; ///< vps 79 79 #else -
trunk/source/Lib/TLibCommon/CommonDef.h
r964 r976 60 60 61 61 #if H_MV 62 #define NV_VERSION "11. 1" ///< Current software version62 #define NV_VERSION "11.2" ///< Current software version 63 63 #define HM_VERSION "14.0" ///< 64 64 #else -
trunk/source/Lib/TLibCommon/ContextTables.h
r950 r976 110 110 #define NUM_DMM1_DATA_CTX 1 ///< number of context models for DMM1 data 111 111 #endif 112 #if LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135113 112 #define NUM_ANGLE_FLAG_CTX 1 114 #else115 #define NUM_ANGLE_FLAG_CTX 3116 #endif117 113 #endif 118 114 … … 372 368 }; 373 369 374 #if LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135375 370 static const UChar 376 371 INIT_ANGLE_FLAG[3][NUM_ANGLE_FLAG_CTX] = … … 380 375 { 155 }, 381 376 }; 382 #else383 static const UChar384 INIT_ANGLE_FLAG[3][NUM_ANGLE_FLAG_CTX] =385 {386 { 154, 155, 156 },387 { 141, 185, 214 },388 { 155, 170, 157 },389 };390 #endif391 377 392 378 static const UChar … … 444 430 445 431 #if H_3D_DBBP 446 #if MTK_DBBP_SIGNALING_H0094447 432 static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] = 448 433 { … … 451 436 { 161 }, 452 437 }; 453 #else 454 static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] = 455 { 456 { CNU }, 457 { CNU }, 458 { CNU }, 459 }; 460 #endif 461 #endif 462 463 #endif 438 #endif 439 440 #endif -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r964 r976 610 610 memset( m_apSegmentDCOffset[1] + firstElement, 0, numElements * sizeof( *m_apSegmentDCOffset[1] ) ); 611 611 #endif 612 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108613 612 m_apDmmPredictor[0] = 0; 614 613 m_apDmmPredictor[1] = 0; 615 #endif616 614 #endif 617 615 #if H_3D_DBBP … … 788 786 m_apSegmentDCOffset[1][ui] = 0; 789 787 #endif 790 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108791 788 m_apDmmPredictor[0] = 0; 792 789 m_apDmmPredictor[1] = 0; 793 #endif794 790 #endif 795 791 #if H_3D_DBBP … … 907 903 memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition ); 908 904 #endif 909 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108910 905 m_apDmmPredictor[0] = 0; 911 906 m_apDmmPredictor[1] = 0; 912 #endif913 907 #endif 914 908 #if H_3D_DBBP … … 2364 2358 2365 2359 TComMv cDv = depthRefineFlag ? DvInfo.m_acDoNBDV : DvInfo.m_acNBDV; 2366 #if SEC_VER_DONBDV_H01032367 2360 if( depthRefineFlag ) 2368 2361 { 2369 2362 cDv.setVer(0); 2370 2363 } 2371 #endif2372 2364 2373 2365 Int depthPosX = Clip3(0, iPictureWidth - iWidth, iBlkX + ((cDv.getHor()+2)>>2)); … … 2399 2391 } 2400 2392 2401 UInt TComDataCU::getCtxAngleFlag( UInt uiAbsPartIdx )2402 {2403 #if LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H01352404 return 0;2405 #else2406 TComDataCU* pcTempCU;2407 UInt uiTempPartIdx;2408 UInt uiCtx = 0;2409 2410 // Get BCBP of left PU2411 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );2412 uiCtx = ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? ( pcTempCU->getLumaIntraDir( uiTempPartIdx ) < NUM_INTRA_MODE ? 1 : 0 ) : 0;2413 2414 // Get BCBP of above PU2415 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );2416 uiCtx += ( pcTempCU && pcTempCU->isIntra( uiTempPartIdx ) ) ? ( pcTempCU->getLumaIntraDir( uiTempPartIdx ) < NUM_INTRA_MODE ? 1 : 0 ) : 0;2417 2418 return uiCtx;2419 #endif2420 }2421 2393 #endif 2422 2394 … … 3280 3252 * false: otherwise 3281 3253 */ 3282 #if ETRIKHU_CLEANUP_H00833283 3254 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount) 3284 #else3285 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount,3286 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo )3287 #endif3288 3255 { 3289 3256 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() || pDInfo->m_aVIdxCan == -1) … … 3301 3268 } 3302 3269 3303 #if ETRIKHU_CLEANUP_H00833304 3270 TComMvField mvVSP[2]; 3305 3271 UChar dirVSP; 3306 #else3307 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV);3308 #endif3309 3310 3272 Bool refViewAvailFlag = false; 3311 3273 UChar predFlag[2] = {0, 0}; … … 3321 3283 refViewAvailFlag = true; 3322 3284 predFlag[iRefListIdX] = 1; 3323 #if ETRIKHU_CLEANUP_H00833324 3285 mvVSP[0+iRefListIdX].setMvField( pDInfo->m_acNBDV, i ); 3325 3286 #if H_3D_NBDV 3326 3287 mvVSP[0+iRefListIdX].getMv().setIDVFlag (false); 3327 3288 #endif 3328 #else 3329 pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].setMvField( pDInfo->m_acNBDV, i ); 3330 #if H_3D_NBDV 3331 pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].getMv().setIDVFlag (false); 3332 #endif 3333 #endif 3334 } 3335 } 3336 } 3337 3338 #if ETRIKHU_CLEANUP_H0083 3289 } 3290 } 3291 } 3292 3339 3293 dirVSP = (predFlag[0] | (predFlag[1] << 1)); 3340 3294 m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true, false); 3341 #else3342 // Set values to be returned3343 abCandIsInter [iCount] = true;3344 puhInterDirNeighbours[iCount] = (predFlag[0] | (predFlag[1] << 1));3345 vspFlag [iCount] = 1;3346 #endif3347 3348 3295 if ( mrgCandIdx == iCount ) 3349 3296 { … … 3359 3306 3360 3307 #if H_3D_IV_MERGE 3361 #if ETRIKHU_CLEANUP_H00833362 3308 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ) 3363 #else3364 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv,3365 Int* ivCandRefIdx, Int iPosIvDC, Int* vspFlag, Int &iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo )3366 #endif3367 3309 { 3368 3310 for(Int iLoop = 0; iLoop < 2; iLoop ++ ) … … 3372 3314 { 3373 3315 Int iFirDispCand = -1; 3374 #if ETRIKHU_CLEANUP_H00833375 3316 TComMvField mvIvDcShift[2]; 3376 3317 UChar dirIvDcShift; 3377 3318 3378 3319 if (xGetPosFirstAvailDmvCand(MRG_IVSHIFT, iFirDispCand)) 3379 #else3380 if (xGetPosFirstAvailDmvCand(iCount, pcMvFieldNeighbours, ivCandDir, iPosIvDC, vspFlag, iFirDispCand))3381 #endif3382 3320 { 3383 3321 TComMv cMv; 3384 #if ETRIKHU_CLEANUP_H00833385 3322 cMv = m_mergCands[iFirDispCand].m_cMvField[0].getMv(); 3386 #else3387 cMv = pcMvFieldNeighbours[(iFirDispCand<<1)].getMv();3388 #endif3389 3323 cMv.setHor(cMv.getHor()+4); 3390 3324 if(m_pcSlice->getVPS()->getViewSynthesisPredFlag(m_pcSlice->getLayerIdInVps())) … … 3396 3330 #endif 3397 3331 3398 #if ETRIKHU_CLEANUP_H00833399 3332 dirIvDcShift = m_mergCands[iFirDispCand].m_uDir; 3400 3333 mvIvDcShift[0].setMvField(cMv, m_mergCands[iFirDispCand].m_cMvField[0].getRefIdx() ); 3401 3334 mvIvDcShift[1].setMvField(m_mergCands[iFirDispCand].m_cMvField[1].getMv(), m_mergCands[iFirDispCand].m_cMvField[1].getRefIdx() ); 3402 3335 m_mergCands[MRG_IVSHIFT].setCand(mvIvDcShift, dirIvDcShift, false, false); 3403 #else3404 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV);3405 3406 abCandIsInter [ iCount ] = true;3407 puhInterDirNeighbours[ iCount ] = puhInterDirNeighbours[iFirDispCand];3408 pcMvFieldNeighbours [ iCount << 1 ].setMvField(cMv, pcMvFieldNeighbours[( iFirDispCand << 1)].getRefIdx() );3409 pcMvFieldNeighbours [(iCount << 1) + 1 ].setMvField(pcMvFieldNeighbours[(iFirDispCand << 1) + 1].getMv(), pcMvFieldNeighbours[( iFirDispCand << 1) + 1].getRefIdx() );3410 #endif3411 3336 3412 3337 if( mrgCandIdx == iCount ) … … 3414 3339 return true; 3415 3340 } 3416 3417 3341 iCount++; 3418 3342 break; … … 3439 3363 if( !iLoop && ivCandDir[0] > 0) 3440 3364 { 3441 #if ETRIKHU_CLEANUP_H00833442 3365 if(tmpDir == m_mergCands[MRG_IVMC].m_uDir && m_mergCands[MRG_IVMC].m_cMvField[0]==tmpMV[0] && m_mergCands[MRG_IVMC].m_cMvField[1]==tmpMV[1]) 3443 #else3444 if(tmpDir == puhInterDirNeighbours[0] && pcMvFieldNeighbours[0]==tmpMV[0] && pcMvFieldNeighbours[1]==tmpMV[1])3445 #endif3446 3366 { 3447 3367 bRemove = true; … … 3450 3370 if(!bRemove) 3451 3371 { 3452 #if ETRIKHU_CLEANUP_H00833453 3372 #if H_3D_NBDV 3454 3373 if(iLoop) // For IvMcShift candidate … … 3459 3378 #endif 3460 3379 m_mergCands[MRG_IVSHIFT].setCand(tmpMV, tmpDir, false, false); 3461 #else3462 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV);3463 3464 abCandIsInter[ iCount ] = true;3465 puhInterDirNeighbours[ iCount ] = ivCandDir[iLoop + 2];3466 if( ( ivCandDir[iLoop + 2] & 1 ) == 1 )3467 {3468 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ (iLoop<<1) + 4 ], ivCandRefIdx[ (iLoop<<1) + 4 ] );3469 }3470 if( ( ivCandDir[iLoop + 2] & 2 ) == 2 )3471 {3472 pcMvFieldNeighbours[ (iCount<<1)+1 ].setMvField( ivCandMv[ (iLoop<<1) + 5 ], ivCandRefIdx[ (iLoop<<1) + 5 ] );3473 }3474 #if H_3D_NBDV3475 if(iLoop) // For IvMcShift candidate3476 {3477 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);3478 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);3479 }3480 #endif3481 #endif3482 3380 if( mrgCandIdx == iCount ) 3483 3381 { … … 3492 3390 } 3493 3391 3494 #if ETRIKHU_CLEANUP_H00833495 3392 inline Bool TComDataCU::xGetPosFirstAvailDmvCand(Int iCount, Int& posFirstAvailDmvCand ) 3496 3393 { … … 3509 3406 return false; 3510 3407 } 3511 #else3512 inline Bool TComDataCU::xGetPosFirstAvailDmvCand( Int iCount, TComMvField* pcMvFieldNeighbours, Int* ivCandDir, Int posIvDC, Int* vspFlag, Int& posFirstAvailDmvCand )3513 {3514 // ivCandDir[0] == true --> IvMC is available and excluded in loop over merge list.3515 for ( Int currListPos = (ivCandDir[0] ? 1 : 0); currListPos < iCount; currListPos++ )3516 {3517 if ( ( currListPos == posIvDC ) || ( vspFlag[ currListPos ] != 0 ) )3518 {3519 continue;3520 }3521 else if((pcMvFieldNeighbours[currListPos<<1].getRefIdx() != -1 ) && (getSlice()->getViewIndex() != getSlice()->getRefPic(RefPicList(0), pcMvFieldNeighbours[currListPos<<1].getRefIdx())->getViewIndex()))3522 {3523 posFirstAvailDmvCand = currListPos;3524 return true;3525 }3526 }3527 return false;3528 }3529 #endif3530 3408 3531 3409 #endif 3532 3410 3533 3411 #if H_3D 3534 #if ETRIKHU_CLEANUP_H00833535 3536 3412 Void TComDataCU::buildMCL(TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 3537 3413 #if H_3D_VSP … … 3606 3482 assert(iCount == getSlice()->getMaxNumMergeCand()); 3607 3483 } 3608 #else3609 Void TComDataCU::rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV)3610 {3611 iCount3DV++;3612 for (int i=num; i>0; i--)3613 {3614 pcMvFieldNeighbours[(start+i)<<1].setMvField(pcMvFieldNeighbours[(start+i-1)<<1].getMv(), pcMvFieldNeighbours[(start+i-1)<<1].getRefIdx());3615 pcMvFieldNeighbours[((start+i)<<1)+1].setMvField(pcMvFieldNeighbours[((start+i-1)<<1)+1].getMv(), pcMvFieldNeighbours[((start+i-1)<<1)+1].getRefIdx());3616 puhInterDirNeighbours[start+i] = puhInterDirNeighbours[start+i-1];3617 iVSPIndexTrue[start+i] = iVSPIndexTrue[start+i-1];3618 inheritedVSPDisInfo[start+i].m_acDvInfo = inheritedVSPDisInfo[start+i-1].m_acDvInfo;3619 }3620 TComMv cZeroMv;3621 pcMvFieldNeighbours[start<<1].setMvField( cZeroMv, NOT_VALID );3622 pcMvFieldNeighbours[(start<<1)+1].setMvField( cZeroMv, NOT_VALID );3623 puhInterDirNeighbours[start] = 0;3624 iVSPIndexTrue[start] = 0;3625 inheritedVSPDisInfo[start].m_acDvInfo = m_cDefaultDisInfo;3626 3627 return;3628 }3629 #endif3630 3484 3631 3485 /** Constructs a list of merging candidates … … 4001 3855 #endif 4002 3856 #if H_3D_VSP 4003 #if !ETRIKHU_CLEANUP_H00834004 , Int* vspFlag4005 #endif4006 3857 , InheritedVSPDisInfo* inheritedVSPDisInfo 4007 3858 #endif 4008 3859 #if H_3D_SPIVMP 4009 #if ETRIKHU_CLEANUP_H00834010 3860 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 4011 #else4012 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP4013 #endif4014 3861 #endif 4015 3862 , Int& numValidMergeCand, Int mrgCandIdx … … 4022 3869 //////////////////////////// 4023 3870 TComMv cZeroMv; 4024 #if !ETRIKHU_CLEANUP_H00834025 Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ];4026 #endif4027 3871 #else 4028 3872 Bool abCandIsInter[ MRG_MAX_NUM_CANDS ]; … … 4090 3934 #if H_3D_DBBP 4091 3935 Bool bDBBPFlag = getDBBPFlag(uiAbsPartIdx); 4092 #if MTK_DIS_SPBIP8X4_H02054093 3936 assert(bDBBPFlag == getDBBPFlag(0)); 4094 3937 #endif 4095 #endif4096 3938 4097 3939 #if H_3D 4098 #if !ETRIKHU_CLEANUP_H00834099 Int iPosLeftAbove[2] = {-1, -1};4100 4101 Int iCountHEVC = 0;4102 Int iCount3DV = 0;4103 Int numA1B1B0 = 0;4104 Int numA0B2 = 0;4105 #endif4106 3940 #if H_3D_NBDV 4107 3941 for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) … … 4111 3945 } 4112 3946 #endif 4113 4114 4115 #if ETRIKHU_CLEANUP_H00834116 4117 4118 3947 // Clean version for MCL construction align with WD 4119 3948 // init mergCands list … … 4142 3971 && !bARPFlag 4143 3972 #endif 4144 #if RWTH_DBBP_NO_SPU_H00573973 #if H_3D_DBBP 4145 3974 && !bDBBPFlag 4146 3975 #endif … … 4169 3998 && !bARPFlag 4170 3999 #endif 4171 #if RWTH_DBBP_NO_SPU_H00574000 #if H_3D_DBBP 4172 4001 && !bDBBPFlag 4173 4002 #endif … … 4196 4025 && !bARPFlag 4197 4026 #endif 4198 #if RWTH_DBBP_NO_SPU_H00574027 #if H_3D_DBBP 4199 4028 && !bDBBPFlag 4200 4029 #endif … … 4222 4051 && !bARPFlag 4223 4052 #endif 4224 #if RWTH_DBBP_NO_SPU_H00574053 #if H_3D_DBBP 4225 4054 && !bDBBPFlag 4226 4055 #endif … … 4249 4078 && !bARPFlag 4250 4079 #endif 4251 #if RWTH_DBBP_NO_SPU_H00574080 #if H_3D_DBBP 4252 4081 && !bDBBPFlag 4253 4082 #endif … … 4259 4088 } 4260 4089 4261 4262 #if !ETRIKHU_BUGFIX_H00834263 Bool A1_was_available = m_mergCands[MRG_A1].m_bAvailable;4264 Bool B1_was_available = m_mergCands[MRG_B1].m_bAvailable;4265 #endif4266 4267 4268 #else4269 //left4270 UInt uiLeftPartIdx = 0;4271 TComDataCU* pcCULeft = 0;4272 pcCULeft = getPULeft( uiLeftPartIdx, uiPartIdxLB );4273 if (getAvailableFlagA1())4274 {4275 iPosLeftAbove[0] = numA1B1B0;4276 #if H_3D_VSP4277 if (pcCULeft->getVSPFlag(uiLeftPartIdx) != 04278 #if H_3D_IC4279 && !bICFlag4280 #endif4281 #if H_3D_ARP4282 && !bARPFlag4283 #endif4284 #if RWTH_DBBP_NO_SPU_H00574285 && !bDBBPFlag4286 #endif4287 )4288 {4289 vspFlag[numA1B1B0] = 1;4290 }4291 #endif4292 numA1B1B0++;4293 }4294 4295 // above4296 UInt uiAbovePartIdx = 0;4297 TComDataCU* pcCUAbove = 0;4298 pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT );4299 if ( getAvailableFlagB1())4300 {4301 iPosLeftAbove[1] = numA1B1B0;4302 #if H_3D_VSP4303 if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) != 0)4304 #if H_3D_IC4305 && !bICFlag4306 #endif4307 #if H_3D_ARP4308 && !bARPFlag4309 #endif4310 #if RWTH_DBBP_NO_SPU_H00574311 && !bDBBPFlag4312 #endif4313 )4314 {4315 vspFlag[numA1B1B0] = 1;4316 }4317 #endif4318 4319 numA1B1B0++;4320 }4321 4322 // above right4323 UInt uiAboveRightPartIdx = 0;4324 TComDataCU* pcCUAboveRight = 0;4325 pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT );4326 if ( getAvailableFlagB0())4327 {4328 #if H_3D_VSP4329 if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) != 0)4330 #if H_3D_IC4331 && !bICFlag4332 #endif4333 #if H_3D_ARP4334 && !bARPFlag4335 #endif4336 #if RWTH_DBBP_NO_SPU_H00574337 && !bDBBPFlag4338 #endif4339 )4340 {4341 vspFlag[numA1B1B0] = 1;4342 }4343 #endif4344 numA1B1B0++;4345 }4346 4347 // left bottom4348 UInt uiLeftBottomPartIdx = 0;4349 TComDataCU* pcCULeftBottom = getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB );4350 if ( getAvailableFlagA0())4351 {4352 #if H_3D_VSP4353 if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) != 04354 #if H_3D_IC4355 && !bICFlag4356 #endif4357 #if H_3D_ARP4358 && !bARPFlag4359 #endif4360 #if RWTH_DBBP_NO_SPU_H00574361 && !bDBBPFlag4362 #endif4363 )4364 {4365 vspFlag[numA1B1B0] = 1;4366 }4367 #endif4368 iCountHEVC++;4369 numA0B2++;4370 }4371 4372 // above left4373 UInt uiAboveLeftPartIdx = 0;4374 TComDataCU* pcCUAboveLeft = 0;4375 pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr );4376 if (getAvailableFlagB2())4377 {4378 #if H_3D_VSP4379 if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) != 0)4380 #if H_3D_IC4381 && !bICFlag4382 #endif4383 #if H_3D_ARP4384 && !bARPFlag4385 #endif4386 #if RWTH_DBBP_NO_SPU_H00574387 && !bDBBPFlag4388 #endif4389 )4390 {4391 vspFlag[numA1B1B0+iCountHEVC] = 1;4392 }4393 #endif4394 iCountHEVC++;4395 numA0B2++;4396 }4397 4398 iCountHEVC = numValidMergeCand;4399 #endif4400 4090 #endif 4401 4091 … … 4407 4097 ///////////////////////////////////////////// 4408 4098 4409 #if SHARP_SIMPLE_MERGE_H00624410 4099 bMPIFlag &= (nPSW + nPSH > 12); 4411 #endif4412 4100 if( bMPIFlag) 4413 4101 { … … 4416 4104 tmpDir = 0; 4417 4105 4418 #if ETRIKHU_CLEANUP_H00834419 4106 Bool bSPIVMPFlag = false; 4420 #endif4421 4107 4422 4108 TComPic * pcTexPic = m_pcSlice->getTexturePic(); … … 4457 4143 Int iTexPosX, iTexPosY; 4458 4144 const TComMv cMvRounding( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4459 #if MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H01334460 4145 4461 4146 Int iCenterPosX = iCurrPosX + ( ( iWidth / iPUWidth ) >> 1 ) * iPUWidth + ( iPUWidth >> 1 ); … … 4476 4161 if( pcDefaultCU->getPredictionMode( iTexCenterAbsPartIdx ) != MODE_INTRA ) 4477 4162 { 4478 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 4163 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 4164 { 4165 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 4166 4167 TComMvField cDefaultMvField; 4168 pcDefaultCU->getMvField( pcDefaultCU, iTexCenterAbsPartIdx, eCurrRefPicList, cDefaultMvField ); 4169 Int iDefaultRefIdx = cDefaultMvField.getRefIdx(); 4170 if (iDefaultRefIdx >= 0) 4479 4171 { 4480 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 4481 4482 TComMvField cDefaultMvField; 4483 pcDefaultCU->getMvField( pcDefaultCU, iTexCenterAbsPartIdx, eCurrRefPicList, cDefaultMvField ); 4484 Int iDefaultRefIdx = cDefaultMvField.getRefIdx(); 4485 if (iDefaultRefIdx >= 0) 4172 Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eCurrRefPicList, iDefaultRefIdx); 4173 for (Int iRefPicList = 0; iRefPicList < m_pcSlice->getNumRefIdx( eCurrRefPicList ); iRefPicList++) 4174 { 4175 if (iDefaultRefPOC == m_pcSlice->getRefPOC(eCurrRefPicList, iRefPicList)) 4486 4176 { 4487 Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eCurrRefPicList, iDefaultRefIdx); 4488 for (Int iRefPicList = 0; iRefPicList < m_pcSlice->getNumRefIdx( eCurrRefPicList ); iRefPicList++) 4489 { 4490 if (iDefaultRefPOC == m_pcSlice->getRefPOC(eCurrRefPicList, iRefPicList)) 4491 { 4492 #if ETRIKHU_CLEANUP_H0083 4493 bSPIVMPFlag = true; 4494 #else 4495 pbSPIVMPFlag[iCount] = true; 4496 #endif 4497 TComMv cMv = cDefaultMvField.getMv() + cMvRounding; 4498 cMv >>= 2; 4499 clipMv( cMv ); 4500 cMvFieldSaved[eCurrRefPicList].setMvField(cMv, iRefPicList) ; 4501 break; 4502 } 4503 } 4177 bSPIVMPFlag = true; 4178 TComMv cMv = cDefaultMvField.getMv() + cMvRounding; 4179 cMv >>= 2; 4180 clipMv( cMv ); 4181 cMvFieldSaved[eCurrRefPicList].setMvField(cMv, iRefPicList) ; 4182 break; 4504 4183 } 4184 } 4505 4185 } 4506 }4507 #if ETRIKHU_CLEANUP_H0083 4186 } 4187 } 4508 4188 if ( bSPIVMPFlag == true ) 4509 #else4510 if ( pbSPIVMPFlag[iCount] == true )4511 #endif4512 4189 { 4513 4190 iInterDirSaved = (cMvFieldSaved[0].getRefIdx()!=-1 ? 1: 0) + (cMvFieldSaved[1].getRefIdx()!=-1 ? 2: 0); … … 4519 4196 if ( iInterDirSaved != 0 ) 4520 4197 { 4521 #endif 4522 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iPUHeight) 4523 { 4524 for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iPUWidth) 4198 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iPUHeight) 4525 4199 { 4526 iTexPosX = j + iOffsetX; 4527 iTexPosY = i + iOffsetY; 4528 pcTexRec->getCUAddrAndPartIdx( iTexPosX, iTexPosY, iTexCUAddr, iTexAbsPartIdx ); 4529 pcTexCU = pcTexPic->getCU( iTexCUAddr ); 4530 4531 if( pcTexCU && !pcTexCU->isIntra(iTexAbsPartIdx) ) 4200 for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iPUWidth) 4532 4201 { 4533 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 4202 iTexPosX = j + iOffsetX; 4203 iTexPosY = i + iOffsetY; 4204 pcTexRec->getCUAddrAndPartIdx( iTexPosX, iTexPosY, iTexCUAddr, iTexAbsPartIdx ); 4205 pcTexCU = pcTexPic->getCU( iTexCUAddr ); 4206 4207 if( pcTexCU && !pcTexCU->isIntra(iTexAbsPartIdx) ) 4534 4208 { 4535 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 4536 TComMvField cTexMvField; 4537 pcTexCU->getMvField( pcTexCU, iTexAbsPartIdx, eCurrRefPicList, cTexMvField ); 4538 Int iValidDepRef = getPic()->isTextRefValid( eCurrRefPicList, cTexMvField.getRefIdx() ); 4539 if( (cTexMvField.getRefIdx()>=0) && ( iValidDepRef >= 0 ) ) 4209 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 4540 4210 { 4541 TComMv cMv = cTexMvField.getMv() + cMvRounding; 4542 cMv >>=2; 4211 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 4212 TComMvField cTexMvField; 4213 pcTexCU->getMvField( pcTexCU, iTexAbsPartIdx, eCurrRefPicList, cTexMvField ); 4214 Int iValidDepRef = getPic()->isTextRefValid( eCurrRefPicList, cTexMvField.getRefIdx() ); 4215 if( (cTexMvField.getRefIdx()>=0) && ( iValidDepRef >= 0 ) ) 4216 { 4217 TComMv cMv = cTexMvField.getMv() + cMvRounding; 4218 cMv >>=2; 4543 4219 #if !(NTT_BUG_FIX_TK54) 4544 this->clipMv( cMv ); 4545 #endif 4546 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iValidDepRef); 4547 } 4548 } 4549 } 4550 puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0); 4551 if (puhInterDirSP[iPartition] == 0) 4552 { 4553 if (iInterDirSaved != 0) 4554 { 4555 puhInterDirSP[iPartition] = iInterDirSaved; 4556 pcMvFieldSP[2*iPartition] = cMvFieldSaved[0]; 4557 pcMvFieldSP[2*iPartition + 1] = cMvFieldSaved[1]; 4558 } 4559 } 4560 #if MTK_DIS_SPBIP8X4_H0205 4561 if (iPUHeight + iPUWidth == 12) 4562 { 4563 if (puhInterDirSP[iPartition] == 3) 4564 { 4565 puhInterDirSP[iPartition] = 1; 4566 pcMvFieldSP[2*iPartition + 1].setMvField(TComMv(0,0), -1); 4567 } 4568 } 4569 #endif 4570 #if !MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 4571 else 4572 { 4573 if (iInterDirSaved ==0) 4574 { 4575 #if ETRIKHU_CLEANUP_H0083 4576 bSPIVMPFlag = true; 4577 #else 4578 pbSPIVMPFlag[iCount] = true; 4579 #endif 4580 tmpDir = puhInterDirSP[iPartition]; 4581 tmpMV[0] = pcMvFieldSP[2*iPartition]; 4582 tmpMV[1] = pcMvFieldSP[2*iPartition+1]; 4583 4584 if (iPartition != 0) 4585 { 4586 for (Int iPart = iPartition-1; iPart >= 0; iPart--) 4587 { 4588 puhInterDirSP[iPart] = puhInterDirSP[iPartition]; 4589 pcMvFieldSP[2*iPart] = pcMvFieldSP[2*iPartition]; 4590 pcMvFieldSP[2*iPart + 1] = pcMvFieldSP[2*iPartition + 1]; 4220 this->clipMv( cMv ); 4221 #endif 4222 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iValidDepRef); 4591 4223 } 4592 4224 } 4593 4225 } 4594 iInterDirSaved = puhInterDirSP[iPartition]; 4595 cMvFieldSaved[0] = pcMvFieldSP[2*iPartition]; 4596 cMvFieldSaved[1] = pcMvFieldSP[2*iPartition + 1]; 4226 puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0); 4227 if (puhInterDirSP[iPartition] == 0) 4228 { 4229 if (iInterDirSaved != 0) 4230 { 4231 puhInterDirSP[iPartition] = iInterDirSaved; 4232 pcMvFieldSP[2*iPartition] = cMvFieldSaved[0]; 4233 pcMvFieldSP[2*iPartition + 1] = cMvFieldSaved[1]; 4234 } 4235 } 4236 if (iPUHeight + iPUWidth == 12) 4237 { 4238 if (puhInterDirSP[iPartition] == 3) 4239 { 4240 puhInterDirSP[iPartition] = 1; 4241 pcMvFieldSP[2*iPartition + 1].setMvField(TComMv(0,0), -1); 4242 } 4243 } 4244 4245 iPartition ++; 4597 4246 } 4598 #endif4599 iPartition ++;4600 4247 } 4601 } 4602 #if MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 4248 #if H_3D 4603 4249 } 4604 4250 #endif … … 4609 4255 { 4610 4256 Int iCnloop = 0; 4611 #if ETRIKHU_CLEANUP_H00834612 4257 for(iCnloop = 0; iCnloop < 2; iCnloop ++) 4613 4258 { … … 4624 4269 m_mergCands[MRG_T].setCand( tmpMV, tmpDir, false, bSPIVMPFlag); 4625 4270 4626 #else4627 Bool bRemoveSpa = false; //pruning4628 4629 for(Int i = 0; i < 2; i ++)4630 {4631 iCnloop = iPosLeftAbove[i];4632 if ( iCnloop == -1 )4633 {4634 continue;4635 }4636 if(tmpDir == puhInterDirNeighbours[iCnloop] && tmpMV[0]==pcMvFieldNeighbours[(iCnloop<<1)] && tmpMV[1]==pcMvFieldNeighbours[(iCnloop<<1)+1])4637 {4638 bRemoveSpa = true;4639 break;4640 }4641 }4642 4643 if (!bRemoveSpa)4644 {4645 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV);4646 }4647 else4648 {4649 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (iCnloop-iCount), iCount3DV);4650 if (iCnloop<numA1B1B0)4651 {4652 numA1B1B0--;4653 }4654 iCountHEVC--;4655 4656 if (iPosLeftAbove[0] != -1)4657 {4658 if (iCnloop == iPosLeftAbove[0])4659 {4660 iPosLeftAbove[0] = -1;4661 }4662 else4663 {4664 iPosLeftAbove[0]++;4665 }4666 }4667 if (iPosLeftAbove[1] != -1)4668 {4669 if (iCnloop == iPosLeftAbove[1])4670 {4671 iPosLeftAbove[1] = -1;4672 }4673 else4674 {4675 if (iCnloop > iPosLeftAbove[1])4676 {4677 iPosLeftAbove[1]++;4678 }4679 }4680 }4681 }4682 pcMvFieldNeighbours[iCount<<1].setMvField(tmpMV[0].getMv(), tmpMV[0].getRefIdx());4683 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(tmpMV[1].getMv(), tmpMV[1].getRefIdx());4684 4685 puhInterDirNeighbours[iCount] = tmpDir;4686 #endif4687 4271 if ( mrgCandIdx == iCount ) 4688 4272 { … … 4763 4347 if( tmpDir != 0 ) 4764 4348 { 4765 #if !ETRIKHU_CLEANUP_H00834766 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV);4767 #endif4768 4349 m_ucDDTmpDepth = m_pcSlice->getDepthFromDV( iDV, iViewIdx ); 4769 4350 m_iUseDDDCandIdx = iCount; 4770 4351 4771 #if ETRIKHU_CLEANUP_H00834772 4352 m_mergCands[MRG_D].setCand( tmpMV, tmpDir, false, false); 4773 4353 if ( mrgCandIdx == iCount ) … … 4776 4356 } 4777 4357 iCount ++; 4778 #else4779 if( tmpDir == 1 )4780 {4781 pcMvFieldNeighbours[ iCount << 1 ] = tmpMV[ 0 ];4782 }4783 else if( tmpDir == 2 )4784 {4785 pcMvFieldNeighbours[( iCount << 1 ) + 1 ] = tmpMV[ 1 ];4786 }4787 4788 abCandIsInter [ iCount ] = true;4789 puhInterDirNeighbours[ iCount ] = tmpDir;4790 4791 if ( mrgCandIdx == iCount )4792 {4793 return;4794 }4795 iCount ++;4796 4797 Int iLeftAboveAvail = 0;4798 if( iPosLeftAbove[ 0 ] != -1 )4799 {4800 iPosLeftAbove[ 0 ] = iCount;4801 iLeftAboveAvail = 1;4802 }4803 if( iPosLeftAbove[ 1 ] != -1 )4804 {4805 iPosLeftAbove[ 1 ] = iCount + iLeftAboveAvail;4806 }4807 #endif4808 4358 } 4809 4359 } … … 4813 4363 //////// DERIVE IvMC, IvMCShift,IvDCShift, IvDC Candidates ///// 4814 4364 ///////////////////////////////////////////////////////////////// 4815 4816 #if !ETRIKHU_CLEANUP_H00834817 Int posIvDC = -1;4818 #endif4819 4365 4820 4366 // { IvMCL0, IvMCL1, IvDCL0, IvDCL1, IvMCL0Shift, IvMCL1Shift, IvDCL0Shift, IvDCL1Shift }; … … 4828 4374 Bool ivMvPredFlag = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() ); 4829 4375 4830 #if SHARP_SIMPLE_MERGE_H00624831 4376 ivMvPredFlag &= (nPSW + nPSH > 12); 4832 #endif4833 4377 if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1) 4834 4378 { 4835 #if SEC_ADAPT_DISABLE_IVMP4836 4379 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP, bICFlag ); 4837 #else4838 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP );4839 #endif4840 4380 } 4841 4381 … … 4863 4403 4864 4404 Bool bRemoveSpa = false; //pruning 4865 #if !ETRIKHU_CLEANUP_H00834866 Bool bIvMC = false;4867 Int iCnloop=0;4868 #endif4869 4405 4870 4406 if (!bIsDepth) … … 4872 4408 for(Int i = 0; i < 2; i ++) 4873 4409 { 4874 #if ETRIKHU_CLEANUP_H00834875 4410 if ( !m_mergCands[MRG_A1 + i].m_bAvailable ) // prunning to A1, B1 4876 4411 { … … 4882 4417 break; 4883 4418 } 4884 #else4885 iCnloop = iPosLeftAbove[i];4886 if ( iCnloop == -1 )4887 {4888 continue;4889 }4890 if(ivCandDir[0] == puhInterDirNeighbours[iCnloop] && tmpMV[0]==pcMvFieldNeighbours[(iCnloop<<1)] && tmpMV[1]==pcMvFieldNeighbours[(iCnloop<<1)+1])4891 {4892 bRemoveSpa = true;4893 break;4894 }4895 #endif4896 4419 } 4897 4420 } 4898 4421 if (bIsDepth) 4899 4422 { 4900 #if ETRIKHU_CLEANUP_H00834901 4423 if (m_mergCands[MRG_T].m_bAvailable && ivCandDir[0] == m_mergCands[MRG_T].m_uDir && tmpMV[0]==m_mergCands[MRG_T].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_T].m_cMvField[1]) 4902 4424 { 4903 4425 bRemoveSpa = true; 4904 4426 } 4905 #else 4906 iCnloop = iCount-1; 4907 for(; iCnloop >= 0; iCnloop --) 4908 { 4909 #if H_3D_DDD 4910 if( iCnloop == m_iUseDDDCandIdx ) 4911 { 4912 continue; 4913 } 4914 #endif 4915 if(ivCandDir[0] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==tmpMV[0] && pcMvFieldNeighbours[(iCnloop<<1)+1]==tmpMV[1]) // F0125 compatible with F0093 4916 { 4917 bRemoveSpa = true; 4918 break; 4919 } 4920 } 4921 #endif 4922 } 4923 4427 } 4924 4428 if (!bRemoveSpa) 4925 4429 { 4926 #if !ETRIKHU_CLEANUP_H00834927 bIvMC = true;4928 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV);4929 4930 if (iPosLeftAbove[0] != -1)4931 {4932 iPosLeftAbove[0]++;4933 }4934 if (iPosLeftAbove[1] != -1)4935 {4936 iPosLeftAbove[1]++;4937 }4938 }4939 else if (bRemoveSpa && !bIsDepth)4940 {4941 bIvMC = true;4942 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (iCnloop-iCount), iCount3DV);4943 4944 if (iCnloop<numA1B1B0)4945 {4946 numA1B1B0--;4947 }4948 iCountHEVC--;4949 4950 if (iPosLeftAbove[0] != -1)4951 {4952 if (iCnloop == iPosLeftAbove[0])4953 {4954 iPosLeftAbove[0] = -1;4955 }4956 else4957 {4958 iPosLeftAbove[0]++;4959 }4960 }4961 if (iPosLeftAbove[1] != -1)4962 {4963 if (iCnloop == iPosLeftAbove[1])4964 {4965 iPosLeftAbove[1] = -1;4966 }4967 else4968 {4969 if (iCnloop > iPosLeftAbove[1])4970 {4971 iPosLeftAbove[1]++;4972 }4973 }4974 }4975 }4976 4977 if (bIvMC)4978 {4979 #endif4980 #if ETRIKHU_CLEANUP_H00834981 4430 Bool SPIVMPFlag = false; 4982 #if MTK_DIS_SPBIP8X4_H02054983 4431 if(!m_pcSlice->getIsDepth()) 4984 #else4985 if(!m_pcSlice->getIsDepth() && getPartitionSize(0) == SIZE_2Nx2N )4986 #endif4987 4432 { 4988 4433 SPIVMPFlag = true; … … 4991 4436 SPIVMPFlag &= !bDBBPFlag; 4992 4437 #endif 4993 #else 4994 if(!m_pcSlice->getIsDepth() && getPartitionSize(0) == SIZE_2Nx2N ) 4995 { 4996 pbSPIVMPFlag[iCount] = true; 4997 } 4998 #if H_3D_DBBP 4999 pbSPIVMPFlag[iCount] &= !bDBBPFlag; 5000 #endif 5001 #endif 5002 #if ETRIKHU_CLEANUP_H0083 4438 5003 4439 m_mergCands[MRG_IVMC].setCand( tmpMV, ivCandDir[0], false, SPIVMPFlag); 5004 #else5005 if( ( ivCandDir[0] & 1 ) == 1 )5006 {5007 pcMvFieldNeighbours[iCount<<1].setMvField( ivCandMv[ 0 ], ivCandRefIdx[ 0 ] );5008 }5009 if( ( ivCandDir[0] & 2 ) == 2 )5010 {5011 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( ivCandMv[ 1 ], ivCandRefIdx[ 1 ] );5012 }5013 5014 puhInterDirNeighbours[ iCount ] = ivCandDir[0];5015 #endif5016 4440 5017 4441 if ( mrgCandIdx == iCount ) … … 5031 4455 5032 4456 #if H_3D 5033 #if ETRIKHU_CLEANUP_H00835034 4457 iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable + m_mergCands[MRG_B0].m_bAvailable; 5035 #else5036 iCount += numA1B1B0;5037 #endif5038 4458 #else 5039 4459 //left … … 5164 4584 for(Int i = 0; i < 2; i ++) 5165 4585 { 5166 #if ETRIKHU_CLEANUP_H00835167 4586 if ( !m_mergCands[MRG_A1+i].m_bAvailable ) 5168 #else5169 Int iCnloop = iPosLeftAbove[i];5170 if ( iCnloop == -1 )5171 #endif5172 4587 { 5173 4588 continue; 5174 4589 } 5175 #if ETRIKHU_CLEANUP_H00835176 #if ETRIKHU_BUGFIX_H00835177 4590 if (ivCandDir[1] == m_mergCands[MRG_A1+i].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+i].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+i].m_cMvField[1]) 5178 #else5179 Int offset = 0;5180 offset += A1_was_available;5181 offset += B1_was_available;5182 offset += m_mergCands[MRG_B0].m_bAvailable;5183 if (puhInterDirNeighbours[offset] == m_mergCands[MRG_A1+i].m_uDir && pcMvFieldNeighbours[(offset<<1)]==m_mergCands[MRG_A1+i].m_cMvField[0] && pcMvFieldNeighbours[(offset<<1)+1]==m_mergCands[MRG_A1+i].m_cMvField[1])5184 #endif5185 #else5186 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])5187 #endif5188 4591 { 5189 4592 bRemoveSpa = true; … … 5193 4596 if(!bRemoveSpa) 5194 4597 { 5195 #if ETRIKHU_CLEANUP_H00835196 4598 #if H_3D_NBDV 5197 4599 tmpMV[0].getMv().setIDVFlag (false); … … 5199 4601 #endif 5200 4602 m_mergCands[MRG_IVDC].setCand( tmpMV, ivCandDir[1], false, false); 5201 #else 5202 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 5203 puhInterDirNeighbours[ iCount ] = ivCandDir[1]; 5204 if( ( ivCandDir[1] & 1 ) == 1 ) 5205 { 5206 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ 2 ], ivCandRefIdx[ 2 ] ); 5207 } 5208 if( ( ivCandDir[1] & 2 ) == 2 ) 5209 { 5210 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] ); 5211 } 5212 #if H_3D_NBDV 5213 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 5214 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 5215 #endif 5216 posIvDC = iCount; 5217 #endif 4603 5218 4604 if ( mrgCandIdx == iCount ) 5219 4605 return; … … 5243 4629 !bARPFlag && 5244 4630 #endif 5245 #if SHARP_SIMPLE_MERGE_H00624631 #if H_3D 5246 4632 (nPSW + nPSH > 12) && 5247 4633 #endif 5248 #if RWTH_DBBP_NO_SPU_H00574634 #if H_3D_DBBP 5249 4635 !bDBBPFlag && 5250 4636 #endif 5251 #if ETRIKHU_CLEANUP_H00835252 4637 xAddVspCand( mrgCandIdx, &cDisInfo, iCount ) ) 5253 #else5254 xAddVspCand( mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, iCount3DV, inheritedVSPDisInfo ) )5255 #endif5256 4638 { 5257 4639 return; … … 5269 4651 5270 4652 #if H_3D 5271 #if ETRIKHU_CLEANUP_H00835272 4653 iCount += m_mergCands[MRG_A0].m_bAvailable + m_mergCands[MRG_B2].m_bAvailable; 5273 #else5274 iCount += numA0B2;5275 #endif5276 4654 #else 5277 4655 //left bottom … … 5347 4725 if( ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() ) 5348 4726 { 5349 #if ETRIKHU_CLEANUP_H00835350 4727 if(xAddIvMRGCand( mrgCandIdx, iCount, ivCandDir, ivCandMv, ivCandRefIdx ) ) 5351 #else5352 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag, iCount3DV, inheritedVSPDisInfo ) )5353 #endif5354 4728 { 5355 4729 return; … … 5362 4736 } 5363 4737 #endif 5364 5365 #if H_3D 5366 #if !ETRIKHU_CLEANUP_H0083 5367 if (iCountHEVC + iCount3DV > getSlice()->getMaxNumMergeCand()) 5368 { 5369 iCount = getSlice()->getMaxNumMergeCand(); 5370 } 5371 else 5372 { 5373 iCount = iCountHEVC + iCount3DV; 5374 } 5375 numValidMergeCand = iCount; 5376 #endif 5377 #else 4738 #if !H_3D 5378 4739 if ( getSlice()->getEnableTMVPFlag()) 5379 4740 { … … 5463 4824 } 5464 4825 } 5465 // early termination 4826 // early termination 5466 4827 if (iCount == getSlice()->getMaxNumMergeCand()) 5467 4828 { … … 7232 6593 7233 6594 TComMv cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 7234 #if SEC_VER_DONBDV_H01037235 6595 if( depthRefineFlag ) 7236 6596 { 7237 6597 cDv.setVer(0); 7238 6598 } 7239 #endif7240 6599 7241 6600 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); … … 7346 6705 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 7347 6706 #endif 7348 #if SEC_ADAPT_DISABLE_IVMP7349 6707 , Bool bICFlag 7350 #endif7351 6708 ) 7352 6709 { … … 7377 6734 7378 6735 TComMv cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 7379 #if SEC_VER_DONBDV_H01037380 6736 if( depthRefineFlag ) 7381 6737 { 7382 6738 cDv.setVer(0); 7383 6739 } 7384 #endif7385 6740 7386 6741 Bool abPdmAvailable[8] = {false, false, false, false, false, false, false, false}; … … 7392 6747 #endif 7393 6748 7394 #if SEC_ADAPT_DISABLE_IVMP7395 6749 if(!bICFlag) 7396 6750 { 7397 #endif7398 6751 7399 6752 #if H_3D_SPIVMP 7400 //////////////////////////////// 7401 //////////sub-PU IvMC/////////// 7402 //////////////////////////////// 7403 if(!m_pcSlice->getIsDepth()) 7404 { 7405 #if MTK_DIS_SPBIP8X4_H0205 7406 if (!getDBBPFlag(0)) 6753 //////////////////////////////// 6754 //////////sub-PU IvMC/////////// 6755 //////////////////////////////// 6756 if(!m_pcSlice->getIsDepth()) 6757 { 6758 if (!getDBBPFlag(0)) 6759 { 6760 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 6761 getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 6762 6763 for (Int i=0; i<iNumSP; i++) 6764 { 6765 puhInterDirSP[i] = 0; 6766 pcMvFieldSP[2*i].getMv().set(0, 0); 6767 pcMvFieldSP[2*i+1].getMv().set(0,0); 6768 pcMvFieldSP[2*i].setRefIdx(-1); 6769 pcMvFieldSP[2*i+1].setRefIdx(-1); 6770 } 6771 6772 Int iBaseCUAddr; 6773 Int iBaseAbsPartIdx; 6774 TComDataCU* pcBaseCU; 6775 Int iPartition = 0; 6776 6777 Int iDelX = iSPWidth/2; 6778 Int iDelY = iSPHeight/2; 6779 6780 Int iCenterPosX = iCurrPosX + ( ( iWidth / iSPWidth ) >> 1 ) * iSPWidth + ( iSPWidth >> 1 ); 6781 Int iCenterPosY = iCurrPosY + ( ( iHeight / iSPHeight ) >> 1 ) * iSPHeight + (iSPHeight >> 1); 6782 Int iRefCenterCUAddr, iRefCenterAbsPartIdx; 6783 6784 if(iWidth == iSPWidth && iHeight == iSPHeight) 6785 { 6786 iCenterPosX = iCurrPosX + (iWidth >> 1); 6787 iCenterPosY = iCurrPosY + (iHeight >> 1); 6788 } 6789 6790 Int iRefCenterPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 6791 Int iRefCenterPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) ); 6792 6793 pcBaseRec->getCUAddrAndPartIdx( iRefCenterPosX , iRefCenterPosY , iRefCenterCUAddr, iRefCenterAbsPartIdx ); 6794 TComDataCU* pcDefaultCU = pcBasePic->getCU( iRefCenterCUAddr ); 6795 if(!( pcDefaultCU->getPredictionMode( iRefCenterAbsPartIdx ) == MODE_INTRA )) 6796 { 6797 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 6798 { 6799 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 6800 Bool stopLoop = false; 6801 for(Int iLoop = 0; iLoop < 2 && !stopLoop; ++iLoop) 6802 { 6803 RefPicList eDefaultRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); 6804 TComMvField cDefaultMvField; 6805 pcDefaultCU->getMvField( pcDefaultCU, iRefCenterAbsPartIdx, eDefaultRefPicList, cDefaultMvField ); 6806 Int iDefaultRefIdx = cDefaultMvField.getRefIdx(); 6807 if (iDefaultRefIdx >= 0) 6808 { 6809 Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eDefaultRefPicList, iDefaultRefIdx); 6810 if (iDefaultRefPOC != pcSlice->getPOC()) 6811 { 6812 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++) 6813 { 6814 if (iDefaultRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx)) 6815 { 6816 abPdmAvailable[ uiCurrRefListId ] = true; 6817 TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer()); 6818 #if H_3D_NBDV 6819 #if H_3D_IV_MERGE 6820 if( !bIsDepth ) 6821 { 6822 #endif 6823 cMv.setIDVFlag (true); 6824 cMv.setIDVHor (cDv.getHor()); 6825 cMv.setIDVVer (cDv.getVer()); 6826 cMv.setIDVVId (iViewIndex); 6827 #if H_3D_IV_MERGE 6828 } 6829 #endif 6830 #endif 6831 #if !(NTT_BUG_FIX_TK54) 6832 clipMv( cMv ); 6833 #endif 6834 paiPdmRefIdx [ uiCurrRefListId ] = iPdmRefIdx; 6835 pacPdmMv [ uiCurrRefListId ] = cMv; 6836 stopLoop = true; 6837 break; 6838 } 6839 } 6840 } 6841 } 6842 } 6843 } 6844 } 6845 availableMcDc[0] = ( abPdmAvailable[0]? 1 : 0) + (abPdmAvailable[1]? 2 : 0); 6846 6847 if(availableMcDc[0]) 6848 { 6849 6850 Int iBasePosX, iBasePosY; 6851 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iSPHeight) 6852 { 6853 for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iSPWidth) 6854 { 6855 iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 )); 6856 iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 )); 6857 6858 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY, iBaseCUAddr, iBaseAbsPartIdx ); 6859 pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 6860 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 6861 { 6862 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 6863 { 6864 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 6865 Bool bLoop_stop = false; 6866 for(Int iLoop = 0; iLoop < 2 && !bLoop_stop; ++iLoop) 6867 { 6868 RefPicList eBaseRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); 6869 TComMvField cBaseMvField; 6870 pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField ); 6871 Int iBaseRefIdx = cBaseMvField.getRefIdx(); 6872 if (iBaseRefIdx >= 0) 6873 { 6874 Int iBaseRefPOC = pcBaseCU->getSlice()->getRefPOC(eBaseRefPicList, iBaseRefIdx); 6875 if (iBaseRefPOC != pcSlice->getPOC()) 6876 { 6877 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++) 6878 { 6879 if (iBaseRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx)) 6880 { 6881 abPdmAvailable[ uiCurrRefListId ] = true; 6882 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 6883 6884 if( !bIsDepth ) 6885 { 6886 cMv.setIDVFlag (true); 6887 cMv.setIDVHor (cDv.getHor()); 6888 cMv.setIDVVer (cDv.getVer()); 6889 cMv.setIDVVId (iViewIndex); 6890 } 6891 6892 #if !(NTT_BUG_FIX_TK54) 6893 clipMv( cMv ); 6894 #endif 6895 bLoop_stop = true; 6896 6897 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iPdmRefIdx); 6898 break; 6899 } 6900 } 6901 } 6902 } 6903 } 6904 } 6905 } 6906 6907 puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0); 6908 if (puhInterDirSP[iPartition] == 0) 6909 { 6910 puhInterDirSP[iPartition] = availableMcDc[0]; 6911 pcMvFieldSP[2*iPartition].setMvField(pacPdmMv[0], paiPdmRefIdx[0]); 6912 pcMvFieldSP[2*iPartition + 1].setMvField(pacPdmMv[1], paiPdmRefIdx[1]); 6913 6914 } 6915 if (iSPHeight + iSPWidth == 12) 6916 { 6917 if (puhInterDirSP[iPartition] == 3) 6918 { 6919 puhInterDirSP[iPartition] = 1; 6920 pcMvFieldSP[2*iPartition + 1].setMvField(TComMv(0,0), -1); 6921 } 6922 } 6923 iPartition ++; 6924 } 6925 } 6926 } 6927 } 6928 6929 iCurrPosX += ( iWidth >> 1 ); 6930 iCurrPosY += ( iHeight >> 1 ); 6931 } 6932 #endif 6933 6934 //////////////////////////////// 6935 /////// IvMC + IvMCShift /////// 6936 //////////////////////////////// 6937 6938 #if H_3D_SPIVMP 6939 if(m_pcSlice->getIsDepth()) 6940 { 6941 iCurrPosX += ( iWidth >> 1 ); 6942 iCurrPosY += ( iHeight >> 1 ); 6943 } 6944 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7407 6945 #else 7408 if( getPartitionSize(0) == SIZE_2Nx2N ) 7409 #endif 7410 { 7411 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 7412 getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 7413 7414 for (Int i=0; i<iNumSP; i++) 7415 { 7416 puhInterDirSP[i] = 0; 7417 pcMvFieldSP[2*i].getMv().set(0, 0); 7418 pcMvFieldSP[2*i+1].getMv().set(0,0); 7419 pcMvFieldSP[2*i].setRefIdx(-1); 7420 pcMvFieldSP[2*i+1].setRefIdx(-1); 7421 } 6946 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 6947 #endif 6948 { 6949 // iLoopCan == 0 --> IvMC 6950 // iLoopCan == 1 --> IvMCShift 7422 6951 7423 6952 Int iBaseCUAddr; 7424 6953 Int iBaseAbsPartIdx; 7425 TComDataCU* pcBaseCU; 7426 Int iPartition = 0; 7427 7428 Int iDelX = iSPWidth/2; 7429 Int iDelY = iSPHeight/2; 7430 7431 Int iCenterPosX = iCurrPosX + ( ( iWidth / iSPWidth ) >> 1 ) * iSPWidth + ( iSPWidth >> 1 ); 7432 Int iCenterPosY = iCurrPosY + ( ( iHeight / iSPHeight ) >> 1 ) * iSPHeight + (iSPHeight >> 1); 7433 Int iRefCenterCUAddr, iRefCenterAbsPartIdx; 7434 7435 if(iWidth == iSPWidth && iHeight == iSPHeight) 7436 { 7437 iCenterPosX = iCurrPosX + (iWidth >> 1); 7438 iCenterPosY = iCurrPosY + (iHeight >> 1); 7439 } 7440 7441 Int iRefCenterPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 7442 Int iRefCenterPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) ); 7443 7444 pcBaseRec->getCUAddrAndPartIdx( iRefCenterPosX , iRefCenterPosY , iRefCenterCUAddr, iRefCenterAbsPartIdx ); 7445 TComDataCU* pcDefaultCU = pcBasePic->getCU( iRefCenterCUAddr ); 7446 if(!( pcDefaultCU->getPredictionMode( iRefCenterAbsPartIdx ) == MODE_INTRA )) 7447 { 6954 6955 Int offsetW = (iLoopCan == 0) ? 0 : ( ((iWidth /2)*4) + 4 ); 6956 Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 ); 6957 6958 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) ); 6959 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) ); 6960 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx ); 6961 6962 TComDataCU* pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 6963 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 6964 { 6965 // Loop reference picture list of current slice (X in spec). 7448 6966 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 7449 6967 { 7450 6968 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 6969 7451 6970 Bool stopLoop = false; 6971 // Loop reference picture list of candidate slice (Y in spec) 7452 6972 for(Int iLoop = 0; iLoop < 2 && !stopLoop; ++iLoop) 7453 6973 { 7454 RefPicList e DefaultRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId );7455 TComMvField c DefaultMvField;7456 pc DefaultCU->getMvField( pcDefaultCU, iRefCenterAbsPartIdx, eDefaultRefPicList, cDefaultMvField );7457 Int i DefaultRefIdx = cDefaultMvField.getRefIdx();7458 if (i DefaultRefIdx >= 0)6974 RefPicList eBaseRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); 6975 TComMvField cBaseMvField; 6976 pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField ); 6977 Int iBaseRefIdx = cBaseMvField.getRefIdx(); 6978 if (iBaseRefIdx >= 0) 7459 6979 { 7460 Int i DefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eDefaultRefPicList, iDefaultRefIdx);7461 if (i DefaultRefPOC != pcSlice->getPOC())6980 Int iBaseRefPOC = pcBaseCU->getSlice()->getRefPOC(eBaseRefPicList, iBaseRefIdx); 6981 if (iBaseRefPOC != pcSlice->getPOC()) 7462 6982 { 7463 6983 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++) 7464 6984 { 7465 if (i DefaultRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx))6985 if (iBaseRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx)) 7466 6986 { 7467 abPdmAvailable[ uiCurrRefListId] = true;7468 TComMv cMv(c DefaultMvField.getHor(), cDefaultMvField.getVer());6987 abPdmAvailable[ (uiCurrRefListId + (iLoopCan<<2)) ] = true; 6988 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 7469 6989 #if H_3D_NBDV 7470 6990 #if H_3D_IV_MERGE … … 7483 7003 clipMv( cMv ); 7484 7004 #endif 7485 paiPdmRefIdx [ uiCurrRefListId] = iPdmRefIdx;7486 pacPdmMv [ uiCurrRefListId] = cMv;7005 paiPdmRefIdx [ (uiCurrRefListId + (iLoopCan<<2)) ] = iPdmRefIdx; 7006 pacPdmMv [ (uiCurrRefListId + (iLoopCan<<2)) ] = cMv; 7487 7007 stopLoop = true; 7488 7008 break; … … 7494 7014 } 7495 7015 } 7496 availableMcDc[0] = ( abPdmAvailable[0]? 1 : 0) + (abPdmAvailable[1]? 2 : 0); 7497 7498 if(availableMcDc[0]) 7499 { 7500 7501 Int iBasePosX, iBasePosY; 7502 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iSPHeight) 7503 { 7504 for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iSPWidth) 7505 { 7506 iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 )); 7507 iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 )); 7508 7509 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY, iBaseCUAddr, iBaseAbsPartIdx ); 7510 pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 7511 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 7512 { 7513 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 7514 { 7515 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 7516 Bool bLoop_stop = false; 7517 for(Int iLoop = 0; iLoop < 2 && !bLoop_stop; ++iLoop) 7518 { 7519 RefPicList eBaseRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); 7520 TComMvField cBaseMvField; 7521 pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField ); 7522 Int iBaseRefIdx = cBaseMvField.getRefIdx(); 7523 if (iBaseRefIdx >= 0) 7524 { 7525 Int iBaseRefPOC = pcBaseCU->getSlice()->getRefPOC(eBaseRefPicList, iBaseRefIdx); 7526 if (iBaseRefPOC != pcSlice->getPOC()) 7527 { 7528 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++) 7529 { 7530 if (iBaseRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx)) 7531 { 7532 abPdmAvailable[ uiCurrRefListId ] = true; 7533 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 7534 7535 if( !bIsDepth ) 7536 { 7537 cMv.setIDVFlag (true); 7538 cMv.setIDVHor (cDv.getHor()); 7539 cMv.setIDVVer (cDv.getVer()); 7540 cMv.setIDVVId (iViewIndex); 7541 } 7542 7543 #if !(NTT_BUG_FIX_TK54) 7544 clipMv( cMv ); 7545 #endif 7546 bLoop_stop = true; 7547 7548 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iPdmRefIdx); 7549 break; 7550 } 7551 } 7552 } 7553 } 7554 } 7555 } 7556 } 7557 7558 puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0); 7559 if (puhInterDirSP[iPartition] == 0) 7560 { 7561 puhInterDirSP[iPartition] = availableMcDc[0]; 7562 pcMvFieldSP[2*iPartition].setMvField(pacPdmMv[0], paiPdmRefIdx[0]); 7563 pcMvFieldSP[2*iPartition + 1].setMvField(pacPdmMv[1], paiPdmRefIdx[1]); 7564 7565 } 7566 #if MTK_DIS_SPBIP8X4_H0205 7567 if (iSPHeight + iSPWidth == 12) 7568 { 7569 if (puhInterDirSP[iPartition] == 3) 7570 { 7571 puhInterDirSP[iPartition] = 1; 7572 pcMvFieldSP[2*iPartition + 1].setMvField(TComMv(0,0), -1); 7573 } 7574 } 7575 #endif 7576 iPartition ++; 7577 } 7578 } 7579 } 7580 } 7581 7582 iCurrPosX += ( iWidth >> 1 ); 7583 iCurrPosY += ( iHeight >> 1 ); 7584 } 7585 #endif 7586 7587 //////////////////////////////// 7588 /////// IvMC + IvMCShift /////// 7589 //////////////////////////////// 7590 7016 } 7591 7017 #if H_3D_SPIVMP 7592 if(m_pcSlice->getIsDepth()) 7593 { 7594 iCurrPosX += ( iWidth >> 1 ); 7595 iCurrPosY += ( iHeight >> 1 ); 7596 } 7597 #if MTK_DIS_SPBIP8X4_H0205 7598 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7018 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7599 7019 #else 7600 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getPartitionSize(uiPartAddr) != SIZE_2Nx2N) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7601 #endif 7602 #else 7603 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7604 #endif 7605 { 7606 // iLoopCan == 0 --> IvMC 7607 // iLoopCan == 1 --> IvMCShift 7608 7609 Int iBaseCUAddr; 7610 Int iBaseAbsPartIdx; 7611 7612 Int offsetW = (iLoopCan == 0) ? 0 : ( ((iWidth /2)*4) + 4 ); 7613 Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 ); 7614 7615 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) ); 7616 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) ); 7617 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx ); 7618 7619 TComDataCU* pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 7620 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 7621 { 7622 // Loop reference picture list of current slice (X in spec). 7623 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 7624 { 7625 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 7626 7627 Bool stopLoop = false; 7628 // Loop reference picture list of candidate slice (Y in spec) 7629 for(Int iLoop = 0; iLoop < 2 && !stopLoop; ++iLoop) 7630 { 7631 RefPicList eBaseRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); 7632 TComMvField cBaseMvField; 7633 pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField ); 7634 Int iBaseRefIdx = cBaseMvField.getRefIdx(); 7635 if (iBaseRefIdx >= 0) 7636 { 7637 Int iBaseRefPOC = pcBaseCU->getSlice()->getRefPOC(eBaseRefPicList, iBaseRefIdx); 7638 if (iBaseRefPOC != pcSlice->getPOC()) 7639 { 7640 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++) 7641 { 7642 if (iBaseRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx)) 7643 { 7644 abPdmAvailable[ (uiCurrRefListId + (iLoopCan<<2)) ] = true; 7645 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 7646 #if H_3D_NBDV 7647 #if H_3D_IV_MERGE 7648 if( !bIsDepth ) 7649 { 7650 #endif 7651 cMv.setIDVFlag (true); 7652 cMv.setIDVHor (cDv.getHor()); 7653 cMv.setIDVVer (cDv.getVer()); 7654 cMv.setIDVVId (iViewIndex); 7655 #if H_3D_IV_MERGE 7656 } 7657 #endif 7658 #endif 7659 #if !(NTT_BUG_FIX_TK54) 7660 clipMv( cMv ); 7661 #endif 7662 paiPdmRefIdx [ (uiCurrRefListId + (iLoopCan<<2)) ] = iPdmRefIdx; 7663 pacPdmMv [ (uiCurrRefListId + (iLoopCan<<2)) ] = cMv; 7664 stopLoop = true; 7665 break; 7666 } 7667 } 7668 } 7669 } 7670 } 7671 } 7672 } 7673 } 7674 #if H_3D_SPIVMP 7675 #if H_3D_FIX_DBBP_IVMP 7676 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7677 #else 7678 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7679 #endif 7680 #else 7681 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7682 #endif 7683 { 7684 availableMcDc[(iLoopCan << 1)] = ( abPdmAvailable[(iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[1 + (iLoopCan<<2)] ? 2 : 0); 7685 } 7686 7687 #if SEC_ADAPT_DISABLE_IVMP 7688 } 7689 #endif 7020 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7021 #endif 7022 { 7023 availableMcDc[(iLoopCan << 1)] = ( abPdmAvailable[(iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[1 + (iLoopCan<<2)] ? 2 : 0); 7024 } 7025 7026 } 7690 7027 7691 7028 //////////////////////////////// -
trunk/source/Lib/TLibCommon/TComDataCU.h
r964 r976 70 70 Bool abMergeFlag[2]; // for two segments 71 71 UChar auhMergeIndex[2]; // for two segments 72 #if !RWTH_DBBP_NO_SPU_H005773 Char ahVSPFlag[2]; // for two segments74 DisInfo acDvInfo[2]; // for two segments75 #endif76 77 72 PartSize eVirtualPartSize; 78 73 UInt uiVirtualPartIndex; … … 195 190 Bool* m_pbSDCFlag; 196 191 Pel* m_apSegmentDCOffset[2]; 197 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108198 192 Pel m_apDmmPredictor[2]; 199 #endif200 193 #endif 201 194 #endif … … 238 231 #endif 239 232 240 #if ETRIKHU_CLEANUP_H0083233 #if H_3D_IV_MERGE 241 234 TComMotionCand m_mergCands[MRG_IVSHIFT+1]; 242 235 Int m_baseListidc; … … 249 242 Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 250 243 #if H_3D_VSP 251 #if ETRIKHU_CLEANUP_H0083252 244 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount); 253 #else254 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount,255 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo);256 #endif257 245 #endif 258 246 #if H_3D_IV_MERGE 259 #if ETRIKHU_CLEANUP_H0083260 247 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ); 261 #else262 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv,263 Int* ivCandRefIdx, Int posIvDC, Int* vspFlag, Int &iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo );264 #endif265 #if ETRIKHU_CLEANUP_H0083266 248 Bool xGetPosFirstAvailDmvCand( Int iCount, Int& iFirDispCand ); 267 #else268 Bool xGetPosFirstAvailDmvCand( Int iCount, TComMvField* pcMvFieldNeighbours, Int* ivCandDir, Int posIvDC, Int* vspFlag, Int& iFirDispCand );269 #endif270 249 #endif 271 250 … … 507 486 508 487 #if H_3D 509 #if !ETRIKHU_CLEANUP_H0083510 Void rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV);511 #endif512 488 Bool getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 513 489 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); … … 532 508 #if H_3D_SPIVMP 533 509 , TComMvField* pcMFieldSP, UChar* puhInterDirSP 534 #endif 535 #if SEC_ADAPT_DISABLE_IVMP 510 #endif 536 511 , Bool bICFlag 537 #endif538 512 ); 539 513 #endif … … 583 557 Pel getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; } 584 558 Void setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; } 585 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108586 559 Void setDmmPredictor ( Pel pOffset, UInt uiSeg) { m_apDmmPredictor[uiSeg] = pOffset; } 587 560 Pel getDmmPredictor ( UInt uiSeg) { return m_apDmmPredictor[uiSeg]; } 588 #endif589 561 UInt getCtxSDCFlag ( UInt uiAbsPartIdx ); 590 UInt getCtxAngleFlag ( UInt uiAbsPartIdx );591 562 #endif 592 563 #endif … … 666 637 Bool getAvailableFlagA0() { return m_bAvailableFlagA0;} 667 638 Bool getAvailableFlagB2() { return m_bAvailableFlagB2;} 668 #if ETRIKHU_CLEANUP_H0083669 639 Void initAvailableFlags() { m_bAvailableFlagA1 = m_bAvailableFlagB1 = m_bAvailableFlagB0 = m_bAvailableFlagA0 = m_bAvailableFlagB2 = 0; } 670 640 Void buildMCL(TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours … … 677 647 , Int& numValidMergeCand 678 648 ); 679 #else680 Void initAvailableFlags() { m_bAvailableFlagA1 = m_bAvailableFlagB1 = m_bAvailableFlagB0 = m_bAvailableFlagA0 = m_bAvailableFlagB2 = 0; }681 #endif682 649 Void getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int& numValidMergeCand, Int mrgCandIdx = -1); 683 650 Void xGetInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours … … 686 653 #endif 687 654 #if H_3D_VSP 688 #if !ETRIKHU_CLEANUP_H0083689 , Int* vspFlag690 #endif691 655 , InheritedVSPDisInfo* inheritedVSPDisInfo 692 656 #endif 693 657 #if H_3D_SPIVMP 694 #if ETRIKHU_CLEANUP_H0083695 658 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 696 #else697 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP698 #endif699 659 #endif 700 660 , Int& numValidMergeCand, Int mrgCandIdx = -1 -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r950 r976 198 198 //! \} 199 199 200 #if ETRIKHU_CLEANUP_H0083200 #if H_3D_IV_MERGE 201 201 class TComMotionCand 202 202 { -
trunk/source/Lib/TLibCommon/TComPic.cpp
r964 r976 55 55 , m_bReconstructed (false) 56 56 , m_bNeededForOutput (false) 57 #if H_MV _HLS_7_VPS_P0300_2757 #if H_MV 58 58 , m_bPicOutputFlag (false) 59 59 #endif -
trunk/source/Lib/TLibCommon/TComPic.h
r964 r976 69 69 Bool m_bReconstructed; 70 70 Bool m_bNeededForOutput; 71 #if H_MV _HLS_7_VPS_P0300_2771 #if H_MV 72 72 Bool m_bPicOutputFlag; // Semantics variable 73 73 #endif … … 178 178 Void setOutputMark (Bool b) { m_bNeededForOutput = b; } 179 179 Bool getOutputMark () { return m_bNeededForOutput; } 180 #if H_MV _HLS_7_VPS_P0300_27180 #if H_MV 181 181 Void setPicOutputFlag(Bool b) { m_bPicOutputFlag = b; } 182 182 Bool getPicOutputFlag() { return m_bPicOutputFlag ; } -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r964 r976 500 500 Pel* pDst = piPred; 501 501 xAssignBiSegDCs( pDst, uiStride, biSegPattern, patternStride, segDC1, segDC2 ); 502 #if HS_DMM_SDC_PREDICTOR_UNIFY_H0108503 502 pcCU->setDmmPredictor(segDC1, 0); 504 503 pcCU->setDmmPredictor(segDC2, 1); 505 #endif506 504 507 505 #if H_3D_DIM_DMM … … 523 521 Int RefPOCL0 = pcCU->getSlice()->getRefPic(REF_PIC_LIST_0, pcCU->getCUMvField(REF_PIC_LIST_0)->getRefIdx(PartAddr))->getPOC(); 524 522 Int RefPOCL1 = pcCU->getSlice()->getRefPic(REF_PIC_LIST_1, pcCU->getCUMvField(REF_PIC_LIST_1)->getRefIdx(PartAddr))->getPOC(); 525 #if MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085523 #if H_3D_ARP 526 524 if(!pcCU->getARPW(PartAddr) && RefPOCL0 == RefPOCL1 && pcCU->getCUMvField(REF_PIC_LIST_0)->getMv(PartAddr) == pcCU->getCUMvField(REF_PIC_LIST_1)->getMv(PartAddr)) 527 525 #else … … 647 645 648 646 // start mapping process 649 #if !MTK_DBBP_AMP_REM_H0072650 Bool bAMPAvail = uiSize > 8;651 Int matchedPartSum[6][2] = {{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}}; // counter for each part size and boolean option652 PartSize virtualPartSizes[6] = { SIZE_Nx2N, SIZE_2NxN, SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N };653 #else654 647 Int matchedPartSum[2][2] = {{0,0},{0,0}}; // counter for each part size and boolean option 655 648 PartSize virtualPartSizes[2] = { SIZE_Nx2N, SIZE_2NxN}; 656 #endif657 649 658 650 UInt uiHalfSize = uiSize>>1; 659 #if !MTK_DBBP_AMP_REM_H0072660 UInt uiQuarterSize = uiSize>>2;661 #endif662 663 651 for (Int y=0; y<uiSize; y+=iSubSample) 664 652 { … … 691 679 matchedPartSum[1][1-ucSegment]++; 692 680 } 693 694 #if !MTK_DBBP_AMP_REM_H0072695 if( bAMPAvail )696 {697 // SIZE_2NxnU698 if(y<uiQuarterSize) // top (1/4)699 {700 matchedPartSum[2][ucSegment]++;701 }702 else // bottom (3/4)703 {704 matchedPartSum[2][1-ucSegment]++;705 }706 707 // SIZE_2NxnD708 if(y<(uiQuarterSize*3)) // top (3/4)709 {710 matchedPartSum[3][ucSegment]++;711 }712 else // bottom (1/4)713 {714 matchedPartSum[3][1-ucSegment]++;715 }716 717 // SIZE_nLx2N718 if(x<uiQuarterSize) // left (1/4)719 {720 matchedPartSum[4][ucSegment]++;721 }722 else // right (3/4)723 {724 matchedPartSum[4][1-ucSegment]++;725 }726 727 // SIZE_nRx2N728 if(x<(uiQuarterSize*3)) // left (3/4)729 {730 matchedPartSum[5][ucSegment]++;731 }732 else // right (1/4)733 {734 matchedPartSum[5][1-ucSegment]++;735 }736 }737 #endif738 681 } 739 682 … … 745 688 746 689 Int iMaxMatchSum = 0; 747 #if !MTK_DBBP_AMP_REM_H0072748 for(Int p=0; p<6; p++) // loop over partition749 #else750 690 for(Int p=0; p<2; p++) // loop over partition 751 #endif752 691 { 753 692 for( Int b=0; b<=1; b++ ) // loop over boolean options … … 859 798 860 799 UInt uiMaskStride= MAX_CU_SIZE; 861 #if SEC_DBBP_FILTERING_H0104862 800 Pel filSrc = 0; 863 801 Pel* tmpTar = 0; 864 802 tmpTar = (Pel *)xMalloc(Pel, uiWidth*uiHeight); 865 #endif866 803 867 804 // backup pointer … … 877 814 878 815 // filtering 879 #if SEC_DBBP_FILTERING_H0104880 816 tmpTar[y*uiWidth+x] = piSrc[ucSegment][x]; 881 #else882 Bool t = (y==0)?pMaskStart[(y+1)*uiMaskStride+x]:pMaskStart[(y-1)*uiMaskStride+x];883 Bool l = (x==0)?pMaskStart[y*uiMaskStride+x+1]:pMaskStart[y*uiMaskStride+x-1];884 Bool b = (y==uiHeight-1)?pMaskStart[(y-1)*uiMaskStride+x]:pMaskStart[(y+1)*uiMaskStride+x];885 Bool r = (x==uiWidth-1)?pMaskStart[y*uiMaskStride+x-1]:pMaskStart[y*uiMaskStride+x+1];886 887 Bool bBlend = !((t&&l&&b&&r) || (!t&&!l&&!b&&!r));888 piDst[x] = bBlend?((piSrc[0][x]+piSrc[1][x]+1)>>1):piSrc[ucSegment][x];889 #endif890 817 } 891 818 892 819 piSrc[0] += uiSrcStride; 893 820 piSrc[1] += uiSrcStride; 894 #if !SEC_DBBP_FILTERING_H0104895 piDst += uiDstStride;896 #endif897 821 pMask += uiMaskStride; 898 822 } 899 823 900 #if SEC_DBBP_FILTERING_H0104901 824 for (Int y=0; y<uiHeight; y++) 902 825 { … … 933 856 } 934 857 if ( tmpTar ) { xFree(tmpTar); tmpTar = NULL; } 935 #endif936 858 937 859 // now combine chroma … … 944 866 UInt uiWidthC = uiWidth >> 1; 945 867 UInt uiHeightC = uiHeight >> 1; 946 #if SEC_DBBP_FILTERING_H0104947 868 Pel filSrcU = 0, filSrcV = 0; 948 869 Pel* tmpTarU = 0, *tmpTarV = 0; 949 870 tmpTarU = (Pel *)xMalloc(Pel, uiWidthC*uiHeightC); 950 871 tmpTarV = (Pel *)xMalloc(Pel, uiWidthC*uiHeightC); 951 #endif952 872 pMask = pMaskStart; 953 873 … … 960 880 961 881 // filtering 962 #if SEC_DBBP_FILTERING_H0104963 882 tmpTarU[y*uiWidthC+x] = piSrcU[ucSegment][x]; 964 883 tmpTarV[y*uiWidthC+x] = piSrcV[ucSegment][x]; 965 #else966 Bool t = (y==0)?pMaskStart[(y+1)*2*uiMaskStride+x*2]:pMaskStart[(y-1)*2*uiMaskStride+x*2];967 Bool l = (x==0)?pMaskStart[y*2*uiMaskStride+(x+1)*2]:pMaskStart[y*2*uiMaskStride+(x-1)*2];968 Bool b = (y==uiHeightC-1)?pMaskStart[(y-1)*2*uiMaskStride+x*2]:pMaskStart[(y+1)*2*uiMaskStride+x*2];969 Bool r = (x==uiWidthC-1)?pMaskStart[y*2*uiMaskStride+(x-1)*2]:pMaskStart[y*2*uiMaskStride+(x+1)*2];970 971 Bool bBlend = !((t&&l&&b&&r) || (!t&&!l&&!b&&!r));972 973 piDstU[x] = bBlend?((piSrcU[0][x]+piSrcU[1][x]+1)>>1):piSrcU[ucSegment][x];974 piDstV[x] = bBlend?((piSrcV[0][x]+piSrcV[1][x]+1)>>1):piSrcV[ucSegment][x];975 #endif976 884 } 977 885 … … 980 888 piSrcV[0] += uiSrcStrideC; 981 889 piSrcV[1] += uiSrcStrideC; 982 #if !SEC_DBBP_FILTERING_H0104983 piDstU += uiDstStrideC;984 piDstV += uiDstStrideC;985 #endif986 890 pMask += 2*uiMaskStride; 987 891 } 988 892 989 #if SEC_DBBP_FILTERING_H0104990 893 for (Int y=0; y<uiHeightC; y++) 991 894 { … … 1035 938 if ( tmpTarU ) { xFree(tmpTarU); tmpTarU = NULL; } 1036 939 if ( tmpTarV ) { xFree(tmpTarV); tmpTarV = NULL; } 1037 #endif1038 940 } 1039 941 #endif … … 2328 2230 if (orgDC == false) 2329 2231 { 2330 #if !HS_DMM_SDC_PREDICTOR_UNIFY_H0108 2331 if ( getDimType(uiIntraMode) == DMM1_IDX ) 2332 { 2333 UChar ucSegmentLT = pMask[0]; 2334 UChar ucSegmentRT = pMask[uiSize-1]; 2335 UChar ucSegmentLB = pMask[uiMaskStride * (uiSize-1)]; 2336 UChar ucSegmentRB = pMask[uiMaskStride * (uiSize-1) + (uiSize-1)]; 2337 2338 rpSegMeans[ucSegmentLT] = pOrig[0]; 2339 rpSegMeans[ucSegmentRT] = pOrig[uiSize-1]; 2340 rpSegMeans[ucSegmentLB] = pOrig[uiStride * (uiSize-1) ]; 2341 rpSegMeans[ucSegmentRB] = pOrig[uiStride * (uiSize-1) + (uiSize-1) ]; 2342 } 2343 else if( getDimType( uiIntraMode ) == DMM4_IDX ) 2344 { 2345 Pel *ptmpOrig = pOrig; 2346 Bool *ptmpMask = pMask, bBreak = false; 2347 UChar ucSegment = ptmpMask? (UChar) ptmpMask[0] : 0; 2348 UChar bFirstSeg = ucSegment; 2349 2350 rpSegMeans[ucSegment] = ptmpOrig[0]; 2351 for ( Int y = 0; y < uiSize; y++ ) 2352 { 2353 for ( Int x = 0; x < uiSize; x++ ) 2354 { 2355 ucSegment = ptmpMask[x]; 2356 assert( ucSegment < uiNumSegments ); 2357 2358 if( bFirstSeg != ucSegment ) 2359 { 2360 rpSegMeans[ucSegment] = ptmpOrig[x]; 2361 bBreak = true; 2362 break; 2363 } 2364 } 2365 2366 if( bBreak ) 2367 { 2368 break; 2369 } 2370 2371 ptmpOrig += uiStride; 2372 ptmpMask += uiMaskStride; 2373 } 2374 } 2375 else 2376 #endif 2377 { 2378 Pel* pLeftTop = pOrig; 2379 Pel* pRightTop = pOrig + (uiSize-1); 2380 Pel* pLeftBottom = (pOrig+ (uiStride*(uiSize-1))); 2381 Pel* pRightBottom = (pOrig+ (uiStride*(uiSize-1)) + (uiSize-1)); 2382 2383 rpSegMeans[0] = (*pLeftTop + *pRightTop + *pLeftBottom + *pRightBottom + 2)>>2; 2384 } 2232 Pel* pLeftTop = pOrig; 2233 Pel* pRightTop = pOrig + (uiSize-1); 2234 Pel* pLeftBottom = (pOrig+ (uiStride*(uiSize-1))); 2235 Pel* pRightBottom = (pOrig+ (uiStride*(uiSize-1)) + (uiSize-1)); 2236 2237 rpSegMeans[0] = (*pLeftTop + *pRightTop + *pLeftBottom + *pRightBottom + 2)>>2; 2385 2238 return; 2386 2239 } -
trunk/source/Lib/TLibCommon/TComRom.cpp
r964 r976 360 360 Char g_aucConvertToBit [ MAX_CU_SIZE+1 ]; 361 361 362 #if MTK_LOW_LATENCY_IC_ENCODING_H0086362 #if H_3D_IC 363 363 UInt g_aICEnableCANDIDATE[10] = { 0, }; 364 364 UInt g_aICEnableNUM[ 10 ] = { 0, }; -
trunk/source/Lib/TLibCommon/TComRom.h
r964 r976 189 189 extern Char g_aucConvertToBit [ MAX_CU_SIZE+1 ]; // from width to log2(width)-2 190 190 191 #if MTK_LOW_LATENCY_IC_ENCODING_H0086191 #if H_3D_IC 192 192 extern UInt g_aICEnableCANDIDATE[10]; 193 193 extern UInt g_aICEnableNUM[ 10 ]; //10 layers 194 extern Int g_lastlayer;194 extern Int g_lastlayer; 195 195 #endif 196 196 -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r964 r976 48 48 TComSlice::TComSlice() 49 49 : m_iPPSId ( -1 ) 50 #if H_MV _HLS_8_POC_Q0142_3250 #if H_MV 51 51 , m_slicePicOrderCntLsb ( 0 ) 52 52 #endif … … 1863 1863 #endif 1864 1864 { 1865 #if H_MV _HLS_8_SYN_Q0041_031865 #if H_MV 1866 1866 m_vpsBaseLayerInternalFlag = true; 1867 1867 #endif … … 1883 1883 m_vpsNumProfileTierLevelMinus1 = -1; 1884 1884 1885 #if H_MV_HLS_8_SYN_39_191886 1885 m_numAddLayerSets = 0; 1887 1886 m_numAddOlss = 0; 1888 #else1889 m_numAddLayerSets = -1;1890 #endif1891 1887 m_defaultOutputLayerIdc = 0; 1892 1888 … … 1902 1898 } 1903 1899 1904 #if H_MV_HLS_8_PMS_Q0195_201905 1900 m_repFormatIdxPresentFlag = false; 1906 #endif1907 1901 m_maxOneActiveRefLayerFlag = false; 1908 1902 m_directDepTypeLenMinus2 = 0; 1909 1903 1910 1904 1911 #if H_MV_HLS_8_RPS_Q0100_361912 1905 m_vpsExtensionFlag = true; 1913 #endif1914 m_avcBaseLayerFlag = false;1915 1906 m_vpsNonVuiExtensionLength = 0; 1916 1907 m_splittingFlag = false; … … 2032 2023 } 2033 2024 2034 2035 #if H_MV_HLS_8_PMS_Q0195_202036 2025 //The value of vps_num_rep_formats_minus1 shall be in the range of 0 to 255, inclusive. 2037 2026 assert( getVpsNumRepFormatsMinus1() >= 0 ); 2038 2027 assert( getVpsNumRepFormatsMinus1() <= 255 ); 2039 #endif2040 2028 2041 2029 return true; … … 2083 2071 } 2084 2072 2085 #if H_MV_HLS_82086 2073 for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ ) 2087 2074 { … … 2096 2083 } 2097 2084 } 2098 2099 2085 2100 2086 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) … … 2107 2093 } 2108 2094 } 2109 2110 2095 2111 2096 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) // Bug in spec "<" instead of "<=" … … 2149 2134 m_numIndependentLayers = k; 2150 2135 } 2151 #endif2152 2136 } 2153 2137 … … 2314 2298 Int TComVPS::getNumOutputLayerSets() 2315 2299 { 2316 #if H_MV_HLS_8_SYN_39_192317 2300 return getNumAddOlss() + getNumLayerSets(); 2318 #else2319 return getNumAddLayerSets() + getVpsNumLayerSetsMinus1() + 1;2320 #endif2321 2301 } 2322 2302 … … 2384 2364 } 2385 2365 } 2386 #if H_MV_HLS_8_PMS_Q0165_182387 2366 assert( getNumOutputLayersInOutputLayerSet( i ) > 0 ); 2388 #endif2389 2367 } 2390 2368 … … 2420 2398 { 2421 2399 Int maxSLMinus1 = 0; 2422 #if H_MV_HLS_8_MIS_Q0102_302423 2400 for( Int k = 0; k < getNumLayersInIdList( i ); k++ ) 2424 2401 { 2425 2402 Int lId = m_layerSetLayerIdList[i][k]; 2426 #else2427 Int optLsIdx = olsIdxToLsIdx( i );2428 2429 for( Int k = 0; k < getNumLayersInIdList( optLsIdx ); k++ )2430 {2431 Int lId = m_layerSetLayerIdList[optLsIdx][k];2432 #endif2433 2403 maxSLMinus1 = std::max( maxSLMinus1, getSubLayersVpsMaxMinus1( getLayerIdInVps( lId ) )); 2434 2404 } 2435 2405 return maxSLMinus1; 2436 2406 } 2437 #if H_MV_HLS_8_RPS_Q0100_36 2407 2438 2408 Void TComVPS::inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder ) 2439 2409 { … … 2458 2428 } 2459 2429 } 2460 #endif 2430 2431 Bool TComVPS::getAltOutputLayerFlagVar( Int i ) 2432 { 2433 // Semantics variable not syntax element ! 2434 2435 Bool altOptLayerFlag = false; 2436 if ( i > 0 && getNumOutputLayersInOutputLayerSet( i ) == 1 && 2437 getNumDirectRefLayers( getOlsHighestOutputLayerId( i ) ) > 0 ) 2438 { 2439 altOptLayerFlag = getAltOutputLayerFlag( i ); 2440 } 2441 return altOptLayerFlag; 2442 } 2443 2444 Int TComVPS::getMaxNumPics( Int layerId ) 2445 { 2446 Int maxNumPics = MAX_INT; 2447 for( Int olsIdx = 0; olsIdx < getNumOutputLayerSets(); olsIdx++) 2448 { 2449 Int lsIdx = olsIdxToLsIdx( olsIdx ); 2450 for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ ) 2451 { 2452 if( getLayerSetLayerIdList(lsIdx, j ) == layerId ) 2453 { 2454 Int maxSL = getMaxSubLayersInLayerSetMinus1( lsIdx ); 2455 maxNumPics = std::min( maxNumPics, getDpbSize()->getMaxVpsDecPicBufferingMinus1( olsIdx , j, maxSL ) ); 2456 } 2457 } 2458 } 2459 assert( maxNumPics != MAX_INT ); 2460 return maxNumPics; 2461 } 2462 2463 Void TComVPS::xSetRefLayerFlags( Int currLayerId ) 2464 { 2465 for( Int j = 0; j < getNumDirectRefLayers( currLayerId ); j++ ) 2466 { 2467 Int refLayerId = m_refLayerId[ currLayerId ][ j ]; 2468 m_recursiveRefLayerFlag[ currLayerId ][ refLayerId ] = 1; 2469 for( Int k = 0; k < MAX_NUM_LAYER_IDS; k++ ) 2470 { 2471 m_recursiveRefLayerFlag[ currLayerId ][ k ] = m_recursiveRefLayerFlag[ currLayerId ][ k ] || m_recursiveRefLayerFlag[ refLayerId ][ k ]; 2472 } 2473 } 2474 } 2475 2461 2476 #endif // H_MV 2462 2477 … … 2530 2545 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 2531 2546 #if H_MV 2532 #if !H_MV_HLS_8_SPS_NODOC_482533 m_spsExtensionPresentFlag = false;2534 for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ )2535 {2536 m_spsExtensionTypeFlag[ i ] = false;2537 }2538 #else2539 2547 m_spsRangeExtensionsFlag = false; 2540 2548 m_spsMultilayerExtensionFlag = false; … … 2544 2552 #else 2545 2553 m_spsExtension6bits = 0; 2546 #endif2547 2554 #endif 2548 2555 … … 2726 2733 2727 2734 #if H_MV 2728 #if H_MV_HLS_8_SPS_NODOC_482729 2735 m_ppsRangeExtensionsFlag = false; 2730 2736 m_ppsMultilayerExtensionFlag = false; … … 2734 2740 m_pps3dExtensionFlag = false; 2735 2741 m_ppsExtension5bits = 0; 2736 #endif2737 #else2738 for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ )2739 {2740 m_ppsExtensionTypeFlag[ i ] = false;2741 }2742 2742 #endif 2743 2743 #endif … … 2984 2984 } 2985 2985 } 2986 2987 Void TComSPS::inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder ) 2988 { 2989 const std::vector<Int>& targetDecLayerIdList = vps->getTargetDecLayerIdList( vps->olsIdxToLsIdx( targetOptLayerSetIdx )); 2990 2991 if (getLayerId() > 0 ) 2992 { 2993 Int layerIdx = 0; 2994 while (layerIdx < (Int) targetDecLayerIdList.size() ) 2995 { 2996 if ( targetDecLayerIdList[layerIdx] == currLayerId ) 2997 { 2998 break; 2999 } 3000 layerIdx++; 3001 } 3002 3003 assert( layerIdx < (Int) targetDecLayerIdList.size() ); 3004 3005 for (Int i = 0; i <= getSpsMaxSubLayersMinus1(); i++ ) 3006 { 3007 Int maxDecPicBufferingMinus1 = vps->getDpbSize()->getMaxVpsDecPicBufferingMinus1( targetOptLayerSetIdx, layerIdx, i ) ; 3008 3009 if ( encoder ) 3010 { 3011 assert( getMaxDecPicBuffering( i ) - 1 == maxDecPicBufferingMinus1 ); 3012 } 3013 else 3014 { 3015 setMaxDecPicBuffering(i, maxDecPicBufferingMinus1 + 1 ); 3016 } 3017 } 3018 } 3019 } 3020 3021 Void TComSPS::checkRpsMaxNumPics( TComVPS* vps, Int currLayerId ) 3022 { 3023 // In spec, when rps is in SPS, nuh_layer_id of SPS is used instead 3024 // of nuh_layer_id of slice (currLayerId), this seems to be a bug. 3025 3026 for (Int i = 0; i < getRPSList()->getNumberOfReferencePictureSets(); i++ ) 3027 { 3028 TComReferencePictureSet* rps = getRPSList()->getReferencePictureSet( i ); 3029 if ( !rps->getInterRPSPrediction() ) 3030 { 3031 rps->checkMaxNumPics( vps->getVpsExtensionFlag(), vps->getMaxNumPics( currLayerId ), 3032 getLayerId(), getMaxDecPicBuffering( getSpsMaxSubLayersMinus1() ) - 1 ); 3033 } 3034 } 3035 } 3036 2986 3037 #endif 2987 3038 … … 3133 3184 printf("}\n"); 3134 3185 } 3186 #if H_MV 3187 Void TComReferencePictureSet::checkMaxNumPics( Bool vpsExtensionFlag, Int maxNumPics, Int nuhLayerId, Int spsMaxDecPicBufferingMinus1 ) 3188 { 3189 assert( getNumberOfPictures() >= 0 ); 3190 if ( nuhLayerId == 0 ) 3191 { 3192 assert( getNumberOfPictures() <= spsMaxDecPicBufferingMinus1 ); 3193 } 3194 3195 if ( vpsExtensionFlag ) 3196 { 3197 assert( getNumberOfPictures() <= maxNumPics ); 3198 } 3199 } 3200 #endif 3135 3201 3136 3202 TComRPSList::TComRPSList() … … 3279 3345 } 3280 3346 3281 #if !H_MV_HLS_8_DBP_NODOC_423282 Void TComSlice::markIvRefPicsAsUnused( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc )3283 {3284 // Fill targetDecLayerIdSet with all layers if empty (at encoder side)3285 if (targetDecLayerIdSet.size() == 0 )3286 {3287 for ( Int layerIdInVps = 0; layerIdInVps <= vps->getMaxLayersMinus1(); layerIdInVps++ )3288 {3289 targetDecLayerIdSet.push_back( vps->getLayerIdInNuh( layerIdInVps ) );3290 }3291 }3292 3293 Int numTargetDecLayers = (Int) targetDecLayerIdSet.size();3294 Int latestDecIdx;3295 for ( latestDecIdx = 0; latestDecIdx < numTargetDecLayers; latestDecIdx++)3296 {3297 if ( targetDecLayerIdSet[ latestDecIdx ] == curLayerId )3298 {3299 break;3300 }3301 }3302 3303 for( Int i = 0; i <= latestDecIdx; i++ )3304 {3305 if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ i ] ) )3306 {3307 TComPic* pcPic = ivPicLists->getPic( targetDecLayerIdSet[ i ], curPoc );3308 if ( pcPic )3309 {3310 if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() )3311 {3312 Bool remainingInterLayerReferencesFlag = false;3313 for( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ )3314 {3315 TComVPS* vpsSlice = pcPic->getSlice(0)->getVPS();3316 if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ j ] ) )3317 {3318 for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdSet[ j ] ); k++ )3319 {3320 if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdSet[ j ], k ) )3321 {3322 remainingInterLayerReferencesFlag = true;3323 }3324 }3325 }3326 }3327 if( !remainingInterLayerReferencesFlag )3328 {3329 pcPic->getSlice(0)->setReferenced( false );3330 }3331 }3332 }3333 }3334 }3335 }3336 #endif3337 3347 Void TComSlice::printRefPicList() 3338 3348 { … … 3351 3361 Void TComSlice::markCurrPic( TComPic* currPic ) 3352 3362 { 3353 3354 #if !H_MV_HLS_8_DBP_NODOC_42 3355 if ( !currPic->getSlice(0)->getDiscardableFlag() ) 3356 { 3357 #endif 3358 currPic->getSlice(0)->setReferenced( true ) ; 3359 currPic->setIsLongTerm( false ); 3360 #if !H_MV_HLS_8_DBP_NODOC_42 3361 } 3362 else 3363 { 3364 currPic->getSlice(0)->setReferenced( false ) ; 3365 } 3366 #endif 3367 3368 #if H_MV_HLS_7_VPS_P0300_27 3363 currPic->getSlice(0)->setReferenced( true ) ; 3364 currPic->setIsLongTerm( false ); 3365 3369 3366 currPic->setReconMark( true ); 3370 3367 currPic->setPicOutputFlag( currPic->getSlice(0)->getPicOutputFlag() ); 3371 #endif3372 3368 } 3373 3369 … … 3403 3399 Int refLayerIdx = vps->getLayerIdInVps( vps->getRefLayerId( getLayerId(), i ) ); 3404 3400 3405 #if H_MV_HLS_8_RPS_Q0060_173406 3401 Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >= getTLayer() ) && ( getTLayer() == 0 ) && 3407 3402 ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() ); 3408 #else3409 Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >= getTLayer() ) &&3410 ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() );3411 #endif3412 3403 3413 3404 return refLayerPicFlag; … … 3541 3532 #endif 3542 3533 #if H_3D_IC 3543 #if MTK_LOW_LATENCY_IC_ENCODING_H00863544 3534 Void TComSlice::xSetApplyIC(Bool bUseLowLatencyICEnc) 3545 #else 3546 Void TComSlice::xSetApplyIC() 3547 #endif 3548 { 3549 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 3535 { 3550 3536 if(bUseLowLatencyICEnc) 3551 3537 { … … 3592 3578 Double ratio=Double(g_aICEnableNUM[refLayer])/Double(g_aICEnableCANDIDATE[refLayer]); 3593 3579 3594 if( ratio > MTK_LOW_LATENCY_IC_ENCODING_THRESHOLD_H0086)3580 if( ratio > IC_LOW_LATENCY_ENCODING_THRESHOLD) 3595 3581 { 3596 3582 m_bApplyIC=true; … … 3608 3594 else 3609 3595 { 3610 #endif3611 3596 Int iMaxPelValue = ( 1 << g_bitDepthY ); 3612 3597 Int *aiRefOrgHist; … … 3682 3667 aiCurrHist = NULL; 3683 3668 aiRefOrgHist = NULL; 3684 #if MTK_LOW_LATENCY_IC_ENCODING_H00863685 3669 }//if(bUseLowLatencyICEnc) 3686 #endif3687 3670 } 3688 3671 #endif … … 3774 3757 3775 3758 #if H_3D_DDD 3776 InitializeDDDPara( vps->getCamParPrecision(), codScale[ i ], codOffset[ i ], i );3759 initializeDDDPara( vps->getCamParPrecision(), codScale[ i ], codOffset[ i ], i ); 3777 3760 #endif 3778 3761 } … … 3782 3765 3783 3766 #if H_3D_DDD 3784 Void TComSlice:: InitializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx )3767 Void TComSlice::initializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ) 3785 3768 { 3786 3769 UInt uiViewId = getViewIndex(); … … 3839 3822 3840 3823 return; 3824 } 3825 3826 3827 #endif 3828 3829 #if H_MV 3830 Void TComSlice::checkCrossLayerBlaFlag() 3831 { 3832 // cross_layer_bla_flag shall be equal to 0 for pictures with nal_unit_type not equal to IDR_W_RADL or IDR_N_LP or with nuh_layer_id not equal to 0. 3833 if ( getLayerId() != 0 || getNalUnitType() != NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ) 3834 { 3835 assert( m_crossLayerBlaFlag == 0 ); 3836 } 3837 } 3838 3839 Bool TComSlice::inferPocMsbValPresentFlag() 3840 { 3841 Bool pocMsbValPresentFlag; 3842 if( getSliceSegmentHeaderExtensionLength() == 0 ) 3843 { 3844 pocMsbValPresentFlag = false; 3845 } 3846 else if ( getPocMsbValRequiredFlag() ) 3847 { 3848 pocMsbValPresentFlag = true; 3849 } 3850 else 3851 { 3852 pocMsbValPresentFlag = false; 3853 } 3854 3855 return pocMsbValPresentFlag; 3856 } 3857 3858 3859 #endif 3860 3861 #if H_3D_DBBP 3862 Int TComSlice::getDepthFromDV( Int iDV, Int iBaseViewIdx ) 3863 { 3864 return ClipY(( iDV * m_aiDDDInvScale[ iBaseViewIdx ] + m_aiDDDInvOffset[ iBaseViewIdx ] ) >> m_aiDDDShift[ iBaseViewIdx ]); 3841 3865 } 3842 3866 #endif … … 4331 4355 } 4332 4356 4357 Void TComVpsVuiBspHrdParameters::checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j ) 4358 { 4359 // bsp_comb_hrd_idx 4360 assert( getBspCombSchedIdx(h, i, j ) >= 0 ); 4361 assert( getBspCombSchedIdx(h, i, j ) <= getVpsNumBspHrdParametersMinus1() ); 4362 4363 // bsp_comb_sched_idx 4364 assert( getBspCombSchedIdx(h, i, j ) >= 0 ); 4365 4366 //* This check needs to activated, when HighestTid is available here 4367 // assert( getBspCombSchedIdx(h, i, j ) <= vps->getHrdParameters( getBspCombHrdIdx( h, i, j ) )->getCpbCntMinus1( highestTid ) ); 4368 } 4369 4333 4370 Void TComVUI::inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr ) 4334 4371 { … … 4370 4407 } 4371 4408 } 4372 #endif 4409 4410 Void Window::scaleOffsets( Int scal ) 4411 { 4412 if (! m_scaledFlag ) 4413 { 4414 m_scaledFlag = true; 4415 m_winLeftOffset *= scal; 4416 m_winRightOffset *= scal; 4417 m_winTopOffset *= scal; 4418 m_winBottomOffset *= scal; 4419 } 4420 } 4421 #endif 4422 -
trunk/source/Lib/TLibCommon/TComSlice.h
r964 r976 54 54 class TComPicLists; 55 55 class TComVPS; 56 #if H_MV_HLS_8_RPS_Q0100_3657 56 class TComSPS; 58 #endif59 57 #endif 60 58 // ==================================================================================================================== … … 130 128 Void printDeltaPOC(); 131 129 132 #if H_MV_HLS_8_RPS_Q0100_36 133 Void checkMaxNumPics( Bool vpsExtensionFlag, Int maxNumPics, Int nuhLayerId, Int spsMaxDecPicBufferingMinus1 ) 134 { 135 assert( getNumberOfPictures() >= 0 ); 136 if ( nuhLayerId == 0 ) 137 { 138 assert( getNumberOfPictures() <= spsMaxDecPicBufferingMinus1 ); 139 } 140 141 if ( vpsExtensionFlag ) 142 { 143 assert( getNumberOfPictures() <= maxNumPics ); 144 } 145 } 130 #if H_MV 131 Void checkMaxNumPics( Bool vpsExtensionFlag, Int maxNumPics, Int nuhLayerId, Int spsMaxDecPicBufferingMinus1 ); 146 132 #endif 147 133 }; … … 479 465 Void setBspCombHrdIdx( Int h, Int i, Int j, Int val ) { m_bspCombHrdIdx[h][i][j] = val; } 480 466 Int getBspCombHrdIdx( Int h, Int i, Int j ) { return m_bspCombHrdIdx[h][i][j]; } 481 #if H_MV_HLS_8_HRD_Q0101_04482 467 Int getBspCombHrdIdxLen() { return gCeilLog2( getVpsNumBspHrdParametersMinus1() + 1); }; 483 Void checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j ) 484 { 485 // bsp_comb_hrd_idx 486 assert( getBspCombSchedIdx(h, i, j ) >= 0 ); 487 assert( getBspCombSchedIdx(h, i, j ) <= getVpsNumBspHrdParametersMinus1() ); 488 489 // bsp_comb_sched_idx 490 assert( getBspCombSchedIdx(h, i, j ) >= 0 ); 491 492 //* This check needs to activated, when HighestTid is available here 493 // assert( getBspCombSchedIdx(h, i, j ) <= vps->getHrdParameters( getBspCombHrdIdx( h, i, j ) )->getCpbCntMinus1( highestTid ) ); 494 } 495 #endif 468 496 469 497 470 Void setBspCombSchedIdx( Int h, Int i, Int j, Int val ) { m_bspCombSchedIdx[h][i][j] = val; } 498 471 Int getBspCombSchedIdx( Int h, Int i, Int j ) { return m_bspCombSchedIdx[h][i][j]; } 472 473 Void checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j ); 499 474 500 475 Void setHrdParametermeters( Int k, TComHRD* val ) { m_hrdParameters[k] = val; }; … … 695 670 private: 696 671 Int m_VPSId; 697 #if H_MV _HLS_8_SYN_Q0041_03672 #if H_MV 698 673 Bool m_vpsBaseLayerInternalFlag; 699 674 #endif … … 736 711 TimingInfo m_timingInfo; 737 712 #if H_MV 738 #if H_MV_HLS_8_RPS_Q0100_36739 713 Bool m_vpsExtensionFlag; 740 #endif 714 741 715 /// VPS EXTENSION SYNTAX ELEMENTS 742 Bool m_avcBaseLayerFlag;743 716 Int m_vpsNonVuiExtensionLength; 744 717 Bool m_splittingFlag; … … 761 734 762 735 Int m_numAddLayerSets; 763 #if H_MV_HLS_8_SYN_39_19764 736 Int m_highestLayerIdxPlus1 [MAX_VPS_ADD_OUTPUT_LAYER_SETS][MAX_NUM_LAYERS]; 765 737 Int m_numAddOlss; 766 #endif 738 767 739 Int m_defaultOutputLayerIdc; 768 740 … … 802 774 Int m_refLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 803 775 804 #if H_MV_HLS_8805 776 Int m_numRefLayers [MAX_NUM_LAYER_IDS]; 806 777 Int m_numPredictedLayers [MAX_NUM_LAYERS]; … … 810 781 Int m_treePartitionLayerIdList [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; 811 782 Bool m_recursiveRefLayerFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 812 #else 813 814 Int m_numSamplePredRefLayers [MAX_NUM_LAYERS]; 815 Bool m_samplePredEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 816 Int m_samplePredRefLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 817 818 Int m_numMotionPredRefLayers [MAX_NUM_LAYERS]; 819 Bool m_motionPredEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 820 Int m_motionPredRefLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 821 #endif 783 822 784 Int m_viewIndex [MAX_NUM_LAYERS ]; 823 785 … … 828 790 829 791 Int xGetDimBitOffset( Int j ); 830 831 #if H_MV_HLS_8 832 Void xSetRefLayerFlags( Int currLayerId ) 833 { 834 for( Int j = 0; j < getNumDirectRefLayers( currLayerId ); j++ ) 835 { 836 Int refLayerId = m_refLayerId[ currLayerId ][ j ]; 837 m_recursiveRefLayerFlag[ currLayerId ][ refLayerId ] = 1; 838 for( Int k = 0; k < MAX_NUM_LAYER_IDS; k++ ) 839 { 840 m_recursiveRefLayerFlag[ currLayerId ][ k ] = m_recursiveRefLayerFlag[ currLayerId ][ k ] || m_recursiveRefLayerFlag[ refLayerId ][ k ]; 841 } 842 } 843 } 844 #endif 792 Void xSetRefLayerFlags( Int currLayerId ); 845 793 // VPS EXTENSION 2 SYNTAX ELEMENTS 846 794 #if H_3D_ARP … … 902 850 Void setVPSId (Int i) { m_VPSId = i; } 903 851 904 #if H_MV _HLS_8_SYN_Q0041_03852 #if H_MV 905 853 Void setVpsBaseLayerInternalFlag( Bool flag ) { m_vpsBaseLayerInternalFlag = flag; } 906 854 Bool getVpsBaseLayerInternalFlag( ) { return m_vpsBaseLayerInternalFlag; } … … 957 905 TimingInfo* getTimingInfo() { return &m_timingInfo; } 958 906 #if H_MV 959 960 #if H_MV_HLS_8_RPS_Q0100_36961 907 Void setVpsExtensionFlag( Bool flag ) { m_vpsExtensionFlag = flag; } 962 908 Bool getVpsExtensionFlag( ) { return m_vpsExtensionFlag; } 963 #endif 964 #if !H_MV_HLS_8_SYN_Q0041_03 965 Void setAvcBaseLayerFlag( Bool val ) { m_avcBaseLayerFlag = val; } 966 Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } 967 #endif 909 968 910 Void setVpsNonVuiExtensionLength( Int val ) { m_vpsNonVuiExtensionLength = val; } 969 911 Int getVpsNonVuiExtensionLength( ) { return m_vpsNonVuiExtensionLength; } … … 1026 968 Int getNumAddLayerSets( ) { return m_numAddLayerSets; } 1027 969 1028 #if H_MV_HLS_8_SYN_39_191029 970 Void setHighestLayerIdxPlus1( Int i, Int j, Int val ) { m_highestLayerIdxPlus1[i][j] = val; } 1030 971 Int getHighestLayerIdxPlus1( Int i, Int j ) { return m_highestLayerIdxPlus1[i][j]; } … … 1032 973 Void setNumAddOlss( Int val ) { m_numAddOlss = val; } 1033 974 Int getNumAddOlss( ) { return m_numAddOlss; } 1034 #endif1035 975 1036 976 Void setDefaultOutputLayerIdc( Int val ) { m_defaultOutputLayerIdc = val; } … … 1060 1000 Int getVpsRepFormatIdx( Int i ) { return m_vpsRepFormatIdx[i]; } 1061 1001 1062 #if H_MV_HLS_8_PMS_Q0195_201063 1002 Int inferVpsRepFormatIdx( Int i ) { return std::min( i, getVpsNumRepFormatsMinus1() ); } 1064 #endif1065 1003 1066 1004 Void setRepFormat( Int i, TComRepFormat* val ) { m_repFormat[i] = val; } … … 1077 1015 Void setDpbSize( TComDpbSize* val ) { assert( m_dpbSize != 0 ); m_dpbSize = val; } 1078 1016 TComDpbSize* getDpbSize( ) { return m_dpbSize;} 1079 #if H_MV_HLS_8_RPS_Q0100_36 1017 1080 1018 Void inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder ); 1081 #endif 1082 1083 1019 1084 1020 Void setPocLsbNotPresentFlag( Int i, Bool flag ) { m_pocLsbNotPresentFlag[i] = flag; } 1085 1021 Bool getPocLsbNotPresentFlag( Int i ) { return m_pocLsbNotPresentFlag[i]; } … … 1116 1052 Int getRefLayerId ( Int layerIdInNuh, Int idx );; 1117 1053 1118 #if H_MV_HLS_81119 1054 Int getNumRefLayers ( Int i ) { return m_numRefLayers[i]; } 1120 1055 Int getNumPredictedLayers ( Int i ) { return m_numPredictedLayers[i]; } … … 1124 1059 Int getTreePartitionLayerIdList( Int i, Int j ) { return m_treePartitionLayerIdList[i][j]; } 1125 1060 Bool getRecursiveRefLayerFlag ( Int i, Int j ) { return m_recursiveRefLayerFlag[i][j]; } 1126 1127 #endif1128 1129 #if H_MV_HLS_8_SYN_39_191130 1061 Int getNumLayerSets( ) { return getVpsNumLayerSetsMinus1() + 1 + getNumAddLayerSets(); }; 1131 #endif 1062 1132 1063 Bool checkVPSExtensionSyntax(); 1133 1064 Int scalTypeToScalIdx ( ScalabilityType scalType ); … … 1137 1068 1138 1069 Int getNumLayersInIdList ( Int lsIdx ); 1139 #if H_MV_HLS_8_RPS_Q0100_361140 1070 Int getLayerSetLayerIdList(Int lsIdx, Int j ) { return m_layerSetLayerIdList[ lsIdx ][ j ]; }; 1141 #endif1142 1071 1143 1072 Int getNumOutputLayerSets() ; 1144 #if !H_MV_HLS_8_DBP_NODOC_42 1145 Int getNumSubDpbs( Int i ) { return getNumLayersInIdList( i ); }; 1146 #endif 1073 1147 1074 Bool isOutputLayer( Int outLayerSetIdx, Int layerIdInNuh ); 1148 1075 Void deriveLayerSetLayerIdList(); … … 1160 1087 1161 1088 Int getMaxSubLayersInLayerSetMinus1( Int i ); 1162 1163 #if H_MV_HLS_8_SYN_39_191164 1089 Int getHighestLayerIdxPlus1Len( Int j ) { return gCeilLog2( getNumLayersInTreePartition( j ) + 1 ); }; 1165 #endif 1166 1167 1168 #if H_MV_HLS_7_VPS_P0300_27 1169 Bool getAltOutputLayerFlagVar( Int i ) 1170 { // Semantics variable not syntax element ! 1171 1172 Bool altOptLayerFlag = false; 1173 if ( i > 0 && getNumOutputLayersInOutputLayerSet( i ) == 1 && 1174 getNumDirectRefLayers( getOlsHighestOutputLayerId( i ) ) > 0 ) 1175 { 1176 altOptLayerFlag = getAltOutputLayerFlag( i ); 1177 } 1178 return altOptLayerFlag; 1179 }; 1180 #endif 1090 1091 Bool getAltOutputLayerFlagVar( Int i );; 1181 1092 1182 1093 // inference … … 1186 1097 // helpers 1187 1098 Bool getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth = 0 ); 1188 #if H_MV_HLS_8_RPS_Q0100_36 1189 Int getMaxNumPics( Int layerId ) 1190 { 1191 Int maxNumPics = MAX_INT; 1192 for( Int olsIdx = 0; olsIdx < getNumOutputLayerSets(); olsIdx++) 1193 { 1194 Int lsIdx = olsIdxToLsIdx( olsIdx ); 1195 for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ ) 1196 { 1197 if( getLayerSetLayerIdList(lsIdx, j ) == layerId ) 1198 { 1199 Int maxSL = getMaxSubLayersInLayerSetMinus1( lsIdx ); 1200 maxNumPics = std::min( maxNumPics, getDpbSize()->getMaxVpsDecPicBufferingMinus1( olsIdx , j, maxSL ) ); 1201 } 1202 } 1203 } 1204 assert( maxNumPics != MAX_INT ); 1205 return maxNumPics; 1206 } 1207 #endif 1099 Int getMaxNumPics( Int layerId ); 1208 1100 1209 1101 /// VPS EXTENSION 2 SYNTAX ELEMENTS … … 1356 1248 Void setScaledFlag(Bool flag) { m_scaledFlag = flag; } 1357 1249 Bool getScaledFlag() const { return m_scaledFlag; } 1358 Void scaleOffsets( Int scal ) 1359 { 1360 if (! m_scaledFlag ) 1361 { 1362 m_scaledFlag = true; 1363 m_winLeftOffset *= scal; 1364 m_winRightOffset *= scal; 1365 m_winTopOffset *= scal; 1366 m_winBottomOffset *= scal; 1367 } 1368 } 1250 Void scaleOffsets( Int scal ); 1369 1251 #endif 1370 1252 Void setWindow(Int offsetLeft, Int offsetLRight, Int offsetLTop, Int offsetLBottom) … … 1630 1512 // SPS 1631 1513 Bool m_spsExtensionPresentFlag; 1632 #if H_MV_HLS_8_SPS_NODOC_48 1514 1633 1515 Bool m_spsRangeExtensionsFlag; 1634 1516 Bool m_spsMultilayerExtensionFlag; … … 1639 1521 Int m_spsExtension6bits; 1640 1522 #endif 1641 #else 1642 Bool m_spsExtensionTypeFlag [PS_EX_T_MAX_NUM]; 1643 #endif 1523 1644 1524 Bool m_spsInferScalingListFlag; 1645 1525 Int m_spsScalingListRefLayerId; … … 1755 1635 UInt getMaxTLayers() { return m_uiMaxTLayers; } 1756 1636 Void setMaxTLayers( UInt uiMaxTLayers ) { assert( uiMaxTLayers <= MAX_TLAYER ); m_uiMaxTLayers = uiMaxTLayers; } 1757 #if H_MV _HLS_81637 #if H_MV 1758 1638 UInt getSpsMaxSubLayersMinus1() { return ( m_uiMaxTLayers - 1); } 1759 1639 #endif … … 1789 1669 TComPTL* getPTL() { return &m_pcPTL; } 1790 1670 #if H_MV 1791 1792 #if H_MV_HLS_8_HRD_Q0102_08 1793 Void inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder ) 1794 { 1795 const std::vector<Int>& targetDecLayerIdList = vps->getTargetDecLayerIdList( vps->olsIdxToLsIdx( targetOptLayerSetIdx )); 1796 1797 if (getLayerId() > 0 ) 1798 { 1799 Int layerIdx = 0; 1800 while (layerIdx < (Int) targetDecLayerIdList.size() ) 1801 { 1802 if ( targetDecLayerIdList[layerIdx] == currLayerId ) 1803 { 1804 break; 1805 } 1806 layerIdx++; 1807 } 1808 1809 assert( layerIdx < (Int) targetDecLayerIdList.size() ); 1810 1811 for (Int i = 0; i <= getSpsMaxSubLayersMinus1(); i++ ) 1812 { 1813 Int maxDecPicBufferingMinus1 = vps->getDpbSize()->getMaxVpsDecPicBufferingMinus1( targetOptLayerSetIdx, layerIdx, i ) ; 1814 1815 if ( encoder ) 1816 { 1817 assert( getMaxDecPicBuffering( i ) - 1 == maxDecPicBufferingMinus1 ); 1818 } 1819 else 1820 { 1821 setMaxDecPicBuffering(i, maxDecPicBufferingMinus1 + 1 ); 1822 } 1823 } 1824 } 1825 } 1826 #endif 1671 Void inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder ); 1827 1672 1828 1673 Void setSpsExtensionPresentFlag( Bool flag ) { m_spsExtensionPresentFlag = flag; } 1829 1674 Bool getSpsExtensionPresentFlag( ) { return m_spsExtensionPresentFlag; } 1830 1675 1831 #if H_MV_HLS_8_SPS_NODOC_481832 1676 Void setSpsRangeExtensionsFlag( Bool flag ) { m_spsRangeExtensionsFlag = flag; } 1833 1677 Bool getSpsRangeExtensionsFlag( ) { return m_spsRangeExtensionsFlag; } … … 1844 1688 Void setSpsExtension6bits( Int val ) { m_spsExtension6bits = val; } 1845 1689 Int getSpsExtension6bits( ) { return m_spsExtension6bits; } 1846 #endif1847 #else1848 Void setSpsExtensionTypeFlag( Int i, Bool flag ) { m_spsExtensionTypeFlag[i] = flag; }1849 Bool getSpsExtensionTypeFlag( Int i ) { return m_spsExtensionTypeFlag[i]; }1850 1690 #endif 1851 1691 … … 1886 1726 // Inference 1887 1727 Void inferRepFormat( TComVPS* vps, Int layerIdCurr ); 1888 1889 1728 Void inferScalingList( TComSPS* spsSrc ); 1890 1729 1891 #if H_MV_HLS_8_RPS_Q0100_361892 1730 // others 1893 Void checkRpsMaxNumPics( TComVPS* vps, Int currLayerId ) 1894 { 1895 // In spec, when rps is in SPS, nuh_layer_id of SPS is used instead 1896 // of nuh_layer_id of slice (currLayerId), this seems to be a bug. 1897 1898 for (Int i = 0; i < getRPSList()->getNumberOfReferencePictureSets(); i++ ) 1899 { 1900 TComReferencePictureSet* rps = getRPSList()->getReferencePictureSet( i ); 1901 if ( !rps->getInterRPSPrediction() ) 1902 { 1903 rps->checkMaxNumPics( vps->getVpsExtensionFlag(), vps->getMaxNumPics( currLayerId ), 1904 getLayerId(), getMaxDecPicBuffering( getSpsMaxSubLayersMinus1() ) - 1 ); 1905 } 1906 } 1907 } 1908 #endif 1731 Void checkRpsMaxNumPics( TComVPS* vps, Int currLayerId ); 1909 1732 1910 1733 #endif … … 2019 1842 Int m_ppsScalingListRefLayerId; 2020 1843 2021 #if H_MV_HLS_8_SPS_NODOC_482022 1844 Bool m_ppsRangeExtensionsFlag; 2023 1845 Bool m_ppsMultilayerExtensionFlag; … … 2029 1851 #endif 2030 1852 2031 #else2032 Bool m_ppsExtensionTypeFlag[PS_EX_T_MAX_NUM];2033 #endif2034 1853 Bool m_pocResetInfoPresentFlag; 2035 1854 #endif … … 2175 1994 Int getPpsScalingListRefLayerId( ) { return m_ppsScalingListRefLayerId; } 2176 1995 2177 #if H_MV_HLS_8_SPS_NODOC_482178 1996 Void setPpsRangeExtensionsFlag( Bool flag ) { m_ppsRangeExtensionsFlag = flag; } 2179 1997 Bool getPpsRangeExtensionsFlag( ) { return m_ppsRangeExtensionsFlag; } … … 2191 2009 Void setPpsExtension5bits( Int val ) { m_ppsExtension5bits = val; } 2192 2010 Int getPpsExtension5bits( ) { return m_ppsExtension5bits; } 2193 #endif2194 #else2195 Void setPpsExtensionTypeFlag( Int i, Bool flag ) { m_ppsExtensionTypeFlag[i] = flag; }2196 Bool getPpsExtensionTypeFlag( Int i ) { return m_ppsExtensionTypeFlag[i]; }2197 2011 #endif 2198 2012 … … 2231 2045 Int m_iPPSId; ///< picture parameter set ID 2232 2046 Bool m_PicOutputFlag; ///< pic_output_flag 2233 #if H_MV _HLS_8_POC_Q0142_322047 #if H_MV 2234 2048 Int m_slicePicOrderCntLsb; 2235 2049 #endif … … 2414 2228 Void setPicOutputFlag( Bool b ) { m_PicOutputFlag = b; } 2415 2229 Bool getPicOutputFlag() { return m_PicOutputFlag; } 2416 #if H_MV _HLS_8_POC_Q0142_322230 #if H_MV 2417 2231 Void setSlicePicOrderCntLsb( Int i ) { m_slicePicOrderCntLsb = i; }; 2418 2232 Int getSlicePicOrderCntLsb( ) { return m_slicePicOrderCntLsb; }; … … 2466 2280 Bool getApplyIC() { return m_bApplyIC; } 2467 2281 Void xSetApplyIC(); 2468 #if MTK_LOW_LATENCY_IC_ENCODING_H00862469 2282 Void xSetApplyIC(Bool bUseLowLatencyICEnc); 2470 #endif2471 2283 Void setIcSkipParseFlag( Bool b ) { m_icSkipParseFlag = b; } 2472 2284 Bool getIcSkipParseFlag() { return m_icSkipParseFlag; } … … 2569 2381 static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ); 2570 2382 static Void markCurrPic ( TComPic* currPic ); 2571 #if !H_MV_HLS_8_DBP_NODOC_422572 static Void markIvRefPicsAsUnused ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc );2573 #endif2574 2383 Void printRefPicList(); 2575 2384 #endif … … 2707 2516 Void setCrossLayerBlaFlag( Bool flag ) { m_crossLayerBlaFlag = flag; } 2708 2517 Bool getCrossLayerBlaFlag( ) { return m_crossLayerBlaFlag; } 2709 Void checkCrossLayerBlaFlag ( ) 2710 { 2711 // cross_layer_bla_flag shall be equal to 0 for pictures with nal_unit_type not equal to IDR_W_RADL or IDR_N_LP or with nuh_layer_id not equal to 0. 2712 if ( getLayerId() != 0 || getNalUnitType() != NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ) 2713 { 2714 assert( m_crossLayerBlaFlag == 0 ); 2715 } 2716 } 2518 Void checkCrossLayerBlaFlag ( ); 2717 2519 2718 2520 #if !H_MV_HLS7_GEN … … 2738 2540 Void setPocResetIdc( Int val ) { m_pocResetIdc = val; } 2739 2541 Int getPocResetIdc( ) { return m_pocResetIdc; } 2740 #if H_MV_HLS_8_POC_Q0142_322741 2542 Void checkPocResetIdc( ) { assert( !(getVPS()->getPocLsbNotPresentFlag( getLayerIdInVps() ) ) || !(getSlicePicOrderCntLsb() > 0 ) || !( getPocResetIdc() == 2) ); } 2742 #endif 2543 2743 2544 Void setPocResetPeriodId( Int val ) { m_pocResetPeriodId = val; } 2744 2545 Int getPocResetPeriodId( ) { return m_pocResetPeriodId; } … … 2749 2550 Void setPocLsbVal( Int val ) { m_pocLsbVal = val; } 2750 2551 Int getPocLsbVal( ) { return m_pocLsbVal; } 2751 #if H_MV_HLS_8_POC_Q0142_322752 2552 Void checkPocLsbVal( ) { assert( !(getVPS()->getPocLsbNotPresentFlag( getLayerIdInVps() ) ) || !getFullPocResetFlag() || ( getPocLsbVal() == 0 ) ); } 2753 #endif2754 2553 2755 2554 Void setPocMsbValPresentFlag( Bool flag ) { m_pocMsbValPresentFlag = flag; } … … 2794 2593 TComPic* getPicFromRefPicSetInterLayer( Int setIdc, Int layerId ); 2795 2594 2796 2797 #if H_MV_HLS_8_POC_Q0146_15 2798 // Inference 2799 Bool inferPocMsbValPresentFlag() 2800 { 2801 Bool pocMsbValPresentFlag; 2802 if( getSliceSegmentHeaderExtensionLength() == 0 ) 2803 { 2804 pocMsbValPresentFlag = false; 2805 } 2806 else if ( getPocMsbValRequiredFlag() ) 2807 { 2808 pocMsbValPresentFlag = true; 2809 } 2810 else 2811 { 2812 pocMsbValPresentFlag = false; 2813 } 2814 2815 return pocMsbValPresentFlag; 2816 } 2817 #endif 2595 // Inference 2596 Bool inferPocMsbValPresentFlag(); 2818 2597 #endif 2819 2598 #if H_3D_DDD 2820 Void InitializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ); 2821 Int getDepthFromDV( Int iDV, Int iBaseViewIdx ) 2822 { 2823 return ClipY(( iDV * m_aiDDDInvScale[ iBaseViewIdx ] + m_aiDDDInvOffset[ iBaseViewIdx ] ) >> m_aiDDDShift[ iBaseViewIdx ]); 2824 } 2599 Void initializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ); 2600 Int getDepthFromDV( Int iDV, Int iBaseViewIdx ); 2825 2601 #endif 2826 2602 -
trunk/source/Lib/TLibCommon/TypeDef.h
r964 r976 102 102 // MTK_NBDV_TN_FIX_E0172 fix the issue of DV derivation from the temporal neighboring blocks, issue 7 in JCT3V-E0172 103 103 // MTK_TEXTURE_MRGCAND_BUGFIX_E0182 Bug fix for TEXTURE MERGING CANDIDATE , JCT3V-E0182 104 104 105 #define H_3D_ARP 1 // Advanced residual prediction (ARP), JCT3V-D0177 105 106 // QC_MTK_INTERVIEW_ARP_F0123_F0108 JCT3V-F0123; JCT3V-F0108 … … 108 109 // MTK_ARP_FLAG_CABAC_SIMP_G0061 Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061 109 110 // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053 111 // MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085 Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085 110 112 111 113 … … 119 121 // MTK_IC_FLAG_CABAC_SIMP_G0061 120 122 // SEC_IC_ARP_SIG_G0072, Disabling IC when ARP is enabled, option 1 in JCT3V-G0072, part 2 in JCT3V-G0121 123 // MTK_LOW_LATENCY_IC_ENCODING_H0086 Low-latency IC encoding in JCT3V-H0086 121 124 122 125 … … 128 131 // NBDV_DEFAULT_VIEWIDX_BUGFIX Bug fix for invalid default view index for NBDV 129 132 // NTT_DoNBDV_VECTOR_CLIP_E0141 disparity vector clipping in DoNBDV, JCT3V-E0141 and JCT3V-E0209 133 // SEC_VER_DONBDV_H0103 Vertical DV Restriction for DoNBDV 130 134 #endif 131 135 … … 161 165 // SEC_DEPTH_DV_DERIVAITON_G0074, Simplification of DV derivation for depth, JCT3V-G0074 162 166 // QC_DEPTH_MERGE_SIMP_G0127 Remove DV candidate and shifting candidate for depth coding 163 167 // QC_IV_PRED_CONSTRAINT_H0137 Constraint on inter-view (motion) prediction tools 168 // ETRIKHU_BUGFIX_H0083 bug-fix for DV candidate pruning 169 // ETRIKHU_CLEANUP_H0083 cleaned-up source code for constructing merging candidate list 170 // ETRIKHU_CLEANUP_H0083_MISSING missing guard macros added by GT 171 // SHARP_SIMPLE_MERGE_H0062 Restrict 3D-HEVC merge cand in small PUs 172 // MTK_DIS_SPBIP8X4_H0205 Disable bi-prediction for 8x4 and 4x8 sub PU and remove the SPIVMP 2Nx2N restriction 173 // SEC_ADAPT_DISABLE_IVMP Disalbing IVMP merge candidates when IC is enabled, JCT3V-H0070 164 174 165 175 #define H_3D_TMVP 1 // QC_TMVP_C0047 … … 196 206 // HS_TSINGHUA_SDC_SPLIT_G0111 197 207 // QC_PKU_SDC_SPLIT_G0123 Intra SDC Split 208 // HS_DMM_SDC_PREDICTOR_UNIFY_H0108 Unification of DMM and SDC predictor derivation 209 // LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135 Use only one context for CABAC of dim_not_present_flag 210 // QC_SIMP_DELTADC_CODING_H0131 Simplify detaDC entropy coding 211 // MTK_DMM_SIMP_CODE_H0092 Remove CABAC context for DMM1 mode coding 212 // MTK_DELTA_DC_FLAG_ONE_CONTEXT_H0084_H0100_H0113 Use only one context for CABAC of delta_dc_flag as in JCTVC-H0084, JCTVC-H0100 and JCTVC-H0113 213 // MTK_SDC_FLAG_FIX_H0095 Remove conditional check of PCM flag based on SDC flag, JCTVC-H0095 214 // SEC_NO_RESI_DLT_H0105 215 // MTK_DLT_CODING_FIX_H0091 216 198 217 199 218 #define H_3D_INTER_SDC 1 // INTER SDC, Inter simplified depth coding … … 205 224 // QC_SPIVMP_MPI_G0119 Sub-PU level MPI merge candidate 206 225 // Simplification on Sub-PU level temporal interview motion prediction 207 226 // MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 208 227 209 228 #define H_3D_DBBP 1 // DBBP: Depth-based Block Partitioning and Merging 229 // MTK_DBBP_AMP_REM_H0072 230 // RWTH_DBBP_NO_SPU_H0057 231 // SEC_DBBP_FILTERING_H0104 232 // MTK_DBBP_SIGNALING_H0094 233 // H_3D_FIX_DBBP_IVMP Fix . Enable IVMP is always disabled, when DBBP is enabled. The original intention is to disable Sub-PU IVMP when DBBP is enabled, not to disable IVMP itself. 234 210 235 211 236 #define H_3D_DDD 1 // Disparity derived depth coding … … 289 314 #define IC_CONST_SHIFT 5 290 315 #define IC_SHIFT_DIFF 12 316 #define IC_LOW_LATENCY_ENCODING_THRESHOLD 0.1 // Threshold for low-latency IC encoding in JCT3V-H0086 291 317 #endif 292 318 … … 310 336 #endif 311 337 312 313 ///////////////////////////////////////////////////////////////////////////////////////// 314 /////////////////////////////////// HTM-11.0 Integrations ////////////////////////////// 315 ///////////////////////////////////////////////////////////////////////////////////////// 316 #if H_3D 317 #define H_3D_FIX_DBBP_IVMP 1 // Fix . Enable IVMP is always disabled, when DBBP is enabled. The original intention is to disable Sub-PU IVMP when DBBP is enabled, not to disable IVMP itself. 318 319 #define MTK_ALIGN_SW_WD_BI_PRED_ARP_H0085 1 // Align the SW and WD for the bi-prediction ARP PUs by disallowing non-normative fast bi-prediction for ARP PUs, JCT3V-H0085 320 #define MTK_LOW_LATENCY_IC_ENCODING_H0086 1 // Low-latency IC encoding in JCT3V-H0086 321 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 322 #define MTK_LOW_LATENCY_IC_ENCODING_THRESHOLD_H0086 0.1 // Threshold for low-latency IC encoding in JCT3V-H0086 323 #endif 324 #define SEC_ADAPT_DISABLE_IVMP 1 // Disalbing IVMP merge candidates when IC is enabled, JCT3V-H0070 325 326 #define MTK_DELTA_DC_FLAG_ONE_CONTEXT_H0084_H0100_H0113 1 // Use only one context for CABAC of delta_dc_flag as in JCTVC-H0084, JCTVC-H0100 and JCTVC-H0113 327 #define MTK_SDC_FLAG_FIX_H0095 1 // Remove conditional check of PCM flag based on SDC flag, JCTVC-H0095 328 #define MTK_DMM_SIMP_CODE_H0092 1 // Remove CABAC context for DMM1 mode coding 329 330 331 #define QC_IV_PRED_CONSTRAINT_H0137 1 // Constraint on inter-view (motion) prediction tools 332 #define ETRIKHU_BUGFIX_H0083 1 // bug-fix for DV candidate pruning 333 #define ETRIKHU_CLEANUP_H0083 1 // cleaned-up source code for constructing merging candidate list 334 #define ETRIKHU_CLEANUP_H0083_MISSING 1 // missing guard macros added by GT 335 #define SHARP_SIMPLE_MERGE_H0062 1 // Restrict 3D-HEVC merge cand in small PUs 336 #define MTK_DIS_SPBIP8X4_H0205 1 // Disable bi-prediction for 8x4 and 4x8 sub PU and remove the SPIVMP 2Nx2N restriction 337 338 #if H_3D_NBDV 339 #define SEC_VER_DONBDV_H0103 1 // Vertical DV Restriction for DoNBDV 340 #endif 341 342 #if H_3D_DIM 343 #define HS_DMM_SDC_PREDICTOR_UNIFY_H0108 1 // Unification of DMM and SDC predictor derivation 344 #define LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135 1 // Use only one context for CABAC of dim_not_present_flag 345 #define QC_SIMP_DELTADC_CODING_H0131 1 // Simplify detaDC entropy coding 346 347 #if H_3D_DIM_DLT 348 #define SEC_NO_RESI_DLT_H0105 1 349 #define MTK_DLT_CODING_FIX_H0091 1 350 #endif 351 #endif 352 #if H_3D_DBBP 353 #define MTK_DBBP_AMP_REM_H0072 1 354 #define RWTH_DBBP_NO_SPU_H0057 1 355 #define SEC_DBBP_FILTERING_H0104 1 356 #define MTK_DBBP_SIGNALING_H0094 1 357 #endif 358 359 #define MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 1 360 #endif 361 362 #if H_MV 363 #define H0044_POC_LSB_NOT_PRESENT 1 ///< JCT3V-H0044: Add constraint checking on the value of poc_reset_idc and poc_lsb_val 364 #define H0056_EOS_CHECKS 1 ///< JCT3V-H0056: Put checks on handling EOS 365 #endif 366 ///////////////////////////////////////////////////////////////////////////////////////// 367 /////////////////////////////////// TBD ////////////////////////////// 368 ///////////////////////////////////////////////////////////////////////////////////////// 369 370 371 #define H_MV_HLS_8 1 // General changes 372 #define H_MV_HLS_7_VPS_P0300_27 1 // Output part only. (VPS/P0300/alt output layer flag) #27 Change alt output layer flag to be signalled within the loop of output layer sets, from JCTVC-P0300-v2. Decision: Adopt. 373 #define MV_FIX_DEP_TYPES 1 374 375 338 ///////////////////////////////////////////////////////////////////////////////// 339 /////////////////////////////////// MV_HEVC HLS ////////////////////////////// 340 ///////////////////////////////////////////////////////////////////////////////// 341 // TBD: Check if integration is necessary. 376 342 #define H_MV_HLS7_GEN 0 // General changes (not tested) 377 343 … … 380 346 // #define H_MV_HLS_7_POC_P0041_FIXES 0 // (POC/P0041/Fixes) For each non-IRAP picture that has discardable_flag equal to 1 to have NUT value indicating that it is a sub-layer non-reference picture. 381 347 // #define H_MV_HLS_7_POC_P0056_4 0 // (POC/P0056/layer tree poc) #4 Proposal 1: If the POC reset approach is adopted as the basis for multi-layer POC derivation, it is proposed to derive the POC anchor picture from the previous TID0 picture (that is not a RASL picture, a RADL picture or a sub-layer non-reference picture and not with discardable_flag equal to 1) of the current layer or any of its reference layer. This is asserted to improve loss resilience and reduce bit rate overhead. Decision: Adopt Proposal 1 (with the suggested modifications Ewith text provided as P0297). 382 383 384 // OTHERS385 // #define H_MV_HLS_7_HRD_P0138_6 0 // (HRD/P0138/HRD parameters for bitstreams excluding) #6 Decision: Adopt (as revised in updated contribution, with the specification of a flag in the BP SEI (HRD/P0192/sub-DPB) #12 Establish sub-DPBs based on the representation format indicated at the VPS level. It was suggested that the expressed shared capacity limit would need to be less than or equal to the sum of the individual capacity limits. Decision: Adopt as modified. Further study is encouraged on profile/level constraint selections.386 348 387 349 // SEI related … … 400 362 //#define H_MV_HLS_7_SEI_P0123_25 0 // (SEI/P0123/Alpha channel info) #25 Add alpha channel information SEI message Decision: Adopt. Constrain the bit depth indicated to be equal to the coded bit depth of the aux picture. 401 363 402 403 364 // Auxiliary picture related 404 365 //#define H_MV_HLS_8_AUX_NODOC_40 0 // #40 (AUX /NODOC/primary pic) Clarify that an auxiliary picture can be associated with more than one primary picture. Consider if the language associating an alpha auxiliary picture with a primary picture in the semantics of dimension_id[ ][ ] near the AuxId derivation could be moved to the alpha SEI message. … … 419 380 //#define H_MV_HLS_7_OTHER_P0187_1 0 // (OTHER/P0187/NoOutputOfPriorPicsFlag) #1 Inference of NoOutputOfPriorPicsFlag and proposes to take into account colour format and bit depth for the inference in addition to spatial resolution 420 381 421 // O thers382 // OTHERS 422 383 //#define H_MV_HLS_8_HSB_Q0041_03 0 // #3 (HS /Q0041/hybrid scalability) The proposed text was endorsed, with non-editorial open issues considered as follows 423 384 :// #define H_MV_HLS_7_OTHER_P0187_1 0 // (OTHER/P0187/NoOutputOfPriorPicsFlag) #1 Inference of NoOutputOfPriorPicsFlag and proposes to take into account colour format and bit depth for the inference in addition to spatial resolution 424 385 //#define H_MV_HLS_8_MIS_Q0078_24 0 // #24 (MISC /Q0078/scan and pic type) , Items 3 b,c and 4, clarifying which pictures in an output layer sets are applied the values of general_progressive_source_flag, general_interlaced_source_flag, general_non_packed_constraint_flag and general_frame_only_constraint_flag. 425 426 427 #define H_MV_HLS_8_SYN_Q0041_03 1 // #3 Syntax only (HS /Q0041/hybrid scalability) The proposed text was endorsed, with non-editorial open issues considered as follows 428 :// #define H_MV_HLS_7_OTHER_P0187_1 0 // (OTHER/P0187/NoOutputOfPriorPicsFlag) #1 Inference of NoOutputOfPriorPicsFlag and proposes to take into account colour format and bit depth for the inference in addition to spatial resolution 429 #define H_MV_HLS_8_SYN_39_19 1 // #39 Syntax only + (PS/Q0165,Q0078/presence of num_add_output_layer_sets) proposal 2. change condition for presence of num_add_output_layer_sets to avoid sending it when there is only one layer set. 430 #define H_MV_HLS_8_HRD_Q0101_04 1 // #4 (HRD /Q0101/Bitstream part buffer) On Bitstream Partition Buffer. Decision (BF/Cleanup): Adopt (sub-proposals 111, refined as described). 431 #define H_MV_HLS_8_PPS_NODOC_NN 1 // #NN (PPS /NODOC/reserved flag): Add a flag in PPS for SHVC color gamut scalability 432 #define H_MV_HLS_8_MIS_Q0177_47 1 // #47 (MISC /Q0177/EOS NAL) proposal 2: clarification of description of end of sequence NAL unit 433 #define H_MV_HLS_8_HRD_Q0182_05 1 // #5 (HRD /Q0182/Bitstream part buffer) Decision (BF/Cleanup/Ed): Adopted (such that we use the main proposal for sub-proposal 1, and alternative 1 for sub-proposal 2). + #define H_MV_HLS_8_HRD_Q0182_06 0 // #6 (HRD /Q0182/hrd_parameters) Sub-proposal 2 Alternative 1: Clarify that the VPS hrd_parameters( ) syntax structure that applies to the layer set which is associated with the bitstream partition initial arrival time SEI message is used to determine the lengths of the nal_initial_arrival_delay[ i ] and vcl_initial_arrival_delay[ i ] syntax elements. Decision (BF/Cleanup/Ed): Adopted alternative 1 for sub-proposal 2 434 #define H_MV_HLS_8_SPS_NODOC_48 1 // #48 (SPS /NODOC/PPS extension cleanups) Alignment with RExt 435 #define H_MV_HLS_8_DBP_NODOC_42 1 // #42 (DBP /NODOC/sharing) Remove sub-DPB sharing and processes that mark inter-layer reference pictures as "unused for reference" 436 #define H_MV_HLS_8_RPS_Q0100_36 1 // #36 (RPS /Q0100/constraint to semantics) v3, add constraint to RPS semantics 437 #define H_MV_HLS_8_POC_Q0142_32 1 // #32 (POC /Q0142/poc_lsb_not_present_flag) v2: Add semantic constraints to poc_lsb_not_present_flag. 438 #define H_MV_HLS_8_HRD_Q0102_08 1 // #8 (HRD /Q0102/sps_max_dec_pic_buffering_minus1) Sub-proposal 2: A semantics bug fix is proposed for sps_max_dec_pic_buffering_minus1 as a bug-fix. In discussion, the first option was preferred. Decision (BF/Cleanup/Ed.): Adopt. 439 #define H_MV_HLS_8_MIS_Q0102_30 1 // #30 (MISC /Q0102/loop index) proposal 3, change the max loop index for signaling bit rate and pic rate info to MaxSubLayersInLayerSetMinus1 440 #define H_MV_HLS_8_GEN_Q0108_13 1 // #13 (GEN /Q0108/STSA TemporalId) Agreed to remove restriction from proposal 2, to allow STSA pics of non-base layers to have TemporalId equal to 0. 441 #define H_MV_HLS_8_PMS_Q0195_21 1 // #21 (PS /Q0195/constraint update_ref_format_flag) proposal 2: add a semantic constraint on the value of update_ref_format_flag 442 #define H_MV_HLS_8_PMS_Q0195_20 1 // #20 (PS /Q0195/syntax table rep format) proposal 1: restructure syntax table for sending of rep_format_idx_present_flag and vps_num_ref_formats_minus1 443 #define H_MV_HLS_8_MIS_Q0177_22 1 // #22 (MISC /Q0177/inference sps_temporal_id_nesting_flag) proposal 1: modify inference rule for sps_temporal_id_nesting_flag when it is not present 444 #define H_MV_HLS_8_PMS_Q0165_18 1 // #18 (PS /Q0165/disallow an empty layer set) proposal 1.a), add a constraint to disallow an empty layer set 445 #define H_MV_HLS_8_RPS_Q0060_17 1 // #17 (RPS /Q0060/condition refLayerPicIdc) Proposal 2: Add a condition to the derivation of refLayerPicIdc of (TemporalId == 0) 446 #define H_MV_HLS_8_POC_Q0146_15 1 // #15 (POC /Q0146/inference of poc_msb_val_present_flag) Proposal 1.1: Change inference rule in semantics of poc_msb_val_present_flag 447 448 386 //#define H_MV_HLS_7_HRD_P0138_6 0 // (HRD/P0138/HRD parameters for bitstreams excluding) #6 Decision: Adopt (as revised in updated contribution, with the specification of a flag in the BP SEI (HRD/P0192/sub-DPB) #12 Establish sub-DPBs based on the representation format indicated at the VPS level. It was suggested that the expressed shared capacity limit would need to be less than or equal to the sum of the individual capacity limits. Decision: Adopt as modified. Further study is encouraged on profile/level constraint selections. 449 387 450 388 ///////////////////////////////////////////////////////////////////////////////////////// … … 938 876 939 877 /// merging candidates 940 #if ETRIKHU_CLEANUP_H0083878 #if H_3D 941 879 enum DefaultMergCandOrder 942 880 { … … 1012 950 #if H_MV 1013 951 1014 #if !H_MV_HLS_8_SPS_NODOC_481015 enum PpsExtensionTypes1016 {1017 PPS_EX_T_MV = 0,1018 #if H_3D1019 PPS_EX_T_3D = 3,1020 #endif1021 PPS_EX_T_ESC = 7,1022 PPS_EX_T_MAX_NUM = 81023 };1024 1025 //Below for sps, would be good if this could be aligned1026 1027 enum PsExtensionTypes1028 {1029 PS_EX_T_MV = 1,1030 #if H_3D1031 PS_EX_T_3D = 3,1032 #endif1033 PS_EX_T_ESC = 7,1034 PS_EX_T_MAX_NUM = 81035 };1036 #endif1037 952 /// scalability types 1038 953 enum ScalabilityType -
trunk/source/Lib/TLibDecoder/NALread.cpp
r964 r976 127 127 else 128 128 { 129 #if H_MV _HLS_8_GEN_Q0108_13129 #if H_MV 130 130 131 131 // If nal_unit_type is in the range of BLA_W_LP to RSV_IRAP_VCL23, inclusive, i.e. the coded -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r964 r976 374 374 375 375 #if H_MV 376 #if H_MV_HLS_8_SPS_NODOC_48377 376 READ_FLAG( uiCode, "pps_range_extensions_flag" ); pcPPS->setPpsRangeExtensionsFlag( uiCode == 1 ); 378 377 READ_FLAG( uiCode, "pps_multilayer_extension_flag" ); pcPPS->setPpsMultilayerExtensionFlag( uiCode == 1 ); … … 390 389 if ( pcPPS->getPpsMultilayerExtensionFlag() ) 391 390 { 392 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 393 #if H_MV_HLS_8_PPS_NODOC_NN 394 READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" ); 395 #endif 391 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 392 READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" ); 396 393 } 397 394 #if !H_3D … … 406 403 { 407 404 #endif 408 #else 409 for ( Int i = 0; i < PPS_EX_T_MAX_NUM; i++ ) 410 { 411 READ_FLAG( uiCode, "pps_extension_type_flag" ); pcPPS->setPpsExtensionTypeFlag( i, uiCode == 1 ); 412 #if H_3D 413 assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_3D || i == PPS_EX_T_ESC ); 414 #else 415 assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_ESC ); 416 #endif 417 } 418 419 420 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) ) 421 { 422 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 423 } 424 425 #if H_3D 426 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_3D ) ) // This probably needs to be aligned with Rext and SHVC 427 { 428 parsePPSExtension( pcPPS, pcVPS ); 429 } 430 #endif 431 432 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_ESC ) ) 433 { 434 #endif 405 435 406 #endif 436 407 … … 481 452 READ_FLAG(uiCode, "inter_view_dlt_pred_enable_flag[ i ]"); 482 453 483 #if MTK_DLT_CODING_FIX_H0091484 454 if( uiCode ) 485 455 { 486 456 assert( pcDLT->getUseDLTFlag( 1 )); 487 457 } 488 #endif489 490 458 pcDLT->setInterViewDltPredEnableFlag( i, (uiCode == 1) ? true : false ); 491 459 … … 795 763 { 796 764 #endif 797 READ_CODE( 3, uiCode, "sps_max_sub_layers_minus1" ); pcSPS->setMaxTLayers ( uiCode+1 );798 assert(uiCode <= 6);799 800 READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" ); pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false );801 if ( pcSPS->getMaxTLayers() == 1 )802 {803 // sps_temporal_id_nesting_flag must be 1 when sps_max_sub_layers_minus1 is 0804 assert( uiCode == 1 );805 }806 807 parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1);765 READ_CODE( 3, uiCode, "sps_max_sub_layers_minus1" ); pcSPS->setMaxTLayers ( uiCode+1 ); 766 assert(uiCode <= 6); 767 768 READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" ); pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false ); 769 if ( pcSPS->getMaxTLayers() == 1 ) 770 { 771 // sps_temporal_id_nesting_flag must be 1 when sps_max_sub_layers_minus1 is 0 772 assert( uiCode == 1 ); 773 } 774 775 parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1); 808 776 #if H_MV 809 777 } … … 823 791 { 824 792 #endif 825 READ_UVLC( uiCode, "chroma_format_idc" ); pcSPS->setChromaFormatIdc( uiCode );826 assert(uiCode <= 3);827 // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream828 assert (uiCode == 1);829 if( uiCode == 3 )830 {831 READ_FLAG( uiCode, "separate_colour_plane_flag"); assert(uiCode == 0);832 }833 834 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode );835 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode );793 READ_UVLC( uiCode, "chroma_format_idc" ); pcSPS->setChromaFormatIdc( uiCode ); 794 assert(uiCode <= 3); 795 // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream 796 assert (uiCode == 1); 797 if( uiCode == 3 ) 798 { 799 READ_FLAG( uiCode, "separate_colour_plane_flag"); assert(uiCode == 0); 800 } 801 802 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 803 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode ); 836 804 #if H_MV 837 805 } … … 860 828 { 861 829 #endif 862 READ_UVLC( uiCode, "bit_depth_luma_minus8" );863 assert(uiCode <= 6);864 pcSPS->setBitDepthY( uiCode + 8 );865 pcSPS->setQpBDOffsetY( (Int) (6*uiCode) );866 867 READ_UVLC( uiCode, "bit_depth_chroma_minus8" );868 assert(uiCode <= 6);869 pcSPS->setBitDepthC( uiCode + 8 );870 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) );830 READ_UVLC( uiCode, "bit_depth_luma_minus8" ); 831 assert(uiCode <= 6); 832 pcSPS->setBitDepthY( uiCode + 8 ); 833 pcSPS->setQpBDOffsetY( (Int) (6*uiCode) ); 834 835 READ_UVLC( uiCode, "bit_depth_chroma_minus8" ); 836 assert(uiCode <= 6); 837 pcSPS->setBitDepthC( uiCode + 8 ); 838 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) ); 871 839 #if H_MV 872 840 } … … 880 848 { 881 849 #endif 882 UInt subLayerOrderingInfoPresentFlag;883 READ_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag");884 885 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++)886 {887 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1[i]");888 pcSPS->setMaxDecPicBuffering( uiCode + 1, i);889 READ_UVLC ( uiCode, "sps_num_reorder_pics[i]" );890 pcSPS->setNumReorderPics(uiCode, i);891 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1[i]");892 pcSPS->setMaxLatencyIncrease( uiCode, i );893 894 if (!subLayerOrderingInfoPresentFlag)895 {896 for (i++; i <= pcSPS->getMaxTLayers()-1; i++)897 {898 pcSPS->setMaxDecPicBuffering(pcSPS->getMaxDecPicBuffering(0), i);899 pcSPS->setNumReorderPics(pcSPS->getNumReorderPics(0), i);900 pcSPS->setMaxLatencyIncrease(pcSPS->getMaxLatencyIncrease(0), i);901 }902 break;903 }904 }850 UInt subLayerOrderingInfoPresentFlag; 851 READ_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag"); 852 853 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) 854 { 855 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1[i]"); 856 pcSPS->setMaxDecPicBuffering( uiCode + 1, i); 857 READ_UVLC ( uiCode, "sps_num_reorder_pics[i]" ); 858 pcSPS->setNumReorderPics(uiCode, i); 859 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1[i]"); 860 pcSPS->setMaxLatencyIncrease( uiCode, i ); 861 862 if (!subLayerOrderingInfoPresentFlag) 863 { 864 for (i++; i <= pcSPS->getMaxTLayers()-1; i++) 865 { 866 pcSPS->setMaxDecPicBuffering(pcSPS->getMaxDecPicBuffering(0), i); 867 pcSPS->setNumReorderPics(pcSPS->getNumReorderPics(0), i); 868 pcSPS->setMaxLatencyIncrease(pcSPS->getMaxLatencyIncrease(0), i); 869 } 870 break; 871 } 872 } 905 873 #if H_MV 906 874 } … … 912 880 READ_UVLC( uiCode, "log2_diff_max_min_coding_block_size" ); 913 881 pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode); 914 882 915 883 if (pcSPS->getPTL()->getGeneralPTL()->getLevelIdc() >= Level::LEVEL5) 916 884 { 917 885 assert(log2MinCUSize + pcSPS->getLog2DiffMaxMinCodingBlockSize() >= 5); 918 886 } 919 887 920 888 Int maxCUDepthDelta = uiCode; 921 889 pcSPS->setMaxCUWidth ( 1<<(log2MinCUSize + maxCUDepthDelta) ); … … 948 916 { 949 917 #endif 950 READ_FLAG( uiCode, "sps_scaling_list_data_present_flag" ); pcSPS->setScalingListPresentFlag ( uiCode );951 if(pcSPS->getScalingListPresentFlag ())952 {953 parseScalingList( pcSPS->getScalingList() );954 }918 READ_FLAG( uiCode, "sps_scaling_list_data_present_flag" ); pcSPS->setScalingListPresentFlag ( uiCode ); 919 if(pcSPS->getScalingListPresentFlag ()) 920 { 921 parseScalingList( pcSPS->getScalingList() ); 922 } 955 923 #if H_MV 956 924 } … … 1017 985 { 1018 986 #if H_MV 1019 #if H_MV_HLS_8_SPS_NODOC_481020 987 READ_FLAG( uiCode, "sps_range_extensions_flag" ); pcSPS->setSpsRangeExtensionsFlag( uiCode == 1 ); 1021 988 READ_FLAG( uiCode, "sps_multilayer_extension_flag" ); pcSPS->setSpsMultilayerExtensionFlag( uiCode == 1 ); … … 1050 1017 { 1051 1018 #endif 1052 #else 1053 for (Int i = 0; i < PS_EX_T_MAX_NUM; i++) 1054 { 1055 READ_FLAG( uiCode, "sps_extension_type_flag" ); pcSPS->setSpsExtensionTypeFlag( i, uiCode ); 1056 #if H_3D 1057 assert( !pcSPS->getSpsExtensionTypeFlag( i ) || i == PS_EX_T_MV || i == PS_EX_T_3D || i == PS_EX_T_ESC ); 1058 #else 1059 assert( !pcSPS->getSpsExtensionTypeFlag( i ) || i == PS_EX_T_MV || i == PS_EX_T_ESC ); 1060 #endif 1061 } 1062 1063 if( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_MV )) 1064 { 1065 parseSPSExtension( pcSPS ); 1066 } 1067 1068 #if H_3D 1069 if( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_3D )) 1070 { 1071 parseSPSExtension2( pcSPS, viewIndex, depthFlag ); 1072 } 1073 #endif 1074 1075 if ( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_ESC )) 1076 { 1077 #endif 1078 #endif 1079 while ( xMoreRbspData() ) 1080 { 1081 READ_FLAG( uiCode, "sps_extension_data_flag"); 1082 } 1083 #if H_MV && !H_MV_HLS_8_SPS_NODOC_48 1084 } 1085 #endif 1019 1020 #endif 1021 while ( xMoreRbspData() ) 1022 { 1023 READ_FLAG( uiCode, "sps_extension_data_flag"); 1024 } 1086 1025 } 1087 1026 } … … 1132 1071 1133 1072 READ_CODE( 4, uiCode, "vps_video_parameter_set_id" ); pcVPS->setVPSId( uiCode ); 1134 #if H_MV _HLS_8_SYN_Q0041_031073 #if H_MV 1135 1074 READ_FLAG( uiCode, "vps_base_layer_internal_flag" ); pcVPS->setVpsBaseLayerInternalFlag( uiCode == 1 ); 1136 1075 READ_FLAG( uiCode, "vps_reserved_one_bit" ); assert( uiCode == 1 ); … … 1221 1160 } 1222 1161 } 1223 #if H_MV _HLS_8_RPS_Q0100_361162 #if H_MV 1224 1163 READ_FLAG( uiCode, "vps_extension_flag" ); pcVPS->setVpsExtensionFlag( uiCode == 1 ? true : false ); 1225 1164 if ( pcVPS->getVpsExtensionFlag() ) … … 1262 1201 { 1263 1202 UInt uiCode; 1264 #if !H_MV_HLS_8_SYN_Q0041_031265 READ_FLAG( uiCode, "avc_base_layer_flag" ); pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false );1266 #endif1267 1203 1268 1204 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); … … 1384 1320 } 1385 1321 1386 #if H_MV_HLS_8_SYN_39_191387 1322 if ( pcVPS->getNumIndependentLayers() > 1 ) 1388 1323 { … … 1404 1339 pcVPS->initTargetLayerIdLists( ); 1405 1340 1406 #else1407 READ_UVLC( uiCode, "num_add_layer_sets" ); pcVPS->setNumAddLayerSets( uiCode );1408 pcVPS->initTargetLayerIdLists( );1409 if( pcVPS->getNumOutputLayerSets() > 1)1410 {1411 READ_CODE( 2, uiCode, "default_output_layer_idc" ); pcVPS->setDefaultOutputLayerIdc( std::min( uiCode, (UInt) 2 ) );1412 }1413 #endif1414 1341 1415 1342 pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 )); … … 1420 1347 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1421 1348 { 1422 #if H_MV_HLS_8_SYN_39_191423 1349 if( i >= pcVPS->getNumLayerSets( ) ) 1424 #else1425 if( i > pcVPS->getVpsNumLayerSetsMinus1( ) )1426 #endif1427 1350 { 1428 1351 READ_UVLC( uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode ); … … 1455 1378 } 1456 1379 1457 #if !H_MV_HLS_8_PMS_Q0195_201458 READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 );1459 if ( pcVPS->getRepFormatIdxPresentFlag() )1460 {1461 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode );1462 }1463 #else1464 1380 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode ); 1465 #endif1466 1381 1467 1382 for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ ) … … 1474 1389 } 1475 1390 1476 #if H_MV_HLS_8_PMS_Q0195_201477 1391 if ( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1478 1392 { 1479 1393 READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 ); 1480 1394 } 1481 #endif1482 1395 if( pcVPS->getRepFormatIdxPresentFlag() ) 1483 1396 { 1484 #if H_MV_HLS_8_SYN_Q0041_031485 1397 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1486 #else 1487 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1488 #endif 1489 { 1490 #if !H_MV_HLS_8_PMS_Q0195_20 1491 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1492 { 1493 #endif 1398 { 1494 1399 READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode ); 1495 #if !H_MV_HLS_8_PMS_Q0195_20 1496 } 1497 #endif 1498 } 1499 } 1500 #if H_MV_HLS_8_PMS_Q0195_20 1400 } 1401 } 1501 1402 else 1502 1403 { 1503 #if H_MV_HLS_8_SYN_Q0041_031504 1404 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1505 #else1506 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1507 #endif1508 1405 { 1509 1406 pcVPS->setVpsRepFormatIdx( i, pcVPS->inferVpsRepFormatIdx( i ) ); 1510 1407 } 1511 1408 } 1512 #endif1513 1409 1514 1410 READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 ); … … 1535 1431 } 1536 1432 1537 #if H_MV_HLS_8_SYN_Q0041_031538 1433 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1539 1434 { 1540 1435 for( Int j = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; j < i; j++ ) 1541 #else1542 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1543 {1544 for( Int j = 0; j < i; j++ )1545 #endif1546 1436 { 1547 1437 if (pcVPS->getDirectDependencyFlag( i, j) ) … … 1629 1519 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1630 1520 { 1631 #if H_MV_HLS_8_SYN_Q0041_031632 1521 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1633 #else 1634 for( Int i = 0; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1635 #endif 1636 { 1637 #if H_MV_HLS_8_MIS_Q0102_30 1522 { 1638 1523 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1639 #else1640 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ )1641 #endif1642 1524 { 1643 1525 if( pcVPSVUI->getBitRatePresentVpsFlag( ) ) … … 1699 1581 if( !pcVPSVUI->getTilesNotInUseFlag() ) 1700 1582 { 1701 #if H_MV_HLS_8_SYN_Q0041_031702 1583 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1703 #else1704 for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ )1705 #endif1706 1584 { 1707 1585 READ_FLAG( uiCode, "tiles_in_use_flag[i]" ); pcVPSVUI->setTilesInUseFlag( i, uiCode == 1 ); … … 1711 1589 } 1712 1590 } 1713 #if H_MV_HLS_8_SYN_Q0041_031714 1591 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1715 #else1716 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1717 #endif1718 1592 { 1719 1593 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ ) … … 1746 1620 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1747 1621 { 1748 #if H_MV_HLS_8_SYN_Q0041_031749 1622 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1750 1623 { 1751 #endif1752 1624 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcVPSVUI->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); 1753 1625 if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 ) … … 1759 1631 } 1760 1632 } 1761 #if H_MV_HLS_8_SYN_Q0041_03 1762 } 1763 #endif 1633 } 1764 1634 } 1765 1635 } … … 1808 1678 for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ ) 1809 1679 { 1810 #if H_MV_HLS_8_HRD_Q0101_041811 1680 for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ ) 1812 1681 { 1813 1682 READ_FLAG( uiCode, "layer_in_bsp_flag" ); vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, uiCode == 1 ); 1814 #else1815 for( Int j = 0; j <= pcVPS->getMaxLayersMinus1(); j++ )1816 {1817 if( pcVPS->getLayerIdIncludedFlag( h ,j ) )1818 {1819 READ_FLAG( uiCode, "layer_in_bsp_flag" ); vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, uiCode == 1 );1820 }1821 else1822 {1823 vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, false ); // This inference seems to be missing in spec1824 }1825 #endif1826 1683 } 1827 1684 } … … 1831 1688 { 1832 1689 READ_UVLC( uiCode, "num_bsp_sched_combinations_minus1" ); vpsVuiBspHrdP->setNumBspSchedCombinationsMinus1( h, uiCode ); 1833 #if H_MV_HLS_8_HRD_Q0182_051834 1690 for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ ) 1835 #else1836 for( Int i = 0; i < vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ )1837 #endif1838 1691 { 1839 1692 for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ ) 1840 1693 { 1841 #if H_MV_HLS_8_HRD_Q0101_041842 1694 READ_CODE( vpsVuiBspHrdP->getBspCombHrdIdxLen(), uiCode, "bsp_comb_hrd_idx" ); vpsVuiBspHrdP->setBspCombHrdIdx( h, i, j, uiCode ); 1843 #else1844 READ_UVLC( uiCode, "bsp_comb_hrd_idx" ); vpsVuiBspHrdP->setBspCombHrdIdx( h, i, j, uiCode );1845 #endif1846 1695 READ_UVLC( uiCode, "bsp_comb_sched_idx" ); vpsVuiBspHrdP->setBspCombSchedIdx( h, i, j, uiCode ); 1847 #if H_MV_HLS_8_HRD_Q0101_041848 1696 vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j ); 1849 #endif1850 1697 } 1851 1698 } … … 1872 1719 for( Int i = 1; i < vps->getNumOutputLayerSets(); i++ ) 1873 1720 { 1874 #if H_MV_HLS_8_MIS_Q0102_301875 1721 Int currLsIdx = vps->olsIdxToLsIdx( i ); 1876 #endif1877 1722 READ_FLAG( uiCode, "sub_layer_flag_info_present_flag" ); dpbSize->setSubLayerFlagInfoPresentFlag( i, uiCode == 1 ); 1878 #if H_MV_HLS_8_MIS_Q0102_301879 1723 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ ) 1880 #else1881 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( i ); j++ )1882 #endif1883 1724 { 1884 1725 if( j > 0 && dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) … … 1888 1729 if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) 1889 1730 { 1890 #if H_MV_HLS_8_MIS_Q0102_301891 1731 for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ ) 1892 #else1893 for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i )); k++ )1894 #endif1895 1732 { 1896 1733 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); … … 1903 1740 if ( j > 0 ) 1904 1741 { 1905 #if H_MV_HLS_8_DBP_NODOC_421906 1742 for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ ) 1907 #else1908 for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i ) ); k++ )1909 #endif1910 1743 { 1911 1744 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); … … 1918 1751 } 1919 1752 } 1920 #endif1921 1753 1922 1754 #if H_3D … … 1939 1771 #if H_3D_IV_MERGE 1940 1772 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false ); 1941 #if QC_IV_PRED_CONSTRAINT_H01371942 1773 if( !pcVPS->getNumDirectRefLayers(i) ) 1943 1774 { 1944 1775 assert( !uiCode ); 1945 1776 } 1946 #endif1947 1777 #if H_3D_SPIVMP 1948 1778 READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]"); pcVPS->setSubPULog2Size(i, uiCode+3); … … 1951 1781 #if H_3D_ARP 1952 1782 READ_FLAG( uiCode, "iv_res_pred_flag[i]" ); pcVPS->setUseAdvRP ( i, uiCode ); pcVPS->setARPStepNum( i, uiCode ? H_3D_ARP_WFNR : 1 ); 1953 #if QC_IV_PRED_CONSTRAINT_H01371954 1783 if( !pcVPS->getNumDirectRefLayers(i) ) 1955 1784 { 1956 1785 assert( !uiCode ); 1957 1786 } 1958 #endif1959 1787 #endif 1960 1788 #if H_3D_NBDV_REF … … 1963 1791 #if H_3D_VSP 1964 1792 READ_FLAG( uiCode, "view_synthesis_pred_flag[i]"); pcVPS->setViewSynthesisPredFlag( i, uiCode == 1 ? true : false ); 1965 #if QC_IV_PRED_CONSTRAINT_H01371966 1793 if( !pcVPS->getNumDirectRefLayers(i) ) 1967 1794 { 1968 1795 assert( !uiCode ); 1969 1796 } 1970 #endif1971 1797 #endif 1972 1798 #if H_3D_DBBP … … 1980 1806 { 1981 1807 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false ); 1982 #if QC_IV_PRED_CONSTRAINT_H01371983 1808 if( !pcVPS->getNumDirectRefLayers(i) ) 1984 1809 { 1985 1810 assert( !uiCode ); 1986 1811 } 1987 #endif1988 1812 } 1989 1813 #endif … … 2037 1861 } 2038 1862 #endif 2039 2040 #if H_MV _HLS_8_HRD_Q0102_081863 #endif 1864 #if H_MV 2041 1865 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx) 2042 1866 #else … … 2081 1905 sps->inferRepFormat ( vps , rpcSlice->getLayerId() ); 2082 1906 sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 2083 #if H_MV_HLS_8_HRD_Q0102_082084 1907 sps->inferSpsMaxDecPicBufferingMinus1( vps, targetOlsIdx, rpcSlice->getLayerId(), false ); 2085 #endif2086 #if H_MV_HLS_8_RPS_Q0100_362087 1908 vps->inferDbpSizeLayerSetZero( sps, false ); 2088 #endif2089 1909 2090 1910 if ( sps->getVuiParametersPresentFlag() ) … … 2141 1961 } 2142 1962 2143 #if H 0044_POC_LSB_NOT_PRESENT1963 #if H_MV 2144 1964 UInt slicePicOrderCntLsb = 0; 2145 1965 #endif … … 2195 2015 2196 2016 #if H_MV 2197 #if !H0044_POC_LSB_NOT_PRESENT2198 UInt slicePicOrderCntLsb = 0;2199 #endif2200 2017 Int iPOClsb = slicePicOrderCntLsb; // Needed later 2201 2018 if ( (rpcSlice->getLayerId() > 0 && !vps->getPocLsbNotPresentFlag( rpcSlice->getLayerIdInVps())) || !rpcSlice->getIdrPicFlag() ) … … 2203 2020 READ_CODE(sps->getBitsForPOC(), slicePicOrderCntLsb, "slice_pic_order_cnt_lsb"); 2204 2021 } 2205 #if H_MV_HLS_8_POC_Q0142_322206 2022 rpcSlice->setSlicePicOrderCntLsb( slicePicOrderCntLsb ); 2207 #endif2208 2023 2209 2024 Bool picOrderCntMSBZeroFlag = false; … … 2301 2116 { 2302 2117 parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets()); 2303 #if H_MV _HLS_8_RPS_Q0100_362118 #if H_MV 2304 2119 if ( !rps->getInterRPSPrediction( ) ) 2305 2120 { // check sum of num_positive_pics and num_negative_pics … … 2414 2229 rps->setNumberOfPictures(offset); 2415 2230 } 2416 #if H_MV _HLS_8_RPS_Q0100_362231 #if H_MV 2417 2232 if ( !rps->getInterRPSPrediction( ) ) 2418 2233 { // check sum of NumPositivePics, NumNegativePics, num_long_term_sps and num_long_term_pics … … 2804 2619 rpcSlice->setPocResetIdc( 0 ); 2805 2620 } 2806 #if H_MV_HLS_8_POC_Q0142_322807 2621 rpcSlice->checkPocResetIdc(); 2808 #endif 2809 2810 #if H0044_POC_LSB_NOT_PRESENT 2622 2811 2623 if ( rpcSlice->getVPS()->getPocLsbNotPresentFlag(rpcSlice->getLayerId()) && slicePicOrderCntLsb > 0 ) 2812 2624 { 2813 2625 assert( rpcSlice->getPocResetIdc() != 2 ); 2814 2626 } 2815 #endif 2627 2816 2628 if( rpcSlice->getPocResetIdc() != 0 ) 2817 2629 { … … 2828 2640 READ_FLAG( uiCode, "full_poc_reset_flag" ); rpcSlice->setFullPocResetFlag( uiCode == 1 ); 2829 2641 READ_CODE( rpcSlice->getPocLsbValLen() , uiCode, "poc_lsb_val" ); rpcSlice->setPocLsbVal( uiCode ); 2830 #if !H_MV_HLS_8_POC_Q0142_322831 #if H0044_POC_LSB_NOT_PRESENT2832 if ( rpcSlice->getVPS()->getPocLsbNotPresentFlag(rpcSlice->getLayerId()) && rpcSlice->getFullPocResetFlag() )2833 {2834 assert( rpcSlice->getPocLsbVal() == 0 );2835 }2836 #endif2837 #endif2838 2642 } 2839 #if H_MV_HLS_8_POC_Q0142_322840 2643 rpcSlice->checkPocLsbVal(); 2841 #endif2842 2644 2843 2645 // Derive the value of PocMs8bValRequiredFlag … … 2852 2654 else 2853 2655 { 2854 #if H_MV_HLS_8_POC_Q0146_152855 2656 rpcSlice->setPocMsbValPresentFlag( rpcSlice->inferPocMsbValPresentFlag( ) ); 2856 #else2857 if( rpcSlice->getPocMsbValRequiredFlag() )2858 {2859 rpcSlice->setPocMsbValPresentFlag( true );2860 }2861 else2862 {2863 rpcSlice->setPocMsbValPresentFlag( false );2864 }2865 #endif2866 2657 } 2867 2658 -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r964 r976 109 109 Void parseProfileTier (ProfileTierLevel *ptl); 110 110 Void parseHrdParameters (TComHRD *hrd, Bool cprms_present_flag, UInt tempLevelHigh); 111 #if H_MV _HLS_8_HRD_Q0102_08111 #if H_MV 112 112 Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx); 113 113 #else -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r964 r976 432 432 m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 433 433 m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 434 #if !ETRIKHU_CLEANUP_H0083435 ,vspFlag436 #endif437 434 , inheritedVSPDisInfo 438 435 #if H_3D_SPIVMP 439 #if !ETRIKHU_CLEANUP_H0083_MISSING440 , bSPIVMPFlag441 #endif442 436 , pcMvFieldSP, puhInterDirSP 443 437 #endif 444 438 , numValidMergeCand, uiMergeIndex ); 445 439 446 #if ETRIKHU_CLEANUP_H0083447 440 m_ppcCU[uiDepth]->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 448 441 #if H_3D_SPIVMP … … 450 443 #endif 451 444 , numValidMergeCand ); 452 #endif453 445 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 454 446 #else … … 797 789 } 798 790 799 #if RWTH_DBBP_NO_SPU_H0057800 791 AOF( pcCU->getARPW(uiPartAddr) == 0 ); 801 792 AOF( pcCU->getICFlag(uiPartAddr) == false ); 802 793 AOF( pcCU->getSPIVMPFlag(uiPartAddr) == false ); 803 794 AOF( pcCU->getVSPFlag(uiPartAddr) == 0 ); 804 #else805 pDBBPTmpData->ahVSPFlag[uiSegment] = pcCU->getVSPFlag( uiPartAddr );806 pDBBPTmpData->acDvInfo[uiSegment] = pcCU->getDvInfo( uiPartAddr );807 #endif808 795 } 809 796 … … 814 801 { 815 802 pcCU->setInterDirSubParts( pDBBPTmpData->auhInterDir[uiSegment], 0, 0, uiDepth ); 816 817 #if !RWTH_DBBP_NO_SPU_H0057 818 pcCU->setVSPFlagSubParts( pDBBPTmpData->ahVSPFlag[uiSegment], 0, 0, uiDepth ); 819 pcCU->setDvInfoSubParts( pDBBPTmpData->acDvInfo[uiSegment], 0, 0, uiDepth ); 820 #endif 821 803 822 804 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 823 805 { … … 839 821 840 822 pcCU->setDBBPFlagSubParts(true, uiPartAddr, uiSegment, uiDepth); 841 842 #if !RWTH_DBBP_NO_SPU_H0057843 pcCU->setVSPFlagSubParts( pDBBPTmpData->ahVSPFlag[uiSegment], uiPartAddr, uiSegment, uiDepth );844 pcCU->setDvInfoSubParts( pDBBPTmpData->acDvInfo[uiSegment], uiPartAddr, uiSegment, uiDepth );845 #endif846 847 823 pcCU->setInterDirSubParts(pDBBPTmpData->auhInterDir[uiSegment], uiPartAddr, uiSegment, uiDepth); // interprets depth relative to LCU level 848 824 … … 946 922 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 947 923 { 948 #if H_3D && !SEC_NO_RESI_DLT_H0105949 if ( useDltFlag )950 {951 pReco [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) );952 }953 else954 {955 pReco [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] );956 }957 #else958 924 pReco [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] ); 959 #endif960 925 pRecIPred[ uiX ] = pReco[ uiX ]; 961 926 } … … 1257 1222 // get DC prediction for each segment 1258 1223 Pel apDCPredValues[2]; 1259 #if HS_DMM_SDC_PREDICTOR_UNIFY_H01081260 1224 if ( getDimType( uiLumaPredMode ) == DMM1_IDX || getDimType( uiLumaPredMode ) == DMM4_IDX ) 1261 1225 { … … 1264 1228 } 1265 1229 else 1266 #endif 1267 m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode); 1230 { 1231 m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode); 1232 } 1268 1233 1269 1234 // reconstruct residual based on mask + DC residuals -
trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
r950 r976 140 140 #if H_3D_DBBP 141 141 142 #if MTK_DBBP_SIGNALING_H0094143 142 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ) 144 #else145 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getPartitionSize(uiAbsPartIdx) == RWTH_DBBP_PACK_MODE )146 #endif147 143 { 148 144 decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth); … … 150 146 if( pcCU->getDBBPFlag(uiAbsPartIdx) ) 151 147 { 152 #if !MTK_DBBP_SIGNALING_H0094153 AOF( pcCU->getPartitionSize(uiAbsPartIdx) == RWTH_DBBP_PACK_MODE );154 #endif155 148 156 149 // get collocated depth block … … 169 162 pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth); 170 163 171 #if RWTH_DBBP_NO_SPU_H0057172 164 // make sure that DBBP flag is set for both segments 173 165 UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4; 174 166 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth); 175 167 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx+uiPUOffset, 1, uiDepth); 176 #endif177 168 } 178 169 } … … 210 201 return; 211 202 } 212 #if !MTK_SDC_FLAG_FIX_H0095213 #if H_3D_DIM_SDC214 if( pcCU->getSDCFlag(uiAbsPartIdx) )215 {216 return;217 }218 #endif219 #endif220 203 221 204 m_pcEntropyDecoderIf->parseIPCMInfo( pcCU, uiAbsPartIdx, uiDepth ); … … 309 292 pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand); 310 293 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 311 #if !ETRIKHU_CLEANUP_H0083312 ,vspFlag313 #endif314 294 , inheritedVSPDisInfo 315 295 #if H_3D_SPIVMP 316 #if !ETRIKHU_CLEANUP_H0083_MISSING317 , bSPIVMPFlag318 #endif319 296 , pcMvFieldSP, puhInterDirSP 320 297 #endif 321 298 , numValidMergeCand ); 322 323 #if ETRIKHU_CLEANUP_H0083324 299 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 325 300 #if H_3D_SPIVMP … … 327 302 #endif 328 303 , numValidMergeCand ); 329 #endif330 304 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 331 305 … … 361 335 pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex ); 362 336 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 363 #if !ETRIKHU_CLEANUP_H0083364 , vspFlag365 #endif366 337 , inheritedVSPDisInfo 367 338 #if H_3D_SPIVMP 368 #if !ETRIKHU_CLEANUP_H0083_MISSING369 , bSPIVMPFlag370 #endif371 339 , pcMvFieldSP, puhInterDirSP 372 340 #endif 373 341 ,numValidMergeCand, uiMergeIndex ); 374 375 #if ETRIKHU_CLEANUP_H0083376 342 pcSubCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours, vspFlag 377 343 #if H_3D_SPIVMP … … 379 345 #endif 380 346 ,numValidMergeCand ); 381 #endif382 347 pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 383 348 if(vspFlag[uiMergeIndex]) -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r964 r976 77 77 #endif 78 78 79 #if H_MV _HLS_8_HRD_Q0102_0879 #if H_MV 80 80 virtual Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx ) = 0; 81 81 #else … … 164 164 Void decodePPS ( TComPPS* pcPPS ) { m_pcEntropyDecoderIf->parsePPS(pcPPS); } 165 165 #endif 166 #if H_MV _HLS_8_HRD_Q0102_08166 #if H_MV 167 167 Void decodeSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx) { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager, targetOlsIdx ); } 168 168 #else -
trunk/source/Lib/TLibDecoder/TDecGop.cpp
r964 r976 248 248 calcAndPrintHashStatus(*rpcPic->getPicYuvRec(), hash); 249 249 } 250 251 #if !H_MV_HLS_7_VPS_P0300_27252 #if SETTING_PIC_OUTPUT_MARK253 rpcPic->setOutputMark(rpcPic->getSlice(0)->getPicOutputFlag() ? true : false);254 #else255 rpcPic->setOutputMark(true);256 #endif257 rpcPic->setReconMark(true);258 #endif259 250 } 260 251 -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r964 r976 87 87 , m_cDdcDataSCModel ( 1, 1, NUM_DDC_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 88 88 , m_cAngleFlagSCModel ( 1, 1, NUM_ANGLE_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 89 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H009290 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels)91 #endif92 89 #if H_3D_DIM_SDC 93 90 , m_cSDCResidualFlagSCModel ( 1, 1, SDC_NUM_RESIDUAL_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 171 168 m_cDdcDataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DDC_DATA ); 172 169 m_cAngleFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_ANGLE_FLAG ); 173 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092174 m_cDmm1DataSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_DMM1_DATA );175 #endif176 170 #if H_3D_DIM_SDC 177 171 m_cSDCResidualFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); … … 241 235 m_cDdcDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_DATA ); 242 236 m_cAngleFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG ); 243 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092244 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );245 #endif246 237 #if H_3D_DIM_SDC 247 238 m_cSDCResidualFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); … … 386 377 uiCount++; 387 378 } 388 #if QC_SIMP_DELTADC_CODING_H0131389 379 while( uiSymbol && ( uiCount != 3 ) ); 390 #else391 while( uiSymbol && ( uiCount != 13 ) );392 #endif393 380 ruiSymbol = uiCount - 1; 394 381 … … 426 413 for( Int i = 0; i < iNumBit; i++ ) 427 414 { 428 #if MTK_DMM_SIMP_CODE_H0092 429 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 430 #else 431 m_pcTDecBinIf->decodeBin( uiSymbol, m_cDmm1DataSCModel.get(0, 0, 0) ); 432 #endif 415 m_pcTDecBinIf->decodeBinEP( uiSymbol ); 433 416 uiIdx += uiSymbol << i; 434 417 } … … 1137 1120 if( ( pcCU->getSlice()->getSPS()->getMaxCUWidth() >> pcCU->getDepth( absPartIdx ) ) < 64 ) //DMM and HEVC intra modes are both allowed 1138 1121 { 1139 #if LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H01351140 1122 m_pcTDecBinIf->decodeBin( uiSymbol, m_cAngleFlagSCModel.get( 0, 0, 0 ) ); 1141 #else1142 m_pcTDecBinIf->decodeBin( uiSymbol, m_cAngleFlagSCModel.get( 0, 0, pcCU->getCtxAngleFlag( absPartIdx ) ) );1143 #endif1144 1123 } 1145 1124 else … … 2081 2060 UInt dir = pcCU->getLumaIntraDir( absPartIdx ); 2082 2061 uiNumSegments = isDimMode( dir ) ? 2 : 1; 2083 #if MTK_DELTA_DC_FLAG_ONE_CONTEXT_H0084_H0100_H01132084 2062 m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get( 0, 0, 0 ) ); 2085 #else2086 m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get( 0, 0, uiNumSegments-1 ) );2087 #endif2088 2063 if( pcCU->getSDCFlag( absPartIdx ) ) 2089 2064 { … … 2156 2131 Void TDecSbac::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) 2157 2132 { 2158 #if !MTK_DBBP_SIGNALING_H00942159 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );2160 #endif2161 2133 AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ); 2162 2134 AOF( !pcCU->getSlice()->getIsDepth() ); 2163 #if !MTK_DBBP_SIGNALING_H00942164 AOF( ePartSize == RWTH_DBBP_PACK_MODE );2165 #endif2166 2135 2167 2136 UInt uiSymbol = 0; … … 2172 2141 { 2173 2142 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth); 2174 #if MTK_DIS_SPBIP8X4_H02052175 2143 UInt uiCurrPartNumQ = (pcCU->getPic()->getNumPartInCU() >> (2 * uiDepth)) >> 2; 2176 2144 pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx + 2*uiCurrPartNumQ, 1, uiDepth); 2177 #endif2178 2145 } 2179 2146 } -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r964 r976 87 87 #endif 88 88 89 #if H_MV _HLS_8_HRD_Q0102_0889 #if H_MV 90 90 Void parseSliceHeader ( TComSlice*& /*rpcSlice*/, ParameterSetManagerDecoder* /*parameterSetManager*/, Int targetOlsIdx ) {} 91 91 #else 92 Void parseSliceHeader ( TComSlice*& /*rpcSlice*/, ParameterSetManagerDecoder* /*parameterSetManager*/ ) {}92 Void parseSliceHeader ( TComSlice*& /*rpcSlice*/, ParameterSetManagerDecoder* /*parameterSetManager*/ ) {} 93 93 #endif 94 94 Void parseTerminatingBit ( UInt& ruiBit ); … … 218 218 ContextModel3DBuffer m_cDdcDataSCModel; 219 219 ContextModel3DBuffer m_cAngleFlagSCModel; 220 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092221 ContextModel3DBuffer m_cDmm1DataSCModel;222 #endif223 220 #if H_3D_DIM_SDC 224 221 ContextModel3DBuffer m_cSDCResidualFlagSCModel; -
trunk/source/Lib/TLibDecoder/TDecSlice.cpp
r950 r976 221 221 } 222 222 } 223 #if MTK_DLT_CODING_FIX_H0091223 #if H_3D 224 224 if( pcSlice->getPPS()->getDLT() != NULL ) 225 225 { -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r964 r976 371 371 m_isNoOutputPriorPics = false; 372 372 #endif 373 #if H 0056_EOS_CHECKS373 #if H_MV 374 374 m_isLastNALWasEos = false; 375 #endif376 #if H_MV377 375 m_layerId = 0; 378 376 m_viewId = 0; … … 382 380 m_pcCamParsCollector = 0; 383 381 #endif 384 #if H_MV _HLS_8_HRD_Q0102_08382 #if H_MV 385 383 m_targetOptLayerSetIdx = -1; 386 384 #endif … … 511 509 { 512 510 rpcPic->setOutputMark(false); 513 #if H_MV _HLS_7_VPS_P0300_27511 #if H_MV 514 512 rpcPic->setPicOutputFlag(false); 515 513 #endif … … 521 519 { 522 520 rpcPic->setOutputMark(false); 523 #if H_MV _HLS_7_VPS_P0300_27521 #if H_MV 524 522 rpcPic->setPicOutputFlag(false); 525 523 #endif … … 568 566 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 569 567 TComSlice::markCurrPic( pcPic ); 570 #if !H_MV_HLS_8_DBP_NODOC_42571 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc );572 #endif573 568 #endif 574 569 m_bFirstSliceInPicture = true; … … 590 585 { 591 586 pcPicTmp->setOutputMark(false); 592 #if H_MV _HLS_7_VPS_P0300_27587 #if H_MV 593 588 pcPicTmp->setPicOutputFlag(false); 594 589 #endif … … 670 665 } 671 666 672 #if H_MV _HLS_8_HRD_Q0102_08667 #if H_MV 673 668 sps->inferSpsMaxDecPicBufferingMinus1( vps, m_targetOptLayerSetIdx, getLayerId(), false ); 674 #endif675 676 #if H_MV_HLS_8_RPS_Q0100_36677 669 vps->inferDbpSizeLayerSetZero( sps, false ); 678 #endif679 680 #if H_MV_HLS_8_PMS_Q0195_21681 670 // When the value of vps_num_rep_formats_minus1 in the active VPS is equal to 0 682 671 if ( vps->getVpsNumRepFormatsMinus1() == 0 ) … … 685 674 assert( sps->getUpdateRepFormatFlag() == false ); 686 675 } 687 #endif688 689 #if H_MV_HLS_8_RPS_Q0100_36690 676 sps->checkRpsMaxNumPics( vps, getLayerId() ); 691 #endif692 693 #if H_MV_HLS_8_MIS_Q0177_22694 677 if( m_layerId > 0 ) 695 678 { … … 787 770 m_apcSlicePilot->setRefPicSetInterLayer( & m_refPicSetInterLayer0, &m_refPicSetInterLayer1 ); 788 771 m_apcSlicePilot->setLayerId( nalu.m_layerId ); 789 #endif790 791 #if H_MV_HLS_8_HRD_Q0102_08792 772 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_targetOptLayerSetIdx ); 793 #else794 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder);795 773 #endif 796 774 // set POC for dependent slices in skipped pictures … … 1340 1318 case NAL_UNIT_VPS: 1341 1319 xDecodeVPS(); 1342 #if H 0056_EOS_CHECKS1320 #if H_MV 1343 1321 m_isLastNALWasEos = false; 1344 1322 #endif … … 1355 1333 case NAL_UNIT_PREFIX_SEI: 1356 1334 case NAL_UNIT_SUFFIX_SEI: 1357 #if H 0056_EOS_CHECKS1335 #if H_MV 1358 1336 if ( nalu.m_nalUnitType == NAL_UNIT_SUFFIX_SEI ) 1359 1337 { … … 1380 1358 case NAL_UNIT_CODED_SLICE_RASL_N: 1381 1359 case NAL_UNIT_CODED_SLICE_RASL_R: 1382 #if H 0056_EOS_CHECKS1360 #if H_MV 1383 1361 if (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_R || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_N || 1384 1362 nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_TSA_R || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_TSA_N || … … 1393 1371 m_isLastNALWasEos = false; 1394 1372 } 1395 #endif 1396 #if H_MV 1373 1397 1374 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag, sliceSkippedFlag ); 1398 1375 #else … … 1401 1378 break; 1402 1379 case NAL_UNIT_EOS: 1403 #if H 0056_EOS_CHECKS1380 #if H_MV 1404 1381 assert( m_isLastNALWasEos == false ); 1405 1382 //Check layer id of the nalu. if it is not 0, give a warning message and just return without doing anything. -
trunk/source/Lib/TLibDecoder/TDecTop.h
r964 r976 195 195 Bool* m_layerInitilizedFlag; // initialization Layers 196 196 static ParameterSetManagerDecoder m_parameterSetManagerDecoder; // storage for parameter sets 197 #if H_MV_HLS_8_HRD_Q0102_08198 197 Int m_targetOptLayerSetIdx; 199 #endif200 198 #else 201 199 ParameterSetManagerDecoder m_parameterSetManagerDecoder; // storage for parameter sets … … 234 232 Bool m_craNoRaslOutputFlag; //value of variable NoRaslOutputFlag of the last CRA pic 235 233 #endif 236 #if H 0056_EOS_CHECKS234 #if H_MV 237 235 Bool m_isLastNALWasEos; 238 236 #endif … … 271 269 Void deletePicBuffer(); 272 270 #if H_MV 273 #if H_MV_HLS_7_VPS_P0300_27274 271 TComVPS* getActiveVPS() { return m_parameterSetManagerDecoder.getActiveVPS( ); } 275 #endif276 272 TComSPS* getActiveSPS() { return m_parameterSetManagerDecoder.getActiveSPS( m_layerId ); } 277 273 #else … … 296 292 Void setIvPicLists ( TComPicLists* picLists) { m_ivPicLists = picLists; } 297 293 Void setLayerInitilizedFlags( Bool* val ) { m_layerInitilizedFlag = val; } 298 #if H_MV_HLS_8_HRD_Q0102_08299 294 Void setTargetOptLayerSetIdx( Int targetOptLayerSetIdx ) { m_targetOptLayerSetIdx = targetOptLayerSetIdx; } 300 #endif301 295 TComVPS* getPrefetchedVPS () { return m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); }; //Assuming that currently only one VPS is present. 302 296 Int getCurrPoc () { return m_apcSlicePilot->getPOC(); } -
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r964 r976 273 273 WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_segment_header_extension_present_flag"); 274 274 275 #if MTK_DLT_CODING_FIX_H0091275 #if H_3D 276 276 if(( !pcPPS->getSPS()->getVPS()->getDepthId( pcPPS->getSPS()->getLayerId() ) )|| 277 277 pcPPS->getLayerId() != 1 ) 278 278 { 279 #if H_MV_HLS_8_SPS_NODOC_48280 279 pcPPS->setPps3dExtensionFlag( false ); 281 #else282 pcPPS->setPpsExtensionTypeFlag( PPS_EX_T_3D, false );283 #endif284 280 } 285 281 #endif … … 290 286 WRITE_FLAG( 1, "pps_extension_present_flag" ); 291 287 292 #if H_MV_HLS_8_SPS_NODOC_48293 288 WRITE_FLAG( pcPPS->getPpsRangeExtensionsFlag( ) ? 1 : 0 , "pps_range_extensions_flag" ); 294 289 WRITE_FLAG( pcPPS->getPpsMultilayerExtensionFlag( ) ? 1 : 0 , "pps_multilayer_extension_flag" ); … … 307 302 { 308 303 WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" ); 309 #if H_MV_HLS_8_PPS_NODOC_NN310 304 WRITE_FLAG( 0, "pps_extension_reserved_zero_flag" ); 311 #endif312 305 } 313 306 … … 318 311 } 319 312 #endif 320 #else321 for ( Int i = 0; i < PPS_EX_T_MAX_NUM; i++ )322 {323 WRITE_FLAG( pcPPS->getPpsExtensionTypeFlag( i ) ? 1 : 0 , "pps_extension_type_flag" );324 #if H_3D325 assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_3D || i == PPS_EX_T_ESC );326 #else327 assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_ESC );328 #endif329 }330 331 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) )332 {333 WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" );334 }335 336 #if H_3D337 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_3D ) ) // This probably needs to be aligned with Rext and SHVC338 {339 codePPSExtension( pcPPS );340 }341 #endif342 #endif343 344 313 #endif 345 314 … … 861 830 if ( pcSPS->getSpsExtensionPresentFlag() ) 862 831 { 863 #if H_MV_HLS_8_SPS_NODOC_48864 832 WRITE_FLAG( pcSPS->getSpsRangeExtensionsFlag( ) ? 1 : 0 , "sps_range_extensions_flag" ); 865 833 WRITE_FLAG( pcSPS->getSpsMultilayerExtensionFlag( ) ? 1 : 0 , "sps_multilayer_extension_flag" ); 866 834 #if !H_3D 867 WRITE_CODE( pcSPS->getSpsExtension6bits( ), 6, "sps_extension_6bits" ); 835 WRITE_CODE( pcSPS->getSpsExtension6bits( ), 6, "sps_extension_6bits" ); 868 836 #else 869 837 WRITE_FLAG( pcSPS->getSps3dExtensionFlag( ) ? 1 : 0 , "sps_3d_extension_flag" ); 870 838 WRITE_CODE( pcSPS->getSpsExtension5bits( ), 5, "sps_extension_5bits" ); 871 839 #endif 872 }840 } 873 841 874 842 if ( pcSPS->getSpsRangeExtensionsFlag() ) … … 889 857 890 858 #endif 891 #else 892 for (Int i = 0; i < PS_EX_T_MAX_NUM; i++) 893 { 894 WRITE_FLAG( pcSPS->getSpsExtensionTypeFlag( i ) ? 1 : 0 , "sps_extension_type_flag" ); 895 #if H_3D 896 assert( !pcSPS->getSpsExtensionTypeFlag( i ) || i == PS_EX_T_MV || i == PS_EX_T_3D ); 897 #else 898 assert( !pcSPS->getSpsExtensionTypeFlag( i ) || i == PS_EX_T_MV ); 899 #endif 900 } 901 902 if( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_MV )) 903 { 904 codeSPSExtension( pcSPS ); 905 } 906 907 #if H_3D 908 if( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_3D )) 909 { 910 codeSPSExtension2( pcSPS, viewIndex, depthFlag ); 911 } 912 #endif 913 } 914 #endif 915 #endif 859 #endif 860 916 861 } 917 862 … … 955 900 { 956 901 WRITE_CODE( pcVPS->getVPSId(), 4, "vps_video_parameter_set_id" ); 957 #if H_MV _HLS_8_SYN_Q0041_03902 #if H_MV 958 903 WRITE_FLAG( pcVPS->getVpsBaseLayerInternalFlag( ) ? 1 : 0 , "vps_base_layer_internal_flag" ); 959 904 WRITE_FLAG( 1 , "vps_reserved_one_bit" ); … … 1042 987 } 1043 988 #if H_MV 1044 #if H_MV_HLS_8_RPS_Q0100_361045 989 WRITE_FLAG( pcVPS->getVpsExtensionFlag(), "vps_extension_flag" ); 1046 #else1047 WRITE_FLAG( 1, "vps_extension_flag" );1048 #endif1049 990 m_pcBitIf->writeAlignOne(); 1050 991 codeVPSExtension( pcVPS ); … … 1069 1010 #if H_MV 1070 1011 Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS ) 1071 { 1072 1073 #if !H_MV_HLS_8_SYN_Q0041_03 1074 WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0, "avc_base_layer_flag" ); 1075 #endif 1076 1012 { 1077 1013 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); 1078 1014 … … 1187 1123 } 1188 1124 1189 #if H_MV_HLS_8_SYN_39_191190 1125 if ( pcVPS->getNumIndependentLayers() > 1 ) 1191 1126 { … … 1204 1139 WRITE_CODE( pcVPS->getDefaultOutputLayerIdc( ), 2, "default_output_layer_idc" ); 1205 1140 } 1206 #else1207 WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" );1208 1209 if( pcVPS->getNumOutputLayerSets() > 1)1210 {1211 WRITE_CODE( pcVPS->getDefaultOutputLayerIdc( ), 2, "default_output_layer_idc" );1212 }1213 #endif1214 1141 1215 1142 assert( pcVPS->getOutputLayerFlag(0, 0) == pcVPS->inferOutputLayerFlag( 0, 0 )); … … 1221 1148 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1222 1149 { 1223 #if H_MV_HLS_8_SYN_39_191224 1150 if( i >= pcVPS->getNumLayerSets( ) ) 1225 #else1226 if( i > pcVPS->getVpsNumLayerSetsMinus1( ) )1227 #endif1228 1151 { 1229 1152 WRITE_UVLC( pcVPS->getLayerSetIdxForOlsMinus1( i ), "layer_set_idx_for_ols_minus1[i]" ); … … 1256 1179 } 1257 1180 1258 #if !H_MV_HLS_8_PMS_Q0195_201259 WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" );1260 if ( pcVPS->getRepFormatIdxPresentFlag() )1261 {1262 WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" );1263 }1264 #else1265 1181 WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" ); 1266 #endif1267 1182 1268 1183 for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ ) … … 1275 1190 } 1276 1191 1277 #if H_MV_HLS_8_PMS_Q0195_201278 1192 if ( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1279 1193 { 1280 1194 WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" ); 1281 1195 } 1282 #endif 1196 1283 1197 if( pcVPS->getRepFormatIdxPresentFlag() ) 1284 1198 { 1285 #if H_MV_HLS_8_SYN_Q0041_031286 1199 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1287 #else 1288 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1289 #endif 1290 { 1291 #if !H_MV_HLS_8_PMS_Q0195_20 1292 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1293 { 1294 #endif 1200 { 1295 1201 WRITE_CODE( pcVPS->getVpsRepFormatIdx(i), pcVPS->getVpsRepFormatIdxLen(), "vps_rep_format_idx[i]" ); 1296 #if !H_MV_HLS_8_PMS_Q0195_20 1297 } 1298 #endif 1299 } 1300 } 1301 #if H_MV_HLS_8_PMS_Q0195_20 1202 } 1203 } 1302 1204 else 1303 1205 { 1304 #if H_MV_HLS_8_SYN_Q0041_031305 1206 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1306 #else1307 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1308 #endif1309 1207 { 1310 1208 assert( pcVPS->getVpsRepFormatIdx( i ) == pcVPS->inferVpsRepFormatIdx( i ) ); 1311 1209 } 1312 1210 } 1313 #endif1314 1315 1211 1316 1212 WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" ); … … 1337 1233 } 1338 1234 1339 #if H_MV_HLS_8_SYN_Q0041_031340 1235 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1341 1236 { 1342 1237 for( Int j = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; j < i; j++ ) 1343 #else1344 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1345 {1346 for( Int j = 0; j < i; j++ )1347 #endif1348 1238 { 1349 1239 if (pcVPS->getDirectDependencyFlag( i, j) ) … … 1366 1256 1367 1257 1368 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" );1258 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" ); 1369 1259 if( pcVPS->getVpsVuiPresentFlag() ) 1370 1260 { … … 1397 1287 for( Int i = 1; i < vps->getNumOutputLayerSets(); i++ ) 1398 1288 { 1399 #if H_MV_HLS_8_MIS_Q0102_301400 1289 Int currLsIdx = vps->olsIdxToLsIdx( i ); 1401 #endif1402 1290 WRITE_FLAG( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ? 1 : 0 , "sub_layer_flag_info_present_flag" ); 1403 #if H_MV_HLS_8_MIS_Q0102_301404 1291 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ ) 1405 #else1406 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( i ); j++ )1407 #endif1408 1292 { 1409 1293 if( j > 0 && dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) … … 1413 1297 if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) 1414 1298 { 1415 #if H_MV_HLS_8_MIS_Q0102_301416 1299 for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ ) 1417 #else1418 for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i )); k++ )1419 #endif1420 1300 { 1421 1301 WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" ); … … 1428 1308 if ( j > 0 ) 1429 1309 { 1430 #if H_MV_HLS_8_DBP_NODOC_421431 1310 for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ ) 1432 #else1433 for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i ) ); k++ )1434 #endif1435 1311 { 1436 1312 assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); … … 1493 1369 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1494 1370 { 1495 #if H_MV_HLS_8_SYN_Q0041_031496 1371 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1497 #else 1498 for( Int i = 0; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1499 #endif 1500 { 1501 #if H_MV_HLS_8_MIS_Q0102_30 1372 { 1502 1373 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1503 #else1504 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ )1505 #endif1506 1374 { 1507 1375 if( pcVPSVUI->getBitRatePresentVpsFlag( ) ) … … 1563 1431 if( !pcVPSVUI->getTilesNotInUseFlag() ) 1564 1432 { 1565 #if H_MV_HLS_8_SYN_Q0041_031566 1433 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1567 #else1568 for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ )1569 #endif1570 1434 { 1571 1435 WRITE_FLAG( pcVPSVUI->getTilesInUseFlag( i ) ? 1 : 0 , "tiles_in_use_flag[i]" ); … … 1575 1439 } 1576 1440 } 1577 #if H_MV_HLS_8_SYN_Q0041_031578 1441 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1579 #else1580 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ )1581 #endif1582 1442 { 1583 1443 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ ) … … 1610 1470 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1611 1471 { 1612 #if H_MV_HLS_8_SYN_Q0041_031613 1472 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1614 1473 { 1615 #endif 1616 WRITE_UVLC( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ), "min_spatial_segment_offset_plus1" ); 1617 if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 ) 1618 { 1619 WRITE_FLAG( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ? 1 : 0 , "ctu_based_offset_enabled_flag" ); 1620 if( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ) 1474 WRITE_UVLC( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ), "min_spatial_segment_offset_plus1" ); 1475 if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 ) 1621 1476 { 1622 WRITE_UVLC( pcVPSVUI->getMinHorizontalCtuOffsetPlus1( i, j ), "min_horizontal_ctu_offset_plus1" ); 1477 WRITE_FLAG( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ? 1 : 0 , "ctu_based_offset_enabled_flag" ); 1478 if( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ) 1479 { 1480 WRITE_UVLC( pcVPSVUI->getMinHorizontalCtuOffsetPlus1( i, j ), "min_horizontal_ctu_offset_plus1" ); 1481 } 1623 1482 } 1624 1483 } 1625 #if H_MV_HLS_8_SYN_Q0041_031626 }1627 #endif1628 1484 } 1629 1485 } … … 1673 1529 for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ ) 1674 1530 { 1675 #if H_MV_HLS_8_HRD_Q0101_041676 1531 for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ ) 1677 1532 { 1678 1533 WRITE_FLAG( vpsVuiBspHrdP->getLayerInBspFlag( h, i, j ) ? 1 : 0 , "layer_in_bsp_flag" ); 1679 #else1680 for( Int j = 0; j <= pcVPS->getMaxLayersMinus1(); j++ )1681 {1682 if( pcVPS->getLayerIdIncludedFlag( h ,j ) )1683 {1684 WRITE_FLAG( vpsVuiBspHrdP->getLayerInBspFlag( h, i, j ) ? 1 : 0 , "layer_in_bsp_flag" );1685 }1686 else1687 {1688 vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, false ); // This inference seems to be missing in spec1689 }1690 #endif1691 1534 } 1692 1535 } … … 1696 1539 { 1697 1540 WRITE_UVLC( vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ), "num_bsp_sched_combinations_minus1" ); 1698 #if H_MV_HLS_8_HRD_Q0182_051699 1541 for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ ) 1700 #else1701 for( Int i = 0; i < vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ )1702 #endif1703 1542 { 1704 1543 for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ ) 1705 1544 { 1706 #if H_MV_HLS_8_HRD_Q0101_041707 1545 WRITE_CODE( vpsVuiBspHrdP->getBspCombHrdIdx( h, i, j ), vpsVuiBspHrdP->getBspCombHrdIdxLen(), "bsp_comb_hrd_idx" ); 1708 #else1709 WRITE_UVLC( vpsVuiBspHrdP->getBspCombHrdIdx( h, i, j ), "bsp_comb_hrd_idx" );1710 #endif1711 1546 WRITE_UVLC( vpsVuiBspHrdP->getBspCombSchedIdx( h, i, j ), "bsp_comb_sched_idx" ); 1712 1547 1713 #if H_MV_HLS_8_HRD_Q0101_041714 1548 vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j ); 1715 #endif1716 1549 } 1717 1550 } … … 1907 1740 Int picOrderCntLSB = (pcSlice->getPOC()-pcSlice->getLastIDR()+(1<<pcSlice->getSPS()->getBitsForPOC())) & ((1<<pcSlice->getSPS()->getBitsForPOC())-1); 1908 1741 WRITE_CODE( picOrderCntLSB, pcSlice->getSPS()->getBitsForPOC(), "slice_pic_order_cnt_lsb"); 1909 #if H_MV_HLS_8_POC_Q0142_321910 1742 pcSlice->setSlicePicOrderCntLsb( picOrderCntLSB ); 1911 #endif1912 1743 } 1913 1744 … … 2341 2172 } 2342 2173 2343 #if H_MV_HLS_8_POC_Q0142_322344 2174 pcSlice->checkPocResetIdc(); 2345 #endif2346 2175 2347 2176 if( pcSlice->getPocResetIdc() != 0 ) … … 2355 2184 WRITE_CODE( pcSlice->getPocLsbVal( ), pcSlice->getPocLsbValLen() , "poc_lsb_val" ); 2356 2185 } 2357 #if H_MV_HLS_8_POC_Q0142_322358 2186 pcSlice->checkPocLsbVal(); 2359 #endif2360 2187 2361 2188 if( !pcSlice->getPocMsbValRequiredFlag() /* TODO && pcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ ) … … 2363 2190 WRITE_FLAG( pcSlice->getPocMsbValPresentFlag( ) ? 1 : 0 , "poc_msb_val_present_flag" ); 2364 2191 } 2365 #if H_MV_HLS_8_POC_Q0146_152366 2192 else 2367 2193 { 2368 2194 assert( pcSlice->getPocMsbValPresentFlag() == pcSlice->inferPocMsbValPresentFlag( ) ); 2369 2195 } 2370 #endif2371 2196 2372 2197 if( pcSlice->getPocMsbValPresentFlag() ) -
trunk/source/Lib/TLibEncoder/TEncCfg.h
r964 r976 403 403 #if H_3D_IC 404 404 Bool m_bUseIC; 405 #if MTK_LOW_LATENCY_IC_ENCODING_H0086406 405 Bool m_bUseICLowLatencyEnc; 407 #endif408 406 #endif 409 407 #if H_3D_INTER_SDC … … 516 514 Void setUseIC ( Bool bVal ) { m_bUseIC = bVal; } 517 515 Bool getUseIC () { return m_bUseIC; } 518 #if MTK_LOW_LATENCY_IC_ENCODING_H0086519 516 Void setUseICLowLatencyEnc ( Bool bVal ) { m_bUseICLowLatencyEnc = bVal; } 520 517 Bool getUseICLowLatencyEnc () { return m_bUseICLowLatencyEnc; } 521 #endif522 518 #endif 523 519 #if H_3D_INTER_SDC -
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r950 r976 1815 1815 rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 1816 1816 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 1817 #if !ETRIKHU_CLEANUP_H00831818 , vspFlag1819 #endif1820 1817 , inheritedVSPDisInfo 1821 1818 #if H_3D_SPIVMP 1822 #if !ETRIKHU_CLEANUP_H0083_MISSING1823 , bSPIVMPFlag1824 #endif1825 1819 , pcMvFieldSP, puhInterDirSP 1826 1820 #endif … … 1828 1822 ); 1829 1823 1830 #if ETRIKHU_CLEANUP_H00831831 1824 rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours, vspFlag 1832 1825 #if H_3D_SPIVMP … … 1835 1828 , numValidMergeCand 1836 1829 ); 1837 #endif1838 1830 1839 1831 #else … … 2400 2392 pDBBPTmpData->auhMergeIndex[uiSegment] = rpcTempCU->getMergeIndex(0); 2401 2393 2402 #if RWTH_DBBP_NO_SPU_H00572403 2394 AOF( rpcTempCU->getSPIVMPFlag(0) == false ); 2404 2395 AOF( rpcTempCU->getVSPFlag(0) == 0 ); 2405 #else2406 pDBBPTmpData->ahVSPFlag[uiSegment] = rpcTempCU->getVSPFlag(0);2407 pDBBPTmpData->acDvInfo[uiSegment] = rpcTempCU->getDvInfo(0);2408 #endif2409 2396 2410 2397 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) … … 2437 2424 rpcTempCU->setMergeFlagSubParts(pDBBPTmpData->abMergeFlag[uiSegment], uiPartAddr, uiSegment, uhDepth); 2438 2425 rpcTempCU->setMergeIndexSubParts(pDBBPTmpData->auhMergeIndex[uiSegment], uiPartAddr, uiSegment, uhDepth); 2439 2440 #if !RWTH_DBBP_NO_SPU_H0057 2441 rpcTempCU->setVSPFlagSubParts(pDBBPTmpData->ahVSPFlag[uiSegment], uiPartAddr, uiSegment, uhDepth); 2442 rpcTempCU->setDvInfoSubParts(pDBBPTmpData->acDvInfo[uiSegment], uiPartAddr, uiSegment, uhDepth); 2443 #endif 2444 2426 2445 2427 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 2446 2428 { -
trunk/source/Lib/TLibEncoder/TEncEntropy.cpp
r950 r976 157 157 158 158 if( !pcCU->getSlice()->getApplyIC() ) 159 { 159 160 return; 160 161 if( bRD ) 162 {163 uiAbsPartIdx = 0;164 }165 #if MTK_LOW_LATENCY_IC_ENCODING_H0086 161 } 162 163 if( bRD ) 164 { 165 uiAbsPartIdx = 0; 166 } 166 167 else 167 168 { … … 172 173 } 173 174 } 174 #endif175 175 if( pcCU->isICFlagRequired( uiAbsPartIdx ) ) 176 { 176 177 m_pcEntropyCoderIf->codeICFlag( pcCU, uiAbsPartIdx ); 178 } 177 179 } 178 180 #endif … … 255 257 256 258 #if H_3D_DBBP 257 258 #if MTK_DBBP_SIGNALING_H0094259 259 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ) 260 #else261 if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getPartitionSize(uiAbsPartIdx) == RWTH_DBBP_PACK_MODE )262 #endif263 260 { 264 261 encodeDBBPFlag(pcCU, uiAbsPartIdx, bRD); … … 266 263 if( pcCU->getDBBPFlag(uiAbsPartIdx) ) 267 264 { 268 #if !MTK_DBBP_SIGNALING_H0094269 AOF( pcCU->getPartitionSize(uiAbsPartIdx) == RWTH_DBBP_PACK_MODE );270 #endif271 265 // restore virtual partition size for DBBP blocks 272 266 pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth); … … 290 284 return; 291 285 } 292 #if !MTK_SDC_FLAG_FIX_H0095293 #if H_3D_DIM_SDC294 if( pcCU->getSDCFlag(uiAbsPartIdx) )295 {296 return;297 }298 #endif299 #endif300 286 301 287 if( bRD ) -
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r964 r976 2325 2325 std::vector<Int> temp; 2326 2326 TComSlice::markCurrPic( pcPic ); 2327 #if !H_MV_HLS_8_DBP_NODOC_422328 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, temp, pcPic->getSlice(0)->getVPS(), m_layerId, pcPic->getPOC() );2329 #endif2330 2327 #endif 2331 2328 m_bFirst = false; -
trunk/source/Lib/TLibEncoder/TEncSbac.cpp
r950 r976 93 93 , m_cDdcDataSCModel ( 1, 1, NUM_DDC_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels) 94 94 , m_cAngleFlagSCModel ( 1, 1, NUM_ANGLE_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 95 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H009296 , m_cDmm1DataSCModel ( 1, 1, NUM_DMM1_DATA_CTX , m_contextModels + m_numContextModels, m_numContextModels)97 #endif98 95 #if H_3D_DIM_SDC 99 96 , m_cSDCResidualFlagSCModel ( 1, 1, SDC_NUM_RESIDUAL_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 169 166 m_cDdcDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_DATA ); 170 167 m_cAngleFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG ); 171 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092172 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );173 #endif174 168 #if H_3D_DIM_SDC 175 169 m_cSDCResidualFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); … … 255 249 curCost += m_cDdcDataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DDC_DATA ); 256 250 curCost += m_cAngleFlagSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_ANGLE_FLAG ); 257 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092258 curCost += m_cDmm1DataSCModel.calcCost ( curSliceType, qp, (UChar*)INIT_DMM1_DATA );259 #endif260 251 } 261 252 #endif … … 319 310 m_cDdcDataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DDC_DATA ); 320 311 m_cAngleFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_ANGLE_FLAG ); 321 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092322 m_cDmm1DataSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );323 #endif324 312 #if H_3D_DIM_SDC 325 313 m_cSDCResidualFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG ); … … 482 470 m_pcBinIf->encodeBin( 1, rcSCModel ); 483 471 UInt uiCount = 0; 484 #if QC_SIMP_DELTADC_CODING_H0131485 472 Bool bNoExGo = ( uiSymbol < 3 ); 486 473 487 474 while( --uiSymbol && ++uiCount < 3 ) 488 #else489 Bool bNoExGo = (uiSymbol < 13);490 491 while( --uiSymbol && ++uiCount < 13 )492 #endif493 475 { 494 476 m_pcBinIf->encodeBin( 1, rcSCModel ); … … 526 508 for ( Int i = 0; i < iNumBit; i++ ) 527 509 { 528 #if MTK_DMM_SIMP_CODE_H0092 529 m_pcBinIf->encodeBinEP( ( uiTabIdx >> i ) & 1 ); 530 #else 531 m_pcBinIf->encodeBin( ( uiTabIdx >> i ) & 1, m_cDmm1DataSCModel.get(0, 0, 0) ); 532 #endif 510 m_pcBinIf->encodeBinEP( ( uiTabIdx >> i ) & 1 ); 533 511 } 534 512 } … … 1243 1221 if( ( pcCU->getSlice()->getSPS()->getMaxCUWidth() >> pcCU->getDepth( absPartIdx ) ) < 64 ) //DMM and HEVC intra modes are both allowed 1244 1222 { 1245 #if LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H01351246 1223 m_pcBinIf->encodeBin( isDimMode( dir ) ? 0 : 1, m_cAngleFlagSCModel.get( 0, 0, 0 ) ); 1247 #else1248 m_pcBinIf->encodeBin( isDimMode( dir ) ? 0 : 1, m_cAngleFlagSCModel.get( 0, 0, pcCU->getCtxAngleFlag( absPartIdx ) ) );1249 #endif1250 1224 } 1251 1225 if( isDimMode( dir ) ) … … 2327 2301 dimDeltaDC = isDimDeltaDC( dir ); 2328 2302 } 2329 #if MTK_DELTA_DC_FLAG_ONE_CONTEXT_H0084_H0100_H01132330 2303 m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get( 0, 0, 0 ) ); 2331 #else2332 m_pcBinIf->encodeBin( dimDeltaDC, m_cDdcFlagSCModel.get( 0, 0, uiNumSegments-1 ) );2333 #endif2334 2304 } 2335 2305 else //all-zero inter SDC is not allowed … … 2373 2343 Void TEncSbac::codeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx ) 2374 2344 { 2375 #if !MTK_DBBP_SIGNALING_H00942376 PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );2377 AOF( ePartSize == RWTH_DBBP_PACK_MODE );2378 #endif2379 2345 AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) ); 2380 2346 AOF( !pcCU->getSlice()->getIsDepth() ); -
trunk/source/Lib/TLibEncoder/TEncSbac.h
r950 r976 258 258 ContextModel3DBuffer m_cDdcDataSCModel; 259 259 ContextModel3DBuffer m_cAngleFlagSCModel; 260 #if H_3D_DIM_DMM && !MTK_DMM_SIMP_CODE_H0092261 ContextModel3DBuffer m_cDmm1DataSCModel;262 #endif263 260 #if H_3D_DIM_SDC 264 261 ContextModel3DBuffer m_cSDCResidualFlagSCModel; -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r964 r976 1146 1146 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 1147 1147 { 1148 #if H_3D_DIM && !SEC_NO_RESI_DLT_H01051149 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) )1150 {1151 pResi[ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pOrg[ uiX ] ) - pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] );1152 }1153 else1154 {1155 pResi[ uiX ] = pOrg[ uiX ] - pPred[ uiX ];1156 }1157 #else1158 1148 pResi[ uiX ] = pOrg[ uiX ] - pPred[ uiX ]; 1159 #endif1160 1149 } 1161 1150 pOrg += uiStride; … … 1221 1210 for( UInt uiX = 0; uiX < uiWidth; uiX++ ) 1222 1211 { 1223 #if H_3D_DIM && !SEC_NO_RESI_DLT_H01051224 if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) )1225 {1226 pReco [ uiX ] = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getPPS()->getDLT()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) );1227 }1228 else1229 {1230 pReco [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] );1231 }1232 #else1233 1212 pReco [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] ); 1234 #endif1235 1213 pRecQt [ uiX ] = pReco[ uiX ]; 1236 1214 pRecIPred[ uiX ] = pReco[ uiX ]; … … 1989 1967 // get DC prediction for each segment 1990 1968 Pel apDCPredValues[2]; 1991 #if HS_DMM_SDC_PREDICTOR_UNIFY_H01081992 1969 if ( getDimType( uiLumaPredMode ) == DMM1_IDX || getDimType( uiLumaPredMode ) == DMM4_IDX ) 1993 1970 { … … 1996 1973 } 1997 1974 else 1998 #endif 1999 analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode ); 1975 { 1976 analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode ); 1977 } 1978 2000 1979 2001 1980 // get original DC for each segment … … 3674 3653 pcCU->setInterDirSubParts(pDBBPTmpData->auhInterDir[0], 0, 0, pcCU->getDepth(0)); // interprets depth relative to LCU level 3675 3654 3676 #if !RWTH_DBBP_NO_SPU_H00573677 pcCU->setVSPFlagSubParts(pDBBPTmpData->ahVSPFlag[0], 0, 0, pcCU->getDepth(0));3678 pcCU->setDvInfoSubParts(pDBBPTmpData->acDvInfo[0], 0, 0, pcCU->getDepth(0));3679 #endif3680 3681 3655 for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ ) 3682 3656 { … … 3707 3681 pcCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 3708 3682 #if H_3D_VSP 3709 #if !ETRIKHU_CLEANUP_H00833710 , vspFlag3711 #endif3712 3683 , inheritedVSPDisInfo 3713 3684 #endif 3714 3685 #if H_3D_SPIVMP 3715 #if !ETRIKHU_CLEANUP_H0083_MISSING3716 , pbSPIVMPFlag3717 #endif3718 3686 , pcMvFieldSP, puhInterDirSP 3719 3687 #endif … … 3721 3689 ); 3722 3690 3723 #if ETRIKHU_CLEANUP_H00833724 3691 pcCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours 3725 3692 #if H_3D_VSP … … 3731 3698 , numValidMergeCand 3732 3699 ); 3733 #endif3734 3700 #else 3735 3701 pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); … … 3745 3711 pcCU->xGetInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours 3746 3712 #if H_3D_VSP 3747 #if !ETRIKHU_CLEANUP_H00833748 , vspFlag3749 #endif3750 3713 , inheritedVSPDisInfo 3751 3714 #endif 3752 3715 #if H_3D_SPIVMP 3753 #if !ETRIKHU_CLEANUP_H0083_MISSING3754 , pbSPIVMPFlag3755 #endif3756 3716 , pcMvFieldSP, puhInterDirSP 3757 3717 #endif … … 3759 3719 ); 3760 3720 3761 #if ETRIKHU_CLEANUP_H00833762 3721 pcCU->buildMCL( cMvFieldNeighbours, uhInterDirNeighbours 3763 3722 #if H_3D_VSP … … 3769 3728 , numValidMergeCand 3770 3729 ); 3771 #endif3772 3730 #else 3773 3731 pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand -
trunk/source/Lib/TLibEncoder/TEncSlice.cpp
r964 r976 930 930 ) 931 931 { 932 #if MTK_LOW_LATENCY_IC_ENCODING_H0086933 932 pcSlice ->xSetApplyIC(pcEncTop->getUseICLowLatencyEnc()); 934 #else935 pcSlice ->xSetApplyIC();936 #endif937 933 if ( pcSlice->getApplyIC() ) 938 934 { -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r964 r976 698 698 m_cSPS.setSpsScalingListRefLayerId ( 0 ); 699 699 m_cSPS.setSpsExtensionPresentFlag ( true ); 700 #if H_MV_HLS_8_SPS_NODOC_48701 700 m_cSPS.setSpsMultilayerExtensionFlag ( true ); 702 #else703 m_cSPS.setSpsExtensionTypeFlag ( PS_EX_T_MV ,true );704 #endif705 701 #if H_3D 706 #if H_MV_HLS_8_SPS_NODOC_48707 702 m_cSPS.setSps3dExtensionFlag ( true ); 708 #else709 m_cSPS.setSpsExtensionTypeFlag ( PS_EX_T_3D ,true );710 #endif711 703 #endif 712 704 #endif … … 777 769 m_cSPS.setNumReorderPics(m_numReorderPics[i], i); 778 770 } 779 #if H_MV _HLS_8_HRD_Q0102_08771 #if H_MV 780 772 for ( Int ols = 0; ols < m_cVPS->getNumOutputLayerSets(); ols++) 781 773 { … … 788 780 } 789 781 790 #if H_MV_HLS_8_RPS_Q0100_36791 782 m_cVPS->inferDbpSizeLayerSetZero( &m_cSPS, true ); 792 #endif793 794 783 #endif 795 784 m_cSPS.setPCMBitDepthLuma (g_uiPCMBitDepthLuma); … … 853 842 m_cPPS.setPPSId( getLayerIdInVps() ); 854 843 m_cPPS.setSPSId( getLayerIdInVps() ); 855 #if H_MV_HLS_8_SPS_NODOC_48856 844 m_cPPS.setPpsMultilayerExtensionFlag ( true ); 857 845 #if H_3D 858 846 m_cPPS.setPps3dExtensionFlag ( true ); 859 #endif860 #else861 m_cPPS.setPpsExtensionTypeFlag ( PPS_EX_T_MV ,true );862 #if H_3D863 m_cPPS.setPpsExtensionTypeFlag ( PPS_EX_T_3D ,true );864 #endif865 847 #endif 866 848 #endif
Note: See TracChangeset for help on using the changeset viewer.