]> git.sesse.net Git - x264/commit
Add ability to adjust ratecontrol parameters on the fly
authorFiona Glaser <fiona@x264.com>
Fri, 29 Jan 2010 10:40:41 +0000 (02:40 -0800)
committerFiona Glaser <fiona@x264.com>
Sun, 14 Feb 2010 06:43:36 +0000 (22:43 -0800)
commit34c42187c53f22de8b8ca90acfc3c7df9367ce7a
tree2e7578314735023ecbf999404e19c191d63b14eb
parenta424adb406070fe3ca9be7d02111a9d3b26d25f3
Add ability to adjust ratecontrol parameters on the fly
encoder_reconfig and x264_picture_t->param can now be used to change ratecontrol parameters.
This is extraordinarily useful in certain streaming situations where the encoder needs to adapt the bitrate to network circumstances.

What can be changed:
1) CRF can be adjusted if in CRF mode.
2) VBV maxrate and bufsize can be adjusted if in VBV mode.
3) Bitrate can be adjusted if in CBR mode.
However, x264 cannot switch between modes and cannot change bitrate in ABR mode.

Also fix a bug where x264_picture_t->param reconfig method would not always be frame-exact.

Commit sponsored by SayMama video calling.
encoder/encoder.c
encoder/ratecontrol.c
encoder/ratecontrol.h
x264.h