annotate armv4l/dsputil_arm.c @ 1265:09165461996f libavcodec

optimize
author michaelni
date Thu, 15 May 2003 00:43:43 +0000
parents f59c3f66363b
children 7d328fd9d8a5
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);
fefaa96def6e arm specific code
glantau
parents:
diff changeset
23
1092
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
24 /* XXX: local hack */
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
25 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
26 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
27
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
28 /* XXX: those functions should be suppressed ASAP when all IDCTs are
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
29 converted */
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
30 static void arm_idct_put(uint8_t *dest, int line_size, DCTELEM *block)
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
31 {
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
32 j_rev_dct_ARM (block);
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
33 ff_put_pixels_clamped(block, dest, line_size);
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
34 }
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
35 static void arm_idct_add(uint8_t *dest, int line_size, DCTELEM *block)
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
36 {
1092
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
37 j_rev_dct_ARM (block);
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
38 ff_add_pixels_clamped(block, dest, line_size);
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
39 }
1092
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
40
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
41 void dsputil_init_armv4l(DSPContext* c, AVCodecContext *avctx)
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
42 {
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
43 const int idct_algo= avctx->idct_algo;
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
44
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
45 ff_put_pixels_clamped = c->put_pixels_clamped;
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
46 ff_add_pixels_clamped = c->add_pixels_clamped;
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
47
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
48 if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
49 c->idct_put= arm_idct_put;
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
50 c->idct_add= arm_idct_add;
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
51 c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;/* FF_NO_IDCT_PERM */
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
52 }
f59c3f66363b MpegEncContext.(i)dct_* -> DspContext.(i)dct_*
michaelni
parents: 874
diff changeset
53 }