Commit bd7d1ea7 authored by Alex Beregszaszi's avatar Alex Beregszaszi

Optimized simple idct for arm by Frederic 'dilb' Boulay <dilb@handhelds.org>....

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
parent e0560448
......@@ -95,7 +95,7 @@ endif
# armv4l specific stuff
ifeq ($(TARGET_ARCH_ARMV4L),yes)
ASM_OBJS += armv4l/jrevdct_arm.o
ASM_OBJS += armv4l/jrevdct_arm.o armv4l/simple_idct_arm.o
OBJS += armv4l/dsputil_arm.o armv4l/mpegvideo_arm.o
endif
......
......@@ -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;
}
}
This diff is collapsed.
......@@ -856,6 +856,7 @@ typedef struct AVCodecContext {
#define FF_IDCT_ARM 7
#define FF_IDCT_ALTIVEC 8
#define FF_IDCT_SH4 9
#define FF_IDCT_SIMPLEARM 10
/**
* 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