[x264-devel] commit: Fix extremely rare infinite loop in 2-pass VBV ( Jason Garrett-Glaser )

git version control git at videolan.org
Mon Nov 9 05:22:03 CET 2009


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Tue Nov  3 23:15:35 2009 -0800| [bea99fbf88cc0da3f85f6ae6cccaf483c5d1fc1b] | committer: Jason Garrett-Glaser 

Fix extremely rare infinite loop in 2-pass VBV
Implicit conversion from double->float lost enough precision to cause the loop termination condition to never trigger.
Bug report by Tal Aloni.

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

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

diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c
index ffd6468..ac5ba75 100644
--- a/encoder/ratecontrol.c
+++ b/encoder/ratecontrol.c
@@ -37,13 +37,13 @@ typedef struct
 {
     int pict_type;
     int kept_as_ref;
-    float qscale;
+    double qscale;
     int mv_bits;
     int tex_bits;
     int misc_bits;
     uint64_t expected_bits; /*total expected bits up to the current frame (current one excluded)*/
     double expected_vbv;
-    float new_qscale;
+    double new_qscale;
     int new_qp;
     int i_count;
     int p_count;



More information about the x264-devel mailing list