Changeset 873 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder
- Timestamp:
- 21 Aug 2014, 03:10:10 (11 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibEncoder
- Files:
-
- 2 edited
-
TEncGOP.cpp (modified) (1 diff)
-
TEncTop.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
r868 r873 1124 1124 Int widthEL = pcPic->getPicYuvRec()->getWidth() - scalEL.getWindowLeftOffset() - scalEL.getWindowRightOffset(); 1125 1125 Int heightEL = pcPic->getPicYuvRec()->getHeight() - scalEL.getWindowTopOffset() - scalEL.getWindowBottomOffset(); 1126 1127 #if RESAMPLING_FIX 1128 #if REF_REGION_OFFSET 1129 // conformance check: the values of RefLayerRegionWidthInSamplesY, RefLayerRegionHeightInSamplesY, ScaledRefRegionWidthInSamplesY and ScaledRefRegionHeightInSamplesY shall be greater than 0 1130 assert(widthEL > 0 && heightEL > 0 && widthBL > 0 && widthEL > 0); 1131 1132 // conformance check: ScaledRefRegionWidthInSamplesY shall be greater or equal to RefLayerRegionWidthInSamplesY and ScaledRefRegionHeightInSamplesY shall be greater or equal to RefLayerRegionHeightInSamplesY 1133 assert(widthEL >= widthBL && heightEL >= heightBL); 1134 1135 #if R0209_GENERIC_PHASE 1136 // conformance check: when ScaledRefRegionWidthInSamplesY is equal to RefLayerRegionWidthInSamplesY, PhaseHorY shall be equal to 0, when ScaledRefRegionWidthInSamplesC is equal to RefLayerRegionWidthInSamplesC, PhaseHorC shall be equal to 0, when ScaledRefRegionHeightInSamplesY is equal to RefLayerRegionHeightInSamplesY, PhaseVerY shall be equal to 0, and when ScaledRefRegionHeightInSamplesC is equal to RefLayerRegionHeightInSamplesC, PhaseVerC shall be equal to 0. 1137 Int phaseHorLuma = pcSlice->getPPS()->getPhaseHorLuma(refLayerIdc); 1138 Int phaseVerLuma = pcSlice->getPPS()->getPhaseVerLuma(refLayerIdc); 1139 Int phaseHorChroma = pcSlice->getPPS()->getPhaseHorChroma(refLayerIdc); 1140 Int phaseVerChroma = pcSlice->getPPS()->getPhaseVerChroma(refLayerIdc); 1141 assert( ( (widthEL != widthBL) || (phaseHorLuma == 0 && phaseHorChroma == 0) ) 1142 && ( (heightEL != heightBL) || (phaseVerLuma == 0 && phaseVerChroma == 0) ) ); 1143 #endif 1144 #endif 1145 #endif 1126 1146 1127 1147 g_mvScalingFactor[refLayerIdc][0] = widthEL == widthBL ? 4096 : Clip3(-4096, 4095, ((widthEL << 8) + (widthBL >> 1)) / widthBL); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r869 r873 794 794 #if REF_REGION_OFFSET 795 795 const Window altRL = getPPS()->getRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i)); 796 #if RESAMPLING_FIX 797 Bool equalOffsets = scalEL.hasEqualOffset(altRL); 798 #if R0209_GENERIC_PHASE 799 Bool zeroPhase = getPPS()->hasZeroResamplingPhase(m_cVPS.getRefLayerId(m_layerId, i)); 800 #endif 801 #else 796 802 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 797 803 && altRL.getWindowLeftOffset() == 0 && altRL.getWindowRightOffset() == 0 && altRL.getWindowTopOffset() == 0 && altRL.getWindowBottomOffset() == 0); 804 #endif 798 805 #else 799 806 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 ); … … 809 816 Bool sameBitDepths = ( g_bitDepthYLayer[m_layerId] == g_bitDepthYLayer[refLayerId] ) && ( g_bitDepthCLayer[m_layerId] == g_bitDepthCLayer[refLayerId] ); 810 817 811 if( m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() || !zeroOffsets || !sameBitDepths 818 if( m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() || !sameBitDepths 819 #if REF_REGION_OFFSET && RESAMPLING_FIX 820 || !equalOffsets 821 #if R0209_GENERIC_PHASE 822 || !zeroPhase 823 #endif 824 #else 825 || !zeroOffsets 826 #endif 812 827 #if Q0048_CGS_3D_ASYMLUT 813 828 || m_cPPS.getCGSFlag() > 0 … … 818 833 ) 819 834 #else 820 if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() || !zeroOffsets ) 835 if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() 836 #if REF_REGION_OFFSET && RESAMPLING_FIX 837 || !equalOffsets 838 #if R0209_GENERIC_PHASE 839 || !zeroPhase 840 #endif 841 #else 842 || !zeroOffsets 843 #endif 844 ) 821 845 #endif 822 846 { … … 868 892 #if REF_REGION_OFFSET 869 893 const Window altRL = getPPS()->getRefLayerWindowForLayer(m_cVPS.getRefLayerId(m_layerId, i)); 894 #if RESAMPLING_FIX 895 Bool equalOffsets = scalEL.hasEqualOffset(altRL); 896 #if R0209_GENERIC_PHASE 897 Bool zeroPhase = getPPS()->hasZeroResamplingPhase(m_cVPS.getRefLayerId(m_layerId, i)); 898 #endif 899 #else 870 900 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 871 901 && altRL.getWindowLeftOffset() == 0 && altRL.getWindowRightOffset() == 0 && altRL.getWindowTopOffset() == 0 && altRL.getWindowBottomOffset() == 0); 902 #endif 872 903 #else 873 904 Bool zeroOffsets = ( scalEL.getWindowLeftOffset() == 0 && scalEL.getWindowRightOffset() == 0 && scalEL.getWindowTopOffset() == 0 && scalEL.getWindowBottomOffset() == 0 ); … … 883 914 Bool sameBitDepths = ( g_bitDepthYLayer[m_layerId] == g_bitDepthYLayer[refLayerId] ) && ( g_bitDepthCLayer[m_layerId] == g_bitDepthCLayer[refLayerId] ); 884 915 885 if( m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() || !zeroOffsets || !sameBitDepths 916 if( m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() || !sameBitDepths 917 #if REF_REGION_OFFSET && RESAMPLING_FIX 918 || !equalOffsets 919 #if R0209_GENERIC_PHASE 920 || !zeroPhase 921 #endif 922 #else 923 || !zeroOffsets 924 #endif 886 925 #if Q0048_CGS_3D_ASYMLUT 887 926 || m_cPPS.getCGSFlag() > 0 … … 892 931 ) 893 932 #else 894 if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() || !zeroOffsets ) 933 if(m_iSourceWidth != pcEncTopBase->getSourceWidth() || m_iSourceHeight != pcEncTopBase->getSourceHeight() 934 #if REF_REGION_OFFSET && RESAMPLING_FIX 935 || !equalOffsets 936 #if R0209_GENERIC_PHASE 937 || !zeroPhase 938 #endif 939 #else 940 || !zeroOffsets 941 #endif 942 ) 895 943 #endif 896 944 {
Note: See TracChangeset for help on using the changeset viewer.