Changeset 1202 in SHVCSoftware
- Timestamp:
- 8 Jul 2015, 20:33:34 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1201 r1202 4532 4532 printf("ENCODER_FAST_MODE: %d ", ENCODER_FAST_MODE); 4533 4533 printf("REF_IDX_MFM: %d ", REF_IDX_MFM); 4534 printf("O0194_JOINT_US_BITSHIFT: %d ", O0194_JOINT_US_BITSHIFT);4535 4534 #else 4536 4535 printf("RecalQP:%d", m_recalculateQPAccordingToLambda ? 1 : 0 ); -
branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp
r1147 r1202 58 58 Int i, j; 59 59 60 #if O0194_JOINT_US_BITSHIFT61 60 UInt currLayerId = currSlice->getLayerId(); 62 61 UInt refLayerId = currSlice->getVPS()->getRefLayerId( currLayerId, refLayerIdc ); 63 #endif64 62 65 63 const Window &scalEL = currSlice->getPPS()->getScaledRefLayerWindowForLayer(refLayerId); … … 117 115 piDstY = piDstBufY + scalEL.getWindowLeftOffset() + scalEL.getWindowTopOffset() * strideEL; 118 116 119 #if O0194_JOINT_US_BITSHIFT120 117 Int shift = g_bitDepthLayer[CHANNEL_TYPE_LUMA][currLayerId] - g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId]; 118 121 119 #if Q0048_CGS_3D_ASYMLUT 122 120 if( currSlice->getPPS()->getCGSFlag() ) … … 126 124 assert( shift >= 0 ); 127 125 #endif 128 #endif129 126 130 127 for( i = 0; i < heightBL; i++ ) 131 128 { 132 #if O0194_JOINT_US_BITSHIFT133 129 for( j = 0; j < widthBL; j++ ) 134 130 { 135 131 piDstY[j] = piSrcY[j] << shift; 136 132 } 137 #else 138 memcpy( piDstY, piSrcY, sizeof(Pel) * widthBL ); 139 #endif 133 140 134 piSrcY += strideBL; 141 135 piDstY += strideEL; … … 157 151 piDstV = piDstBufV + ( scalEL.getWindowLeftOffset() >> 1 ) + ( scalEL.getWindowTopOffset() >> 1 ) * strideEL; 158 152 159 #if O0194_JOINT_US_BITSHIFT160 153 shift = g_bitDepthLayer[CHANNEL_TYPE_CHROMA][currLayerId] - g_bitDepthLayer[CHANNEL_TYPE_CHROMA][refLayerId]; 154 161 155 #if Q0048_CGS_3D_ASYMLUT 162 156 if( currSlice->getPPS()->getCGSFlag() ) … … 165 159 } 166 160 #endif 167 #endif168 161 169 162 for( i = 0; i < heightBL; i++ ) 170 163 { 171 #if O0194_JOINT_US_BITSHIFT172 164 for( j = 0; j < widthBL; j++ ) 173 165 { … … 175 167 piDstV[j] = piSrcV[j] << shift; 176 168 } 177 #else 178 memcpy( piDstU, piSrcU, sizeof(Pel) * widthBL ); 179 memcpy( piDstV, piSrcV, sizeof(Pel) * widthBL ); 180 #endif 169 181 170 piSrcU += strideBL; 182 171 piSrcV += strideBL; … … 229 218 Int rlClipB = heightBL - 1 + (NTAPS_US_LUMA>>1); 230 219 231 #if O0194_JOINT_US_BITSHIFT232 220 // g_bitDepthY was set to EL bit-depth, but shift1 should be calculated using BL bit-depth 233 221 Int shift1 = g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId] - 8; 222 234 223 #if Q0048_CGS_3D_ASYMLUT 235 224 if( currSlice->getPPS()->getCGSFlag() ) … … 237 226 shift1 = currSlice->getPPS()->getCGSOutputBitDepthY() - 8; 238 227 } 239 #endif240 #else241 Int shift1 = g_bitDepthY - 8;242 228 #endif 243 229 … … 269 255 pcTempPic->setHeight(heightEL); 270 256 271 #if O0194_JOINT_US_BITSHIFT272 257 Int nShift = 20 - g_bitDepthLayer[CHANNEL_TYPE_LUMA][currLayerId]; 273 #else 274 Int nShift = US_FILTER_PREC*2 - shift1; 275 #endif 258 276 259 Int iOffset = 1 << (nShift - 1); 277 260 … … 337 320 heightBL = min<Int>( pcBasePic->getHeight(COMPONENT_Y) >> 1, heightEL ); 338 321 339 #if O0194_JOINT_US_BITSHIFT340 322 // g_bitDepthC was set to EL bit-depth, but shift1 should be calculated using BL bit-depth 341 323 shift1 = g_bitDepthLayer[CHANNEL_TYPE_CHROMA][refLayerId] - 8; 324 342 325 #if Q0048_CGS_3D_ASYMLUT 343 326 if( currSlice->getPPS()->getCGSFlag() ) … … 345 328 shift1 = currSlice->getPPS()->getCGSOutputBitDepthC() - 8; 346 329 } 347 #endif348 #else349 shift1 = g_bitDepthC - 8;350 330 #endif 351 331 … … 383 363 pcTempPic->setHeight(heightEL << 1); 384 364 385 #if O0194_JOINT_US_BITSHIFT386 365 nShift = 20 - g_bitDepthLayer[CHANNEL_TYPE_CHROMA][currLayerId]; 387 #else 388 nShift = US_FILTER_PREC*2 - shift1; 389 #endif 366 390 367 iOffset = 1 << (nShift - 1); 391 368 -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1201 r1202 58 58 #define O0164_MULTI_LAYER_HRD 1 ///< JCTVC-O0164: Multi-layer HRD operation 59 59 60 #define O0194_JOINT_US_BITSHIFT 1 ///< JCTVC-O0194: Joint Upsampling and bit-shift61 60 #define Q0048_CGS_3D_ASYMLUT 1 ///< JCTVC-Q0048: Colour gamut scalability with look-up table 62 61 #if Q0048_CGS_3D_ASYMLUT -
branches/SHM-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp
r1201 r1202 271 271 { 272 272 refAC = ( refAC * currWeightACDCParam[comp].iSamples ) /refWeightACDCParam[comp].iSamples; 273 #if O0194_JOINT_US_BITSHIFT 273 274 // jonint upsampling bitshift 274 275 refAC <<= (g_bitDepthLayer[CHANNEL_TYPE_LUMA][currLayerId] - g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId]); 275 276 refDC <<= (g_bitDepthLayer[CHANNEL_TYPE_LUMA][currLayerId] - g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId]); 276 #endif277 277 } 278 278 #else
Note: See TracChangeset for help on using the changeset viewer.