Ignore:
Timestamp:
13 May 2013, 16:58:44 (12 years ago)
Author:
seregin
Message:

merge with SHM-2.0-dev branch

Location:
trunk/source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source

  • trunk/source/Lib/TLibEncoder/WeightPredAnalysis.cpp

    r125 r189  
    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.