diff options
-rw-r--r-- | libavcodec/idctdsp.c | 2 | ||||
-rw-r--r-- | libavcodec/mpeg4videodec.c | 2 | ||||
-rw-r--r-- | libavcodec/x86/Makefile | 4 | ||||
-rw-r--r-- | libavcodec/x86/dct-test.c | 8 | ||||
-rw-r--r-- | libavcodec/x86/xvididct.h (renamed from libavcodec/x86/idct_xvid.h) | 24 | ||||
-rw-r--r-- | libavcodec/x86/xvididct_init.c | 23 | ||||
-rw-r--r-- | libavcodec/x86/xvididct_mmx.c (renamed from libavcodec/x86/idct_mmx_xvid.c) | 24 | ||||
-rw-r--r-- | libavcodec/x86/xvididct_sse2.c (renamed from libavcodec/x86/idct_sse2_xvid.c) | 13 | ||||
-rw-r--r-- | libavcodec/xvididct.c | 4 | ||||
-rw-r--r-- | libavcodec/xvididct.h | 4 |
10 files changed, 56 insertions, 52 deletions
diff --git a/libavcodec/idctdsp.c b/libavcodec/idctdsp.c index f139bacc0f..8311fab92f 100644 --- a/libavcodec/idctdsp.c +++ b/libavcodec/idctdsp.c @@ -301,7 +301,7 @@ av_cold void ff_idctdsp_init(IDCTDSPContext *c, AVCodecContext *avctx) c->add_pixels_clamped = ff_add_pixels_clamped; if (CONFIG_MPEG4_DECODER && avctx->idct_algo == FF_IDCT_XVID) - ff_xvididct_init(c, avctx); + ff_xvid_idct_init(c, avctx); if (ARCH_ALPHA) ff_idctdsp_init_alpha(c, avctx, high_bit_depth); diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 56661b4203..5a36c17543 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -2697,7 +2697,7 @@ static int mpeg4_update_thread_context(AVCodecContext *dst, memcpy(((uint8_t*)s) + sizeof(MpegEncContext), ((uint8_t*)s1) + sizeof(MpegEncContext), sizeof(Mpeg4DecContext) - sizeof(MpegEncContext)); if (CONFIG_MPEG4_DECODER && !init && s1->xvid_build >= 0) - ff_xvididct_init(&s->m.idsp, dst); + ff_xvid_idct_init(&s->m.idsp, dst); return 0; } diff --git a/libavcodec/x86/Makefile b/libavcodec/x86/Makefile index fbb9abfa2f..7bf0e82ac0 100644 --- a/libavcodec/x86/Makefile +++ b/libavcodec/x86/Makefile @@ -70,8 +70,8 @@ MMX-OBJS-$(CONFIG_IDCTDSP) += x86/idctdsp_mmx.o \ x86/simple_idct.o # decoders/encoders -MMX-OBJS-$(CONFIG_MPEG4_DECODER) += x86/idct_mmx_xvid.o \ - x86/idct_sse2_xvid.o +MMX-OBJS-$(CONFIG_MPEG4_DECODER) += x86/xvididct_mmx.o \ + x86/xvididct_sse2.o MMX-OBJS-$(CONFIG_SNOW_DECODER) += x86/snowdsp.o MMX-OBJS-$(CONFIG_SNOW_ENCODER) += x86/snowdsp.o MMX-OBJS-$(CONFIG_VC1_DECODER) += x86/vc1dsp_mmx.o diff --git a/libavcodec/x86/dct-test.c b/libavcodec/x86/dct-test.c index 3ade1f3ce4..3414cb0cb0 100644 --- a/libavcodec/x86/dct-test.c +++ b/libavcodec/x86/dct-test.c @@ -19,7 +19,7 @@ #include "config.h" #include "fdct.h" -#include "idct_xvid.h" +#include "xvididct.h" #include "simple_idct.h" #if ARCH_X86_64 && HAVE_MMX && HAVE_YASM @@ -62,13 +62,13 @@ static const struct algo idct_tab_arch[] = { #endif #if CONFIG_MPEG4_DECODER #if HAVE_MMX_INLINE - { "XVID-MMX", ff_idct_xvid_mmx, FF_IDCT_PERM_NONE, AV_CPU_FLAG_MMX, 1 }, + { "XVID-MMX", ff_xvid_idct_mmx, FF_IDCT_PERM_NONE, AV_CPU_FLAG_MMX, 1 }, #endif #if HAVE_MMXEXT_INLINE - { "XVID-MMXEXT", ff_idct_xvid_mmxext, FF_IDCT_PERM_NONE, AV_CPU_FLAG_MMXEXT, 1 }, + { "XVID-MMXEXT", ff_xvid_idct_mmxext, FF_IDCT_PERM_NONE, AV_CPU_FLAG_MMXEXT, 1 }, #endif #if HAVE_SSE2_INLINE - { "XVID-SSE2", ff_idct_xvid_sse2, FF_IDCT_PERM_SSE2, AV_CPU_FLAG_SSE2, 1 }, + { "XVID-SSE2", ff_xvid_idct_sse2, FF_IDCT_PERM_SSE2, AV_CPU_FLAG_SSE2, 1 }, #if ARCH_X86_64 && HAVE_YASM { "PR-SSE2", ff_prores_idct_put_10_sse2_wrap, FF_IDCT_PERM_TRANSPOSE, AV_CPU_FLAG_SSE2, 1 }, #endif diff --git a/libavcodec/x86/idct_xvid.h b/libavcodec/x86/xvididct.h index 7a2847b864..e8586fe524 100644 --- a/libavcodec/x86/idct_xvid.h +++ b/libavcodec/x86/xvididct.h @@ -23,21 +23,21 @@ * header for Xvid IDCT functions */ -#ifndef AVCODEC_X86_IDCT_XVID_H -#define AVCODEC_X86_IDCT_XVID_H +#ifndef AVCODEC_X86_XVIDIDCT_H +#define AVCODEC_X86_XVIDIDCT_H #include <stdint.h> -void ff_idct_xvid_mmx(short *block); -void ff_idct_xvid_mmx_put(uint8_t *dest, int line_size, int16_t *block); -void ff_idct_xvid_mmx_add(uint8_t *dest, int line_size, int16_t *block); +void ff_xvid_idct_mmx(short *block); +void ff_xvid_idct_mmx_put(uint8_t *dest, int line_size, int16_t *block); +void ff_xvid_idct_mmx_add(uint8_t *dest, int line_size, int16_t *block); -void ff_idct_xvid_mmxext(short *block); -void ff_idct_xvid_mmxext_put(uint8_t *dest, int line_size, int16_t *block); -void ff_idct_xvid_mmxext_add(uint8_t *dest, int line_size, int16_t *block); +void ff_xvid_idct_mmxext(short *block); +void ff_xvid_idct_mmxext_put(uint8_t *dest, int line_size, int16_t *block); +void ff_xvid_idct_mmxext_add(uint8_t *dest, int line_size, int16_t *block); -void ff_idct_xvid_sse2(short *block); -void ff_idct_xvid_sse2_put(uint8_t *dest, int line_size, short *block); -void ff_idct_xvid_sse2_add(uint8_t *dest, int line_size, short *block); +void ff_xvid_idct_sse2(short *block); +void ff_xvid_idct_sse2_put(uint8_t *dest, int line_size, short *block); +void ff_xvid_idct_sse2_add(uint8_t *dest, int line_size, short *block); -#endif /* AVCODEC_X86_IDCT_XVID_H */ +#endif /* AVCODEC_X86_XVIDIDCT_H */ diff --git a/libavcodec/x86/xvididct_init.c b/libavcodec/x86/xvididct_init.c index c9838e3224..be0f700766 100644 --- a/libavcodec/x86/xvididct_init.c +++ b/libavcodec/x86/xvididct_init.c @@ -22,31 +22,32 @@ #include "libavutil/x86/cpu.h" #include "libavcodec/idctdsp.h" #include "libavcodec/xvididct.h" -#include "idct_xvid.h" + #include "idctdsp.h" +#include "xvididct.h" -av_cold void ff_xvididct_init_x86(IDCTDSPContext *c) +av_cold void ff_xvid_idct_init_x86(IDCTDSPContext *c) { int cpu_flags = av_get_cpu_flags(); if (INLINE_MMX(cpu_flags)) { - c->idct_put = ff_idct_xvid_mmx_put; - c->idct_add = ff_idct_xvid_mmx_add; - c->idct = ff_idct_xvid_mmx; + c->idct_put = ff_xvid_idct_mmx_put; + c->idct_add = ff_xvid_idct_mmx_add; + c->idct = ff_xvid_idct_mmx; c->perm_type = FF_IDCT_PERM_NONE; } if (INLINE_MMXEXT(cpu_flags)) { - c->idct_put = ff_idct_xvid_mmxext_put; - c->idct_add = ff_idct_xvid_mmxext_add; - c->idct = ff_idct_xvid_mmxext; + c->idct_put = ff_xvid_idct_mmxext_put; + c->idct_add = ff_xvid_idct_mmxext_add; + c->idct = ff_xvid_idct_mmxext; c->perm_type = FF_IDCT_PERM_NONE; } if (INLINE_SSE2(cpu_flags)) { - c->idct_put = ff_idct_xvid_sse2_put; - c->idct_add = ff_idct_xvid_sse2_add; - c->idct = ff_idct_xvid_sse2; + c->idct_put = ff_xvid_idct_sse2_put; + c->idct_add = ff_xvid_idct_sse2_add; + c->idct = ff_xvid_idct_sse2; c->perm_type = FF_IDCT_PERM_SSE2; } } diff --git a/libavcodec/x86/idct_mmx_xvid.c b/libavcodec/x86/xvididct_mmx.c index ecb6dc4659..55ad1df54f 100644 --- a/libavcodec/x86/idct_mmx_xvid.c +++ b/libavcodec/x86/xvididct_mmx.c @@ -44,8 +44,9 @@ #include "config.h" #include "libavcodec/avcodec.h" #include "libavutil/mem.h" -#include "idct_xvid.h" + #include "idctdsp.h" +#include "xvididct.h" #if HAVE_MMX_INLINE @@ -472,7 +473,8 @@ DECLARE_ALIGNED(8, static const int16_t, tab_i_04_xmm)[32*4] = { //----------------------------------------------------------------------------- -void ff_idct_xvid_mmx(short *block){ +void ff_xvid_idct_mmx(short *block) +{ __asm__ volatile( //# Process each row DCT_8_INV_ROW_MMX(0*16(%0), 0*16(%0), 64*0(%2), 8*0(%1)) @@ -490,15 +492,15 @@ __asm__ volatile( :: "r"(block), "r"(rounder_0), "r"(tab_i_04_mmx), "r"(tg_1_16)); } -void ff_idct_xvid_mmx_put(uint8_t *dest, int line_size, int16_t *block) +void ff_xvid_idct_mmx_put(uint8_t *dest, int line_size, int16_t *block) { - ff_idct_xvid_mmx(block); + ff_xvid_idct_mmx(block); ff_put_pixels_clamped_mmx(block, dest, line_size); } -void ff_idct_xvid_mmx_add(uint8_t *dest, int line_size, int16_t *block) +void ff_xvid_idct_mmx_add(uint8_t *dest, int line_size, int16_t *block) { - ff_idct_xvid_mmx(block); + ff_xvid_idct_mmx(block); ff_add_pixels_clamped_mmx(block, dest, line_size); } @@ -511,7 +513,7 @@ void ff_idct_xvid_mmx_add(uint8_t *dest, int line_size, int16_t *block) //----------------------------------------------------------------------------- -void ff_idct_xvid_mmxext(short *block) +void ff_xvid_idct_mmxext(short *block) { __asm__ volatile( //# Process each row @@ -530,15 +532,15 @@ __asm__ volatile( :: "r"(block), "r"(rounder_0), "r"(tab_i_04_xmm), "r"(tg_1_16)); } -void ff_idct_xvid_mmxext_put(uint8_t *dest, int line_size, int16_t *block) +void ff_xvid_idct_mmxext_put(uint8_t *dest, int line_size, int16_t *block) { - ff_idct_xvid_mmxext(block); + ff_xvid_idct_mmxext(block); ff_put_pixels_clamped_mmx(block, dest, line_size); } -void ff_idct_xvid_mmxext_add(uint8_t *dest, int line_size, int16_t *block) +void ff_xvid_idct_mmxext_add(uint8_t *dest, int line_size, int16_t *block) { - ff_idct_xvid_mmxext(block); + ff_xvid_idct_mmxext(block); ff_add_pixels_clamped_mmx(block, dest, line_size); } diff --git a/libavcodec/x86/idct_sse2_xvid.c b/libavcodec/x86/xvididct_sse2.c index f3f4d38994..508458eafb 100644 --- a/libavcodec/x86/idct_sse2_xvid.c +++ b/libavcodec/x86/xvididct_sse2.c @@ -40,8 +40,9 @@ #include "libavutil/mem.h" #include "libavutil/x86/asm.h" -#include "idct_xvid.h" + #include "idctdsp.h" +#include "xvididct.h" #if HAVE_SSE2_INLINE @@ -340,7 +341,7 @@ DECLARE_ASM_CONST(16, int32_t, walkenIdctRounders)[] = { "movdqa %%xmm6, 4*16("dct") \n\t" \ "movdqa "SREG2", 7*16("dct") \n\t" -av_extern_inline void ff_idct_xvid_sse2(short *block) +av_extern_inline void ff_xvid_idct_sse2(short *block) { __asm__ volatile( "movq "MANGLE(m127)", %%mm0 \n\t" @@ -389,15 +390,15 @@ av_extern_inline void ff_idct_xvid_sse2(short *block) ); } -void ff_idct_xvid_sse2_put(uint8_t *dest, int line_size, short *block) +void ff_xvid_idct_sse2_put(uint8_t *dest, int line_size, short *block) { - ff_idct_xvid_sse2(block); + ff_xvid_idct_sse2(block); ff_put_pixels_clamped_mmx(block, dest, line_size); } -void ff_idct_xvid_sse2_add(uint8_t *dest, int line_size, short *block) +void ff_xvid_idct_sse2_add(uint8_t *dest, int line_size, short *block) { - ff_idct_xvid_sse2(block); + ff_xvid_idct_sse2(block); ff_add_pixels_clamped_mmx(block, dest, line_size); } diff --git a/libavcodec/xvididct.c b/libavcodec/xvididct.c index d781f7903d..9f3dab805c 100644 --- a/libavcodec/xvididct.c +++ b/libavcodec/xvididct.c @@ -34,7 +34,7 @@ static void idct_xvid_add(uint8_t *dest, int line_size, int16_t *block) ff_add_pixels_clamped(block, dest, line_size); } -av_cold void ff_xvididct_init(IDCTDSPContext *c, AVCodecContext *avctx) +av_cold void ff_xvid_idct_init(IDCTDSPContext *c, AVCodecContext *avctx) { const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8; @@ -51,7 +51,7 @@ av_cold void ff_xvididct_init(IDCTDSPContext *c, AVCodecContext *avctx) } if (ARCH_X86) - ff_xvididct_init_x86(c); + ff_xvid_idct_init_x86(c); ff_init_scantable_permutation(c->idct_permutation, c->perm_type); } diff --git a/libavcodec/xvididct.h b/libavcodec/xvididct.h index 1b95cb752c..b0233c342c 100644 --- a/libavcodec/xvididct.h +++ b/libavcodec/xvididct.h @@ -22,9 +22,9 @@ #include "avcodec.h" #include "idctdsp.h" -void ff_xvididct_init(IDCTDSPContext *c, AVCodecContext *avctx); +void ff_xvid_idct_init(IDCTDSPContext *c, AVCodecContext *avctx); -void ff_xvididct_init_x86(IDCTDSPContext *c); +void ff_xvid_idct_init_x86(IDCTDSPContext *c); void ff_idct_xvid(int16_t *const In); |