diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 4324bd314e..ed7f04b853 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -379,7 +379,7 @@ typedef struct H264Context { uint32_t *mb2br_xy; int b_stride; // FIXME use s->b4_stride - ptrdiff_t mb_linesize; ///< may be equal to s->linesize or s->linesize * 2, for mbaff + ptrdiff_t mb_linesize; ///< may be equal to s->linesize or s->linesize * 2, for mbaff ptrdiff_t mb_uvlinesize; unsigned current_sps_id; ///< id of the current SPS diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 655cc592f9..9b503865c6 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -984,8 +984,8 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) if (pic_arg->linesize[2] != s->uvlinesize) direct = 0; - av_dlog(s->avctx, "%d %d %d %d\n", pic_arg->linesize[0], - pic_arg->linesize[1], (int) s->linesize, (int) s->uvlinesize); + av_dlog(s->avctx, "%d %d %td %td\n", pic_arg->linesize[0], + pic_arg->linesize[1], s->linesize, s->uvlinesize); if (direct) { i = ff_find_unused_picture(s, 1); diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c index 09061d8dfe..42a00aa175 100644 --- a/libavcodec/mpegvideo_motion.c +++ b/libavcodec/mpegvideo_motion.c @@ -38,9 +38,8 @@ static void gmc1_motion(MpegEncContext *s, uint8_t **ref_picture) { uint8_t *ptr; - int src_x, src_y; + int src_x, src_y, motion_x, motion_y; ptrdiff_t offset, linesize, uvlinesize; - int motion_x, motion_y; int emu=0; motion_x= s->sprite_offset[0][0]; @@ -564,9 +563,9 @@ static void chroma_4mv_motion(MpegEncContext *s, op_pixels_func *pix_op, int mx, int my) { - int dxy, emu=0, src_x, src_y; - ptrdiff_t offset; uint8_t *ptr; + int src_x, src_y, dxy, emu = 0; + ptrdiff_t offset; /* In case of 8X8, we construct a single chroma motion vector with a special rounding */ diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 12fe3abc35..b21b6e2437 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -1294,7 +1294,7 @@ static void apply_loop_filter(Vp3DecodeContext *s, int plane, int ystart, int ye int width = s->fragment_width[!!plane]; int height = s->fragment_height[!!plane]; int fragment = s->fragment_start [plane] + ystart * width; - int stride = s->current_frame.f->linesize[plane]; + ptrdiff_t stride = s->current_frame.f->linesize[plane]; uint8_t *plane_data = s->current_frame.f->data [plane]; if (!s->flipped_image) stride = -stride; plane_data += s->data_offset[plane] + 8*ystart*stride; diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c index d7d08f2fd9..6b9f3860bf 100644 --- a/libavcodec/vp56.c +++ b/libavcodec/vp56.c @@ -303,7 +303,7 @@ static void vp56_add_predictors_dc(VP56Context *s, VP56Frame ref_frame) } static void vp56_deblock_filter(VP56Context *s, uint8_t *yuv, - int stride, int dx, int dy) + ptrdiff_t stride, int dx, int dy) { int t = ff_vp56_filter_threshold[s->quantizer]; if (dx) s->vp56dsp.edge_filter_hor(yuv + 10-dx , stride, t); @@ -584,7 +584,8 @@ static int ff_vp56_decode_mbs(AVCodecContext *avctx, void *data, VP56Context *s = is_alpha ? s0->alpha_context : s0; AVFrame *const p = s->frames[VP56_FRAME_CURRENT]; int mb_row, mb_col, mb_row_flip, mb_offset = 0; - int block, y, uv, stride_y, stride_uv; + int block, y, uv; + ptrdiff_t stride_y, stride_uv; int res; if (p->key_frame) {