Commit 4cf4c94a authored by Marco Paniconi's avatar Marco Paniconi
Browse files

Fix to rd cost computation for mv bias.

This prevents the rd cost from wrapping around and going negative.

Change-Id: Id61390537d2ad47762e410918bb4e18f6a0912d4
parent 9da8a344
......@@ -513,7 +513,8 @@ static int evaluate_inter_mode(unsigned int* sse, int rate2, int* distortion2,
&& x->e_mbd.mode_info_context->mbmi.ref_frame != LAST_FRAME)
rd_adj = 100;
this_rd = this_rd * rd_adj/100;
// rd_adj <= 100
this_rd = ((int64_t)this_rd) * rd_adj / 100;
}
check_for_encode_breakout(*sse, x);
......
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