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

ARM: NEON optimised simple_idct

Originally committed as revision 16146 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 569f5a75
...@@ -450,6 +450,7 @@ OBJS-$(HAVE_IWMMXT) += armv4l/dsputil_iwmmxt.o \ ...@@ -450,6 +450,7 @@ OBJS-$(HAVE_IWMMXT) += armv4l/dsputil_iwmmxt.o \
OBJS-$(HAVE_NEON) += armv4l/dsputil_neon.o \ OBJS-$(HAVE_NEON) += armv4l/dsputil_neon.o \
armv4l/dsputil_neon_s.o \ armv4l/dsputil_neon_s.o \
armv4l/simple_idct_neon.o \
OBJS-$(ARCH_BFIN) += bfin/dsputil_bfin.o \ OBJS-$(ARCH_BFIN) += bfin/dsputil_bfin.o \
bfin/fdct_bfin.o \ bfin/fdct_bfin.o \
......
...@@ -39,6 +39,10 @@ void ff_simple_idct_armv6(DCTELEM *data); ...@@ -39,6 +39,10 @@ void ff_simple_idct_armv6(DCTELEM *data);
void ff_simple_idct_put_armv6(uint8_t *dest, int line_size, DCTELEM *data); void ff_simple_idct_put_armv6(uint8_t *dest, int line_size, DCTELEM *data);
void ff_simple_idct_add_armv6(uint8_t *dest, int line_size, DCTELEM *data); void ff_simple_idct_add_armv6(uint8_t *dest, int line_size, DCTELEM *data);
void ff_simple_idct_neon(DCTELEM *data);
void ff_simple_idct_put_neon(uint8_t *dest, int line_size, DCTELEM *data);
void ff_simple_idct_add_neon(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);
...@@ -128,6 +132,8 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx) ...@@ -128,6 +132,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_NEON)
idct_algo = FF_IDCT_SIMPLENEON;
#elif defined(HAVE_ARMV6) #elif defined(HAVE_ARMV6)
idct_algo = FF_IDCT_SIMPLEARMV6; idct_algo = FF_IDCT_SIMPLEARMV6;
#elif defined(HAVE_ARMV5TE) #elif defined(HAVE_ARMV5TE)
...@@ -167,6 +173,13 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx) ...@@ -167,6 +173,13 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx)
c->idct_add= simple_idct_ipp_add; c->idct_add= simple_idct_ipp_add;
c->idct = simple_idct_ipp; c->idct = simple_idct_ipp;
c->idct_permutation_type= FF_NO_IDCT_PERM; c->idct_permutation_type= FF_NO_IDCT_PERM;
#endif
#ifdef HAVE_NEON
} else if (idct_algo==FF_IDCT_SIMPLENEON){
c->idct_put= ff_simple_idct_put_neon;
c->idct_add= ff_simple_idct_add_neon;
c->idct = ff_simple_idct_neon;
c->idct_permutation_type = FF_PARTTRANS_IDCT_PERM;
#endif #endif
} }
} }
......
This diff is collapsed.
...@@ -1390,6 +1390,7 @@ typedef struct AVCodecContext { ...@@ -1390,6 +1390,7 @@ typedef struct AVCodecContext {
#define FF_IDCT_WMV2 19 #define FF_IDCT_WMV2 19
#define FF_IDCT_FAAN 20 #define FF_IDCT_FAAN 20
#define FF_IDCT_EA 21 #define FF_IDCT_EA 21
#define FF_IDCT_SIMPLENEON 22
/** /**
* slice count * slice count
......
...@@ -564,6 +564,7 @@ static const AVOption options[]={ ...@@ -564,6 +564,7 @@ static const AVOption options[]={
{"simplearm", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_SIMPLEARM, INT_MIN, INT_MAX, V|E|D, "idct"}, {"simplearm", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_SIMPLEARM, INT_MIN, INT_MAX, V|E|D, "idct"},
{"simplearmv5te", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_SIMPLEARMV5TE, INT_MIN, INT_MAX, V|E|D, "idct"}, {"simplearmv5te", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_SIMPLEARMV5TE, INT_MIN, INT_MAX, V|E|D, "idct"},
{"simplearmv6", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_SIMPLEARMV6, INT_MIN, INT_MAX, V|E|D, "idct"}, {"simplearmv6", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_SIMPLEARMV6, INT_MIN, INT_MAX, V|E|D, "idct"},
{"simpleneon", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_SIMPLENEON, INT_MIN, INT_MAX, V|E|D, "idct"},
{"h264", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_H264, INT_MIN, INT_MAX, V|E|D, "idct"}, {"h264", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_H264, INT_MIN, INT_MAX, V|E|D, "idct"},
{"vp3", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_VP3, INT_MIN, INT_MAX, V|E|D, "idct"}, {"vp3", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_VP3, INT_MIN, INT_MAX, V|E|D, "idct"},
{"ipp", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_IPP, INT_MIN, INT_MAX, V|E|D, "idct"}, {"ipp", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_IPP, INT_MIN, INT_MAX, V|E|D, "idct"},
......
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