Commit 7d42886b authored by Måns Rullgård's avatar Måns Rullgård

ARMv6 SIMD IDCT

Originally committed as revision 7752 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 94d122e9
...@@ -355,6 +355,8 @@ OBJS-$(TARGET_IWMMXT) += armv4l/dsputil_iwmmxt.o \ ...@@ -355,6 +355,8 @@ OBJS-$(TARGET_IWMMXT) += armv4l/dsputil_iwmmxt.o \
ASM_OBJS-$(TARGET_ARMV5TE) += armv4l/simple_idct_armv5te.o \ ASM_OBJS-$(TARGET_ARMV5TE) += armv4l/simple_idct_armv5te.o \
armv4l/mpegvideo_armv5te.o \ armv4l/mpegvideo_armv5te.o \
ASM_OBJS-$(HAVE_ARMV6) += armv4l/simple_idct_armv6.o
# sun sparc # sun sparc
OBJS-$(TARGET_ARCH_SPARC) += sparc/dsputil_vis.o \ OBJS-$(TARGET_ARCH_SPARC) += sparc/dsputil_vis.o \
......
...@@ -35,6 +35,12 @@ extern void simple_idct_put_armv5te(uint8_t *dest, int line_size, ...@@ -35,6 +35,12 @@ extern void simple_idct_put_armv5te(uint8_t *dest, int line_size,
extern void simple_idct_add_armv5te(uint8_t *dest, int line_size, extern void simple_idct_add_armv5te(uint8_t *dest, int line_size,
DCTELEM *data); DCTELEM *data);
extern void ff_simple_idct_armv6(DCTELEM *data);
extern void ff_simple_idct_put_armv6(uint8_t *dest, int line_size,
DCTELEM *data);
extern void ff_simple_idct_add_armv6(uint8_t *dest, int line_size,
DCTELEM *data);
/* XXX: local hack */ /* XXX: local hack */
static void (*ff_put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); static void (*ff_put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size);
static void (*ff_add_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); static void (*ff_add_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size);
...@@ -206,6 +212,8 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx) ...@@ -206,6 +212,8 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx)
if(idct_algo == FF_IDCT_AUTO){ if(idct_algo == FF_IDCT_AUTO){
#if defined(HAVE_IPP) #if defined(HAVE_IPP)
idct_algo = FF_IDCT_IPP; idct_algo = FF_IDCT_IPP;
#elif defined(HAVE_ARMV6)
idct_algo = FF_IDCT_SIMPLEARMV6;
#elif defined(HAVE_ARMV5TE) #elif defined(HAVE_ARMV5TE)
idct_algo = FF_IDCT_SIMPLEARMV5TE; idct_algo = FF_IDCT_SIMPLEARMV5TE;
#else #else
...@@ -223,6 +231,13 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx) ...@@ -223,6 +231,13 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx)
c->idct_add= simple_idct_ARM_add; c->idct_add= simple_idct_ARM_add;
c->idct = simple_idct_ARM; c->idct = simple_idct_ARM;
c->idct_permutation_type= FF_NO_IDCT_PERM; c->idct_permutation_type= FF_NO_IDCT_PERM;
#ifdef HAVE_ARMV6
} else if (idct_algo==FF_IDCT_SIMPLEARMV6){
c->idct_put= ff_simple_idct_put_armv6;
c->idct_add= ff_simple_idct_add_armv6;
c->idct = ff_simple_idct_armv6;
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
#endif
#ifdef HAVE_ARMV5TE #ifdef HAVE_ARMV5TE
} else if (idct_algo==FF_IDCT_SIMPLEARMV5TE){ } else if (idct_algo==FF_IDCT_SIMPLEARMV5TE){
c->idct_put= simple_idct_put_armv5te; c->idct_put= simple_idct_put_armv5te;
......
This diff is collapsed.
...@@ -1234,6 +1234,7 @@ typedef struct AVCodecContext { ...@@ -1234,6 +1234,7 @@ typedef struct AVCodecContext {
#define FF_IDCT_XVIDMMX 14 #define FF_IDCT_XVIDMMX 14
#define FF_IDCT_CAVS 15 #define FF_IDCT_CAVS 15
#define FF_IDCT_SIMPLEARMV5TE 16 #define FF_IDCT_SIMPLEARMV5TE 16
#define FF_IDCT_SIMPLEARMV6 17
/** /**
* slice count. * slice count.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment