ptrdiff_t is the correct type for array strides and similar.
---
 libavcodec/svq3.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index aa85e7c..bd83731 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -118,8 +118,8 @@ typedef struct SVQ3Context {
     int mb_x, mb_y;
     int mb_xy;
     int mb_width, mb_height;
-    int mb_stride, mb_num;
-    int b_stride;
+    int mb_num;
+    ptrdiff_t mb_stride, b_stride;
 
     uint32_t *mb2br_xy;
 
@@ -252,7 +252,7 @@ static void svq3_luma_dc_dequant_idct_c(int16_t *output, 
int16_t *input, int qp)
 #undef stride
 
 static void svq3_add_idct_c(uint8_t *dst, int16_t *block,
-                            int stride, int qp, int dc)
+                            ptrdiff_t stride, int qp, int dc)
 {
     const int qmul = svq3_dequant_coeff[qp];
     int i;
@@ -428,8 +428,8 @@ static inline void svq3_mc_dir_part(SVQ3Context *s,
     uint8_t *src, *dest;
     int i, emu = 0;
     int blocksize = 2 - (width >> 3); // 16->0, 8->1, 4->2
-    int linesize   = s->cur_pic->f->linesize[0];
-    int uvlinesize = s->cur_pic->f->linesize[1];
+    ptrdiff_t linesize   = s->cur_pic->f->linesize[0];
+    ptrdiff_t uvlinesize = s->cur_pic->f->linesize[1];
 
     mx += x;
     my += y;
@@ -609,7 +609,7 @@ static inline int svq3_mc_dir(SVQ3Context *s, int size, int 
mode,
 
 static av_always_inline void hl_decode_mb_idct_luma(SVQ3Context *s,
                                                     int mb_type, const int 
*block_offset,
-                                                    int linesize, uint8_t 
*dest_y)
+                                                    ptrdiff_t linesize, 
uint8_t *dest_y)
 {
     int i;
     if (!IS_INTRA4x4(mb_type)) {
@@ -630,7 +630,7 @@ static av_always_inline int dctcoef_get(int16_t *mb, int 
index)
 static av_always_inline void hl_decode_mb_predict_luma(SVQ3Context *s,
                                                        int mb_type,
                                                        const int *block_offset,
-                                                       int linesize,
+                                                       ptrdiff_t linesize,
                                                        uint8_t *dest_y)
 {
     int i;
@@ -673,7 +673,7 @@ static void hl_decode_mb(SVQ3Context *s)
     const int mb_xy   = s->mb_xy;
     const int mb_type = s->cur_pic->mb_type[mb_xy];
     uint8_t *dest_y, *dest_cb, *dest_cr;
-    int linesize, uvlinesize;
+    ptrdiff_t linesize, uvlinesize;
     int i, j;
     const int *block_offset = &s->block_offset[0];
     const int block_h   = 16 >> 1;
@@ -1329,7 +1329,7 @@ static int get_buffer(AVCodecContext *avctx, SVQ3Frame 
*pic)
     SVQ3Context *s = avctx->priv_data;
     const int big_mb_num    = s->mb_stride * (s->mb_height + 1) + 1;
     const int mb_array_size = s->mb_stride * s->mb_height;
-    const int b4_stride     = s->mb_width * 4 + 1;
+    const ptrdiff_t b4_stride = s->mb_width * 4 + 1;
     const int b4_array_size = b4_stride * s->mb_height * 4;
     int ret;
 
-- 
2.7.3

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to