[x264-devel] commit: Fixing floating-point exception in level-checking ( Anton Mitrofanov )

git at videolan.org git at videolan.org
Sun Apr 11 06:50:31 CEST 2010


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Wed Apr  7 12:17:20 2010 +0300| [13908862fd79e85172ab2f4793fade268edb6d3d] | committer: Jason Garrett-Glaser 

Fixing floating-point exception in level-checking
Doesn't cause any issues for x264cli, but might impact some calling apps that care (e.g. Delphi apps).

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

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

diff --git a/encoder/set.c b/encoder/set.c
index 660db8d..e3a071c 100644
--- a/encoder/set.c
+++ b/encoder/set.c
@@ -234,7 +234,7 @@ void x264_sps_init( x264_sps_t *sps, int i_id, x264_param_t *param )
         sps->vui.i_max_bytes_per_pic_denom = 0;
         sps->vui.i_max_bits_per_mb_denom = 0;
         sps->vui.i_log2_max_mv_length_horizontal =
-        sps->vui.i_log2_max_mv_length_vertical = (int)log2f( param->analyse.i_mv_range*4-1 ) + 1;
+        sps->vui.i_log2_max_mv_length_vertical = (int)log2f( X264_MAX( 1, param->analyse.i_mv_range*4-1 ) ) + 1;
     }
 }
 



More information about the x264-devel mailing list