Changeset 595 in SHVCSoftware for trunk/source/Lib/TLibDecoder
- Timestamp:
- 2 Feb 2014, 06:01:53 (11 years ago)
- Location:
- trunk
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk ¶
- Property svn:mergeinfo changed
/branches/SHM-5.0-dev merged: 591,593-594
- Property svn:mergeinfo changed
-
trunk/source ¶
- Property svn:mergeinfo changed
/branches/SHM-5.0-dev/source merged: 593
- Property svn:mergeinfo changed
-
TabularUnified trunk/source/Lib/TLibDecoder/AnnexBread.cpp ¶
r313 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
TabularUnified trunk/source/Lib/TLibDecoder/AnnexBread.h ¶
r313 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
TabularUnified trunk/source/Lib/TLibDecoder/NALread.cpp ¶
r540 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 70 70 break; 71 71 } 72 assert(*it_read <= 0x03); 72 73 } 73 74 zeroCount = (*it_read == 0x00) ? zeroCount+1 : 0; -
TabularUnified trunk/source/Lib/TLibDecoder/NALread.h ¶
r313 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
TabularUnified trunk/source/Lib/TLibDecoder/SEIread.cpp ¶
r588 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 93 93 fprintf( g_hTrace, "===========Tone Mapping Info SEI message ===========\n"); 94 94 break; 95 case SEI::SOP_DESCRIPTION: 96 fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n"); 97 break; 98 case SEI::SCALABLE_NESTING: 99 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); 100 break; 101 #if SVC_EXTENSION 95 102 #if LAYERS_NOT_PRESENT_SEI 96 103 case SEI::LAYERS_NOT_PRESENT: … … 98 105 break; 99 106 #endif 100 case SEI::SOP_DESCRIPTION:101 fprintf( g_hTrace, "=========== SOP Description SEI message ===========\n");102 break;103 107 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 104 108 case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS: … … 111 115 break; 112 116 #endif 113 case SEI::SCALABLE_NESTING: 114 fprintf( g_hTrace, "=========== Scalable Nesting SEI message ===========\n"); 115 break; 117 #endif //SVC_EXTENSION 116 118 default: 117 119 fprintf( g_hTrace, "=========== Unknown SEI message ===========\n"); … … 259 261 xParseSEIToneMappingInfo((SEIToneMappingInfo&) *sei, payloadSize); 260 262 break; 261 #if LAYERS_NOT_PRESENT_SEI262 case SEI::LAYERS_NOT_PRESENT:263 if (!vps)264 {265 printf ("Warning: Found Layers not present SEI message, but no active VPS is available. Ignoring.");266 }267 else268 {269 sei = new SEILayersNotPresent;270 xParseSEILayersNotPresent((SEILayersNotPresent&) *sei, payloadSize, vps);271 }272 break;273 #endif274 263 case SEI::SOP_DESCRIPTION: 275 264 sei = new SEISOPDescription; 276 265 xParseSEISOPDescription((SEISOPDescription&) *sei, payloadSize); 277 266 break; 278 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI279 case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS:280 sei = new SEIInterLayerConstrainedTileSets;281 xParseSEIInterLayerConstrainedTileSets((SEIInterLayerConstrainedTileSets&) *sei, payloadSize);282 break;283 #endif284 #if SUB_BITSTREAM_PROPERTY_SEI285 case SEI::SUB_BITSTREAM_PROPERTY:286 sei = new SEISubBitstreamProperty;287 xParseSEISubBitstreamProperty((SEISubBitstreamProperty&) *sei);288 break;289 #endif290 267 case SEI::SCALABLE_NESTING: 291 268 sei = new SEIScalableNesting; … … 295 272 xParseSEIScalableNesting((SEIScalableNesting&) *sei, nalUnitType, payloadSize, sps); 296 273 #endif 274 #if SVC_EXTENSION 275 #if LAYERS_NOT_PRESENT_SEI 276 case SEI::LAYERS_NOT_PRESENT: 277 if (!vps) 278 { 279 printf ("Warning: Found Layers not present SEI message, but no active VPS is available. Ignoring."); 280 } 281 else 282 { 283 sei = new SEILayersNotPresent; 284 xParseSEILayersNotPresent((SEILayersNotPresent&) *sei, payloadSize, vps); 285 } 286 break; 287 #endif 288 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 289 case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS: 290 sei = new SEIInterLayerConstrainedTileSets; 291 xParseSEIInterLayerConstrainedTileSets((SEIInterLayerConstrainedTileSets&) *sei, payloadSize); 292 break; 293 #endif 294 #if SUB_BITSTREAM_PROPERTY_SEI 295 case SEI::SUB_BITSTREAM_PROPERTY: 296 sei = new SEISubBitstreamProperty; 297 xParseSEISubBitstreamProperty((SEISubBitstreamProperty&) *sei); 298 break; 299 #endif 300 #endif //SVC_EXTENSION 297 301 break; 298 302 default: … … 499 503 if( !pHRD->getSubPicCpbParamsPresentFlag() ) 500 504 { 501 READ_FLAG( code, "rap_cpb_params_present_flag" ); sei.m_rapCpbParamsPresentFlag = code; 505 READ_FLAG( code, "irap_cpb_params_present_flag" ); sei.m_rapCpbParamsPresentFlag = code; 506 } 507 if( sei.m_rapCpbParamsPresentFlag ) 508 { 509 READ_CODE( pHRD->getCpbRemovalDelayLengthMinus1() + 1, code, "cpb_delay_offset" ); sei.m_cpbDelayOffset = code; 510 READ_CODE( pHRD->getDpbOutputDelayLengthMinus1() + 1, code, "dpb_delay_offset" ); sei.m_dpbDelayOffset = code; 502 511 } 503 512 //read splicing flag and cpb_removal_delay_delta … … 506 515 READ_CODE( ( pHRD->getCpbRemovalDelayLengthMinus1() + 1 ), code, "au_cpb_removal_delay_delta_minus1" ); 507 516 sei.m_auCpbRemovalDelayDelta = code + 1; 508 if( sei.m_rapCpbParamsPresentFlag )509 {510 READ_CODE( pHRD->getCpbRemovalDelayLengthMinus1() + 1, code, "cpb_delay_offset" ); sei.m_cpbDelayOffset = code;511 READ_CODE( pHRD->getDpbOutputDelayLengthMinus1() + 1, code, "dpb_delay_offset" ); sei.m_dpbDelayOffset = code;512 }513 517 for( nalOrVcl = 0; nalOrVcl < 2; nalOrVcl ++ ) 514 518 { … … 752 756 } 753 757 754 #if LAYERS_NOT_PRESENT_SEI755 Void SEIReader::xParseSEILayersNotPresent(SEILayersNotPresent &sei, UInt payloadSize, TComVPS *vps)756 {757 UInt uiCode;758 UInt i = 0;759 760 READ_UVLC( uiCode, "lp_sei_active_vps_id" ); sei.m_activeVpsId = uiCode;761 assert(vps->getVPSId() == sei.m_activeVpsId);762 sei.m_vpsMaxLayers = vps->getMaxLayers();763 for (; i < sei.m_vpsMaxLayers; i++)764 {765 READ_FLAG( uiCode, "layer_not_present_flag" ); sei.m_layerNotPresentFlag[i] = uiCode ? true : false;766 }767 for (; i < MAX_LAYERS; i++)768 {769 sei.m_layerNotPresentFlag[i] = false;770 }771 xParseByteAlign();772 }773 #endif774 775 758 Void SEIReader::xParseSEISOPDescription(SEISOPDescription &sei, UInt payloadSize) 776 759 { … … 797 780 } 798 781 799 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI800 Void SEIReader::xParseSEIInterLayerConstrainedTileSets (SEIInterLayerConstrainedTileSets &sei, UInt payloadSize)801 {802 UInt uiCode;803 804 READ_FLAG( uiCode, "il_all_tiles_exact_sample_value_match_flag" ); sei.m_ilAllTilesExactSampleValueMatchFlag = uiCode;805 READ_FLAG( uiCode, "il_one_tile_per_tile_set_flag" ); sei.m_ilOneTilePerTileSetFlag = uiCode;806 if( !sei.m_ilOneTilePerTileSetFlag )807 {808 READ_UVLC( uiCode, "il_num_sets_in_message_minus1" ); sei.m_ilNumSetsInMessageMinus1 = uiCode;809 if( sei.m_ilNumSetsInMessageMinus1 )810 {811 READ_FLAG( uiCode, "skipped_tile_set_present_flag" ); sei.m_skippedTileSetPresentFlag = uiCode;812 }813 else814 {815 sei.m_skippedTileSetPresentFlag = false;816 }817 UInt numSignificantSets = sei.m_ilNumSetsInMessageMinus1 - (sei.m_skippedTileSetPresentFlag ? 1 : 0) + 1;818 for( UInt i = 0; i < numSignificantSets; i++ )819 {820 READ_UVLC( uiCode, "ilcts_id" ); sei.m_ilctsId[i] = uiCode;821 READ_UVLC( uiCode, "il_num_tile_rects_in_set_minus1" ) ;sei.m_ilNumTileRectsInSetMinus1[i] = uiCode;822 for( UInt j = 0; j <= sei.m_ilNumTileRectsInSetMinus1[i]; j++ )823 {824 READ_UVLC( uiCode, "il_top_left_tile_index" ); sei.m_ilTopLeftTileIndex[i][j] = uiCode;825 READ_UVLC( uiCode, "il_bottom_right_tile_index" ); sei.m_ilBottomRightTileIndex[i][j] = uiCode;826 }827 READ_CODE( 2, uiCode, "ilc_idc" ); sei.m_ilcIdc[i] = uiCode;828 if( sei.m_ilAllTilesExactSampleValueMatchFlag )829 {830 READ_FLAG( uiCode, "il_exact_sample_value_match_flag" ); sei.m_ilExactSampleValueMatchFlag[i] = uiCode;831 }832 }833 }834 else835 {836 READ_CODE( 2, uiCode, "all_tiles_ilc_idc" ); sei.m_allTilesIlcIdc = uiCode;837 }838 839 xParseByteAlign();840 }841 #endif842 #if SUB_BITSTREAM_PROPERTY_SEI843 Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei)844 {845 UInt uiCode;846 READ_CODE( 4, uiCode, "active_vps_id" ); sei.m_activeVpsId = uiCode;847 READ_UVLC( uiCode, "num_additional_sub_streams_minus1" ); sei.m_numAdditionalSubStreams = uiCode + 1;848 849 for( Int i = 0; i < sei.m_numAdditionalSubStreams; i++ )850 {851 READ_CODE( 2, uiCode, "sub_bitstream_mode[i]" ); sei.m_subBitstreamMode[i] = uiCode;852 READ_UVLC( uiCode, "output_layer_set_idx_to_vps[i]" ); sei.m_outputLayerSetIdxToVps[i] = uiCode;853 READ_CODE( 3, uiCode, "highest_sub_layer_id[i]" ); sei.m_highestSublayerId[i] = uiCode;854 READ_CODE( 16, uiCode, "avg_bit_rate[i]" ); sei.m_avgBitRate[i] = uiCode;855 READ_CODE( 16, uiCode, "max_bit_rate[i]" ); sei.m_maxBitRate[i] = uiCode;856 }857 xParseByteAlign();858 }859 #endif860 782 #if LAYERS_NOT_PRESENT_SEI 861 783 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComVPS *vps, TComSPS *sps) … … 925 847 } 926 848 } 849 850 #if SVC_EXTENSION 851 #if LAYERS_NOT_PRESENT_SEI 852 Void SEIReader::xParseSEILayersNotPresent(SEILayersNotPresent &sei, UInt payloadSize, TComVPS *vps) 853 { 854 UInt uiCode; 855 UInt i = 0; 856 857 READ_UVLC( uiCode, "lp_sei_active_vps_id" ); sei.m_activeVpsId = uiCode; 858 assert(vps->getVPSId() == sei.m_activeVpsId); 859 sei.m_vpsMaxLayers = vps->getMaxLayers(); 860 for (; i < sei.m_vpsMaxLayers; i++) 861 { 862 READ_FLAG( uiCode, "layer_not_present_flag" ); sei.m_layerNotPresentFlag[i] = uiCode ? true : false; 863 } 864 for (; i < MAX_LAYERS; i++) 865 { 866 sei.m_layerNotPresentFlag[i] = false; 867 } 868 xParseByteAlign(); 869 } 870 #endif 871 #if N0383_IL_CONSTRAINED_TILE_SETS_SEI 872 Void SEIReader::xParseSEIInterLayerConstrainedTileSets (SEIInterLayerConstrainedTileSets &sei, UInt payloadSize) 873 { 874 UInt uiCode; 875 876 READ_FLAG( uiCode, "il_all_tiles_exact_sample_value_match_flag" ); sei.m_ilAllTilesExactSampleValueMatchFlag = uiCode; 877 READ_FLAG( uiCode, "il_one_tile_per_tile_set_flag" ); sei.m_ilOneTilePerTileSetFlag = uiCode; 878 if( !sei.m_ilOneTilePerTileSetFlag ) 879 { 880 READ_UVLC( uiCode, "il_num_sets_in_message_minus1" ); sei.m_ilNumSetsInMessageMinus1 = uiCode; 881 if( sei.m_ilNumSetsInMessageMinus1 ) 882 { 883 READ_FLAG( uiCode, "skipped_tile_set_present_flag" ); sei.m_skippedTileSetPresentFlag = uiCode; 884 } 885 else 886 { 887 sei.m_skippedTileSetPresentFlag = false; 888 } 889 UInt numSignificantSets = sei.m_ilNumSetsInMessageMinus1 - (sei.m_skippedTileSetPresentFlag ? 1 : 0) + 1; 890 for( UInt i = 0; i < numSignificantSets; i++ ) 891 { 892 READ_UVLC( uiCode, "ilcts_id" ); sei.m_ilctsId[i] = uiCode; 893 READ_UVLC( uiCode, "il_num_tile_rects_in_set_minus1" ) ;sei.m_ilNumTileRectsInSetMinus1[i] = uiCode; 894 for( UInt j = 0; j <= sei.m_ilNumTileRectsInSetMinus1[i]; j++ ) 895 { 896 READ_UVLC( uiCode, "il_top_left_tile_index" ); sei.m_ilTopLeftTileIndex[i][j] = uiCode; 897 READ_UVLC( uiCode, "il_bottom_right_tile_index" ); sei.m_ilBottomRightTileIndex[i][j] = uiCode; 898 } 899 READ_CODE( 2, uiCode, "ilc_idc" ); sei.m_ilcIdc[i] = uiCode; 900 if( sei.m_ilAllTilesExactSampleValueMatchFlag ) 901 { 902 READ_FLAG( uiCode, "il_exact_sample_value_match_flag" ); sei.m_ilExactSampleValueMatchFlag[i] = uiCode; 903 } 904 } 905 } 906 else 907 { 908 READ_CODE( 2, uiCode, "all_tiles_ilc_idc" ); sei.m_allTilesIlcIdc = uiCode; 909 } 910 911 xParseByteAlign(); 912 } 913 #endif 914 #if SUB_BITSTREAM_PROPERTY_SEI 915 Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei) 916 { 917 UInt uiCode; 918 READ_CODE( 4, uiCode, "active_vps_id" ); sei.m_activeVpsId = uiCode; 919 READ_UVLC( uiCode, "num_additional_sub_streams_minus1" ); sei.m_numAdditionalSubStreams = uiCode + 1; 920 921 for( Int i = 0; i < sei.m_numAdditionalSubStreams; i++ ) 922 { 923 READ_CODE( 2, uiCode, "sub_bitstream_mode[i]" ); sei.m_subBitstreamMode[i] = uiCode; 924 READ_UVLC( uiCode, "output_layer_set_idx_to_vps[i]" ); sei.m_outputLayerSetIdxToVps[i] = uiCode; 925 READ_CODE( 3, uiCode, "highest_sub_layer_id[i]" ); sei.m_highestSublayerId[i] = uiCode; 926 READ_CODE( 16, uiCode, "avg_bit_rate[i]" ); sei.m_avgBitRate[i] = uiCode; 927 READ_CODE( 16, uiCode, "max_bit_rate[i]" ); sei.m_maxBitRate[i] = uiCode; 928 } 929 xParseByteAlign(); 930 } 931 #endif 932 #endif //SVC_EXTENSION 933 927 934 //! \} -
TabularUnified trunk/source/Lib/TLibDecoder/SEIread.h ¶
r588 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
TabularUnified trunk/source/Lib/TLibDecoder/SyntaxElementParser.cpp ¶
r442 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
TabularUnified trunk/source/Lib/TLibDecoder/SyntaxElementParser.h ¶
r313 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
TabularUnified trunk/source/Lib/TLibDecoder/TDecBinCoder.h ¶
r313 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
TabularUnified trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.cpp ¶
r313 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
TabularUnified trunk/source/Lib/TLibDecoder/TDecBinCoderCABAC.h ¶
r313 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
TabularUnified trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp ¶
r588 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 673 673 READ_UVLC( uiCode, "log2_diff_max_min_coding_block_size" ); 674 674 pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode); 675 676 if (pcSPS->getPTL()->getGeneralPTL()->getLevelIdc() >= Level::LEVEL5) 677 { 678 assert(log2MinCUSize + pcSPS->getLog2DiffMaxMinCodingBlockSize() >= 5); 679 } 680 675 681 Int maxCUDepthDelta = uiCode; 676 682 pcSPS->setMaxCUWidth ( 1<<(log2MinCUSize + maxCUDepthDelta) ); -
TabularUnified trunk/source/Lib/TLibDecoder/TDecCAVLC.h ¶
r588 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
TabularUnified trunk/source/Lib/TLibDecoder/TDecCu.cpp ¶
r540 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 532 532 m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 533 533 534 if ( pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrDepth ) ) 535 { 534 536 //===== inverse transform ===== 535 537 #if REPN_FORMAT_IN_VPS … … 540 542 541 543 Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)TEXT_LUMA]; 542 assert(scalingListType < 6);544 assert(scalingListType < SCALING_LIST_NUM); 543 545 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA, pcCU->getLumaIntraDir( uiAbsPartIdx ), piResi, uiStride, pcCoeff, uiWidth, uiHeight, scalingListType, useTransformSkip ); 544 546 … … 560 562 pReco += uiStride; 561 563 pRecIPred += uiRecIPredStride; 564 } 565 } 566 else 567 { 568 //===== reconstruction ===== 569 Pel* pPred = piPred; 570 Pel* pReco = piReco; 571 Pel* pRecIPred = piRecIPred; 572 for ( Int y = 0; y < uiHeight; y++ ) 573 { 574 for ( Int x = 0; x < uiWidth; x++ ) 575 { 576 pReco [ x ] = pPred[ x ]; 577 pRecIPred[ x ] = pReco[ x ]; 578 } 579 pPred += uiStride; 580 pReco += uiStride; 581 pRecIPred += uiRecIPredStride; 582 } 562 583 } 563 584 } … … 624 645 m_pcPrediction->predIntraChromaAng( pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail ); 625 646 647 if ( pcCU->getCbf( uiAbsPartIdx, eText, uiTrDepth ) ) 648 { 626 649 //===== inverse transform ===== 627 650 Int curChromaQpOffset; … … 646 669 647 670 Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)eText]; 648 assert(scalingListType < 6);671 assert(scalingListType < SCALING_LIST_NUM); 649 672 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eText, REG_DCT, piResi, uiStride, pcCoeff, uiWidth, uiHeight, scalingListType, useTransformSkipChroma ); 650 673 … … 665 688 pReco += uiStride; 666 689 pRecIPred += uiRecIPredStride; 690 } 691 } 692 else 693 { 694 //===== reconstruction ===== 695 Pel* pPred = piPred; 696 Pel* pReco = piReco; 697 Pel* pRecIPred = piRecIPred; 698 for ( Int y = 0; y < uiHeight; y++ ) 699 { 700 for ( Int x = 0; x < uiWidth; x++ ) 701 { 702 pReco [ x ] = pPred[ x ]; 703 pRecIPred[ x ] = pReco[ x ]; 704 } 705 pPred += uiStride; 706 pReco += uiStride; 707 pRecIPred += uiRecIPredStride; 708 } 667 709 } 668 710 } -
TabularUnified trunk/source/Lib/TLibDecoder/TDecCu.h ¶
r345 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
TabularUnified trunk/source/Lib/TLibDecoder/TDecEntropy.cpp ¶
r345 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 319 319 } 320 320 321 Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP )321 Void TDecEntropy::xDecodeTransform( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int quadtreeTULog2MinSizeInCU) 322 322 { 323 323 UInt uiSubdiv; … … 343 343 else if( (pcCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthInter() == 1) && (pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTER) && ( pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N ) && (uiDepth == pcCU->getDepth(uiAbsPartIdx)) ) 344 344 { 345 uiSubdiv = (uiLog2TrafoSize > pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx));345 uiSubdiv = (uiLog2TrafoSize > quadtreeTULog2MinSizeInCU); 346 346 } 347 347 else if( uiLog2TrafoSize > pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ) … … 353 353 uiSubdiv = 0; 354 354 } 355 else if( uiLog2TrafoSize == pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx))355 else if( uiLog2TrafoSize == quadtreeTULog2MinSizeInCU ) 356 356 { 357 357 uiSubdiv = 0; … … 359 359 else 360 360 { 361 assert( uiLog2TrafoSize > pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx));361 assert( uiLog2TrafoSize > quadtreeTULog2MinSizeInCU ); 362 362 m_pcEntropyDecoderIf->parseTransformSubdivFlag( uiSubdiv, 5 - uiLog2TrafoSize ); 363 363 } … … 405 405 for( Int i = 0; i < 4; i++ ) 406 406 { 407 xDecodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP );407 xDecodeTransform( pcCU, offsetLuma, offsetChroma, uiAbsPartIdx, uiDepth, width, height, uiTrIdx, bCodeDQP, quadtreeTULog2MinSizeInCU ); 408 408 uiYCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, uiTrDepth+1 ); 409 409 uiUCbf |= pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, uiTrDepth+1 ); … … 553 553 554 554 } 555 xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, bCodeDQP ); 555 556 Int getQuadtreeTULog2MinSizeInCU = pcCU->getQuadtreeTULog2MinSizeInCU(uiAbsPartIdx); 557 558 xDecodeTransform( pcCU, uiLumaOffset, uiChromaOffset, uiAbsPartIdx, uiDepth, uiWidth, uiHeight, 0, bCodeDQP, getQuadtreeTULog2MinSizeInCU ); 556 559 } 557 560 -
TabularUnified trunk/source/Lib/TLibDecoder/TDecEntropy.h ¶
r540 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 167 167 168 168 private: 169 Void xDecodeTransform ( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP );169 Void xDecodeTransform ( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int getQuadtreeTULog2MinSizeInCU ); 170 170 171 171 public: -
TabularUnified trunk/source/Lib/TLibDecoder/TDecGop.cpp ¶
r588 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 128 128 //-- For time output for each slice 129 129 long iBeforeTime = clock(); 130 #if !HM_CLEANUP_SAO131 UInt uiStartCUAddr = pcSlice->getSliceSegmentCurStartCUAddr();132 133 UInt uiSliceStartCuAddr = pcSlice->getSliceCurStartCUAddr();134 if(uiSliceStartCuAddr == uiStartCUAddr)135 {136 m_sliceStartCUAddress.push_back(uiSliceStartCuAddr);137 }138 #endif139 130 m_pcSbacDecoder->init( (TDecBinIf*)m_pcBinCABAC ); 140 131 m_pcEntropyDecoder->setEntropyDecoder (m_pcSbacDecoder); … … 163 154 m_pcEntropyDecoder->setBitstream ( ppcSubstreams[0] ); 164 155 m_pcEntropyDecoder->resetEntropy (pcSlice); 165 #if !HM_CLEANUP_SAO166 if(uiSliceStartCuAddr == uiStartCUAddr)167 {168 m_LFCrossSliceBoundaryFlag.push_back( pcSlice->getLFCrossSliceBoundaryFlag());169 }170 #endif171 156 m_pcSbacDecoders[0].load(m_pcSbacDecoder); 172 157 m_pcSliceDecoder->decompressSlice( ppcSubstreams, rpcPic, m_pcSbacDecoder, m_pcSbacDecoders); … … 196 181 m_pcLoopFilter->setCfg(bLFCrossTileBoundary); 197 182 m_pcLoopFilter->loopFilterPic( rpcPic ); 198 #if !HM_CLEANUP_SAO199 if(pcSlice->getSPS()->getUseSAO())200 {201 m_sliceStartCUAddress.push_back(rpcPic->getNumCUsInFrame()* rpcPic->getNumPartInCU());202 rpcPic->createNonDBFilterInfo(m_sliceStartCUAddress, 0, &m_LFCrossSliceBoundaryFlag, rpcPic->getPicSym()->getNumTiles(), bLFCrossTileBoundary);203 }204 #endif205 183 if( pcSlice->getSPS()->getUseSAO() ) 206 184 { 207 #if HM_CLEANUP_SAO208 185 m_pcSAO->reconstructBlkSAOParams(rpcPic, rpcPic->getPicSym()->getSAOBlkParam()); 209 186 m_pcSAO->SAOProcess(rpcPic); 210 187 m_pcSAO->PCMLFDisableProcess(rpcPic); 211 #else 212 { 213 SAOParam *saoParam = rpcPic->getPicSym()->getSaoParam(); 214 saoParam->bSaoFlag[0] = pcSlice->getSaoEnabledFlag(); 215 saoParam->bSaoFlag[1] = pcSlice->getSaoEnabledFlagChroma(); 216 m_pcSAO->setSaoLcuBasedOptimization(1); 217 m_pcSAO->createPicSaoInfo(rpcPic); 218 m_pcSAO->SAOProcess(saoParam); 219 m_pcSAO->PCMLFDisableProcess(rpcPic); 220 m_pcSAO->destroyPicSaoInfo(); 221 } 222 #endif 223 } 224 #if !HM_CLEANUP_SAO 225 if(pcSlice->getSPS()->getUseSAO()) 226 { 227 rpcPic->destroyNonDBFilterInfo(); 228 } 229 #endif 188 } 230 189 rpcPic->compressMotion(); 231 190 Char c = (pcSlice->isIntra() ? 'I' : pcSlice->isInterP() ? 'P' : 'B'); … … 291 250 rpcPic->setOutputMark(true); 292 251 rpcPic->setReconMark(true); 293 #if !HM_CLEANUP_SAO294 m_sliceStartCUAddress.clear();295 m_LFCrossSliceBoundaryFlag.clear();296 #endif297 252 } 298 253 -
TabularUnified trunk/source/Lib/TLibDecoder/TDecGop.h ¶
r540 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 83 83 Int m_decodedPictureHashSEIEnabled; ///< Checksum(3)/CRC(2)/MD5(1)/disable(0) acting on decoded picture hash SEI message 84 84 85 #if !HM_CLEANUP_SAO86 //! list that contains the CU address of each slice plus the end address87 std::vector<Int> m_sliceStartCUAddress;88 std::vector<Bool> m_LFCrossSliceBoundaryFlag;89 #endif90 85 #if SVC_EXTENSION 91 86 UInt m_layerId; -
TabularUnified trunk/source/Lib/TLibDecoder/TDecSbac.cpp ¶
r540 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 72 72 , m_cCUAbsSCModel ( 1, 1, NUM_ABS_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 73 73 , m_cMVPIdxSCModel ( 1, 1, NUM_MVP_IDX_CTX , m_contextModels + m_numContextModels, m_numContextModels) 74 , m_cCUAMPSCModel ( 1, 1, NUM_CU_AMP_CTX , m_contextModels + m_numContextModels, m_numContextModels)75 74 , m_cSaoMergeSCModel ( 1, 1, NUM_SAO_MERGE_FLAG_CTX , m_contextModels + m_numContextModels, m_numContextModels) 76 75 , m_cSaoTypeIdxSCModel ( 1, 1, NUM_SAO_TYPE_IDX_CTX , m_contextModels + m_numContextModels, m_numContextModels) … … 114 113 m_cCUMergeIdxExtSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT ); 115 114 m_cCUPartSizeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_PART_SIZE ); 116 m_cCUAMPSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_CU_AMP_POS );117 115 m_cCUPredModeSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_PRED_MODE ); 118 116 m_cCUIntraPredSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTRA_PRED_MODE ); … … 160 158 m_cCUMergeIdxExtSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT ); 161 159 m_cCUPartSizeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_PART_SIZE ); 162 m_cCUAMPSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_CU_AMP_POS );163 160 m_cCUPredModeSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_PRED_MODE ); 164 161 m_cCUIntraPredSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRA_PRED_MODE ); … … 579 576 if (eMode == SIZE_2NxN) 580 577 { 581 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCU AMPSCModel.get( 0, 0, 0));578 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 )); 582 579 if (uiSymbol == 0) 583 580 { … … 588 585 else if (eMode == SIZE_Nx2N) 589 586 { 590 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCU AMPSCModel.get( 0, 0, 0));587 m_pcTDecBinIf->decodeBin(uiSymbol, m_cCUPartSizeSCModel.get( 0, 0, 3 )); 591 588 if (uiSymbol == 0) 592 589 { … … 1382 1379 if (uiCode == 0) 1383 1380 { 1384 #if HM_CLEANUP_SAO1385 1381 ruiVal = 1; 1386 #else1387 ruiVal = 5;1388 #endif1389 1382 } 1390 1383 else 1391 1384 { 1392 #if HM_CLEANUP_SAO1393 1385 ruiVal = 2; 1394 #else 1395 ruiVal = 1; 1396 #endif 1397 } 1398 } 1399 } 1400 1401 #if HM_CLEANUP_SAO 1386 } 1387 } 1388 } 1402 1389 1403 1390 Void TDecSbac::parseSaoSign(UInt& val) … … 1531 1518 } 1532 1519 1533 #else1534 1535 inline Void copySaoOneLcuParam(SaoLcuParam* psDst, SaoLcuParam* psSrc)1536 {1537 Int i;1538 psDst->partIdx = psSrc->partIdx;1539 psDst->typeIdx = psSrc->typeIdx;1540 if (psDst->typeIdx != -1)1541 {1542 psDst->subTypeIdx = psSrc->subTypeIdx ;1543 psDst->length = psSrc->length;1544 for (i=0;i<psDst->length;i++)1545 {1546 psDst->offset[i] = psSrc->offset[i];1547 }1548 }1549 else1550 {1551 psDst->length = 0;1552 for (i=0;i<SAO_BO_LEN;i++)1553 {1554 psDst->offset[i] = 0;1555 }1556 }1557 }1558 1559 Void TDecSbac::parseSaoOffset(SaoLcuParam* psSaoLcuParam, UInt compIdx)1560 {1561 UInt uiSymbol;1562 static Int iTypeLength[MAX_NUM_SAO_TYPE] =1563 {1564 SAO_EO_LEN,1565 SAO_EO_LEN,1566 SAO_EO_LEN,1567 SAO_EO_LEN,1568 SAO_BO_LEN1569 };1570 1571 if (compIdx==2)1572 {1573 uiSymbol = (UInt)( psSaoLcuParam->typeIdx + 1);1574 }1575 else1576 {1577 parseSaoTypeIdx(uiSymbol);1578 }1579 psSaoLcuParam->typeIdx = (Int)uiSymbol - 1;1580 if (uiSymbol)1581 {1582 psSaoLcuParam->length = iTypeLength[psSaoLcuParam->typeIdx];1583 1584 Int bitDepth = compIdx ? g_bitDepthC : g_bitDepthY;1585 Int offsetTh = 1 << min(bitDepth - 5,5);1586 1587 if( psSaoLcuParam->typeIdx == SAO_BO )1588 {1589 for(Int i=0; i< psSaoLcuParam->length; i++)1590 {1591 parseSaoMaxUvlc(uiSymbol, offsetTh -1 );1592 psSaoLcuParam->offset[i] = uiSymbol;1593 }1594 for(Int i=0; i< psSaoLcuParam->length; i++)1595 {1596 if (psSaoLcuParam->offset[i] != 0)1597 {1598 m_pcTDecBinIf->decodeBinEP ( uiSymbol);1599 if (uiSymbol)1600 {1601 psSaoLcuParam->offset[i] = -psSaoLcuParam->offset[i] ;1602 }1603 }1604 }1605 parseSaoUflc(5, uiSymbol );1606 psSaoLcuParam->subTypeIdx = uiSymbol;1607 }1608 else if( psSaoLcuParam->typeIdx < 4 )1609 {1610 parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[0] = uiSymbol;1611 parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[1] = uiSymbol;1612 parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[2] = -(Int)uiSymbol;1613 parseSaoMaxUvlc(uiSymbol, offsetTh -1 ); psSaoLcuParam->offset[3] = -(Int)uiSymbol;1614 if (compIdx != 2)1615 {1616 parseSaoUflc(2, uiSymbol );1617 psSaoLcuParam->subTypeIdx = uiSymbol;1618 psSaoLcuParam->typeIdx += psSaoLcuParam->subTypeIdx;1619 }1620 }1621 }1622 else1623 {1624 psSaoLcuParam->length = 0;1625 }1626 }1627 1628 Void TDecSbac::parseSaoOneLcuInterleaving(Int rx, Int ry, SAOParam* pSaoParam, TComDataCU* pcCU, Int iCUAddrInSlice, Int iCUAddrUpInSlice, Int allowMergeLeft, Int allowMergeUp)1629 {1630 Int iAddr = pcCU->getAddr();1631 UInt uiSymbol;1632 for (Int iCompIdx=0; iCompIdx<3; iCompIdx++)1633 {1634 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag = 0;1635 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag = 0;1636 pSaoParam->saoLcuParam[iCompIdx][iAddr].subTypeIdx = 0;1637 pSaoParam->saoLcuParam[iCompIdx][iAddr].typeIdx = -1;1638 pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[0] = 0;1639 pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[1] = 0;1640 pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[2] = 0;1641 pSaoParam->saoLcuParam[iCompIdx][iAddr].offset[3] = 0;1642 1643 }1644 if (pSaoParam->bSaoFlag[0] || pSaoParam->bSaoFlag[1] )1645 {1646 if (rx>0 && iCUAddrInSlice!=0 && allowMergeLeft)1647 {1648 parseSaoMerge(uiSymbol);1649 pSaoParam->saoLcuParam[0][iAddr].mergeLeftFlag = (Bool)uiSymbol;1650 }1651 if (pSaoParam->saoLcuParam[0][iAddr].mergeLeftFlag==0)1652 {1653 if ((ry > 0) && (iCUAddrUpInSlice>=0) && allowMergeUp)1654 {1655 parseSaoMerge(uiSymbol);1656 pSaoParam->saoLcuParam[0][iAddr].mergeUpFlag = (Bool)uiSymbol;1657 }1658 }1659 }1660 1661 for (Int iCompIdx=0; iCompIdx<3; iCompIdx++)1662 {1663 if ((iCompIdx == 0 && pSaoParam->bSaoFlag[0]) || (iCompIdx > 0 && pSaoParam->bSaoFlag[1]) )1664 {1665 if (rx>0 && iCUAddrInSlice!=0 && allowMergeLeft)1666 {1667 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag = pSaoParam->saoLcuParam[0][iAddr].mergeLeftFlag;1668 }1669 else1670 {1671 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag = 0;1672 }1673 1674 if (pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeLeftFlag==0)1675 {1676 if ((ry > 0) && (iCUAddrUpInSlice>=0) && allowMergeUp)1677 {1678 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag = pSaoParam->saoLcuParam[0][iAddr].mergeUpFlag;1679 }1680 else1681 {1682 pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag = 0;1683 }1684 if (!pSaoParam->saoLcuParam[iCompIdx][iAddr].mergeUpFlag)1685 {1686 pSaoParam->saoLcuParam[2][iAddr].typeIdx = pSaoParam->saoLcuParam[1][iAddr].typeIdx;1687 parseSaoOffset(&(pSaoParam->saoLcuParam[iCompIdx][iAddr]), iCompIdx);1688 }1689 else1690 {1691 copySaoOneLcuParam(&pSaoParam->saoLcuParam[iCompIdx][iAddr], &pSaoParam->saoLcuParam[iCompIdx][iAddr-pSaoParam->numCuInWidth]);1692 }1693 }1694 else1695 {1696 copySaoOneLcuParam(&pSaoParam->saoLcuParam[iCompIdx][iAddr], &pSaoParam->saoLcuParam[iCompIdx][iAddr-1]);1697 }1698 }1699 else1700 {1701 pSaoParam->saoLcuParam[iCompIdx][iAddr].typeIdx = -1;1702 pSaoParam->saoLcuParam[iCompIdx][iAddr].subTypeIdx = 0;1703 }1704 }1705 }1706 1707 #endif1708 1709 1520 /** 1710 1521 - Initialize our contexts from the nominated source. -
TabularUnified trunk/source/Lib/TLibDecoder/TDecSbac.h ¶
r540 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 90 90 Void parseSaoTypeIdx ( UInt& ruiVal ); 91 91 Void parseSaoUflc ( UInt uiLength, UInt& ruiVal ); 92 #if HM_CLEANUP_SAO93 92 Void parseSAOBlkParam (SAOBlkParam& saoBlkParam, Bool* sliceEnabled, Bool leftMergeAvail, Bool aboveMergeAvail); 94 93 Void parseSaoSign(UInt& val); 95 #else96 Void parseSaoOneLcuInterleaving(Int rx, Int ry, SAOParam* pSaoParam, TComDataCU* pcCU, Int iCUAddrInSlice, Int iCUAddrUpInSlice, Int allowMergeLeft, Int allowMergeUp);97 Void parseSaoOffset (SaoLcuParam* psSaoLcuParam, UInt compIdx);98 #endif99 94 private: 100 95 Void xReadUnarySymbol ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset ); … … 171 166 ContextModel3DBuffer m_cMVPIdxSCModel; 172 167 173 ContextModel3DBuffer m_cCUAMPSCModel;174 168 ContextModel3DBuffer m_cSaoMergeSCModel; 175 169 ContextModel3DBuffer m_cSaoTypeIdxSCModel; -
TabularUnified trunk/source/Lib/TLibDecoder/TDecSlice.cpp ¶
r540 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 323 323 #endif 324 324 325 #if HM_CLEANUP_SAO326 325 if ( pcSlice->getSPS()->getUseSAO() ) 327 326 { … … 358 357 } 359 358 } 360 #else361 if ( pcSlice->getSPS()->getUseSAO() && (pcSlice->getSaoEnabledFlag()||pcSlice->getSaoEnabledFlagChroma()) )362 {363 SAOParam *saoParam = rpcPic->getPicSym()->getSaoParam();364 saoParam->bSaoFlag[0] = pcSlice->getSaoEnabledFlag();365 if (iCUAddr == iStartCUAddr)366 {367 saoParam->bSaoFlag[1] = pcSlice->getSaoEnabledFlagChroma();368 }369 Int numCuInWidth = saoParam->numCuInWidth;370 Int cuAddrInSlice = iCUAddr - rpcPic->getPicSym()->getCUOrderMap(pcSlice->getSliceCurStartCUAddr()/rpcPic->getNumPartInCU());371 Int cuAddrUpInSlice = cuAddrInSlice - numCuInWidth;372 Int rx = iCUAddr % numCuInWidth;373 Int ry = iCUAddr / numCuInWidth;374 Int allowMergeLeft = 1;375 Int allowMergeUp = 1;376 if (rx!=0)377 {378 if (rpcPic->getPicSym()->getTileIdxMap(iCUAddr-1) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr))379 {380 allowMergeLeft = 0;381 }382 }383 if (ry!=0)384 {385 if (rpcPic->getPicSym()->getTileIdxMap(iCUAddr-numCuInWidth) != rpcPic->getPicSym()->getTileIdxMap(iCUAddr))386 {387 allowMergeUp = 0;388 }389 }390 pcSbacDecoder->parseSaoOneLcuInterleaving(rx, ry, saoParam,pcCU, cuAddrInSlice, cuAddrUpInSlice, allowMergeLeft, allowMergeUp);391 }392 else if ( pcSlice->getSPS()->getUseSAO() )393 {394 Int addr = pcCU->getAddr();395 SAOParam *saoParam = rpcPic->getPicSym()->getSaoParam();396 for (Int cIdx=0; cIdx<3; cIdx++)397 {398 SaoLcuParam *saoLcuParam = &(saoParam->saoLcuParam[cIdx][addr]);399 if ( ((cIdx == 0) && !pcSlice->getSaoEnabledFlag()) || ((cIdx == 1 || cIdx == 2) && !pcSlice->getSaoEnabledFlagChroma()))400 {401 saoLcuParam->mergeUpFlag = 0;402 saoLcuParam->mergeLeftFlag = 0;403 saoLcuParam->subTypeIdx = 0;404 saoLcuParam->typeIdx = -1;405 saoLcuParam->offset[0] = 0;406 saoLcuParam->offset[1] = 0;407 saoLcuParam->offset[2] = 0;408 saoLcuParam->offset[3] = 0;409 }410 }411 }412 #endif413 359 414 360 m_pcCuDecoder->decodeCU ( pcCU, uiIsLast ); -
TabularUnified trunk/source/Lib/TLibDecoder/TDecSlice.h ¶
r442 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * -
TabularUnified trunk/source/Lib/TLibDecoder/TDecTop.cpp ¶
r588 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 404 404 #endif 405 405 #endif 406 #if !HM_CLEANUP_SAO407 rpcPic->getPicSym()->allocSaoParam(&m_cSAO);408 #endif409 406 m_cListPic.pushBack( rpcPic ); 410 407 … … 485 482 #endif 486 483 #endif 487 #endif488 #if !HM_CLEANUP_SAO489 rpcPic->getPicSym()->allocSaoParam(&m_cSAO);490 484 #endif 491 485 } … … 784 778 #if REPN_FORMAT_IN_VPS 785 779 #if AUXILIARY_PICTURES 786 #if HM_CLEANUP_SAO787 780 m_cSAO.create( m_apcSlicePilot->getPicWidthInLumaSamples(), m_apcSlicePilot->getPicHeightInLumaSamples(), sps->getChromaFormatIdc(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxCUDepth() ); 788 781 #else 789 m_cSAO.create( m_apcSlicePilot->getPicWidthInLumaSamples(), m_apcSlicePilot->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() );790 #endif791 #else792 #if HM_CLEANUP_SAO793 782 m_cSAO.create( m_apcSlicePilot->getPicWidthInLumaSamples(), m_apcSlicePilot->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxCUDepth() ); 794 #else 795 m_cSAO.create( m_apcSlicePilot->getPicWidthInLumaSamples(), m_apcSlicePilot->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() ); 796 #endif 797 #endif 798 #else 799 #if HM_CLEANUP_SAO 783 #endif 784 #else 800 785 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight(), sps->getMaxCUDepth() ); 801 #else802 m_cSAO.create( sps->getPicWidthInLumaSamples(), sps->getPicHeightInLumaSamples(), sps->getMaxCUWidth(), sps->getMaxCUHeight() );803 #endif804 786 #endif 805 787 m_cLoopFilter.create( sps->getMaxCUDepth() ); … … 817 799 { 818 800 TComPic*& pcPic = m_pcPic; 801 #if SVC_EXTENSION 819 802 #if NO_CLRAS_OUTPUT_FLAG 820 803 Bool bFirstSliceInSeq; 821 804 #endif 822 #if SVC_EXTENSION823 805 m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getPrefetchedVPS(0) ); 824 806 #if OUTPUT_LAYER_SET_INDEX … … 831 813 #endif 832 814 m_apcSlicePilot->initSlice( nalu.m_layerId ); 833 #else 815 #else //SVC_EXTENSION 834 816 m_apcSlicePilot->initSlice(); 835 817 #endif … … 839 821 m_uiSliceIdx = 0; 840 822 } 823 else 824 { 825 m_apcSlicePilot->copySliceInfo( pcPic->getPicSym()->getSlice(m_uiSliceIdx-1) ); 826 } 841 827 m_apcSlicePilot->setSliceIdx(m_uiSliceIdx); 842 if (!m_bFirstSliceInPicture)843 {844 m_apcSlicePilot->copySliceInfo( pcPic->getPicSym()->getSlice(m_uiSliceIdx-1) );845 }846 828 847 829 m_apcSlicePilot->setNalUnitType(nalu.m_nalUnitType); … … 857 839 858 840 #if SVC_EXTENSION 859 m_apcSlicePilot->setSliceIdx( m_uiSliceIdx ); // it should be removed if HM will reflect it in above860 841 #if VPS_EXTN_DIRECT_REF_LAYERS 861 842 setRefLayerParams(m_apcSlicePilot->getVPS()); … … 1875 1856 return false; 1876 1857 1858 1859 case NAL_UNIT_RESERVED_VCL_N10: 1860 case NAL_UNIT_RESERVED_VCL_R11: 1861 case NAL_UNIT_RESERVED_VCL_N12: 1862 case NAL_UNIT_RESERVED_VCL_R13: 1863 case NAL_UNIT_RESERVED_VCL_N14: 1864 case NAL_UNIT_RESERVED_VCL_R15: 1865 1866 case NAL_UNIT_RESERVED_IRAP_VCL22: 1867 case NAL_UNIT_RESERVED_IRAP_VCL23: 1868 1869 case NAL_UNIT_RESERVED_VCL24: 1870 case NAL_UNIT_RESERVED_VCL25: 1871 case NAL_UNIT_RESERVED_VCL26: 1872 case NAL_UNIT_RESERVED_VCL27: 1873 case NAL_UNIT_RESERVED_VCL28: 1874 case NAL_UNIT_RESERVED_VCL29: 1875 case NAL_UNIT_RESERVED_VCL30: 1876 case NAL_UNIT_RESERVED_VCL31: 1877 1878 case NAL_UNIT_FILLER_DATA: 1879 case NAL_UNIT_RESERVED_NVCL41: 1880 case NAL_UNIT_RESERVED_NVCL42: 1881 case NAL_UNIT_RESERVED_NVCL43: 1882 case NAL_UNIT_RESERVED_NVCL44: 1883 case NAL_UNIT_RESERVED_NVCL45: 1884 case NAL_UNIT_RESERVED_NVCL46: 1885 case NAL_UNIT_RESERVED_NVCL47: 1886 case NAL_UNIT_UNSPECIFIED_48: 1887 case NAL_UNIT_UNSPECIFIED_49: 1888 case NAL_UNIT_UNSPECIFIED_50: 1889 case NAL_UNIT_UNSPECIFIED_51: 1890 case NAL_UNIT_UNSPECIFIED_52: 1891 case NAL_UNIT_UNSPECIFIED_53: 1892 case NAL_UNIT_UNSPECIFIED_54: 1893 case NAL_UNIT_UNSPECIFIED_55: 1894 case NAL_UNIT_UNSPECIFIED_56: 1895 case NAL_UNIT_UNSPECIFIED_57: 1896 case NAL_UNIT_UNSPECIFIED_58: 1897 case NAL_UNIT_UNSPECIFIED_59: 1898 case NAL_UNIT_UNSPECIFIED_60: 1899 case NAL_UNIT_UNSPECIFIED_61: 1900 case NAL_UNIT_UNSPECIFIED_62: 1901 case NAL_UNIT_UNSPECIFIED_63: 1902 1877 1903 default: 1878 1904 assert (0); … … 1954 1980 } 1955 1981 1982 #if SVC_EXTENSION 1956 1983 #if VPS_EXTN_DIRECT_REF_LAYERS 1957 1984 TDecTop* TDecTop::getRefLayerDec( UInt refLayerIdc ) … … 1968 1995 1969 1996 #if VPS_EXTN_DIRECT_REF_LAYERS 1970 1971 1997 Void TDecTop::setRefLayerParams( TComVPS* vps ) 1972 1998 { … … 2137 2163 } 2138 2164 #endif 2165 #endif //SVC_EXTENSION 2139 2166 //! \} -
TabularUnified trunk/source/Lib/TLibDecoder/TDecTop.h ¶
r588 r595 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 3, ITU/ISO/IEC6 * Copyright (c) 2010-2014, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 221 221 Void xInitILRP(TComSPS *pcSPS); 222 222 #endif 223 #endif 223 #if OUTPUT_LAYER_SET_INDEX 224 CommonDecoderParams* getCommonDecoderParams() { return m_commonDecoderParams; } 225 Void setCommonDecoderParams(CommonDecoderParams* x) { m_commonDecoderParams = x; } 226 Void checkValueOfTargetOutputLayerSetIdx(TComVPS *vps); 227 #endif 228 #if SCALINGLIST_INFERRING 229 ParameterSetManagerDecoder* getParameterSetManager() { return &m_parameterSetManagerDecoder; } 230 #endif 231 #if RESOLUTION_BASED_DPB 232 Void setSubDpbIdx(Int idx) { m_subDpbIdx = idx; } 233 Int getSubDpbIdx() { return m_subDpbIdx; } 234 Void assignSubDpbs(TComVPS *vps); 235 #endif 236 #endif //SVC_EXTENSION 224 237 #if AVC_SYNTAX || SYNTAX_OUTPUT 225 238 Void setBLSyntaxFile( fstream* pFile ) { m_pBLSyntaxFile = pFile; } … … 256 269 Void setNoOutputOfPriorPicsFlags(Bool x) { m_noOutputOfPriorPicsFlags = x; } 257 270 #endif 258 public:259 #if OUTPUT_LAYER_SET_INDEX260 CommonDecoderParams* getCommonDecoderParams() { return m_commonDecoderParams; }261 Void setCommonDecoderParams(CommonDecoderParams* x) { m_commonDecoderParams = x; }262 Void checkValueOfTargetOutputLayerSetIdx(TComVPS *vps);263 #endif264 #if SCALINGLIST_INFERRING265 ParameterSetManagerDecoder* getParameterSetManager() { return &m_parameterSetManagerDecoder; }266 #endif267 #if RESOLUTION_BASED_DPB268 Void setSubDpbIdx(Int idx) { m_subDpbIdx = idx; }269 Int getSubDpbIdx() { return m_subDpbIdx; }270 Void assignSubDpbs(TComVPS *vps);271 #endif272 271 };// END CLASS DEFINITION TDecTop 273 272
Note: See TracChangeset for help on using the changeset viewer.