Also drop silly ff_simple_idct_mmx wrapper function. --- libavcodec/x86/idctdsp_init.c | 18 ++++++++++++++++-- libavcodec/x86/simple_idct.c | 20 +------------------- 2 files changed, 17 insertions(+), 21 deletions(-)
diff --git a/libavcodec/x86/idctdsp_init.c b/libavcodec/x86/idctdsp_init.c index 853c6a3..ef5dca8 100644 --- a/libavcodec/x86/idctdsp_init.c +++ b/libavcodec/x86/idctdsp_init.c @@ -58,6 +58,20 @@ av_cold int ff_init_scantable_permutation_x86(uint8_t *idct_permutation, return 0; } +#if HAVE_INLINE_ASM +static void simple_idct_put_mmx(uint8_t *dest, int line_size, int16_t *block) +{ + ff_simple_idct_mmx(block); + ff_put_pixels_clamped(block, dest, line_size); +} + +static void simple_idct_add_mmx(uint8_t *dest, int line_size, int16_t *block) +{ + ff_simple_idct_mmx(block); + ff_add_pixels_clamped(block, dest, line_size); +} +#endif /* HAVE_INLINE_ASM */ + av_cold void ff_idctdsp_init_x86(IDCTDSPContext *c, AVCodecContext *avctx, unsigned high_bit_depth) { @@ -71,8 +85,8 @@ av_cold void ff_idctdsp_init_x86(IDCTDSPContext *c, AVCodecContext *avctx, if (!high_bit_depth && (avctx->idct_algo == FF_IDCT_AUTO || avctx->idct_algo == FF_IDCT_SIMPLEMMX)) { - c->idct_put = ff_simple_idct_put_mmx; - c->idct_add = ff_simple_idct_add_mmx; + c->idct_put = simple_idct_put_mmx; + c->idct_add = simple_idct_add_mmx; c->idct = ff_simple_idct_mmx; c->perm_type = FF_IDCT_PERM_SIMPLE; } diff --git a/libavcodec/x86/simple_idct.c b/libavcodec/x86/simple_idct.c index 71763db..ded859e 100644 --- a/libavcodec/x86/simple_idct.c +++ b/libavcodec/x86/simple_idct.c @@ -84,7 +84,7 @@ DECLARE_ALIGNED(8, static const int16_t, coeffs)[]= { C3, -C1, C3, -C1 }; -static inline void idct(int16_t *block) +void ff_simple_idct_mmx(int16_t *block) { DECLARE_ALIGNED(8, int64_t, align_tmp)[16]; int16_t * const temp= (int16_t*)align_tmp; @@ -1152,22 +1152,4 @@ Temp ); } -void ff_simple_idct_mmx(int16_t *block) -{ - idct(block); -} - -//FIXME merge add/put into the idct - -void ff_simple_idct_put_mmx(uint8_t *dest, int line_size, int16_t *block) -{ - idct(block); - ff_put_pixels_clamped(block, dest, line_size); -} -void ff_simple_idct_add_mmx(uint8_t *dest, int line_size, int16_t *block) -{ - idct(block); - ff_add_pixels_clamped(block, dest, line_size); -} - #endif /* HAVE_INLINE_ASM */ -- 2.5.0 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel