annotate armv4l/dsputil_arm.c @ 2518:2c794e3903a2 libavcodec

- renaming the AC coding set variable names to more meaningful ones - removed old MB decoding functions, and moved around macros to be used in the previously unused code, which match better msmpeg4.c/whole MPV framework - cleaned (not yet functionnal, lots missing) DC prediction - trying to pass the proper coded status to block decoder patch by anonymous
author michael
date Wed, 23 Feb 2005 17:24:17 +0000
parents cca26199ab17
children aeea63c97878
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
1 /*
fefaa96def6e arm specific code
glantau
parents:
diff changeset
2 * ARMv4L optimized DSP utils
fefaa96def6e arm specific code
glantau
parents:
diff changeset
3 * Copyright (c) 2001 Lionel Ulmer.
fefaa96def6e arm specific code
glantau
parents:
diff changeset
4 *
429
718a22dc121f license/copyright change
glantau
parents: 61
diff changeset
5 * This library is free software; you can redistribute it and/or
718a22dc121f license/copyright change
glantau
parents: 61
diff changeset
6 * modify it under the terms of the GNU Lesser General Public
718a22dc121f license/copyright change
glantau
parents: 61
diff changeset
7 * License as published by the Free Software Foundation; either
718a22dc121f license/copyright change
glantau
parents: 61
diff changeset
8 * version 2 of the License, or (at your option) any later version.
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
9 *
429
718a22dc121f license/copyright change
glantau
parents: 61
diff changeset
10 * This library is distributed in the hope that it will be useful,
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
429
718a22dc121f license/copyright change
glantau
parents: 61
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
718a22dc121f license/copyright change
glantau
parents: 61
diff changeset
13 * Lesser General Public License for more details.
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
14 *
429
718a22dc121f license/copyright change
glantau
parents: 61
diff changeset
15 * You should have received a copy of the GNU Lesser General Public
718a22dc121f license/copyright change
glantau
parents: 61
diff changeset
16 * License along with this library; if not, write to the Free Software
718a22dc121f license/copyright change
glantau
parents: 61
diff changeset
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
18 */
fefaa96def6e arm specific code
glantau
parents:
diff changeset
19
fefaa96def6e arm specific code
glantau
parents:
diff changeset
20 #include "../dsputil.h"
fefaa96def6e arm specific code
glantau
parents:
diff changeset
21
fefaa96def6e arm specific code
glantau
parents:
diff changeset
22 extern void j_rev_dct_ARM(DCTELEM *data);
1347
cca26199ab17 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
al3x
parents: 1324
diff changeset
23 extern void simple_idct_ARM(DCTELEM *data);
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
24
1092
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
25 /* XXX: local hack */
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
26 static void (*ff_put_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size);
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
27 static void (*ff_add_pixels_clamped)(const DCTELEM *block, uint8_t *pixels, int line_size);
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
28
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
29 /* XXX: those functions should be suppressed ASAP when all IDCTs are
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
30 converted */
1347
cca26199ab17 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
al3x
parents: 1324
diff changeset
31 static void j_rev_dct_ARM_put(uint8_t *dest, int line_size, DCTELEM *block)
1092
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
32 {
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
33 j_rev_dct_ARM (block);
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
34 ff_put_pixels_clamped(block, dest, line_size);
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
35 }
1347
cca26199ab17 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
al3x
parents: 1324
diff changeset
36 static void j_rev_dct_ARM_add(uint8_t *dest, int line_size, DCTELEM *block)
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
37 {
1092
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
38 j_rev_dct_ARM (block);
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
39 ff_add_pixels_clamped(block, dest, line_size);
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
40 }
1347
cca26199ab17 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
al3x
parents: 1324
diff changeset
41 static void simple_idct_ARM_put(uint8_t *dest, int line_size, DCTELEM *block)
cca26199ab17 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
al3x
parents: 1324
diff changeset
42 {
cca26199ab17 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
al3x
parents: 1324
diff changeset
43 simple_idct_ARM (block);
cca26199ab17 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
al3x
parents: 1324
diff changeset
44 ff_put_pixels_clamped(block, dest, line_size);
cca26199ab17 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
al3x
parents: 1324
diff changeset
45 }
cca26199ab17 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
al3x
parents: 1324
diff changeset
46 static void simple_idct_ARM_add(uint8_t *dest, int line_size, DCTELEM *block)
cca26199ab17 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
al3x
parents: 1324
diff changeset
47 {
cca26199ab17 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
al3x
parents: 1324
diff changeset
48 simple_idct_ARM (block);
cca26199ab17 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
al3x
parents: 1324
diff changeset
49 ff_add_pixels_clamped(block, dest, line_size);
cca26199ab17 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
al3x
parents: 1324
diff changeset
50 }
1092
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
51
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
52 void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx)
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
53 {
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
54 const int idct_algo= avctx->idct_algo;
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
55
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
56 ff_put_pixels_clamped = c->put_pixels_clamped;
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
57 ff_add_pixels_clamped = c->add_pixels_clamped;
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
58
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
59 if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){
1347
cca26199ab17 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
al3x
parents: 1324
diff changeset
60 c->idct_put= j_rev_dct_ARM_put;
cca26199ab17 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
al3x
parents: 1324
diff changeset
61 c->idct_add= j_rev_dct_ARM_add;
cca26199ab17 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
al3x
parents: 1324
diff changeset
62 c->idct = j_rev_dct_ARM;
1092
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
63 c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;/* FF_NO_IDCT_PERM */
1347
cca26199ab17 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
al3x
parents: 1324
diff changeset
64 } else if (idct_algo==FF_IDCT_SIMPLEARM){
cca26199ab17 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
al3x
parents: 1324
diff changeset
65 c->idct_put= simple_idct_ARM_put;
cca26199ab17 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
al3x
parents: 1324
diff changeset
66 c->idct_add= simple_idct_ARM_add;
cca26199ab17 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
al3x
parents: 1324
diff changeset
67 c->idct = simple_idct_ARM;
cca26199ab17 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
al3x
parents: 1324
diff changeset
68 c->idct_permutation_type= FF_NO_IDCT_PERM;
1092
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
69 }
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
70 }