Commit bc83b642 authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Replace shift with multiply

To avoid left shift of negative values.

BUG=aomedia:678

Change-Id: I8dacf99f162771a58bef1f839cafd0be9a8f5e86
parent 2e08d96d
......@@ -255,7 +255,7 @@ static int optimize_b_greedy(const AV1_COMMON *cm, MACROBLOCK *mb, int plane,
if (x_a != 0) {
#if CONFIG_NEW_QUANT
dx = av1_dequant_coeff_nuq(x, dqv, dequant_val[band_translate[i]]) -
(coeff[rc] << shift);
(coeff[rc] * (1 << shift));
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
dx >>= xd->bd - 8;
......
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