[x264-devel] commit: Fix I and B-frame QPs with threads (Anton Mitrofanov )

git version control git at videolan.org
Tue Feb 23 11:05:34 CET 2010


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Tue Feb 16 09:41:55 2010 -0800| [4784723450ae1dd28ede1ff04a93f1849d6444e5] | committer: Jason Garrett-Glaser 

Fix I and B-frame QPs with threads
Rounding errors resulted in slightly wrong QPs with threads enabled.

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

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

diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c
index 8c61582..3d86aaa 100644
--- a/encoder/ratecontrol.c
+++ b/encoder/ratecontrol.c
@@ -1077,15 +1077,15 @@ void x264_ratecontrol_start( x264_t *h, int i_force_qp, int overhead )
 
     rc->qpa_rc =
     rc->qpa_aq = 0;
-    h->fdec->f_qp_avg_rc =
-    h->fdec->f_qp_avg_aq =
     rc->qpm =
     rc->qp = x264_clip3( (int)(q + 0.5), 0, 51 );
+    h->fdec->f_qp_avg_rc =
+    h->fdec->f_qp_avg_aq =
     rc->f_qpm = q;
     if( rce )
         rce->new_qp = rc->qp;
 
-    accum_p_qp_update( h, rc->qp );
+    accum_p_qp_update( h, rc->f_qpm );
 
     if( h->sh.i_type != SLICE_TYPE_B )
         rc->last_non_b_pict_type = h->sh.i_type;



More information about the x264-devel mailing list