[FFmpeg-cvslog] libavutil/softfloat: Fix av_normalize1_sf bias.

Nedeljko Babic git at videolan.org
Thu Jun 4 17:46:14 CEST 2015


ffmpeg | branch: master | Nedeljko Babic <nedeljko.babic at imgtec.com> | Wed Jun  3 16:17:39 2015 +0200| [7131aba916d1f562bdaf6a81319f1421ce175b1e] | committer: Michael Niedermayer

libavutil/softfloat: Fix av_normalize1_sf bias.

av_normalize1_sf doesn't properly address border case when mantis is
exactly -0x40000000.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7131aba916d1f562bdaf6a81319f1421ce175b1e
---

 libavutil/softfloat.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/softfloat.h b/libavutil/softfloat.h
index d6cfc3c..6aecdf3 100644
--- a/libavutil/softfloat.h
+++ b/libavutil/softfloat.h
@@ -60,7 +60,7 @@ static av_const SoftFloat av_normalize_sf(SoftFloat a){
 
 static inline av_const SoftFloat av_normalize1_sf(SoftFloat a){
 #if 1
-    if((int32_t)(a.mant + 0x40000000U) < 0){
+    if((int32_t)(a.mant + 0x40000000U) <= 0){
         a.exp++;
         a.mant>>=1;
     }



More information about the ffmpeg-cvslog mailing list