- Timestamp:
- 5 Jul 2014, 05:16:45 (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 2 deleted
- 49 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cfg/3D-HEVC/baseCfg_3view.cfg
r950 r964 191 191 ViewSynthesisPred : 0 # View synthesis prediction 192 192 DepthRefinement : 0 # Dispary refined by depth DoNBDV 193 IvMvScaling : 1 # Interview motion vector scaling 194 SubPULog2Size : 3 # Log2 of sub-PU size for IvMvPred (2...6) 195 SubPUMPILog2Size : 3 # Log2 of sub-PU size for MPI (3...6) 196 DBBP : 0 # Depth-based Block Partitioning 193 197 194 198 ### DO NOT ADD ANYTHING BELOW THIS LINE ### -
trunk/cfg/MV-HEVC/NonCTC/layerwise_startup_IBP_3view.cfg
r872 r964 11 11 LayerIdsInSet_0 : 0 # Indices in VPS of layers in layer set 0 12 12 LayerIdsInSet_1 : 0 1 # Indices in VPS of layers in layer set 1 13 LayerIdsInSet_ 3: 0 1 2 # Indices in VPS of layers in layer set 313 LayerIdsInSet_2 : 0 1 2 # Indices in VPS of layers in layer set 3 14 14 15 15 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet -
trunk/cfg/MV-HEVC/baseCfg_3view.cfg
r872 r964 31 31 LayerIdsInSet_2 : 0 2 # Indices in VPS of layers in layer set 2 32 32 LayerIdsInSet_3 : 0 1 2 # Indices in VPS of layers in layer set 3 33 LayerIdsInSet_4 : 34 LayerIdsInSet_5 : 35 LayerIdsInSet_6 : 36 33 37 34 38 DefaultTargetOutputLayerIdc : 0 # Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet … … 37 41 LayerIdsInAddOutputLayerSet_0 : 1 # Indices in VPS of output layers in additional output layer set 0 38 42 LayerIdsInAddOutputLayerSet_1 : 2 # Indices in VPS of output layers in additional output layer set 1 43 LayerIdsInAddOutputLayerSet_2 : # Indices in VPS of output layers in additional output layer set 1 44 LayerIdsInAddOutputLayerSet_3 : # Indices in VPS of output layers in additional output layer set 1 45 LayerIdsInAddOutputLayerSet_4 : # Indices in VPS of output layers in additional output layer set 1 39 46 40 47 ProfileLevelTierIdx : 0 0 0 0 0 0 # Indices to profile level tier (TBD) -
trunk/doc/Doxyfile
r872 r964 33 33 # if some version control system is used. 34 34 35 PROJECT_NUMBER = HM-1 3.035 PROJECT_NUMBER = HM-14.0 36 36 37 37 # Using the PROJECT_BRIEF tag one can provide an optional one line description -
trunk/doc/software-manual.tex
r872 r964 105 105 \and 106 106 Karsten S\"uhring 107 \email{ Karsten.Suehring@hhi.fraunhofer.de}107 \email{karsten.suehring@hhi.fraunhofer.de} 108 108 } 109 109 … … 118 118 \begin{abstract} 119 119 This document is a user manual describing usage of reference software 120 for the HEVC project. It applies to version 1 3.0120 for the HEVC project. It applies to version 14.0 121 121 of the software. 122 122 \end{abstract} … … 177 177 \end{tabular} 178 178 \end{table} 179 180 For encoding large picture sizes (like UHDTV) it is strongly advised to build 64-bit 181 binaries and to use a 64-bit OS. This will allow the software to use more than 2GB of RAM. 179 182 180 183 %%%% … … 1602 1605 \par 1603 1606 \begin{tabular}{cp{0.45\textwidth}} 1604 0 & Checkerboard \\1605 1 & Line Alternate \\1606 2 & Column Alternate \\1607 1607 3 & Side by Side \\ 1608 1608 4 & Top Bottom \\ 1609 1609 5 & Frame Alternate \\ 1610 6 & 2D Image \\1611 7 & Tile Format \\1612 1610 \end{tabular} 1613 1611 \\ … … 1763 1761 \Option{SEIToneMapCameraIsoSpeedValue} & 1764 1762 \ShortOption{\None} & 1765 \Default{4 20} &1763 \Default{400} & 1766 1764 Specifies the camera ISO speed for daylight illumination of Extended_ISO. 1765 \\ 1766 \Option{SEIToneMapExposureIndexIdc} & 1767 \ShortOption{\None} & 1768 \Default{0} & 1769 Indicates the exposure index setting of the camera. 1770 \\ 1771 \Option{SEIToneMapExposureIndexValue} & 1772 \ShortOption{\None} & 1773 \Default{400} & 1774 Specifies the exposure index setting of the cameran of Extended_ISO. 1767 1775 \\ 1768 1776 \Option{SEIToneMapExposureCompensationValueSignFlag} & -
trunk/source/App/TAppDecoder/TAppDecCfg.h
r872 r964 45 45 #include "TLibCommon/CommonDef.h" 46 46 #include <vector> 47 48 47 //! \ingroup TAppDecoder 49 48 //! \{ -
trunk/source/App/TAppDecoder/TAppDecTop.cpp
r884 r964 70 70 m_pScaleOffsetFile = 0; 71 71 #endif 72 73 #if H_MV_HLS_7_VPS_P0300_27 74 m_markedForOutput = false; 75 #endif 76 72 77 } 73 78 … … 152 157 Bool openedReconFile = false; // reconstruction file not yet opened. (must be performed after SPS is seen) 153 158 #else 154 #if H_3D 159 155 160 Int pocCurrPic = -MAX_INT; 156 161 Int pocLastPic = -MAX_INT; 157 #endif 158 162 163 #if H_MV_HLS_7_VPS_P0300_27 164 Int layerIdLastPic = -MAX_INT; 165 #endif 159 166 Int layerIdCurrPic = 0; 160 167 … … 188 195 Bool newSliceDiffPoc = false; 189 196 Bool newSliceDiffLayer = false; 190 Bool sliceSkippedFlag = false; 191 #if H_3D 197 Bool sliceSkippedFlag = false; 192 198 Bool allLayersDecoded = false; 193 #endif194 199 #endif 195 200 if (nalUnit.empty()) … … 210 215 || nalu.m_layerId > MAX_NUM_LAYER_IDS-1 211 216 || (nalu.m_nalUnitType == NAL_UNIT_VPS && nalu.m_layerId > 0) 212 || (nalu.m_nalUnitType == NAL_UNIT_EOB && nalu.m_layerId > 0) 217 || (nalu.m_nalUnitType == NAL_UNIT_EOB && nalu.m_layerId > 0) 218 #if H_MV_HLS_8_MIS_Q0177_47 219 || (nalu.m_nalUnitType == NAL_UNIT_EOS && nalu.m_layerId > 0) 220 #endif 213 221 ) 214 222 { … … 229 237 // - nalu.isSlice() == true 230 238 239 #if H_MV_HLS_7_VPS_P0300_27 240 if ( nalu.m_nalUnitType == NAL_UNIT_VPS ) 241 { 242 m_vps = m_tDecTop[decIdx]->getPrefetchedVPS(); 243 if ( m_targetDecLayerIdSetFileEmpty ) 244 { 245 TComVPS* vps = m_vps; 246 #else 231 247 // Update TargetDecLayerIdList only when not specified by layer id file, specification by file might actually out of conformance. 232 248 if (nalu.m_nalUnitType == NAL_UNIT_VPS && m_targetDecLayerIdSetFileEmpty ) 233 249 { 234 250 TComVPS* vps = m_tDecTop[decIdx]->getPrefetchedVPS(); 251 #endif 235 252 if ( m_targetOptLayerSetIdx == -1 ) 236 253 { … … 238 255 m_targetOptLayerSetIdx = vps->getVpsNumLayerSetsMinus1(); 239 256 } 257 #if H_MV_HLS_8_HRD_Q0102_08 258 for (Int dI = 0; dI < m_numDecoders; dI++ ) 259 { 260 m_tDecTop[decIdx]->setTargetOptLayerSetIdx( m_targetOptLayerSetIdx ); 261 } 262 #endif 240 263 241 264 if ( m_targetOptLayerSetIdx < 0 || m_targetOptLayerSetIdx >= vps->getNumOutputLayerSets() ) … … 246 269 m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx ); 247 270 } 248 271 #if H_MV_HLS_7_VPS_P0300_27 272 } 273 #endif 249 274 #if H_3D 250 275 if (nalu.m_nalUnitType == NAL_UNIT_VPS ) … … 257 282 { 258 283 layerIdCurrPic = nalu.m_layerId; 259 #if H_3D260 284 pocCurrPic = m_tDecTop[decIdx]->getCurrPoc(); 261 #endif262 285 decIdxCurrPic = decIdx; 263 286 firstSlice = false; … … 266 289 if ( bNewPicture || !bitstreamFile ) 267 290 { 291 #if H_MV_HLS_7_VPS_P0300_27 292 layerIdLastPic = layerIdCurrPic; 293 #endif 268 294 layerIdCurrPic = nalu.m_layerId; 269 #if H_3D270 295 pocLastPic = pocCurrPic; 271 296 pocCurrPic = m_tDecTop[decIdx]->getCurrPoc(); 272 #endif273 297 decIdxLastPic = decIdxCurrPic; 274 298 decIdxCurrPic = decIdx; 275 #if H_3D276 299 allLayersDecoded = ( pocCurrPic != pocLastPic ); 277 #endif278 300 } 279 301 #else … … 318 340 assert( decIdxLastPic != -1 ); 319 341 m_tDecTop[decIdxLastPic]->endPicDecoding(poc, pcListPic, m_targetDecLayerIdSet ); 342 #if H_MV_HLS_7_VPS_P0300_27 343 xMarkForOutput( allLayersDecoded, poc, layerIdLastPic ); 344 #endif 320 345 #else 321 346 m_cTDecTop.executeLoopFilters(poc, pcListPic); … … 324 349 loopFiltered = (nalu.m_nalUnitType == NAL_UNIT_EOS); 325 350 } 351 #if !FIX_WRITING_OUTPUT 352 #if SETTING_NO_OUT_PIC_PRIOR 353 if (bNewPicture && m_cTDecTop.getIsNoOutputPriorPics()) 354 { 355 m_cTDecTop.checkNoOutputPriorPics( pcListPic ); 356 } 357 #endif 358 #endif 326 359 #if H_3D 327 360 if ( allLayersDecoded || !bitstreamFile ) … … 351 384 m_reconOpen[decIdxLastPic] = true; 352 385 } 386 #if FIX_WRITING_OUTPUT 387 // write reconstruction to file 388 if( bNewPicture ) 389 { 390 // Bumping after picture has been decoded 391 #if ENC_DEC_TRACE 392 g_bJustDoIt = true; 393 writeToTraceFile( "Bumping after decoding \n", g_decTracePicOutput ); 394 g_bJustDoIt = false; 395 #endif 396 xWriteOutput( pcListPic, decIdxLastPic, nalu.m_temporalId ); 397 } 398 #if SETTING_NO_OUT_PIC_PRIOR 399 if ( (bNewPicture || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA) && m_tDecTop[decIdxLastPic]->getNoOutputPriorPicsFlag() ) 400 { 401 m_tDecTop[decIdxLastPic]->checkNoOutputPriorPics( pcListPic ); 402 m_tDecTop[decIdxLastPic]->setNoOutputPriorPicsFlag (false); 403 } 404 #endif 405 #endif 353 406 if ( bNewPicture && newSliceDiffPoc && 354 407 #else … … 356 409 openedReconFile = true; 357 410 } 411 #if FIX_WRITING_OUTPUT 412 // write reconstruction to file 413 if( bNewPicture ) 414 { 415 xWriteOutput( pcListPic, nalu.m_temporalId ); 416 } 417 #if SETTING_NO_OUT_PIC_PRIOR 418 if ( (bNewPicture || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_CRA) && m_cTDecTop.getNoOutputPriorPicsFlag() ) 419 { 420 m_cTDecTop.checkNoOutputPriorPics( pcListPic ); 421 m_cTDecTop.setNoOutputPriorPicsFlag (false); 422 } 423 #endif 424 #endif 358 425 if ( bNewPicture && 359 426 #endif … … 373 440 { 374 441 #if H_MV 442 #if FIX_OUTPUT_EOS 443 xWriteOutput( pcListPic, decIdxLastPic, nalu.m_temporalId ); 444 #else 375 445 xFlushOutput( pcListPic, decIdxLastPic ); 446 #endif 447 #else 448 #if FIX_OUTPUT_EOS 449 xWriteOutput( pcListPic, nalu.m_temporalId ); 376 450 #else 377 451 xFlushOutput( pcListPic ); 378 452 #endif 379 } 380 // write reconstruction to file 453 454 #endif 455 } 456 // write reconstruction to file -- for additional bumping as defined in C.5.2.3 457 #if H_MV 458 // Above comment seems to be wrong 459 #endif 460 #if FIX_WRITING_OUTPUT 461 if(!bNewPicture && nalu.m_nalUnitType >= NAL_UNIT_CODED_SLICE_TRAIL_N && nalu.m_nalUnitType <= NAL_UNIT_RESERVED_VCL31) 462 #else 381 463 if(bNewPicture) 382 { 383 #if H_MV 384 xWriteOutput( pcListPic, decIdxLastPic, nalu.m_temporalId ); 385 } 386 } 387 } 388 464 #endif 465 { 466 #if H_MV 467 // Bumping after reference picture set has been applied (here after first vcl nalu. 468 #if ENC_DEC_TRACE 469 g_bJustDoIt = true; 470 writeToTraceFile( "Bumping after reference picture set has been applied \n", g_decTracePicOutput ); 471 g_bJustDoIt = false; 472 #endif 473 474 xWriteOutput( m_tDecTop[decIdxCurrPic]->getListPic(), decIdxCurrPic, nalu.m_temporalId ); 475 #else 476 xWriteOutput( pcListPic, nalu.m_temporalId ); 477 #endif 478 } 479 } 480 } 481 #if H_MV 389 482 #if H_3D 390 483 if( m_cCamParsCollector.isInitialized() ) … … 397 490 xFlushOutput( m_tDecTop[decIdx]->getListPic(), decIdx ); 398 491 } 399 #else 400 xWriteOutput( pcListPic, nalu.m_temporalId ); 401 } 402 } 403 } 404 492 #else 405 493 xFlushOutput( pcListPic ); 406 494 // delete buffers … … 497 585 TComList<TComPic*>::iterator iterPic = pcListPic->begin(); 498 586 Int numPicsNotYetDisplayed = 0; 587 Int dpbFullness = 0; 588 #if H_MV 589 // preliminary fix 590 TComSPS* activeSPS = m_tDecTop[0]->getActiveSPS(); 591 #else 592 TComSPS* activeSPS = m_cTDecTop.getActiveSPS(); 593 #endif 594 UInt numReorderPicsHighestTid; 595 UInt maxDecPicBufferingHighestTid; 596 UInt maxNrSublayers = activeSPS->getMaxTLayers(); 597 598 if(m_iMaxTemporalLayer == -1 || m_iMaxTemporalLayer >= maxNrSublayers) 599 { 600 numReorderPicsHighestTid = activeSPS->getNumReorderPics(maxNrSublayers-1); 601 maxDecPicBufferingHighestTid = activeSPS->getMaxDecPicBuffering(maxNrSublayers-1); 602 } 603 else 604 { 605 numReorderPicsHighestTid = activeSPS->getNumReorderPics(m_iMaxTemporalLayer); 606 maxDecPicBufferingHighestTid = activeSPS->getMaxDecPicBuffering(m_iMaxTemporalLayer); 607 } 499 608 500 609 while (iterPic != pcListPic->end()) … … 508 617 { 509 618 numPicsNotYetDisplayed++; 619 dpbFullness++; 620 } 621 else if(pcPic->getSlice( 0 )->isReferenced()) 622 { 623 dpbFullness++; 510 624 } 511 625 iterPic++; … … 533 647 && pcPicBottom->getOutputMark() && (numPicsNotYetDisplayed > pcPicBottom->getNumReorderPics(tId) && (pcPicTop->getPOC() == m_pocLastDisplay[decIdx]+1 || m_pocLastDisplay[decIdx]<0))) 534 648 #else 535 if ( pcPicTop->getOutputMark() && (numPicsNotYetDisplayed > pcPicTop->getNumReorderPics(tId) && !(pcPicTop->getPOC()%2) && pcPicBottom->getPOC() == pcPicTop->getPOC()+1) 536 && pcPicBottom->getOutputMark() && (numPicsNotYetDisplayed > pcPicBottom->getNumReorderPics(tId) && (pcPicTop->getPOC() == m_iPOCLastDisplay+1 || m_iPOCLastDisplay<0))) 649 if ( pcPicTop->getOutputMark() && pcPicBottom->getOutputMark() && 650 (numPicsNotYetDisplayed > numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid) && 651 (!(pcPicTop->getPOC()%2) && pcPicBottom->getPOC() == pcPicTop->getPOC()+1) && 652 (pcPicTop->getPOC() == m_iPOCLastDisplay+1 || m_iPOCLastDisplay < 0)) 537 653 #endif 538 654 { … … 552 668 assert( conf .getScaledFlag() ); 553 669 assert( defDisp.getScaledFlag() ); 670 #if ENC_DEC_TRACE 671 g_bJustDoIt = true; 672 writeToTraceFile( "OutputPic Poc" , pcPic->getPOC (), g_decTracePicOutput ); 673 writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput ); 674 g_bJustDoIt = false; 675 #endif 554 676 m_tVideoIOYuvReconFile[decIdx]->write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), 555 677 #else … … 613 735 614 736 #if H_MV 615 if ( pcPic->getOutputMark() && (numPicsNotYetDisplayed > pcPic->getNumReorderPics(tId) && pcPic->getPOC() > m_pocLastDisplay[decIdx])) 737 if(pcPic->getOutputMark() && pcPic->getPOC() > m_pocLastDisplay[decIdx] && 738 (numPicsNotYetDisplayed > numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid)) 616 739 #else 617 if ( pcPic->getOutputMark() && (numPicsNotYetDisplayed > pcPic->getNumReorderPics(tId) && pcPic->getPOC() > m_iPOCLastDisplay)) 740 if(pcPic->getOutputMark() && pcPic->getPOC() > m_iPOCLastDisplay && 741 (numPicsNotYetDisplayed > numReorderPicsHighestTid || dpbFullness > maxDecPicBufferingHighestTid)) 618 742 #endif 619 743 { 620 744 // write to file 621 745 numPicsNotYetDisplayed--; 746 if(pcPic->getSlice(0)->isReferenced() == false) 747 { 748 dpbFullness--; 749 } 622 750 #if H_MV 623 751 if ( m_pchReconFiles[decIdx] ) … … 631 759 assert( conf .getScaledFlag() ); 632 760 assert( defDisp.getScaledFlag() ); 761 #if ENC_DEC_TRACE 762 g_bJustDoIt = true; 763 writeToTraceFile( "OutputPic Poc" , pcPic->getPOC (), g_decTracePicOutput ); 764 writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput ); 765 g_bJustDoIt = false; 766 #endif 633 767 m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(), 634 768 #else … … 665 799 } 666 800 pcPic->setOutputMark(false); 801 #if H_MV_HLS_7_VPS_P0300_27 802 pcPic->setPicOutputFlag(false); 803 #endif 667 804 } 668 805 … … 715 852 assert( conf .getScaledFlag() ); 716 853 assert( defDisp.getScaledFlag() ); 854 #if ENC_DEC_TRACE 855 g_bJustDoIt = true; 856 writeToTraceFile( "OutputPic Poc" , pcPic->getPOC (), g_decTracePicOutput ); 857 writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput ); 858 g_bJustDoIt = false; 859 #endif 717 860 m_tVideoIOYuvReconFile[decIdx]->write( pcPicTop->getPicYuvRec(), pcPicBottom->getPicYuvRec(), 718 861 #else … … 802 945 assert( conf .getScaledFlag() ); 803 946 assert( defDisp.getScaledFlag() ); 947 #if ENC_DEC_TRACE 948 g_bJustDoIt = true; 949 writeToTraceFile( "OutputPic Poc" , pcPic->getPOC (), g_decTracePicOutput ); 950 writeToTraceFile( "OutputPic LayerId", pcPic->getLayerId(), g_decTracePicOutput ); 951 g_bJustDoIt = false; 952 #endif 804 953 m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(), 805 954 #else … … 836 985 } 837 986 pcPic->setOutputMark(false); 987 #if H_MV_HLS_7_VPS_P0300_27 988 pcPic->setPicOutputFlag(false); 989 #endif 838 990 } 839 991 #if !H_MV … … 909 1061 m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists ); 910 1062 m_tDecTop[ decIdx ]->setLayerInitilizedFlags( m_layerInitilizedFlags ); 1063 #if H_MV_HLS_8_HRD_Q0102_08 1064 m_tDecTop[ decIdx ]->setTargetOptLayerSetIdx( m_targetOptLayerSetIdx ); 1065 #endif 911 1066 912 1067 #if H_3D … … 941 1096 }; 942 1097 return decIdx; 1098 943 1099 } 1100 1101 1102 #if H_MV_HLS_7_VPS_P0300_27 1103 Void TAppDecTop::xMarkForOutput( Bool allLayersDecoded, Int pocLastPic, Int layerIdLastPic ) 1104 { 1105 vector<Int> targetOptLayerIdList = m_vps->getTargetOptLayerIdList( m_targetOptLayerSetIdx ); 1106 1107 if (m_vps->getAltOutputLayerFlagVar( m_targetOptLayerSetIdx ) ) 1108 { 1109 assert( targetOptLayerIdList.size() == 1 ); 1110 Int targetLayerId = targetOptLayerIdList[0]; 1111 1112 TComPic* curPic = m_ivPicLists.getPic( layerIdLastPic, pocLastPic ); 1113 assert( curPic != NULL ); 1114 1115 if ( layerIdLastPic == targetLayerId ) 1116 { 1117 if ( curPic->getPicOutputFlag() ) 1118 { 1119 curPic->setOutputMark( true ); 1120 } 1121 else 1122 { 1123 xMarkAltOutPic( targetLayerId, pocLastPic ); 1124 } 1125 m_markedForOutput = true; 1126 } 1127 else if ( ( layerIdLastPic > targetLayerId || allLayersDecoded ) && !m_markedForOutput ) 1128 { 1129 xMarkAltOutPic( targetLayerId, pocLastPic ); 1130 } 1131 1132 if ( allLayersDecoded ) 1133 { 1134 m_markedForOutput = false; 1135 } 1136 } 1137 else 1138 { 1139 for( Int dI = 0; dI < m_numDecoders; dI++ ) 1140 { 1141 Int layerId = m_tDecTop[dI]->getLayerId(); 1142 TComPic* curPic = m_ivPicLists.getPic( layerId, pocLastPic ); 1143 if ( curPic != NULL ) 1144 { 1145 if ( curPic->getReconMark() ) 1146 { 1147 Bool isTargetOptLayer = std::find(targetOptLayerIdList.begin(), targetOptLayerIdList.end(), layerId) != targetOptLayerIdList.end(); 1148 curPic->setOutputMark( isTargetOptLayer ? curPic->getPicOutputFlag() : false ); 1149 } 1150 } 1151 } 1152 } 1153 } 1154 #endif 944 1155 #endif 945 1156 //! \} -
trunk/source/App/TAppDecoder/TAppDecTop.h
r872 r964 68 68 TComPicLists m_ivPicLists; ///< picture buffers of decoder instances 69 69 Bool m_layerInitilizedFlags[ MAX_NUM_LAYER_IDS ]; ///< for layerwise startup 70 70 #if H_MV_HLS_7_VPS_P0300_27 71 TComVPS* m_vps; ///< active VPS 72 #endif 71 73 #else 72 74 TDecTop m_cTDecTop; ///< decoder class … … 80 82 Int m_iPOCLastDisplay; ///< last POC in display order 81 83 #endif 84 #if H_MV_HLS_7_VPS_P0300_27 85 Bool m_markedForOutput; 86 #endif 87 88 82 89 #if H_3D 83 90 FILE* m_pScaleOffsetFile; … … 99 106 #if H_MV 100 107 Void xWriteOutput ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file 108 109 #if H_MV_HLS_7_VPS_P0300_27 110 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 145 101 146 Void xFlushOutput ( TComList<TComPic*>* pcListPic, Int layerId ); ///< flush all remaining decoded pictures to file 102 147 Int xGetDecoderIdx ( Int layerId, Bool createFlag = false ); -
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r950 r964 388 388 ("VpsNumLayerSets", m_vpsNumLayerSets , 1 , "Number of layer sets") 389 389 ("LayerIdsInSet_%d", m_layerIdsInSets , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 390 ("DefaultTargetOutputLayerIdc" , m_default TargetOutputLayerIdc , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet")390 ("DefaultTargetOutputLayerIdc" , m_defaultOutputLayerIdc , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet") 391 391 ("OutputLayerSetIdx", m_outputLayerSetIdx , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") 392 392 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_27 396 ("AltOutputLayerFlag", m_altOutputLayerFlag , std::vector<Bool>(1,0), "Alt output layer flag") 397 #endif 395 398 ("ProfileLevelTierIdx", m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier") 396 399 … … 453 456 ("IntraPeriod,-ip", m_iIntraPeriod, -1, "Intra period in frames, (-1: only first frame)") 454 457 #endif 458 #if ALLOW_RECOVERY_POINT_AS_RAP 459 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR 3:RecPointSEI)") 460 #else 455 461 ("DecodingRefreshType,-dr", m_iDecodingRefreshType, 0, "Intra refresh type (0:none 1:CRA 2:IDR)") 462 #endif 456 463 ("GOPSize,g", m_iGOPSize, 1, "GOP size of temporal structure") 457 464 // motion options … … 470 477 ("LambdaModifier5,-LM5", m_adLambdaModifier[ 5 ], ( Double )1.0, "Lambda modifier for temporal layer 5") 471 478 ("LambdaModifier6,-LM6", m_adLambdaModifier[ 6 ], ( Double )1.0, "Lambda modifier for temporal layer 6") 472 ("LambdaModifier7,-LM7", m_adLambdaModifier[ 7 ], ( Double )1.0, "Lambda modifier for temporal layer 7")473 479 474 480 /* Quantization parameters */ … … 694 700 ("SEIToneMapCameraIsoSpeedIdc", m_cameraIsoSpeedIdc, 0, "Indicates the camera ISO speed for daylight illumination") 695 701 ("SEIToneMapCameraIsoSpeedValue", m_cameraIsoSpeedValue, 400, "Specifies the camera ISO speed for daylight illumination of Extended_ISO") 702 ("SEIToneMapExposureIndexIdc", m_exposureIndexIdc, 0, "Indicates the exposure index setting of the camera") 703 ("SEIToneMapExposureIndexValue", m_exposureIndexValue, 400, "Specifies the exposure index setting of the cameran of Extended_ISO") 696 704 ("SEIToneMapExposureCompensationValueSignFlag", m_exposureCompensationValueSignFlag, 0, "Specifies the sign of ExposureCompensationValue") 697 705 ("SEIToneMapExposureCompensationValueNumerator", m_exposureCompensationValueNumerator, 0, "Specifies the numerator of ExposureCompensationValue") … … 724 732 ("SEISOPDescription", m_SOPDescriptionSEIEnabled, 0, "Control generation of SOP description SEI messages") 725 733 ("SEIScalableNesting", m_scalableNestingSEIEnabled, 0, "Control generation of scalable nesting SEI messages") 734 #if H_MV 726 735 ("SubBitstreamPropSEIEnabled", m_subBistreamPropSEIEnabled, false ,"Enable signaling of sub-bitstream property SEI message") 727 736 ("SEISubBitstreamNumAdditionalSubStreams", m_sbPropNumAdditionalSubStreams,0, "Number of substreams for which additional information is signalled") … … 731 740 ("SEISubBitstreamAvgBitRate", m_sbPropAvgBitRate, std::vector< Int >(1,0) ,"Specifies average bit rate of the i-th sub-bitstream") 732 741 ("SEISubBitstreamMaxBitRate", m_sbPropMaxBitRate, std::vector< Int >(1,0) ,"Specifies maximum bit rate of the i-th sub-bitstream") 742 #endif 733 743 #if H_3D 734 744 ("CameraParameterFile,cpf", m_pchCameraParameterFile, (Char *) 0, "Camera Parameter File Name") … … 1047 1057 xResizeVector( m_loopFilterNotAcrossTilesFlag ); 1048 1058 xResizeVector( m_wppInUseFlag ); 1059 1060 #if H_MV_HLS_7_VPS_P0300_27 1061 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + (Int) m_outputLayerSetIdx.size(); olsIdx++) 1062 { 1063 m_altOutputLayerFlag.push_back( false ); 1064 } 1065 #endif 1049 1066 #else 1050 1067 m_aidQP = new Int[ m_framesToBeEncoded + m_iGOPSize + 1 ]; … … 1417 1434 } 1418 1435 1419 xConfirmPara( m_default TargetOutputLayerIdc < 0 || m_defaultTargetOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." );1420 1421 if( m_default TargetOutputLayerIdc != 2 )1436 xConfirmPara( m_defaultOutputLayerIdc < 0 || m_defaultOutputLayerIdc > 2, "Default target output layer idc must greater than or equal to 0 and less than or equal to 2." ); 1437 1438 if( m_defaultOutputLayerIdc != 2 ) 1422 1439 { 1423 1440 Bool anyDefaultOutputFlag = false; … … 1448 1465 } 1449 1466 1467 #if H_MV_HLS_7_VPS_P0300_27 1468 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 #endif 1450 1470 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" ); 1451 1471 … … 1472 1492 xConfirmPara( (m_iIntraPeriod > 0 && m_iIntraPeriod < m_iGOPSize) || m_iIntraPeriod == 0, "Intra period must be more than GOP size, or -1 , not 0" ); 1473 1493 #endif 1494 #if ALLOW_RECOVERY_POINT_AS_RAP 1495 xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 3, "Decoding Refresh Type must be comprised between 0 and 3 included" ); 1496 if(m_iDecodingRefreshType == 3) 1497 { 1498 xConfirmPara( !m_recoveryPointSEIEnabled, "When using RecoveryPointSEI messages as RA points, recoveryPointSEI must be enabled" ); 1499 } 1500 #else 1474 1501 xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 2, "Decoding Refresh Type must be equal to 0, 1 or 2" ); 1502 #endif 1475 1503 #if H_MV 1476 1504 for( Int layer = 0; layer < m_numberOfLayers; layer++ ) … … 1591 1619 xConfirmPara( m_pchCameraParameterFile == 0 , "CameraParameterFile must be given"); 1592 1620 xConfirmPara( m_pchBaseViewCameraNumbers == 0 , "BaseViewCameraNumbers must be given" ); 1621 #if BUG_FIX_TK65 1622 xConfirmPara( ( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size() ) && ( m_numberOfLayers != m_cCameraData.getBaseViewNumbers().size() ), "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" ); 1623 #else 1593 1624 xConfirmPara( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size(), "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" ); 1625 #endif 1594 1626 xConfirmPara ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5, "CodedCamParsPrecision must be in range of 0..5" ); 1595 1627 #if H_3D_VSO … … 2178 2210 xConfirmPara( m_toneMapModelId < 0 || m_toneMapModelId > 4 , "SEIToneMapModelId must be in rage 0 to 4"); 2179 2211 xConfirmPara( m_cameraIsoSpeedValue == 0, "SEIToneMapCameraIsoSpeedValue shall not be equal to 0"); 2212 xConfirmPara( m_exposureIndexValue == 0, "SEIToneMapExposureIndexValue shall not be equal to 0"); 2180 2213 xConfirmPara( m_extendedRangeWhiteLevel < 100, "SEIToneMapExtendedRangeWhiteLevel should be greater than or equal to 100"); 2181 2214 xConfirmPara( m_nominalBlackLevelLumaCodeValue >= m_nominalWhiteLevelLumaCodeValue, "SEIToneMapNominalWhiteLevelLumaCodeValue shall be greater than SEIToneMapNominalBlackLevelLumaCodeValue"); -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r950 r964 89 89 Int m_vpsNumLayerSets; ///< Number of layer sets 90 90 std::vector< std::vector<Int> > m_layerIdsInSets; ///< LayerIds in vps of layer set 91 Int m_default TargetOutputLayerIdc; ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet91 Int m_defaultOutputLayerIdc; ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet 92 92 std::vector<Int> m_outputLayerSetIdx; ///< Indices of layer sets used as additional output layer sets 93 93 std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers 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 96 #if H_MV_HLS_7_VPS_P0300_27 97 std::vector<Bool> m_altOutputLayerFlag; ///< Alt output layer flag 98 #endif 99 97 100 // Dependencies 98 101 std::vector< std::vector<Int> > m_directRefLayers; ///< LayerIds of direct reference layers … … 338 341 Int m_cameraIsoSpeedIdc; 339 342 Int m_cameraIsoSpeedValue; 343 Int m_exposureIndexIdc; 344 Int m_exposureIndexValue; 340 345 Int m_exposureCompensationValueSignFlag; 341 346 Int m_exposureCompensationValueNumerator; -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r950 r964 57 57 TAppEncTop::TAppEncTop() 58 58 { 59 60 #if H_MV_HLS_8 61 m_vps = new TComVPS; 62 #endif 59 63 #if !H_MV 60 64 m_iFrameRcvd = 0; … … 66 70 TAppEncTop::~TAppEncTop() 67 71 { 72 #if H_MV_HLS_8 73 if (m_vps) 74 { 75 delete m_vps; 76 }; 77 #endif 78 68 79 } 69 80 … … 71 82 { 72 83 #if H_MV 84 #if H_MV_HLS_8 85 TComVPS& vps = (*m_vps); 86 #else 73 87 TComVPS& vps = m_vps; 88 #endif 74 89 #else 75 90 TComVPS vps; … … 409 424 m_cTEncTop.setTMISEICameraIsoSpeedIdc ( m_cameraIsoSpeedIdc ); 410 425 m_cTEncTop.setTMISEICameraIsoSpeedValue ( m_cameraIsoSpeedValue ); 426 m_cTEncTop.setTMISEIExposureIndexIdc ( m_exposureIndexIdc ); 427 m_cTEncTop.setTMISEIExposureIndexValue ( m_exposureIndexValue ); 411 428 m_cTEncTop.setTMISEIExposureCompensationValueSignFlag ( m_exposureCompensationValueSignFlag ); 412 429 m_cTEncTop.setTMISEIExposureCompensationValueNumerator ( m_exposureCompensationValueNumerator ); … … 691 708 { 692 709 #if H_3D 710 #if H_MV_HLS_8 711 for ( Int viewIndex = 0; viewIndex < m_vps->getNumViews(); viewIndex++ ) 712 { 713 m_vps->initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(), 714 m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() ); 715 #else 693 716 for ( Int viewIndex = 0; viewIndex < m_vps.getNumViews(); viewIndex++ ) 694 717 { 695 718 m_vps.initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(), 696 719 m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() ); 720 #endif 697 721 } 698 722 #endif … … 1275 1299 1276 1300 Int defaultDirectDependencyType = -1; 1301 #if MV_FIX_DEP_TYPES 1302 Bool defaultDirectDependencyFlag = false; 1303 #else 1277 1304 Bool defaultDirectDependencyFlag = true; 1305 #endif 1306 1278 1307 for( Int depLayer = 1; depLayer < m_numberOfLayers; depLayer++ ) 1279 1308 { … … 1293 1322 { 1294 1323 defaultDirectDependencyType = curDirectDependencyType; 1324 #if MV_FIX_DEP_TYPES 1325 defaultDirectDependencyFlag = true; 1326 #endif 1295 1327 } 1296 1328 … … 1482 1514 Void TAppEncTop::xSetRepFormat( TComVPS& vps ) 1483 1515 { 1516 #if H_MV_HLS_8_PMS_Q0195_20 1517 vps.setRepFormatIdxPresentFlag( false ); 1518 #else 1484 1519 vps.setRepFormatIdxPresentFlag( true ); 1520 #endif 1485 1521 vps.setVpsNumRepFormatsMinus1 ( 0 ); 1486 1522 … … 1499 1535 vps.setRepFormat( 0 , repFormat ); 1500 1536 1537 #if !H_MV_HLS_8_PMS_Q0195_20 1501 1538 for(Int i = 0; i <= vps.getMaxLayersMinus1(); i++ ) 1502 1539 { 1503 1540 vps.setVpsRepFormatIdx( i , 0 ); 1504 1541 } 1542 #endif 1505 1543 } 1506 1544 … … 1513 1551 assert ( dpbSize != 0 ); 1514 1552 1553 #if H_MV_HLS_8_HRD_Q0102_08 1554 for( Int i = 0; i < vps.getNumOutputLayerSets(); i++ ) 1555 #else 1515 1556 for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ ) 1557 #endif 1516 1558 { 1559 #if H_MV_HLS_8_MIS_Q0102_30 1560 Int currLsIdx = vps.olsIdxToLsIdx( i ); 1561 #endif 1517 1562 std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i ); 1518 1563 Bool subLayerFlagInfoPresentFlag = false; 1519 1564 1565 #if H_MV_HLS_8_MIS_Q0102_30 1566 for( Int j = 0; j <= vps.getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ ) 1567 #else 1520 1568 for( Int j = 0; j <= vps.getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1569 #endif 1521 1570 { 1522 1571 Bool subLayerDpbInfoPresentFlag = false; 1523 assert( vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i ) ) == targetDecLayerIdList.size() ); 1524 for( Int k = 0; k < vps.getNumSubDpbs( vps.getLayerSetIdxForOutputLayerSet( i )); k++ ) 1572 #if H_MV_HLS_8_MIS_Q0102_30 || H_MV_HLS_8_DBP_NODOC_42 1573 assert( vps.getNumLayersInIdList( currLsIdx ) == targetDecLayerIdList.size() ); 1574 for( Int k = 0; k < vps.getNumLayersInIdList( currLsIdx ); k++ ) 1575 #else 1576 assert( vps.getNumSubDpbs( vps.olsIdxToLsIdx( i ) ) == targetDecLayerIdList.size() ); 1577 for( Int k = 0; k < vps.getNumSubDpbs( vps.olsIdxToLsIdx( i )); k++ ) 1578 #endif 1525 1579 { 1526 1580 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] ); … … 1587 1641 Int numAddOuputLayerSets = (Int) m_outputLayerSetIdx.size(); 1588 1642 // Additional output layer sets + profileLevelTierIdx 1589 vps.setDefaultTargetOutputLayerIdc ( m_defaultTargetOutputLayerIdc ); 1590 vps.setNumAddOutputLayerSets ( numAddOuputLayerSets ); 1643 vps.setDefaultOutputLayerIdc ( m_defaultOutputLayerIdc ); 1644 #if H_MV_HLS_8_SYN_39_19 1645 vps.setNumAddLayerSets ( 0 ); 1646 vps.setNumAddOlss ( numAddOuputLayerSets ); 1647 #else 1648 vps.setNumAddLayerSets ( numAddOuputLayerSets ); 1649 #endif 1591 1650 vps.initTargetLayerIdLists(); 1592 1651 … … 1595 1654 Int addOutLsIdx = olsIdx - m_vpsNumLayerSets; 1596 1655 1597 vps.set OutputLayerSetIdxMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ? olsIdx : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 );1598 1599 std::vector<Int>& layerIdList = m_layerIdsInSets[ vps. getLayerSetIdxForOutputLayerSet( olsIdx ) ];1600 1601 if (vps.getDefault TargetOutputLayerIdc() == 2 || addOutLsIdx >= 0 )1656 vps.setLayerSetIdxForOlsMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ? olsIdx : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 ); 1657 1658 std::vector<Int>& layerIdList = m_layerIdsInSets[ vps.olsIdxToLsIdx( olsIdx ) ]; 1659 1660 if (vps.getDefaultOutputLayerIdc() == 2 || addOutLsIdx >= 0 ) 1602 1661 { 1603 1662 for ( Int i = 0; i < layerIdList.size(); i++) … … 1637 1696 vps.setProfileLevelTierIdx( olsIdx, m_profileLevelTierIdx[ olsIdx ] ); 1638 1697 } 1639 1698 #if H_MV_HLS_7_VPS_P0300_27 1699 if ( vps.getNumOutputLayersInOutputLayerSet( olsIdx ) == 1 && 1700 vps.getNumDirectRefLayers( vps.getOlsHighestOutputLayerId( olsIdx ) ) ) 1701 { 1702 vps.setAltOutputLayerFlag( olsIdx , m_altOutputLayerFlag[ olsIdx ]); 1703 } 1704 else 1705 { 1706 vps.setAltOutputLayerFlag( olsIdx , false ); 1707 if ( m_altOutputLayerFlag[ olsIdx ] ) 1708 { 1709 printf( "\nWarning: Ignoring AltOutputLayerFlag for output layer set %d, since more than one output layer or no dependent layers.\n", olsIdx ); 1710 } 1711 } 1712 #else 1640 1713 vps.setAltOutputLayerFlag( olsIdx , false); 1641 } 1642 1714 #endif 1715 } 1643 1716 } 1644 1717 -
trunk/source/App/TAppEncoder/TAppEncTop.h
r872 r964 75 75 76 76 TComPicLists m_ivPicLists; ///< picture buffers of encoder instances 77 #if H_MV_HLS_8 78 TComVPS* m_vps; ///< vps 79 #else 77 80 TComVPS m_vps; ///< vps 81 #endif 78 82 #else 79 83 TEncTop m_cTEncTop; ///< encoder class -
trunk/source/Lib/TLibCommon/CommonDef.h
r951 r964 60 60 61 61 #if H_MV 62 #define NV_VERSION "11. 0" ///< Current software version63 #define HM_VERSION "1 3.0" ///<62 #define NV_VERSION "11.1" ///< Current software version 63 #define HM_VERSION "14.0" ///< 64 64 #else 65 #define NV_VERSION "1 3.0" ///< Current software version65 #define NV_VERSION "14.0" ///< Current software version 66 66 #endif 67 67 … … 215 215 216 216 // Explicit temporal layer QP offset 217 #define MAX_TLAYER 8///< max number of temporal layer217 #define MAX_TLAYER 7 ///< max number of temporal layer 218 218 #define HB_LAMBDA_FOR_LDC 1 ///< use of B-style lambda for non-key pictures in low-delay mode 219 219 -
trunk/source/Lib/TLibCommon/SEI.h
r884 r964 128 128 SEIActiveParameterSets() 129 129 : activeVPSId (0) 130 , m_ fullRandomAccessFlag (false)131 , m_noParam SetUpdateFlag (false)130 , m_selfContainedCvsFlag (false) 131 , m_noParameterSetUpdateFlag (false) 132 132 , numSpsIdsMinus1 (0) 133 133 {} … … 135 135 136 136 Int activeVPSId; 137 Bool m_ fullRandomAccessFlag;138 Bool m_noParam SetUpdateFlag;137 Bool m_selfContainedCvsFlag; 138 Bool m_noParameterSetUpdateFlag; 139 139 Int numSpsIdsMinus1; 140 std::vector<Int> activeSeqParam SetId;140 std::vector<Int> activeSeqParameterSetId; 141 141 }; 142 142 … … 356 356 Int m_cameraIsoSpeedIdc; 357 357 Int m_cameraIsoSpeedValue; 358 Int m_exposureIndexIdc; 359 Int m_exposureIndexValue; 358 360 Int m_exposureCompensationValueSignFlag; 359 361 Int m_exposureCompensationValueNumerator; -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r950 r964 2883 2883 } 2884 2884 2885 UChar TComDataCU::getNumPart Inter()2885 UChar TComDataCU::getNumPartitions() 2886 2886 { 2887 2887 UChar iNumPart = 0; … … 6830 6830 #else 6831 6831 picDepth = getSlice()->getIvPic( true, iTargetViewIdx ); 6832 #if !BUG_FIX_TK65 6832 6833 assert(picDepth != NULL); 6834 #endif 6833 6835 #endif 6834 6836 if (picDepth && bDepthRefine) … … 6901 6903 #else 6902 6904 TComPic* picDepth = getSlice()->getIvPic( true, pDInfo->m_aVIdxCan ); 6905 #if !BUG_FIX_TK65 6903 6906 assert(picDepth!=NULL); 6907 #endif 6904 6908 #endif 6905 6909 … … 6960 6964 #else 6961 6965 picDepth = getSlice()->getIvPic( true, viewIndex ); 6966 #if !BUG_FIX_TK65 6962 6967 assert(picDepth!=NULL); 6968 #endif 6963 6969 #endif 6964 6970 if (picDepth && bDepthRefine) … … 7060 7066 #else 7061 7067 picDepth = getSlice()->getIvPic (true, refViewIdx ); 7068 #if !BUG_FIX_TK65 7062 7069 assert(picDepth != NULL); 7070 #endif 7063 7071 #endif 7064 7072 UInt uiPartIdx = 0; //Notes from MTK: Please confirm that using 0 as partition index and partition address is correct for CU-level DoNBDV -
trunk/source/Lib/TLibCommon/TComDataCU.h
r950 r964 559 559 Void getPartIndexAndSize ( UInt uiPartIdx, UInt& ruiPartAddr, Int& riWidth, Int& riHeight ); 560 560 #endif 561 UChar getNumPartInter();561 UChar getNumPartitions (); 562 562 Bool isFirstAbsZorderIdxInDepth (UInt uiAbsPartIdx, UInt uiDepth); 563 563 -
trunk/source/Lib/TLibCommon/TComPic.cpp
r872 r964 55 55 , m_bReconstructed (false) 56 56 , m_bNeededForOutput (false) 57 #if H_MV_HLS_7_VPS_P0300_27 58 , m_bPicOutputFlag (false) 59 #endif 57 60 , m_uiCurrSliceIdx (0) 58 61 , m_bCheckLTMSB (false) -
trunk/source/Lib/TLibCommon/TComPic.h
r872 r964 69 69 Bool m_bReconstructed; 70 70 Bool m_bNeededForOutput; 71 #if H_MV_HLS_7_VPS_P0300_27 72 Bool m_bPicOutputFlag; // Semantics variable 73 #endif 71 74 UInt m_uiCurrSliceIdx; // Index of current slice 72 75 Bool m_bCheckLTMSB; … … 175 178 Void setOutputMark (Bool b) { m_bNeededForOutput = b; } 176 179 Bool getOutputMark () { return m_bNeededForOutput; } 177 180 #if H_MV_HLS_7_VPS_P0300_27 181 Void setPicOutputFlag(Bool b) { m_bPicOutputFlag = b; } 182 Bool getPicOutputFlag() { return m_bPicOutputFlag ; } 183 #endif 184 178 185 Void setNumReorderPics(Int i, UInt tlayer) { m_numReorderPics[tlayer] = i; } 179 186 Int getNumReorderPics(UInt tlayer) { return m_numReorderPics[tlayer]; } -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r950 r964 1130 1130 } 1131 1131 1132 for ( iPartIdx = 0; iPartIdx < pcCU->getNumPart Inter(); iPartIdx++ )1132 for ( iPartIdx = 0; iPartIdx < pcCU->getNumPartitions(); iPartIdx++ ) 1133 1133 { 1134 1134 pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iWidth, iHeight ); -
trunk/source/Lib/TLibCommon/TComRom.cpp
r950 r964 381 381 Bool g_decTraceDispDer = false; 382 382 Bool g_decTraceMvFromMerge = false; 383 Bool g_decTracePicOutput = false; 383 384 Bool g_stopAtPos = false; 384 385 Bool g_outputPos = false; -
trunk/source/Lib/TLibCommon/TComRom.h
r950 r964 225 225 extern UInt64 g_stopAtCounter; // Counter to set breakpoint. 226 226 extern Bool g_traceCopyBack; // Output samples on copy back 227 extern Bool g_decTraceDispDer; // Trace derived disparity vectors (decoder only)227 extern Bool g_decTraceDispDer; // Trace derived disparity vectors (decoder only) 228 228 extern Bool g_decTraceMvFromMerge; // Trace motion vectors obtained from merge (decoder only) 229 extern Bool g_decTracePicOutput; // Trace output of pictures 229 230 extern Bool g_stopAtPos; // Stop at position 230 231 extern Bool g_outputPos; // Output position … … 236 237 #define DTRACE_PU_S(x) writeToTraceFile( x, g_tracePU ); 237 238 #define DTRACE_TU_S(x) writeToTraceFile( x, g_traceTU ); 238 239 239 240 240 Void writeToTraceFile( const Char* symbolName, Int val, Bool doIt ); -
trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.cpp
r872 r964 110 110 m_offsetClipTable[compIdx] = NULL; 111 111 } 112 #if !SAO_SGN_FUNC 112 113 m_signTable = NULL; 113 114 #endif 114 115 115 116 m_lineBufWidth = 0; … … 155 156 } 156 157 158 #if !SAO_SGN_FUNC 157 159 //look-up table for clipping 160 Int overallMaxSampleValue=0; 161 #endif 158 162 for(Int compIdx =0; compIdx < NUM_SAO_COMPONENTS; compIdx++) 159 163 { … … 161 165 Int maxSampleValue = (1<< bitDepthSample); //exclusive 162 166 Int maxOffsetValue = (g_saoMaxOffsetQVal[compIdx] << m_offsetStepLog2[compIdx]); 167 #if !SAO_SGN_FUNC 168 if (maxSampleValue>overallMaxSampleValue) overallMaxSampleValue=maxSampleValue; 169 #endif 163 170 164 171 m_offsetClipTable[compIdx] = new Int[(maxSampleValue + maxOffsetValue -1)+ (maxOffsetValue)+1 ]; //positive & negative range plus 0 … … 176 183 *(offsetClipPtr -k -1 ) = 0; 177 184 } 178 if(compIdx == SAO_Y) //g_bitDepthY is always larger than or equal to g_bitDepthC 179 { 180 m_signTable = new Short[ 2*(maxSampleValue-1) + 1 ]; 181 m_sign = &(m_signTable[maxSampleValue-1]); 185 } 186 187 #if !SAO_SGN_FUNC 188 m_signTable = new Short[ 2*(overallMaxSampleValue-1) + 1 ]; 189 m_sign = &(m_signTable[overallMaxSampleValue-1]); 182 190 183 191 m_sign[0] = 0; 184 for(Int k=1; k< maxSampleValue; k++)192 for(Int k=1; k< overallMaxSampleValue; k++) 185 193 { 186 194 m_sign[k] = 1; 187 195 m_sign[-k]= -1; 188 196 } 189 } 190 } 191 197 #endif 192 198 } 193 199 … … 208 214 } 209 215 } 216 #if !SAO_SGN_FUNC 210 217 if( m_signTable ) 211 218 { 212 219 delete[] m_signTable; m_signTable = NULL; 213 220 } 221 #endif 214 222 } 215 223 … … 388 396 for (y=0; y< height; y++) 389 397 { 398 #if SAO_SGN_FUNC 399 signLeft = (Char)sgn(srcLine[startX] - srcLine[startX-1]); 400 #else 390 401 signLeft = (Char)m_sign[srcLine[startX] - srcLine[startX-1]]; 402 #endif 391 403 for (x=startX; x< endX; x++) 392 404 { 405 #if SAO_SGN_FUNC 406 signRight = (Char)sgn(srcLine[x] - srcLine[x+1]); 407 #else 393 408 signRight = (Char)m_sign[srcLine[x] - srcLine[x+1]]; 409 #endif 394 410 edgeType = signRight + signLeft; 395 411 signLeft = -signRight; … … 419 435 for (x=0; x< width; x++) 420 436 { 437 #if SAO_SGN_FUNC 438 signUpLine[x] = (Char)sgn(srcLine[x] - srcLineAbove[x]); 439 #else 421 440 signUpLine[x] = (Char)m_sign[srcLine[x] - srcLineAbove[x]]; 441 #endif 422 442 } 423 443 … … 429 449 for (x=0; x< width; x++) 430 450 { 451 #if SAO_SGN_FUNC 452 signDown = (Char)sgn(srcLine[x] - srcLineBelow[x]); 453 #else 431 454 signDown = (Char)m_sign[srcLine[x] - srcLineBelow[x]]; 455 #endif 432 456 edgeType = signDown + signUpLine[x]; 433 457 signUpLine[x]= -signDown; … … 456 480 for (x=startX; x< endX+1; x++) 457 481 { 482 #if SAO_SGN_FUNC 483 signUpLine[x] = (Char)sgn(srcLineBelow[x] - srcLine[x- 1]); 484 #else 458 485 signUpLine[x] = (Char)m_sign[srcLineBelow[x] - srcLine[x- 1]]; 486 #endif 459 487 } 460 488 … … 465 493 for(x= firstLineStartX; x< firstLineEndX; x++) 466 494 { 495 #if SAO_SGN_FUNC 496 edgeType = sgn(srcLine[x] - srcLineAbove[x- 1]) - signUpLine[x+1]; 497 #else 467 498 edgeType = m_sign[srcLine[x] - srcLineAbove[x- 1]] - signUpLine[x+1]; 499 #endif 468 500 resLine[x] = offsetClip[srcLine[x] + offset[edgeType]]; 469 501 } … … 479 511 for (x=startX; x<endX; x++) 480 512 { 513 #if SAO_SGN_FUNC 514 signDown = (Char)sgn(srcLine[x] - srcLineBelow[x+ 1]); 515 #else 481 516 signDown = (Char)m_sign[srcLine[x] - srcLineBelow[x+ 1]] ; 517 #endif 482 518 edgeType = signDown + signUpLine[x]; 483 519 resLine[x] = offsetClip[srcLine[x] + offset[edgeType]]; … … 485 521 signDownLine[x+1] = -signDown; 486 522 } 523 #if SAO_SGN_FUNC 524 signDownLine[startX] = (Char)sgn(srcLineBelow[startX] - srcLine[startX-1]); 525 #else 487 526 signDownLine[startX] = (Char)m_sign[srcLineBelow[startX] - srcLine[startX-1]]; 527 #endif 488 528 489 529 signTmpLine = signUpLine; … … 501 541 for(x= lastLineStartX; x< lastLineEndX; x++) 502 542 { 543 #if SAO_SGN_FUNC 544 edgeType = sgn(srcLine[x] - srcLineBelow[x+ 1]) + signUpLine[x]; 545 #else 503 546 edgeType = m_sign[srcLine[x] - srcLineBelow[x+ 1]] + signUpLine[x]; 547 #endif 504 548 resLine[x] = offsetClip[srcLine[x] + offset[edgeType]]; 505 549 … … 519 563 for (x=startX-1; x< endX; x++) 520 564 { 565 #if SAO_SGN_FUNC 566 signUpLine[x] = (Char)sgn(srcLineBelow[x] - srcLine[x+1]); 567 #else 521 568 signUpLine[x] = (Char)m_sign[srcLineBelow[x] - srcLine[x+1]]; 569 #endif 522 570 } 523 571 … … 529 577 for(x= firstLineStartX; x< firstLineEndX; x++) 530 578 { 579 #if SAO_SGN_FUNC 580 edgeType = sgn(srcLine[x] - srcLineAbove[x+1]) -signUpLine[x-1]; 581 #else 531 582 edgeType = m_sign[srcLine[x] - srcLineAbove[x+1]] -signUpLine[x-1]; 583 #endif 532 584 resLine[x] = offsetClip[srcLine[x] + offset[edgeType]]; 533 585 } … … 542 594 for(x= startX; x< endX; x++) 543 595 { 596 #if SAO_SGN_FUNC 597 signDown = (Char)sgn(srcLine[x] - srcLineBelow[x-1]); 598 #else 544 599 signDown = (Char)m_sign[srcLine[x] - srcLineBelow[x-1]] ; 600 #endif 545 601 edgeType = signDown + signUpLine[x]; 546 602 resLine[x] = offsetClip[srcLine[x] + offset[edgeType]]; 547 603 signUpLine[x-1] = -signDown; 548 604 } 605 #if SAO_SGN_FUNC 606 signUpLine[endX-1] = (Char)sgn(srcLineBelow[endX-1] - srcLine[endX]); 607 #else 549 608 signUpLine[endX-1] = (Char)m_sign[srcLineBelow[endX-1] - srcLine[endX]]; 609 #endif 550 610 srcLine += srcStride; 551 611 resLine += resStride; … … 558 618 for(x= lastLineStartX; x< lastLineEndX; x++) 559 619 { 620 #if SAO_SGN_FUNC 621 edgeType = sgn(srcLine[x] - srcLineBelow[x-1]) + signUpLine[x]; 622 #else 560 623 edgeType = m_sign[srcLine[x] - srcLineBelow[x-1]] + signUpLine[x]; 624 #endif 561 625 resLine[x] = offsetClip[srcLine[x] + offset[edgeType]]; 562 626 -
trunk/source/Lib/TLibCommon/TComSampleAdaptiveOffset.h
r872 r964 55 55 extern UInt g_saoMaxOffsetQVal[NUM_SAO_COMPONENTS]; 56 56 57 #if SAO_SGN_FUNC 58 template <typename T> int sgn(T val) 59 { 60 return (T(0) < val) - (val < T(0)); 61 } 62 #endif 63 57 64 class TComSampleAdaptiveOffset 58 65 { … … 79 86 UInt m_offsetStepLog2[NUM_SAO_COMPONENTS]; //offset step 80 87 Int* m_offsetClip[NUM_SAO_COMPONENTS]; //clip table for fast operation 88 #if !SAO_SGN_FUNC 81 89 Short* m_sign; //sign table for fast operation 90 #endif 82 91 TComPicYuv* m_tempPicYuv; //temporary buffer 83 92 Int m_picWidth; … … 96 105 Bool m_picSAOEnabled[NUM_SAO_COMPONENTS]; 97 106 Int* m_offsetClipTable[NUM_SAO_COMPONENTS]; 107 #if !SAO_SGN_FUNC 98 108 Short* m_signTable; 99 109 #endif 100 110 }; 101 111 -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r950 r964 1 /* The copyright in this software is being made available under the BSD1 /* The copyright in this software is being made available under the BSD 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are … … 45 45 //! \{ 46 46 47 47 48 TComSlice::TComSlice() 48 49 : m_iPPSId ( -1 ) 50 #if H_MV_HLS_8_POC_Q0142_32 51 , m_slicePicOrderCntLsb ( 0 ) 52 #endif 49 53 , m_iPOC ( 0 ) 50 54 , m_iLastIDR ( 0 ) … … 70 74 , m_pcPic ( NULL ) 71 75 , m_colFromL0Flag ( 1 ) 76 #if SETTING_NO_OUT_PIC_PRIOR 77 , m_noOutputPriorPicsFlag ( false ) 78 , m_noRaslOutputFlag ( false ) 79 , m_handleCraAsBlaFlag ( false ) 80 #endif 72 81 , m_colRefIdx ( 0 ) 73 82 , m_uiTLayer ( 0 ) … … 459 468 { 460 469 // The variable NumPocTotalCurr is derived as specified in subclause 7.4.7.2. It is a requirement of bitstream conformance that the following applies to the value of NumPocTotalCurr: 461 // ?If the current picture is a BLA or CRA picture, the value of NumPocTotalCurr shall be equal to 0.462 // ?Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0.470 // - If the current picture is a BLA or CRA picture, the value of NumPocTotalCurr shall be equal to 0. 471 // - Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0. 463 472 if (getRapPicFlag()) 464 473 { … … 903 912 pocCRA = pocCurr; 904 913 } 914 #if EFFICIENT_FIELD_IRAP 915 bRefreshPending = true; 916 #endif 905 917 } 906 918 else // CRA or No DR 907 919 { 920 #if EFFICIENT_FIELD_IRAP 921 if(getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_N_LP || getAssociatedIRAPType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL) 922 { 923 if (bRefreshPending==true && pocCurr > m_iLastIDR) // IDR reference marking pending 924 { 925 TComList<TComPic*>::iterator iterPic = rcListPic.begin(); 926 while (iterPic != rcListPic.end()) 927 { 928 rpcPic = *(iterPic); 929 if (rpcPic->getPOC() != pocCurr && rpcPic->getPOC() != m_iLastIDR) 930 { 931 rpcPic->getSlice(0)->setReferenced(false); 932 } 933 iterPic++; 934 } 935 bRefreshPending = false; 936 } 937 } 938 else 939 { 940 #endif 908 941 if (bRefreshPending==true && pocCurr > pocCRA) // CRA reference marking pending 909 942 { … … 920 953 bRefreshPending = false; 921 954 } 955 #if EFFICIENT_FIELD_IRAP 956 } 957 #endif 922 958 if ( getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ) // CRA picture found 923 959 { … … 1194 1230 // in decoding order shall precede the IRAP picture in output order. 1195 1231 // (Note that any picture following in output order would be present in the DPB) 1232 #if !SETTING_NO_OUT_PIC_PRIOR 1196 1233 if(rpcPic->getSlice(0)->getPicOutputFlag() == 1) 1234 #else 1235 if(rpcPic->getSlice(0)->getPicOutputFlag() == 1 && !this->getNoOutputPriorPicsFlag()) 1236 #endif 1197 1237 { 1198 1238 if(nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP || … … 1370 1410 /** Function for applying picture marking based on the Reference Picture Set in pReferencePictureSet. 1371 1411 */ 1412 #if ALLOW_RECOVERY_POINT_AS_RAP 1413 Int TComSlice::checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess, Bool bUseRecoveryPoint) 1414 #else 1372 1415 Int TComSlice::checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess) 1373 { 1416 #endif 1417 { 1418 #if ALLOW_RECOVERY_POINT_AS_RAP 1419 Int atLeastOneUnabledByRecoveryPoint = 0; 1420 Int atLeastOneFlushedByPreviousIDR = 0; 1421 #endif 1374 1422 TComPic* rpcPic; 1375 1423 Int i, isAvailable; … … 1392 1440 if(rpcPic->getIsLongTerm() && (rpcPic->getPicSym()->getSlice(0)->getPOC()) == pReferencePictureSet->getPOC(i) && rpcPic->getSlice(0)->isReferenced()) 1393 1441 { 1442 #if ALLOW_RECOVERY_POINT_AS_RAP 1443 if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) 1444 { 1445 isAvailable = 0; 1446 } 1447 else 1448 { 1394 1449 isAvailable = 1; 1450 } 1451 #else 1452 isAvailable = 1; 1453 #endif 1395 1454 } 1396 1455 } … … 1402 1461 if(rpcPic->getIsLongTerm() && curPoc == refPoc && rpcPic->getSlice(0)->isReferenced()) 1403 1462 { 1463 #if ALLOW_RECOVERY_POINT_AS_RAP 1464 if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) 1465 { 1466 isAvailable = 0; 1467 } 1468 else 1469 { 1404 1470 isAvailable = 1; 1471 } 1472 #else 1473 isAvailable = 1; 1474 #endif 1405 1475 } 1406 1476 } … … 1425 1495 if (rpcPic->getSlice(0)->isReferenced() && curPoc == refPoc) 1426 1496 { 1497 #if ALLOW_RECOVERY_POINT_AS_RAP 1498 if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) 1499 { 1500 isAvailable = 0; 1501 } 1502 else 1503 { 1427 1504 isAvailable = 1; 1428 1505 rpcPic->setIsLongTerm(1); 1429 1506 break; 1507 } 1508 #else 1509 isAvailable = 1; 1510 rpcPic->setIsLongTerm(1); 1511 break; 1512 #endif 1430 1513 } 1431 1514 } … … 1455 1538 } 1456 1539 } 1540 #if ALLOW_RECOVERY_POINT_AS_RAP 1541 else if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess) 1542 { 1543 atLeastOneUnabledByRecoveryPoint = 1; 1544 } 1545 else if(bUseRecoveryPoint && (this->getAssociatedIRAPType()==NAL_UNIT_CODED_SLICE_IDR_N_LP || this->getAssociatedIRAPType()==NAL_UNIT_CODED_SLICE_IDR_W_RADL)) 1546 { 1547 atLeastOneFlushedByPreviousIDR = 1; 1548 } 1549 #endif 1457 1550 } 1458 1551 } … … 1470 1563 if(!rpcPic->getIsLongTerm() && rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getPOC() + pReferencePictureSet->getDeltaPOC(i) && rpcPic->getSlice(0)->isReferenced()) 1471 1564 { 1565 #if ALLOW_RECOVERY_POINT_AS_RAP 1566 if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) 1567 { 1568 isAvailable = 0; 1569 } 1570 else 1571 { 1472 1572 isAvailable = 1; 1573 } 1574 #else 1575 isAvailable = 1; 1576 #endif 1473 1577 } 1474 1578 } … … 1497 1601 } 1498 1602 } 1499 } 1603 #if ALLOW_RECOVERY_POINT_AS_RAP 1604 else if(bUseRecoveryPoint && this->getPOC() > pocRandomAccess) 1605 { 1606 atLeastOneUnabledByRecoveryPoint = 1; 1607 } 1608 else if(bUseRecoveryPoint && (this->getAssociatedIRAPType()==NAL_UNIT_CODED_SLICE_IDR_N_LP || this->getAssociatedIRAPType()==NAL_UNIT_CODED_SLICE_IDR_W_RADL)) 1609 { 1610 atLeastOneFlushedByPreviousIDR = 1; 1500 1611 } 1612 #endif 1613 } 1614 } 1615 #if ALLOW_RECOVERY_POINT_AS_RAP 1616 if(atLeastOneUnabledByRecoveryPoint || atLeastOneFlushedByPreviousIDR) 1617 { 1618 return -1; 1619 } 1620 #endif 1501 1621 if(atLeastOneLost) 1502 1622 { … … 1515 1635 /** Function for constructing an explicit Reference Picture Set out of the available pictures in a referenced Reference Picture Set 1516 1636 */ 1637 #if ALLOW_RECOVERY_POINT_AS_RAP 1638 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess, Bool bUseRecoveryPoint) 1639 #else 1517 1640 Void TComSlice::createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP) 1641 #endif 1518 1642 { 1519 1643 TComPic* rpcPic; … … 1541 1665 pcRPS->setDeltaPOC(k, pReferencePictureSet->getDeltaPOC(i)); 1542 1666 pcRPS->setUsed(k, pReferencePictureSet->getUsed(i) && (!isRAP)); 1667 #if ALLOW_RECOVERY_POINT_AS_RAP 1668 pcRPS->setUsed(k, pcRPS->getUsed(k) && !(bUseRecoveryPoint && this->getPOC() > pocRandomAccess && this->getPOC() + pReferencePictureSet->getDeltaPOC(i) < pocRandomAccess) ); 1669 #endif 1543 1670 if(pcRPS->getDeltaPOC(k) < 0) 1544 1671 { … … 1553 1680 } 1554 1681 } 1682 #if EFFICIENT_FIELD_IRAP 1683 Bool useNewRPS = false; 1684 // if current picture is complimentary field associated to IRAP, add the IRAP to its RPS. 1685 if(m_pcPic->isField()) 1686 { 1687 TComList<TComPic*>::iterator iterPic = rcListPic.begin(); 1688 while ( iterPic != rcListPic.end()) 1689 { 1690 rpcPic = *(iterPic++); 1691 if(rpcPic->getPicSym()->getSlice(0)->getPOC() == this->getAssociatedIRAPPOC() && this->getAssociatedIRAPPOC() == this->getPOC()+1) 1692 { 1693 pcRPS->setDeltaPOC(k, 1); 1694 pcRPS->setUsed(k, true); 1695 nrOfPositivePictures++; 1696 k ++; 1697 useNewRPS = true; 1698 } 1699 } 1700 } 1701 #endif 1555 1702 pcRPS->setNumberOfNegativePictures(nrOfNegativePictures); 1556 1703 pcRPS->setNumberOfPositivePictures(nrOfPositivePictures); … … 1559 1706 // inter RPS prediction with. Here we just use the reference used by pReferencePictureSet. 1560 1707 // If pReferencePictureSet is not inter_RPS_predicted, then inter_RPS_prediction is for the current RPS also disabled. 1561 if (!pReferencePictureSet->getInterRPSPrediction()) 1708 if (!pReferencePictureSet->getInterRPSPrediction() 1709 #if EFFICIENT_FIELD_IRAP 1710 || useNewRPS 1711 #endif 1712 ) 1562 1713 { 1563 1714 pcRPS->setInterRPSPrediction(false); … … 1712 1863 #endif 1713 1864 { 1865 #if H_MV_HLS_8_SYN_Q0041_03 1866 m_vpsBaseLayerInternalFlag = true; 1867 #endif 1868 1714 1869 for( Int i = 0; i < MAX_TLAYER; i++) 1715 1870 { … … 1728 1883 m_vpsNumProfileTierLevelMinus1 = -1; 1729 1884 1730 m_numAddOutputLayerSets = -1; 1731 m_defaultTargetOutputLayerIdc = 0; 1885 #if H_MV_HLS_8_SYN_39_19 1886 m_numAddLayerSets = 0; 1887 m_numAddOlss = 0; 1888 #else 1889 m_numAddLayerSets = -1; 1890 #endif 1891 m_defaultOutputLayerIdc = 0; 1732 1892 1733 1893 for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++) 1734 1894 { 1735 m_ outputLayerSetIdxMinus1[i] = -1;1895 m_layerSetIdxForOlsMinus1[i] = -1; 1736 1896 m_profileLevelTierIdx[i] = 0; 1737 1897 for ( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++) … … 1741 1901 m_altOutputLayerFlag[ i ] = false; 1742 1902 } 1903 1904 #if H_MV_HLS_8_PMS_Q0195_20 1905 m_repFormatIdxPresentFlag = false; 1906 #endif 1743 1907 m_maxOneActiveRefLayerFlag = false; 1744 1908 m_directDepTypeLenMinus2 = 0; 1745 1909 1746 1910 1911 #if H_MV_HLS_8_RPS_Q0100_36 1912 m_vpsExtensionFlag = true; 1913 #endif 1747 1914 m_avcBaseLayerFlag = false; 1748 1915 m_vpsNonVuiExtensionLength = 0; … … 1760 1927 { 1761 1928 m_vpsProfilePresentFlag [i] = false; 1762 m_ outputLayerSetIdxMinus1 [i] = 0;1929 m_layerSetIdxForOlsMinus1 [i] = 0; 1763 1930 for( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++ ) 1764 1931 { … … 1864 2031 assert( getLayerIdInNuh( layer ) > getLayerIdInNuh( layer -1 ) ); 1865 2032 } 2033 2034 2035 #if H_MV_HLS_8_PMS_Q0195_20 2036 //The value of vps_num_rep_formats_minus1 shall be in the range of 0 to 255, inclusive. 2037 assert( getVpsNumRepFormatsMinus1() >= 0 ); 2038 assert( getVpsNumRepFormatsMinus1() <= 255 ); 2039 #endif 2040 1866 2041 return true; 1867 2042 } … … 1907 2082 } 1908 2083 } 2084 2085 #if H_MV_HLS_8 2086 for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ ) 2087 { 2088 m_numRefLayers[i] = 0; 2089 } 2090 2091 for (Int currLayerId = 0; currLayerId <= 62; currLayerId++ ) 2092 { 2093 for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ ) 2094 { 2095 m_recursiveRefLayerFlag[currLayerId][i] = 0; 2096 } 2097 } 2098 2099 2100 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2101 { 2102 Int iNuhLId = getLayerIdInNuh( i ); 2103 xSetRefLayerFlags( iNuhLId ); 2104 for( Int j = 0; j < 63; j++ ) 2105 { 2106 m_numRefLayers[ iNuhLId ] += m_recursiveRefLayerFlag[ iNuhLId ][ j ]; 2107 } 2108 } 2109 2110 2111 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) // Bug in spec "<" instead of "<=" 2112 { 2113 Int iNuhLId = getLayerIdInNuh( i ); 2114 Int predIdx = 0; 2115 for( Int j = iNuhLId + 1; j < 63; j++ ) 2116 { 2117 if( m_recursiveRefLayerFlag[ j ][ iNuhLId ] ) 2118 { 2119 m_predictedLayerId[ iNuhLId ][ predIdx++ ] = j; 2120 } 2121 } 2122 m_numPredictedLayers[ iNuhLId ] = predIdx; 2123 } 2124 2125 Bool countedLayerIdxFlag[ MAX_NUM_LAYERS ]; 2126 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2127 { 2128 countedLayerIdxFlag[ i ] = 0; 2129 } 2130 2131 for( Int i = 0, k = 0; i <= getMaxLayersMinus1(); i++ ) 2132 { 2133 Int iNuhLId = getLayerIdInNuh( i ); 2134 if( m_numDirectRefLayers[ iNuhLId ] == 0 ) 2135 { 2136 m_treePartitionLayerIdList[ k ][ 0 ] = iNuhLId; 2137 m_numLayersInTreePartition[ k ] = 1; 2138 for( Int j = 0; j < m_numPredictedLayers[ iNuhLId ]; j++ ) 2139 { 2140 if( !countedLayerIdxFlag[ getLayerIdInVps( m_predictedLayerId[ iNuhLId ][ j ] ) ] ) 2141 { 2142 m_treePartitionLayerIdList[ k ][ m_numLayersInTreePartition[ k ] ] = m_predictedLayerId[ iNuhLId ][ j ]; 2143 m_numLayersInTreePartition[ k ]++; 2144 countedLayerIdxFlag[ getLayerIdInVps( m_predictedLayerId[ iNuhLId ][ j ] ) ] = 1; 2145 } 2146 } 2147 k++; 2148 } 2149 m_numIndependentLayers = k; 2150 } 2151 #endif 1909 2152 } 1910 2153 … … 1936 2179 } 1937 2180 } 2181 #if !BUG_FIX_TK65 1938 2182 assert( foundLayerIdinNuh != -1 ); 1939 2183 #endif 1940 2184 return foundLayerIdinNuh; 1941 2185 } … … 2070 2314 Int TComVPS::getNumOutputLayerSets() 2071 2315 { 2072 return getNumAddOutputLayerSets() + getVpsNumLayerSetsMinus1() + 1; 2316 #if H_MV_HLS_8_SYN_39_19 2317 return getNumAddOlss() + getNumLayerSets(); 2318 #else 2319 return getNumAddLayerSets() + getVpsNumLayerSetsMinus1() + 1; 2320 #endif 2073 2321 } 2074 2322 … … 2126 2374 Void TComVPS::deriveTargetLayerIdList( Int i ) 2127 2375 { 2128 Int lsIdx = getLayerSetIdxForOutputLayerSet( i );2376 Int lsIdx = olsIdxToLsIdx( i ); 2129 2377 2130 2378 for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ ) … … 2136 2384 } 2137 2385 } 2386 #if H_MV_HLS_8_PMS_Q0165_18 2387 assert( getNumOutputLayersInOutputLayerSet( i ) > 0 ); 2388 #endif 2138 2389 } 2139 2390 … … 2141 2392 { 2142 2393 Bool outputLayerFlag; 2143 switch ( getDefault TargetOutputLayerIdc( ) )2394 switch ( getDefaultOutputLayerIdc( ) ) 2144 2395 { 2145 2396 case 0: … … 2147 2398 break; 2148 2399 case 1: 2149 outputLayerFlag = ( j == m_layerSetLayerIdList[ getLayerSetIdxForOutputLayerSet( i ) ].size() - 1 );2400 outputLayerFlag = ( j == m_layerSetLayerIdList[ olsIdxToLsIdx( i ) ].size() - 1 ); 2150 2401 break; 2151 2402 case 2: … … 2169 2420 { 2170 2421 Int maxSLMinus1 = 0; 2171 Int optLsIdx = getLayerSetIdxForOutputLayerSet( i ); 2422 #if H_MV_HLS_8_MIS_Q0102_30 2423 for( Int k = 0; k < getNumLayersInIdList( i ); k++ ) 2424 { 2425 Int lId = m_layerSetLayerIdList[i][k]; 2426 #else 2427 Int optLsIdx = olsIdxToLsIdx( i ); 2428 2172 2429 for( Int k = 0; k < getNumLayersInIdList( optLsIdx ); k++ ) 2173 2430 { 2174 2431 Int lId = m_layerSetLayerIdList[optLsIdx][k]; 2432 #endif 2175 2433 maxSLMinus1 = std::max( maxSLMinus1, getSubLayersVpsMaxMinus1( getLayerIdInVps( lId ) )); 2176 2434 } 2177 2435 return maxSLMinus1; 2178 2436 } 2179 2437 #if H_MV_HLS_8_RPS_Q0100_36 2438 Void TComVPS::inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder ) 2439 { 2440 for( Int j = 0; j <= getMaxSubLayersInLayerSetMinus1( 0 ); j++ ) 2441 { 2442 Int maxDecPicBufferingMinus1 = sps->getMaxDecPicBuffering( j ) - 1; 2443 Int numReorderPics = sps->getNumReorderPics ( j ); 2444 Int maxLatencyIncreasePlus1 = sps->getMaxLatencyIncrease( j ); 2445 2446 if ( encoder ) 2447 { 2448 assert( getDpbSize()->getMaxVpsDecPicBufferingMinus1(0, 0, j ) == maxDecPicBufferingMinus1 ); 2449 assert( getDpbSize()->getMaxVpsNumReorderPics (0, j ) == numReorderPics ); 2450 assert( getDpbSize()->getMaxVpsLatencyIncreasePlus1 (0, j ) == maxLatencyIncreasePlus1 ); 2451 } 2452 else 2453 { 2454 getDpbSize()->setMaxVpsDecPicBufferingMinus1(0, 0, j, maxDecPicBufferingMinus1 ); 2455 getDpbSize()->setMaxVpsNumReorderPics (0, j, numReorderPics ); 2456 getDpbSize()->setMaxVpsLatencyIncreasePlus1 (0, j, maxLatencyIncreasePlus1 ); 2457 } 2458 } 2459 } 2460 #endif 2180 2461 #endif // H_MV 2181 2462 … … 2249 2530 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 2250 2531 #if H_MV 2251 m_spsExtensionFlag = false; 2532 #if !H_MV_HLS_8_SPS_NODOC_48 2533 m_spsExtensionPresentFlag = false; 2252 2534 for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ ) 2253 2535 { 2254 2536 m_spsExtensionTypeFlag[ i ] = false; 2255 2537 } 2538 #else 2539 m_spsRangeExtensionsFlag = false; 2540 m_spsMultilayerExtensionFlag = false; 2541 #if H_3D 2542 m_spsExtension5bits = 0; 2543 m_sps3dExtensionFlag = false; 2544 #else 2545 m_spsExtension6bits = 0; 2546 #endif 2547 #endif 2548 2256 2549 m_numScaledRefLayerOffsets = 0; 2257 2550 … … 2433 2726 2434 2727 #if H_MV 2728 #if H_MV_HLS_8_SPS_NODOC_48 2729 m_ppsRangeExtensionsFlag = false; 2730 m_ppsMultilayerExtensionFlag = false; 2731 #if !H_3D 2732 m_ppsExtension6bits = 0; 2733 #else 2734 m_pps3dExtensionFlag = false; 2735 m_ppsExtension5bits = 0; 2736 #endif 2737 #else 2435 2738 for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ ) 2436 2739 { 2437 2740 m_ppsExtensionTypeFlag[ i ] = false; 2438 2741 } 2742 #endif 2439 2743 #endif 2440 2744 } … … 2962 3266 Void TComSlice::markIvRefPicsAsShortTerm( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ) 2963 3267 { 2964 // Mark as short term3268 // Mark as short-term 2965 3269 for ( Int i = 0; i < refPicSetInterLayer0.size(); i++ ) 2966 3270 { … … 2974 3278 2975 3279 } 3280 3281 #if !H_MV_HLS_8_DBP_NODOC_42 2976 3282 Void TComSlice::markIvRefPicsAsUnused( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc ) 2977 3283 { … … 3028 3334 } 3029 3335 } 3030 3336 #endif 3031 3337 Void TComSlice::printRefPicList() 3032 3338 { … … 3045 3351 Void TComSlice::markCurrPic( TComPic* currPic ) 3046 3352 { 3353 3354 #if !H_MV_HLS_8_DBP_NODOC_42 3047 3355 if ( !currPic->getSlice(0)->getDiscardableFlag() ) 3048 3356 { 3357 #endif 3049 3358 currPic->getSlice(0)->setReferenced( true ) ; 3050 3359 currPic->setIsLongTerm( false ); 3360 #if !H_MV_HLS_8_DBP_NODOC_42 3051 3361 } 3052 3362 else … … 3054 3364 currPic->getSlice(0)->setReferenced( false ) ; 3055 3365 } 3366 #endif 3367 3368 #if H_MV_HLS_7_VPS_P0300_27 3369 currPic->setReconMark( true ); 3370 currPic->setPicOutputFlag( currPic->getSlice(0)->getPicOutputFlag() ); 3371 #endif 3056 3372 } 3057 3373 … … 3087 3403 Int refLayerIdx = vps->getLayerIdInVps( vps->getRefLayerId( getLayerId(), i ) ); 3088 3404 3405 #if H_MV_HLS_8_RPS_Q0060_17 3406 Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >= getTLayer() ) && ( getTLayer() == 0 ) && 3407 ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() ); 3408 #else 3089 3409 Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >= getTLayer() ) && 3090 3410 ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() ); 3411 #endif 3091 3412 3092 3413 return refLayerPicFlag; … … 3969 4290 } 3970 4291 } 4292 4293 // --------------- 4294 // To be added: 4295 // When vps_base_layer_internal_flag is equal to 0 and layer_in_bsp_flag[ h ][ i ][ 0 ] is equal to 1 for any value of h in the 4296 // range of 1 to vps_num_layer_sets_minus1, inclusive, and any value of i in the range of 0 to num_bitstream_partitions[ h ] - 1, 4297 // inclusive, the value of layer_in_bsp_flag[ h ][ i ][ j ] for at least one value of j in the range of 1 to 4298 // NumLayersInIdList[ h ] - 1, inclusive, shall be equal to 1. 4299 // --------------- 4300 4301 4302 // When num_bitstream_partitions[ h ] is equal to 1 for any value of h in the range 1 to vps_num_layer_set_minus1, inclusive, 4303 // the value of layer_in_bsp_flag[ h ][ 0 ][ j ] should be equal to 0 for at least one value of j in the range 0 to 4304 // NumLayersInIdList[ h ] − 1, inclusive. 4305 4306 4307 if ( getNumBitstreamPartitions( h ) == 1 ) 4308 { 4309 Bool atLeastOneZero = false; 4310 for ( Int j = 0; j <= vps->getNumLayersInIdList( h ) - 1; j++ ) 4311 { 4312 atLeastOneZero = atLeastOneZero || !getLayerInBspFlag( h, 0, j ); 4313 } 4314 assert( atLeastOneZero ); 4315 } 4316 4317 4318 // For any value of h in the range 1 to vps_num_layer_set_minus1, inclusive, the value of layer_in_bsp_flag[ h ][ i ][ j ] 4319 // shall be equal to 1 for at most one value of i in the range of 0 to num_bitstream_partitions[ h ] − 1, inclusive. 4320 4321 for ( Int j = 0; j <= vps->getNumLayersInIdList( h ) - 1; j++ ) 4322 { 4323 Int numLayerInBsp = 0; 4324 for ( Int i = 0; i <= getNumBitstreamPartitions( h ) - 1; i++ ) 4325 { 4326 numLayerInBsp += ( getLayerInBspFlag( h, i, j ) ? 1 : 0 ); 4327 } 4328 assert( numLayerInBsp <= 1 ); 4329 } 4330 3971 4331 } 3972 4332 -
trunk/source/Lib/TLibCommon/TComSlice.h
r950 r964 54 54 class TComPicLists; 55 55 class TComVPS; 56 #if H_MV_HLS_8_RPS_Q0100_36 57 class TComSPS; 58 #endif 56 59 #endif 57 60 // ==================================================================================================================== … … 126 129 Void sortDeltaPOC(); 127 130 Void printDeltaPOC(); 131 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 } 146 #endif 128 147 }; 129 148 … … 231 250 { 232 251 ProfileTierLevel m_generalPTL; 233 ProfileTierLevel m_subLayerPTL [6]; // max. value of max_sub_layers_minus1 is 6234 Bool m_subLayerProfilePresentFlag [6];235 Bool m_subLayerLevelPresentFlag [6];252 ProfileTierLevel m_subLayerPTL [MAX_TLAYER-1]; // max. value of max_sub_layers_minus1 is MAX_TLAYER-1 (= 6) 253 Bool m_subLayerProfilePresentFlag [MAX_TLAYER-1]; 254 Bool m_subLayerLevelPresentFlag [MAX_TLAYER-1]; 236 255 237 256 public: … … 436 455 Int m_numBitstreamPartitions[MAX_VPS_OP_SETS_PLUS1]; 437 456 Bool m_layerInBspFlag[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_LAYERS]; 438 Int m_numBspSchedCombinations [MAX_VPS_OP_SETS_PLUS1];457 Int m_numBspSchedCombinationsMinus1[MAX_VPS_OP_SETS_PLUS1]; 439 458 Int m_bspCombHrdIdx[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_BSP_SCHED_COMBINATION]; 440 459 Int m_bspCombSchedIdx[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_BSP_SCHED_COMBINATION]; … … 455 474 Void checkLayerInBspFlag ( TComVPS* vps, Int h ); 456 475 457 Void setNumBspSchedCombinations ( Int h, Int val ) { m_numBspSchedCombinations[h] = val; }458 Int getNumBspSchedCombinations ( Int h ) { return m_numBspSchedCombinations[h]; }476 Void setNumBspSchedCombinationsMinus1( Int h, Int val ) { m_numBspSchedCombinationsMinus1[h] = val; } 477 Int getNumBspSchedCombinationsMinus1( Int h ) { return m_numBspSchedCombinationsMinus1[h]; } 459 478 460 479 Void setBspCombHrdIdx( Int h, Int i, Int j, Int val ) { m_bspCombHrdIdx[h][i][j] = val; } 461 480 Int getBspCombHrdIdx( Int h, Int i, Int j ) { return m_bspCombHrdIdx[h][i][j]; } 481 #if H_MV_HLS_8_HRD_Q0101_04 482 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 462 496 463 497 Void setBspCombSchedIdx( Int h, Int i, Int j, Int val ) { m_bspCombSchedIdx[h][i][j] = val; } … … 636 670 Int m_maxVpsDecPicBufferingMinus1[MAX_VPS_OUTPUTLAYER_SETS][MAX_NUM_LAYER_IDS][MAX_TLAYER];; 637 671 Int m_maxVpsNumReorderPics [MAX_VPS_OUTPUTLAYER_SETS][MAX_TLAYER]; 638 #if H_MV_HLS7_GEN639 Int m_maxVpsLayerDecPicBuffMinus1[TO_BE_SPECIFIED][TO_BE_SPECIFIED][TO_BE_SPECIFIED];640 #endif641 672 Int m_maxVpsLatencyIncreasePlus1 [MAX_VPS_OUTPUTLAYER_SETS][MAX_TLAYER]; 642 673 … … 655 686 Void setMaxVpsNumReorderPics( Int i, Int j, Int val ) { m_maxVpsNumReorderPics[i][j] = val; } 656 687 Int getMaxVpsNumReorderPics( Int i, Int j ) { return m_maxVpsNumReorderPics[i][j]; } 657 #if H_MV_HLS7_GEN 658 Void setMaxVpsLayerDecPicBuffMinus1( Int i, Int k, Int j, Int val ) { m_maxVpsLayerDecPicBuffMinus1[i][k][j] = val; } 659 Int getMaxVpsLayerDecPicBuffMinus1( Int i, Int k, Int j ) { return m_maxVpsLayerDecPicBuffMinus1[i][k][j]; } 660 #endif 688 661 689 Void setMaxVpsLatencyIncreasePlus1( Int i, Int j, Int val ) { m_maxVpsLatencyIncreasePlus1[i][j] = val; } 662 690 Int getMaxVpsLatencyIncreasePlus1( Int i, Int j ) { return m_maxVpsLatencyIncreasePlus1[i][j]; } … … 667 695 private: 668 696 Int m_VPSId; 697 #if H_MV_HLS_8_SYN_Q0041_03 698 Bool m_vpsBaseLayerInternalFlag; 699 #endif 700 669 701 UInt m_uiMaxTLayers; 670 702 … … 704 736 TimingInfo m_timingInfo; 705 737 #if H_MV 738 #if H_MV_HLS_8_RPS_Q0100_36 739 Bool m_vpsExtensionFlag; 740 #endif 706 741 /// VPS EXTENSION SYNTAX ELEMENTS 707 742 Bool m_avcBaseLayerFlag; … … 725 760 Bool m_vpsProfilePresentFlag [MAX_VPS_OP_SETS_PLUS1]; 726 761 727 Int m_numAddOutputLayerSets; 728 Int m_defaultTargetOutputLayerIdc; 729 730 Int m_outputLayerSetIdxMinus1 [MAX_VPS_OUTPUTLAYER_SETS]; 762 Int m_numAddLayerSets; 763 #if H_MV_HLS_8_SYN_39_19 764 Int m_highestLayerIdxPlus1 [MAX_VPS_ADD_OUTPUT_LAYER_SETS][MAX_NUM_LAYERS]; 765 Int m_numAddOlss; 766 #endif 767 Int m_defaultOutputLayerIdc; 768 769 Int m_layerSetIdxForOlsMinus1 [MAX_VPS_OUTPUTLAYER_SETS]; 731 770 Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; 732 771 Int m_profileLevelTierIdx [MAX_VPS_OUTPUTLAYER_SETS ]; 733 772 Bool m_altOutputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS]; 734 773 Bool m_repFormatIdxPresentFlag; 774 735 775 Int m_vpsNumRepFormatsMinus1; 736 776 Int m_vpsRepFormatIdx [MAX_NUM_LAYERS]; … … 762 802 Int m_refLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 763 803 804 #if H_MV_HLS_8 805 Int m_numRefLayers [MAX_NUM_LAYER_IDS]; 806 Int m_numPredictedLayers [MAX_NUM_LAYERS]; 807 Int m_predictedLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; 808 Int m_numIndependentLayers; 809 Int m_numLayersInTreePartition [MAX_NUM_LAYER_IDS]; 810 Int m_treePartitionLayerIdList [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; 811 Bool m_recursiveRefLayerFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 812 #else 813 764 814 Int m_numSamplePredRefLayers [MAX_NUM_LAYERS]; 765 815 Bool m_samplePredEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; … … 769 819 Bool m_motionPredEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 770 820 Int m_motionPredRefLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 821 #endif 771 822 Int m_viewIndex [MAX_NUM_LAYERS ]; 772 823 … … 777 828 778 829 Int xGetDimBitOffset( Int j ); 779 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 780 845 // VPS EXTENSION 2 SYNTAX ELEMENTS 781 846 #if H_3D_ARP … … 837 902 Void setVPSId (Int i) { m_VPSId = i; } 838 903 904 #if H_MV_HLS_8_SYN_Q0041_03 905 Void setVpsBaseLayerInternalFlag( Bool flag ) { m_vpsBaseLayerInternalFlag = flag; } 906 Bool getVpsBaseLayerInternalFlag( ) { return m_vpsBaseLayerInternalFlag; } 907 #endif 908 839 909 UInt getMaxTLayers () { return m_uiMaxTLayers; } 840 910 Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } … … 887 957 TimingInfo* getTimingInfo() { return &m_timingInfo; } 888 958 #if H_MV 959 960 #if H_MV_HLS_8_RPS_Q0100_36 961 Void setVpsExtensionFlag( Bool flag ) { m_vpsExtensionFlag = flag; } 962 Bool getVpsExtensionFlag( ) { return m_vpsExtensionFlag; } 963 #endif 964 #if !H_MV_HLS_8_SYN_Q0041_03 889 965 Void setAvcBaseLayerFlag( Bool val ) { m_avcBaseLayerFlag = val; } 890 966 Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } 891 967 #endif 892 968 Void setVpsNonVuiExtensionLength( Int val ) { m_vpsNonVuiExtensionLength = val; } 893 969 Int getVpsNonVuiExtensionLength( ) { return m_vpsNonVuiExtensionLength; } … … 947 1023 Bool getVpsProfilePresentFlag( Int idx ) { return m_vpsProfilePresentFlag[idx]; } 948 1024 949 Void setNumAddOutputLayerSets( Int val ) { m_numAddOutputLayerSets = val; } 950 Int getNumAddOutputLayerSets( ) { return m_numAddOutputLayerSets; } 951 952 Void setDefaultTargetOutputLayerIdc( Int val ) { m_defaultTargetOutputLayerIdc = val; } 953 Int getDefaultTargetOutputLayerIdc( ) { return m_defaultTargetOutputLayerIdc; } 954 955 Void setOutputLayerSetIdxMinus1( Int outLayerSetIdx, Int val ) { m_outputLayerSetIdxMinus1[ outLayerSetIdx ] = val; } 956 Int getOutputLayerSetIdxMinus1( Int outLayerSetIdx ) { return m_outputLayerSetIdxMinus1[ outLayerSetIdx ]; } 1025 Void setNumAddLayerSets( Int val ) { m_numAddLayerSets = val; } 1026 Int getNumAddLayerSets( ) { return m_numAddLayerSets; } 1027 1028 #if H_MV_HLS_8_SYN_39_19 1029 Void setHighestLayerIdxPlus1( Int i, Int j, Int val ) { m_highestLayerIdxPlus1[i][j] = val; } 1030 Int getHighestLayerIdxPlus1( Int i, Int j ) { return m_highestLayerIdxPlus1[i][j]; } 1031 1032 Void setNumAddOlss( Int val ) { m_numAddOlss = val; } 1033 Int getNumAddOlss( ) { return m_numAddOlss; } 1034 #endif 1035 1036 Void setDefaultOutputLayerIdc( Int val ) { m_defaultOutputLayerIdc = val; } 1037 Int getDefaultOutputLayerIdc( ) { return m_defaultOutputLayerIdc; } 1038 1039 Void setLayerSetIdxForOlsMinus1( Int outLayerSetIdx, Int val ) { m_layerSetIdxForOlsMinus1[ outLayerSetIdx ] = val; } 1040 Int getLayerSetIdxForOlsMinus1( Int outLayerSetIdx ) { return m_layerSetIdxForOlsMinus1[ outLayerSetIdx ]; } 957 1041 958 1042 Void setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag ) { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; } … … 975 1059 Void setVpsRepFormatIdx( Int i, Int val ) { m_vpsRepFormatIdx[i] = val; } 976 1060 Int getVpsRepFormatIdx( Int i ) { return m_vpsRepFormatIdx[i]; } 1061 1062 #if H_MV_HLS_8_PMS_Q0195_20 1063 Int inferVpsRepFormatIdx( Int i ) { return std::min( i, getVpsNumRepFormatsMinus1() ); } 1064 #endif 977 1065 978 1066 Void setRepFormat( Int i, TComRepFormat* val ) { m_repFormat[i] = val; } … … 989 1077 Void setDpbSize( TComDpbSize* val ) { assert( m_dpbSize != 0 ); m_dpbSize = val; } 990 1078 TComDpbSize* getDpbSize( ) { return m_dpbSize;} 1079 #if H_MV_HLS_8_RPS_Q0100_36 1080 Void inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder ); 1081 #endif 1082 991 1083 992 1084 Void setPocLsbNotPresentFlag( Int i, Bool flag ) { m_pocLsbNotPresentFlag[i] = flag; } … … 1023 1115 Int getNumDirectRefLayers( Int layerIdInNuh ) { return m_numDirectRefLayers[ layerIdInNuh ]; }; 1024 1116 Int getRefLayerId ( Int layerIdInNuh, Int idx );; 1117 1118 #if H_MV_HLS_8 1119 Int getNumRefLayers ( Int i ) { return m_numRefLayers[i]; } 1120 Int getNumPredictedLayers ( Int i ) { return m_numPredictedLayers[i]; } 1121 Int getPredictedLayerId ( Int i, Int j ) { return m_predictedLayerId[i][j]; } 1122 Int getNumIndependentLayers ( ) { return m_numIndependentLayers; } 1123 Int getNumLayersInTreePartition( Int i ) { return m_numLayersInTreePartition[i]; } 1124 Int getTreePartitionLayerIdList( Int i, Int j ) { return m_treePartitionLayerIdList[i][j]; } 1125 Bool getRecursiveRefLayerFlag ( Int i, Int j ) { return m_recursiveRefLayerFlag[i][j]; } 1126 1127 #endif 1128 1129 #if H_MV_HLS_8_SYN_39_19 1130 Int getNumLayerSets( ) { return getVpsNumLayerSetsMinus1() + 1 + getNumAddLayerSets(); }; 1131 #endif 1025 1132 Bool checkVPSExtensionSyntax(); 1026 1133 Int scalTypeToScalIdx ( ScalabilityType scalType ); … … 1030 1137 1031 1138 Int getNumLayersInIdList ( Int lsIdx ); 1139 #if H_MV_HLS_8_RPS_Q0100_36 1140 Int getLayerSetLayerIdList(Int lsIdx, Int j ) { return m_layerSetLayerIdList[ lsIdx ][ j ]; }; 1141 #endif 1032 1142 1033 1143 Int getNumOutputLayerSets() ; 1144 #if !H_MV_HLS_8_DBP_NODOC_42 1034 1145 Int getNumSubDpbs( Int i ) { return getNumLayersInIdList( i ); }; 1146 #endif 1035 1147 Bool isOutputLayer( Int outLayerSetIdx, Int layerIdInNuh ); 1036 1148 Void deriveLayerSetLayerIdList(); 1037 1149 1038 Int getLayerSetIdxForOutputLayerSet( Int i ) { return ( i <= getVpsNumLayerSetsMinus1() ) ? i : getOutputLayerSetIdxMinus1( i ) + 1 ; };1150 Int olsIdxToLsIdx( Int i ) { return ( i <= getVpsNumLayerSetsMinus1() ) ? i : getLayerSetIdxForOlsMinus1( i ) + 1 ; }; 1039 1151 1040 1152 Void initTargetLayerIdLists ( ); … … 1048 1160 1049 1161 Int getMaxSubLayersInLayerSetMinus1( Int i ); 1162 1163 #if H_MV_HLS_8_SYN_39_19 1164 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 1050 1181 1051 1182 // inference … … 1055 1186 // helpers 1056 1187 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 1208 1057 1209 /// VPS EXTENSION 2 SYNTAX ELEMENTS 1058 1210 #if H_3D … … 1447 1599 1448 1600 UInt m_uiBitsForPOC; 1601 1449 1602 UInt m_numLongTermRefPicSPS; 1450 1603 UInt m_ltRefPicPocLsbSps[33]; … … 1476 1629 TComVPS* m_pcVPS; 1477 1630 // SPS 1478 Bool m_spsExtensionFlag; 1479 Bool m_spsExtensionTypeFlag[PS_EX_T_MAX_NUM]; 1631 Bool m_spsExtensionPresentFlag; 1632 #if H_MV_HLS_8_SPS_NODOC_48 1633 Bool m_spsRangeExtensionsFlag; 1634 Bool m_spsMultilayerExtensionFlag; 1635 #if H_3D 1636 Bool m_sps3dExtensionFlag; 1637 Int m_spsExtension5bits; 1638 #else 1639 Int m_spsExtension6bits; 1640 #endif 1641 #else 1642 Bool m_spsExtensionTypeFlag [PS_EX_T_MAX_NUM]; 1643 #endif 1480 1644 Bool m_spsInferScalingListFlag; 1481 1645 Int m_spsScalingListRefLayerId; … … 1591 1755 UInt getMaxTLayers() { return m_uiMaxTLayers; } 1592 1756 Void setMaxTLayers( UInt uiMaxTLayers ) { assert( uiMaxTLayers <= MAX_TLAYER ); m_uiMaxTLayers = uiMaxTLayers; } 1757 #if H_MV_HLS_8 1758 UInt getSpsMaxSubLayersMinus1() { return ( m_uiMaxTLayers - 1); } 1759 #endif 1593 1760 1594 1761 Bool getTemporalIdNestingFlag() { return m_bTemporalIdNestingFlag; } … … 1622 1789 TComPTL* getPTL() { return &m_pcPTL; } 1623 1790 #if H_MV 1624 Void setSpsExtensionFlag( Bool flag ) { m_spsExtensionFlag = flag; } 1625 Bool getSpsExtensionFlag( ) { return m_spsExtensionFlag; } 1626 1627 Void setSpsExtensionTypeFlag( Int i, Bool flag ) { m_spsExtensionTypeFlag[i] = flag; } 1628 Bool getSpsExtensionTypeFlag( Int i ) { return m_spsExtensionTypeFlag[i]; } 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 1827 1828 Void setSpsExtensionPresentFlag( Bool flag ) { m_spsExtensionPresentFlag = flag; } 1829 Bool getSpsExtensionPresentFlag( ) { return m_spsExtensionPresentFlag; } 1830 1831 #if H_MV_HLS_8_SPS_NODOC_48 1832 Void setSpsRangeExtensionsFlag( Bool flag ) { m_spsRangeExtensionsFlag = flag; } 1833 Bool getSpsRangeExtensionsFlag( ) { return m_spsRangeExtensionsFlag; } 1834 1835 Void setSpsMultilayerExtensionFlag( Bool flag ) { m_spsMultilayerExtensionFlag = flag; } 1836 Bool getSpsMultilayerExtensionFlag( ) { return m_spsMultilayerExtensionFlag; } 1837 #if H_3D 1838 Void setSps3dExtensionFlag( Bool flag ) { m_sps3dExtensionFlag = flag; } 1839 Bool getSps3dExtensionFlag( ) { return m_sps3dExtensionFlag; } 1840 1841 Void setSpsExtension5bits( Int val ) { m_spsExtension5bits = val; } 1842 Int getSpsExtension5bits( ) { return m_spsExtension5bits; } 1843 #else 1844 Void setSpsExtension6bits( Int val ) { m_spsExtension6bits = val; } 1845 Int getSpsExtension6bits( ) { return m_spsExtension6bits; } 1846 #endif 1847 #else 1848 Void setSpsExtensionTypeFlag( Int i, Bool flag ) { m_spsExtensionTypeFlag[i] = flag; } 1849 Bool getSpsExtensionTypeFlag( Int i ) { return m_spsExtensionTypeFlag[i]; } 1850 #endif 1851 1629 1852 Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } 1630 1853 TComVPS* getVPS () { return m_pcVPS; } … … 1665 1888 1666 1889 Void inferScalingList( TComSPS* spsSrc ); 1890 1891 #if H_MV_HLS_8_RPS_Q0100_36 1892 // 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 1909 1667 1910 #endif 1668 1911 #if H_3D_QTLPC … … 1776 2019 Int m_ppsScalingListRefLayerId; 1777 2020 2021 #if H_MV_HLS_8_SPS_NODOC_48 2022 Bool m_ppsRangeExtensionsFlag; 2023 Bool m_ppsMultilayerExtensionFlag; 2024 #if !H_3D 2025 Int m_ppsExtension6bits; 2026 #else 2027 Bool m_pps3dExtensionFlag; 2028 Int m_ppsExtension5bits; 2029 #endif 2030 2031 #else 1778 2032 Bool m_ppsExtensionTypeFlag[PS_EX_T_MAX_NUM]; 2033 #endif 1779 2034 Bool m_pocResetInfoPresentFlag; 1780 2035 #endif … … 1920 2175 Int getPpsScalingListRefLayerId( ) { return m_ppsScalingListRefLayerId; } 1921 2176 2177 #if H_MV_HLS_8_SPS_NODOC_48 2178 Void setPpsRangeExtensionsFlag( Bool flag ) { m_ppsRangeExtensionsFlag = flag; } 2179 Bool getPpsRangeExtensionsFlag( ) { return m_ppsRangeExtensionsFlag; } 2180 2181 Void setPpsMultilayerExtensionFlag( Bool flag ) { m_ppsMultilayerExtensionFlag = flag; } 2182 Bool getPpsMultilayerExtensionFlag( ) { return m_ppsMultilayerExtensionFlag; } 2183 2184 #if !H_3D 2185 Void setPpsExtension6bits( Int val ) { m_ppsExtension6bits = val; } 2186 Int getPpsExtension6bits( ) { return m_ppsExtension6bits; } 2187 #else 2188 Void setPps3dExtensionFlag( Bool flag ) { m_pps3dExtensionFlag = flag; } 2189 Bool getPps3dExtensionFlag( ) { return m_pps3dExtensionFlag; } 2190 2191 Void setPpsExtension5bits( Int val ) { m_ppsExtension5bits = val; } 2192 Int getPpsExtension5bits( ) { return m_ppsExtension5bits; } 2193 #endif 2194 #else 1922 2195 Void setPpsExtensionTypeFlag( Int i, Bool flag ) { m_ppsExtensionTypeFlag[i] = flag; } 1923 2196 Bool getPpsExtensionTypeFlag( Int i ) { return m_ppsExtensionTypeFlag[i]; } 2197 #endif 1924 2198 1925 2199 Void setPocResetInfoPresentFlag( Bool flag ) { m_pocResetInfoPresentFlag = flag; } … … 1957 2231 Int m_iPPSId; ///< picture parameter set ID 1958 2232 Bool m_PicOutputFlag; ///< pic_output_flag 2233 #if H_MV_HLS_8_POC_Q0142_32 2234 Int m_slicePicOrderCntLsb; 2235 #endif 1959 2236 Int m_iPOC; 1960 2237 #if H_MV … … 2010 2287 UInt m_colFromL0Flag; // collocated picture from List0 flag 2011 2288 2289 #if SETTING_NO_OUT_PIC_PRIOR 2290 Bool m_noOutputPriorPicsFlag; 2291 Bool m_noRaslOutputFlag; 2292 Bool m_handleCraAsBlaFlag; 2293 #endif 2294 2012 2295 UInt m_colRefIdx; 2013 2296 UInt m_maxNumMergeCand; … … 2131 2414 Void setPicOutputFlag( Bool b ) { m_PicOutputFlag = b; } 2132 2415 Bool getPicOutputFlag() { return m_PicOutputFlag; } 2416 #if H_MV_HLS_8_POC_Q0142_32 2417 Void setSlicePicOrderCntLsb( Int i ) { m_slicePicOrderCntLsb = i; }; 2418 Int getSlicePicOrderCntLsb( ) { return m_slicePicOrderCntLsb; }; 2419 #endif 2133 2420 Void setSaoEnabledFlag(Bool s) {m_saoEnabledFlag =s; } 2134 2421 Bool getSaoEnabledFlag() { return m_saoEnabledFlag; } … … 2281 2568 Void createInterLayerReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer0, std::vector<TComPic*>& refPicSetInterLayer1 ); 2282 2569 static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ); 2283 static Void markCurrPic ( TComPic* currPic );; 2570 static Void markCurrPic ( TComPic* currPic ); 2571 #if !H_MV_HLS_8_DBP_NODOC_42 2284 2572 static Void markIvRefPicsAsUnused ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc ); 2573 #endif 2285 2574 Void printRefPicList(); 2286 2575 #endif 2287 2576 Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); 2288 2577 Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic ); 2578 #if ALLOW_RECOVERY_POINT_AS_RAP 2579 Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false); 2580 Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP, Int pocRandomAccess = 0, Bool bUseRecoveryPoint = false); 2581 #else 2289 2582 Int checkThatAllRefPicsAreAvailable( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool printErrors, Int pocRandomAccess = 0); 2290 2583 Void createExplicitReferencePictureSetFromReference( TComList<TComPic*>& rcListPic, TComReferencePictureSet *pReferencePictureSet, Bool isRAP); 2584 #endif 2291 2585 2292 2586 Void setMaxNumMergeCand (UInt val ) { m_maxNumMergeCand = val; } 2293 2587 UInt getMaxNumMergeCand () { return m_maxNumMergeCand; } 2588 2589 #if SETTING_NO_OUT_PIC_PRIOR 2590 Void setNoOutputPriorPicsFlag ( Bool val ) { m_noOutputPriorPicsFlag = val; } 2591 Bool getNoOutputPriorPicsFlag () { return m_noOutputPriorPicsFlag; } 2592 2593 Void setNoRaslOutputFlag ( Bool val ) { m_noRaslOutputFlag = val; } 2594 Bool getNoRaslOutputFlag () { return m_noRaslOutputFlag; } 2595 2596 Void setHandleCraAsBlaFlag ( Bool val ) { m_handleCraAsBlaFlag = val; } 2597 Bool getHandleCraAsBlaFlag () { return m_handleCraAsBlaFlag; } 2598 #endif 2294 2599 2295 2600 Void setSliceMode ( UInt uiMode ) { m_sliceMode = uiMode; } … … 2433 2738 Void setPocResetIdc( Int val ) { m_pocResetIdc = val; } 2434 2739 Int getPocResetIdc( ) { return m_pocResetIdc; } 2435 2740 #if H_MV_HLS_8_POC_Q0142_32 2741 Void checkPocResetIdc( ) { assert( !(getVPS()->getPocLsbNotPresentFlag( getLayerIdInVps() ) ) || !(getSlicePicOrderCntLsb() > 0 ) || !( getPocResetIdc() == 2) ); } 2742 #endif 2436 2743 Void setPocResetPeriodId( Int val ) { m_pocResetPeriodId = val; } 2437 2744 Int getPocResetPeriodId( ) { return m_pocResetPeriodId; } … … 2442 2749 Void setPocLsbVal( Int val ) { m_pocLsbVal = val; } 2443 2750 Int getPocLsbVal( ) { return m_pocLsbVal; } 2751 #if H_MV_HLS_8_POC_Q0142_32 2752 Void checkPocLsbVal( ) { assert( !(getVPS()->getPocLsbNotPresentFlag( getLayerIdInVps() ) ) || !getFullPocResetFlag() || ( getPocLsbVal() == 0 ) ); } 2753 #endif 2444 2754 2445 2755 Void setPocMsbValPresentFlag( Bool flag ) { m_pocMsbValPresentFlag = flag; } … … 2466 2776 2467 2777 // Additional variables derived in slice header semantics 2778 2468 2779 Int getNumInterLayerRefPicsMinus1Len( ) { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } 2469 2780 Int getInterLayerPredLayerIdcLen ( ) { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } … … 2483 2794 TComPic* getPicFromRefPicSetInterLayer( Int setIdc, Int layerId ); 2484 2795 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 2485 2818 #endif 2486 2819 #if H_3D_DDD -
trunk/source/Lib/TLibCommon/TypeDef.h
r950 r964 66 66 67 67 #define NTT_BUG_FIX_TK54 1 68 68 #define BUG_FIX_TK65 1 69 69 70 70 ///////////////////////////////////////////////////////////////////////////////////////// … … 359 359 #define MPI_SUBPU_DEFAULT_MV_H0077_H0099_H0111_H0133 1 360 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 361 366 ///////////////////////////////////////////////////////////////////////////////////////// 362 367 /////////////////////////////////// TBD ////////////////////////////// 363 368 ///////////////////////////////////////////////////////////////////////////////////////// 364 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 376 #define H_MV_HLS7_GEN 0 // General changes (not tested) 377 378 // POC 365 379 // #define H_MV_HLS_7_POC_P0041_3 0 // (POC/P0041/POC reset) #3 It was remarked that we should require 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. This was agreed. Decision: Adopt (with constraint for discardable_flag as described above) 366 380 // #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. 367 381 // #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). 368 382 369 // #define H_MV_HLS_7_SEI_P0133_28 0 // (SEI/P0133/Recovery point SEI) #28 Decision: Adopt change to recover point semantics only (-v3) 370 // #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. 371 383 384 // OTHERS 372 385 // #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. 373 // #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 374 // #define H_MV_HLS_7_VPS_P0300_27 0 // 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. 375 376 #define H_MV_HLS7_GEN 0 // General changes (not tested) 386 387 // SEI related 388 //#define H_MV_HLS_8_SEI_NODOC_53 0 // #53 (SEI /NODOC/Added Multiview view position SEI message) Plain copy from AVC. 389 //#define H_MV_HLS_8_SEI_NODOC_52 0 // #52 (SEI /NODOC/Added Multiview acquisition information SEI) Plain copy from AVC. 390 //#define H_MV_HLS_8_SEI_NODOC_51 0 // #51 (SEI /NODOC/Added Multiview scene information SEI message) 391 //#define H_MV_HLS_8_SEI_Q0189_35 0 // #35 (SEI /Q0189/SEI message for indicating constraints on TMVP) Proposal 2.3, SEI message for indicating constraints on TMVP 392 //#define H_MV_HLS_8_EDF_Q0116_29 0 // #29 (ED.FIX /Q0116/Recovery point SEI) , consider adding a note regarding how random accessibility is affected by the recovery point SEI message 393 //#define H_MV_HLS_8_GEN_Q0183_23 0 // #23 (GEN /Q0183/SEI clean-ups) numerous small clean-ups on SEI messages. 394 //#define H_MV_HLS_8_MIS_Q0247_49 0 // #49 (MISC /Q0247/frame-field information SEI message) 395 //#define H_MV_HLS_8_MIS_Q0189_34 0 // #34 (MISC /Q0189/slice temporal mvp enabled flag) Proposal 2.2, clarification of semantics of slice temporal mvp enabled flag 396 //#define H_MV_HLS_8_EDF_Q0081_01 0 // #1 (ED.FIX /Q0081/alpha channel persist) On reuse of alpha planes in auxiliary pictures. It was asked why there would not be a presumption that the alpha channel content would simply persist, without needing the flag to indicate it. Decision (Ed.): Delegated to editors to clarify, as necessary, that the alpha channel content persists until cancelled or updated in output order. 397 //#define H_MV_HLS_8_SEI_Q0253_37 0 // #37 (SEI /Q0253/layer not present), modified semantics of layers not present SEI message to correct bug introduced during editing 398 //#define H_MV_HLS_8_SEI_Q0045_11 0 // #11 (SEI /Q0045/Overlay) Proposal for an SEI message on selectable overlays. Decision: Adopt (modified for variable-length strings). 399 //#define H_MV_HLS_7_SEI_P0133_28 0 // (SEI/P0133/Recovery point SEI) #28 Decision: Adopt change to recover point semantics only (-v3) 400 //#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 402 403 // Auxiliary picture related 404 //#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. 405 //#define H_MV_HLS_8_AUX_Q0081_2 0 // #2 (AUX /Q0081/primary) Decision: Remove the constraint that an alpha picture must be accompanied by a primary picture. 406 //#define H_MV_HLS_8_AUX_Q0078_44 0 // #44 (AUX /Q0078/concepts Auxiliary picture concepts: 407 //#define H_MV_HLS_8_AUX_Q0078_39 0 // #39 (AUX /Q0078/conformance): mechanism for signaling a profile/tier/level conformance point for auxiliary pictures 408 409 // Profiles 410 //#define H_MV_HLS_8_PRO_NODOC_50 0 // #50 (PROF /NODOC/Monochrome) Add Monochrome 8-bit profile 411 //#define H_MV_HLS_8_PRO_NODOC_31 0 // #31 (PROF /NODOC/Profile constraint) Add a profile constraint to the Scalable Main, Scalable Main 10, and Stereo Main profiles against allowing layers with duplicate values of DependencyId (or ViewOrderIdx) when AuxId equal to 0. 412 //#define H_MV_HLS_8_PRO_H0126_45 0 // #45 (PROF /H0126/Stereo main) Phrasing used in specifying the Stereo Main profile. 413 //#define H_MV_HLS_8_PRO_Q0160_33 0 // #33 (PROF /Q0160/alt_output_flag) v2: Add constraint to stereo main profile that it must contain exactly two texture views, and add a note to state that the constraint implies a restriction that alt_output_flag equal to 0. 414 415 // DPB 416 //#define H_MV_HLS_8_HRD_Q0102_09 0 // #9 (HRD /Q0102/NoOutputOfPriorPicsFlag) It was suggested that also the separate_colour_plane_flag should affect inference of NoOutputOfPriorPicsFlag. Decision (Ed.): Agreed (affects RExt text). 417 //#define H_MV_HLS_8_DBP_Q0154_38 0 // #38 (DBP /Q0154/VPS DPB) Proposal in C.5.2.1: Add in the decoding process that when a new VPS is activated, all pictures in the DPB are marked as unused for reference 418 //#define H_MV_HLS_8_HRD_Q0154_10 0 // #10 (HRD /Q0154/DPB Flushing and parameters) On picture flushing and DPB parameters Decision: Adopted (some details to be discussed further in BoG). 419 //#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 421 // Others 422 //#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 :// #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 //#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 377 448 378 449 … … 380 451 /////////////////////////////////// HM RELATED DEFINES //////////////////////////////// 381 452 ///////////////////////////////////////////////////////////////////////////////////////// 382 #define BUGFIX_INTRAPERIOD 1 453 #define HARMONIZE_GOP_FIRST_FIELD_COUPLE 1 454 #define FIX_FIELD_DEPTH 1 455 #if H_MV 456 #define EFFICIENT_FIELD_IRAP 0 457 #else 458 #define EFFICIENT_FIELD_IRAP 1 459 #endif 460 #define ALLOW_RECOVERY_POINT_AS_RAP 1 461 #define BUGFIX_INTRAPERIOD 1 383 462 #define SAO_ENCODE_ALLOW_USE_PREDEBLOCK 1 384 463 464 #define SAO_SGN_FUNC 1 465 385 466 #define FIX1172 1 ///< fix ticket #1172 467 468 #define SETTING_PIC_OUTPUT_MARK 1 469 #define SETTING_NO_OUT_PIC_PRIOR 1 470 #define FIX_EMPTY_PAYLOAD_NAL 1 471 #define FIX_WRITING_OUTPUT 1 472 #define FIX_OUTPUT_EOS 1 473 474 #define FIX_POC_CRA_NORASL_OUTPUT 1 386 475 387 476 #define MAX_NUM_PICS_IN_SOP 1024 … … 923 1012 #if H_MV 924 1013 1014 #if !H_MV_HLS_8_SPS_NODOC_48 925 1015 enum PpsExtensionTypes 926 1016 { … … 944 1034 PS_EX_T_MAX_NUM = 8 945 1035 }; 946 1036 #endif 947 1037 /// scalability types 948 1038 enum ScalabilityType -
trunk/source/Lib/TLibDecoder/AnnexBread.h
r872 r964 65 65 , m_Input(istream) 66 66 { 67 istream.exceptions(std::istream::eofbit );67 istream.exceptions(std::istream::eofbit | std::istream::badbit); 68 68 } 69 69 -
trunk/source/Lib/TLibDecoder/NALread.cpp
r872 r964 127 127 else 128 128 { 129 #if H_MV_HLS_8_GEN_Q0108_13 130 131 // If nal_unit_type is in the range of BLA_W_LP to RSV_IRAP_VCL23, inclusive, i.e. the coded 132 // slice segment belongs to an IRAP picture, TemporalId shall be equal to 0. 133 // Otherwise, when nal_unit_type is equal to TSA_R, TSA_N, STSA_R, or STSA_N, TemporalId shall not be equal to 0. 134 // Otherwise, if nal_unit_type is equal to TSA or TSA_N, TemporalId shall not be equal to 0. 135 // Otherwise, when nuh_layer_id is equal to 0 and nal_unit_type is equal to STSA_R or STSA_N, 136 // TemporalId shall not be equal to 0. 137 138 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_R 139 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_N ); 140 141 assert( nalu.m_layerId > 0 142 || ( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_R 143 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_N ) ); 144 #else 129 145 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_R 130 146 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_N 131 147 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_R 132 148 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_N ); 149 #endif 133 150 } 134 151 } -
trunk/source/Lib/TLibDecoder/SEIread.cpp
r884 r964 399 399 { 400 400 UInt val; 401 READ_CODE(4, val, "active_v ps_id");sei.activeVPSId = val;402 READ_FLAG( val, "full_random_access_flag"); sei.m_fullRandomAccessFlag = val ? true : false;403 READ_FLAG( val, "no_param_set_update_flag"); sei.m_noParamSetUpdateFlag = val ? true : false;401 READ_CODE(4, val, "active_video_parameter_set_id"); sei.activeVPSId = val; 402 READ_FLAG( val, "self_contained_cvs_flag"); sei.m_selfContainedCvsFlag = val ? true : false; 403 READ_FLAG( val, "no_parameter_set_update_flag"); sei.m_noParameterSetUpdateFlag = val ? true : false; 404 404 READ_UVLC( val, "num_sps_ids_minus1"); sei.numSpsIdsMinus1 = val; 405 405 406 sei.activeSeqParam SetId.resize(sei.numSpsIdsMinus1 + 1);406 sei.activeSeqParameterSetId.resize(sei.numSpsIdsMinus1 + 1); 407 407 for (Int i=0; i < (sei.numSpsIdsMinus1 + 1); i++) 408 408 { 409 READ_UVLC(val, "active_seq_param_set_id"); sei.activeSeqParamSetId[i] = val; 410 } 411 412 UInt uibits = m_pcBitstream->getNumBitsUntilByteAligned(); 413 414 while(uibits--) 415 { 416 READ_FLAG(val, "alignment_bit"); 417 } 409 READ_UVLC(val, "active_seq_parameter_set_id"); sei.activeSeqParameterSetId[i] = val; 410 } 411 412 xParseByteAlign(); 418 413 } 419 414 … … 681 676 case 4: 682 677 { 683 READ_CODE( 8, val, "camera_iso_speed_idc" ); sei.m_cameraIsoSpeed Value= val;684 if( sei.m_cameraIsoSpeed Value== 255) //Extended_ISO678 READ_CODE( 8, val, "camera_iso_speed_idc" ); sei.m_cameraIsoSpeedIdc = val; 679 if( sei.m_cameraIsoSpeedIdc == 255) //Extended_ISO 685 680 { 686 681 READ_CODE( 32, val, "camera_iso_speed_value" ); sei.m_cameraIsoSpeedValue = val; 682 } 683 READ_CODE( 8, val, "exposure_index_idc" ); sei.m_exposureIndexIdc = val; 684 if( sei.m_exposureIndexIdc == 255) //Extended_ISO 685 { 686 READ_CODE( 32, val, "exposure_index_value" ); sei.m_exposureIndexValue = val; 687 687 } 688 688 READ_FLAG( val, "exposure_compensation_value_sign_flag" ); sei.m_exposureCompensationValueSignFlag = val; -
trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
r950 r964 364 364 READ_FLAG( uiCode, "slice_segment_header_extension_present_flag"); 365 365 pcPPS->setSliceHeaderExtensionPresentFlag(uiCode); 366 366 367 #if H_MV 368 READ_FLAG( uiCode, "pps_extension_present_flag"); 369 #else 367 370 READ_FLAG( uiCode, "pps_extension_flag"); 371 #endif 368 372 if (uiCode) 369 373 { 374 370 375 #if H_MV 376 #if H_MV_HLS_8_SPS_NODOC_48 377 READ_FLAG( uiCode, "pps_range_extensions_flag" ); pcPPS->setPpsRangeExtensionsFlag( uiCode == 1 ); 378 READ_FLAG( uiCode, "pps_multilayer_extension_flag" ); pcPPS->setPpsMultilayerExtensionFlag( uiCode == 1 ); 379 #if !H_3D 380 READ_CODE( 6, uiCode, "pps_extension_6bits" ); pcPPS->setPpsExtension6bits( uiCode ); 381 #else 382 READ_FLAG( uiCode, "pps_3d_extension_flag" ); pcPPS->setPps3dExtensionFlag( uiCode == 1 ); 383 READ_CODE( 5, uiCode, "pps_extension_5bits" ); pcPPS->setPpsExtension5bits( uiCode ); 384 #endif 385 if ( pcPPS->getPpsRangeExtensionsFlag() ) 386 { 387 assert(0); 388 } 389 390 if ( pcPPS->getPpsMultilayerExtensionFlag() ) 391 { 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 396 } 397 #if !H_3D 398 if ( pcPPS->getPpsExtension6bits() ) 399 { 400 #else 401 if ( pcPPS->getPps3dExtensionFlag() ) 402 { 403 parsePPSExtension( pcPPS, pcVPS ); 404 } 405 if ( pcPPS->getPpsExtension5bits() ) 406 { 407 #endif 408 #else 371 409 for ( Int i = 0; i < PPS_EX_T_MAX_NUM; i++ ) 372 410 { … … 395 433 { 396 434 #endif 435 #endif 436 397 437 while ( xMoreRbspData() ) 398 438 { … … 845 885 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) 846 886 { 847 #if H_MV848 887 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1[i]"); 849 #else850 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1");851 #endif852 888 pcSPS->setMaxDecPicBuffering( uiCode + 1, i); 853 #if H_MV854 889 READ_UVLC ( uiCode, "sps_num_reorder_pics[i]" ); 855 #else856 READ_UVLC ( uiCode, "sps_num_reorder_pics" );857 #endif858 890 pcSPS->setNumReorderPics(uiCode, i); 859 #if H_MV860 891 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1[i]"); 861 #else862 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1");863 #endif864 892 pcSPS->setMaxLatencyIncrease( uiCode, i ); 865 893 … … 978 1006 } 979 1007 1008 1009 #if H_MV 1010 READ_FLAG( uiCode, "sps_extension_present_flag"); 1011 pcSPS->setSpsExtensionPresentFlag( uiCode ); 1012 if (pcSPS->getSpsExtensionPresentFlag( ) ) 1013 #else 980 1014 READ_FLAG( uiCode, "sps_extension_flag"); 1015 if (uiCode) 1016 #endif 1017 { 981 1018 #if H_MV 982 pcSPS->setSpsExtensionFlag( uiCode ); 983 if (pcSPS->getSpsExtensionFlag( ) ) 984 #else 985 if (uiCode) 986 #endif 987 { 988 #if H_MV 1019 #if H_MV_HLS_8_SPS_NODOC_48 1020 READ_FLAG( uiCode, "sps_range_extensions_flag" ); pcSPS->setSpsRangeExtensionsFlag( uiCode == 1 ); 1021 READ_FLAG( uiCode, "sps_multilayer_extension_flag" ); pcSPS->setSpsMultilayerExtensionFlag( uiCode == 1 ); 1022 #if !H_3D 1023 READ_CODE( 6, uiCode, "sps_extension_6bits" ); pcSPS->setSpsExtension6bits( uiCode ); 1024 #else 1025 READ_FLAG( uiCode, "sps_3d_extension_flag" ); pcSPS->setSps3dExtensionFlag( uiCode == 1 ); 1026 READ_CODE( 5, uiCode, "sps_extension_5bits" ); pcSPS->setSpsExtension5bits( uiCode ); 1027 #endif 1028 } 1029 1030 if ( pcSPS->getSpsRangeExtensionsFlag() ) 1031 { 1032 assert( 0 ); 1033 } 1034 1035 if ( pcSPS->getSpsMultilayerExtensionFlag() ) 1036 { 1037 parseSPSExtension( pcSPS ); 1038 } 1039 1040 #if H_3D 1041 if ( pcSPS->getSps3dExtensionFlag() ) 1042 { 1043 parseSPSExtension2( pcSPS, viewIndex, depthFlag ); 1044 } 1045 1046 if ( pcSPS->getSpsExtension5bits() ) 1047 { 1048 #else 1049 if ( pcSPS->getSpsExtension6bits() ) 1050 { 1051 #endif 1052 #else 989 1053 for (Int i = 0; i < PS_EX_T_MAX_NUM; i++) 990 1054 { … … 1012 1076 { 1013 1077 #endif 1078 #endif 1014 1079 while ( xMoreRbspData() ) 1015 1080 { 1016 1081 READ_FLAG( uiCode, "sps_extension_data_flag"); 1017 1082 } 1018 #if H_MV 1083 #if H_MV && !H_MV_HLS_8_SPS_NODOC_48 1019 1084 } 1020 1085 #endif … … 1067 1132 1068 1133 READ_CODE( 4, uiCode, "vps_video_parameter_set_id" ); pcVPS->setVPSId( uiCode ); 1134 #if H_MV_HLS_8_SYN_Q0041_03 1135 READ_FLAG( uiCode, "vps_base_layer_internal_flag" ); pcVPS->setVpsBaseLayerInternalFlag( uiCode == 1 ); 1136 READ_FLAG( uiCode, "vps_reserved_one_bit" ); assert( uiCode == 1 ); 1137 #else 1069 1138 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); 1139 #endif 1070 1140 #if H_MV 1071 1141 READ_CODE( 6, uiCode, "vps_max_layers_minus1" ); pcVPS->setMaxLayersMinus1( std::min( uiCode, (UInt) ( MAX_NUM_LAYER_IDS-1) ) ); … … 1073 1143 READ_CODE( 6, uiCode, "vps_reserved_zero_6bits" ); assert(uiCode == 0); 1074 1144 #endif 1075 READ_CODE( 3, uiCode, "vps_max_sub_layers_minus1" ); pcVPS->setMaxTLayers( uiCode + 1 ); 1145 READ_CODE( 3, uiCode, "vps_max_sub_layers_minus1" ); pcVPS->setMaxTLayers( uiCode + 1 ); assert(uiCode+1 <= MAX_TLAYER); 1076 1146 READ_FLAG( uiCode, "vps_temporal_id_nesting_flag" ); pcVPS->setTemporalNestingFlag( uiCode ? true:false ); 1077 1147 assert (pcVPS->getMaxTLayers()>1||pcVPS->getTemporalNestingFlag()); … … 1151 1221 } 1152 1222 } 1223 #if H_MV_HLS_8_RPS_Q0100_36 1224 READ_FLAG( uiCode, "vps_extension_flag" ); pcVPS->setVpsExtensionFlag( uiCode == 1 ? true : false ); 1225 if ( pcVPS->getVpsExtensionFlag() ) 1226 #else 1153 1227 READ_FLAG( uiCode, "vps_extension_flag" ); 1154 1228 if (uiCode) 1229 #endif 1155 1230 { 1156 1231 #if H_MV … … 1187 1262 { 1188 1263 UInt uiCode; 1264 #if !H_MV_HLS_8_SYN_Q0041_03 1189 1265 READ_FLAG( uiCode, "avc_base_layer_flag" ); pcVPS->setAvcBaseLayerFlag( uiCode == 1 ? true : false ); 1266 #endif 1190 1267 1191 1268 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); … … 1267 1344 READ_CODE( 3, uiCode, "sub_layers_vps_max_minus1" ); pcVPS->setSubLayersVpsMaxMinus1( i, uiCode ); 1268 1345 pcVPS->checkSubLayersVpsMaxMinus1( i ); 1269 1270 1346 } 1271 1347 } … … 1294 1370 1295 1371 READ_FLAG( uiCode, "all_ref_layers_active_flag" ); pcVPS->setAllRefLayersActiveFlag( uiCode == 1 ); 1296 1297 1372 READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1298 1373 … … 1309 1384 } 1310 1385 1311 READ_UVLC( uiCode, "num_add_output_layer_sets" ); pcVPS->setNumAddOutputLayerSets( uiCode ); 1386 #if H_MV_HLS_8_SYN_39_19 1387 if ( pcVPS->getNumIndependentLayers() > 1 ) 1388 { 1389 READ_UVLC( uiCode, "num_add_layer_sets" ); pcVPS->setNumAddLayerSets( uiCode ); 1390 } 1391 for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++) 1392 { 1393 for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++) 1394 { 1395 READ_CODE( pcVPS->getHighestLayerIdxPlus1Len( j ) , uiCode, "highest_layer_idx_plus1" ); pcVPS->setHighestLayerIdxPlus1( i, j, uiCode ); 1396 } 1397 } 1398 if (pcVPS->getNumLayerSets() > 1) 1399 { 1400 READ_UVLC( uiCode, "num_add_olss" ); pcVPS->setNumAddOlss( uiCode ); 1401 READ_CODE( 2, uiCode, "default_output_layer_idc" ); pcVPS->setDefaultOutputLayerIdc( std::min( uiCode, (UInt) 2 ) ); 1402 } 1403 1404 pcVPS->initTargetLayerIdLists( ); 1405 1406 #else 1407 READ_UVLC( uiCode, "num_add_layer_sets" ); pcVPS->setNumAddLayerSets( uiCode ); 1312 1408 pcVPS->initTargetLayerIdLists( ); 1313 1409 if( pcVPS->getNumOutputLayerSets() > 1) 1314 1410 { 1315 READ_CODE( 2, uiCode, "default_ target_output_layer_idc" ); pcVPS->setDefaultTargetOutputLayerIdc( std::min( uiCode, (UInt) 2 ) );1411 READ_CODE( 2, uiCode, "default_output_layer_idc" ); pcVPS->setDefaultOutputLayerIdc( std::min( uiCode, (UInt) 2 ) ); 1316 1412 } 1413 #endif 1317 1414 1318 1415 pcVPS->setOutputLayerFlag(0, 0, pcVPS->inferOutputLayerFlag( 0, 0 )); 1319 pcVPS->set OutputLayerSetIdxMinus1(0, -1);1416 pcVPS->setLayerSetIdxForOlsMinus1(0, -1); 1320 1417 1321 1418 pcVPS->deriveTargetLayerIdList( 0 ); 1419 1322 1420 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1323 1421 { 1422 #if H_MV_HLS_8_SYN_39_19 1423 if( i >= pcVPS->getNumLayerSets( ) ) 1424 #else 1324 1425 if( i > pcVPS->getVpsNumLayerSetsMinus1( ) ) 1426 #endif 1325 1427 { 1326 READ_UVLC( uiCode, " output_layer_set_idx_minus1[i]" ); pcVPS->setOutputLayerSetIdxMinus1( i, uiCode );1327 } 1328 1329 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefault TargetOutputLayerIdc() == 2 )1428 READ_UVLC( uiCode, "layer_set_idx_for_ols_minus1[i]" ); pcVPS->setLayerSetIdxForOlsMinus1( i, uiCode ); 1429 } 1430 1431 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultOutputLayerIdc() == 2 ) 1330 1432 { 1331 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS-> getLayerSetIdxForOutputLayerSet( i ) ); j++ )1433 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx( i ) ); j++ ) 1332 1434 { 1333 1435 READ_FLAG( uiCode, "output_layer_flag" ); pcVPS->setOutputLayerFlag( i, j, uiCode == 1 ); … … 1336 1438 else 1337 1439 { 1338 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS-> getLayerSetIdxForOutputLayerSet( i ) ); j++ )1440 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx( i ) ); j++ ) 1339 1441 { 1340 1442 pcVPS->setOutputLayerFlag(i,j, pcVPS->inferOutputLayerFlag( i, j )); … … 1347 1449 READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" ); pcVPS->setProfileLevelTierIdx( i , uiCode ); 1348 1450 } 1349 1350 1451 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) 1351 1452 { … … 1354 1455 } 1355 1456 1457 #if !H_MV_HLS_8_PMS_Q0195_20 1356 1458 READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 ); 1357 1459 if ( pcVPS->getRepFormatIdxPresentFlag() ) … … 1359 1461 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode ); 1360 1462 } 1463 #else 1464 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); pcVPS->setVpsNumRepFormatsMinus1( uiCode ); 1465 #endif 1361 1466 1362 1467 for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ ) … … 1369 1474 } 1370 1475 1476 #if H_MV_HLS_8_PMS_Q0195_20 1477 if ( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1478 { 1479 READ_FLAG( uiCode, "rep_format_idx_present_flag" ); pcVPS->setRepFormatIdxPresentFlag( uiCode == 1 ); 1480 } 1481 #endif 1371 1482 if( pcVPS->getRepFormatIdxPresentFlag() ) 1372 1483 { 1484 #if H_MV_HLS_8_SYN_Q0041_03 1485 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1486 #else 1373 1487 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1374 { 1488 #endif 1489 { 1490 #if !H_MV_HLS_8_PMS_Q0195_20 1375 1491 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1376 1492 { 1493 #endif 1377 1494 READ_CODE( pcVPS->getVpsRepFormatIdxLen(), uiCode, "vps_rep_format_idx[i]" ); pcVPS->setVpsRepFormatIdx( i, uiCode ); 1378 } 1379 } 1380 } 1495 #if !H_MV_HLS_8_PMS_Q0195_20 1496 } 1497 #endif 1498 } 1499 } 1500 #if H_MV_HLS_8_PMS_Q0195_20 1501 else 1502 { 1503 #if H_MV_HLS_8_SYN_Q0041_03 1504 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1505 #else 1506 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1507 #endif 1508 { 1509 pcVPS->setVpsRepFormatIdx( i, pcVPS->inferVpsRepFormatIdx( i ) ); 1510 } 1511 } 1512 #endif 1381 1513 1382 1514 READ_FLAG( uiCode, "max_one_active_ref_layer_flag" ); pcVPS->setMaxOneActiveRefLayerFlag ( uiCode == 1 ); … … 1403 1535 } 1404 1536 1537 #if H_MV_HLS_8_SYN_Q0041_03 1538 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1539 { 1540 for( Int j = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; j < i; j++ ) 1541 #else 1405 1542 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1406 1543 { 1407 1544 for( Int j = 0; j < i; j++ ) 1545 #endif 1408 1546 { 1409 1547 if (pcVPS->getDirectDependencyFlag( i, j) ) … … 1415 1553 else 1416 1554 { 1555 1417 1556 READ_CODE( pcVPS->getDirectDepTypeLenMinus2( ) + 2, uiCode, "direct_dependency_type[i][j]" ); pcVPS->setDirectDependencyType( i, j , uiCode); 1418 1557 } … … 1420 1559 } 1421 1560 } 1422 1423 1561 READ_UVLC( uiCode, "vps_non_vui_extension_length" ); pcVPS->setVpsNonVuiExtensionLength( uiCode ); 1424 1562 for ( Int i = 1; i <= pcVPS->getVpsNonVuiExtensionLength(); i++ ) … … 1437 1575 pcVPSVUI->inferVpsVui( false ); 1438 1576 } 1439 1440 1577 pcVPS->checkVPSExtensionSyntax(); 1441 1578 } … … 1492 1629 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1493 1630 { 1631 #if H_MV_HLS_8_SYN_Q0041_03 1632 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1633 #else 1494 1634 for( Int i = 0; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1495 { 1635 #endif 1636 { 1637 #if H_MV_HLS_8_MIS_Q0102_30 1638 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1639 #else 1496 1640 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ ) 1641 #endif 1497 1642 { 1498 1643 if( pcVPSVUI->getBitRatePresentVpsFlag( ) ) … … 1551 1696 } 1552 1697 } 1553 1554 1698 READ_FLAG( uiCode, "tiles_not_in_use_flag" ); pcVPSVUI->setTilesNotInUseFlag( uiCode == 1 ); 1555 1699 if( !pcVPSVUI->getTilesNotInUseFlag() ) 1556 1700 { 1701 #if H_MV_HLS_8_SYN_Q0041_03 1702 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1703 #else 1557 1704 for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1705 #endif 1558 1706 { 1559 1707 READ_FLAG( uiCode, "tiles_in_use_flag[i]" ); pcVPSVUI->setTilesInUseFlag( i, uiCode == 1 ); … … 1563 1711 } 1564 1712 } 1565 1566 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1713 #if H_MV_HLS_8_SYN_Q0041_03 1714 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1715 #else 1716 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1717 #endif 1567 1718 { 1568 1719 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ ) … … 1586 1737 } 1587 1738 } 1588 1589 1739 READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" ); 1590 1740 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 ); … … 1596 1746 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1597 1747 { 1598 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcVPSVUI->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); 1599 if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 ) 1600 { 1601 READ_FLAG( uiCode, "ctu_based_offset_enabled_flag" ); pcVPSVUI->setCtuBasedOffsetEnabledFlag( i, j, uiCode == 1 ); 1602 if( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ) 1748 #if H_MV_HLS_8_SYN_Q0041_03 1749 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1750 { 1751 #endif 1752 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcVPSVUI->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); 1753 if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 ) 1603 1754 { 1604 READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1" ); pcVPSVUI->setMinHorizontalCtuOffsetPlus1( i, j, uiCode ); 1755 READ_FLAG( uiCode, "ctu_based_offset_enabled_flag" ); pcVPSVUI->setCtuBasedOffsetEnabledFlag( i, j, uiCode == 1 ); 1756 if( pcVPSVUI->getCtuBasedOffsetEnabledFlag( i, j ) ) 1757 { 1758 READ_UVLC( uiCode, "min_horizontal_ctu_offset_plus1" ); pcVPSVUI->setMinHorizontalCtuOffsetPlus1( i, j, uiCode ); 1759 } 1605 1760 } 1606 } 1761 #if H_MV_HLS_8_SYN_Q0041_03 1762 } 1763 #endif 1607 1764 } 1608 1765 } … … 1613 1770 { 1614 1771 parseVpsVuiBspHrdParameters( pcVPS ); 1615 }1772 } 1616 1773 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1617 1774 { … … 1651 1808 for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ ) 1652 1809 { 1810 #if H_MV_HLS_8_HRD_Q0101_04 1811 for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ ) 1812 { 1813 READ_FLAG( uiCode, "layer_in_bsp_flag" ); vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, uiCode == 1 ); 1814 #else 1653 1815 for( Int j = 0; j <= pcVPS->getMaxLayersMinus1(); j++ ) 1654 1816 { … … 1661 1823 vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, false ); // This inference seems to be missing in spec 1662 1824 } 1825 #endif 1663 1826 } 1664 1827 } … … 1667 1830 if( vpsVuiBspHrdP->getNumBitstreamPartitions( h ) ) 1668 1831 { 1669 READ_UVLC( uiCode, "num_bsp_sched_combinations" ); vpsVuiBspHrdP->setNumBspSchedCombinations( h, uiCode ); 1670 for( Int i = 0; i < vpsVuiBspHrdP->getNumBspSchedCombinations( h ); i++ ) 1832 READ_UVLC( uiCode, "num_bsp_sched_combinations_minus1" ); vpsVuiBspHrdP->setNumBspSchedCombinationsMinus1( h, uiCode ); 1833 #if H_MV_HLS_8_HRD_Q0182_05 1834 for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ ) 1835 #else 1836 for( Int i = 0; i < vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ ) 1837 #endif 1671 1838 { 1672 1839 for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ ) 1673 1840 { 1841 #if H_MV_HLS_8_HRD_Q0101_04 1842 READ_CODE( vpsVuiBspHrdP->getBspCombHrdIdxLen(), uiCode, "bsp_comb_hrd_idx" ); vpsVuiBspHrdP->setBspCombHrdIdx( h, i, j, uiCode ); 1843 #else 1674 1844 READ_UVLC( uiCode, "bsp_comb_hrd_idx" ); vpsVuiBspHrdP->setBspCombHrdIdx( h, i, j, uiCode ); 1845 #endif 1675 1846 READ_UVLC( uiCode, "bsp_comb_sched_idx" ); vpsVuiBspHrdP->setBspCombSchedIdx( h, i, j, uiCode ); 1847 #if H_MV_HLS_8_HRD_Q0101_04 1848 vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j ); 1849 #endif 1676 1850 } 1677 1851 } … … 1698 1872 for( Int i = 1; i < vps->getNumOutputLayerSets(); i++ ) 1699 1873 { 1874 #if H_MV_HLS_8_MIS_Q0102_30 1875 Int currLsIdx = vps->olsIdxToLsIdx( i ); 1876 #endif 1700 1877 READ_FLAG( uiCode, "sub_layer_flag_info_present_flag" ); dpbSize->setSubLayerFlagInfoPresentFlag( i, uiCode == 1 ); 1878 #if H_MV_HLS_8_MIS_Q0102_30 1879 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ ) 1880 #else 1701 1881 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1882 #endif 1702 1883 { 1703 1884 if( j > 0 && dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) … … 1707 1888 if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) 1708 1889 { 1709 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ ) 1890 #if H_MV_HLS_8_MIS_Q0102_30 1891 for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ ) 1892 #else 1893 for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i )); k++ ) 1894 #endif 1710 1895 { 1711 1896 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); 1712 1897 } 1713 1898 READ_UVLC( uiCode, "max_vps_num_reorder_pics" ); dpbSize->setMaxVpsNumReorderPics( i, j, uiCode ); 1714 #if H_MV_HLS7_GEN1715 if( vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ) != vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ) )1716 {1717 for( Int k = 0; k < vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ )1718 {1719 READ_UVLC( uiCode, "max_vps_layer_dec_pic_buff_minus1" ); dpbSize->setMaxVpsLayerDecPicBuffMinus1( i, k, j, uiCode );1720 }1721 }1722 #endif1723 1899 READ_UVLC( uiCode, "max_vps_latency_increase_plus1" ); dpbSize->setMaxVpsLatencyIncreasePlus1( i, j, uiCode ); 1724 1900 } … … 1727 1903 if ( j > 0 ) 1728 1904 { 1729 for( Int k = 0; k < vps->getNumSubDpbs( vps->getOutputLayerSetIdxMinus1( i ) + 1 ); k++ ) 1905 #if H_MV_HLS_8_DBP_NODOC_42 1906 for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ ) 1907 #else 1908 for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i ) ); k++ ) 1909 #endif 1730 1910 { 1731 1911 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); … … 1858 2038 #endif 1859 2039 2040 #if H_MV_HLS_8_HRD_Q0102_08 2041 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx) 2042 #else 1860 2043 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager) 2044 #endif 1861 2045 { 1862 2046 UInt uiCode; … … 1876 2060 if( rpcSlice->getRapPicFlag()) 1877 2061 { 1878 READ_FLAG( uiCode, "no_output_of_prior_pics_flag" ); //ignored 1879 } 2062 READ_FLAG( uiCode, "no_output_of_prior_pics_flag" ); //ignored -- updated already 2063 #if SETTING_NO_OUT_PIC_PRIOR 2064 rpcSlice->setNoOutputPriorPicsFlag(uiCode ? true : false); 2065 #else 2066 rpcSlice->setNoOutputPicPrior( false ); 2067 #endif 2068 } 2069 1880 2070 READ_UVLC ( uiCode, "slice_pic_parameter_set_id" ); rpcSlice->setPPSId(uiCode); 1881 2071 pps = parameterSetManager->getPrefetchedPPS(uiCode); … … 1891 2081 sps->inferRepFormat ( vps , rpcSlice->getLayerId() ); 1892 2082 sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 2083 #if H_MV_HLS_8_HRD_Q0102_08 2084 sps->inferSpsMaxDecPicBufferingMinus1( vps, targetOlsIdx, rpcSlice->getLayerId(), false ); 2085 #endif 2086 #if H_MV_HLS_8_RPS_Q0100_36 2087 vps->inferDbpSizeLayerSetZero( sps, false ); 2088 #endif 2089 1893 2090 if ( sps->getVuiParametersPresentFlag() ) 1894 2091 { … … 1944 2141 } 1945 2142 2143 #if H0044_POC_LSB_NOT_PRESENT 2144 UInt slicePicOrderCntLsb = 0; 2145 #endif 2146 1946 2147 if(!rpcSlice->getDependentSliceSegmentFlag()) 1947 2148 { … … 1994 2195 1995 2196 #if H_MV 2197 #if !H0044_POC_LSB_NOT_PRESENT 1996 2198 UInt slicePicOrderCntLsb = 0; 2199 #endif 1997 2200 Int iPOClsb = slicePicOrderCntLsb; // Needed later 1998 2201 if ( (rpcSlice->getLayerId() > 0 && !vps->getPocLsbNotPresentFlag( rpcSlice->getLayerIdInVps())) || !rpcSlice->getIdrPicFlag() ) … … 2000 2203 READ_CODE(sps->getBitsForPOC(), slicePicOrderCntLsb, "slice_pic_order_cnt_lsb"); 2001 2204 } 2205 #if H_MV_HLS_8_POC_Q0142_32 2206 rpcSlice->setSlicePicOrderCntLsb( slicePicOrderCntLsb ); 2207 #endif 2002 2208 2003 2209 Bool picOrderCntMSBZeroFlag = false; … … 2093 2299 READ_FLAG( uiCode, "short_term_ref_pic_set_sps_flag" ); 2094 2300 if(uiCode == 0) // use short-term reference picture set explicitly signalled in slice header 2095 { 2301 { 2096 2302 parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets()); 2303 #if H_MV_HLS_8_RPS_Q0100_36 2304 if ( !rps->getInterRPSPrediction( ) ) 2305 { // check sum of num_positive_pics and num_negative_pics 2306 rps->checkMaxNumPics( 2307 vps->getVpsExtensionFlag(), 2308 vps->getMaxNumPics( rpcSlice->getLayerId() ), 2309 rpcSlice->getLayerId(), 2310 sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 ); 2311 } 2312 #endif 2097 2313 } 2098 2314 else // use reference to short-term reference picture set in PPS … … 2198 2414 rps->setNumberOfPictures(offset); 2199 2415 } 2416 #if H_MV_HLS_8_RPS_Q0100_36 2417 if ( !rps->getInterRPSPrediction( ) ) 2418 { // check sum of NumPositivePics, NumNegativePics, num_long_term_sps and num_long_term_pics 2419 rps->checkMaxNumPics( 2420 vps->getVpsExtensionFlag(), 2421 vps->getMaxNumPics( rpcSlice->getLayerId() ), 2422 rpcSlice->getLayerId(), 2423 sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 ); 2424 } 2425 #endif 2200 2426 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 2201 2427 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL … … 2578 2804 rpcSlice->setPocResetIdc( 0 ); 2579 2805 } 2580 2806 #if H_MV_HLS_8_POC_Q0142_32 2807 rpcSlice->checkPocResetIdc(); 2808 #endif 2809 2810 #if H0044_POC_LSB_NOT_PRESENT 2811 if ( rpcSlice->getVPS()->getPocLsbNotPresentFlag(rpcSlice->getLayerId()) && slicePicOrderCntLsb > 0 ) 2812 { 2813 assert( rpcSlice->getPocResetIdc() != 2 ); 2814 } 2815 #endif 2581 2816 if( rpcSlice->getPocResetIdc() != 0 ) 2582 2817 { … … 2593 2828 READ_FLAG( uiCode, "full_poc_reset_flag" ); rpcSlice->setFullPocResetFlag( uiCode == 1 ); 2594 2829 READ_CODE( rpcSlice->getPocLsbValLen() , uiCode, "poc_lsb_val" ); rpcSlice->setPocLsbVal( uiCode ); 2830 #if !H_MV_HLS_8_POC_Q0142_32 2831 #if H0044_POC_LSB_NOT_PRESENT 2832 if ( rpcSlice->getVPS()->getPocLsbNotPresentFlag(rpcSlice->getLayerId()) && rpcSlice->getFullPocResetFlag() ) 2833 { 2834 assert( rpcSlice->getPocLsbVal() == 0 ); 2835 } 2836 #endif 2837 #endif 2595 2838 } 2596 2597 // Derive the value of PocMsbValRequiredFlag 2839 #if H_MV_HLS_8_POC_Q0142_32 2840 rpcSlice->checkPocLsbVal(); 2841 #endif 2842 2843 // Derive the value of PocMs8bValRequiredFlag 2598 2844 rpcSlice->setPocMsbValRequiredFlag( rpcSlice->getCraPicFlag() || rpcSlice->getBlaPicFlag() 2599 2845 /* || TODO related to vps_poc_lsb_aligned_flag */ … … 2606 2852 else 2607 2853 { 2854 #if H_MV_HLS_8_POC_Q0146_15 2855 rpcSlice->setPocMsbValPresentFlag( rpcSlice->inferPocMsbValPresentFlag( ) ); 2856 #else 2608 2857 if( rpcSlice->getPocMsbValRequiredFlag() ) 2609 2858 { … … 2614 2863 rpcSlice->setPocMsbValPresentFlag( false ); 2615 2864 } 2865 #endif 2616 2866 } 2617 2867 … … 2633 2883 UInt ignore; 2634 2884 READ_CODE(8,ignore,"slice_header_extension_data_byte"); 2635 } 2636 } 2885 } 2637 2886 #endif 2638 2887 } -
trunk/source/Lib/TLibDecoder/TDecCAVLC.h
r884 r964 67 67 Int** m_aaiTempOffset; 68 68 #endif 69 69 70 public: 70 71 … … 80 81 Void parseRepFormat ( Int i, TComRepFormat* curRepFormat, TComRepFormat* prevRepFormat ); 81 82 Void parseVPSVUI ( TComVPS* pcVPS ); 82 Void parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo );83 Void parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ); 83 84 Void parseDpbSize ( TComVPS* pcVPS ); 84 Void parseVpsVuiBspHrdParameters( TComVPS* pcVPS );85 Void parseVpsVuiBspHrdParameters( TComVPS* pcVPS ); 85 86 #endif 86 87 … … 108 109 Void parseProfileTier (ProfileTierLevel *ptl); 109 110 Void parseHrdParameters (TComHRD *hrd, Bool cprms_present_flag, UInt tempLevelHigh); 111 #if H_MV_HLS_8_HRD_Q0102_08 112 Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx); 113 #else 110 114 Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager); 115 #endif 111 116 Void parseTerminatingBit ( UInt& ruiBit ); 112 117 -
trunk/source/Lib/TLibDecoder/TDecCu.cpp
r950 r964 1113 1113 { 1114 1114 UInt uiInitTrDepth = ( pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1 ); 1115 UInt uiNumPart = pcCU->getNumPart Inter();1115 UInt uiNumPart = pcCU->getNumPartitions(); 1116 1116 UInt uiNumQParts = pcCU->getTotalNumPart() >> 2; 1117 1117 -
trunk/source/Lib/TLibDecoder/TDecEntropy.h
r884 r964 67 67 virtual Void parseVPS ( TComVPS* pcVPS ) = 0; 68 68 #if H_3D 69 virtual Void parseSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ) = 0;69 virtual Void parseSPS ( TComSPS* pcSPS, Int viewIndex, Bool depthFlag ) = 0; 70 70 #else 71 71 virtual Void parseSPS ( TComSPS* pcSPS ) = 0; … … 77 77 #endif 78 78 79 #if H_MV_HLS_8_HRD_Q0102_08 80 virtual Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx ) = 0; 81 #else 79 82 virtual Void parseSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager) = 0; 83 #endif 80 84 81 85 virtual Void parseTerminatingBit ( UInt& ruilsLast ) = 0; … … 125 129 virtual Void updateContextTables( SliceType eSliceType, Int iQp ) = 0; 126 130 127 virtual ~TDecEntropyIf() {} 131 virtual ~TDecEntropyIf() {}; 128 132 }; 129 133 … … 160 164 Void decodePPS ( TComPPS* pcPPS ) { m_pcEntropyDecoderIf->parsePPS(pcPPS); } 161 165 #endif 166 #if H_MV_HLS_8_HRD_Q0102_08 167 Void decodeSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx) { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager, targetOlsIdx ); } 168 #else 162 169 Void decodeSliceHeader ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager) { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager); } 163 170 #endif 164 171 Void decodeTerminatingBit ( UInt& ruiIsLast ) { m_pcEntropyDecoderIf->parseTerminatingBit(ruiIsLast); } 165 172 -
trunk/source/Lib/TLibDecoder/TDecGop.cpp
r872 r964 249 249 } 250 250 251 #if !H_MV_HLS_7_VPS_P0300_27 252 #if SETTING_PIC_OUTPUT_MARK 253 rpcPic->setOutputMark(rpcPic->getSlice(0)->getPicOutputFlag() ? true : false); 254 #else 251 255 rpcPic->setOutputMark(true); 256 #endif 252 257 rpcPic->setReconMark(true); 258 #endif 253 259 } 254 260 -
trunk/source/Lib/TLibDecoder/TDecSbac.cpp
r950 r964 957 957 assert(0); 958 958 } 959 #endif 959 960 #if H_MV_ENC_DEC_TRAC 960 961 DTRACE_CU("part_mode", eMode ) 961 962 #endif 963 #if H_3D_QTLPC 962 964 } 963 965 #endif -
trunk/source/Lib/TLibDecoder/TDecSbac.h
r950 r964 87 87 #endif 88 88 89 #if H_MV_HLS_8_HRD_Q0102_08 90 Void parseSliceHeader ( TComSlice*& /*rpcSlice*/, ParameterSetManagerDecoder* /*parameterSetManager*/, Int targetOlsIdx ) {} 91 #else 89 92 Void parseSliceHeader ( TComSlice*& /*rpcSlice*/, ParameterSetManagerDecoder* /*parameterSetManager*/) {} 93 #endif 90 94 Void parseTerminatingBit ( UInt& ruiBit ); 91 95 Void parseMVPIdx ( Int& riMVPIdx ); -
trunk/source/Lib/TLibDecoder/TDecTop.cpp
r884 r964 365 365 m_prevSliceSkipped = false; 366 366 m_skippedPOC = 0; 367 #if SETTING_NO_OUT_PIC_PRIOR 368 m_bFirstSliceInBitstream = true; 369 m_lastPOCNoOutputPriorPics = -1; 370 m_craNoRaslOutputFlag = false; 371 m_isNoOutputPriorPics = false; 372 #endif 373 #if H0056_EOS_CHECKS 374 m_isLastNALWasEos = false; 375 #endif 367 376 #if H_MV 368 377 m_layerId = 0; … … 372 381 m_isDepth = false; 373 382 m_pcCamParsCollector = 0; 383 #endif 384 #if H_MV_HLS_8_HRD_Q0102_08 385 m_targetOptLayerSetIdx = -1; 374 386 #endif 375 387 #endif … … 471 483 TComVPS* vps = pcSlice->getVPS(); 472 484 TComDpbSize* dpbSize = vps->getDpbSize(); 473 Int lsIdx = vps-> getLayerSetIdxForOutputLayerSet( getTargetOutputLayerSetIdx()); // Is this correct, seems to be missing in spec?485 Int lsIdx = vps->olsIdxToLsIdx( getTargetOutputLayerSetIdx()); // Is this correct, seems to be missing in spec? 474 486 Int layerIdx = vps->getIdxInLayerSet ( lsIdx, getLayerId() ); 475 487 Int subDpbIdx = dpbSize->getSubDpbAssigned( lsIdx, layerIdx ); … … 499 511 { 500 512 rpcPic->setOutputMark(false); 513 #if H_MV_HLS_7_VPS_P0300_27 514 rpcPic->setPicOutputFlag(false); 515 #endif 501 516 bBufferIsAvailable = true; 502 517 break; … … 506 521 { 507 522 rpcPic->setOutputMark(false); 523 #if H_MV_HLS_7_VPS_P0300_27 524 rpcPic->setPicOutputFlag(false); 525 #endif 508 526 rpcPic->setReconMark( false ); 509 527 rpcPic->getPicYuvRec()->setBorderExtension( false ); … … 550 568 TComSlice::markIvRefPicsAsShortTerm( m_refPicSetInterLayer0, m_refPicSetInterLayer1 ); 551 569 TComSlice::markCurrPic( pcPic ); 570 #if !H_MV_HLS_8_DBP_NODOC_42 552 571 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, targetDecLayerIdSet, m_parameterSetManagerDecoder.getActiveVPS(), m_layerId, poc ); 553 572 #endif 573 #endif 554 574 m_bFirstSliceInPicture = true; 555 575 556 576 return; 557 577 } 578 579 #if SETTING_NO_OUT_PIC_PRIOR 580 Void TDecTop::checkNoOutputPriorPics (TComList<TComPic*>*& rpcListPic) 581 { 582 if (!rpcListPic || !m_isNoOutputPriorPics) return; 583 584 TComList<TComPic*>::iterator iterPic = rpcListPic->begin(); 585 586 while (iterPic != rpcListPic->end()) 587 { 588 TComPic*& pcPicTmp = *(iterPic++); 589 if (m_lastPOCNoOutputPriorPics != pcPicTmp->getPOC()) 590 { 591 pcPicTmp->setOutputMark(false); 592 #if H_MV_HLS_7_VPS_P0300_27 593 pcPicTmp->setPicOutputFlag(false); 594 #endif 595 } 596 } 597 } 598 #endif 558 599 559 600 Void TDecTop::xCreateLostPicture(Int iLostPoc) … … 620 661 TComVPS* vps = m_parameterSetManagerDecoder.getVPS(sps->getVPSId()); 621 662 assert (vps != 0); 622 if ( false ==m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP(), m_layerId ) )663 if (!m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP(), m_layerId ) ) 623 664 #else 624 665 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP())) … … 628 669 assert (0); 629 670 } 671 672 #if H_MV_HLS_8_HRD_Q0102_08 673 sps->inferSpsMaxDecPicBufferingMinus1( vps, m_targetOptLayerSetIdx, getLayerId(), false ); 674 #endif 675 676 #if H_MV_HLS_8_RPS_Q0100_36 677 vps->inferDbpSizeLayerSetZero( sps, false ); 678 #endif 679 680 #if H_MV_HLS_8_PMS_Q0195_21 681 // When the value of vps_num_rep_formats_minus1 in the active VPS is equal to 0 682 if ( vps->getVpsNumRepFormatsMinus1() == 0 ) 683 { 684 //, it is a requirement of bitstream conformance that the value of update_rep_format_flag shall be equal to 0. 685 assert( sps->getUpdateRepFormatFlag() == false ); 686 } 687 #endif 688 689 #if H_MV_HLS_8_RPS_Q0100_36 690 sps->checkRpsMaxNumPics( vps, getLayerId() ); 691 #endif 692 693 #if H_MV_HLS_8_MIS_Q0177_22 694 if( m_layerId > 0 ) 695 { 696 sps->setTemporalIdNestingFlag( (sps->getMaxTLayers() > 1) ? vps->getTemporalNestingFlag() : true ); 697 } 698 #endif 630 699 631 700 if( pps->getDependentSliceSegmentsEnabledFlag() ) … … 719 788 m_apcSlicePilot->setLayerId( nalu.m_layerId ); 720 789 #endif 790 791 #if H_MV_HLS_8_HRD_Q0102_08 792 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder, m_targetOptLayerSetIdx ); 793 #else 721 794 m_cEntropyDecoder.decodeSliceHeader (m_apcSlicePilot, &m_parameterSetManagerDecoder); 722 795 #endif 723 796 // set POC for dependent slices in skipped pictures 724 797 if(m_apcSlicePilot->getDependentSliceSegmentFlag() && m_prevSliceSkipped) … … 741 814 #endif 742 815 816 #if SETTING_NO_OUT_PIC_PRIOR 817 //For inference of NoOutputOfPriorPicsFlag 818 if (m_apcSlicePilot->getRapPicFlag()) 819 { 820 if ((m_apcSlicePilot->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && m_apcSlicePilot->getNalUnitType() <= NAL_UNIT_CODED_SLICE_IDR_N_LP) || 821 (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA && m_bFirstSliceInSequence) || 822 (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA && m_apcSlicePilot->getHandleCraAsBlaFlag())) 823 { 824 m_apcSlicePilot->setNoRaslOutputFlag(true); 825 } 826 //the inference for NoOutputPriorPicsFlag 827 if (!m_bFirstSliceInBitstream && m_apcSlicePilot->getRapPicFlag() && m_apcSlicePilot->getNoRaslOutputFlag()) 828 { 829 if (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) 830 { 831 m_apcSlicePilot->setNoOutputPriorPicsFlag(true); 832 } 833 } 834 else 835 { 836 m_apcSlicePilot->setNoOutputPriorPicsFlag(false); 837 } 838 839 if(m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) 840 { 841 m_craNoRaslOutputFlag = m_apcSlicePilot->getNoRaslOutputFlag(); 842 } 843 } 844 if (m_apcSlicePilot->getRapPicFlag() && m_apcSlicePilot->getNoOutputPriorPicsFlag()) 845 { 846 m_lastPOCNoOutputPriorPics = m_apcSlicePilot->getPOC(); 847 m_isNoOutputPriorPics = true; 848 } 849 else 850 { 851 m_isNoOutputPriorPics = false; 852 } 853 854 //For inference of PicOutputFlag 855 if (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R) 856 { 857 if ( m_craNoRaslOutputFlag ) 858 { 859 m_apcSlicePilot->setPicOutputFlag(false); 860 } 861 } 862 #endif 863 864 #if FIX_POC_CRA_NORASL_OUTPUT 865 if (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA && m_craNoRaslOutputFlag) //Reset POC MSB when CRA has NoRaslOutputFlag equal to 1 866 { 867 Int iMaxPOClsb = 1 << m_apcSlicePilot->getSPS()->getBitsForPOC(); 868 m_apcSlicePilot->setPOC( m_apcSlicePilot->getPOC() & (iMaxPOClsb - 1) ); 869 } 870 #endif 743 871 #if H_MV 744 872 xCeckNoClrasOutput(); … … 769 897 770 898 //we should only get a different poc for a new picture (with CTU address==0) 771 if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence && ( !m_apcSlicePilot->getSliceCurStartCUAddr()==0))899 if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence && (m_apcSlicePilot->getSliceCurStartCUAddr()!=0)) 772 900 { 773 901 printf ("Warning, the first slice of a picture might have been lost!\n"); … … 810 938 } 811 939 m_bFirstSliceInSequence = false; 940 #if SETTING_NO_OUT_PIC_PRIOR 941 m_bFirstSliceInBitstream = false; 942 #endif 812 943 //detect lost reference picture and insert copy of earlier frame. 813 944 Int lostPoc; … … 1127 1258 #endif 1128 1259 #if H_3D 1129 // Preliminary fix. assuming that all sps refer to the same SPS.1260 // Preliminary fix. assuming that all sps refer to the same VPS. 1130 1261 // Parsing dependency should be resolved! 1131 1262 TComVPS* vps = m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); 1132 assert( vps != 0 ); 1263 assert( vps != 0 ); 1133 1264 m_cEntropyDecoder.decodeSPS( sps, vps->getViewIndex( m_layerId ), ( vps->getDepthId( m_layerId ) == 1 ) ); 1134 1265 #else … … 1182 1313 SEIActiveParameterSets *seiAps = (SEIActiveParameterSets*)(*activeParamSets.begin()); 1183 1314 m_parameterSetManagerDecoder.applyPrefetchedPS(); 1184 assert(seiAps->activeSeqParam SetId.size()>0);1185 #if H_MV 1186 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParam SetId[0], m_layerId ))1187 #else 1188 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParam SetId[0] ))1315 assert(seiAps->activeSeqParameterSetId.size()>0); 1316 #if H_MV 1317 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParameterSetId[0], m_layerId )) 1318 #else 1319 if (! m_parameterSetManagerDecoder.activateSPSWithSEI(seiAps->activeSeqParameterSetId[0] )) 1189 1320 #endif 1190 1321 { … … 1209 1340 case NAL_UNIT_VPS: 1210 1341 xDecodeVPS(); 1342 #if H0056_EOS_CHECKS 1343 m_isLastNALWasEos = false; 1344 #endif 1211 1345 return false; 1212 1346 … … 1221 1355 case NAL_UNIT_PREFIX_SEI: 1222 1356 case NAL_UNIT_SUFFIX_SEI: 1357 #if H0056_EOS_CHECKS 1358 if ( nalu.m_nalUnitType == NAL_UNIT_SUFFIX_SEI ) 1359 { 1360 assert( m_isLastNALWasEos == false ); 1361 } 1362 #endif 1223 1363 xDecodeSEI( nalu.m_Bitstream, nalu.m_nalUnitType ); 1224 1364 return false; … … 1240 1380 case NAL_UNIT_CODED_SLICE_RASL_N: 1241 1381 case NAL_UNIT_CODED_SLICE_RASL_R: 1382 #if H0056_EOS_CHECKS 1383 if (nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_R || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_TRAIL_N || 1384 nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_TSA_R || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_TSA_N || 1385 nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_STSA_R || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_STSA_N || 1386 nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_RADL_R || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || 1387 nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_RASL_R || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_RASL_N ) 1388 { 1389 assert( m_isLastNALWasEos == false ); 1390 } 1391 else 1392 { 1393 m_isLastNALWasEos = false; 1394 } 1395 #endif 1242 1396 #if H_MV 1243 1397 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag, sliceSkippedFlag ); … … 1247 1401 break; 1248 1402 case NAL_UNIT_EOS: 1403 #if H0056_EOS_CHECKS 1404 assert( m_isLastNALWasEos == false ); 1405 //Check layer id of the nalu. if it is not 0, give a warning message and just return without doing anything. 1406 if (nalu.m_layerId > 0) 1407 { 1408 printf( "\nThis bitstream has EOS with non-zero layer id.\n" ); 1409 return false; 1410 } 1411 m_isLastNALWasEos = true; 1412 #endif 1249 1413 m_associatedIRAPType = NAL_UNIT_INVALID; 1250 1414 m_pocCRA = 0; … … 1264 1428 return false; 1265 1429 1430 case NAL_UNIT_FILLER_DATA: 1431 #if H_MV 1432 assert( m_isLastNALWasEos == false ); 1433 #endif 1434 return false; 1266 1435 1267 1436 case NAL_UNIT_RESERVED_VCL_N10: … … 1284 1453 case NAL_UNIT_RESERVED_VCL31: 1285 1454 1286 case NAL_UNIT_FILLER_DATA:1287 1455 case NAL_UNIT_RESERVED_NVCL41: 1288 1456 case NAL_UNIT_RESERVED_NVCL42: -
trunk/source/Lib/TLibDecoder/TDecTop.h
r884 r964 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_08 198 Int m_targetOptLayerSetIdx; 199 #endif 197 200 #else 198 201 ParameterSetManagerDecoder m_parameterSetManagerDecoder; // storage for parameter sets … … 225 228 Bool m_prevSliceSkipped; 226 229 Int m_skippedPOC; 230 #if SETTING_NO_OUT_PIC_PRIOR 231 Bool m_bFirstSliceInBitstream; 232 Int m_lastPOCNoOutputPriorPics; 233 Bool m_isNoOutputPriorPics; 234 Bool m_craNoRaslOutputFlag; //value of variable NoRaslOutputFlag of the last CRA pic 235 #endif 236 #if H0056_EOS_CHECKS 237 Bool m_isLastNALWasEos; 238 #endif 227 239 228 240 #if H_MV … … 258 270 259 271 Void deletePicBuffer(); 272 #if H_MV 273 #if H_MV_HLS_7_VPS_P0300_27 274 TComVPS* getActiveVPS() { return m_parameterSetManagerDecoder.getActiveVPS( ); } 275 #endif 276 TComSPS* getActiveSPS() { return m_parameterSetManagerDecoder.getActiveSPS( m_layerId ); } 277 #else 278 TComSPS* getActiveSPS() { return m_parameterSetManagerDecoder.getActiveSPS(); } 279 #endif 260 280 261 281 #if H_MV … … 265 285 #endif 266 286 287 #if SETTING_NO_OUT_PIC_PRIOR 288 Void checkNoOutputPriorPics (TComList<TComPic*>*& rpcListPic); 289 290 Bool getNoOutputPriorPicsFlag () { return m_isNoOutputPriorPics; } 291 Void setNoOutputPriorPicsFlag (bool val) { m_isNoOutputPriorPics = val; } 292 #endif 267 293 #if H_MV 268 294 TComPic* getPic ( Int poc ); … … 270 296 Void setIvPicLists ( TComPicLists* picLists) { m_ivPicLists = picLists; } 271 297 Void setLayerInitilizedFlags( Bool* val ) { m_layerInitilizedFlag = val; } 298 #if H_MV_HLS_8_HRD_Q0102_08 299 Void setTargetOptLayerSetIdx( Int targetOptLayerSetIdx ) { m_targetOptLayerSetIdx = targetOptLayerSetIdx; } 300 #endif 272 301 TComVPS* getPrefetchedVPS () { return m_parameterSetManagerDecoder.getPrefetchedVPS( 0 ); }; //Assuming that currently only one VPS is present. 273 302 Int getCurrPoc () { return m_apcSlicePilot->getPOC(); } -
trunk/source/Lib/TLibEncoder/AnnexBwrite.h
r872 r964 58 58 59 59 static const Char start_code_prefix[] = {0,0,0,1}; 60 if (it == au.begin() || nalu.m_nalUnitType == NAL_UNIT_ SPS || nalu.m_nalUnitType == NAL_UNIT_PPS)60 if (it == au.begin() || nalu.m_nalUnitType == NAL_UNIT_VPS || nalu.m_nalUnitType == NAL_UNIT_SPS || nalu.m_nalUnitType == NAL_UNIT_PPS) 61 61 { 62 62 /* From AVC, When any of the following conditions are fulfilled, the -
trunk/source/Lib/TLibEncoder/NALwrite.cpp
r884 r964 91 91 vector<uint8_t>& rbsp = nalu.m_Bitstream.getFIFO(); 92 92 93 #if H_MV // This will handle situation when writing NAL with zero payload 94 if (rbsp.size() == 0) return; 95 #endif 93 if (rbsp.size() == 0) 94 { 95 return; 96 } 96 97 97 98 for (vector<uint8_t>::iterator it = rbsp.begin(); it != rbsp.end();) -
trunk/source/Lib/TLibEncoder/SEIwrite.cpp
r884 r964 267 267 Void SEIWriter::xWriteSEIActiveParameterSets(const SEIActiveParameterSets& sei) 268 268 { 269 WRITE_CODE(sei.activeVPSId, 4, "active_vps_id");270 WRITE_FLAG(sei.m_ fullRandomAccessFlag, "full_random_access_flag");271 WRITE_FLAG(sei.m_noParam SetUpdateFlag, "no_param_set_update_flag");269 WRITE_CODE(sei.activeVPSId, 4, "active_video_parameter_set_id"); 270 WRITE_FLAG(sei.m_selfContainedCvsFlag, "self_contained_cvs_flag"); 271 WRITE_FLAG(sei.m_noParameterSetUpdateFlag, "no_parameter_set_update_flag"); 272 272 WRITE_UVLC(sei.numSpsIdsMinus1, "num_sps_ids_minus1"); 273 273 274 assert (sei.activeSeqParamSetId.size() == (sei.numSpsIdsMinus1 + 1)); 275 276 for (Int i = 0; i < sei.activeSeqParamSetId.size(); i++) 277 { 278 WRITE_UVLC(sei.activeSeqParamSetId[i], "active_seq_param_set_id"); 279 } 280 281 UInt uiBits = m_pcBitIf->getNumberOfWrittenBits(); 282 UInt uiAlignedBits = ( 8 - (uiBits&7) ) % 8; 283 if(uiAlignedBits) 284 { 285 WRITE_FLAG(1, "alignment_bit" ); 286 uiAlignedBits--; 287 while(uiAlignedBits--) 288 { 289 WRITE_FLAG(0, "alignment_bit" ); 290 } 291 } 274 assert (sei.activeSeqParameterSetId.size() == (sei.numSpsIdsMinus1 + 1)); 275 276 for (Int i = 0; i < sei.activeSeqParameterSetId.size(); i++) 277 { 278 WRITE_UVLC(sei.activeSeqParameterSetId[i], "active_seq_parameter_set_id"); 279 } 280 xWriteByteAlign(); 292 281 } 293 282 … … 478 467 { 479 468 WRITE_CODE( sei.m_cameraIsoSpeedValue, 32, "camera_iso_speed_value" ); 469 } 470 WRITE_CODE( sei.m_exposureIndexIdc, 8, "exposure_index_idc" ); 471 if( sei.m_exposureIndexIdc == 255) //Extended_ISO 472 { 473 WRITE_CODE( sei.m_exposureIndexValue, 32, "exposure_index_value" ); 480 474 } 481 475 WRITE_FLAG( sei.m_exposureCompensationValueSignFlag, "exposure_compensation_value_sign_flag" ); -
trunk/source/Lib/TLibEncoder/TEncCavlc.cpp
r950 r964 140 140 WRITE_UVLC( rps->getNumberOfNegativePictures(), "num_negative_pics" ); 141 141 WRITE_UVLC( rps->getNumberOfPositivePictures(), "num_positive_pics" ); 142 142 143 Int prev = 0; 143 144 for(Int j=0 ; j < rps->getNumberOfNegativePictures(); j++) … … 276 277 pcPPS->getLayerId() != 1 ) 277 278 { 278 pcPPS->setPpsExtensionTypeFlag( PPS_EX_T_3D, false ); 279 #if H_MV_HLS_8_SPS_NODOC_48 280 pcPPS->setPps3dExtensionFlag( false ); 281 #else 282 pcPPS->setPpsExtensionTypeFlag( PPS_EX_T_3D, false ); 283 #endif 279 284 } 280 285 #endif … … 283 288 WRITE_FLAG( 0, "pps_extension_flag" ); 284 289 #else 285 WRITE_FLAG( 1, "pps_extension_flag" ); 286 290 WRITE_FLAG( 1, "pps_extension_present_flag" ); 291 292 #if H_MV_HLS_8_SPS_NODOC_48 293 WRITE_FLAG( pcPPS->getPpsRangeExtensionsFlag( ) ? 1 : 0 , "pps_range_extensions_flag" ); 294 WRITE_FLAG( pcPPS->getPpsMultilayerExtensionFlag( ) ? 1 : 0 , "pps_multilayer_extension_flag" ); 295 #if !H_3D 296 WRITE_CODE( pcPPS->getPpsExtension6bits( ), 6, "pps_extension_6bits" ); 297 #else 298 WRITE_FLAG( pcPPS->getPps3dExtensionFlag( ) ? 1 : 0 , "pps_3d_extension_flag" ); 299 WRITE_CODE( pcPPS->getPpsExtension5bits( ), 5, "pps_extension_5bits" ); 300 #endif 301 if ( pcPPS->getPpsRangeExtensionsFlag() ) 302 { 303 assert(0); 304 } 305 306 if ( pcPPS->getPpsMultilayerExtensionFlag() ) 307 { 308 WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" ); 309 #if H_MV_HLS_8_PPS_NODOC_NN 310 WRITE_FLAG( 0, "pps_extension_reserved_zero_flag" ); 311 #endif 312 } 313 314 #if H_3D 315 if( pcPPS->getPps3dExtensionFlag( ) ) // This probably needs to be aligned with Rext and SHVC 316 { 317 codePPSExtension( pcPPS ); 318 } 319 #endif 320 #else 287 321 for ( Int i = 0; i < PPS_EX_T_MAX_NUM; i++ ) 288 322 { … … 305 339 codePPSExtension( pcPPS ); 306 340 } 341 #endif 307 342 #endif 308 343 … … 822 857 WRITE_FLAG( 0, "sps_extension_flag" ); 823 858 #else 824 WRITE_FLAG( pcSPS->getSpsExtensionFlag(), "sps_extension_flag" ); 825 826 if ( pcSPS->getSpsExtensionFlag() ) 827 { 859 WRITE_FLAG( pcSPS->getSpsExtensionPresentFlag(), "sps_extension_present_flag" ); 860 861 if ( pcSPS->getSpsExtensionPresentFlag() ) 862 { 863 #if H_MV_HLS_8_SPS_NODOC_48 864 WRITE_FLAG( pcSPS->getSpsRangeExtensionsFlag( ) ? 1 : 0 , "sps_range_extensions_flag" ); 865 WRITE_FLAG( pcSPS->getSpsMultilayerExtensionFlag( ) ? 1 : 0 , "sps_multilayer_extension_flag" ); 866 #if !H_3D 867 WRITE_CODE( pcSPS->getSpsExtension6bits( ), 6, "sps_extension_6bits" ); 868 #else 869 WRITE_FLAG( pcSPS->getSps3dExtensionFlag( ) ? 1 : 0 , "sps_3d_extension_flag" ); 870 WRITE_CODE( pcSPS->getSpsExtension5bits( ), 5, "sps_extension_5bits" ); 871 #endif 872 } 873 874 if ( pcSPS->getSpsRangeExtensionsFlag() ) 875 { 876 assert( 0 ); 877 } 878 879 if ( pcSPS->getSpsMultilayerExtensionFlag() ) 880 { 881 codeSPSExtension( pcSPS ); 882 } 883 884 #if H_3D 885 if ( pcSPS->getSps3dExtensionFlag() ) 886 { 887 codeSPSExtension2( pcSPS, viewIndex, depthFlag ); 888 } 889 890 #endif 891 #else 828 892 for (Int i = 0; i < PS_EX_T_MAX_NUM; i++) 829 893 { … … 848 912 #endif 849 913 } 914 #endif 850 915 #endif 851 916 } … … 890 955 { 891 956 WRITE_CODE( pcVPS->getVPSId(), 4, "vps_video_parameter_set_id" ); 957 #if H_MV_HLS_8_SYN_Q0041_03 958 WRITE_FLAG( pcVPS->getVpsBaseLayerInternalFlag( ) ? 1 : 0 , "vps_base_layer_internal_flag" ); 959 WRITE_FLAG( 1 , "vps_reserved_one_bit" ); 960 #else 892 961 WRITE_CODE( 3, 2, "vps_reserved_three_2bits" ); 962 #endif 893 963 #if H_MV 894 964 WRITE_CODE( pcVPS->getMaxLayersMinus1(), 6, "vps_max_layers_minus1" ); … … 972 1042 } 973 1043 #if H_MV 1044 #if H_MV_HLS_8_RPS_Q0100_36 1045 WRITE_FLAG( pcVPS->getVpsExtensionFlag(), "vps_extension_flag" ); 1046 #else 974 1047 WRITE_FLAG( 1, "vps_extension_flag" ); 1048 #endif 975 1049 m_pcBitIf->writeAlignOne(); 976 1050 codeVPSExtension( pcVPS ); … … 996 1070 Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS ) 997 1071 { 1072 1073 #if !H_MV_HLS_8_SYN_Q0041_03 998 1074 WRITE_FLAG( pcVPS->getAvcBaseLayerFlag() ? 1 : 0, "avc_base_layer_flag" ); 1075 #endif 1076 999 1077 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); 1000 1078 … … 1010 1088 1011 1089 if ( pcVPS->getSplittingFlag() ) 1012 { // Ignore old dimension id length1090 { 1013 1091 pcVPS->setDimensionIdLen( pcVPS->getNumScalabilityTypes( ) - 1 ,pcVPS->inferLastDimsionIdLenMinus1() + 1 ); 1014 1092 } … … 1042 1120 } 1043 1121 1044 1045 1122 WRITE_CODE( pcVPS->getViewIdLen( ), 4, "view_id_len" ); 1046 1123 … … 1068 1145 } 1069 1146 } 1147 1070 1148 WRITE_FLAG( pcVPS->getVpsSubLayersMaxMinus1PresentFlag( ) ? 1 : 0 , "vps_sub_layers_max_minus1_present_flag" ); 1071 1149 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) … … 1109 1187 } 1110 1188 1111 WRITE_UVLC( pcVPS->getNumAddOutputLayerSets( ), "num_add_output_layer_sets" ); 1189 #if H_MV_HLS_8_SYN_39_19 1190 if ( pcVPS->getNumIndependentLayers() > 1 ) 1191 { 1192 WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" ); 1193 } 1194 for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++) 1195 { 1196 for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++) 1197 { 1198 WRITE_CODE( pcVPS->getHighestLayerIdxPlus1( i, j ), pcVPS->getHighestLayerIdxPlus1Len( j ) , "highest_layer_idx_plus1" ); 1199 } 1200 } 1201 if (pcVPS->getNumLayerSets() > 1) 1202 { 1203 WRITE_UVLC( pcVPS->getNumAddOlss( ), "num_add_olss" ); 1204 WRITE_CODE( pcVPS->getDefaultOutputLayerIdc( ), 2, "default_output_layer_idc" ); 1205 } 1206 #else 1207 WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" ); 1112 1208 1113 1209 if( pcVPS->getNumOutputLayerSets() > 1) 1114 1210 { 1115 WRITE_CODE( pcVPS->getDefault TargetOutputLayerIdc( ), 2, "default_target_output_layer_idc" );1211 WRITE_CODE( pcVPS->getDefaultOutputLayerIdc( ), 2, "default_output_layer_idc" ); 1116 1212 } 1117 1213 #endif 1118 1214 1119 1215 assert( pcVPS->getOutputLayerFlag(0, 0) == pcVPS->inferOutputLayerFlag( 0, 0 )); 1120 assert( pcVPS->getOutputLayerSetIdxMinus1( 0 ) == -1 ); 1216 assert( pcVPS->getLayerSetIdxForOlsMinus1( 0 ) == -1 ); 1217 1218 1219 1121 1220 1122 1221 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1123 1222 { 1223 #if H_MV_HLS_8_SYN_39_19 1224 if( i >= pcVPS->getNumLayerSets( ) ) 1225 #else 1124 1226 if( i > pcVPS->getVpsNumLayerSetsMinus1( ) ) 1227 #endif 1125 1228 { 1126 WRITE_UVLC( pcVPS->get OutputLayerSetIdxMinus1( i ), "output_layer_set_idx_minus1[i]" );1127 } 1128 1129 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefault TargetOutputLayerIdc() == 2 )1229 WRITE_UVLC( pcVPS->getLayerSetIdxForOlsMinus1( i ), "layer_set_idx_for_ols_minus1[i]" ); 1230 } 1231 1232 if ( i > pcVPS->getVpsNumLayerSetsMinus1() || pcVPS->getDefaultOutputLayerIdc() == 2 ) 1130 1233 { 1131 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS-> getLayerSetIdxForOutputLayerSet( i ) ); j++ )1234 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx( i ) ); j++ ) 1132 1235 { 1133 1236 WRITE_FLAG( pcVPS->getOutputLayerFlag( i, j) ? 1 : 0, "output_layer_flag" ); … … 1136 1239 else 1137 1240 { 1138 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS-> getLayerSetIdxForOutputLayerSet( i ) ) - 1; j++ )1241 for( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx( i ) ) - 1; j++ ) 1139 1242 { 1140 1243 assert( pcVPS->getOutputLayerFlag( i , j ) == pcVPS->inferOutputLayerFlag( i, j )); 1141 1244 } 1142 1245 } 1246 1143 1247 1144 1248 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) … … 1152 1256 } 1153 1257 1258 #if !H_MV_HLS_8_PMS_Q0195_20 1154 1259 WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" ); 1155 1260 if ( pcVPS->getRepFormatIdxPresentFlag() ) … … 1157 1262 WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" ); 1158 1263 } 1264 #else 1265 WRITE_UVLC( pcVPS->getVpsNumRepFormatsMinus1( ), "vps_num_rep_formats_minus1" ); 1266 #endif 1159 1267 1160 1268 for (Int i = 0; i <= pcVPS->getVpsNumRepFormatsMinus1(); i++ ) 1161 1269 { 1270 1162 1271 TComRepFormat* curRepFormat = pcVPS->getRepFormat(i); 1163 1272 TComRepFormat* prevRepFormat = i > 0 ? pcVPS->getRepFormat( i - 1) : NULL; 1164 1273 codeRepFormat( i, curRepFormat , prevRepFormat); 1165 } 1166 1274 1275 } 1276 1277 #if H_MV_HLS_8_PMS_Q0195_20 1278 if ( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1279 { 1280 WRITE_FLAG( pcVPS->getRepFormatIdxPresentFlag( ) ? 1 : 0 , "rep_format_idx_present_flag" ); 1281 } 1282 #endif 1167 1283 if( pcVPS->getRepFormatIdxPresentFlag() ) 1168 1284 { 1285 #if H_MV_HLS_8_SYN_Q0041_03 1286 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1287 #else 1169 1288 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1170 { 1289 #endif 1290 { 1291 #if !H_MV_HLS_8_PMS_Q0195_20 1171 1292 if( pcVPS->getVpsNumRepFormatsMinus1() > 0 ) 1172 1293 { 1294 #endif 1173 1295 WRITE_CODE( pcVPS->getVpsRepFormatIdx(i), pcVPS->getVpsRepFormatIdxLen(), "vps_rep_format_idx[i]" ); 1174 } 1175 } 1176 } 1296 #if !H_MV_HLS_8_PMS_Q0195_20 1297 } 1298 #endif 1299 } 1300 } 1301 #if H_MV_HLS_8_PMS_Q0195_20 1302 else 1303 { 1304 #if H_MV_HLS_8_SYN_Q0041_03 1305 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1306 #else 1307 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1308 #endif 1309 { 1310 assert( pcVPS->getVpsRepFormatIdx( i ) == pcVPS->inferVpsRepFormatIdx( i ) ); 1311 } 1312 } 1313 #endif 1314 1177 1315 1178 1316 WRITE_FLAG( pcVPS->getMaxOneActiveRefLayerFlag( ) ? 1 : 0, "max_one_active_ref_layer_flag" ); … … 1187 1325 } 1188 1326 } 1327 1189 1328 WRITE_FLAG( 0, "vps_reserved_zero_flag" ); 1190 1329 codeDpbSize( pcVPS ); … … 1193 1332 1194 1333 WRITE_FLAG( pcVPS->getDefaultDirectDependencyFlag( ) ? 1 : 0 , "default_direct_dependency_flag" ); 1195 1196 1334 if ( pcVPS->getDefaultDirectDependencyFlag( ) ) 1197 1335 { … … 1199 1337 } 1200 1338 1339 #if H_MV_HLS_8_SYN_Q0041_03 1340 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1341 { 1342 for( Int j = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; j < i; j++ ) 1343 #else 1201 1344 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1202 1345 { 1203 1346 for( Int j = 0; j < i; j++ ) 1347 #endif 1204 1348 { 1205 1349 if (pcVPS->getDirectDependencyFlag( i, j) ) … … 1218 1362 } 1219 1363 WRITE_UVLC( 0, "vps_non_vui_extension_length" ); 1220 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" ); 1364 1365 1366 1367 1368 WRITE_FLAG( pcVPS->getVpsVuiPresentFlag() ? 1 : 0 , "vps_vui_present_flag" ); 1221 1369 if( pcVPS->getVpsVuiPresentFlag() ) 1222 1370 { … … 1229 1377 pcVPSVUI->inferVpsVui( true ); 1230 1378 } 1379 1231 1380 } 1232 1381 … … 1248 1397 for( Int i = 1; i < vps->getNumOutputLayerSets(); i++ ) 1249 1398 { 1399 #if H_MV_HLS_8_MIS_Q0102_30 1400 Int currLsIdx = vps->olsIdxToLsIdx( i ); 1401 #endif 1250 1402 WRITE_FLAG( dpbSize->getSubLayerFlagInfoPresentFlag( i ) ? 1 : 0 , "sub_layer_flag_info_present_flag" ); 1403 #if H_MV_HLS_8_MIS_Q0102_30 1404 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ ) 1405 #else 1251 1406 for( Int j = 0; j <= vps->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1407 #endif 1252 1408 { 1253 1409 if( j > 0 && dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) … … 1257 1413 if( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ) 1258 1414 { 1259 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i )); k++ ) 1415 #if H_MV_HLS_8_MIS_Q0102_30 1416 for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ ) 1417 #else 1418 for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i )); k++ ) 1419 #endif 1260 1420 { 1261 1421 WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" ); 1262 1422 } 1263 1423 WRITE_UVLC( dpbSize->getMaxVpsNumReorderPics( i, j ), "max_vps_num_reorder_pics" ); 1264 #if H_MV_HLS7_GEN1265 if( vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ) != vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ) )1266 {1267 for( Int k = 0; k < vps->getNumLayersInIdList( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ )1268 {1269 WRITE_UVLC( dpbSize->getMaxVpsLayerDecPicBuffMinus1( i, k, j ), "max_vps_layer_dec_pic_buff_minus1" );1270 }1271 }1272 #endif1273 1424 WRITE_UVLC( dpbSize->getMaxVpsLatencyIncreasePlus1( i, j ), "max_vps_latency_increase_plus1" ); 1274 1425 } … … 1277 1428 if ( j > 0 ) 1278 1429 { 1279 for( Int k = 0; k < vps->getNumSubDpbs( vps->getLayerSetIdxForOutputLayerSet( i ) ); k++ ) 1430 #if H_MV_HLS_8_DBP_NODOC_42 1431 for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ ) 1432 #else 1433 for( Int k = 0; k < vps->getNumSubDpbs( vps->olsIdxToLsIdx( i ) ); k++ ) 1434 #endif 1280 1435 { 1281 1436 assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); … … 1285 1440 } 1286 1441 } 1287 } 1288 } 1442 } 1443 } 1289 1444 } 1290 1445 … … 1324 1479 assert( pcVPSVUI ); 1325 1480 1481 1326 1482 WRITE_FLAG( pcVPSVUI->getCrossLayerPicTypeAlignedFlag( ) ? 1 : 0 , "cross_layer_pic_type_aligned_flag" ); 1327 1483 if ( !pcVPSVUI->getCrossLayerPicTypeAlignedFlag() ) … … 1337 1493 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1338 1494 { 1495 #if H_MV_HLS_8_SYN_Q0041_03 1496 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1497 #else 1339 1498 for( Int i = 0; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1340 { 1499 #endif 1500 { 1501 #if H_MV_HLS_8_MIS_Q0102_30 1502 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) 1503 #else 1341 1504 for( Int j = 0; j <= pcVPS->getMaxTLayers(); j++ ) 1505 #endif 1342 1506 { 1343 1507 if( pcVPSVUI->getBitRatePresentVpsFlag( ) ) … … 1399 1563 if( !pcVPSVUI->getTilesNotInUseFlag() ) 1400 1564 { 1565 #if H_MV_HLS_8_SYN_Q0041_03 1566 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1567 #else 1401 1568 for( Int i = 0; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1569 #endif 1402 1570 { 1403 1571 WRITE_FLAG( pcVPSVUI->getTilesInUseFlag( i ) ? 1 : 0 , "tiles_in_use_flag[i]" ); … … 1407 1575 } 1408 1576 } 1409 1577 #if H_MV_HLS_8_SYN_Q0041_03 1578 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 1 : 2; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1579 #else 1410 1580 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1581 #endif 1411 1582 { 1412 1583 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ ) … … 1439 1610 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1440 1611 { 1612 #if H_MV_HLS_8_SYN_Q0041_03 1613 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1614 { 1615 #endif 1441 1616 WRITE_UVLC( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ), "min_spatial_segment_offset_plus1" ); 1442 1617 if( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ) > 0 ) … … 1448 1623 } 1449 1624 } 1625 #if H_MV_HLS_8_SYN_Q0041_03 1626 } 1627 #endif 1450 1628 } 1451 1629 } … … 1495 1673 for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ ) 1496 1674 { 1675 #if H_MV_HLS_8_HRD_Q0101_04 1676 for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ ) 1677 { 1678 WRITE_FLAG( vpsVuiBspHrdP->getLayerInBspFlag( h, i, j ) ? 1 : 0 , "layer_in_bsp_flag" ); 1679 #else 1497 1680 for( Int j = 0; j <= pcVPS->getMaxLayersMinus1(); j++ ) 1498 1681 { … … 1505 1688 vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, false ); // This inference seems to be missing in spec 1506 1689 } 1690 #endif 1507 1691 } 1508 1692 } … … 1510 1694 1511 1695 if( vpsVuiBspHrdP->getNumBitstreamPartitions( h ) ) 1512 { 1513 WRITE_UVLC( vpsVuiBspHrdP->getNumBspSchedCombinations( h ), "num_bsp_sched_combinations" ); 1514 for( Int i = 0; i < vpsVuiBspHrdP->getNumBspSchedCombinations( h ); i++ ) 1696 { 1697 WRITE_UVLC( vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ), "num_bsp_sched_combinations_minus1" ); 1698 #if H_MV_HLS_8_HRD_Q0182_05 1699 for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ ) 1700 #else 1701 for( Int i = 0; i < vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ ) 1702 #endif 1515 1703 { 1516 1704 for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ ) 1517 1705 { 1706 #if H_MV_HLS_8_HRD_Q0101_04 1707 WRITE_CODE( vpsVuiBspHrdP->getBspCombHrdIdx( h, i, j ), vpsVuiBspHrdP->getBspCombHrdIdxLen(), "bsp_comb_hrd_idx" ); 1708 #else 1518 1709 WRITE_UVLC( vpsVuiBspHrdP->getBspCombHrdIdx( h, i, j ), "bsp_comb_hrd_idx" ); 1710 #endif 1519 1711 WRITE_UVLC( vpsVuiBspHrdP->getBspCombSchedIdx( h, i, j ), "bsp_comb_sched_idx" ); 1712 1713 #if H_MV_HLS_8_HRD_Q0101_04 1714 vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j ); 1715 #endif 1520 1716 } 1521 1717 } … … 1636 1832 if ( pcSlice->getRapPicFlag() ) 1637 1833 { 1834 #if SETTING_NO_OUT_PIC_PRIOR 1835 WRITE_FLAG( pcSlice->getNoOutputPriorPicsFlag() ? 1 : 0, "no_output_of_prior_pics_flag" ); 1836 #else 1638 1837 WRITE_FLAG( 0, "no_output_of_prior_pics_flag" ); 1838 #endif 1639 1839 } 1640 1840 #if PPS_FIX_DEPTH … … 1707 1907 Int picOrderCntLSB = (pcSlice->getPOC()-pcSlice->getLastIDR()+(1<<pcSlice->getSPS()->getBitsForPOC())) & ((1<<pcSlice->getSPS()->getBitsForPOC())-1); 1708 1908 WRITE_CODE( picOrderCntLSB, pcSlice->getSPS()->getBitsForPOC(), "slice_pic_order_cnt_lsb"); 1709 } 1909 #if H_MV_HLS_8_POC_Q0142_32 1910 pcSlice->setSlicePicOrderCntLsb( picOrderCntLSB ); 1911 #endif 1912 } 1913 1710 1914 #endif 1711 1915 if( !pcSlice->getIdrPicFlag() ) … … 2137 2341 } 2138 2342 2343 #if H_MV_HLS_8_POC_Q0142_32 2344 pcSlice->checkPocResetIdc(); 2345 #endif 2346 2139 2347 if( pcSlice->getPocResetIdc() != 0 ) 2140 2348 { … … 2147 2355 WRITE_CODE( pcSlice->getPocLsbVal( ), pcSlice->getPocLsbValLen() , "poc_lsb_val" ); 2148 2356 } 2149 2357 #if H_MV_HLS_8_POC_Q0142_32 2358 pcSlice->checkPocLsbVal(); 2359 #endif 2360 2150 2361 if( !pcSlice->getPocMsbValRequiredFlag() /* TODO && pcSlice->getVPS()->getVpsPocLsbAlignedFlag() */ ) 2151 2362 { 2152 2363 WRITE_FLAG( pcSlice->getPocMsbValPresentFlag( ) ? 1 : 0 , "poc_msb_val_present_flag" ); 2153 2364 } 2365 #if H_MV_HLS_8_POC_Q0146_15 2366 else 2367 { 2368 assert( pcSlice->getPocMsbValPresentFlag() == pcSlice->inferPocMsbValPresentFlag( ) ); 2369 } 2370 #endif 2154 2371 2155 2372 if( pcSlice->getPocMsbValPresentFlag() ) -
trunk/source/Lib/TLibEncoder/TEncCfg.h
r950 r964 256 256 Int m_cameraIsoSpeedIdc; 257 257 Int m_cameraIsoSpeedValue; 258 Int m_exposureIndexIdc; 259 Int m_exposureIndexValue; 258 260 Int m_exposureCompensationValueSignFlag; 259 261 Int m_exposureCompensationValueNumerator; … … 495 497 Void setMaxRefPicNum ( Int iMaxRefPicNum ) { m_iMaxRefPicNum = iMaxRefPicNum; } 496 498 497 BoolgetMaxTempLayer () { return m_maxTempLayer; }499 Int getMaxTempLayer () { return m_maxTempLayer; } 498 500 Void setMaxTempLayer ( Int maxTempLayer ) { m_maxTempLayer = maxTempLayer; } 499 501 … … 753 755 Void setTMISEICameraIsoSpeedValue(Int b) { m_cameraIsoSpeedValue = b; } 754 756 Int getTMISEICameraIsoSpeedValue() { return m_cameraIsoSpeedValue; } 757 Void setTMISEIExposureIndexIdc(Int b) { m_exposureIndexIdc = b; } 758 Int getTMISEIExposurIndexIdc() { return m_exposureIndexIdc; } 759 Void setTMISEIExposureIndexValue(Int b) { m_exposureIndexValue = b; } 760 Int getTMISEIExposurIndexValue() { return m_exposureIndexValue; } 755 761 Void setTMISEIExposureCompensationValueSignFlag(Int b) { m_exposureCompensationValueSignFlag = b; } 756 762 Int getTMISEIExposureCompensationValueSignFlag() { return m_exposureCompensationValueSignFlag; } -
trunk/source/Lib/TLibEncoder/TEncGOP.cpp
r884 r964 75 75 m_iNumPicCoded = 0; //Niko 76 76 m_bFirst = true; 77 #if ALLOW_RECOVERY_POINT_AS_RAP 78 m_iLastRecoveryPicPOC = 0; 79 #endif 77 80 78 81 m_pcCfg = NULL; … … 167 170 SEIActiveParameterSets *seiActiveParameterSets = new SEIActiveParameterSets(); 168 171 seiActiveParameterSets->activeVPSId = m_pcCfg->getVPS()->getVPSId(); 169 seiActiveParameterSets->m_ fullRandomAccessFlag = false;170 seiActiveParameterSets->m_noParam SetUpdateFlag = false;172 seiActiveParameterSets->m_selfContainedCvsFlag = false; 173 seiActiveParameterSets->m_noParameterSetUpdateFlag = false; 171 174 seiActiveParameterSets->numSpsIdsMinus1 = 0; 172 seiActiveParameterSets->activeSeqParam SetId.resize(seiActiveParameterSets->numSpsIdsMinus1 + 1);173 seiActiveParameterSets->activeSeqParam SetId[0] = sps->getSPSId();175 seiActiveParameterSets->activeSeqParameterSetId.resize(seiActiveParameterSets->numSpsIdsMinus1 + 1); 176 seiActiveParameterSets->activeSeqParameterSetId[0] = sps->getSPSId(); 174 177 return seiActiveParameterSets; 175 178 } … … 274 277 seiToneMappingInfo->m_cameraIsoSpeedValue = m_pcCfg->getTMISEICameraIsoSpeedValue(); 275 278 assert( seiToneMappingInfo->m_cameraIsoSpeedValue !=0 ); 279 seiToneMappingInfo->m_exposureIndexIdc = m_pcCfg->getTMISEIExposurIndexIdc(); 280 seiToneMappingInfo->m_exposureIndexValue = m_pcCfg->getTMISEIExposurIndexValue(); 281 assert( seiToneMappingInfo->m_exposureIndexValue !=0 ); 276 282 seiToneMappingInfo->m_exposureCompensationValueSignFlag = m_pcCfg->getTMISEIExposureCompensationValueSignFlag(); 277 283 seiToneMappingInfo->m_exposureCompensationValueNumerator = m_pcCfg->getTMISEIExposureCompensationValueNumerator(); … … 428 434 UInt *accumNalsDU = NULL; 429 435 SEIDecodingUnitInfo decodingUnitInfoSEI; 436 #if EFFICIENT_FIELD_IRAP 437 Int IRAPGOPid = -1; 438 Bool IRAPtoReorder = false; 439 Bool swapIRAPForward = false; 440 if(isField) 441 { 442 Int pocCurr; 443 #if !H_MV 444 for ( Int iGOPid=0; iGOPid < m_iGopSize; iGOPid++ ) 445 #endif 446 { 447 // determine actual POC 448 if(iPOCLast == 0) //case first frame or first top field 449 { 450 pocCurr=0; 451 } 452 else if(iPOCLast == 1 && isField) //case first bottom field, just like the first frame, the poc computation is not right anymore, we set the right value 453 { 454 pocCurr = 1; 455 } 456 else 457 { 458 pocCurr = iPOCLast - iNumPicRcvd + m_pcCfg->getGOPEntry(iGOPid).m_POC - isField; 459 } 460 461 // check if POC corresponds to IRAP 462 NalUnitType tmpUnitType = getNalUnitType(pocCurr, m_iLastIDR, isField); 463 if(tmpUnitType >= NAL_UNIT_CODED_SLICE_BLA_W_LP && tmpUnitType <= NAL_UNIT_CODED_SLICE_CRA) // if picture is an IRAP 464 { 465 if(pocCurr%2 == 0 && iGOPid < m_iGopSize-1 && m_pcCfg->getGOPEntry(iGOPid).m_POC == m_pcCfg->getGOPEntry(iGOPid+1).m_POC-1) 466 { // if top field and following picture in enc order is associated bottom field 467 IRAPGOPid = iGOPid; 468 IRAPtoReorder = true; 469 swapIRAPForward = true; 470 break; 471 } 472 if(pocCurr%2 != 0 && iGOPid > 0 && m_pcCfg->getGOPEntry(iGOPid).m_POC == m_pcCfg->getGOPEntry(iGOPid-1).m_POC+1) 473 { 474 // if picture is an IRAP remember to process it first 475 IRAPGOPid = iGOPid; 476 IRAPtoReorder = true; 477 swapIRAPForward = false; 478 break; 479 } 480 } 481 } 482 } 483 #endif 430 484 #if !H_MV 431 485 for ( Int iGOPid=0; iGOPid < m_iGopSize; iGOPid++ ) 432 486 #endif 433 487 { 488 #if EFFICIENT_FIELD_IRAP 489 if(IRAPtoReorder) 490 { 491 if(swapIRAPForward) 492 { 493 if(iGOPid == IRAPGOPid) 494 { 495 iGOPid = IRAPGOPid +1; 496 } 497 else if(iGOPid == IRAPGOPid +1) 498 { 499 iGOPid = IRAPGOPid; 500 } 501 } 502 else 503 { 504 if(iGOPid == IRAPGOPid -1) 505 { 506 iGOPid = IRAPGOPid; 507 } 508 else if(iGOPid == IRAPGOPid) 509 { 510 iGOPid = IRAPGOPid -1; 511 } 512 } 513 } 514 #endif 434 515 UInt uiColDir = 1; 435 516 //-- For time output for each slice … … 500 581 if(pocCurr>=m_pcCfg->getFramesToBeEncoded()) 501 582 { 583 #if EFFICIENT_FIELD_IRAP 584 if(IRAPtoReorder) 585 { 586 if(swapIRAPForward) 587 { 588 if(iGOPid == IRAPGOPid) 589 { 590 iGOPid = IRAPGOPid +1; 591 IRAPtoReorder = false; 592 } 593 else if(iGOPid == IRAPGOPid +1) 594 { 595 iGOPid --; 596 } 597 } 598 else 599 { 600 if(iGOPid == IRAPGOPid) 601 { 602 iGOPid = IRAPGOPid -1; 603 } 604 else if(iGOPid == IRAPGOPid -1) 605 { 606 iGOPid = IRAPGOPid; 607 IRAPtoReorder = false; 608 } 609 } 610 } 611 #endif 502 612 #if H_MV 503 613 delete pcBitstreamRedirect; … … 635 745 } 636 746 637 // Do decoding refresh marking if any 638 pcSlice->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, rcListPic); 639 m_pcEncTop->selectReferencePictureSet(pcSlice, pocCurr, iGOPid); 640 pcSlice->getRPS()->setNumberOfLongtermPictures(0); 747 #if EFFICIENT_FIELD_IRAP 641 748 #if FIX1172 642 749 if ( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP … … 653 760 pcSlice->setAssociatedIRAPPOC(m_associatedIRAPPOC); 654 761 #endif 655 762 #endif 763 // Do decoding refresh marking if any 764 pcSlice->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, rcListPic); 765 m_pcEncTop->selectReferencePictureSet(pcSlice, pocCurr, iGOPid); 766 pcSlice->getRPS()->setNumberOfLongtermPictures(0); 767 #if EFFICIENT_FIELD_IRAP 768 #else 769 #if FIX1172 770 if ( pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 771 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 772 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP 773 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL 774 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP 775 || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA ) // IRAP picture 776 { 777 m_associatedIRAPType = pcSlice->getNalUnitType(); 778 m_associatedIRAPPOC = pocCurr; 779 } 780 pcSlice->setAssociatedIRAPType(m_associatedIRAPType); 781 pcSlice->setAssociatedIRAPPOC(m_associatedIRAPPOC); 782 #endif 783 #endif 784 785 #if ALLOW_RECOVERY_POINT_AS_RAP 786 if ((pcSlice->checkThatAllRefPicsAreAvailable(rcListPic, pcSlice->getRPS(), false, m_iLastRecoveryPicPOC, m_pcCfg->getDecodingRefreshType() == 3) != 0) || (pcSlice->isIRAP()) 787 #if EFFICIENT_FIELD_IRAP 788 || (isField && pcSlice->getAssociatedIRAPType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getAssociatedIRAPType() <= NAL_UNIT_CODED_SLICE_CRA && pcSlice->getAssociatedIRAPPOC() == pcSlice->getPOC()+1) 789 #endif 790 ) 791 { 792 pcSlice->createExplicitReferencePictureSetFromReference(rcListPic, pcSlice->getRPS(), pcSlice->isIRAP(), m_iLastRecoveryPicPOC, m_pcCfg->getDecodingRefreshType() == 3); 793 } 794 #else 656 795 if ((pcSlice->checkThatAllRefPicsAreAvailable(rcListPic, pcSlice->getRPS(), false) != 0) || (pcSlice->isIRAP())) 657 796 { 658 797 pcSlice->createExplicitReferencePictureSetFromReference(rcListPic, pcSlice->getRPS(), pcSlice->isIRAP()); 659 798 } 799 #endif 660 800 pcSlice->applyReferencePictureSet(rcListPic, pcSlice->getRPS()); 661 801 … … 1411 1551 } 1412 1552 pictureTimingSEI.m_auCpbRemovalDelay = std::min<Int>(std::max<Int>(1, m_totalCoded - m_lastBPSEI), static_cast<Int>(pow(2, static_cast<double>(pcSlice->getSPS()->getVuiParameters()->getHrdParameters()->getCpbRemovalDelayLengthMinus1()+1)))); // Syntax element signalled as minus, hence the . 1413 pictureTimingSEI.m_picDpbOutputDelay = pcSlice->getSPS()->getNumReorderPics(0) + pcSlice->getPOC() - m_totalCoded; 1553 pictureTimingSEI.m_picDpbOutputDelay = pcSlice->getSPS()->getNumReorderPics(pcSlice->getSPS()->getMaxTLayers()-1) + pcSlice->getPOC() - m_totalCoded; 1554 #if EFFICIENT_FIELD_IRAP 1555 if(IRAPGOPid > 0 && IRAPGOPid < m_iGopSize) 1556 { 1557 // if pictures have been swapped there is likely one more picture delay on their tid. Very rough approximation 1558 pictureTimingSEI.m_picDpbOutputDelay ++; 1559 } 1560 #endif 1414 1561 Int factor = pcSlice->getSPS()->getVuiParameters()->getHrdParameters()->getTickDivisorMinus2() + 2; 1415 1562 pictureTimingSEI.m_picDpbOutputDuDelay = factor * pictureTimingSEI.m_picDpbOutputDelay; … … 1518 1665 sei_recovery_point.m_exactMatchingFlag = ( pcSlice->getPOC() == 0 ) ? (true) : (false); 1519 1666 sei_recovery_point.m_brokenLinkFlag = false; 1667 #if ALLOW_RECOVERY_POINT_AS_RAP 1668 if(m_pcCfg->getDecodingRefreshType() == 3) 1669 { 1670 m_iLastRecoveryPicPOC = pocCurr; 1671 } 1672 #endif 1520 1673 1521 1674 m_seiWriter.writeSEImessage( nalu.m_Bitstream, sei_recovery_point, pcSlice->getSPS() ); … … 1641 1794 } 1642 1795 m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream); 1796 1797 #if SETTING_NO_OUT_PIC_PRIOR 1798 if (pcSlice->isIRAP()) 1799 { 1800 if (pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_IDR_N_LP) 1801 { 1802 pcSlice->setNoRaslOutputFlag(true); 1803 } 1804 //the inference for NoOutputPriorPicsFlag 1805 if (!m_bFirst && pcSlice->isIRAP() && pcSlice->getNoRaslOutputFlag()) 1806 { 1807 if (pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) 1808 { 1809 pcSlice->setNoOutputPriorPicsFlag(true); 1810 } 1811 } 1812 } 1813 #endif 1814 1643 1815 tmpBitsBeforeWriting = m_pcEntropyCoder->getNumberOfWrittenBits(); 1644 1816 m_pcEntropyCoder->encodeSliceHeader(pcSlice); … … 2153 2325 std::vector<Int> temp; 2154 2326 TComSlice::markCurrPic( pcPic ); 2327 #if !H_MV_HLS_8_DBP_NODOC_42 2155 2328 TComSlice::markIvRefPicsAsUnused ( m_ivPicLists, temp, pcPic->getSlice(0)->getVPS(), m_layerId, pcPic->getPOC() ); 2329 #endif 2156 2330 #endif 2157 2331 m_bFirst = false; … … 2163 2337 2164 2338 delete[] pcSubstreamsOut; 2339 2340 #if EFFICIENT_FIELD_IRAP 2341 if(IRAPtoReorder) 2342 { 2343 if(swapIRAPForward) 2344 { 2345 if(iGOPid == IRAPGOPid) 2346 { 2347 iGOPid = IRAPGOPid +1; 2348 IRAPtoReorder = false; 2349 } 2350 else if(iGOPid == IRAPGOPid +1) 2351 { 2352 iGOPid --; 2353 } 2354 } 2355 else 2356 { 2357 if(iGOPid == IRAPGOPid) 2358 { 2359 iGOPid = IRAPGOPid -1; 2360 } 2361 else if(iGOPid == IRAPGOPid -1) 2362 { 2363 iGOPid = IRAPGOPid; 2364 IRAPtoReorder = false; 2365 } 2366 } 2367 } 2368 #endif 2165 2369 } 2166 2370 delete pcBitstreamRedirect; … … 2435 2639 case NAL_UNIT_CODED_SLICE_CRA: return "CRA"; 2436 2640 case NAL_UNIT_CODED_SLICE_RADL_R: return "RADL_R"; 2641 case NAL_UNIT_CODED_SLICE_RADL_N: return "RADL_N"; 2437 2642 case NAL_UNIT_CODED_SLICE_RASL_R: return "RASL_R"; 2643 case NAL_UNIT_CODED_SLICE_RASL_N: return "RASL_N"; 2438 2644 case NAL_UNIT_VPS: return "VPS"; 2439 2645 case NAL_UNIT_SPS: return "SPS"; … … 2838 3044 return NAL_UNIT_CODED_SLICE_IDR_W_RADL; 2839 3045 } 3046 #if EFFICIENT_FIELD_IRAP 3047 if(isField && pocCurr == 1) 3048 { 3049 // to avoid the picture becoming an IRAP 3050 return NAL_UNIT_CODED_SLICE_TRAIL_R; 3051 } 3052 #endif 3053 3054 #if ALLOW_RECOVERY_POINT_AS_RAP 3055 if(m_pcCfg->getDecodingRefreshType() != 3 && (pocCurr - isField) % m_pcCfg->getIntraPeriod() == 0) 3056 #else 2840 3057 if ((pocCurr - isField) % m_pcCfg->getIntraPeriod() == 0) 3058 #endif 2841 3059 { 2842 3060 if (m_pcCfg->getDecodingRefreshType() == 1) -
trunk/source/Lib/TLibEncoder/TEncGOP.h
r884 r964 85 85 Int m_iNumPicCoded; 86 86 Bool m_bFirst; 87 #if ALLOW_RECOVERY_POINT_AS_RAP 88 Int m_iLastRecoveryPicPOC; 89 #endif 87 90 88 91 // Access channel -
trunk/source/Lib/TLibEncoder/TEncSampleAdaptiveOffset.cpp
r872 r964 920 920 for (y=0; y<endY; y++) 921 921 { 922 #if SAO_SGN_FUNC 923 signLeft = (Char)sgn(srcLine[startX] - srcLine[startX-1]); 924 #else 922 925 signLeft = (Char)m_sign[srcLine[startX] - srcLine[startX-1]]; 926 #endif 923 927 for (x=startX; x<endX; x++) 924 928 { 929 #if SAO_SGN_FUNC 930 signRight = (Char)sgn(srcLine[x] - srcLine[x+1]); 931 #else 925 932 signRight = (Char)m_sign[srcLine[x] - srcLine[x+1]]; 933 #endif 926 934 edgeType = signRight + signLeft; 927 935 signLeft = -signRight; … … 943 951 for(y=0; y<skipLinesB[typeIdx]; y++) 944 952 { 953 #if SAO_SGN_FUNC 954 signLeft = (Char)sgn(srcLine[startX] - srcLine[startX-1]); 955 #else 945 956 signLeft = (Char)m_sign[srcLine[startX] - srcLine[startX-1]]; 957 #endif 946 958 for (x=startX; x<endX; x++) 947 959 { 960 #if SAO_SGN_FUNC 961 signRight = (Char)sgn(srcLine[x] - srcLine[x+1]); 962 #else 948 963 signRight = (Char)m_sign[srcLine[x] - srcLine[x+1]]; 964 #endif 949 965 edgeType = signRight + signLeft; 950 966 signLeft = -signRight; … … 994 1010 #endif 995 1011 { 1012 #if SAO_SGN_FUNC 1013 signUpLine[x] = (Char)sgn(srcLine[x] - srcLineAbove[x]); 1014 #else 996 1015 signUpLine[x] = (Char)m_sign[srcLine[x] - srcLineAbove[x]]; 1016 #endif 997 1017 } 998 1018 … … 1008 1028 #endif 1009 1029 { 1030 #if SAO_SGN_FUNC 1031 signDown = (Char)sgn(srcLine[x] - srcLineBelow[x]); 1032 #else 1010 1033 signDown = (Char)m_sign[srcLine[x] - srcLineBelow[x]]; 1034 #endif 1011 1035 edgeType = signDown + signUpLine[x]; 1012 1036 signUpLine[x]= -signDown; … … 1033 1057 for (x=startX; x<endX; x++) 1034 1058 { 1059 #if SAO_SGN_FUNC 1060 edgeType = sgn(srcLine[x] - srcLineBelow[x]) + sgn(srcLine[x] - srcLineAbove[x]); 1061 #else 1035 1062 edgeType = m_sign[srcLine[x] - srcLineBelow[x]] + m_sign[srcLine[x] - srcLineAbove[x]]; 1063 #endif 1036 1064 diff [edgeType] += (orgLine[x] - srcLine[x]); 1037 1065 count[edgeType] ++; … … 1076 1104 for (x=startX; x<endX+1; x++) 1077 1105 { 1106 #if SAO_SGN_FUNC 1107 signUpLine[x] = (Char)sgn(srcLineBelow[x] - srcLine[x-1]); 1108 #else 1078 1109 signUpLine[x] = (Char)m_sign[srcLineBelow[x] - srcLine[x-1]]; 1110 #endif 1079 1111 } 1080 1112 … … 1090 1122 for(x=firstLineStartX; x<firstLineEndX; x++) 1091 1123 { 1124 #if SAO_SGN_FUNC 1125 edgeType = sgn(srcLine[x] - srcLineAbove[x-1]) - signUpLine[x+1]; 1126 #else 1092 1127 edgeType = m_sign[srcLine[x] - srcLineAbove[x-1]] - signUpLine[x+1]; 1128 #endif 1093 1129 diff [edgeType] += (orgLine[x] - srcLine[x]); 1094 1130 count[edgeType] ++; … … 1105 1141 for (x=startX; x<endX; x++) 1106 1142 { 1143 #if SAO_SGN_FUNC 1144 signDown = (Char)sgn(srcLine[x] - srcLineBelow[x+1]); 1145 #else 1107 1146 signDown = (Char)m_sign[srcLine[x] - srcLineBelow[x+1]] ; 1147 #endif 1108 1148 edgeType = signDown + signUpLine[x]; 1109 1149 diff [edgeType] += (orgLine[x] - srcLine[x]); … … 1112 1152 signDownLine[x+1] = -signDown; 1113 1153 } 1154 #if SAO_SGN_FUNC 1155 signDownLine[startX] = (Char)sgn(srcLineBelow[startX] - srcLine[startX-1]); 1156 #else 1114 1157 signDownLine[startX] = (Char)m_sign[srcLineBelow[startX] - srcLine[startX-1]]; 1158 #endif 1115 1159 1116 1160 signTmpLine = signUpLine; … … 1136 1180 for (x=startX; x< endX; x++) 1137 1181 { 1182 #if SAO_SGN_FUNC 1183 edgeType = sgn(srcLine[x] - srcLineBelow[x+1]) + sgn(srcLine[x] - srcLineAbove[x-1]); 1184 #else 1138 1185 edgeType = m_sign[srcLine[x] - srcLineBelow[x+1]] + m_sign[srcLine[x] - srcLineAbove[x-1]]; 1186 #endif 1139 1187 diff [edgeType] += (orgLine[x] - srcLine[x]); 1140 1188 count[edgeType] ++; … … 1174 1222 for (x=startX-1; x<endX; x++) 1175 1223 { 1224 #if SAO_SGN_FUNC 1225 signUpLine[x] = (Char)sgn(srcLineBelow[x] - srcLine[x+1]); 1226 #else 1176 1227 signUpLine[x] = (Char)m_sign[srcLineBelow[x] - srcLine[x+1]]; 1228 #endif 1177 1229 } 1178 1230 … … 1193 1245 for(x=firstLineStartX; x<firstLineEndX; x++) 1194 1246 { 1247 #if SAO_SGN_FUNC 1248 edgeType = sgn(srcLine[x] - srcLineAbove[x+1]) - signUpLine[x-1]; 1249 #else 1195 1250 edgeType = m_sign[srcLine[x] - srcLineAbove[x+1]] - signUpLine[x-1]; 1251 #endif 1196 1252 diff [edgeType] += (orgLine[x] - srcLine[x]); 1197 1253 count[edgeType] ++; … … 1208 1264 for(x=startX; x<endX; x++) 1209 1265 { 1266 #if SAO_SGN_FUNC 1267 signDown = (Char)sgn(srcLine[x] - srcLineBelow[x-1]); 1268 #else 1210 1269 signDown = (Char)m_sign[srcLine[x] - srcLineBelow[x-1]] ; 1270 #endif 1211 1271 edgeType = signDown + signUpLine[x]; 1212 1272 … … 1216 1276 signUpLine[x-1] = -signDown; 1217 1277 } 1278 #if SAO_SGN_FUNC 1279 signUpLine[endX-1] = (Char)sgn(srcLineBelow[endX-1] - srcLine[endX]); 1280 #else 1218 1281 signUpLine[endX-1] = (Char)m_sign[srcLineBelow[endX-1] - srcLine[endX]]; 1282 #endif 1219 1283 srcLine += srcStride; 1220 1284 orgLine += orgStride; … … 1235 1299 for (x=startX; x<endX; x++) 1236 1300 { 1301 #if SAO_SGN_FUNC 1302 edgeType = sgn(srcLine[x] - srcLineBelow[x-1]) + sgn(srcLine[x] - srcLineAbove[x+1]); 1303 #else 1237 1304 edgeType = m_sign[srcLine[x] - srcLineBelow[x-1]] + m_sign[srcLine[x] - srcLineAbove[x+1]]; 1305 #endif 1238 1306 diff [edgeType] += (orgLine[x] - srcLine[x]); 1239 1307 count[edgeType] ++; -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r950 r964 2809 2809 { 2810 2810 UInt uiDepth = pcCU->getDepth(0); 2811 UInt uiNumPU = pcCU->getNumPart Inter();2811 UInt uiNumPU = pcCU->getNumPartitions(); 2812 2812 UInt uiInitTrDepth = pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1; 2813 2813 UInt uiWidth = pcCU->getWidth (0) >> uiInitTrDepth; … … 3971 3971 TComMv cMvTemp[2][33]; 3972 3972 3973 Int iNumPart = pcCU->getNumPart Inter();3973 Int iNumPart = pcCU->getNumPartitions(); 3974 3974 Int iNumPredDir = pcCU->getSlice()->isInterP() ? 1 : 2; 3975 3975 … … 5644 5644 5645 5645 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[pcCU->getDepth(0)][CI_CURR_BEST] ); 5646 #if 0 // check 5647 { 5648 m_pcEntropyCoder->resetBits(); 5649 m_pcEntropyCoder->encodeCoeff( pcCU, 0, pcCU->getDepth(0), pcCU->getWidth(0), pcCU->getHeight(0) ); 5650 const UInt uiBitsForCoeff = m_pcEntropyCoder->getNumberOfWrittenBits(); 5651 m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[pcCU->getDepth(0)][CI_CURR_BEST] ); 5652 if( uiBitsForCoeff != uiBits ) 5653 assert( 0 ); 5654 } 5655 #endif 5646 5656 5647 uiBits = 0; 5657 5648 { -
trunk/source/Lib/TLibEncoder/TEncSlice.cpp
r950 r964 221 221 Int depth; 222 222 { 223 #if FIX_FIELD_DEPTH 224 Int poc = rpcSlice->getPOC(); 225 if(isField) 226 { 227 poc = (poc/2)%(m_pcCfg->getGOPSize()/2); 228 } 229 else 230 { 231 poc = poc%m_pcCfg->getGOPSize(); 232 } 233 #else 223 234 Int poc = rpcSlice->getPOC()%m_pcCfg->getGOPSize(); 235 #endif 224 236 if ( poc == 0 ) 225 237 { … … 244 256 } 245 257 } 258 #if FIX_FIELD_DEPTH 259 #if HARMONIZE_GOP_FIRST_FIELD_COUPLE 260 if(poc != 0) 261 { 262 #endif 263 if(isField && rpcSlice->getPOC()%2 == 1) 264 { 265 depth ++; 266 } 267 #if HARMONIZE_GOP_FIRST_FIELD_COUPLE 268 } 269 #endif 270 #endif 246 271 } 247 272 … … 266 291 267 292 eSliceType=B_SLICE; 293 #if EFFICIENT_FIELD_IRAP 294 if(!(isField && pocLast == 1)) 295 { 296 #endif // EFFICIENT_FIELD_IRAP 297 #if ALLOW_RECOVERY_POINT_AS_RAP 298 if(m_pcCfg->getDecodingRefreshType() == 3) 299 { 300 eSliceType = (pocLast == 0 || pocCurr % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType; 301 } 302 else 303 { 304 eSliceType = (pocLast == 0 || (pocCurr - isField) % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType; 305 } 306 #else 268 307 eSliceType = (pocLast == 0 || (pocCurr - isField) % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType; 308 #endif 309 #if EFFICIENT_FIELD_IRAP 310 } 311 #endif 312 #endif 269 313 270 314 rpcSlice->setSliceType ( eSliceType ); 271 #endif272 315 273 316 // ------------------------------------------------------------------------------------------------------------------ … … 450 493 } 451 494 #else 452 eSliceType = (pocLast == 0 || (pocCurr - isField) % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType; 495 #if EFFICIENT_FIELD_IRAP 496 if(!(isField && pocLast == 1)) 497 { 498 #endif // EFFICIENT_FIELD_IRAP 499 #if ALLOW_RECOVERY_POINT_AS_RAP 500 if(m_pcCfg->getDecodingRefreshType() == 3) 501 { 502 eSliceType = (pocLast == 0 || (pocCurr) % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType; 503 504 } 505 else 506 { 507 eSliceType = (pocLast == 0 || (pocCurr - isField) % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType; 508 } 509 #else 510 eSliceType = (pocLast == 0 || (pocCurr - isField) % m_pcCfg->getIntraPeriod() == 0 || m_pcGOPEncoder->getGOPSize() == 0) ? I_SLICE : eSliceType; 511 #endif 512 #if EFFICIENT_FIELD_IRAP 513 } 514 #endif // EFFICIENT_FIELD_IRAP 453 515 #endif 454 516 … … 566 628 // store lambda 567 629 slice->setSliceQp( sliceQP ); 630 #if ADAPTIVE_QP_SELECTION 568 631 slice->setSliceQpBase ( sliceQP ); 632 #endif 569 633 m_pcRdCost ->setLambda( lambda ); 570 634 // for RDO … … 1105 1169 1106 1170 m_pcRateCtrl->setRCQP( estQP ); 1171 #if ADAPTIVE_QP_SELECTION 1107 1172 pcCU->getSlice()->setSliceQpBase( estQP ); 1173 #endif 1108 1174 } 1109 1175 -
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r884 r964 697 697 m_cSPS.setSpsInferScalingListFlag ( m_layerId > 0 && m_cVPS->getInDirectDependencyFlag( getLayerIdInVps(), 0 ) ); 698 698 m_cSPS.setSpsScalingListRefLayerId ( 0 ); 699 m_cSPS.setSpsExtensionFlag ( true ); 699 m_cSPS.setSpsExtensionPresentFlag ( true ); 700 #if H_MV_HLS_8_SPS_NODOC_48 701 m_cSPS.setSpsMultilayerExtensionFlag ( true ); 702 #else 700 703 m_cSPS.setSpsExtensionTypeFlag ( PS_EX_T_MV ,true ); 704 #endif 701 705 #if H_3D 706 #if H_MV_HLS_8_SPS_NODOC_48 707 m_cSPS.setSps3dExtensionFlag ( true ); 708 #else 702 709 m_cSPS.setSpsExtensionTypeFlag ( PS_EX_T_3D ,true ); 710 #endif 703 711 #endif 704 712 #endif … … 769 777 m_cSPS.setNumReorderPics(m_numReorderPics[i], i); 770 778 } 779 #if H_MV_HLS_8_HRD_Q0102_08 780 for ( Int ols = 0; ols < m_cVPS->getNumOutputLayerSets(); ols++) 781 { 782 // Check MaxDecPicBuffering 783 const std::vector<Int>& targetDecLayerIdList = m_cVPS->getTargetDecLayerIdList( m_cVPS->olsIdxToLsIdx( ols )); 784 for( Int is = 0; is < targetDecLayerIdList.size(); is++ ) 785 { 786 m_cSPS.inferSpsMaxDecPicBufferingMinus1( m_cVPS, ols, targetDecLayerIdList[is], true ); 787 } 788 } 789 790 #if H_MV_HLS_8_RPS_Q0100_36 791 m_cVPS->inferDbpSizeLayerSetZero( &m_cSPS, true ); 792 #endif 793 794 #endif 771 795 m_cSPS.setPCMBitDepthLuma (g_uiPCMBitDepthLuma); 772 796 m_cSPS.setPCMBitDepthChroma (g_uiPCMBitDepthChroma); … … 829 853 m_cPPS.setPPSId( getLayerIdInVps() ); 830 854 m_cPPS.setSPSId( getLayerIdInVps() ); 831 855 #if H_MV_HLS_8_SPS_NODOC_48 856 m_cPPS.setPpsMultilayerExtensionFlag ( true ); 857 #if H_3D 858 m_cPPS.setPps3dExtensionFlag ( true ); 859 #endif 860 #else 832 861 m_cPPS.setPpsExtensionTypeFlag ( PPS_EX_T_MV ,true ); 833 862 #if H_3D 834 863 m_cPPS.setPpsExtensionTypeFlag ( PPS_EX_T_3D ,true ); 864 #endif 835 865 #endif 836 866 #endif
Note: See TracChangeset for help on using the changeset viewer.