diff utils.c @ 8227:596677256482 libavcodec

Implement the fields rc_max_available_vbv_use and rc_min_vbv_overflow_use in AVCodecContext, and use their values in the ratecontrol code rather than hardcoded ones. See the thread: "[RFC] ratecontrol buffer size magic". Patch by Baptiste Coudurier.
author stefano
date Sat, 29 Nov 2008 14:08:48 +0000
parents a9734fe0811e
children f93efc084e41
line wrap: on
line diff
--- a/utils.c	Sat Nov 29 10:06:37 2008 +0000
+++ b/utils.c	Sat Nov 29 14:08:48 2008 +0000
@@ -743,6 +743,8 @@
 {"bits_per_raw_sample", NULL, OFFSET(bits_per_raw_sample), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
 {"channel_layout", NULL, OFFSET(channel_layout), FF_OPT_TYPE_INT64, DEFAULT, 0, INT64_MAX, A|E|D, "channel_layout"},
 {"request_channel_layout", NULL, OFFSET(request_channel_layout), FF_OPT_TYPE_INT64, DEFAULT, 0, INT64_MAX, A|D, "request_channel_layout"},
+{"rc_max_vbv_use", NULL, OFFSET(rc_max_available_vbv_use), FF_OPT_TYPE_FLOAT, 1.0/3, 0.0, FLT_MAX, V|E},
+{"rc_min_vbv_use", NULL, OFFSET(rc_min_vbv_overflow_use),  FF_OPT_TYPE_FLOAT, 3,     0.0, FLT_MAX, V|E},
 {NULL},
 };