Mercurial > libavcodec.hg
comparison armv4l/dsputil_arm.c @ 1347:cca26199ab17 libavcodec
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
author | al3x |
---|---|
date | Mon, 07 Jul 2003 11:19:18 +0000 |
parents | 7d328fd9d8a5 |
children | aeea63c97878 |
comparison
equal
deleted
inserted
replaced
1346:44c94325810c | 1347:cca26199ab17 |
---|---|
18 */ | 18 */ |
19 | 19 |
20 #include "../dsputil.h" | 20 #include "../dsputil.h" |
21 | 21 |
22 extern void j_rev_dct_ARM(DCTELEM *data); | 22 extern void j_rev_dct_ARM(DCTELEM *data); |
23 extern void simple_idct_ARM(DCTELEM *data); | |
23 | 24 |
24 /* XXX: local hack */ | 25 /* XXX: local hack */ |
25 static void (*ff_put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); | 26 static void (*ff_put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); |
26 static void (*ff_add_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); | 27 static void (*ff_add_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size); |
27 | 28 |
28 /* XXX: those functions should be suppressed ASAP when all IDCTs are | 29 /* XXX: those functions should be suppressed ASAP when all IDCTs are |
29 converted */ | 30 converted */ |
30 static void arm_idct_put(uint8_t *dest, int line_size, DCTELEM *block) | 31 static void j_rev_dct_ARM_put(uint8_t *dest, int line_size, DCTELEM *block) |
31 { | 32 { |
32 j_rev_dct_ARM (block); | 33 j_rev_dct_ARM (block); |
33 ff_put_pixels_clamped(block, dest, line_size); | 34 ff_put_pixels_clamped(block, dest, line_size); |
34 } | 35 } |
35 static void arm_idct_add(uint8_t *dest, int line_size, DCTELEM *block) | 36 static void j_rev_dct_ARM_add(uint8_t *dest, int line_size, DCTELEM *block) |
36 { | 37 { |
37 j_rev_dct_ARM (block); | 38 j_rev_dct_ARM (block); |
39 ff_add_pixels_clamped(block, dest, line_size); | |
40 } | |
41 static void simple_idct_ARM_put(uint8_t *dest, int line_size, DCTELEM *block) | |
42 { | |
43 simple_idct_ARM (block); | |
44 ff_put_pixels_clamped(block, dest, line_size); | |
45 } | |
46 static void simple_idct_ARM_add(uint8_t *dest, int line_size, DCTELEM *block) | |
47 { | |
48 simple_idct_ARM (block); | |
38 ff_add_pixels_clamped(block, dest, line_size); | 49 ff_add_pixels_clamped(block, dest, line_size); |
39 } | 50 } |
40 | 51 |
41 void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx) | 52 void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx) |
42 { | 53 { |
44 | 55 |
45 ff_put_pixels_clamped = c->put_pixels_clamped; | 56 ff_put_pixels_clamped = c->put_pixels_clamped; |
46 ff_add_pixels_clamped = c->add_pixels_clamped; | 57 ff_add_pixels_clamped = c->add_pixels_clamped; |
47 | 58 |
48 if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){ | 59 if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){ |
49 c->idct_put= arm_idct_put; | 60 c->idct_put= j_rev_dct_ARM_put; |
50 c->idct_add= arm_idct_add; | 61 c->idct_add= j_rev_dct_ARM_add; |
51 c->idct = j_rev_dct_ARM; | 62 c->idct = j_rev_dct_ARM; |
52 c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;/* FF_NO_IDCT_PERM */ | 63 c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;/* FF_NO_IDCT_PERM */ |
64 } else if (idct_algo==FF_IDCT_SIMPLEARM){ | |
65 c->idct_put= simple_idct_ARM_put; | |
66 c->idct_add= simple_idct_ARM_add; | |
67 c->idct = simple_idct_ARM; | |
68 c->idct_permutation_type= FF_NO_IDCT_PERM; | |
53 } | 69 } |
54 } | 70 } |