Mercurial > libavcodec.hg
annotate vp3dsp.c @ 3503:074c9f3d8e62 libavcodec
remove a few useless casts and avoid the useless t1/t2 variables
author | michael |
---|---|
date | Wed, 19 Jul 2006 23:17:18 +0000 |
parents | 0b546eab515d |
children | 40d83cd39561 |
rev | line source |
---|---|
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
1 /* |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
2 * Copyright (C) 2004 the ffmpeg project |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
3 * |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
4 * This library is free software; you can redistribute it and/or |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
5 * modify it under the terms of the GNU Lesser General Public |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
6 * License as published by the Free Software Foundation; either |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
7 * version 2 of the License, or (at your option) any later version. |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
8 * |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
9 * This library is distributed in the hope that it will be useful, |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
12 * Lesser General Public License for more details. |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
13 * |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
14 * You should have received a copy of the GNU Lesser General Public |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
15 * License along with this library; if not, write to the Free Software |
3036
0b546eab515d
Update licensing information: The FSF changed postal address.
diego
parents:
2967
diff
changeset
|
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
17 */ |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
18 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
19 /** |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
20 * @file vp3dsp.c |
2967 | 21 * Standard C DSP-oriented functions cribbed from the original VP3 |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
22 * source code. |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
23 */ |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
24 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
25 #include "common.h" |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
26 #include "avcodec.h" |
2024
f65d87bfdd5a
some of the warning fixes by (Michael Roitzsch <mroi at users dot sourceforge dot net>)
michael
parents:
1977
diff
changeset
|
27 #include "dsputil.h" |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
28 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
29 #define IdctAdjustBeforeShift 8 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
30 #define xC1S7 64277 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
31 #define xC2S6 60547 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
32 #define xC3S5 54491 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
33 #define xC4S4 46341 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
34 #define xC5S3 36410 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
35 #define xC6S2 25080 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
36 #define xC7S1 12785 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
37 |
3503
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
38 #define M(a,b) (((a) * (b))>>16) |
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
39 |
2693 | 40 static always_inline void idct(uint8_t *dst, int stride, int16_t *input, int type) |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
41 { |
2693 | 42 int16_t *ip = input; |
43 uint8_t *cm = cropTbl + MAX_NEG_CROP; | |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
44 |
2693 | 45 int A_, B_, C_, D_, _Ad, _Bd, _Cd, _Dd, E_, F_, G_, H_; |
46 int _Ed, _Gd, _Add, _Bdd, _Fd, _Hd; | |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
47 |
2834 | 48 int i; |
2967 | 49 |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
50 /* Inverse DCT on the rows now */ |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
51 for (i = 0; i < 8; i++) { |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
52 /* Check for non-zero values */ |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
53 if ( ip[0] | ip[1] | ip[2] | ip[3] | ip[4] | ip[5] | ip[6] | ip[7] ) { |
3503
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
54 A_ = M(xC1S7, ip[1]) + M(xC7S1, ip[7]); |
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
55 B_ = M(xC7S1, ip[1]) - M(xC1S7, ip[7]); |
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
56 C_ = M(xC3S5, ip[3]) + M(xC5S3, ip[5]); |
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
57 D_ = M(xC3S5, ip[5]) - M(xC5S3, ip[3]); |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
58 |
3503
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
59 _Ad = M(xC4S4, (A_ - C_)); |
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
60 _Bd = M(xC4S4, (B_ - D_)); |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
61 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
62 _Cd = A_ + C_; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
63 _Dd = B_ + D_; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
64 |
3503
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
65 E_ = M(xC4S4, (ip[0] + ip[4])); |
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
66 F_ = M(xC4S4, (ip[0] - ip[4])); |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
67 |
3503
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
68 G_ = M(xC2S6, ip[2]) + M(xC6S2, ip[6]); |
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
69 H_ = M(xC6S2, ip[2]) - M(xC2S6, ip[6]); |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
70 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
71 _Ed = E_ - G_; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
72 _Gd = E_ + G_; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
73 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
74 _Add = F_ + _Ad; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
75 _Bdd = _Bd - H_; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
76 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
77 _Fd = F_ - _Ad; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
78 _Hd = _Bd + H_; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
79 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
80 /* Final sequence of operations over-write original inputs. */ |
2693 | 81 ip[0] = _Gd + _Cd ; |
82 ip[7] = _Gd - _Cd ; | |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
83 |
2693 | 84 ip[1] = _Add + _Hd; |
85 ip[2] = _Add - _Hd; | |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
86 |
2693 | 87 ip[3] = _Ed + _Dd ; |
88 ip[4] = _Ed - _Dd ; | |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
89 |
2693 | 90 ip[5] = _Fd + _Bdd; |
91 ip[6] = _Fd - _Bdd; | |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
92 } |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
93 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
94 ip += 8; /* next row */ |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
95 } |
2967 | 96 |
2693 | 97 ip = input; |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
98 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
99 for ( i = 0; i < 8; i++) { |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
100 /* Check for non-zero values (bitwise or faster than ||) */ |
2693 | 101 if ( ip[1 * 8] | ip[2 * 8] | ip[3 * 8] | |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
102 ip[4 * 8] | ip[5 * 8] | ip[6 * 8] | ip[7 * 8] ) { |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
103 |
3503
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
104 A_ = M(xC1S7, ip[1*8]) + M(xC7S1, ip[7*8]); |
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
105 B_ = M(xC7S1, ip[1*8]) - M(xC1S7, ip[7*8]); |
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
106 C_ = M(xC3S5, ip[3*8]) + M(xC5S3, ip[5*8]); |
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
107 D_ = M(xC3S5, ip[5*8]) - M(xC5S3, ip[3*8]); |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
108 |
3503
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
109 _Ad = M(xC4S4, (A_ - C_)); |
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
110 _Bd = M(xC4S4, (B_ - D_)); |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
111 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
112 _Cd = A_ + C_; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
113 _Dd = B_ + D_; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
114 |
3503
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
115 E_ = M(xC4S4, (ip[0*8] + ip[4*8])); |
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
116 F_ = M(xC4S4, (ip[0*8] - ip[4*8])); |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
117 |
3503
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
118 G_ = M(xC2S6, ip[2*8]) + M(xC6S2, ip[6*8]); |
074c9f3d8e62
remove a few useless casts and avoid the useless t1/t2 variables
michael
parents:
3036
diff
changeset
|
119 H_ = M(xC6S2, ip[2*8]) - M(xC2S6, ip[6*8]); |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
120 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
121 _Ed = E_ - G_; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
122 _Gd = E_ + G_; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
123 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
124 _Add = F_ + _Ad; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
125 _Bdd = _Bd - H_; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
126 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
127 _Fd = F_ - _Ad; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
128 _Hd = _Bd + H_; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
129 |
2693 | 130 if(type==1){ //HACK |
131 _Gd += 16*128; | |
132 _Add+= 16*128; | |
133 _Ed += 16*128; | |
134 _Fd += 16*128; | |
135 } | |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
136 _Gd += IdctAdjustBeforeShift; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
137 _Add += IdctAdjustBeforeShift; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
138 _Ed += IdctAdjustBeforeShift; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
139 _Fd += IdctAdjustBeforeShift; |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
140 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
141 /* Final sequence of operations over-write original inputs. */ |
2693 | 142 if(type==0){ |
143 ip[0*8] = (_Gd + _Cd ) >> 4; | |
144 ip[7*8] = (_Gd - _Cd ) >> 4; | |
2967 | 145 |
2693 | 146 ip[1*8] = (_Add + _Hd ) >> 4; |
147 ip[2*8] = (_Add - _Hd ) >> 4; | |
2967 | 148 |
2693 | 149 ip[3*8] = (_Ed + _Dd ) >> 4; |
150 ip[4*8] = (_Ed - _Dd ) >> 4; | |
2967 | 151 |
2693 | 152 ip[5*8] = (_Fd + _Bdd ) >> 4; |
153 ip[6*8] = (_Fd - _Bdd ) >> 4; | |
154 }else if(type==1){ | |
155 dst[0*stride] = cm[(_Gd + _Cd ) >> 4]; | |
156 dst[7*stride] = cm[(_Gd - _Cd ) >> 4]; | |
2967 | 157 |
2693 | 158 dst[1*stride] = cm[(_Add + _Hd ) >> 4]; |
159 dst[2*stride] = cm[(_Add - _Hd ) >> 4]; | |
2967 | 160 |
2693 | 161 dst[3*stride] = cm[(_Ed + _Dd ) >> 4]; |
162 dst[4*stride] = cm[(_Ed - _Dd ) >> 4]; | |
2967 | 163 |
2693 | 164 dst[5*stride] = cm[(_Fd + _Bdd ) >> 4]; |
165 dst[6*stride] = cm[(_Fd - _Bdd ) >> 4]; | |
166 }else{ | |
167 dst[0*stride] = cm[dst[0*stride] + ((_Gd + _Cd ) >> 4)]; | |
168 dst[7*stride] = cm[dst[7*stride] + ((_Gd - _Cd ) >> 4)]; | |
2967 | 169 |
2693 | 170 dst[1*stride] = cm[dst[1*stride] + ((_Add + _Hd ) >> 4)]; |
171 dst[2*stride] = cm[dst[2*stride] + ((_Add - _Hd ) >> 4)]; | |
2967 | 172 |
2693 | 173 dst[3*stride] = cm[dst[3*stride] + ((_Ed + _Dd ) >> 4)]; |
174 dst[4*stride] = cm[dst[4*stride] + ((_Ed - _Dd ) >> 4)]; | |
2967 | 175 |
2693 | 176 dst[5*stride] = cm[dst[5*stride] + ((_Fd + _Bdd ) >> 4)]; |
177 dst[6*stride] = cm[dst[6*stride] + ((_Fd - _Bdd ) >> 4)]; | |
178 } | |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
179 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
180 } else { |
2693 | 181 if(type==0){ |
2967 | 182 ip[0*8] = |
183 ip[1*8] = | |
184 ip[2*8] = | |
185 ip[3*8] = | |
186 ip[4*8] = | |
187 ip[5*8] = | |
2693 | 188 ip[6*8] = |
189 ip[7*8] = ((xC4S4 * ip[0*8] + (IdctAdjustBeforeShift<<16))>>20); | |
190 }else if(type==1){ | |
191 dst[0*stride]= | |
192 dst[1*stride]= | |
193 dst[2*stride]= | |
194 dst[3*stride]= | |
195 dst[4*stride]= | |
196 dst[5*stride]= | |
197 dst[6*stride]= | |
198 dst[7*stride]= 128 + ((xC4S4 * ip[0*8] + (IdctAdjustBeforeShift<<16))>>20); | |
199 }else{ | |
200 if(ip[0*8]){ | |
201 int v= ((xC4S4 * ip[0*8] + (IdctAdjustBeforeShift<<16))>>20); | |
202 dst[0*stride] = cm[dst[0*stride] + v]; | |
203 dst[1*stride] = cm[dst[1*stride] + v]; | |
204 dst[2*stride] = cm[dst[2*stride] + v]; | |
205 dst[3*stride] = cm[dst[3*stride] + v]; | |
206 dst[4*stride] = cm[dst[4*stride] + v]; | |
207 dst[5*stride] = cm[dst[5*stride] + v]; | |
208 dst[6*stride] = cm[dst[6*stride] + v]; | |
209 dst[7*stride] = cm[dst[7*stride] + v]; | |
210 } | |
211 } | |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
212 } |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
213 |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
214 ip++; /* next column */ |
2693 | 215 dst++; |
1866
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
216 } |
1755f959ab7f
seperated out the C-based VP3 DSP functions into a different file; also
melanson
parents:
diff
changeset
|
217 } |
2693 | 218 |
219 void ff_vp3_idct_c(DCTELEM *block/* align 16*/){ | |
220 idct(NULL, 0, block, 0); | |
221 } | |
2967 | 222 |
2693 | 223 void ff_vp3_idct_put_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/){ |
224 idct(dest, line_size, block, 1); | |
225 } | |
226 | |
227 void ff_vp3_idct_add_c(uint8_t *dest/*align 8*/, int line_size, DCTELEM *block/*align 16*/){ | |
228 idct(dest, line_size, block, 2); | |
229 } |