[x264-devel] commit: Prevent VBV from lowering quantizer too much (Jason Garrett-Glaser )
git version control
git at videolan.org
Sat Aug 9 17:38:36 CEST 2008
x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Sat Aug 9 09:36:04 2008 -0600| [91d865c17da30a27cf934179d30eb8efaa25e5d0] | committer: Jason Garrett-Glaser
Prevent VBV from lowering quantizer too much
This code seemed to act up unexpectedly sometimes, creating a situation where in 1-pass VBV mode, a frame's quantizer would drop all the way to qpmin and then shoot back upwards to qpmax, causing serious visual issues.
This change may decrease bitrate in VBV mode, but that is preferable to the artifacting produced by this code.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=91d865c17da30a27cf934179d30eb8efaa25e5d0
---
encoder/ratecontrol.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c
index 10f4df0..fc60c02 100644
--- a/encoder/ratecontrol.c
+++ b/encoder/ratecontrol.c
@@ -977,7 +977,7 @@ void x264_ratecontrol_mb( x264_t *h, int bits )
}
while( rc->qpm > i_qp_min
- && ((buffer_left_planned > rc->buffer_size * 0.4) || rc->qpm > h->fdec->i_row_qp[0])
+ && rc->qpm > h->fdec->i_row_qp[0]
&& ((b1 < rc->frame_size_planned * 0.8 && rc->qpm <= prev_row_qp)
|| b1 < (rc->buffer_fill - rc->buffer_size + rc->buffer_rate) * 1.1) )
{
More information about the x264-devel
mailing list