mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
dsputil: fixup half a dozen bugs with ptrdiff vs int linesize
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ede45c4e1d
commit
0ddca7d416
@ -170,7 +170,7 @@ DEF_OLD_QPEL(qpel8_mc13_old_c)
|
||||
DEF_OLD_QPEL(qpel8_mc33_old_c)
|
||||
|
||||
#define CALL_2X_PIXELS(a, b, n)\
|
||||
static void a(uint8_t *block, const uint8_t *pixels, int line_size, int h){\
|
||||
static void a(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h){\
|
||||
b(block , pixels , line_size, h);\
|
||||
b(block+n, pixels+n, line_size, h);\
|
||||
}
|
||||
|
@ -361,7 +361,7 @@ static inline void FUNCC(OPNAME ## _pixels4_xy2)(uint8_t *block, const uint8_t *
|
||||
}\
|
||||
}\
|
||||
\
|
||||
static inline void FUNCC(OPNAME ## _pixels8_xy2)(uint8_t *block, const uint8_t *pixels, int line_size, int h)\
|
||||
static inline void FUNCC(OPNAME ## _pixels8_xy2)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)\
|
||||
{\
|
||||
/* FIXME HIGH BIT DEPTH */\
|
||||
int j;\
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
#define DEF_HPEL(OPNAME, OP) \
|
||||
static inline void FUNCC(OPNAME ## _pixels2)(uint8_t *block, const uint8_t *pixels, int line_size, int h){\
|
||||
static inline void FUNCC(OPNAME ## _pixels2)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h){\
|
||||
int i;\
|
||||
for(i=0; i<h; i++){\
|
||||
OP(*((pixel2*)(block )), AV_RN2P(pixels ));\
|
||||
@ -28,7 +28,7 @@ static inline void FUNCC(OPNAME ## _pixels2)(uint8_t *block, const uint8_t *pixe
|
||||
block +=line_size;\
|
||||
}\
|
||||
}\
|
||||
static inline void FUNCC(OPNAME ## _pixels4)(uint8_t *block, const uint8_t *pixels, int line_size, int h){\
|
||||
static inline void FUNCC(OPNAME ## _pixels4)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h){\
|
||||
int i;\
|
||||
for(i=0; i<h; i++){\
|
||||
OP(*((pixel4*)(block )), AV_RN4P(pixels ));\
|
||||
@ -36,7 +36,7 @@ static inline void FUNCC(OPNAME ## _pixels4)(uint8_t *block, const uint8_t *pixe
|
||||
block +=line_size;\
|
||||
}\
|
||||
}\
|
||||
static inline void FUNCC(OPNAME ## _pixels8)(uint8_t *block, const uint8_t *pixels, int line_size, int h){\
|
||||
static inline void FUNCC(OPNAME ## _pixels8)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h){\
|
||||
int i;\
|
||||
for(i=0; i<h; i++){\
|
||||
OP(*((pixel4*)(block )), AV_RN4P(pixels ));\
|
||||
|
@ -378,7 +378,7 @@ void ff_snow_pred_block(SnowContext *s, uint8_t *dst, uint8_t *tmp, int stride,
|
||||
}
|
||||
|
||||
#define mca(dx,dy,b_w)\
|
||||
static void mc_block_hpel ## dx ## dy ## b_w(uint8_t *dst, const uint8_t *src, int stride, int h){\
|
||||
static void mc_block_hpel ## dx ## dy ## b_w(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h){\
|
||||
av_assert2(h==b_w);\
|
||||
mc_block(NULL, dst, src-(HTAPS_MAX/2-1)-(HTAPS_MAX/2-1)*stride, stride, b_w, b_w, dx, dy);\
|
||||
}
|
||||
|
@ -30,6 +30,8 @@
|
||||
|
||||
#include "dsputil.h"
|
||||
|
||||
typedef void (*vc1op_pixels_func)(uint8_t *block/*align width (8 or 16)*/, const uint8_t *pixels/*align 1*/, int line_size, int h);
|
||||
|
||||
typedef struct VC1DSPContext {
|
||||
/* vc1 functions */
|
||||
void (*vc1_inv_trans_8x8)(int16_t *b);
|
||||
@ -54,8 +56,8 @@ typedef struct VC1DSPContext {
|
||||
/* put 8x8 block with bicubic interpolation and quarterpel precision
|
||||
* last argument is actually round value instead of height
|
||||
*/
|
||||
op_pixels_func put_vc1_mspel_pixels_tab[16];
|
||||
op_pixels_func avg_vc1_mspel_pixels_tab[16];
|
||||
vc1op_pixels_func put_vc1_mspel_pixels_tab[16];
|
||||
vc1op_pixels_func avg_vc1_mspel_pixels_tab[16];
|
||||
|
||||
/* This is really one func used in VC-1 decoding */
|
||||
h264_chroma_mc_func put_no_rnd_vc1_chroma_pixels_tab[3];
|
||||
|
@ -468,7 +468,7 @@ void ff_add_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels,
|
||||
}
|
||||
|
||||
static void put_pixels8_mmx(uint8_t *block, const uint8_t *pixels,
|
||||
int line_size, int h)
|
||||
ptrdiff_t line_size, int h)
|
||||
{
|
||||
__asm__ volatile (
|
||||
"lea (%3, %3), %%"REG_a" \n\t"
|
||||
@ -495,7 +495,7 @@ static void put_pixels8_mmx(uint8_t *block, const uint8_t *pixels,
|
||||
}
|
||||
|
||||
static void put_pixels16_mmx(uint8_t *block, const uint8_t *pixels,
|
||||
int line_size, int h)
|
||||
ptrdiff_t line_size, int h)
|
||||
{
|
||||
__asm__ volatile (
|
||||
"lea (%3, %3), %%"REG_a" \n\t"
|
||||
|
Loading…
Reference in New Issue
Block a user