[FFmpeg-cvslog] ape: Use unsigned integer maths

Christophe Gisquet git at videolan.org
Thu May 10 23:33:16 CEST 2012


ffmpeg | branch: master | Christophe Gisquet <christophe.gisquet at gmail.com> | Tue Feb 28 17:42:12 2012 +0100| [706b998cdcea97c50fad2228f67488de0e06b2a2] | committer: Diego Biurrun

ape: Use unsigned integer maths

This involves a division that should be a shift.

Signed-off-by: Diego Biurrun <diego at biurrun.de>

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

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

diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index e41f555..b07f3a0 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -393,7 +393,7 @@ static inline int range_get_symbol(APEContext *ctx,
 }
 /** @} */ // group rangecoder
 
-static inline void update_rice(APERice *rice, int x)
+static inline void update_rice(APERice *rice, unsigned int x)
 {
     int lim = rice->k ? (1 << (rice->k + 4)) : 0;
     rice->ksum += ((x + 1) / 2) - ((rice->ksum + 16) >> 5);
@@ -406,7 +406,7 @@ static inline void update_rice(APERice *rice, int x)
 
 static inline int ape_decode_value(APEContext *ctx, APERice *rice)
 {
-    int x, overflow;
+    unsigned int x, overflow;
 
     if (ctx->fileversion < 3990) {
         int tmpk;



More information about the ffmpeg-cvslog mailing list