Commit 131a85a1 authored by Diego Biurrun's avatar Diego Biurrun

utvideo: Change type of array stride parameters to ptrdiff_t

ptrdiff_t is the correct type for array strides and similar.
parent 52730e0f
......@@ -77,7 +77,7 @@ typedef struct UtvideoContext {
int interlaced;
int frame_pred;
int slice_stride;
ptrdiff_t slice_stride;
uint8_t *slice_bits, *slice_buffer[4];
int slice_bits_size;
} UtvideoContext;
......
......@@ -78,7 +78,7 @@ static int build_huff(const uint8_t *src, VLC *vlc, int *fsym)
}
static int decode_plane(UtvideoContext *c, int plane_no,
uint8_t *dst, int step, int stride,
uint8_t *dst, int step, ptrdiff_t stride,
int width, int height,
const uint8_t *src, int use_pred)
{
......@@ -182,8 +182,8 @@ fail:
return AVERROR_INVALIDDATA;
}
static void restore_rgb_planes(uint8_t *src, int step, int stride, int width,
int height)
static void restore_rgb_planes(uint8_t *src, int step, ptrdiff_t stride,
int width, int height)
{
int i, j;
uint8_t r, g, b;
......@@ -200,7 +200,7 @@ static void restore_rgb_planes(uint8_t *src, int step, int stride, int width,
}
}
static void restore_median(uint8_t *src, int step, int stride,
static void restore_median(uint8_t *src, int step, ptrdiff_t stride,
int width, int height, int slices, int rmode)
{
int i, j, slice;
......@@ -256,7 +256,7 @@ static void restore_median(uint8_t *src, int step, int stride,
* so restoring function should take care of possible padding between
* two parts of the same "line".
*/
static void restore_median_il(uint8_t *src, int step, int stride,
static void restore_median_il(uint8_t *src, int step, ptrdiff_t stride,
int width, int height, int slices, int rmode)
{
int i, j, slice;
......@@ -264,7 +264,7 @@ static void restore_median_il(uint8_t *src, int step, int stride,
uint8_t *bsrc;
int slice_start, slice_height;
const int cmask = ~(rmode ? 3 : 1);
const int stride2 = stride << 1;
const ptrdiff_t stride2 = stride << 1;
for (slice = 0; slice < slices; slice++) {
slice_start = ((slice * height) / slices) & cmask;
......
......@@ -234,8 +234,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
return 0;
}
static void mangle_rgb_planes(uint8_t *dst[4], int dst_stride, uint8_t *src,
int step, int stride, int width, int height)
static void mangle_rgb_planes(uint8_t *dst[4], ptrdiff_t dst_stride,
uint8_t *src, int step, ptrdiff_t stride,
int width, int height)
{
int i, j;
int k = 2 * dst_stride;
......@@ -268,7 +269,7 @@ static void mangle_rgb_planes(uint8_t *dst[4], int dst_stride, uint8_t *src,
}
/* Write data to a plane with left prediction */
static void left_predict(uint8_t *src, uint8_t *dst, int stride,
static void left_predict(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
int width, int height)
{
int i, j;
......@@ -285,8 +286,8 @@ static void left_predict(uint8_t *src, uint8_t *dst, int stride,
}
/* Write data to a plane with median prediction */
static void median_predict(UtvideoContext *c, uint8_t *src, uint8_t *dst, int stride,
int width, int height)
static void median_predict(UtvideoContext *c, uint8_t *src, uint8_t *dst,
ptrdiff_t stride, int width, int height)
{
int i, j;
int A, B;
......@@ -387,7 +388,7 @@ static int write_huff_codes(uint8_t *src, uint8_t *dst, int dst_size,
}
static int encode_plane(AVCodecContext *avctx, uint8_t *src,
uint8_t *dst, int stride,
uint8_t *dst, ptrdiff_t stride,
int width, int height, PutByteContext *pb)
{
UtvideoContext *c = avctx->priv_data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment