Changeset 133 in SHVCSoftware for branches/SHM-2.0-dev/source/Lib/TLibDecoder
- Timestamp:
- 28 Apr 2013, 08:49:16 (12 years ago)
- Location:
- branches/SHM-2.0-dev/source/Lib/TLibDecoder
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-2.0-dev/source/Lib/TLibDecoder/NALread.cpp
r125 r133 50 50 //! \ingroup TLibDecoder 51 51 //! \{ 52 static void convertPayloadToRBSP(vector<uint8_t>& nalUnitBuf, Bool isVclNalUnit)52 static void convertPayloadToRBSP(vector<uint8_t>& nalUnitBuf, TComInputBitstream *bitstream, Bool isVclNalUnit) 53 53 { 54 54 UInt zeroCount = 0; 55 55 vector<uint8_t>::iterator it_read, it_write; 56 56 57 for (it_read = it_write = nalUnitBuf.begin(); it_read != nalUnitBuf.end(); it_read++, it_write++) 57 UInt pos = 0; 58 bitstream->clearEmulationPreventionByteLocation(); 59 for (it_read = it_write = nalUnitBuf.begin(); it_read != nalUnitBuf.end(); it_read++, it_write++, pos++) 58 60 { 59 61 assert(zeroCount < 2 || *it_read >= 0x03); 60 62 if (zeroCount == 2 && *it_read == 0x03) 61 63 { 64 bitstream->pushEmulationPreventionByteLocation( pos ); 65 pos++; 62 66 it_read++; 63 67 zeroCount = 0; … … 109 113 if ( nalu.m_temporalId ) 110 114 { 111 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA 112 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA NT115 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_W_LP 116 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_W_RADL 113 117 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_BLA_N_LP 114 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR 118 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR_W_RADL 115 119 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_IDR_N_LP 116 120 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_CRA … … 122 126 else 123 127 { 124 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TLA 128 assert( nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TLA_R 125 129 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_TSA_N 126 130 && nalu.m_nalUnitType != NAL_UNIT_CODED_SLICE_STSA_R … … 136 140 /* perform anti-emulation prevention */ 137 141 TComInputBitstream *pcBitstream = new TComInputBitstream(NULL); 138 convertPayloadToRBSP(nalUnitBuf, (nalUnitBuf[0] & 64) == 0);142 convertPayloadToRBSP(nalUnitBuf, pcBitstream, (nalUnitBuf[0] & 64) == 0); 139 143 140 144 nalu.m_Bitstream = new TComInputBitstream(&nalUnitBuf); 145 nalu.m_Bitstream->setEmulationPreventionByteLocation(pcBitstream->getEmulationPreventionByteLocation()); 141 146 delete pcBitstream; 142 147 readNalUnitHeader(nalu); -
branches/SHM-2.0-dev/source/Lib/TLibDecoder/SEIread.cpp
r125 r133 90 90 fprintf( g_hTrace, "=========== Decoding Unit Information SEI message ===========\n"); 91 91 break; 92 #if J0149_TONE_MAPPING_SEI 93 case SEI::TONE_MAPPING_INFO: 94 fprintf( g_hTrace, "===========Tone Mapping Info SEI message ===========\n"); 95 break; 96 #endif 97 #if L0208_SOP_DESCRIPTION_SEI 98 case SEI::SOP_DESCRIPTION: 99 fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n"); 100 break; 101 #endif 102 #if K0180_SCALABLE_NESTING_SEI 103 case SEI::SCALABLE_NESTING: 104 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); 105 break; 106 #endif 92 107 default: 93 108 fprintf( g_hTrace, "=========== Unknown SEI message ===========\n"); … … 154 169 SEI *sei = NULL; 155 170 156 if(nalUnitType == NAL_UNIT_ SEI)171 if(nalUnitType == NAL_UNIT_PREFIX_SEI) 157 172 { 158 173 switch (payloadType) … … 219 234 xParseSEIGradualDecodingRefreshInfo((SEIGradualDecodingRefreshInfo&) *sei, payloadSize); 220 235 break; 236 #if J0149_TONE_MAPPING_SEI 237 case SEI::TONE_MAPPING_INFO: 238 sei = new SEIToneMappingInfo; 239 xParseSEIToneMappingInfo((SEIToneMappingInfo&) *sei, payloadSize); 240 break; 241 #endif 242 #if L0208_SOP_DESCRIPTION_SEI 243 case SEI::SOP_DESCRIPTION: 244 sei = new SEISOPDescription; 245 xParseSEISOPDescription((SEISOPDescription&) *sei, payloadSize); 246 break; 247 #endif 248 #if K0180_SCALABLE_NESTING_SEI 249 case SEI::SCALABLE_NESTING: 250 sei = new SEIScalableNesting; 251 xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps); 252 break; 253 #endif 221 254 default: 222 255 for (UInt i = 0; i < payloadSize; i++) … … 284 317 { 285 318 UInt reservedPayloadExtensionData; 286 READ_ CODE (1,reservedPayloadExtensionData, "reserved_payload_extension_data");319 READ_FLAG (reservedPayloadExtensionData, "reserved_payload_extension_data"); 287 320 } 288 321 289 322 UInt dummy; 290 READ_CODE (1, dummy, "payload_bit_equal_to_one"); 291 READ_CODE (payloadBitsRemaining-1, dummy, "payload_bit_equal_to_zero"); 323 READ_FLAG (dummy, "payload_bit_equal_to_one"); payloadBitsRemaining--; 324 while (payloadBitsRemaining) 325 { 326 READ_FLAG (dummy, "payload_bit_equal_to_zero"); payloadBitsRemaining--; 327 } 292 328 } 293 329 … … 632 668 } 633 669 670 #if J0149_TONE_MAPPING_SEI 671 Void SEIReader::xParseSEIToneMappingInfo(SEIToneMappingInfo& sei, UInt /*payloadSize*/) 672 { 673 Int i; 674 UInt val; 675 READ_UVLC( val, "tone_map_id" ); sei.m_toneMapId = val; 676 READ_FLAG( val, "tone_map_cancel_flag" ); sei.m_toneMapCancelFlag = val; 677 678 if ( !sei.m_toneMapCancelFlag ) 679 { 680 READ_FLAG( val, "tone_map_persistence_flag" ); sei.m_toneMapPersistenceFlag = val; 681 READ_CODE( 8, val, "coded_data_bit_depth" ); sei.m_codedDataBitDepth = val; 682 READ_CODE( 8, val, "target_bit_depth" ); sei.m_targetBitDepth = val; 683 READ_UVLC( val, "model_id" ); sei.m_modelId = val; 684 switch(sei.m_modelId) 685 { 686 case 0: 687 { 688 READ_CODE( 32, val, "min_value" ); sei.m_minValue = val; 689 READ_CODE( 32, val, "max_value" ); sei.m_maxValue = val; 690 break; 691 } 692 case 1: 693 { 694 READ_CODE( 32, val, "sigmoid_midpoint" ); sei.m_sigmoidMidpoint = val; 695 READ_CODE( 32, val, "sigmoid_width" ); sei.m_sigmoidWidth = val; 696 break; 697 } 698 case 2: 699 { 700 UInt num = 1u << sei.m_targetBitDepth; 701 sei.m_startOfCodedInterval.resize(num+1); 702 for(i = 0; i < num; i++) 703 { 704 READ_CODE( ((( sei.m_codedDataBitDepth + 7 ) >> 3 ) << 3), val, "start_of_coded_interval" ); 705 sei.m_startOfCodedInterval[i] = val; 706 } 707 sei.m_startOfCodedInterval[num] = 1u << sei.m_codedDataBitDepth; 708 break; 709 } 710 case 3: 711 { 712 READ_CODE( 16, val, "num_pivots" ); sei.m_numPivots = val; 713 sei.m_codedPivotValue.resize(sei.m_numPivots); 714 sei.m_targetPivotValue.resize(sei.m_numPivots); 715 for(i = 0; i < sei.m_numPivots; i++ ) 716 { 717 READ_CODE( ((( sei.m_codedDataBitDepth + 7 ) >> 3 ) << 3), val, "coded_pivot_value" ); 718 sei.m_codedPivotValue[i] = val; 719 READ_CODE( ((( sei.m_targetBitDepth + 7 ) >> 3 ) << 3), val, "target_pivot_value" ); 720 sei.m_targetPivotValue[i] = val; 721 } 722 break; 723 } 724 case 4: 725 { 726 READ_CODE( 8, val, "camera_iso_speed_idc" ); sei.m_cameraIsoSpeedValue = val; 727 if( sei.m_cameraIsoSpeedValue == 255) //Extended_ISO 728 { 729 READ_CODE( 32, val, "camera_iso_speed_value" ); sei.m_cameraIsoSpeedValue = val; 730 } 731 READ_FLAG( val, "exposure_compensation_value_sign_flag" ); sei.m_exposureCompensationValueSignFlag = val; 732 READ_CODE( 16, val, "exposure_compensation_value_numerator" ); sei.m_exposureCompensationValueNumerator = val; 733 READ_CODE( 16, val, "exposure_compensation_value_denom_idc" ); sei.m_exposureCompensationValueDenomIdc = val; 734 READ_CODE( 32, val, "ref_screen_luminance_white" ); sei.m_refScreenLuminanceWhite = val; 735 READ_CODE( 32, val, "extended_range_white_level" ); sei.m_extendedRangeWhiteLevel = val; 736 READ_CODE( 16, val, "nominal_black_level_luma_code_value" ); sei.m_nominalBlackLevelLumaCodeValue = val; 737 READ_CODE( 16, val, "nominal_white_level_luma_code_value" ); sei.m_nominalWhiteLevelLumaCodeValue= val; 738 READ_CODE( 16, val, "extended_white_level_luma_code_value" ); sei.m_extendedWhiteLevelLumaCodeValue = val; 739 break; 740 } 741 default: 742 { 743 assert(!"Undefined SEIToneMapModelId"); 744 break; 745 } 746 }//switch model id 747 }// if(!sei.m_toneMapCancelFlag) 748 749 xParseByteAlign(); 750 } 751 #endif 752 753 #if L0208_SOP_DESCRIPTION_SEI 754 Void SEIReader::xParseSEISOPDescription(SEISOPDescription &sei, UInt payloadSize) 755 { 756 Int iCode; 757 UInt uiCode; 758 759 READ_UVLC( uiCode, "sop_seq_parameter_set_id" ); sei.m_sopSeqParameterSetId = uiCode; 760 READ_UVLC( uiCode, "num_pics_in_sop_minus1" ); sei.m_numPicsInSopMinus1 = uiCode; 761 for (UInt i = 0; i <= sei.m_numPicsInSopMinus1; i++) 762 { 763 READ_CODE( 6, uiCode, "sop_desc_vcl_nalu_type" ); sei.m_sopDescVclNaluType[i] = uiCode; 764 READ_CODE( 3, sei.m_sopDescTemporalId[i], "sop_desc_temporal_id" ); sei.m_sopDescTemporalId[i] = uiCode; 765 if (sei.m_sopDescVclNaluType[i] != NAL_UNIT_CODED_SLICE_IDR_W_RADL && sei.m_sopDescVclNaluType[i] != NAL_UNIT_CODED_SLICE_IDR_N_LP) 766 { 767 READ_UVLC( sei.m_sopDescStRpsIdx[i], "sop_desc_st_rps_idx" ); sei.m_sopDescStRpsIdx[i] = uiCode; 768 } 769 if (i > 0) 770 { 771 READ_SVLC( iCode, "sop_desc_poc_delta" ); sei.m_sopDescPocDelta[i] = iCode; 772 } 773 } 774 775 xParseByteAlign(); 776 } 777 #endif 778 779 #if K0180_SCALABLE_NESTING_SEI 780 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps) 781 { 782 UInt uiCode; 783 SEIMessages seis; 784 785 READ_FLAG( uiCode, "bitstream_subset_flag" ); sei.m_bitStreamSubsetFlag = uiCode; 786 READ_FLAG( uiCode, "nesting_op_flag" ); sei.m_nestingOpFlag = uiCode; 787 if (sei.m_nestingOpFlag) 788 { 789 READ_FLAG( uiCode, "default_op_flag" ); sei.m_defaultOpFlag = uiCode; 790 READ_UVLC( uiCode, "nesting_num_ops_minus1" ); sei.m_nestingNumOpsMinus1 = uiCode; 791 for (UInt i = sei.m_defaultOpFlag; i <= sei.m_nestingNumOpsMinus1; i++) 792 { 793 READ_CODE( 3, uiCode, "nesting_max_temporal_id_plus1" ); sei.m_nestingMaxTemporalIdPlus1[i] = uiCode; 794 READ_UVLC( uiCode, "nesting_op_idx" ); sei.m_nestingOpIdx[i] = uiCode; 795 } 796 } 797 else 798 { 799 READ_FLAG( uiCode, "all_layers_flag" ); sei.m_allLayersFlag = uiCode; 800 if (!sei.m_allLayersFlag) 801 { 802 READ_CODE( 3, uiCode, "nesting_no_op_max_temporal_id_plus1" ); sei.m_nestingNoOpMaxTemporalIdPlus1 = uiCode; 803 READ_UVLC( uiCode, "nesting_num_layers_minus1" ); sei.m_nestingNumLayersMinus1 = uiCode; 804 for (UInt i = 0; i <= sei.m_nestingNumLayersMinus1; i++) 805 { 806 READ_CODE( 6, uiCode, "nesting_layer_id" ); sei.m_nestingLayerId[i] = uiCode; 807 } 808 } 809 } 810 811 // byte alignment 812 while ( m_pcBitstream->getNumBitsRead() % 8 != 0 ) 813 { 814 UInt code; 815 READ_FLAG( code, "nesting_zero_bit" ); 816 } 817 818 sei.m_callerOwnsSEIs = false; 819 820 // read nested SEI messages 821 do { 822 xReadSEImessage(sei.m_nestedSEIs, nalUnitType, sps); 823 } while (m_pcBitstream->getNumBitsLeft() > 8); 824 825 } 826 #endif 827 634 828 Void SEIReader::xParseByteAlign() 635 829 { -
branches/SHM-2.0-dev/source/Lib/TLibDecoder/SEIread.h
r125 r133 70 70 Void xParseSEITemporalLevel0Index (SEITemporalLevel0Index &sei, UInt payloadSize); 71 71 Void xParseSEIGradualDecodingRefreshInfo (SEIGradualDecodingRefreshInfo &sei, UInt payloadSize); 72 #if J0149_TONE_MAPPING_SEI 73 Void xParseSEIToneMappingInfo (SEIToneMappingInfo& sei, UInt payloadSize); 74 #endif 75 #if L0208_SOP_DESCRIPTION_SEI 76 Void xParseSEISOPDescription (SEISOPDescription &sei, UInt payloadSize); 77 #endif 78 #if K0180_SCALABLE_NESTING_SEI 79 Void xParseSEIScalableNesting (SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComSPS *sps); 80 #endif 72 81 Void xParseByteAlign(); 73 82 }; -
branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r125 r133 593 593 594 594 READ_UVLC( uiCode, "bit_depth_luma_minus8" ); 595 g_bitDepthY = 8 + uiCode; 596 pcSPS->setBitDepthY(g_bitDepthY); 595 pcSPS->setBitDepthY( uiCode + 8 ); 597 596 pcSPS->setQpBDOffsetY( (Int) (6*uiCode) ); 598 597 599 598 READ_UVLC( uiCode, "bit_depth_chroma_minus8" ); 600 g_bitDepthC = 8 + uiCode; 601 pcSPS->setBitDepthC(g_bitDepthC); 599 pcSPS->setBitDepthC( uiCode + 8 ); 602 600 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) ); 603 601 … … 608 606 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) 609 607 { 608 #if L0323_DPB 609 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1"); 610 pcSPS->setMaxDecPicBuffering( uiCode + 1, i); 611 #else 610 612 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering"); 611 613 pcSPS->setMaxDecPicBuffering( uiCode, i); 614 #endif 612 615 READ_UVLC ( uiCode, "sps_num_reorder_pics" ); 613 616 pcSPS->setNumReorderPics(uiCode, i); … … 628 631 629 632 READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" ); 630 UInt log2MinCUSize = uiCode + 3; 633 Int log2MinCUSize = uiCode + 3; 634 pcSPS->setLog2MinCodingBlockSize(log2MinCUSize); 631 635 READ_UVLC( uiCode, "log2_diff_max_min_coding_block_size" ); 632 UInt uiMaxCUDepthCorrect = uiCode; 633 pcSPS->setMaxCUWidth ( 1<<(log2MinCUSize + uiMaxCUDepthCorrect) ); g_uiMaxCUWidth = 1<<(log2MinCUSize + uiMaxCUDepthCorrect); 634 pcSPS->setMaxCUHeight ( 1<<(log2MinCUSize + uiMaxCUDepthCorrect) ); g_uiMaxCUHeight = 1<<(log2MinCUSize + uiMaxCUDepthCorrect); 636 pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode); 637 Int maxCUDepthDelta = uiCode; 638 pcSPS->setMaxCUWidth ( 1<<(log2MinCUSize + maxCUDepthDelta) ); 639 pcSPS->setMaxCUHeight ( 1<<(log2MinCUSize + maxCUDepthDelta) ); 635 640 READ_UVLC( uiCode, "log2_min_transform_block_size_minus2" ); pcSPS->setQuadtreeTULog2MinSize( uiCode + 2 ); 636 641 … … 640 645 READ_UVLC( uiCode, "max_transform_hierarchy_depth_inter" ); pcSPS->setQuadtreeTUMaxDepthInter( uiCode+1 ); 641 646 READ_UVLC( uiCode, "max_transform_hierarchy_depth_intra" ); pcSPS->setQuadtreeTUMaxDepthIntra( uiCode+1 ); 642 g_uiAddCUDepth = 0; 643 while( ( pcSPS->getMaxCUWidth() >> uiMaxCUDepthCorrect ) > ( 1 << ( pcSPS->getQuadtreeTULog2MinSize() + g_uiAddCUDepth ) ) ) 644 { 645 g_uiAddCUDepth++; 646 } 647 pcSPS->setMaxCUDepth( uiMaxCUDepthCorrect+g_uiAddCUDepth ); 648 g_uiMaxCUDepth = uiMaxCUDepthCorrect+g_uiAddCUDepth; 649 // BB: these parameters may be removed completly and replaced by the fixed values 650 pcSPS->setMinTrDepth( 0 ); 651 pcSPS->setMaxTrDepth( 1 ); 647 648 Int addCuDepth = max (0, log2MinCUSize - (Int)pcSPS->getQuadtreeTULog2MinSize() ); 649 pcSPS->setMaxCUDepth( maxCUDepthDelta + addCuDepth ); 650 652 651 READ_FLAG( uiCode, "scaling_list_enabled_flag" ); pcSPS->setScalingListFlag ( uiCode ); 653 652 if(pcSPS->getScalingListFlag()) … … 746 745 for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++) 747 746 { 747 #if L0323_DPB 748 READ_UVLC( uiCode, "vps_max_dec_pic_buffering_minus1[i]" ); pcVPS->setMaxDecPicBuffering( uiCode + 1, i ); 749 #else 748 750 READ_UVLC( uiCode, "vps_max_dec_pic_buffering[i]" ); pcVPS->setMaxDecPicBuffering( uiCode, i ); 751 #endif 749 752 READ_UVLC( uiCode, "vps_num_reorder_pics[i]" ); pcVPS->setNumReorderPics( uiCode, i ); 750 753 READ_UVLC( uiCode, "vps_max_latency_increase[i]" ); pcVPS->setMaxLatencyIncrease( uiCode, i ); … … 1074 1077 iPOCmsb = iPrevPOCmsb; 1075 1078 } 1076 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA 1077 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA NT1079 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 1080 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 1078 1081 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP ) 1079 1082 { … … 1084 1087 1085 1088 TComReferencePictureSet* rps; 1089 rps = rpcSlice->getLocalRPS(); 1090 rpcSlice->setRPS(rps); 1086 1091 READ_FLAG( uiCode, "short_term_ref_pic_set_sps_flag" ); 1087 1092 if(uiCode == 0) // use short-term reference picture set explicitly signalled in slice header 1088 1093 { 1089 rps = rpcSlice->getLocalRPS();1090 1094 parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets()); 1091 rpcSlice->setRPS(rps);1092 1095 } 1093 1096 else // use reference to short-term reference picture set in PPS … … 1106 1109 uiCode = 0; 1107 1110 } 1108 rpcSlice->setRPS(sps->getRPSList()->getReferencePictureSet(uiCode)); 1109 1110 rps = rpcSlice->getRPS(); 1111 memcpy(rps,sps->getRPSList()->getReferencePictureSet(uiCode),sizeof(TComReferencePictureSet)); 1111 1112 } 1112 1113 if(sps->getLongTermRefsPresent()) … … 1131 1132 rps->setNumberOfLongtermPictures(numOfLtrp); 1132 1133 Int maxPicOrderCntLSB = 1 << rpcSlice->getSPS()->getBitsForPOC(); 1133 Int prev LSB = 0, prevDeltaMSB = 0, deltaPocMSBCycleLT = 0;;1134 Int prevDeltaMSB = 0, deltaPocMSBCycleLT = 0;; 1134 1135 for(Int j=offset+rps->getNumberOfLongtermPictures()-1, k = 0; k < numOfLtrp; j--, k++) 1135 1136 { … … 1158 1159 READ_UVLC( uiCode, "delta_poc_msb_cycle_lt[i]" ); 1159 1160 Bool deltaFlag = false; 1160 // First LTRP || First LTRP from SH || curr LSB != prev LSB1161 if( (j == offset+rps->getNumberOfLongtermPictures()-1) || (j == offset+(numOfLtrp-numLtrpInSPS)-1) || (pocLsbLt != prevLSB))1161 // First LTRP || First LTRP from SH 1162 if( (j == offset+rps->getNumberOfLongtermPictures()-1) || (j == offset+(numOfLtrp-numLtrpInSPS)-1) ) 1162 1163 { 1163 1164 deltaFlag = true; … … 1184 1185 rps->setCheckLTMSBPresent(j,false); 1185 1186 } 1186 prevLSB = pocLsbLt;1187 1187 prevDeltaMSB = deltaPocMSBCycleLT; 1188 1188 } … … 1190 1190 rps->setNumberOfPictures(offset); 1191 1191 } 1192 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA 1193 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA NT1192 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 1193 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 1194 1194 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP ) 1195 1195 { … … 1423 1423 if(!rpcSlice->getDeblockingFilterDisable()) 1424 1424 { 1425 READ_SVLC( iCode, "beta_offset_div2" ); rpcSlice->setDeblockingFilterBetaOffsetDiv2(iCode); 1426 READ_SVLC( iCode, "tc_offset_div2" ); rpcSlice->setDeblockingFilterTcOffsetDiv2(iCode); 1425 READ_SVLC( iCode, "slice_beta_offset_div2" ); rpcSlice->setDeblockingFilterBetaOffsetDiv2(iCode); 1426 assert(rpcSlice->getDeblockingFilterBetaOffsetDiv2() >= -6 && 1427 rpcSlice->getDeblockingFilterBetaOffsetDiv2() <= 6); 1428 READ_SVLC( iCode, "slice_tc_offset_div2" ); rpcSlice->setDeblockingFilterTcOffsetDiv2(iCode); 1429 assert(rpcSlice->getDeblockingFilterTcOffsetDiv2() >= -6 && 1430 rpcSlice->getDeblockingFilterTcOffsetDiv2() <= 6); 1427 1431 } 1428 1432 } … … 1456 1460 } 1457 1461 1458 if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() )1459 {1460 1462 UInt *entryPointOffset = NULL; 1461 1463 UInt numEntryPointOffsets, offsetLenMinus1; 1462 1464 if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() ) 1465 { 1463 1466 READ_UVLC(numEntryPointOffsets, "num_entry_point_offsets"); rpcSlice->setNumEntryPointOffsets ( numEntryPointOffsets ); 1464 1467 if (numEntryPointOffsets>0) … … 1477 1480 #endif 1478 1481 } 1482 } 1483 else 1484 { 1485 rpcSlice->setNumEntryPointOffsets ( 0 ); 1486 } 1487 1488 if(pps->getSliceHeaderExtensionPresentFlag()) 1489 { 1490 READ_UVLC(uiCode,"slice_header_extension_length"); 1491 for(Int i=0; i<uiCode; i++) 1492 { 1493 UInt ignore; 1494 READ_CODE(8,ignore,"slice_header_extension_data_byte"); 1495 } 1496 } 1497 m_pcBitstream->readByteAlignment(); 1498 1499 if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() ) 1500 { 1501 Int endOfSliceHeaderLocation = m_pcBitstream->getByteLocation(); 1502 Int curEntryPointOffset = 0; 1503 Int prevEntryPointOffset = 0; 1504 for (UInt idx=0; idx<numEntryPointOffsets; idx++) 1505 { 1506 curEntryPointOffset += entryPointOffset[ idx ]; 1507 1508 Int emulationPreventionByteCount = 0; 1509 for ( UInt curByteIdx = 0; curByteIdx<m_pcBitstream->numEmulationPreventionBytesRead(); curByteIdx++ ) 1510 { 1511 if ( m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) >= ( prevEntryPointOffset + endOfSliceHeaderLocation ) && 1512 m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) < ( curEntryPointOffset + endOfSliceHeaderLocation ) ) 1513 { 1514 emulationPreventionByteCount++; 1515 } 1516 } 1517 1518 entryPointOffset[ idx ] -= emulationPreventionByteCount; 1519 prevEntryPointOffset = curEntryPointOffset; 1520 } 1479 1521 1480 1522 if ( pps->getTilesEnabledFlag() ) … … 1512 1554 } 1513 1555 } 1514 else 1515 { 1516 rpcSlice->setNumEntryPointOffsets ( 0 ); 1517 } 1518 1519 if(pps->getSliceHeaderExtensionPresentFlag()) 1520 { 1521 READ_UVLC(uiCode,"slice_header_extension_length"); 1522 for(Int i=0; i<uiCode; i++) 1523 { 1524 UInt ignore; 1525 READ_CODE(8,ignore,"slice_header_extension_data_byte"); 1526 } 1527 } 1528 m_pcBitstream->readByteAlignment(); 1556 1529 1557 return; 1530 1558 } … … 1771 1799 // ==================================================================================================================== 1772 1800 1773 1774 /** Parse PCM alignment zero bits.1775 * \returns Void1776 */1777 Void TDecCavlc::xReadPCMAlignZero( )1778 {1779 UInt uiNumberOfBits = m_pcBitstream->getNumBitsUntilByteAligned();1780 1781 if(uiNumberOfBits)1782 {1783 UInt uiBits;1784 UInt uiSymbol;1785 1786 for(uiBits = 0; uiBits < uiNumberOfBits; uiBits++)1787 {1788 xReadFlag( uiSymbol );1789 assert( uiSymbol == 0 );1790 }1791 }1792 }1793 1794 Void TDecCavlc::xReadUnaryMaxSymbol( UInt& ruiSymbol, UInt uiMaxSymbol )1795 {1796 if (uiMaxSymbol == 0)1797 {1798 ruiSymbol = 0;1799 return;1800 }1801 1802 xReadFlag( ruiSymbol );1803 1804 if (ruiSymbol == 0 || uiMaxSymbol == 1)1805 {1806 return;1807 }1808 1809 UInt uiSymbol = 0;1810 UInt uiCont;1811 1812 do1813 {1814 xReadFlag( uiCont );1815 uiSymbol++;1816 }1817 while( uiCont && (uiSymbol < uiMaxSymbol-1) );1818 1819 if( uiCont && (uiSymbol == uiMaxSymbol-1) )1820 {1821 uiSymbol++;1822 }1823 1824 ruiSymbol = uiSymbol;1825 }1826 1827 Void TDecCavlc::xReadExGolombLevel( UInt& ruiSymbol )1828 {1829 UInt uiSymbol ;1830 UInt uiCount = 0;1831 do1832 {1833 xReadFlag( uiSymbol );1834 uiCount++;1835 }1836 while( uiSymbol && (uiCount != 13));1837 1838 ruiSymbol = uiCount-1;1839 1840 if( uiSymbol )1841 {1842 xReadEpExGolomb( uiSymbol, 0 );1843 ruiSymbol += uiSymbol+1;1844 }1845 1846 return;1847 }1848 1849 Void TDecCavlc::xReadEpExGolomb( UInt& ruiSymbol, UInt uiCount )1850 {1851 UInt uiSymbol = 0;1852 UInt uiBit = 1;1853 1854 1855 while( uiBit )1856 {1857 xReadFlag( uiBit );1858 uiSymbol += uiBit << uiCount++;1859 }1860 1861 uiCount--;1862 while( uiCount-- )1863 {1864 xReadFlag( uiBit );1865 uiSymbol += uiBit << uiCount;1866 }1867 1868 ruiSymbol = uiSymbol;1869 1870 return;1871 }1872 1873 UInt TDecCavlc::xGetBit()1874 {1875 UInt ruiCode;1876 m_pcBitstream->read( 1, ruiCode );1877 return ruiCode;1878 }1879 1880 1881 1801 /** parse explicit wp tables 1882 1802 * \param TComSlice* pcSlice … … 1895 1815 // decode delta_luma_log2_weight_denom : 1896 1816 READ_UVLC( uiLog2WeightDenomLuma, "luma_log2_weight_denom" ); // ue(v): luma_log2_weight_denom 1817 assert( uiLog2WeightDenomLuma <= 7 ); 1897 1818 if( bChroma ) 1898 1819 { 1899 1820 READ_SVLC( iDeltaDenom, "delta_chroma_log2_weight_denom" ); // se(v): delta_chroma_log2_weight_denom 1900 1821 assert((iDeltaDenom + (Int)uiLog2WeightDenomLuma)>=0); 1822 assert((iDeltaDenom + (Int)uiLog2WeightDenomLuma)<=7); 1901 1823 uiLog2WeightDenomChroma = (UInt)(iDeltaDenom + uiLog2WeightDenomLuma); 1902 1824 } … … 1937 1859 Int iDeltaWeight; 1938 1860 READ_SVLC( iDeltaWeight, "delta_luma_weight_lX" ); // se(v): delta_luma_weight_l0[i] 1861 assert( iDeltaWeight >= -128 ); 1862 assert( iDeltaWeight <= 127 ); 1939 1863 wp[0].iWeight = (iDeltaWeight + (1<<wp[0].uiLog2WeightDenom)); 1940 1864 READ_SVLC( wp[0].iOffset, "luma_offset_lX" ); // se(v): luma_offset_l0[i] 1865 assert( wp[0].iOffset >= -128 ); 1866 assert( wp[0].iOffset <= 127 ); 1941 1867 } 1942 1868 else … … 1953 1879 Int iDeltaWeight; 1954 1880 READ_SVLC( iDeltaWeight, "delta_chroma_weight_lX" ); // se(v): chroma_weight_l0[i][j] 1881 assert( iDeltaWeight >= -128 ); 1882 assert( iDeltaWeight <= 127 ); 1955 1883 wp[j].iWeight = (iDeltaWeight + (1<<wp[1].uiLog2WeightDenom)); 1956 1884 1957 1885 Int iDeltaChroma; 1958 1886 READ_SVLC( iDeltaChroma, "delta_chroma_offset_lX" ); // se(v): delta_chroma_offset_l0[i][j] 1887 assert( iDeltaChroma >= -512 ); 1888 assert( iDeltaChroma <= 511 ); 1959 1889 Int pred = ( 128 - ( ( 128*wp[j].iWeight)>>(wp[j].uiLog2WeightDenom) ) ); 1960 1890 wp[j].iOffset = Clip3(-128, 127, (iDeltaChroma + pred) ); -
branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.h
r125 r133 61 61 62 62 protected: 63 Void xReadEpExGolomb ( UInt& ruiSymbol, UInt uiCount );64 Void xReadExGolombLevel ( UInt& ruiSymbol );65 Void xReadUnaryMaxSymbol ( UInt& ruiSymbol, UInt uiMaxSymbol );66 67 Void xReadPCMAlignZero ();68 69 UInt xGetBit ();70 71 63 void parseShortTermRefPicSet (TComSPS* pcSPS, TComReferencePictureSet* pcRPS, Int idx); 72 private:73 64 74 65 public: -
branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecSlice.h
r125 r133 91 91 Void initCtxMem( UInt i ); 92 92 Void setCtxMem( TDecSbac* sb, Int b ) { CTXMem[b] = sb; } 93 Int getCtxMemSize( ) { return (Int)CTXMem.size(); } 93 94 #if SVC_EXTENSION 94 95 TDecTop* getLayerDec ( UInt LayerId ) { return m_ppcTDecTop[LayerId]; } -
branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecTop.cpp
r125 r133 231 231 } 232 232 233 #if L0323_DPB 234 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()); // m_uiMaxDecPicBuffering has the space for the picture currently being decoded 235 #else 233 236 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()) + 1; // +1 to have space for the picture currently being decoded 237 #endif 234 238 if (m_cListPic.size() < (UInt)m_iMaxRefPicNum) 235 239 { … … 405 409 assert (sps != 0); 406 410 407 if( false == m_parameterSetManagerDecoder[m_layerId].activatePPS(m_apcSlicePilot->getPPSId(), m_apcSlicePilot-> getIdrPicFlag()) )411 if( false == m_parameterSetManagerDecoder[m_layerId].activatePPS(m_apcSlicePilot->getPPSId(), m_apcSlicePilot->isIRAP()) ) 408 412 #else 409 413 m_parameterSetManagerDecoder.applyPrefetchedPS(); … … 415 419 assert (sps != 0); 416 420 417 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot-> getIdrPicFlag()))421 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP())) 418 422 #endif 419 423 { 420 424 printf ("Parameter set activation failed!"); 421 425 assert (0); 426 } 427 428 if( pps->getDependentSliceSegmentsEnabledFlag() ) 429 { 430 Int NumCtx = pps->getEntropyCodingSyncEnabledFlag()?2:1; 431 432 if (m_cSliceDecoder.getCtxMemSize() != NumCtx) 433 { 434 m_cSliceDecoder.initCtxMem(NumCtx); 435 for ( UInt st = 0; st < NumCtx; st++ ) 436 { 437 TDecSbac* ctx = NULL; 438 ctx = new TDecSbac; 439 ctx->init( &m_cBinCABAC ); 440 m_cSliceDecoder.setCtxMem( ctx, st ); 441 } 442 } 422 443 } 423 444 … … 428 449 pps->setMinCuDQPSize( sps->getMaxCUWidth() >> ( pps->getMaxCuDQPDepth()) ); 429 450 430 for (Int i = 0; i < sps->getMaxCUDepth() - g_uiAddCUDepth; i++) 451 g_bitDepthY = sps->getBitDepthY(); 452 g_bitDepthC = sps->getBitDepthC(); 453 g_uiMaxCUWidth = sps->getMaxCUWidth(); 454 g_uiMaxCUHeight = sps->getMaxCUHeight(); 455 g_uiMaxCUDepth = sps->getMaxCUDepth(); 456 g_uiAddCUDepth = max (0, sps->getLog2MinCodingBlockSize() - (Int)sps->getQuadtreeTULog2MinSize() ); 457 458 for (Int i = 0; i < sps->getLog2DiffMaxMinCodingBlockSize(); i++) 431 459 { 432 460 sps->setAMPAcc( i, sps->getUseAMP() ); 433 461 } 434 462 435 for (Int i = sps->get MaxCUDepth() - g_uiAddCUDepth; i < sps->getMaxCUDepth(); i++)463 for (Int i = sps->getLog2DiffMaxMinCodingBlockSize(); i < sps->getMaxCUDepth(); i++) 436 464 { 437 465 sps->setAMPAcc( i, 0 ); … … 439 467 440 468 m_cSAO.destroy(); 441 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight);442 m_cLoopFilter. create( g_uiMaxCUDepth);469 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() ); 470 m_cLoopFilter.create( sps->getMaxCUDepth() ); 443 471 } 444 472 … … 467 495 468 496 m_apcSlicePilot->setNalUnitType(nalu.m_nalUnitType); 469 if((m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_N) || 470 (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N) || 471 (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N)) 472 { 473 m_apcSlicePilot->setTemporalLayerNonReferenceFlag(true); 474 } 497 Bool nonReferenceFlag = (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_N || 498 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N || 499 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N || 500 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N || 501 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N); 502 m_apcSlicePilot->setTemporalLayerNonReferenceFlag(nonReferenceFlag); 503 475 504 m_apcSlicePilot->setReferenced(true); // Putting this as true ensures that picture is referenced the first time it is in an RPS 476 505 m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId); … … 482 511 #endif 483 512 if (m_apcSlicePilot->isNextSlice()) 484 {485 513 // Skip pictures due to random access 486 514 if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay)) … … 493 521 return false; 494 522 } 495 }496 523 497 524 // exit when a new picture is found … … 506 533 } 507 534 #else 508 if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence) 535 //we should only get a different poc for a new picture (with CTU address==0) 536 if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence && (!m_apcSlicePilot->getSliceCurStartCUAddr()==0)) 537 { 538 printf ("Warning, the first slice of a picture might have been lost!\n"); 539 } 540 // exit when a new picture is found 541 if (m_apcSlicePilot->isNextSlice() && (m_apcSlicePilot->getSliceCurStartCUAddr() == 0 && !m_bFirstSliceInPicture) && !m_bFirstSliceInSequence ) 509 542 { 510 543 if (m_prevPOC >= m_pocRandomAccess) … … 732 765 if (bNextSlice) 733 766 { 734 pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA );767 pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA, m_cListPic ); 735 768 // Set reference list 736 769 #if REF_LIST_BUGFIX 737 770 if (m_layerId == 0) 738 { 739 pcSlice->setRefPicList( m_cListPic ); 740 }771 #endif 772 #if FIX1071 773 pcSlice->setRefPicList( m_cListPic, true ); 741 774 #else 742 775 pcSlice->setRefPicList( m_cListPic ); … … 839 872 //--------------- 840 873 pcSlice->setRefPOCList(); 874 #if !L0034_COMBINED_LIST_CLEANUP 841 875 pcSlice->setNoBackPredFlag( false ); 842 876 if ( pcSlice->getSliceType() == B_SLICE ) … … 855 889 } 856 890 } 891 #endif 857 892 } 858 893 … … 947 982 { 948 983 #if SVC_EXTENSION 949 if(nalUnitType == NAL_UNIT_S EI_SUFFIX)984 if(nalUnitType == NAL_UNIT_SUFFIX_SEI) 950 985 { 951 986 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder[m_layerId].getActiveSPS() ); … … 967 1002 } 968 1003 #else 969 if(nalUnitType == NAL_UNIT_S EI_SUFFIX)1004 if(nalUnitType == NAL_UNIT_SUFFIX_SEI) 970 1005 { 971 1006 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); … … 1035 1070 return false; 1036 1071 1037 case NAL_UNIT_ SEI:1038 case NAL_UNIT_S EI_SUFFIX:1072 case NAL_UNIT_PREFIX_SEI: 1073 case NAL_UNIT_SUFFIX_SEI: 1039 1074 xDecodeSEI( nalu.m_Bitstream, nalu.m_nalUnitType ); 1040 1075 return false; … … 1042 1077 case NAL_UNIT_CODED_SLICE_TRAIL_R: 1043 1078 case NAL_UNIT_CODED_SLICE_TRAIL_N: 1044 case NAL_UNIT_CODED_SLICE_TLA :1079 case NAL_UNIT_CODED_SLICE_TLA_R: 1045 1080 case NAL_UNIT_CODED_SLICE_TSA_N: 1046 1081 case NAL_UNIT_CODED_SLICE_STSA_R: 1047 1082 case NAL_UNIT_CODED_SLICE_STSA_N: 1048 case NAL_UNIT_CODED_SLICE_BLA :1049 case NAL_UNIT_CODED_SLICE_BLA NT:1083 case NAL_UNIT_CODED_SLICE_BLA_W_LP: 1084 case NAL_UNIT_CODED_SLICE_BLA_W_RADL: 1050 1085 case NAL_UNIT_CODED_SLICE_BLA_N_LP: 1051 case NAL_UNIT_CODED_SLICE_IDR :1086 case NAL_UNIT_CODED_SLICE_IDR_W_RADL: 1052 1087 case NAL_UNIT_CODED_SLICE_IDR_N_LP: 1053 1088 case NAL_UNIT_CODED_SLICE_CRA: 1054 1089 case NAL_UNIT_CODED_SLICE_RADL_N: 1055 case NAL_UNIT_CODED_SLICE_ DLP:1090 case NAL_UNIT_CODED_SLICE_RADL_R: 1056 1091 case NAL_UNIT_CODED_SLICE_RASL_N: 1057 case NAL_UNIT_CODED_SLICE_ TFD:1092 case NAL_UNIT_CODED_SLICE_RASL_R: 1058 1093 #if SVC_EXTENSION 1059 1094 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, curLayerId, bNewPOC); … … 1077 1112 Bool TDecTop::isSkipPictureForBLA(Int& iPOCLastDisplay) 1078 1113 { 1079 if (m_prevRAPisBLA && m_apcSlicePilot->getPOC() < m_pocCRA && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_ TFD|| m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N))1114 if (m_prevRAPisBLA && m_apcSlicePilot->getPOC() < m_pocCRA && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N)) 1080 1115 { 1081 1116 iPOCLastDisplay++; … … 1108 1143 { 1109 1144 if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA 1110 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA 1145 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 1111 1146 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP 1112 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA NT)1147 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL ) 1113 1148 { 1114 1149 // set the POC random access since we need to skip the reordered pictures in the case of CRA/CRANT/BLA/BLANT. 1115 1150 m_pocRandomAccess = m_apcSlicePilot->getPOC(); 1116 1151 } 1117 else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP )1152 else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ) 1118 1153 { 1119 1154 m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable. … … 1131 1166 } 1132 1167 // skip the reordered pictures, if necessary 1133 else if (m_apcSlicePilot->getPOC() < m_pocRandomAccess && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_ TFD|| m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N))1168 else if (m_apcSlicePilot->getPOC() < m_pocRandomAccess && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_R || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N)) 1134 1169 { 1135 1170 iPOCLastDisplay++;
Note: See TracChangeset for help on using the changeset viewer.