Ticket #59: alf_fix.patch

File alf_fix.patch, 1.3 KB (added by nanhu, 6 years ago)
  • Lib/CommonLib/TypeDef.h

    diff -urN source/Lib/CommonLib/TypeDef.h sourceNew/Lib/CommonLib/TypeDef.h
    old new  
    7171
    7272#endif
    7373
    74 
     74#define FIX_BUG_ALF                                       1
    7575
    7676#ifndef ENABLE_WPP_PARALLELISM
    7777#define ENABLE_WPP_PARALLELISM                            0
  • Lib/EncoderLib/EncAdaptiveLoopFilter.cpp

    diff -urN source/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp sourceNew/Lib/EncoderLib/EncAdaptiveLoopFilter.cpp
    old new  
    21532153          }
    21542154        } // if (weights(k)<=diff){
    21552155      } // for (k=0; k<sqrFiltLength; k++){
     2156#if FIX_BUG_ALF
     2157      if (minInd != -1)
     2158#endif
    21562159      filterCoeffQuant[minInd]--;
    21572160    }
    21582161    else
     
    21802183          }
    21812184        } // if (weights(k)<=diff){
    21822185      } // for (k=0; k<sqrFiltLength; k++){
     2186#if FIX_BUG_ALF
     2187      if (minInd != -1)
     2188#endif
    21832189      filterCoeffQuant[minInd]++;
    21842190    }
    21852191
     
    21882194    {
    21892195      quantCoeffSum+=weights[i]*filterCoeffQuant[i];
    21902196    }
     2197#if FIX_BUG_ALF
     2198    ++count;
     2199#endif 
    21912200  }
    21922201  if( count == 10 )
    21932202  {