Changeset 438 in 3DVCSoftware for branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp
- Timestamp:
- 23 May 2013, 15:40:36 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.2-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp
r362 r438 235 235 Int offset = (Int)( ((currDC<<log2Denom) - ((Int64)weight * refDC) + (Int64)realOffset) >> realLog2Denom ); 236 236 237 // Chroma offset range limi tation237 // Chroma offset range limination 238 238 if(comp) 239 239 { 240 Int pred = ( 128 - ( ( 128*weight)>>(log2Denom) ) ); 240 Int shift = 1 << (g_bitDepthC - 1); 241 Int pred = ( shift - ( ( shift*weight)>>(log2Denom) ) ); 241 242 Int deltaOffset = Clip3( -512, 511, (offset - pred) ); // signed 10bit 242 243 offset = Clip3( -128, 127, (deltaOffset + pred) ); // signed 8bit 243 }244 // Luma offset range limitation245 else246 {247 offset = Clip3( -128, 127, offset);248 244 } 249 245
Note: See TracChangeset for help on using the changeset viewer.