Mercurial > libavcodec.hg
annotate bfin/vp3_bfin.c @ 11690:56a2ead12502 libavcodec
Another try for fixing/improving decode_video documentation.
author | reimar |
---|---|
date | Sat, 08 May 2010 16:24:33 +0000 |
parents | 00b80bf84ad9 |
children | 43e39953f4f9 |
rev | line source |
---|---|
5776
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
1 /* |
5777 | 2 * Copyright (C) 2007 Marc Hoffman <marc.hoffman@analog.com> |
3 * | |
5776
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
4 * This file is part of FFmpeg. |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
5 * |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
6 * FFmpeg is free software; you can redistribute it and/or |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
7 * modify it under the terms of the GNU Lesser General Public |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
8 * License as published by the Free Software Foundation; either |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
9 * version 2.1 of the License, or (at your option) any later version. |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
10 * |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
11 * FFmpeg is distributed in the hope that it will be useful, |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
14 * Lesser General Public License for more details. |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
15 * |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
16 * You should have received a copy of the GNU Lesser General Public |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
17 * License along with FFmpeg; if not, write to the Free Software |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
19 */ |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
20 |
6763 | 21 #include "libavcodec/avcodec.h" |
22 #include "libavcodec/dsputil.h" | |
5776
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
23 #include "dsputil_bfin.h" |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
24 |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
25 /* Intra iDCT offset 128 */ |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
26 void ff_bfin_vp3_idct_put (uint8_t *dest, int line_size, DCTELEM *block) |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
27 { |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
28 uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
29 int i,j; |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
30 |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
31 ff_bfin_vp3_idct (block); |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
32 |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
33 for (i=0;i<8;i++) |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
34 for (j=0;j<8;j++) |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
35 dest[line_size*i+j]=cm[128+block[i*8+j]]; |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
36 } |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
37 |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
38 /* Inter iDCT */ |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
39 void ff_bfin_vp3_idct_add (uint8_t *dest, int line_size, DCTELEM *block) |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
40 { |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
41 ff_bfin_vp3_idct (block); |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
42 ff_bfin_add_pixels_clamped (block, dest, line_size); |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
43 } |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
44 |
73ec16dbcbc1
blackfin optimized vp3 transform and infastructure for idct
mhoffman
parents:
diff
changeset
|
45 |