Signed-off-by: Michael Niedermayer <michaelni@gmx.at>tags/n2.2-rc1
| @@ -81,7 +81,7 @@ av_cold void ff_huffyuv_common_init(AVCodecContext *avctx) | |||||
| s->flags = avctx->flags; | s->flags = avctx->flags; | ||||
| ff_dsputil_init(&s->dsp, avctx); | ff_dsputil_init(&s->dsp, avctx); | ||||
| ff_llviddsp_init(&s->llviddsp); | |||||
| ff_llviddsp_init(&s->llviddsp, avctx); | |||||
| s->width = avctx->width; | s->width = avctx->width; | ||||
| s->height = avctx->height; | s->height = avctx->height; | ||||
| @@ -115,7 +115,7 @@ static int add_hfyu_left_prediction_int16_c(uint16_t *dst, const uint16_t *src, | |||||
| } | } | ||||
| void ff_llviddsp_init(LLVidDSPContext *c) | |||||
| void ff_llviddsp_init(LLVidDSPContext *c, AVCodecContext *avctx) | |||||
| { | { | ||||
| c->add_int16 = add_int16_c; | c->add_int16 = add_int16_c; | ||||
| c->diff_int16= diff_int16_c; | c->diff_int16= diff_int16_c; | ||||
| @@ -124,5 +124,5 @@ void ff_llviddsp_init(LLVidDSPContext *c) | |||||
| c->sub_hfyu_median_prediction_int16 = sub_hfyu_median_prediction_int16_c; | c->sub_hfyu_median_prediction_int16 = sub_hfyu_median_prediction_int16_c; | ||||
| if (ARCH_X86) | if (ARCH_X86) | ||||
| ff_llviddsp_init_x86(c); | |||||
| ff_llviddsp_init_x86(c, avctx); | |||||
| } | } | ||||
| @@ -34,7 +34,7 @@ typedef struct LLVidDSPContext { | |||||
| int (*add_hfyu_left_prediction_int16)(uint16_t *dst, const uint16_t *src, unsigned mask, int w, int left); | int (*add_hfyu_left_prediction_int16)(uint16_t *dst, const uint16_t *src, unsigned mask, int w, int left); | ||||
| } LLVidDSPContext; | } LLVidDSPContext; | ||||
| void ff_llviddsp_init(LLVidDSPContext *llviddsp); | |||||
| void ff_llviddsp_init_x86(LLVidDSPContext *llviddsp); | |||||
| void ff_llviddsp_init(LLVidDSPContext *llviddsp, AVCodecContext *avctx); | |||||
| void ff_llviddsp_init_x86(LLVidDSPContext *llviddsp, AVCodecContext *avctx); | |||||
| #endif //AVCODEC_LOSSLESS_VIDEODSP_H | #endif //AVCODEC_LOSSLESS_VIDEODSP_H | ||||
| @@ -19,6 +19,7 @@ | |||||
| */ | */ | ||||
| #include "../lossless_videodsp.h" | #include "../lossless_videodsp.h" | ||||
| #include "libavutil/pixdesc.h" | |||||
| #include "libavutil/x86/cpu.h" | #include "libavutil/x86/cpu.h" | ||||
| void ff_add_int16_mmx(uint16_t *dst, const uint16_t *src, unsigned mask, int w); | void ff_add_int16_mmx(uint16_t *dst, const uint16_t *src, unsigned mask, int w); | ||||
| @@ -31,7 +32,7 @@ void ff_add_hfyu_median_prediction_int16_mmxext(uint16_t *dst, const uint16_t *t | |||||
| void ff_sub_hfyu_median_prediction_int16_mmxext(uint16_t *dst, const uint16_t *src1, const uint16_t *src2, unsigned mask, int w, int *left, int *left_top); | void ff_sub_hfyu_median_prediction_int16_mmxext(uint16_t *dst, const uint16_t *src1, const uint16_t *src2, unsigned mask, int w, int *left, int *left_top); | ||||
| void ff_llviddsp_init_x86(LLVidDSPContext *c) | |||||
| void ff_llviddsp_init_x86(LLVidDSPContext *c, AVCodecContext *avctx) | |||||
| { | { | ||||
| int cpu_flags = av_get_cpu_flags(); | int cpu_flags = av_get_cpu_flags(); | ||||