On 06/09/16 18:11, Diego Biurrun wrote:
> ptrdiff_t is the correct type for array strides and similar.
> ---
>  libavcodec/svq3.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
> index aa85e7c..7eeb94c 100644
> --- a/libavcodec/svq3.c
> +++ b/libavcodec/svq3.c
> @@ -118,8 +118,9 @@ typedef struct SVQ3Context {
>      int mb_x, mb_y;
>      int mb_xy;
>      int mb_width, mb_height;
> -    int mb_stride, mb_num;
> -    int b_stride;
> +    ptrdiff_t mb_stride;
> +    int mb_num;
> +    ptrdiff_t b_stride;
>  
>      uint32_t *mb2br_xy;
>  
> @@ -252,7 +253,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;
> @@ -1329,7 +1330,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;

Those two would need to be changed as well or maybe mb_stride could be
kept as integer.

> -    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;

This change seems incomplete as well.

>      int ret;


_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to