Mercurial > libavcodec.hg
annotate armv4l/dsputil_arm.c @ 1324:7d328fd9d8a5 libavcodec
the return of the idct with 16bit output by ("Ivan Kalvachev" <ivan at cacad dot com>)
author | michaelni |
---|---|
date | Sat, 21 Jun 2003 01:11:31 +0000 |
parents | f59c3f66363b |
children | cca26199ab17 |
rev | line source |
---|---|
61 | 1 /* |
2 * ARMv4L optimized DSP utils | |
3 * Copyright (c) 2001 Lionel Ulmer. | |
4 * | |
429 | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Lesser General Public | |
7 * License as published by the Free Software Foundation; either | |
8 * version 2 of the License, or (at your option) any later version. | |
61 | 9 * |
429 | 10 * This library is distributed in the hope that it will be useful, |
61 | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
429 | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Lesser General Public License for more details. | |
61 | 14 * |
429 | 15 * You should have received a copy of the GNU Lesser General Public |
16 * License along with this library; if not, write to the Free Software | |
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
61 | 18 */ |
19 | |
20 #include "../dsputil.h" | |
21 | |
22 extern void j_rev_dct_ARM(DCTELEM *data); | |
23 | |
1092 | 24 /* XXX: local hack */ |
25 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 | |
28 /* XXX: those functions should be suppressed ASAP when all IDCTs are | |
29 converted */ | |
30 static void arm_idct_put(uint8_t *dest, int line_size, DCTELEM *block) | |
31 { | |
32 j_rev_dct_ARM (block); | |
33 ff_put_pixels_clamped(block, dest, line_size); | |
34 } | |
35 static void arm_idct_add(uint8_t *dest, int line_size, DCTELEM *block) | |
61 | 36 { |
1092 | 37 j_rev_dct_ARM (block); |
38 ff_add_pixels_clamped(block, dest, line_size); | |
61 | 39 } |
1092 | 40 |
41 void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx) | |
42 { | |
43 const int idct_algo= avctx->idct_algo; | |
44 | |
45 ff_put_pixels_clamped = c->put_pixels_clamped; | |
46 ff_add_pixels_clamped = c->add_pixels_clamped; | |
47 | |
48 if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){ | |
49 c->idct_put= arm_idct_put; | |
50 c->idct_add= arm_idct_add; | |
1324
7d328fd9d8a5
the return of the idct with 16bit output by ("Ivan Kalvachev" <ivan at cacad dot com>)
michaelni
parents:
1092
diff
changeset
|
51 c->idct = j_rev_dct_ARM; |
1092 | 52 c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;/* FF_NO_IDCT_PERM */ |
53 } | |
54 } |