Ticket #1053: L0323.patch
File L0323.patch, 8.8 KB (added by peisongc, 11 years ago) |
---|
-
source/App/TAppEncoder/TAppEncCfg.cpp
1151 1151 for(Int i=0; i<MAX_TLAYER; i++) 1152 1152 { 1153 1153 m_numReorderPics[i] = 0; 1154 #if L0323_DPB 1155 m_maxDecPicBuffering[i] = 1; 1156 #else 1154 1157 m_maxDecPicBuffering[i] = 0; 1158 #endif 1155 1159 } 1156 1160 for(Int i=0; i<m_iGOPSize; i++) 1157 1161 { 1162 #if L0323_DPB 1163 if(m_GOPList[i].m_numRefPics+1 > m_maxDecPicBuffering[m_GOPList[i].m_temporalId]) 1164 #else 1158 1165 if(m_GOPList[i].m_numRefPics > m_maxDecPicBuffering[m_GOPList[i].m_temporalId]) 1166 #endif 1159 1167 { 1168 #if L0323_DPB 1169 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics + 1; 1170 #else 1160 1171 m_maxDecPicBuffering[m_GOPList[i].m_temporalId] = m_GOPList[i].m_numRefPics; 1172 #endif 1161 1173 } 1162 1174 Int highestDecodingNumberWithLowerPOC = 0; 1163 1175 for(Int j=0; j<m_iGOPSize; j++) … … 1188 1200 { 1189 1201 m_numReorderPics[i+1] = m_numReorderPics[i]; 1190 1202 } 1203 #if L0323_DPB 1204 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive 1205 if(m_numReorderPics[i] > m_maxDecPicBuffering[i] - 1) 1206 { 1207 m_maxDecPicBuffering[i] = m_numReorderPics[i] + 1; 1208 } 1209 #else 1191 1210 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive 1192 1211 if(m_numReorderPics[i] > m_maxDecPicBuffering[i]) 1193 1212 { 1194 1213 m_maxDecPicBuffering[i] = m_numReorderPics[i]; 1195 1214 } 1215 #endif 1196 1216 // a lower layer can not have higher value of m_uiMaxDecPicBuffering than a higher layer 1197 1217 if(m_maxDecPicBuffering[i+1] < m_maxDecPicBuffering[i]) 1198 1218 { 1199 1219 m_maxDecPicBuffering[i+1] = m_maxDecPicBuffering[i]; 1200 1220 } 1201 1221 } 1222 1223 1224 #if L0323_DPB 1225 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ] - 1, inclusive 1226 if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1] - 1) 1227 { 1228 m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1] + 1; 1229 } 1230 #else 1202 1231 // the value of num_reorder_pics[ i ] shall be in the range of 0 to max_dec_pic_buffering[ i ], inclusive 1203 1232 if(m_numReorderPics[MAX_TLAYER-1] > m_maxDecPicBuffering[MAX_TLAYER-1]) 1204 1233 { 1205 1234 m_maxDecPicBuffering[MAX_TLAYER-1] = m_numReorderPics[MAX_TLAYER-1]; 1206 1235 } 1236 #endif 1207 1237 1208 1238 if(m_vuiParametersPresentFlag && m_bitstreamRestrictionFlag) 1209 1239 { -
source/App/TAppEncoder/TAppEncCfg.h
89 89 Int m_extraRPSs; ///< extra RPSs added to handle CRA 90 90 GOPEntry m_GOPList[MAX_GOP]; ///< the coding structure entries from the config file 91 91 Int m_numReorderPics[MAX_TLAYER]; ///< total number of reorder pictures 92 #if L0323_DPB 93 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of pictures in the decoded picture buffer 94 #else 92 95 Int m_maxDecPicBuffering[MAX_TLAYER]; ///< total number of reference pictures needed for decoding 96 #endif 93 97 Bool m_bUseLComb; ///< flag for using combined reference list for uni-prediction in B-slices (JCTVC-D421) 94 98 Bool m_useTransformSkip; ///< flag for enabling intra transform skipping 95 99 Bool m_useTransformSkipFast; ///< flag for enabling fast intra transform skipping -
source/Lib/TLibCommon/TComSlice.cpp
1204 1204 for( Int i = 0; i < MAX_TLAYER; i++) 1205 1205 { 1206 1206 m_numReorderPics[i] = 0; 1207 #if L0323_DPB 1208 m_uiMaxDecPicBuffering[i] = 1; 1209 #else 1207 1210 m_uiMaxDecPicBuffering[i] = 0; 1211 #endif 1208 1212 m_uiMaxLatencyIncrease[i] = 0; 1209 1213 } 1210 1214 } … … 1264 1268 for ( Int i = 0; i < MAX_TLAYER; i++ ) 1265 1269 { 1266 1270 m_uiMaxLatencyIncrease[i] = 0; 1271 #if L0323_DPB 1272 m_uiMaxDecPicBuffering[i] = 1; 1273 #else 1267 1274 m_uiMaxDecPicBuffering[i] = 0; 1275 #endif 1268 1276 m_numReorderPics[i] = 0; 1269 1277 } 1270 1278 m_scalingList = new TComScalingList; -
source/Lib/TLibCommon/TypeDef.h
40 40 41 41 //! \ingroup TLibCommon 42 42 //! \{ 43 #define L0323_DPB 1 ///< L0323: Specification of active reference indices and decoded picture buffer 44 43 45 #define L0363_DU_BIT_RATE 1 ///< L0363: add bit_rate_du_value_minus1 to HRD parameters 44 46 #define L0328_SPLICING 1 ///< L0328: splicing support in HRD 45 47 #define L0044_DU_DPB_OUTPUT_DELAY_HRD 1 ///< L0044: Include dpb_output_delay_du_length_minus1 in hrd_parameters(), dpb_output_du_delay in -
source/Lib/TLibDecoder/TDecCAVLC.cpp
607 607 READ_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag"); 608 608 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) 609 609 { 610 #if L0323_DPB 611 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1"); 612 pcSPS->setMaxDecPicBuffering( uiCode + 1, i); 613 #else 610 614 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering"); 611 615 pcSPS->setMaxDecPicBuffering( uiCode, i); 616 #endif 612 617 READ_UVLC ( uiCode, "sps_num_reorder_pics" ); 613 618 pcSPS->setNumReorderPics(uiCode, i); 614 619 READ_UVLC ( uiCode, "sps_max_latency_increase"); … … 735 740 READ_FLAG(subLayerOrderingInfoPresentFlag, "vps_sub_layer_ordering_info_present_flag"); 736 741 for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++) 737 742 { 743 #if L0323_DPB 744 READ_UVLC( uiCode, "vps_max_dec_pic_buffering_minus1[i]" ); pcVPS->setMaxDecPicBuffering( uiCode + 1, i ); 745 #else 738 746 READ_UVLC( uiCode, "vps_max_dec_pic_buffering[i]" ); pcVPS->setMaxDecPicBuffering( uiCode, i ); 747 #endif 739 748 READ_UVLC( uiCode, "vps_num_reorder_pics[i]" ); pcVPS->setNumReorderPics( uiCode, i ); 740 749 READ_UVLC( uiCode, "vps_max_latency_increase[i]" ); pcVPS->setMaxLatencyIncrease( uiCode, i ); 741 750 -
source/Lib/TLibDecoder/TDecTop.cpp
124 124 numReorderPics[temporalLayer] = pcSlice->getSPS()->getNumReorderPics(temporalLayer); 125 125 } 126 126 127 #if L0323_DPB 128 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()); // m_uiMaxDecPicBuffering has the space for the picture currently being decoded 129 #else 127 130 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()) + 1; // +1 to have space for the picture currently being decoded 131 #endif 128 132 if (m_cListPic.size() < (UInt)m_iMaxRefPicNum) 129 133 { 130 134 rpcPic = new TComPic(); -
source/Lib/TLibEncoder/TEncCavlc.cpp
473 473 WRITE_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag"); 474 474 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) 475 475 { 476 #if L0323_DPB 477 WRITE_UVLC( pcSPS->getMaxDecPicBuffering(i) - 1, "sps_max_dec_pic_buffering_minus1[i]" ); 478 #else 476 479 WRITE_UVLC( pcSPS->getMaxDecPicBuffering(i), "sps_max_dec_pic_buffering[i]" ); 480 #endif 477 481 WRITE_UVLC( pcSPS->getNumReorderPics(i), "sps_num_reorder_pics[i]" ); 478 482 WRITE_UVLC( pcSPS->getMaxLatencyIncrease(i), "sps_max_latency_increase[i]" ); 479 483 if (!subLayerOrderingInfoPresentFlag) … … 573 577 WRITE_FLAG(subLayerOrderingInfoPresentFlag, "vps_sub_layer_ordering_info_present_flag"); 574 578 for(UInt i=0; i <= pcVPS->getMaxTLayers()-1; i++) 575 579 { 580 #if L0323_DPB 581 WRITE_UVLC( pcVPS->getMaxDecPicBuffering(i) - 1, "vps_max_dec_pic_buffering_minus1[i]" ); 582 #else 576 583 WRITE_UVLC( pcVPS->getMaxDecPicBuffering(i), "vps_max_dec_pic_buffering[i]" ); 584 #endif 577 585 WRITE_UVLC( pcVPS->getNumReorderPics(i), "vps_num_reorder_pics[i]" ); 578 586 WRITE_UVLC( pcVPS->getMaxLatencyIncrease(i), "vps_max_latency_increase[i]" ); 579 587 if (!subLayerOrderingInfoPresentFlag)