]> git.videolan.org Git - x264.git/commitdiff
Fix extremely rare infinite loop in 2-pass VBV
authorJason Garrett-Glaser <darkshikari@gmail.com>
Wed, 4 Nov 2009 07:15:35 +0000 (23:15 -0800)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Mon, 9 Nov 2009 04:21:45 +0000 (20:21 -0800)
Implicit conversion from double->float lost enough precision to cause the loop termination condition to never trigger.
Bug report by Tal Aloni.

encoder/ratecontrol.c

index ffd64685802b6d2e9903f839d72f8af2532a0a39..ac5ba75ca87f264d33a37f6f03e450d30b4d15de 100644 (file)
@@ -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;