From 7d737e0cf9492d5ddb3c0ed7d82f2ea8eec3d9a6 Mon Sep 17 00:00:00 2001 From: cantabile Date: Mon, 5 Jun 2017 23:34:59 +0300 Subject: [PATCH] Analyse, Recalculate: Fix dct=5..10 dct=5..10 was behaving the same as dct=0. Bug introduced in v17. --- src/PlaneOfBlocks.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/PlaneOfBlocks.c b/src/PlaneOfBlocks.c index d5ed1fd..4f5042e 100644 --- a/src/PlaneOfBlocks.c +++ b/src/PlaneOfBlocks.c @@ -1014,10 +1014,7 @@ void pobSearchMVs(PlaneOfBlocks *pob, MVFrame *pSrcFrame, MVFrame *pRefFrame, int fieldShift, DCTFFTW *DCT, int dctmode, int *pmeanLumaChange, int pzero, int pglobal, int64_t badSAD, int badrange, int meander, int tryMany) { pob->DCT = DCT; - if (pob->DCT == 0) - pob->dctmode = 0; - else - pob->dctmode = dctmode; + pob->dctmode = dctmode; pob->dctweight16 = VSMIN(16, abs(*pmeanLumaChange) / (pob->nBlkSizeX * pob->nBlkSizeY)); //equal dct and spatial weights for meanLumaChange=8 (empirical) pob->badSAD = badSAD; pob->badrange = badrange; @@ -1174,10 +1171,7 @@ void pobRecalculateMVs(PlaneOfBlocks *pob, const FakeGroupOfPlanes *fgop, MVFram SearchType st, int stp, int lambda, int pnew, uint8_t *out, int fieldShift, int64_t thSAD, DCTFFTW *DCT, int dctmode, int smooth, int meander) { pob->DCT = DCT; - if (pob->DCT == 0) - pob->dctmode = 0; - else - pob->dctmode = dctmode; + pob->dctmode = dctmode; pob->dctweight16 = 8; //min(16,abs(*pmeanLumaChange)/(nBlkSizeX*nBlkSizeY)); //equal dct and spatial weights for meanLumaChange=8 (empirical) pob->zeroMVfieldShifted.x = 0; pob->zeroMVfieldShifted.y = fieldShift;