You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/huffyuvdsp: Change w to intptr in add_hfyu_median_pred() and add_hfyu_left_pred()
This avoids potential issues with the high 32bits being random in x86-64 asm Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -41,7 +41,7 @@ static void add_bytes_c(uint8_t *dst, uint8_t *src, intptr_t w)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void add_hfyu_median_pred_c(uint8_t *dst, const uint8_t *src1,
|
static void add_hfyu_median_pred_c(uint8_t *dst, const uint8_t *src1,
|
||||||
const uint8_t *diff, int w,
|
const uint8_t *diff, intptr_t w,
|
||||||
int *left, int *left_top)
|
int *left, int *left_top)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -60,7 +60,7 @@ static void add_hfyu_median_pred_c(uint8_t *dst, const uint8_t *src1,
|
|||||||
*left_top = lt;
|
*left_top = lt;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int add_hfyu_left_pred_c(uint8_t *dst, const uint8_t *src, int w,
|
static int add_hfyu_left_pred_c(uint8_t *dst, const uint8_t *src, intptr_t w,
|
||||||
int acc)
|
int acc)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@@ -37,10 +37,10 @@ typedef struct HuffYUVDSPContext {
|
|||||||
void (*add_bytes)(uint8_t *dst /* align 16 */, uint8_t *src /* align 16 */,
|
void (*add_bytes)(uint8_t *dst /* align 16 */, uint8_t *src /* align 16 */,
|
||||||
intptr_t w);
|
intptr_t w);
|
||||||
void (*add_hfyu_median_pred)(uint8_t *dst, const uint8_t *top,
|
void (*add_hfyu_median_pred)(uint8_t *dst, const uint8_t *top,
|
||||||
const uint8_t *diff, int w,
|
const uint8_t *diff, intptr_t w,
|
||||||
int *left, int *left_top);
|
int *left, int *left_top);
|
||||||
int (*add_hfyu_left_pred)(uint8_t *dst, const uint8_t *src,
|
int (*add_hfyu_left_pred)(uint8_t *dst, const uint8_t *src,
|
||||||
int w, int left);
|
intptr_t w, int left);
|
||||||
void (*add_hfyu_left_pred_bgr32)(uint8_t *dst, const uint8_t *src,
|
void (*add_hfyu_left_pred_bgr32)(uint8_t *dst, const uint8_t *src,
|
||||||
intptr_t w, uint8_t *left);
|
intptr_t w, uint8_t *left);
|
||||||
} HuffYUVDSPContext;
|
} HuffYUVDSPContext;
|
||||||
|
@@ -27,19 +27,19 @@ void ff_add_bytes_mmx(uint8_t *dst, uint8_t *src, intptr_t w);
|
|||||||
void ff_add_bytes_sse2(uint8_t *dst, uint8_t *src, intptr_t w);
|
void ff_add_bytes_sse2(uint8_t *dst, uint8_t *src, intptr_t w);
|
||||||
|
|
||||||
void ff_add_hfyu_median_pred_cmov(uint8_t *dst, const uint8_t *top,
|
void ff_add_hfyu_median_pred_cmov(uint8_t *dst, const uint8_t *top,
|
||||||
const uint8_t *diff, int w,
|
const uint8_t *diff, intptr_t w,
|
||||||
int *left, int *left_top);
|
int *left, int *left_top);
|
||||||
void ff_add_hfyu_median_pred_mmxext(uint8_t *dst, const uint8_t *top,
|
void ff_add_hfyu_median_pred_mmxext(uint8_t *dst, const uint8_t *top,
|
||||||
const uint8_t *diff, int w,
|
const uint8_t *diff, intptr_t w,
|
||||||
int *left, int *left_top);
|
int *left, int *left_top);
|
||||||
void ff_add_hfyu_median_pred_sse2(uint8_t *dst, const uint8_t *top,
|
void ff_add_hfyu_median_pred_sse2(uint8_t *dst, const uint8_t *top,
|
||||||
const uint8_t *diff, int w,
|
const uint8_t *diff, intptr_t w,
|
||||||
int *left, int *left_top);
|
int *left, int *left_top);
|
||||||
|
|
||||||
int ff_add_hfyu_left_pred_ssse3(uint8_t *dst, const uint8_t *src,
|
int ff_add_hfyu_left_pred_ssse3(uint8_t *dst, const uint8_t *src,
|
||||||
int w, int left);
|
intptr_t w, int left);
|
||||||
int ff_add_hfyu_left_pred_sse4(uint8_t *dst, const uint8_t *src,
|
int ff_add_hfyu_left_pred_sse4(uint8_t *dst, const uint8_t *src,
|
||||||
int w, int left);
|
intptr_t w, int left);
|
||||||
|
|
||||||
av_cold void ff_huffyuvdsp_init_x86(HuffYUVDSPContext *c)
|
av_cold void ff_huffyuvdsp_init_x86(HuffYUVDSPContext *c)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user