Commit a0403006 authored by Måns Rullgård's avatar Måns Rullgård

ARMv5TE optimized IDCT

Originally committed as revision 6347 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent e2887363
......@@ -325,6 +325,7 @@ OBJS-$(TARGET_ARCH_ARMV4L) += armv4l/dsputil_arm.o \
armv4l/mpegvideo_arm.o
OBJS-$(TARGET_IWMMXT) += armv4l/dsputil_iwmmxt.o \
armv4l/mpegvideo_iwmmxt.o
ASM_OBJS-$(TARGET_ARMV5TE) += armv4l/simple_idct_armv5te.o
# sun sparc
OBJS-$(TARGET_ARCH_SPARC) += sparc/dsputil_vis.o
......
......@@ -27,6 +27,12 @@ extern void dsputil_init_iwmmxt(DSPContext* c, AVCodecContext *avctx);
extern void j_rev_dct_ARM(DCTELEM *data);
extern void simple_idct_ARM(DCTELEM *data);
extern void simple_idct_armv5te(DCTELEM *data);
extern void simple_idct_put_armv5te(uint8_t *dest, int line_size,
DCTELEM *data);
extern void simple_idct_add_armv5te(uint8_t *dest, int line_size,
DCTELEM *data);
/* XXX: local hack */
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);
......@@ -196,8 +202,10 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx)
ff_add_pixels_clamped = c->add_pixels_clamped;
if(idct_algo == FF_IDCT_AUTO){
#ifdef HAVE_IPP
#if defined(HAVE_IPP)
idct_algo = FF_IDCT_IPP;
#elif defined(HAVE_ARMV5TE)
idct_algo = FF_IDCT_SIMPLEARMV5TE;
#else
idct_algo = FF_IDCT_ARM;
#endif
......@@ -213,6 +221,13 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx)
c->idct_add= simple_idct_ARM_add;
c->idct = simple_idct_ARM;
c->idct_permutation_type= FF_NO_IDCT_PERM;
#ifdef HAVE_ARMV5TE
} else if (idct_algo==FF_IDCT_SIMPLEARMV5TE){
c->idct_put= simple_idct_put_armv5te;
c->idct_add= simple_idct_add_armv5te;
c->idct = simple_idct_armv5te;
c->idct_permutation_type = FF_NO_IDCT_PERM;
#endif
#ifdef HAVE_IPP
} else if (idct_algo==FF_IDCT_IPP){
c->idct_put= simple_idct_ipp_put;
......
This diff is collapsed.
......@@ -1218,6 +1218,7 @@ typedef struct AVCodecContext {
#define FF_IDCT_IPP 13
#define FF_IDCT_XVIDMMX 14
#define FF_IDCT_CAVS 15
#define FF_IDCT_SIMPLEARMV5TE 16
/**
* slice count.
......
......@@ -564,6 +564,7 @@ static const AVOption options[]={
{"altivec", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_ALTIVEC, INT_MIN, INT_MAX, V|E|D, "idct"},
{"sh4", NULL, 0, FF_OPT_TYPE_CONST, FF_IDCT_SH4, 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"},
{"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"},
{"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