[x264-devel] commit: Improve VBV accuracy (Gabriel Bouvigne )

git version control git at videolan.org
Mon Aug 25 16:48:43 CEST 2008


x264 | branch: master | Gabriel Bouvigne <bouvigne at mp3-tech.org> | Mon Aug 25 10:50:45 2008 -0400| [60c4f7e359a9de86f79f04039a84b3736a38ef55] | committer: Jason Garrett-Glaser 

Improve VBV accuracy
Don't use the previous frame's row SATD as a predictor if it is too different from this frame's row SATD.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=60c4f7e359a9de86f79f04039a84b3736a38ef55
---

 encoder/ratecontrol.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c
index 5f9ac54..1d41200 100644
--- a/encoder/ratecontrol.c
+++ b/encoder/ratecontrol.c
@@ -866,7 +866,8 @@ static double predict_row_size( x264_t *h, int y, int qp )
     double pred_t = 0;
     if( h->sh.i_type != SLICE_TYPE_I
         && h->fref0[0]->i_type == h->fdec->i_type
-        && h->fref0[0]->i_row_satd[y] > 0 )
+        && h->fref0[0]->i_row_satd[y] > 0
+        && (abs(h->fref0[0]->i_row_satd[y] - h->fdec->i_row_satd[y]) < h->fdec->i_row_satd[y]/2))
     {
         pred_t = h->fref0[0]->i_row_bits[y] * h->fdec->i_row_satd[y] / h->fref0[0]->i_row_satd[y]
                  * qp2qscale(h->fref0[0]->i_row_qp[y]) / qp2qscale(qp);



More information about the x264-devel mailing list