annotate armv4l/mpegvideo_arm.c @ 760:e858fe220ce0 libavcodec

xvid qpel bug workaround
author michaelni
date Tue, 22 Oct 2002 18:55:20 +0000
parents b24ea84b23e2
children c3fc09466f92
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);
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
25
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
26 /* XXX: those functions should be suppressed ASAP when all IDCTs are
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
27 converted */
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
28 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
29 {
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
30 j_rev_dct_ARM (block);
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
31 put_pixels_clamped(block, dest, line_size);
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 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
34 {
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
35 j_rev_dct_ARM (block);
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
36 add_pixels_clamped(block, dest, line_size);
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
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
39 void MPV_common_init_armv4l(MpegEncContext *s)
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 int i;
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
42 const int idct_algo= s->avctx->idct_algo;
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 if(idct_algo==FF_IDCT_AUTO || idct_algo==FF_IDCT_ARM){
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
45 s->idct_put= arm_idct_put;
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
46 s->idct_add= arm_idct_add;
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
47 for(i=0; i<64; i++)
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
48 s->idct_permutation[i]= i;
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
49 }
b24ea84b23e2 trying to fix the non-x86 IDCTs (untested)
michaelni
parents:
diff changeset
50 }