Commit 48d9c683 authored by Luc Trudeau's avatar Luc Trudeau Committed by Ronald S. Bultje

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.
parent b338afc5
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment