- Timestamp:
- 7 Jul 2015, 01:55:11 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1117 r1119 2219 2219 #if REPN_FORMAT_IN_VPS 2220 2220 , m_updateRepFormatFlag (false) 2221 #if O0096_REP_FORMAT_INDEX2222 2221 , m_updateRepFormatIndex (0) 2223 #endif2224 2222 #endif 2225 2223 #if SCALINGLIST_INFERRING … … 3704 3702 TComVPS *vps = getVPS(); 3705 3703 UInt retVal, layerId = getLayerId(); 3706 #if O0096_REP_FORMAT_INDEX 3704 3707 3705 #if R0279_REP_FORMAT_INBL 3708 3706 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 ) … … 3726 3724 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getPicWidthVpsInLumaSamples(); 3727 3725 } 3728 #else 3729 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 3730 { 3731 retVal = sps->getPicWidthInLumaSamples(); 3732 } 3733 else 3734 { 3735 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getPicWidthVpsInLumaSamples(); 3736 } 3737 #endif 3726 3738 3727 return retVal; 3739 3728 } 3729 3740 3730 UInt TComSlice::getPicHeightInLumaSamples() 3741 3731 { … … 3743 3733 TComVPS *vps = getVPS(); 3744 3734 UInt retVal, layerId = getLayerId(); 3745 #if O0096_REP_FORMAT_INDEX 3735 3746 3736 #if R0279_REP_FORMAT_INBL 3747 3737 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 ) … … 3765 3755 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getPicHeightVpsInLumaSamples(); 3766 3756 } 3767 #else 3768 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 3769 { 3770 retVal = sps->getPicHeightInLumaSamples(); 3771 } 3772 else 3773 { 3774 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getPicHeightVpsInLumaSamples(); 3775 } 3776 #endif 3757 3777 3758 return retVal; 3778 3759 } 3760 3779 3761 #if AUXILIARY_PICTURES 3780 3762 ChromaFormat TComSlice::getChromaFormatIdc() … … 3791 3773 UInt retVal, layerId = getLayerId(); 3792 3774 #endif 3793 #if O0096_REP_FORMAT_INDEX 3775 3794 3776 #if R0279_REP_FORMAT_INBL 3795 3777 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 ) … … 3813 3795 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getChromaFormatVpsIdc(); 3814 3796 } 3815 #else 3816 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 3817 { 3818 retVal = sps->getChromaFormatIdc(); 3819 } 3820 else 3821 { 3822 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getChromaFormatVpsIdc(); 3823 } 3824 #endif 3797 3825 3798 return retVal; 3826 3799 } 3800 3827 3801 UInt TComSlice::getBitDepthY() 3828 3802 { … … 3830 3804 TComVPS *vps = getVPS(); 3831 3805 UInt retVal, layerId = getLayerId(); 3832 #if O0096_REP_FORMAT_INDEX 3806 3833 3807 #if R0279_REP_FORMAT_INBL 3834 3808 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 ) … … 3851 3825 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getBitDepthVpsLuma(); 3852 3826 } 3853 #else 3854 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 3855 { 3856 retVal = sps->getBitDepthY(); 3857 } 3858 else 3859 { 3860 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getBitDepthVpsLuma(); 3861 } 3862 #endif 3827 3863 3828 return retVal; 3864 3829 } 3830 3865 3831 UInt TComSlice::getBitDepthC() 3866 3832 { … … 3868 3834 TComVPS *vps = getVPS(); 3869 3835 UInt retVal, layerId = getLayerId(); 3870 #if O0096_REP_FORMAT_INDEX 3836 3871 3837 #if R0279_REP_FORMAT_INBL 3872 3838 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 ) … … 3889 3855 retVal = vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getBitDepthVpsChroma(); 3890 3856 } 3891 #else 3892 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() ) 3893 { 3894 retVal = sps->getBitDepth(CHANNEL_TYPE_CHROMA); 3895 } 3896 else 3897 { 3898 retVal = vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)) )->getBitDepthVpsChroma(); 3899 } 3900 #endif 3857 3901 3858 return retVal; 3902 3859 } 3860 3903 3861 Int TComSlice::getQpBDOffsetY() 3904 3862 { 3905 3863 return (getBitDepthY() - 8) * 6; 3906 3864 } 3865 3907 3866 Int TComSlice::getQpBDOffsetC() 3908 3867 { … … 3915 3874 TComVPS *vps = getVPS(); 3916 3875 UInt layerId = getLayerId(); 3917 #if O0096_REP_FORMAT_INDEX 3876 3918 3877 #if R0279_REP_FORMAT_INBL 3919 3878 if ( layerId == 0 || sps->getV1CompatibleSPSFlag() == 1 ) … … 3937 3896 return vps->getVpsRepFormat(sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(layerId)))->getConformanceWindowVps(); 3938 3897 } 3939 #else3940 if( ( layerId == 0 ) || sps->getUpdateRepFormatFlag() )3941 {3942 return sps->getConformanceWindow();3943 }3944 else3945 {3946 return vps->getVpsRepFormat( vps->getVpsRepFormatIdx(vps->getLayerIdxInVps(vps->getLayerIdxInVps(layerId))) )->getConformanceWindowVps();3947 }3948 #endif3949 3898 } 3950 3899 -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1118 r1119 1618 1618 #endif 1619 1619 #if REPN_FORMAT_IN_VPS 1620 Bool m_updateRepFormatFlag; 1621 #if O0096_REP_FORMAT_INDEX 1620 Bool m_updateRepFormatFlag; 1622 1621 UInt m_updateRepFormatIndex; 1623 #endif1624 1622 #endif 1625 1623 #if SCALINGLIST_INFERRING … … 1794 1792 #endif 1795 1793 #if REPN_FORMAT_IN_VPS 1796 Bool getUpdateRepFormatFlag() { return m_updateRepFormatFlag; } 1797 Void setUpdateRepFormatFlag(Bool x) { m_updateRepFormatFlag = x; } 1798 #if O0096_REP_FORMAT_INDEX 1799 Int getUpdateRepFormatIndex() { return m_updateRepFormatIndex; } 1800 Void setUpdateRepFormatIndex(UInt index) { m_updateRepFormatIndex = index; } 1801 #endif 1794 Bool getUpdateRepFormatFlag() { return m_updateRepFormatFlag; } 1795 Void setUpdateRepFormatFlag(Bool x) { m_updateRepFormatFlag = x; } 1796 Int getUpdateRepFormatIndex() { return m_updateRepFormatIndex; } 1797 Void setUpdateRepFormatIndex(UInt index) { m_updateRepFormatIndex = index; } 1802 1798 #endif 1803 1799 #if SCALINGLIST_INFERRING 1804 Bool getInferScalingListFlag() { return m_inferScalingListFlag; }1805 UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; }1800 Bool getInferScalingListFlag() { return m_inferScalingListFlag; } 1801 UInt getScalingListRefLayerId() { return m_scalingListRefLayerId; } 1806 1802 Void setInferScalingListFlag( Bool flag ) { m_inferScalingListFlag = flag; } 1807 1803 Void setScalingListRefLayerId( UInt layerId ) { m_scalingListRefLayerId = layerId; } -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1118 r1119 187 187 #define MAX_REF_LAYERS 7 188 188 #endif 189 #define O0096_REP_FORMAT_INDEX 1 ///< JCTVC-O0096: identify SPS rep_format() with an index into the lists of formats in VPS extension.190 189 #define O0096_DEFAULT_DEPENDENCY_TYPE 1 ///< JCTVC-O0096: specify default dependency type for all direct reference layers 191 190 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1118 r1119 3277 3277 if( vps->getRepFormatIdxPresentFlag() ) 3278 3278 { 3279 #if O0096_REP_FORMAT_INDEX3280 3279 #if !VPS_EXTN_UEV_CODING 3281 3280 READ_CODE( 8, uiCode, "vps_num_rep_formats_minus1" ); … … 3283 3282 READ_UVLC( uiCode, "vps_num_rep_formats_minus1" ); 3284 3283 #endif 3285 #else 3286 READ_CODE( 4, uiCode, "vps_num_rep_formats_minus1" ); 3287 #endif 3284 3288 3285 vps->setVpsNumRepFormats( uiCode + 1 ); 3289 3286 } … … 3312 3309 if( vps->getVpsNumRepFormats() > 1 ) 3313 3310 { 3314 #if O0096_REP_FORMAT_INDEX3315 3311 #if !VPS_EXTN_UEV_CODING 3316 3312 READ_CODE( 8, uiCode, "vps_rep_format_idx[i]" ); … … 3323 3319 READ_CODE( numBits, uiCode, "vps_rep_format_idx[i]" ); 3324 3320 #endif 3325 #else 3326 READ_CODE( 4, uiCode, "vps_rep_format_idx[i]" ); 3327 #endif 3321 3328 3322 vps->setVpsRepFormatIdx( i, uiCode ); 3329 3323 } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r1118 r1119 2321 2321 assert( vps->getVpsNumRepFormats() > 0 && vps->getVpsNumRepFormats() <= 256 ); 2322 2322 2323 #if O0096_REP_FORMAT_INDEX2324 2323 #if !VPS_EXTN_UEV_CODING 2325 2324 WRITE_CODE( vps->getVpsNumRepFormats() - 1, 8, "vps_num_rep_formats_minus1" ); … … 2327 2326 WRITE_UVLC( vps->getVpsNumRepFormats() - 1, "vps_num_rep_formats_minus1" ); 2328 2327 #endif 2329 #else 2330 WRITE_CODE( vps->getVpsNumRepFormats() - 1, 4, "vps_num_rep_formats_minus1" ); 2331 #endif 2328 2332 2329 } 2333 2330 for(i = 0; i < vps->getVpsNumRepFormats(); i++) … … 2343 2340 if( vps->getVpsNumRepFormats() > 1 ) 2344 2341 { 2345 #if O0096_REP_FORMAT_INDEX2346 2342 #if !VPS_EXTN_UEV_CODING 2347 2343 WRITE_CODE( vps->getVpsRepFormatIdx(i), 8, "vps_rep_format_idx[i]" ); … … 2354 2350 WRITE_CODE( vps->getVpsRepFormatIdx(i), numBits, "vps_rep_format_idx[i]" ); 2355 2351 #endif 2356 #else 2357 WRITE_CODE( vps->getVpsRepFormatIdx(i), 4, "vps_rep_format_idx[i]" ); 2358 #endif 2359 } 2360 } 2361 } 2362 #endif 2363 #endif 2352 2353 } 2354 } 2355 } 2356 #endif 2357 #endif //REPN_FORMAT_IN_VPS 2364 2358 2365 2359 WRITE_FLAG(vps->getMaxOneActiveRefLayerFlag(), "max_one_active_ref_layer_flag"); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1117 r1119 1491 1491 Void TEncTop::xInitILRP() 1492 1492 { 1493 #if O0096_REP_FORMAT_INDEX1494 1493 RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cSPS.getUpdateRepFormatFlag() ? m_cSPS.getUpdateRepFormatIndex() : m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdxInVps(m_layerId) ) ); 1495 #else1496 RepFormat *repFormat = m_cVPS.getVpsRepFormat( m_cVPS.getVpsRepFormatIdx( m_cVPS.getLayerIdxInVps(m_layerId) ) );1497 #endif1498 1494 Int bitDepthY,bitDepthC,picWidth,picHeight; 1499 1495 1500 #if O0096_REP_FORMAT_INDEX1501 1496 bitDepthY = repFormat->getBitDepthVpsLuma(); 1502 1497 bitDepthC = repFormat->getBitDepthVpsChroma(); 1503 1498 picWidth = repFormat->getPicWidthVpsInLumaSamples(); 1504 1499 picHeight = repFormat->getPicHeightVpsInLumaSamples(); 1505 #else1506 if( m_cSPS.getUpdateRepFormatFlag() )1507 {1508 bitDepthY = m_cSPS.getBitDepthY();1509 bitDepthC = m_cSPS.getBitDepthC();1510 picWidth = m_cSPS.getPicWidthInLumaSamples();1511 picHeight = m_cSPS.getPicHeightInLumaSamples();1512 }1513 else1514 {1515 bitDepthY = repFormat->getBitDepthVpsLuma();1516 bitDepthC = repFormat->getBitDepthVpsChroma();1517 picWidth = repFormat->getPicWidthVpsInLumaSamples();1518 picHeight = repFormat->getPicHeightVpsInLumaSamples();1519 }1520 #endif1521 1500 1522 1501 if(m_layerId > 0)
Note: See TracChangeset for help on using the changeset viewer.