Ignore:
Timestamp:
28 Apr 2013, 08:49:16 (12 years ago)
Author:
seregin
Message:

update to HM10.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.0-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp

    r125 r133  
    235235        Int offset = (Int)( ((currDC<<log2Denom) - ((Int64)weight * refDC) + (Int64)realOffset) >> realLog2Denom );
    236236
    237         // Chroma offset range limination
     237        // Chroma offset range limitation
    238238        if(comp)
    239239        {
    240           Int shift = 1 << (g_bitDepthC - 1);
    241           Int pred = ( shift - ( ( shift*weight)>>(log2Denom) ) );
     240          Int pred = ( 128 - ( ( 128*weight)>>(log2Denom) ) );
    242241          Int deltaOffset = Clip3( -512, 511, (offset - pred) );    // signed 10bit
    243242          offset = Clip3( -128, 127, (deltaOffset + pred) );        // signed 8bit
     243        }
     244        // Luma offset range limitation
     245        else
     246        {
     247          offset = Clip3( -128, 127, offset);
    244248        }
    245249
Note: See TracChangeset for help on using the changeset viewer.