diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2003-07-07 11:19:18 +0000 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2003-07-07 11:19:18 +0000 |
commit | bd7d1ea76b6ee70a1b116a49f381b6efc9cc6ad9 (patch) | |
tree | c6467b049b704384d2265099fea7ddec540db7ab /libavcodec/armv4l/dsputil_arm.c | |
parent | e0560448249e3b5cd9961fb1e376de0731ac0e5e (diff) | |
download | ffmpeg-bd7d1ea76b6ee70a1b116a49f381b6efc9cc6ad9.tar.gz |
Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>. Currently licensed under the GPLv2, but the author allowed to license it under the LGPL, feel free to change
Originally committed as revision 2017 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/armv4l/dsputil_arm.c')
-rw-r--r-- | libavcodec/armv4l/dsputil_arm.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/libavcodec/armv4l/dsputil_arm.c b/libavcodec/armv4l/dsputil_arm.c index 74eb96961a..ff61097d73 100644 --- a/libavcodec/armv4l/dsputil_arm.c +++ b/libavcodec/armv4l/dsputil_arm.c @@ -20,6 +20,7 @@ #include "../dsputil.h" extern void j_rev_dct_ARM(DCTELEM *data); +extern void simple_idct_ARM(DCTELEM *data); /* XXX: local hack */ static void (*ff_put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); @@ -27,16 +28,26 @@ static void (*ff_add_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int /* XXX: those functions should be suppressed ASAP when all IDCTs are converted */ -static void arm_idct_put(uint8_t *dest, int line_size, DCTELEM *block) +static void j_rev_dct_ARM_put(uint8_t *dest, int line_size, DCTELEM *block) { j_rev_dct_ARM (block); ff_put_pixels_clamped(block, dest, line_size); } -static void arm_idct_add(uint8_t *dest, int line_size, DCTELEM *block) +static void j_rev_dct_ARM_add(uint8_t *dest, int line_size, DCTELEM *block) { j_rev_dct_ARM (block); ff_add_pixels_clamped(block, dest, line_size); } +static void simple_idct_ARM_put(uint8_t *dest, int line_size, DCTELEM *block) +{ + simple_idct_ARM (block); + ff_put_pixels_clamped(block, dest, line_size); +} +static void simple_idct_ARM_add(uint8_t *dest, int line_size, DCTELEM *block) +{ + simple_idct_ARM (block); + ff_add_pixels_clamped(block, dest, line_size); +} void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx) { @@ -46,9 +57,14 @@ void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx) ff_add_pixels_clamped = c->add_pixels_clamped; if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){ - c->idct_put= arm_idct_put; - c->idct_add= arm_idct_add; - c->idct = j_rev_dct_ARM; + c->idct_put= j_rev_dct_ARM_put; + c->idct_add= j_rev_dct_ARM_add; + c->idct = j_rev_dct_ARM; c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;/* FF_NO_IDCT_PERM */ + } else if (idct_algo==FF_IDCT_SIMPLEARM){ + c->idct_put= simple_idct_ARM_put; + c->idct_add= simple_idct_ARM_add; + c->idct = simple_idct_ARM; + c->idct_permutation_type= FF_NO_IDCT_PERM; } } |