Changeset 1090 in SHVCSoftware for branches/SHM-dev/source/App
- Timestamp:
- 1 Jul 2015, 00:53:31 (9 years ago)
- Location:
- branches/SHM-dev/source/App/TAppEncoder
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1089 r1090 793 793 string cfg_scaledRefLayerBottomOffset [MAX_LAYERS]; 794 794 Int* cfg_numRefLayerLocationOffsets[MAX_LAYERS]; 795 #if REF_REGION_OFFSET796 795 string cfg_scaledRefLayerOffsetPresentFlag [MAX_LAYERS]; 797 796 string cfg_refRegionOffsetPresentFlag [MAX_LAYERS]; … … 800 799 string cfg_refRegionRightOffset [MAX_LAYERS]; 801 800 string cfg_refRegionBottomOffset [MAX_LAYERS]; 802 #endif803 #if R0209_GENERIC_PHASE804 801 string cfg_resamplePhaseSetPresentFlag [MAX_LAYERS]; 805 802 string cfg_phaseHorLuma [MAX_LAYERS]; … … 807 804 string cfg_phaseHorChroma [MAX_LAYERS]; 808 805 string cfg_phaseVerChroma [MAX_LAYERS]; 809 #else810 #if P0312_VERT_PHASE_ADJ811 string cfg_vertPhasePositionEnableFlag[MAX_LAYERS];812 #endif813 #endif814 806 815 807 #if O0098_SCALED_REF_LAYER_ID … … 820 812 string* cfg_scaledRefLayerRightOffsetPtr [MAX_LAYERS]; 821 813 string* cfg_scaledRefLayerBottomOffsetPtr [MAX_LAYERS]; 822 #if REF_REGION_OFFSET823 814 string* cfg_scaledRefLayerOffsetPresentFlagPtr [MAX_LAYERS]; 824 815 string* cfg_refRegionOffsetPresentFlagPtr [MAX_LAYERS]; … … 827 818 string* cfg_refRegionRightOffsetPtr [MAX_LAYERS]; 828 819 string* cfg_refRegionBottomOffsetPtr [MAX_LAYERS]; 829 #endif830 #if R0209_GENERIC_PHASE831 820 string* cfg_resamplePhaseSetPresentFlagPtr [MAX_LAYERS]; 832 821 string* cfg_phaseHorLumaPtr [MAX_LAYERS]; … … 834 823 string* cfg_phaseHorChromaPtr [MAX_LAYERS]; 835 824 string* cfg_phaseVerChromaPtr [MAX_LAYERS]; 836 #endif837 #if P0312_VERT_PHASE_ADJ838 string* cfg_vertPhasePositionEnableFlagPtr[MAX_LAYERS];839 #endif840 825 841 826 #if RC_SHVC_HARMONIZATION … … 927 912 cfg_scaledRefLayerRightOffsetPtr [layer] = &cfg_scaledRefLayerRightOffset[layer]; 928 913 cfg_scaledRefLayerBottomOffsetPtr[layer] = &cfg_scaledRefLayerBottomOffset[layer]; 929 #if P0312_VERT_PHASE_ADJ930 cfg_vertPhasePositionEnableFlagPtr[layer] = &cfg_vertPhasePositionEnableFlag[layer];931 #endif932 #if REF_REGION_OFFSET933 914 cfg_scaledRefLayerOffsetPresentFlagPtr [layer] = &cfg_scaledRefLayerOffsetPresentFlag [layer]; 934 915 cfg_refRegionOffsetPresentFlagPtr [layer] = &cfg_refRegionOffsetPresentFlag [layer]; … … 937 918 cfg_refRegionRightOffsetPtr [layer] = &cfg_refRegionRightOffset [layer]; 938 919 cfg_refRegionBottomOffsetPtr[layer] = &cfg_refRegionBottomOffset[layer]; 939 #endif940 #if R0209_GENERIC_PHASE941 920 cfg_resamplePhaseSetPresentFlagPtr [layer] = &cfg_resamplePhaseSetPresentFlag [layer]; 942 921 cfg_phaseHorLumaPtr [layer] = &cfg_phaseHorLuma [layer]; … … 944 923 cfg_phaseHorChromaPtr [layer] = &cfg_phaseHorChroma [layer]; 945 924 cfg_phaseVerChromaPtr [layer] = &cfg_phaseVerChroma [layer]; 946 #endif947 925 } 948 926 #if RC_SHVC_HARMONIZATION … … 1088 1066 ("FrameRate%d,-fr%d", cfg_FrameRate, 0, MAX_LAYERS, "Frame rate for layer %d") 1089 1067 ("LambdaModifier%d,-LM%d", m_adLambdaModifier, Double(1.0), MAX_TLAYER, "Lambda modifier for temporal layer %d") 1090 #if O0215_PHASE_ALIGNMENT1091 ("PhaseAlignment", m_phaseAlignFlag, false, "indicate the sample location alignment between layers (0: zero position aligned, 1: central position aligned)")1092 #endif1093 1068 #if REPN_FORMAT_IN_VPS 1094 1069 ("RepFormatIdx%d", cfg_repFormatIdx, -1, MAX_LAYERS, "Index to the representation format structure used from the VPS") … … 1165 1140 ("ScaledRefLayerBottomOffset%d", cfg_scaledRefLayerBottomOffsetPtr, string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of scaled base layer picture with respect to" 1166 1141 " bottom-right luma sample of the EL picture, in units of two luma samples") 1167 #if REF_REGION_OFFSET1142 #if SVC_EXTENSION 1168 1143 ("ScaledRefLayerOffsetPresentFlag%d", cfg_scaledRefLayerOffsetPresentFlagPtr, string(""), MAX_LAYERS, "presense flag of scaled reference layer offsets") 1169 1144 ("RefRegionOffsetPresentFlag%d", cfg_refRegionOffsetPresentFlagPtr, string(""), MAX_LAYERS, "presense flag of reference region offsets") … … 1176 1151 ("RefRegionBottomOffset%d", cfg_refRegionBottomOffsetPtr, string(""), MAX_LAYERS, "Vertical offset of bottom-right luma sample of ref region with respect to" 1177 1152 " bottom-right luma sample of the BL picture, in units of two luma samples") 1178 #endif1179 #if R0209_GENERIC_PHASE1180 1153 ("ResamplePhaseSetPresentFlag%d", cfg_resamplePhaseSetPresentFlagPtr, string(""), MAX_LAYERS, "presense flag of resample phase set") 1181 1154 ("PhaseHorLuma%d", cfg_phaseHorLumaPtr, string(""), MAX_LAYERS, "luma shift in the horizontal direction used in resampling proces") … … 1183 1156 ("PhaseHorChroma%d", cfg_phaseHorChromaPtr, string(""), MAX_LAYERS, "chroma shift in the horizontal direction used in resampling proces") 1184 1157 ("PhaseVerChroma%d", cfg_phaseVerChromaPtr, string(""), MAX_LAYERS, "chroma shift in the vertical direction used in resampling proces") 1185 #endif1186 #if P0312_VERT_PHASE_ADJ1187 ("VertPhasePositionEnableFlag%d", cfg _vertPhasePositionEnableFlagPtr,string(""), MAX_LAYERS, "VertPhasePositionEnableFlag for layer %d")1188 1158 #endif 1189 1159 #if Q0074_COLOUR_REMAPPING_SEI … … 2156 2126 assert( strcmp(cfg_refLocationOffsetLayerId[layer].c_str(), "")); 2157 2127 #endif 2158 #if REF_REGION_OFFSET2159 2128 Bool srloFlag = 2160 2129 strcmp(cfg_scaledRefLayerLeftOffset [layer].c_str(), "") || … … 2162 2131 strcmp(cfg_scaledRefLayerTopOffset [layer].c_str(), "") || 2163 2132 strcmp(cfg_scaledRefLayerBottomOffset [layer].c_str(), ""); 2133 2164 2134 Bool rroFlag = 2165 2135 strcmp(cfg_refRegionLeftOffset [layer].c_str(), "") || … … 2167 2137 strcmp(cfg_refRegionTopOffset [layer].c_str(), "") || 2168 2138 strcmp(cfg_refRegionBottomOffset [layer].c_str(), ""); 2169 #if R0209_GENERIC_PHASE 2139 2170 2140 Bool phaseSetFlag = 2171 2141 strcmp(cfg_phaseHorLuma [layer].c_str(), "") || … … 2174 2144 strcmp(cfg_phaseVerChroma [layer].c_str(), ""); 2175 2145 assert( srloFlag || rroFlag || phaseSetFlag); 2176 #else2177 assert( srloFlag || rroFlag );2178 #endif2179 #else2180 #if P0312_VERT_PHASE_ADJ2181 assert( strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(), "") ||2182 strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(), "") ||2183 strcmp(cfg_scaledRefLayerTopOffset[layer].c_str(), "") ||2184 strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(),"") ||2185 strcmp(cfg_vertPhasePositionEnableFlag[layer].c_str(),"") );2186 #else2187 assert( strcmp(cfg_scaledRefLayerLeftOffset[layer].c_str(), "") ||2188 strcmp(cfg_scaledRefLayerRightOffset[layer].c_str(), "") ||2189 strcmp(cfg_scaledRefLayerTopOffset[layer].c_str(), "") ||2190 strcmp(cfg_scaledRefLayerBottomOffset[layer].c_str(),"") );2191 #endif2192 #endif2193 2146 } 2194 2147 … … 2211 2164 #endif 2212 2165 2213 #if REF_REGION_OFFSET2214 2166 // Presense Flag // 2215 2167 if(strcmp(cfg_scaledRefLayerOffsetPresentFlag[layer].c_str(), "")) … … 2225 2177 } 2226 2178 } 2227 #endif2228 2179 2229 2180 // Left offset // … … 2282 2233 } 2283 2234 } 2284 #if P0312_VERT_PHASE_ADJ 2285 // VertPhasePositionEnableFlag // 2286 if(strcmp(cfg_vertPhasePositionEnableFlag[layer].c_str(), "")) 2287 { 2288 cfgStringToArray( &tempArray, cfg_vertPhasePositionEnableFlag[layer], m_acLayerCfg[layer].m_numScaledRefLayerOffsets, "VertPhasePositionEnableFlag"); 2289 if(tempArray) 2290 { 2291 for(Int i = 0; i < m_acLayerCfg[layer].m_numScaledRefLayerOffsets; i++) 2292 { 2293 m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] = tempArray[i]; 2294 } 2295 delete [] tempArray; tempArray = NULL; 2296 } 2297 } 2298 #endif 2299 #if REF_REGION_OFFSET 2235 2300 2236 // Presense Flag // 2301 2237 if(strcmp(cfg_refRegionOffsetPresentFlag[layer].c_str(), "")) … … 2367 2303 } 2368 2304 } 2369 #endif 2370 #if R0209_GENERIC_PHASE 2305 2371 2306 Int numPhaseSet = m_acLayerCfg[layer].m_numRefLayerLocationOffsets; 2372 2307 … … 2440 2375 } 2441 2376 } 2442 #endif2443 2377 } 2444 2378 … … 4611 4545 printf("InterLayerWeightedPred : %d\n", m_useInterLayerWeightedPred ); 4612 4546 #endif 4613 #if O0215_PHASE_ALIGNMENT4614 printf("Cross-layer sample alignment : %d\n", m_phaseAlignFlag);4615 #endif4616 4547 printf("\n"); 4617 4548 for(UInt layer=0; layer<m_numLayers; layer++) -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1089 r1090 496 496 UInt m_ilcIdc[1024]; 497 497 #endif 498 #if O0215_PHASE_ALIGNMENT499 Bool m_phaseAlignFlag;500 #endif501 498 #if O0223_PICTURE_TYPES_ALIGN_FLAG 502 499 Bool m_crossLayerPictureTypeAlignFlag; -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r1089 r1090 72 72 ::memset(m_scaledRefLayerRightOffset, 0, sizeof(m_scaledRefLayerRightOffset)); 73 73 ::memset(m_scaledRefLayerBottomOffset, 0, sizeof(m_scaledRefLayerBottomOffset)); 74 #if REF_REGION_OFFSET75 74 ::memset(m_scaledRefLayerOffsetPresentFlag, 0, sizeof(m_scaledRefLayerOffsetPresentFlag)); 76 75 ::memset(m_refRegionOffsetPresentFlag, 0, sizeof(m_refRegionOffsetPresentFlag)); … … 79 78 ::memset(m_refRegionRightOffset, 0, sizeof(m_refRegionRightOffset)); 80 79 ::memset(m_refRegionBottomOffset, 0, sizeof(m_refRegionBottomOffset)); 81 #endif82 #if R0209_GENERIC_PHASE83 80 ::memset(m_resamplePhaseSetPresentFlag, 0, sizeof(m_resamplePhaseSetPresentFlag)); 84 81 ::memset(m_phaseHorLuma, 0, sizeof(m_phaseHorLuma)); … … 86 83 ::memset(m_phaseHorChroma, 0, sizeof(m_phaseHorChroma)); 87 84 ::memset(m_phaseVerChroma, 0, sizeof(m_phaseVerChroma)); 88 #else89 #if P0312_VERT_PHASE_ADJ90 ::memset(m_vertPhasePositionEnableFlag, 0, sizeof(m_vertPhasePositionEnableFlag));91 #endif92 #endif93 85 } 94 86 -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r1089 r1090 101 101 Int m_scaledRefLayerRightOffset [MAX_LAYERS]; 102 102 Int m_scaledRefLayerBottomOffset[MAX_LAYERS]; 103 #if REF_REGION_OFFSET104 103 Bool m_scaledRefLayerOffsetPresentFlag [MAX_LAYERS]; 105 104 Bool m_refRegionOffsetPresentFlag [MAX_LAYERS]; … … 108 107 Int m_refRegionRightOffset [MAX_LAYERS]; 109 108 Int m_refRegionBottomOffset[MAX_LAYERS]; 110 #endif111 #if P0312_VERT_PHASE_ADJ112 Bool m_vertPhasePositionEnableFlag[MAX_LAYERS];113 #endif114 #if R0209_GENERIC_PHASE115 109 Int m_phaseHorLuma [MAX_LAYERS]; 116 110 Int m_phaseVerLuma [MAX_LAYERS]; … … 118 112 Int m_phaseVerChroma[MAX_LAYERS]; 119 113 Bool m_resamplePhaseSetPresentFlag [MAX_LAYERS]; 120 #endif121 114 122 115 Int m_inputBitDepth [MAX_NUM_CHANNEL_TYPE]; ///< bit-depth of input file -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1089 r1090 769 769 if( layer > 0 ) 770 770 { 771 #if REF_REGION_OFFSET772 771 #if AUXILIARY_PICTURES 773 772 Int subWidthC = ( m_acLayerCfg[layer].m_chromaFormatIDC == CHROMA_420 || m_acLayerCfg[layer].m_chromaFormatIDC == CHROMA_422 ) ? 2 : 1; … … 777 776 Int subHeightC = 2; 778 777 #endif 779 #endif780 778 m_acTEncTop[layer].setNumRefLayerLocationOffsets ( m_acLayerCfg[layer].m_numRefLayerLocationOffsets ); 781 779 for(Int i = 0; i < m_acLayerCfg[layer].m_numRefLayerLocationOffsets; i++) … … 784 782 m_acTEncTop[layer].setRefLocationOffsetLayerId (i, m_acLayerCfg[layer].m_refLocationOffsetLayerId[i]); 785 783 #endif 786 #if REF_REGION_OFFSET787 784 m_acTEncTop[layer].setScaledRefLayerOffsetPresentFlag ( i, m_acLayerCfg[layer].m_scaledRefLayerOffsetPresentFlag[i] ); 788 785 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow ( subWidthC * m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], subWidthC * m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 789 786 subHeightC * m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], subHeightC * m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]); 790 #else 791 #if P0312_VERT_PHASE_ADJ 792 m_acTEncTop[layer].setVertPhasePositionEnableFlag ( i, m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] ); 793 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow ( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 794 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i], m_acLayerCfg[layer].m_vertPhasePositionEnableFlag[i] ); 795 #else 796 m_acTEncTop[layer].getScaledRefLayerWindow(i).setWindow ( 2*m_acLayerCfg[layer].m_scaledRefLayerLeftOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerRightOffset[i], 797 2*m_acLayerCfg[layer].m_scaledRefLayerTopOffset[i], 2*m_acLayerCfg[layer].m_scaledRefLayerBottomOffset[i]); 798 #endif 799 #endif 787 800 788 Int rlSubWidthC = ( m_acLayerCfg[i].m_chromaFormatIDC == CHROMA_420 || m_acLayerCfg[i].m_chromaFormatIDC == CHROMA_422 ) ? 2 : 1; 801 789 Int rlSubHeightC = ( m_acLayerCfg[i].m_chromaFormatIDC == CHROMA_420 ) ? 2 : 1; … … 804 792 m_acTEncTop[layer].getRefLayerWindow(i).setWindow ( rlSubWidthC * m_acLayerCfg[layer].m_refRegionLeftOffset[i], rlSubWidthC * m_acLayerCfg[layer].m_refRegionRightOffset[i], 805 793 rlSubHeightC * m_acLayerCfg[layer].m_refRegionTopOffset[i], rlSubHeightC * m_acLayerCfg[layer].m_refRegionBottomOffset[i]); 806 #if R0209_GENERIC_PHASE807 794 m_acTEncTop[layer].setResamplePhaseSetPresentFlag ( i, m_acLayerCfg[layer].m_resamplePhaseSetPresentFlag[i] ); 808 795 m_acTEncTop[layer].setPhaseHorLuma ( i, m_acLayerCfg[layer].m_phaseHorLuma[i] ); … … 810 797 m_acTEncTop[layer].setPhaseHorChroma ( i, m_acLayerCfg[layer].m_phaseHorChroma[i] ); 811 798 m_acTEncTop[layer].setPhaseVerChroma ( i, m_acLayerCfg[layer].m_phaseVerChroma[i] ); 812 #endif813 799 } 814 800 } … … 1846 1832 #endif 1847 1833 1848 #if O0215_PHASE_ALIGNMENT1849 vps->setPhaseAlignFlag( m_phaseAlignFlag );1850 #endif1851 1852 1834 #if P0300_ALT_OUTPUT_LAYER_FLAG 1853 1835 for (Int k = 0; k < MAX_VPS_LAYER_SETS_PLUS1; k++) … … 1859 1841 vps->setAltOuputLayerFlag( m_altOutputLayerFlag ); 1860 1842 #endif 1861 #endif1862 1863 #if P0312_VERT_PHASE_ADJ1864 Bool vpsVuiVertPhaseInUseFlag = false;1865 for( UInt layerId = 1; layerId < m_numLayers; layerId++ )1866 {1867 for( i = 0; i < m_acLayerCfg[layerId].m_numScaledRefLayerOffsets; i++ )1868 {1869 if( m_acTEncTop[layerId].getVertPhasePositionEnableFlag(i) )1870 {1871 vpsVuiVertPhaseInUseFlag = true;1872 break;1873 }1874 }1875 }1876 vps->setVpsVuiVertPhaseInUseFlag( vpsVuiVertPhaseInUseFlag );1877 1843 #endif 1878 1844
Note: See TracChangeset for help on using the changeset viewer.