Changeset 362 in 3DVCSoftware for branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder
- Timestamp:
- 3 May 2013, 15:34:11 (12 years ago)
- Location:
- branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/NALread.cpp
r324 r362 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/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/SEIread.cpp
r324 r362 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/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/SEIread.h
r324 r362 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/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r331 r362 175 175 } 176 176 177 /** copy SAO parameter178 * \param dst179 * \param src180 */181 inline Void copySaoOneLcuParam(SaoLcuParam* dst, SaoLcuParam* src)182 {183 Int i;184 dst->partIdx = src->partIdx;185 dst->typeIdx = src->typeIdx;186 if (dst->typeIdx != -1)187 {188 dst->subTypeIdx = src->subTypeIdx ;189 dst->length = src->length;190 for (i=0;i<dst->length;i++)191 {192 dst->offset[i] = src->offset[i];193 }194 }195 else196 {197 dst->length = 0;198 for (i=0;i<SAO_BO_LEN;i++)199 {200 dst->offset[i] = 0;201 }202 }203 }204 205 177 Void TDecCavlc::parsePPS(TComPPS* pcPPS) 206 178 { … … 400 372 401 373 READ_FLAG( uiCode, "field_seq_flag"); pcVUI->setFieldSeqFlag(uiCode); 402 assert(pcVUI->getFieldSeqFlag() == false); // not supported yet403 374 404 375 READ_FLAG(uiCode, "frame_field_info_present_flag"); pcVUI->setFrameFieldInfoPresentFlag(uiCode); … … 593 564 594 565 READ_UVLC( uiCode, "bit_depth_luma_minus8" ); 595 g_bitDepthY = 8 + uiCode; 596 pcSPS->setBitDepthY(g_bitDepthY); 566 pcSPS->setBitDepthY( uiCode + 8 ); 597 567 pcSPS->setQpBDOffsetY( (Int) (6*uiCode) ); 598 568 599 569 READ_UVLC( uiCode, "bit_depth_chroma_minus8" ); 600 g_bitDepthC = 8 + uiCode; 601 pcSPS->setBitDepthC(g_bitDepthC); 570 pcSPS->setBitDepthC( uiCode + 8 ); 602 571 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) ); 603 572 … … 608 577 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) 609 578 { 579 #if L0323_DPB 580 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1"); 581 pcSPS->setMaxDecPicBuffering( uiCode + 1, i); 582 #else 610 583 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering"); 611 584 pcSPS->setMaxDecPicBuffering( uiCode, i); 585 #endif 612 586 READ_UVLC ( uiCode, "sps_num_reorder_pics" ); 613 587 pcSPS->setNumReorderPics(uiCode, i); … … 628 602 629 603 READ_UVLC( uiCode, "log2_min_coding_block_size_minus3" ); 630 UInt log2MinCUSize = uiCode + 3; 604 Int log2MinCUSize = uiCode + 3; 605 pcSPS->setLog2MinCodingBlockSize(log2MinCUSize); 631 606 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); 607 pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode); 608 Int maxCUDepthDelta = uiCode; 609 pcSPS->setMaxCUWidth ( 1<<(log2MinCUSize + maxCUDepthDelta) ); 610 pcSPS->setMaxCUHeight ( 1<<(log2MinCUSize + maxCUDepthDelta) ); 635 611 READ_UVLC( uiCode, "log2_min_transform_block_size_minus2" ); pcSPS->setQuadtreeTULog2MinSize( uiCode + 2 ); 636 612 … … 640 616 READ_UVLC( uiCode, "max_transform_hierarchy_depth_inter" ); pcSPS->setQuadtreeTUMaxDepthInter( uiCode+1 ); 641 617 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 ); 618 619 Int addCuDepth = max (0, log2MinCUSize - (Int)pcSPS->getQuadtreeTULog2MinSize() ); 620 pcSPS->setMaxCUDepth( maxCUDepthDelta + addCuDepth ); 621 652 622 READ_FLAG( uiCode, "scaling_list_enabled_flag" ); pcSPS->setScalingListFlag ( uiCode ); 653 623 if(pcSPS->getScalingListFlag()) … … 748 718 for(UInt i = 0; i <= pcVPS->getMaxTLayers()-1; i++) 749 719 { 720 #if L0323_DPB 721 READ_UVLC( uiCode, "vps_max_dec_pic_buffering_minus1[i]" ); pcVPS->setMaxDecPicBuffering( uiCode + 1, i ); 722 #else 750 723 READ_UVLC( uiCode, "vps_max_dec_pic_buffering[i]" ); pcVPS->setMaxDecPicBuffering( uiCode, i ); 724 #endif 751 725 READ_UVLC( uiCode, "vps_num_reorder_pics[i]" ); pcVPS->setNumReorderPics( uiCode, i ); 752 726 READ_UVLC( uiCode, "vps_max_latency_increase[i]" ); pcVPS->setMaxLatencyIncrease( uiCode, i ); … … 1056 1030 iPOCmsb = iPrevPOCmsb; 1057 1031 } 1058 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA 1059 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA NT1032 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 1033 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 1060 1034 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP ) 1061 1035 { … … 1066 1040 1067 1041 TComReferencePictureSet* rps; 1042 rps = rpcSlice->getLocalRPS(); 1043 rpcSlice->setRPS(rps); 1068 1044 READ_FLAG( uiCode, "short_term_ref_pic_set_sps_flag" ); 1069 1045 if(uiCode == 0) // use short-term reference picture set explicitly signalled in slice header 1070 1046 { 1071 rps = rpcSlice->getLocalRPS();1072 1047 parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets()); 1073 rpcSlice->setRPS(rps);1074 1048 } 1075 1049 else // use reference to short-term reference picture set in PPS … … 1088 1062 uiCode = 0; 1089 1063 } 1090 rpcSlice->setRPS(sps->getRPSList()->getReferencePictureSet(uiCode)); 1091 1092 rps = rpcSlice->getRPS(); 1064 memcpy(rps,sps->getRPSList()->getReferencePictureSet(uiCode),sizeof(TComReferencePictureSet)); 1093 1065 } 1094 1066 if(sps->getLongTermRefsPresent()) … … 1113 1085 rps->setNumberOfLongtermPictures(numOfLtrp); 1114 1086 Int maxPicOrderCntLSB = 1 << rpcSlice->getSPS()->getBitsForPOC(); 1115 Int prev LSB = 0, prevDeltaMSB = 0, deltaPocMSBCycleLT = 0;;1087 Int prevDeltaMSB = 0, deltaPocMSBCycleLT = 0;; 1116 1088 for(Int j=offset+rps->getNumberOfLongtermPictures()-1, k = 0; k < numOfLtrp; j--, k++) 1117 1089 { … … 1140 1112 READ_UVLC( uiCode, "delta_poc_msb_cycle_lt[i]" ); 1141 1113 Bool deltaFlag = false; 1142 // First LTRP || First LTRP from SH || curr LSB != prev LSB1143 if( (j == offset+rps->getNumberOfLongtermPictures()-1) || (j == offset+(numOfLtrp-numLtrpInSPS)-1) || (pocLsbLt != prevLSB))1114 // First LTRP || First LTRP from SH 1115 if( (j == offset+rps->getNumberOfLongtermPictures()-1) || (j == offset+(numOfLtrp-numLtrpInSPS)-1) ) 1144 1116 { 1145 1117 deltaFlag = true; … … 1166 1138 rps->setCheckLTMSBPresent(j,false); 1167 1139 } 1168 prevLSB = pocLsbLt;1169 1140 prevDeltaMSB = deltaPocMSBCycleLT; 1170 1141 } … … 1172 1143 rps->setNumberOfPictures(offset); 1173 1144 } 1174 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA 1175 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA NT1145 if ( rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 1146 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL 1176 1147 || rpcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP ) 1177 1148 { … … 1405 1376 if(!rpcSlice->getDeblockingFilterDisable()) 1406 1377 { 1407 READ_SVLC( iCode, "beta_offset_div2" ); rpcSlice->setDeblockingFilterBetaOffsetDiv2(iCode); 1408 READ_SVLC( iCode, "tc_offset_div2" ); rpcSlice->setDeblockingFilterTcOffsetDiv2(iCode); 1378 READ_SVLC( iCode, "slice_beta_offset_div2" ); rpcSlice->setDeblockingFilterBetaOffsetDiv2(iCode); 1379 assert(rpcSlice->getDeblockingFilterBetaOffsetDiv2() >= -6 && 1380 rpcSlice->getDeblockingFilterBetaOffsetDiv2() <= 6); 1381 READ_SVLC( iCode, "slice_tc_offset_div2" ); rpcSlice->setDeblockingFilterTcOffsetDiv2(iCode); 1382 assert(rpcSlice->getDeblockingFilterTcOffsetDiv2() >= -6 && 1383 rpcSlice->getDeblockingFilterTcOffsetDiv2() <= 6); 1409 1384 } 1410 1385 } … … 1438 1413 } 1439 1414 1440 if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() )1441 {1442 1415 UInt *entryPointOffset = NULL; 1443 1416 UInt numEntryPointOffsets, offsetLenMinus1; 1444 1417 if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() ) 1418 { 1445 1419 READ_UVLC(numEntryPointOffsets, "num_entry_point_offsets"); rpcSlice->setNumEntryPointOffsets ( numEntryPointOffsets ); 1446 1420 if (numEntryPointOffsets>0) … … 1459 1433 #endif 1460 1434 } 1435 } 1436 else 1437 { 1438 rpcSlice->setNumEntryPointOffsets ( 0 ); 1439 } 1440 1441 if(pps->getSliceHeaderExtensionPresentFlag()) 1442 { 1443 READ_UVLC(uiCode,"slice_header_extension_length"); 1444 for(Int i=0; i<uiCode; i++) 1445 { 1446 UInt ignore; 1447 READ_CODE(8,ignore,"slice_header_extension_data_byte"); 1448 } 1449 } 1450 m_pcBitstream->readByteAlignment(); 1451 1452 if( pps->getTilesEnabledFlag() || pps->getEntropyCodingSyncEnabledFlag() ) 1453 { 1454 Int endOfSliceHeaderLocation = m_pcBitstream->getByteLocation(); 1455 Int curEntryPointOffset = 0; 1456 Int prevEntryPointOffset = 0; 1457 for (UInt idx=0; idx<numEntryPointOffsets; idx++) 1458 { 1459 curEntryPointOffset += entryPointOffset[ idx ]; 1460 1461 Int emulationPreventionByteCount = 0; 1462 for ( UInt curByteIdx = 0; curByteIdx<m_pcBitstream->numEmulationPreventionBytesRead(); curByteIdx++ ) 1463 { 1464 if ( m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) >= ( prevEntryPointOffset + endOfSliceHeaderLocation ) && 1465 m_pcBitstream->getEmulationPreventionByteLocation( curByteIdx ) < ( curEntryPointOffset + endOfSliceHeaderLocation ) ) 1466 { 1467 emulationPreventionByteCount++; 1468 } 1469 } 1470 1471 entryPointOffset[ idx ] -= emulationPreventionByteCount; 1472 prevEntryPointOffset = curEntryPointOffset; 1473 } 1461 1474 1462 1475 if ( pps->getTilesEnabledFlag() ) … … 1494 1507 } 1495 1508 } 1496 else 1497 { 1498 rpcSlice->setNumEntryPointOffsets ( 0 ); 1499 } 1500 1501 if(pps->getSliceHeaderExtensionPresentFlag()) 1502 { 1503 READ_UVLC(uiCode,"slice_header_extension_length"); 1504 for(Int i=0; i<uiCode; i++) 1505 { 1506 UInt ignore; 1507 READ_CODE(8,ignore,"slice_header_extension_data_byte"); 1508 } 1509 } 1510 m_pcBitstream->readByteAlignment(); 1509 1511 1510 return; 1512 1511 } … … 1759 1758 // ==================================================================================================================== 1760 1759 1761 1762 /** Parse PCM alignment zero bits.1763 * \returns Void1764 */1765 Void TDecCavlc::xReadPCMAlignZero( )1766 {1767 UInt uiNumberOfBits = m_pcBitstream->getNumBitsUntilByteAligned();1768 1769 if(uiNumberOfBits)1770 {1771 UInt uiBits;1772 UInt uiSymbol;1773 1774 for(uiBits = 0; uiBits < uiNumberOfBits; uiBits++)1775 {1776 xReadFlag( uiSymbol );1777 assert( uiSymbol == 0 );1778 }1779 }1780 }1781 1782 Void TDecCavlc::xReadUnaryMaxSymbol( UInt& ruiSymbol, UInt uiMaxSymbol )1783 {1784 if (uiMaxSymbol == 0)1785 {1786 ruiSymbol = 0;1787 return;1788 }1789 1790 xReadFlag( ruiSymbol );1791 1792 if (ruiSymbol == 0 || uiMaxSymbol == 1)1793 {1794 return;1795 }1796 1797 UInt uiSymbol = 0;1798 UInt uiCont;1799 1800 do1801 {1802 xReadFlag( uiCont );1803 uiSymbol++;1804 }1805 while( uiCont && (uiSymbol < uiMaxSymbol-1) );1806 1807 if( uiCont && (uiSymbol == uiMaxSymbol-1) )1808 {1809 uiSymbol++;1810 }1811 1812 ruiSymbol = uiSymbol;1813 }1814 1815 Void TDecCavlc::xReadExGolombLevel( UInt& ruiSymbol )1816 {1817 UInt uiSymbol ;1818 UInt uiCount = 0;1819 do1820 {1821 xReadFlag( uiSymbol );1822 uiCount++;1823 }1824 while( uiSymbol && (uiCount != 13));1825 1826 ruiSymbol = uiCount-1;1827 1828 if( uiSymbol )1829 {1830 xReadEpExGolomb( uiSymbol, 0 );1831 ruiSymbol += uiSymbol+1;1832 }1833 1834 return;1835 }1836 1837 Void TDecCavlc::xReadEpExGolomb( UInt& ruiSymbol, UInt uiCount )1838 {1839 UInt uiSymbol = 0;1840 UInt uiBit = 1;1841 1842 1843 while( uiBit )1844 {1845 xReadFlag( uiBit );1846 uiSymbol += uiBit << uiCount++;1847 }1848 1849 uiCount--;1850 while( uiCount-- )1851 {1852 xReadFlag( uiBit );1853 uiSymbol += uiBit << uiCount;1854 }1855 1856 ruiSymbol = uiSymbol;1857 1858 return;1859 }1860 1861 UInt TDecCavlc::xGetBit()1862 {1863 UInt ruiCode;1864 m_pcBitstream->read( 1, ruiCode );1865 return ruiCode;1866 }1867 1868 1869 1760 /** parse explicit wp tables 1870 1761 * \param TComSlice* pcSlice … … 1883 1774 // decode delta_luma_log2_weight_denom : 1884 1775 READ_UVLC( uiLog2WeightDenomLuma, "luma_log2_weight_denom" ); // ue(v): luma_log2_weight_denom 1776 assert( uiLog2WeightDenomLuma <= 7 ); 1885 1777 if( bChroma ) 1886 1778 { 1887 1779 READ_SVLC( iDeltaDenom, "delta_chroma_log2_weight_denom" ); // se(v): delta_chroma_log2_weight_denom 1888 1780 assert((iDeltaDenom + (Int)uiLog2WeightDenomLuma)>=0); 1781 assert((iDeltaDenom + (Int)uiLog2WeightDenomLuma)<=7); 1889 1782 uiLog2WeightDenomChroma = (UInt)(iDeltaDenom + uiLog2WeightDenomLuma); 1890 1783 } … … 1925 1818 Int iDeltaWeight; 1926 1819 READ_SVLC( iDeltaWeight, "delta_luma_weight_lX" ); // se(v): delta_luma_weight_l0[i] 1820 assert( iDeltaWeight >= -128 ); 1821 assert( iDeltaWeight <= 127 ); 1927 1822 wp[0].iWeight = (iDeltaWeight + (1<<wp[0].uiLog2WeightDenom)); 1928 1823 READ_SVLC( wp[0].iOffset, "luma_offset_lX" ); // se(v): luma_offset_l0[i] 1824 assert( wp[0].iOffset >= -128 ); 1825 assert( wp[0].iOffset <= 127 ); 1929 1826 } 1930 1827 else … … 1941 1838 Int iDeltaWeight; 1942 1839 READ_SVLC( iDeltaWeight, "delta_chroma_weight_lX" ); // se(v): chroma_weight_l0[i][j] 1840 assert( iDeltaWeight >= -128 ); 1841 assert( iDeltaWeight <= 127 ); 1943 1842 wp[j].iWeight = (iDeltaWeight + (1<<wp[1].uiLog2WeightDenom)); 1944 1843 1945 1844 Int iDeltaChroma; 1946 1845 READ_SVLC( iDeltaChroma, "delta_chroma_offset_lX" ); // se(v): delta_chroma_offset_l0[i][j] 1846 assert( iDeltaChroma >= -512 ); 1847 assert( iDeltaChroma <= 511 ); 1947 1848 Int pred = ( 128 - ( ( 128*wp[j].iWeight)>>(wp[j].uiLog2WeightDenom) ) ); 1948 1849 wp[j].iOffset = Clip3(-128, 127, (iDeltaChroma + pred) ); -
branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecCAVLC.h
r324 r362 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/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecSlice.h
r324 r362 84 84 Void initCtxMem( UInt i ); 85 85 Void setCtxMem( TDecSbac* sb, Int b ) { CTXMem[b] = sb; } 86 Int getCtxMemSize( ) { return (Int)CTXMem.size(); } 86 87 }; 87 88 -
branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecTop.cpp
r324 r362 42 42 ParameterSetManagerDecoder TDecTop::m_parameterSetManagerDecoder; 43 43 #endif 44 45 44 //! \ingroup TLibDecoder 46 45 //! \{ … … 149 148 } 150 149 150 #if L0323_DPB 151 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()); // m_uiMaxDecPicBuffering has the space for the picture currently being decoded 152 #else 151 153 m_iMaxRefPicNum = pcSlice->getSPS()->getMaxDecPicBuffering(pcSlice->getTLayer())+pcSlice->getSPS()->getNumReorderPics(pcSlice->getTLayer()) + 1; // +1 to have space for the picture currently being decoded 154 #endif 152 155 if (m_cListPic.size() < (UInt)m_iMaxRefPicNum) 153 156 { … … 290 293 assert (sps != 0); 291 294 292 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot-> getIdrPicFlag()))295 if (false == m_parameterSetManagerDecoder.activatePPS(m_apcSlicePilot->getPPSId(),m_apcSlicePilot->isIRAP())) 293 296 { 294 297 printf ("Parameter set activation failed!"); … … 296 299 } 297 300 301 if( pps->getDependentSliceSegmentsEnabledFlag() ) 302 { 303 Int NumCtx = pps->getEntropyCodingSyncEnabledFlag()?2:1; 304 305 if (m_cSliceDecoder.getCtxMemSize() != NumCtx) 306 { 307 m_cSliceDecoder.initCtxMem(NumCtx); 308 for ( UInt st = 0; st < NumCtx; st++ ) 309 { 310 TDecSbac* ctx = NULL; 311 ctx = new TDecSbac; 312 ctx->init( &m_cBinCABAC ); 313 m_cSliceDecoder.setCtxMem( ctx, st ); 314 } 315 } 316 } 317 298 318 m_apcSlicePilot->setPPS(pps); 299 319 m_apcSlicePilot->setSPS(sps); 300 301 #if H_MV302 m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getActiveVPS() );303 #endif304 305 320 pps->setSPS(sps); 306 321 pps->setNumSubstreams(pps->getEntropyCodingSyncEnabledFlag() ? ((sps->getPicHeightInLumaSamples() + sps->getMaxCUHeight() - 1) / sps->getMaxCUHeight()) * (pps->getNumColumnsMinus1() + 1) : 1); 307 322 pps->setMinCuDQPSize( sps->getMaxCUWidth() >> ( pps->getMaxCuDQPDepth()) ); 308 323 309 for (Int i = 0; i < sps->getMaxCUDepth() - g_uiAddCUDepth; i++) 324 g_bitDepthY = sps->getBitDepthY(); 325 g_bitDepthC = sps->getBitDepthC(); 326 g_uiMaxCUWidth = sps->getMaxCUWidth(); 327 g_uiMaxCUHeight = sps->getMaxCUHeight(); 328 g_uiMaxCUDepth = sps->getMaxCUDepth(); 329 g_uiAddCUDepth = max (0, sps->getLog2MinCodingBlockSize() - (Int)sps->getQuadtreeTULog2MinSize() ); 330 331 for (Int i = 0; i < sps->getLog2DiffMaxMinCodingBlockSize(); i++) 310 332 { 311 333 sps->setAMPAcc( i, sps->getUseAMP() ); 312 334 } 313 335 314 for (Int i = sps->get MaxCUDepth() - g_uiAddCUDepth; i < sps->getMaxCUDepth(); i++)336 for (Int i = sps->getLog2DiffMaxMinCodingBlockSize(); i < sps->getMaxCUDepth(); i++) 315 337 { 316 338 sps->setAMPAcc( i, 0 ); … … 318 340 319 341 m_cSAO.destroy(); 320 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight);321 m_cLoopFilter. create( g_uiMaxCUDepth);342 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() ); 343 m_cLoopFilter.create( sps->getMaxCUDepth() ); 322 344 } 323 345 … … 345 367 346 368 m_apcSlicePilot->setNalUnitType(nalu.m_nalUnitType); 347 if((m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_N) || 348 (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N) || 349 (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N)) 350 { 351 m_apcSlicePilot->setTemporalLayerNonReferenceFlag(true); 352 } 369 Bool nonReferenceFlag = (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TRAIL_N || 370 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N || 371 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_STSA_N || 372 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RADL_N || 373 m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N); 374 m_apcSlicePilot->setTemporalLayerNonReferenceFlag(nonReferenceFlag); 375 353 376 m_apcSlicePilot->setReferenced(true); // Putting this as true ensures that picture is referenced the first time it is in an RPS 354 377 m_apcSlicePilot->setTLayerInfo(nalu.m_temporalId); … … 371 394 #endif 372 395 #endif 373 374 if (m_apcSlicePilot->isNextSlice())375 {376 396 // Skip pictures due to random access 377 397 if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay)) … … 384 404 return false; 385 405 } 386 } 387 406 407 //we should only get a different poc for a new picture (with CTU address==0) 408 if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence && (!m_apcSlicePilot->getSliceCurStartCUAddr()==0)) 409 { 410 printf ("Warning, the first slice of a picture might have been lost!\n"); 411 } 388 412 // exit when a new picture is found 389 if (m_apcSlicePilot->isNextSlice() && m_apcSlicePilot->getPOC()!=m_prevPOC && !m_bFirstSliceInSequence)413 if (m_apcSlicePilot->isNextSlice() && (m_apcSlicePilot->getSliceCurStartCUAddr() == 0 && !m_bFirstSliceInPicture) && !m_bFirstSliceInSequence ) 390 414 { 391 415 if (m_prevPOC >= m_pocRandomAccess) … … 396 420 m_prevPOC = m_apcSlicePilot->getPOC(); 397 421 } 398 399 422 #if H_MV 400 423 if ( newLayerFlag ) … … 403 426 } 404 427 #endif 405 406 407 428 // actual decoding starts here 408 429 xActivateParameterSets(); … … 419 440 xCreateLostPicture(lostPoc-1); 420 441 } 421 422 442 if (m_bFirstSliceInPicture) 423 443 { … … 425 445 m_cPrediction.initTempBuff(); 426 446 m_apcSlicePilot->applyReferencePictureSet(m_cListPic, m_apcSlicePilot->getRPS()); 427 428 447 #if H_MV 429 448 m_apcSlicePilot->createAndApplyIvReferencePictureSet( m_ivPicLists, m_refPicSetInterLayer ); 430 449 #endif 431 432 433 450 // Get a new picture buffer 434 451 xGetNewPicBuffer (m_apcSlicePilot, pcPic); … … 569 586 #endif 570 587 #endif 571 572 588 if (bNextSlice) 573 589 { 574 pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA );590 pcSlice->checkCRA(pcSlice->getRPS(), m_pocCRA, m_prevRAPisBLA, m_cListPic ); 575 591 // Set reference list 576 577 592 #if H_MV 578 pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer ); 593 pcSlice->setRefPicList( m_cListPic, true, m_refPicSetInterLayer ); 594 #else 595 #if FIX1071 596 pcSlice->setRefPicList( m_cListPic, true ); 579 597 #else 580 598 pcSlice->setRefPicList( m_cListPic ); 581 599 #endif 582 600 601 #endif 583 602 // For generalized B 584 603 // note: maybe not existed case (always L0 is copied to L1 if L1 is empty) … … 622 641 //--------------- 623 642 pcSlice->setRefPOCList(); 643 #if !L0034_COMBINED_LIST_CLEANUP 624 644 pcSlice->setNoBackPredFlag( false ); 625 645 if ( pcSlice->getSliceType() == B_SLICE ) … … 638 658 } 639 659 } 660 #endif 640 661 } 641 662 … … 691 712 m_cEntropyDecoder.decodePPS( pps ); 692 713 m_parameterSetManagerDecoder.storePrefetchedPPS( pps ); 693 694 if( pps->getDependentSliceSegmentsEnabledFlag() )695 {696 Int NumCtx = pps->getEntropyCodingSyncEnabledFlag()?2:1;697 m_cSliceDecoder.initCtxMem(NumCtx);698 for ( UInt st = 0; st < NumCtx; st++ )699 {700 TDecSbac* ctx = NULL;701 ctx = new TDecSbac;702 ctx->init( &m_cBinCABAC );703 m_cSliceDecoder.setCtxMem( ctx, st );704 }705 }706 714 } 707 715 708 716 Void TDecTop::xDecodeSEI( TComInputBitstream* bs, const NalUnitType nalUnitType ) 709 717 { 710 if(nalUnitType == NAL_UNIT_S EI_SUFFIX)718 if(nalUnitType == NAL_UNIT_SUFFIX_SEI) 711 719 { 712 720 m_seiReader.parseSEImessage( bs, m_pcPic->getSEIs(), nalUnitType, m_parameterSetManagerDecoder.getActiveSPS() ); … … 753 761 return false; 754 762 755 case NAL_UNIT_ SEI:756 case NAL_UNIT_S EI_SUFFIX:763 case NAL_UNIT_PREFIX_SEI: 764 case NAL_UNIT_SUFFIX_SEI: 757 765 xDecodeSEI( nalu.m_Bitstream, nalu.m_nalUnitType ); 758 766 return false; … … 760 768 case NAL_UNIT_CODED_SLICE_TRAIL_R: 761 769 case NAL_UNIT_CODED_SLICE_TRAIL_N: 762 case NAL_UNIT_CODED_SLICE_TLA :770 case NAL_UNIT_CODED_SLICE_TLA_R: 763 771 case NAL_UNIT_CODED_SLICE_TSA_N: 764 772 case NAL_UNIT_CODED_SLICE_STSA_R: 765 773 case NAL_UNIT_CODED_SLICE_STSA_N: 766 case NAL_UNIT_CODED_SLICE_BLA :767 case NAL_UNIT_CODED_SLICE_BLA NT:774 case NAL_UNIT_CODED_SLICE_BLA_W_LP: 775 case NAL_UNIT_CODED_SLICE_BLA_W_RADL: 768 776 case NAL_UNIT_CODED_SLICE_BLA_N_LP: 769 case NAL_UNIT_CODED_SLICE_IDR :777 case NAL_UNIT_CODED_SLICE_IDR_W_RADL: 770 778 case NAL_UNIT_CODED_SLICE_IDR_N_LP: 771 779 case NAL_UNIT_CODED_SLICE_CRA: 772 780 case NAL_UNIT_CODED_SLICE_RADL_N: 773 case NAL_UNIT_CODED_SLICE_ DLP:781 case NAL_UNIT_CODED_SLICE_RADL_R: 774 782 case NAL_UNIT_CODED_SLICE_RASL_N: 775 case NAL_UNIT_CODED_SLICE_TFD: 776 #if H_MV 777 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay, newLayerFlag); 778 #else 783 case NAL_UNIT_CODED_SLICE_RASL_R: 779 784 return xDecodeSlice(nalu, iSkipFrame, iPOCLastDisplay); 780 #endif781 785 break; 782 786 default: … … 795 799 Bool TDecTop::isSkipPictureForBLA(Int& iPOCLastDisplay) 796 800 { 797 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))801 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)) 798 802 { 799 803 iPOCLastDisplay++; … … 826 830 { 827 831 if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA 828 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA 832 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP 829 833 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP 830 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA NT)834 || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL ) 831 835 { 832 836 // set the POC random access since we need to skip the reordered pictures in the case of CRA/CRANT/BLA/BLANT. 833 837 m_pocRandomAccess = m_apcSlicePilot->getPOC(); 834 838 } 835 else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP )839 else if ( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ) 836 840 { 837 841 m_pocRandomAccess = -MAX_INT; // no need to skip the reordered pictures in IDR, they are decodable. … … 849 853 } 850 854 // skip the reordered pictures, if necessary 851 else if (m_apcSlicePilot->getPOC() < m_pocRandomAccess && (m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_ TFD|| m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_RASL_N))855 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)) 852 856 { 853 857 iPOCLastDisplay++; … … 881 885 882 886 #endif 883 884 887 //! \}
Note: See TracChangeset for help on using the changeset viewer.