From 48d9c68300045e3b760b532f5e320e902299a406 Mon Sep 17 00:00:00 2001 From: Luc Trudeau Date: Fri, 15 Feb 2019 21:22:38 -0500 Subject: Clipping in the second weight of SGRProj is useless It was found by Christopher "Monty" Montgomery that when a value between 224 and 96 is clipped between -32 and 95, the resulting value will always be 95. --- src/decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/decode.c b/src/decode.c index a40620d..a2bac06 100644 --- a/src/decode.c +++ b/src/decode.c @@ -2415,7 +2415,7 @@ static void read_restoration_info(Dav1dTileContext *const t, lr->sgr_weights[1] = dav1d_sgr_params[idx][1] ? dav1d_msac_decode_subexp(&ts->msac, ts->lr_ref[p]->sgr_weights[1] + 32, 128, 4) - 32 : - iclip(128 - lr->sgr_weights[0], -32, 95); + 95; memcpy(lr->filter_v, ts->lr_ref[p]->filter_v, sizeof(lr->filter_v)); memcpy(lr->filter_h, ts->lr_ref[p]->filter_h, sizeof(lr->filter_h)); ts->lr_ref[p] = lr; -- cgit v1.2.3