diff options
author | Clément Bœsch <u@pkh.me> | 2017-03-20 09:07:57 +0100 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2017-03-20 09:07:57 +0100 |
commit | bb3ad401fc658708acffc9fd1b12be6652516c00 (patch) | |
tree | 4d7a66f58cc75b05871588d57cd1759fb8d380ac /libavcodec/indeo3.c | |
parent | 3835283293bfd38ba69203f4618f0f0f21377bcc (diff) | |
parent | 746c56b7730ce09397d3a8354acc131285e9d829 (diff) | |
download | ffmpeg-bb3ad401fc658708acffc9fd1b12be6652516c00.tar.gz |
Merge commit '746c56b7730ce09397d3a8354acc131285e9d829'
* commit '746c56b7730ce09397d3a8354acc131285e9d829':
indeo: Change type of array pitch parameters to ptrdiff_t
Merged-by: Clément Bœsch <u@pkh.me>
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 e161f83f91..71d478c9fc 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -66,7 +66,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 @@ -166,7 +166,8 @@ static av_cold int allocate_frame_buffers(Indeo3DecodeContext *ctx, AVCodecContext *avctx, int luma_width, int luma_height) { int p, chroma_width, chroma_height; - int luma_pitch, chroma_pitch, luma_size, chroma_size; + int luma_size, chroma_size; + ptrdiff_t luma_pitch, chroma_pitch; if (luma_width < 16 || luma_width > 640 || luma_height < 16 || luma_height > 480 || @@ -425,7 +426,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) { @@ -436,9 +437,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; @@ -1025,11 +1025,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++) { |