Changeset 976 in 3DVCSoftware for trunk/source/App
- Timestamp:
- 7 Jul 2014, 17:27:51 (11 years ago)
- Location:
- trunk/source/App
- Files:
-
- 6 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
Note: See TracChangeset for help on using the changeset viewer.