[FFmpeg-cvslog] x86: h264: cast pointers to intptr_t rather than int

Mans Rullgard git at videolan.org
Tue Jun 21 03:45:23 CEST 2011


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Mon Jun 20 10:24:26 2011 +0100| [d075e7d5405d716170476a2fea707dfe3330093c] | committer: Mans Rullgard

x86: h264: cast pointers to intptr_t rather than int

Only the low-order bits are used here so the type is not important,
but this avoids a compiler warning.

Signed-off-by: Mans Rullgard <mans at mansr.com>

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

 libavcodec/x86/h264_i386.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/x86/h264_i386.h b/libavcodec/x86/h264_i386.h
index 1b55dd8..9f5e531 100644
--- a/libavcodec/x86/h264_i386.h
+++ b/libavcodec/x86/h264_i386.h
@@ -40,8 +40,8 @@ static int decode_significance_x86(CABACContext *c, int max_coeff,
                                    uint8_t *significant_coeff_ctx_base,
                                    int *index, x86_reg last_off){
     void *end= significant_coeff_ctx_base + max_coeff - 1;
-    int minusstart= -(int)significant_coeff_ctx_base;
-    int minusindex= 4-(int)index;
+    int minusstart= -(intptr_t)significant_coeff_ctx_base;
+    int minusindex= 4-(intptr_t)index;
     int bit;
     x86_reg coeff_count;
     int low;
@@ -101,7 +101,7 @@ static int decode_significance_x86(CABACContext *c, int max_coeff,
 static int decode_significance_8x8_x86(CABACContext *c,
                                        uint8_t *significant_coeff_ctx_base,
                                        int *index, x86_reg last_off, const uint8_t *sig_off){
-    int minusindex= 4-(int)index;
+    int minusindex= 4-(intptr_t)index;
     int bit;
     x86_reg coeff_count;
     int low;



More information about the ffmpeg-cvslog mailing list