diff options
author | Diego Biurrun <diego@biurrun.de> | 2016-08-26 12:26:50 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2016-09-04 11:57:15 +0200 |
commit | 746c56b7730ce09397d3a8354acc131285e9d829 (patch) | |
tree | ce950689016e319a0ff996ad5a77a01912e2c511 /libavcodec/indeo3.c | |
parent | 4fb311c804098d78e5ce5f527f9a9c37536d3a08 (diff) | |
download | ffmpeg-746c56b7730ce09397d3a8354acc131285e9d829.tar.gz |
indeo: Change type of array pitch parameters to ptrdiff_t
ptrdiff_t is the correct type for array pitches and similar.
Diffstat (limited to 'libavcodec/indeo3.c')
-rw-r--r-- | libavcodec/indeo3.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index f222a06c5a..89c11e6346 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -65,7 +65,7 @@ typedef struct Plane { uint8_t *pixels[2]; ///< pointer to the actual pixel data of the buffers above uint32_t width; uint32_t height; - uint32_t pitch; + ptrdiff_t pitch; } Plane; #define CELL_STACK_MAX 20 @@ -151,7 +151,8 @@ static av_cold int allocate_frame_buffers(Indeo3DecodeContext *ctx, AVCodecContext *avctx) { int p, luma_width, luma_height, chroma_width, chroma_height; - int luma_pitch, chroma_pitch, luma_size, chroma_size; + int luma_size, chroma_size; + ptrdiff_t luma_pitch, chroma_pitch; luma_width = ctx->width; luma_height = ctx->height; @@ -415,7 +416,7 @@ if (*data_ptr >= last_ptr) \ static int decode_cell_data(Indeo3DecodeContext *ctx, Cell *cell, uint8_t *block, uint8_t *ref_block, - int pitch, int h_zoom, int v_zoom, int mode, + ptrdiff_t row_offset, int h_zoom, int v_zoom, int mode, const vqEntry *delta[2], int swap_quads[2], const uint8_t **data_ptr, const uint8_t *last_ptr) { @@ -426,9 +427,8 @@ static int decode_cell_data(Indeo3DecodeContext *ctx, Cell *cell, unsigned int dyad1, dyad2; uint64_t pix64; int skip_flag = 0, is_top_of_cell, is_first_row = 1; - int row_offset, blk_row_offset, line_offset; + int blk_row_offset, line_offset; - row_offset = pitch; blk_row_offset = (row_offset << (2 + v_zoom)) - (cell->width << 2); line_offset = v_zoom ? row_offset : 0; @@ -1011,11 +1011,11 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx, * @param[in] dst_height output plane height */ static void output_plane(const Plane *plane, int buf_sel, uint8_t *dst, - int dst_pitch, int dst_height) + ptrdiff_t dst_pitch, int dst_height) { int x,y; const uint8_t *src = plane->pixels[buf_sel]; - uint32_t pitch = plane->pitch; + ptrdiff_t pitch = plane->pitch; dst_height = FFMIN(dst_height, plane->height); for (y = 0; y < dst_height; y++) { |