annotate armv4l/mpegvideo_arm.c @ 950:d4d714493faa libavcodec

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