indeo: Change type of array pitch parameters to ptrdiff_t

ptrdiff_t is the correct type for array pitches and similar.
pull/244/merge
Diego Biurrun 8 years ago
parent 4fb311c804
commit 746c56b773
  1. 14
      libavcodec/indeo3.c
  2. 8
      libavcodec/ivi.c
  3. 6
      libavcodec/ivi.h
  4. 52
      libavcodec/ivi_dsp.c
  5. 57
      libavcodec/ivi_dsp.h

@ -65,7 +65,7 @@ typedef struct Plane {
uint8_t *pixels[2]; ///< pointer to the actual pixel data of the buffers above uint8_t *pixels[2]; ///< pointer to the actual pixel data of the buffers above
uint32_t width; uint32_t width;
uint32_t height; uint32_t height;
uint32_t pitch; ptrdiff_t pitch;
} Plane; } Plane;
#define CELL_STACK_MAX 20 #define CELL_STACK_MAX 20
@ -151,7 +151,8 @@ static av_cold int allocate_frame_buffers(Indeo3DecodeContext *ctx,
AVCodecContext *avctx) AVCodecContext *avctx)
{ {
int p, luma_width, luma_height, chroma_width, chroma_height; 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_width = ctx->width;
luma_height = ctx->height; luma_height = ctx->height;
@ -415,7 +416,7 @@ if (*data_ptr >= last_ptr) \
static int decode_cell_data(Indeo3DecodeContext *ctx, Cell *cell, static int decode_cell_data(Indeo3DecodeContext *ctx, Cell *cell,
uint8_t *block, uint8_t *ref_block, 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 vqEntry *delta[2], int swap_quads[2],
const uint8_t **data_ptr, const uint8_t *last_ptr) 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; unsigned int dyad1, dyad2;
uint64_t pix64; uint64_t pix64;
int skip_flag = 0, is_top_of_cell, is_first_row = 1; 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); blk_row_offset = (row_offset << (2 + v_zoom)) - (cell->width << 2);
line_offset = v_zoom ? row_offset : 0; 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 * @param[in] dst_height output plane height
*/ */
static void output_plane(const Plane *plane, int buf_sel, uint8_t *dst, 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; int x,y;
const uint8_t *src = plane->pixels[buf_sel]; 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); dst_height = FFMIN(dst_height, plane->height);
for (y = 0; y < dst_height; y++) { for (y = 0; y < dst_height; y++) {

@ -73,10 +73,10 @@ static VLC ivi_mb_vlc_tabs [8]; ///< static macroblock Huffman tables
static VLC ivi_blk_vlc_tabs[8]; ///< static block Huffman tables static VLC ivi_blk_vlc_tabs[8]; ///< static block Huffman tables
typedef void (*ivi_mc_func) (int16_t *buf, const int16_t *ref_buf, typedef void (*ivi_mc_func) (int16_t *buf, const int16_t *ref_buf,
uint32_t pitch, int mc_type); ptrdiff_t pitch, int mc_type);
typedef void (*ivi_mc_avg_func) (int16_t *buf, const int16_t *ref_buf1, typedef void (*ivi_mc_avg_func) (int16_t *buf, const int16_t *ref_buf1,
const int16_t *ref_buf2, const int16_t *ref_buf2,
uint32_t pitch, int mc_type, int mc_type2); ptrdiff_t pitch, int mc_type, int mc_type2);
static int ivi_mc(IVIBandDesc *band, ivi_mc_func mc, ivi_mc_avg_func mc_avg, static int ivi_mc(IVIBandDesc *band, ivi_mc_func mc, ivi_mc_avg_func mc_avg,
int offs, int mv_x, int mv_y, int mv_x2, int mv_y2, int offs, int mv_x, int mv_y, int mv_x2, int mv_y2,
@ -882,11 +882,11 @@ static uint16_t ivi_calc_band_checksum(IVIBandDesc *band)
* @param[out] dst pointer to the buffer receiving converted pixels * @param[out] dst pointer to the buffer receiving converted pixels
* @param[in] dst_pitch pitch for moving to the next y line * @param[in] dst_pitch pitch for moving to the next y line
*/ */
static void ivi_output_plane(IVIPlaneDesc *plane, uint8_t *dst, int dst_pitch) static void ivi_output_plane(IVIPlaneDesc *plane, uint8_t *dst, ptrdiff_t dst_pitch)
{ {
int x, y; int x, y;
const int16_t *src = plane->bands[0].buf; const int16_t *src = plane->bands[0].buf;
uint32_t pitch = plane->bands[0].pitch; ptrdiff_t pitch = plane->bands[0].pitch;
if (!src) if (!src)
return; return;

@ -87,8 +87,8 @@ extern const uint8_t ff_ivi_direct_scan_4x4[16];
/** /**
* Declare inverse transform function types * Declare inverse transform function types
*/ */
typedef void (InvTransformPtr)(const int32_t *in, int16_t *out, uint32_t pitch, const uint8_t *flags); typedef void (InvTransformPtr)(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags);
typedef void (DCTransformPtr) (const int32_t *in, int16_t *out, uint32_t pitch, int blk_size); typedef void (DCTransformPtr) (const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size);
/** /**
@ -153,7 +153,7 @@ typedef struct IVIBandDesc {
int16_t *ref_buf; ///< pointer to the reference frame buffer (for motion compensation) int16_t *ref_buf; ///< pointer to the reference frame buffer (for motion compensation)
int16_t *b_ref_buf; ///< pointer to the second reference frame buffer (for motion compensation) int16_t *b_ref_buf; ///< pointer to the second reference frame buffer (for motion compensation)
int16_t *bufs[4]; ///< array of pointers to the band buffers int16_t *bufs[4]; ///< array of pointers to the band buffers
int pitch; ///< pitch associated with the buffers above ptrdiff_t pitch; ///< pitch associated with the buffers above
int is_empty; ///< = 1 if this band doesn't contain any data int is_empty; ///< = 1 if this band doesn't contain any data
int mb_size; ///< macroblock size int mb_size; ///< macroblock size
int blk_size; ///< block size int blk_size; ///< block size

@ -31,13 +31,13 @@
#include "ivi_dsp.h" #include "ivi_dsp.h"
void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst, void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
const int dst_pitch) const ptrdiff_t dst_pitch)
{ {
int x, y, indx; int x, y, indx;
int32_t p0, p1, p2, p3, tmp0, tmp1, tmp2; int32_t p0, p1, p2, p3, tmp0, tmp1, tmp2;
int32_t b0_1, b0_2, b1_1, b1_2, b1_3, b2_1, b2_2, b2_3, b2_4, b2_5, b2_6; int32_t b0_1, b0_2, b1_1, b1_2, b1_3, b2_1, b2_2, b2_3, b2_4, b2_5, b2_6;
int32_t b3_1, b3_2, b3_3, b3_4, b3_5, b3_6, b3_7, b3_8, b3_9; int32_t b3_1, b3_2, b3_3, b3_4, b3_5, b3_6, b3_7, b3_8, b3_9;
int32_t pitch, back_pitch; ptrdiff_t pitch, back_pitch;
const short *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr; const short *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr;
const int num_bands = 4; const int num_bands = 4;
@ -178,11 +178,11 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
} }
void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst, void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
const int dst_pitch) const ptrdiff_t dst_pitch)
{ {
int x, y, indx, b0, b1, b2, b3, p0, p1, p2, p3; int x, y, indx, b0, b1, b2, b3, p0, p1, p2, p3;
const short *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr; const short *b0_ptr, *b1_ptr, *b2_ptr, *b3_ptr;
int32_t pitch; ptrdiff_t pitch;
/* all bands should have the same pitch */ /* all bands should have the same pitch */
pitch = plane->bands[0].pitch; pitch = plane->bands[0].pitch;
@ -257,7 +257,7 @@ void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
d3 = COMPENSATE(t2);\ d3 = COMPENSATE(t2);\
d4 = COMPENSATE(t3); } d4 = COMPENSATE(t3); }
void ff_ivi_inverse_haar_8x8(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_inverse_haar_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags) const uint8_t *flags)
{ {
int i, shift, sp1, sp2, sp3, sp4; int i, shift, sp1, sp2, sp3, sp4;
@ -312,7 +312,7 @@ void ff_ivi_inverse_haar_8x8(const int32_t *in, int16_t *out, uint32_t pitch,
#undef COMPENSATE #undef COMPENSATE
} }
void ff_ivi_row_haar8(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_row_haar8(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags) const uint8_t *flags)
{ {
int i; int i;
@ -337,7 +337,7 @@ void ff_ivi_row_haar8(const int32_t *in, int16_t *out, uint32_t pitch,
#undef COMPENSATE #undef COMPENSATE
} }
void ff_ivi_col_haar8(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_col_haar8(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags) const uint8_t *flags)
{ {
int i; int i;
@ -366,7 +366,7 @@ void ff_ivi_col_haar8(const int32_t *in, int16_t *out, uint32_t pitch,
#undef COMPENSATE #undef COMPENSATE
} }
void ff_ivi_inverse_haar_4x4(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_inverse_haar_4x4(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags) const uint8_t *flags)
{ {
int i, shift, sp1, sp2; int i, shift, sp1, sp2;
@ -413,7 +413,7 @@ void ff_ivi_inverse_haar_4x4(const int32_t *in, int16_t *out, uint32_t pitch,
#undef COMPENSATE #undef COMPENSATE
} }
void ff_ivi_row_haar4(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_row_haar4(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags) const uint8_t *flags)
{ {
int i; int i;
@ -435,7 +435,7 @@ void ff_ivi_row_haar4(const int32_t *in, int16_t *out, uint32_t pitch,
#undef COMPENSATE #undef COMPENSATE
} }
void ff_ivi_col_haar4(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_col_haar4(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags) const uint8_t *flags)
{ {
int i; int i;
@ -459,7 +459,7 @@ void ff_ivi_col_haar4(const int32_t *in, int16_t *out, uint32_t pitch,
#undef COMPENSATE #undef COMPENSATE
} }
void ff_ivi_dc_haar_2d(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_dc_haar_2d(const int32_t *in, int16_t *out, ptrdiff_t pitch,
int blk_size) int blk_size)
{ {
int x, y; int x, y;
@ -523,7 +523,7 @@ void ff_ivi_dc_haar_2d(const int32_t *in, int16_t *out, uint32_t pitch,
d3 = COMPENSATE(t3);\ d3 = COMPENSATE(t3);\
d4 = COMPENSATE(t4);} d4 = COMPENSATE(t4);}
void ff_ivi_inverse_slant_8x8(const int32_t *in, int16_t *out, uint32_t pitch, const uint8_t *flags) void ff_ivi_inverse_slant_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags)
{ {
int i; int i;
const int32_t *src; const int32_t *src;
@ -563,7 +563,7 @@ void ff_ivi_inverse_slant_8x8(const int32_t *in, int16_t *out, uint32_t pitch, c
#undef COMPENSATE #undef COMPENSATE
} }
void ff_ivi_inverse_slant_4x4(const int32_t *in, int16_t *out, uint32_t pitch, const uint8_t *flags) void ff_ivi_inverse_slant_4x4(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags)
{ {
int i; int i;
const int32_t *src; const int32_t *src;
@ -603,7 +603,7 @@ void ff_ivi_inverse_slant_4x4(const int32_t *in, int16_t *out, uint32_t pitch, c
#undef COMPENSATE #undef COMPENSATE
} }
void ff_ivi_dc_slant_2d(const int32_t *in, int16_t *out, uint32_t pitch, int blk_size) void ff_ivi_dc_slant_2d(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size)
{ {
int x, y; int x, y;
int16_t dc_coeff; int16_t dc_coeff;
@ -616,7 +616,7 @@ void ff_ivi_dc_slant_2d(const int32_t *in, int16_t *out, uint32_t pitch, int blk
} }
} }
void ff_ivi_row_slant8(const int32_t *in, int16_t *out, uint32_t pitch, const uint8_t *flags) void ff_ivi_row_slant8(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags)
{ {
int i; int i;
int t0, t1, t2, t3, t4, t5, t6, t7, t8; int t0, t1, t2, t3, t4, t5, t6, t7, t8;
@ -636,7 +636,7 @@ void ff_ivi_row_slant8(const int32_t *in, int16_t *out, uint32_t pitch, const ui
#undef COMPENSATE #undef COMPENSATE
} }
void ff_ivi_dc_row_slant(const int32_t *in, int16_t *out, uint32_t pitch, int blk_size) void ff_ivi_dc_row_slant(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size)
{ {
int x, y; int x, y;
int16_t dc_coeff; int16_t dc_coeff;
@ -654,7 +654,7 @@ void ff_ivi_dc_row_slant(const int32_t *in, int16_t *out, uint32_t pitch, int bl
} }
} }
void ff_ivi_col_slant8(const int32_t *in, int16_t *out, uint32_t pitch, const uint8_t *flags) void ff_ivi_col_slant8(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags)
{ {
int i, row2, row4, row8; int i, row2, row4, row8;
int t0, t1, t2, t3, t4, t5, t6, t7, t8; int t0, t1, t2, t3, t4, t5, t6, t7, t8;
@ -681,7 +681,7 @@ void ff_ivi_col_slant8(const int32_t *in, int16_t *out, uint32_t pitch, const ui
#undef COMPENSATE #undef COMPENSATE
} }
void ff_ivi_dc_col_slant(const int32_t *in, int16_t *out, uint32_t pitch, int blk_size) void ff_ivi_dc_col_slant(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size)
{ {
int x, y; int x, y;
int16_t dc_coeff; int16_t dc_coeff;
@ -695,7 +695,7 @@ void ff_ivi_dc_col_slant(const int32_t *in, int16_t *out, uint32_t pitch, int bl
} }
} }
void ff_ivi_row_slant4(const int32_t *in, int16_t *out, uint32_t pitch, const uint8_t *flags) void ff_ivi_row_slant4(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags)
{ {
int i; int i;
int t0, t1, t2, t3, t4; int t0, t1, t2, t3, t4;
@ -715,7 +715,7 @@ void ff_ivi_row_slant4(const int32_t *in, int16_t *out, uint32_t pitch, const ui
#undef COMPENSATE #undef COMPENSATE
} }
void ff_ivi_col_slant4(const int32_t *in, int16_t *out, uint32_t pitch, const uint8_t *flags) void ff_ivi_col_slant4(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags)
{ {
int i, row2; int i, row2;
int t0, t1, t2, t3, t4; int t0, t1, t2, t3, t4;
@ -738,7 +738,7 @@ void ff_ivi_col_slant4(const int32_t *in, int16_t *out, uint32_t pitch, const ui
#undef COMPENSATE #undef COMPENSATE
} }
void ff_ivi_put_pixels_8x8(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_put_pixels_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags) const uint8_t *flags)
{ {
int x, y; int x, y;
@ -748,7 +748,7 @@ void ff_ivi_put_pixels_8x8(const int32_t *in, int16_t *out, uint32_t pitch,
out[x] = in[x]; out[x] = in[x];
} }
void ff_ivi_put_dc_pixel_8x8(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_put_dc_pixel_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch,
int blk_size) int blk_size)
{ {
int y; int y;
@ -763,9 +763,9 @@ void ff_ivi_put_dc_pixel_8x8(const int32_t *in, int16_t *out, uint32_t pitch,
#define IVI_MC_TEMPLATE(size, suffix, OP) \ #define IVI_MC_TEMPLATE(size, suffix, OP) \
static void ivi_mc_ ## size ##x## size ## suffix(int16_t *buf, \ static void ivi_mc_ ## size ##x## size ## suffix(int16_t *buf, \
uint32_t dpitch, \ ptrdiff_t dpitch, \
const int16_t *ref_buf, \ const int16_t *ref_buf, \
uint32_t pitch, int mc_type) \ ptrdiff_t pitch, int mc_type) \
{ \ { \
int i, j; \ int i, j; \
const int16_t *wptr; \ const int16_t *wptr; \
@ -799,7 +799,7 @@ static void ivi_mc_ ## size ##x## size ## suffix(int16_t *buf, \
} \ } \
\ \
void ff_ivi_mc_ ## size ##x## size ## suffix(int16_t *buf, const int16_t *ref_buf, \ void ff_ivi_mc_ ## size ##x## size ## suffix(int16_t *buf, const int16_t *ref_buf, \
uint32_t pitch, int mc_type) \ ptrdiff_t pitch, int mc_type) \
{ \ { \
ivi_mc_ ## size ##x## size ## suffix(buf, pitch, ref_buf, pitch, mc_type); \ ivi_mc_ ## size ##x## size ## suffix(buf, pitch, ref_buf, pitch, mc_type); \
} \ } \
@ -808,7 +808,7 @@ void ff_ivi_mc_ ## size ##x## size ## suffix(int16_t *buf, const int16_t *ref_bu
void ff_ivi_mc_avg_ ## size ##x## size ## suffix(int16_t *buf, \ void ff_ivi_mc_avg_ ## size ##x## size ## suffix(int16_t *buf, \
const int16_t *ref_buf, \ const int16_t *ref_buf, \
const int16_t *ref_buf2, \ const int16_t *ref_buf2, \
uint32_t pitch, \ ptrdiff_t pitch, \
int mc_type, int mc_type2) \ int mc_type, int mc_type2) \
{ \ { \
int16_t tmp[size * size]; \ int16_t tmp[size * size]; \

@ -29,6 +29,7 @@
#ifndef AVCODEC_IVI_DSP_H #ifndef AVCODEC_IVI_DSP_H
#define AVCODEC_IVI_DSP_H #define AVCODEC_IVI_DSP_H
#include <stddef.h>
#include <stdint.h> #include <stdint.h>
#include "ivi.h" #include "ivi.h"
@ -41,7 +42,7 @@
* @param[in] dst_pitch pitch of the destination buffer * @param[in] dst_pitch pitch of the destination buffer
*/ */
void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst, void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
const int dst_pitch); const ptrdiff_t dst_pitch);
/** /**
* Haar wavelet recomposition filter for Indeo 4 * Haar wavelet recomposition filter for Indeo 4
@ -51,7 +52,7 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane, uint8_t *dst,
* @param[in] dst_pitch pitch of the destination buffer * @param[in] dst_pitch pitch of the destination buffer
*/ */
void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst, void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
const int dst_pitch); const ptrdiff_t dst_pitch);
/** /**
* two-dimensional inverse Haar 8x8 transform for Indeo 4 * two-dimensional inverse Haar 8x8 transform for Indeo 4
@ -63,7 +64,7 @@ void ff_ivi_recompose_haar(const IVIPlaneDesc *plane, uint8_t *dst,
* != 0 - non_empty column, 0 - empty one * != 0 - non_empty column, 0 - empty one
* (this array must be filled by caller) * (this array must be filled by caller)
*/ */
void ff_ivi_inverse_haar_8x8(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_inverse_haar_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags); const uint8_t *flags);
/** /**
@ -76,7 +77,7 @@ void ff_ivi_inverse_haar_8x8(const int32_t *in, int16_t *out, uint32_t pitch,
* != 0 - non_empty column, 0 - empty one * != 0 - non_empty column, 0 - empty one
* (this array must be filled by caller) * (this array must be filled by caller)
*/ */
void ff_ivi_row_haar8(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_row_haar8(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags); const uint8_t *flags);
/** /**
@ -89,7 +90,7 @@ void ff_ivi_row_haar8(const int32_t *in, int16_t *out, uint32_t pitch,
* != 0 - non_empty column, 0 - empty one * != 0 - non_empty column, 0 - empty one
* (this array must be filled by caller) * (this array must be filled by caller)
*/ */
void ff_ivi_col_haar8(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_col_haar8(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags); const uint8_t *flags);
/** /**
@ -102,7 +103,7 @@ void ff_ivi_col_haar8(const int32_t *in, int16_t *out, uint32_t pitch,
* != 0 - non_empty column, 0 - empty one * != 0 - non_empty column, 0 - empty one
* (this array must be filled by caller) * (this array must be filled by caller)
*/ */
void ff_ivi_inverse_haar_4x4(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_inverse_haar_4x4(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags); const uint8_t *flags);
/** /**
@ -115,7 +116,7 @@ void ff_ivi_inverse_haar_4x4(const int32_t *in, int16_t *out, uint32_t pitch,
* != 0 - non_empty column, 0 - empty one * != 0 - non_empty column, 0 - empty one
* (this array must be filled by caller) * (this array must be filled by caller)
*/ */
void ff_ivi_row_haar4(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_row_haar4(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags); const uint8_t *flags);
/** /**
@ -128,7 +129,7 @@ void ff_ivi_row_haar4(const int32_t *in, int16_t *out, uint32_t pitch,
* != 0 - non_empty column, 0 - empty one * != 0 - non_empty column, 0 - empty one
* (this array must be filled by caller) * (this array must be filled by caller)
*/ */
void ff_ivi_col_haar4(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_col_haar4(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags); const uint8_t *flags);
/** /**
@ -141,7 +142,7 @@ void ff_ivi_col_haar4(const int32_t *in, int16_t *out, uint32_t pitch,
* @param[in] pitch pitch to move to the next y line * @param[in] pitch pitch to move to the next y line
* @param[in] blk_size transform block size * @param[in] blk_size transform block size
*/ */
void ff_ivi_dc_haar_2d(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_dc_haar_2d(const int32_t *in, int16_t *out, ptrdiff_t pitch,
int blk_size); int blk_size);
/** /**
@ -154,7 +155,7 @@ void ff_ivi_dc_haar_2d(const int32_t *in, int16_t *out, uint32_t pitch,
* != 0 - non_empty column, 0 - empty one * != 0 - non_empty column, 0 - empty one
* (this array must be filled by caller) * (this array must be filled by caller)
*/ */
void ff_ivi_inverse_slant_8x8(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_inverse_slant_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags); const uint8_t *flags);
/** /**
@ -167,7 +168,7 @@ void ff_ivi_inverse_slant_8x8(const int32_t *in, int16_t *out, uint32_t pitch,
* != 0 - non_empty column, 0 - empty one * != 0 - non_empty column, 0 - empty one
* (this array must be filled by caller) * (this array must be filled by caller)
*/ */
void ff_ivi_inverse_slant_4x4(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_inverse_slant_4x4(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags); const uint8_t *flags);
/** /**
@ -181,7 +182,7 @@ void ff_ivi_inverse_slant_4x4(const int32_t *in, int16_t *out, uint32_t pitch,
* @param[in] pitch pitch to move to the next y line * @param[in] pitch pitch to move to the next y line
* @param[in] blk_size transform block size * @param[in] blk_size transform block size
*/ */
void ff_ivi_dc_slant_2d(const int32_t *in, int16_t *out, uint32_t pitch, int blk_size); void ff_ivi_dc_slant_2d(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size);
/** /**
* inverse 1D row slant transform * inverse 1D row slant transform
@ -191,7 +192,7 @@ void ff_ivi_dc_slant_2d(const int32_t *in, int16_t *out, uint32_t pitch, int blk
* @param[in] pitch pitch to move to the next y line * @param[in] pitch pitch to move to the next y line
* @param[in] flags pointer to the array of column flags (unused here) * @param[in] flags pointer to the array of column flags (unused here)
*/ */
void ff_ivi_row_slant8(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_row_slant8(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags); const uint8_t *flags);
/** /**
@ -204,7 +205,7 @@ void ff_ivi_row_slant8(const int32_t *in, int16_t *out, uint32_t pitch,
* != 0 - non_empty column, 0 - empty one * != 0 - non_empty column, 0 - empty one
* (this array must be filled by caller) * (this array must be filled by caller)
*/ */
void ff_ivi_col_slant8(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_col_slant8(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags); const uint8_t *flags);
/** /**
@ -215,7 +216,7 @@ void ff_ivi_col_slant8(const int32_t *in, int16_t *out, uint32_t pitch,
* @param[in] pitch pitch to move to the next y line * @param[in] pitch pitch to move to the next y line
* @param[in] flags pointer to the array of column flags (unused here) * @param[in] flags pointer to the array of column flags (unused here)
*/ */
void ff_ivi_row_slant4(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_row_slant4(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags); const uint8_t *flags);
/** /**
@ -228,29 +229,29 @@ void ff_ivi_row_slant4(const int32_t *in, int16_t *out, uint32_t pitch,
* != 0 - non_empty column, 0 - empty one * != 0 - non_empty column, 0 - empty one
* (this array must be filled by caller) * (this array must be filled by caller)
*/ */
void ff_ivi_col_slant4(const int32_t *in, int16_t *out, uint32_t pitch, void ff_ivi_col_slant4(const int32_t *in, int16_t *out, ptrdiff_t pitch,
const uint8_t *flags); const uint8_t *flags);
/** /**
* DC-only inverse row slant transform * DC-only inverse row slant transform
*/ */
void ff_ivi_dc_row_slant(const int32_t *in, int16_t *out, uint32_t pitch, int blk_size); void ff_ivi_dc_row_slant(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size);
/** /**
* DC-only inverse column slant transform * DC-only inverse column slant transform
*/ */
void ff_ivi_dc_col_slant(const int32_t *in, int16_t *out, uint32_t pitch, int blk_size); void ff_ivi_dc_col_slant(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size);
/** /**
* Copy the pixels into the frame buffer. * Copy the pixels into the frame buffer.
*/ */
void ff_ivi_put_pixels_8x8(const int32_t *in, int16_t *out, uint32_t pitch, const uint8_t *flags); void ff_ivi_put_pixels_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch, const uint8_t *flags);
/** /**
* Copy the DC coefficient into the first pixel of the block and * Copy the DC coefficient into the first pixel of the block and
* zero all others. * zero all others.
*/ */
void ff_ivi_put_dc_pixel_8x8(const int32_t *in, int16_t *out, uint32_t pitch, int blk_size); void ff_ivi_put_dc_pixel_8x8(const int32_t *in, int16_t *out, ptrdiff_t pitch, int blk_size);
/** /**
* 8x8 block motion compensation with adding delta * 8x8 block motion compensation with adding delta
@ -260,7 +261,7 @@ void ff_ivi_put_dc_pixel_8x8(const int32_t *in, int16_t *out, uint32_t pitch, in
* @param[in] pitch pitch for moving to the next y line * @param[in] pitch pitch for moving to the next y line
* @param[in] mc_type interpolation type * @param[in] mc_type interpolation type
*/ */
void ff_ivi_mc_8x8_delta(int16_t *buf, const int16_t *ref_buf, uint32_t pitch, int mc_type); void ff_ivi_mc_8x8_delta(int16_t *buf, const int16_t *ref_buf, ptrdiff_t pitch, int mc_type);
/** /**
* 4x4 block motion compensation with adding delta * 4x4 block motion compensation with adding delta
@ -270,7 +271,7 @@ void ff_ivi_mc_8x8_delta(int16_t *buf, const int16_t *ref_buf, uint32_t pitch, i
* @param[in] pitch pitch for moving to the next y line * @param[in] pitch pitch for moving to the next y line
* @param[in] mc_type interpolation type * @param[in] mc_type interpolation type
*/ */
void ff_ivi_mc_4x4_delta(int16_t *buf, const int16_t *ref_buf, uint32_t pitch, int mc_type); void ff_ivi_mc_4x4_delta(int16_t *buf, const int16_t *ref_buf, ptrdiff_t pitch, int mc_type);
/** /**
* motion compensation without adding delta * motion compensation without adding delta
@ -280,7 +281,7 @@ void ff_ivi_mc_4x4_delta(int16_t *buf, const int16_t *ref_buf, uint32_t pitch, i
* @param[in] pitch pitch for moving to the next y line * @param[in] pitch pitch for moving to the next y line
* @param[in] mc_type interpolation type * @param[in] mc_type interpolation type
*/ */
void ff_ivi_mc_8x8_no_delta(int16_t *buf, const int16_t *ref_buf, uint32_t pitch, int mc_type); void ff_ivi_mc_8x8_no_delta(int16_t *buf, const int16_t *ref_buf, ptrdiff_t pitch, int mc_type);
/** /**
* 4x4 block motion compensation without adding delta * 4x4 block motion compensation without adding delta
@ -290,7 +291,7 @@ void ff_ivi_mc_8x8_no_delta(int16_t *buf, const int16_t *ref_buf, uint32_t pitch
* @param[in] pitch pitch for moving to the next y line * @param[in] pitch pitch for moving to the next y line
* @param[in] mc_type interpolation type * @param[in] mc_type interpolation type
*/ */
void ff_ivi_mc_4x4_no_delta(int16_t *buf, const int16_t *ref_buf, uint32_t pitch, int mc_type); void ff_ivi_mc_4x4_no_delta(int16_t *buf, const int16_t *ref_buf, ptrdiff_t pitch, int mc_type);
/** /**
* 8x8 block motion compensation with adding delta * 8x8 block motion compensation with adding delta
@ -302,7 +303,7 @@ void ff_ivi_mc_4x4_no_delta(int16_t *buf, const int16_t *ref_buf, uint32_t pitch
* @param[in] mc_type interpolation type for backward reference * @param[in] mc_type interpolation type for backward reference
* @param[in] mc_type2 interpolation type for forward reference * @param[in] mc_type2 interpolation type for forward reference
*/ */
void ff_ivi_mc_avg_8x8_delta(int16_t *buf, const int16_t *ref_buf, const int16_t *ref_buf2, uint32_t pitch, int mc_type, int mc_type2); void ff_ivi_mc_avg_8x8_delta(int16_t *buf, const int16_t *ref_buf, const int16_t *ref_buf2, ptrdiff_t pitch, int mc_type, int mc_type2);
/** /**
* 4x4 block motion compensation with adding delta * 4x4 block motion compensation with adding delta
@ -314,7 +315,7 @@ void ff_ivi_mc_avg_8x8_delta(int16_t *buf, const int16_t *ref_buf, const int16_t
* @param[in] mc_type interpolation type for backward reference * @param[in] mc_type interpolation type for backward reference
* @param[in] mc_type2 interpolation type for forward reference * @param[in] mc_type2 interpolation type for forward reference
*/ */
void ff_ivi_mc_avg_4x4_delta(int16_t *buf, const int16_t *ref_buf, const int16_t *ref_buf2, uint32_t pitch, int mc_type, int mc_type2); void ff_ivi_mc_avg_4x4_delta(int16_t *buf, const int16_t *ref_buf, const int16_t *ref_buf2, ptrdiff_t pitch, int mc_type, int mc_type2);
/** /**
* motion compensation without adding delta for B-frames * motion compensation without adding delta for B-frames
@ -326,7 +327,7 @@ void ff_ivi_mc_avg_4x4_delta(int16_t *buf, const int16_t *ref_buf, const int16_t
* @param[in] mc_type interpolation type for backward reference * @param[in] mc_type interpolation type for backward reference
* @param[in] mc_type2 interpolation type for forward reference * @param[in] mc_type2 interpolation type for forward reference
*/ */
void ff_ivi_mc_avg_8x8_no_delta(int16_t *buf, const int16_t *ref_buf, const int16_t *ref_buf2, uint32_t pitch, int mc_type, int mc_type2); void ff_ivi_mc_avg_8x8_no_delta(int16_t *buf, const int16_t *ref_buf, const int16_t *ref_buf2, ptrdiff_t pitch, int mc_type, int mc_type2);
/** /**
* 4x4 block motion compensation without adding delta for B-frames * 4x4 block motion compensation without adding delta for B-frames
@ -338,6 +339,6 @@ void ff_ivi_mc_avg_8x8_no_delta(int16_t *buf, const int16_t *ref_buf, const int1
* @param[in] mc_type interpolation type for backward reference * @param[in] mc_type interpolation type for backward reference
* @param[in] mc_type2 interpolation type for forward reference * @param[in] mc_type2 interpolation type for forward reference
*/ */
void ff_ivi_mc_avg_4x4_no_delta(int16_t *buf, const int16_t *ref_buf, const int16_t *ref_buf2, uint32_t pitch, int mc_type, int mc_type2); void ff_ivi_mc_avg_4x4_no_delta(int16_t *buf, const int16_t *ref_buf, const int16_t *ref_buf2, ptrdiff_t pitch, int mc_type, int mc_type2);
#endif /* AVCODEC_IVI_DSP_H */ #endif /* AVCODEC_IVI_DSP_H */

Loading…
Cancel
Save