diff options
author | Clément Bœsch <u@pkh.me> | 2017-03-20 11:10:46 +0100 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2017-03-20 11:10:46 +0100 |
commit | d36a423445258a6906a8a93a0054784540ed804f (patch) | |
tree | 51b838f0783cca15a559194856ba722a663f9fd0 /libavcodec/error_resilience.c | |
parent | 100026bed6515b9f2d6e81c9290166a3bd14be7f (diff) | |
parent | 6b52762951fa138eef59e2628dabb389e0500e40 (diff) | |
download | ffmpeg-d36a423445258a6906a8a93a0054784540ed804f.tar.gz |
Merge commit '6b52762951fa138eef59e2628dabb389e0500e40'
* commit '6b52762951fa138eef59e2628dabb389e0500e40':
error_resilience: Change type of array stride parameters to ptrdiff_t
Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec/error_resilience.c')
-rw-r--r-- | libavcodec/error_resilience.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index de612d1973..5364940e94 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -42,7 +42,7 @@ * @param stride the number of MVs to get to the next row * @param mv_step the number of MVs per row or column in a macroblock */ -static void set_mv_strides(ERContext *s, int *mv_step, int *stride) +static void set_mv_strides(ERContext *s, ptrdiff_t *mv_step, ptrdiff_t *stride) { if (s->avctx->codec_id == AV_CODEC_ID_H264) { av_assert0(s->quarter_sample); @@ -95,7 +95,7 @@ static void put_dc(ERContext *s, uint8_t *dest_y, uint8_t *dest_cb, } } -static void filter181(int16_t *data, int width, int height, int stride) +static void filter181(int16_t *data, int width, int height, ptrdiff_t stride) { int x, y; @@ -137,7 +137,7 @@ static void filter181(int16_t *data, int width, int height, int stride) * @param h height in 8 pixel blocks */ static void guess_dc(ERContext *s, int16_t *dc, int w, - int h, int stride, int is_luma) + int h, ptrdiff_t stride, int is_luma) { int b_x, b_y; int16_t (*col )[4] = av_malloc_array(stride, h*sizeof( int16_t)*4); @@ -240,9 +240,10 @@ fail: * @param h height in 8 pixel blocks */ static void h_block_filter(ERContext *s, uint8_t *dst, int w, - int h, int stride, int is_luma) + int h, ptrdiff_t stride, int is_luma) { - int b_x, b_y, mvx_stride, mvy_stride; + int b_x, b_y; + ptrdiff_t mvx_stride, mvy_stride; const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; set_mv_strides(s, &mvx_stride, &mvy_stride); mvx_stride >>= is_luma; @@ -308,9 +309,10 @@ static void h_block_filter(ERContext *s, uint8_t *dst, int w, * @param h height in 8 pixel blocks */ static void v_block_filter(ERContext *s, uint8_t *dst, int w, int h, - int stride, int is_luma) + ptrdiff_t stride, int is_luma) { - int b_x, b_y, mvx_stride, mvy_stride; + int b_x, b_y; + ptrdiff_t mvx_stride, mvy_stride; const uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; set_mv_strides(s, &mvx_stride, &mvy_stride); mvx_stride >>= is_luma; @@ -390,11 +392,12 @@ static void guess_mv(ERContext *s) { int (*blocklist)[2], (*next_blocklist)[2]; uint8_t *fixed; - const int mb_stride = s->mb_stride; + const ptrdiff_t mb_stride = s->mb_stride; const int mb_width = s->mb_width; int mb_height = s->mb_height; int i, depth, num_avail; - int mb_x, mb_y, mot_step, mot_stride; + int mb_x, mb_y; + ptrdiff_t mot_step, mot_stride; int blocklist_length, next_blocklist_length; if (s->last_pic.f && s->last_pic.f->data[0]) |