Skip to content

Commit 86c5554

Browse files
committed
add clipping to RC update
Signed-off-by: Minsoo Park <mss.park@samsung.com>
1 parent 7d129d3 commit 86c5554

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/oapv_rc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ void oapve_rc_update_after_pic(oapve_ctx_t* ctx, double cost)
199199
diff_lambda = oapv_clip3(-0.125, 0.125, 0.25 * diff_lambda);
200200
ctx->rc_param.alpha = (ctx->rc_param.alpha) * exp(diff_lambda);
201201
ctx->rc_param.beta = (ctx->rc_param.beta) + diff_lambda / ln_bpp;
202+
203+
ctx->rc_param.alpha = oapv_clip3(0.05, 500, ctx->rc_param.alpha);
204+
ctx->rc_param.beta = oapv_clip3(0.1, 3, ctx->rc_param.beta);
202205
}
203206
ctx->rc_param.is_updated = 1;
204207
}

0 commit comments

Comments
 (0)