On 20/09/16 22:07, Diego Biurrun wrote: > On Tue, Sep 20, 2016 at 09:22:06PM +0100, Mark Thompson wrote: >> On 20/09/16 19:36, Diego Biurrun wrote: >>> ptrdiff_t is the correct type for array strides and similar. >>> --- 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; >> >> mb_stride should stay an int. > > Why?
It's used as: (a) an offset against the current macroblock for prediction modes. (b) a multiplier for y offsets to macroblock lines. (c) a size for macroblock lines. All of the other things there are ints (well, last one could be size_t), and have nothing to do with pointers. - Mark _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel