730
|
1 /*
|
|
2 * Copyright (c) 2002 Michael Niedermayer
|
|
3 *
|
|
4 * This library is free software; you can redistribute it and/or
|
|
5 * modify it under the terms of the GNU Lesser General Public
|
|
6 * License as published by the Free Software Foundation; either
|
|
7 * version 2 of the License, or (at your option) any later version.
|
|
8 *
|
|
9 * This library is distributed in the hope that it will be useful,
|
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
12 * Lesser General Public License for more details.
|
|
13 *
|
|
14 * You should have received a copy of the GNU Lesser General Public
|
|
15 * License along with this library; if not, write to the Free Software
|
|
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
17 *
|
|
18 */
|
|
19
|
|
20 #include "../dsputil.h"
|
|
21 #include "../mpegvideo.h"
|
|
22 #include "../avcodec.h"
|
|
23
|
|
24 extern void j_rev_dct_ARM(DCTELEM *data);
|
874
|
25 /* XXX: local hack */
|
|
26 static void (*ff_put_pixels_clamped)(const DCTELEM *block, UINT8 *pixels, int line_size);
|
|
27 static void (*ff_add_pixels_clamped)(const DCTELEM *block, UINT8 *pixels, int line_size);
|
730
|
28
|
|
29 /* XXX: those functions should be suppressed ASAP when all IDCTs are
|
|
30 converted */
|
|
31 static void arm_idct_put(UINT8 *dest, int line_size, DCTELEM *block)
|
|
32 {
|
|
33 j_rev_dct_ARM (block);
|
874
|
34 ff_put_pixels_clamped(block, dest, line_size);
|
730
|
35 }
|
|
36 static void arm_idct_add(UINT8 *dest, int line_size, DCTELEM *block)
|
|
37 {
|
|
38 j_rev_dct_ARM (block);
|
874
|
39 ff_add_pixels_clamped(block, dest, line_size);
|
730
|
40 }
|
|
41
|
|
42 void MPV_common_init_armv4l(MpegEncContext *s)
|
|
43 {
|
|
44 int i;
|
|
45 const int idct_algo= s->avctx->idct_algo;
|
|
46
|
876
|
47 ff_put_pixels_clamped = s->dsp.put_pixels_clamped;
|
879
|
48 ff_add_pixels_clamped = s->dsp.add_pixels_clamped;
|
874
|
49
|
730
|
50 if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){
|
|
51 s->idct_put= arm_idct_put;
|
|
52 s->idct_add= arm_idct_add;
|
876
|
53 s->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;/* FF_NO_IDCT_PERM */
|
730
|
54 }
|
|
55 }
|