Mercurial > libavcodec.hg
comparison snow.c @ 5649:9fe214a99139 libavcodec
indention
author | michael |
---|---|
date | Sat, 08 Sep 2007 03:15:42 +0000 |
parents | cd26ab6e3953 |
children | 2a25f7167c09 |
comparison
equal
deleted
inserted
replaced
5648:cd26ab6e3953 | 5649:9fe214a99139 |
---|---|
2193 l= brane[dx + 16*dy]>>4; | 2193 l= brane[dx + 16*dy]>>4; |
2194 | 2194 |
2195 b= needs[l] | needs[r]; | 2195 b= needs[l] | needs[r]; |
2196 | 2196 |
2197 if(b&5){ | 2197 if(b&5){ |
2198 for(y=0; y < b_h+HTAPS-1; y++){ | 2198 for(y=0; y < b_h+HTAPS-1; y++){ |
2199 for(x=0; x < b_w; x++){ | 2199 for(x=0; x < b_w; x++){ |
2200 int a_2=src[x + HTAPS/2-5]; | 2200 int a_2=src[x + HTAPS/2-5]; |
2201 int a_1=src[x + HTAPS/2-4]; | 2201 int a_1=src[x + HTAPS/2-4]; |
2202 int a0= src[x + HTAPS/2-3]; | 2202 int a0= src[x + HTAPS/2-3]; |
2203 int a1= src[x + HTAPS/2-2]; | 2203 int a1= src[x + HTAPS/2-2]; |
2204 int a2= src[x + HTAPS/2-1]; | 2204 int a2= src[x + HTAPS/2-1]; |
2205 int a3= src[x + HTAPS/2+0]; | 2205 int a3= src[x + HTAPS/2+0]; |
2206 int a4= src[x + HTAPS/2+1]; | 2206 int a4= src[x + HTAPS/2+1]; |
2207 int a5= src[x + HTAPS/2+2]; | 2207 int a5= src[x + HTAPS/2+2]; |
2208 int a6= src[x + HTAPS/2+3]; | 2208 int a6= src[x + HTAPS/2+3]; |
2209 int a7= src[x + HTAPS/2+4]; | 2209 int a7= src[x + HTAPS/2+4]; |
2210 // int am= 9*(a1+a2) - (a0+a3); | 2210 // int am= 9*(a1+a2) - (a0+a3); |
2211 #if HTAPS==6 | 2211 #if HTAPS==6 |
2212 int am= 20*(a2+a3) - 5*(a1+a4) + (a0+a5); | 2212 int am= 20*(a2+a3) - 5*(a1+a4) + (a0+a5); |
2213 #else | 2213 #else |
2214 int am= 21*(a2+a3) - 7*(a1+a4) + 3*(a0+a5) - (a_1+a6); | 2214 int am= 21*(a2+a3) - 7*(a1+a4) + 3*(a0+a5) - (a_1+a6); |
2215 #endif | 2215 #endif |
2216 // int am= 18*(a2+a3) - 2*(a1+a4); | 2216 // int am= 18*(a2+a3) - 2*(a1+a4); |
2217 // int aL= (-7*a0 + 105*a1 + 35*a2 - 5*a3)>>3; | 2217 // int aL= (-7*a0 + 105*a1 + 35*a2 - 5*a3)>>3; |
2218 // int aR= (-7*a3 + 105*a2 + 35*a1 - 5*a0)>>3; | 2218 // int aR= (-7*a3 + 105*a2 + 35*a1 - 5*a0)>>3; |
2219 | 2219 |
2220 // if(b_w==16) am= 8*(a1+a2); | 2220 // if(b_w==16) am= 8*(a1+a2); |
2221 | 2221 |
2222 tmpI[x]= am; | 2222 tmpI[x]= am; |
2223 am= (am+16)>>5; | 2223 am= (am+16)>>5; |
2224 if(am&(~255)) am= ~(am>>31); | 2224 if(am&(~255)) am= ~(am>>31); |
2225 tmp2[x]= am; | 2225 tmp2[x]= am; |
2226 } | 2226 } |
2227 tmpI+= 64; | 2227 tmpI+= 64; |
2228 tmp2+= stride; | 2228 tmp2+= stride; |
2229 src += stride; | 2229 src += stride; |
2230 } | 2230 } |
2231 src -= stride*y; | 2231 src -= stride*y; |
2232 } | 2232 } |
2233 src += HTAPS/2 - 1; | 2233 src += HTAPS/2 - 1; |
2234 tmp2= tmp2t[1]; | 2234 tmp2= tmp2t[1]; |
2235 | 2235 |
2236 if(b&2){ | 2236 if(b&2){ |
2237 for(y=0; y < b_h; y++){ | 2237 for(y=0; y < b_h; y++){ |
2238 for(x=0; x < b_w+1; x++){ | 2238 for(x=0; x < b_w+1; x++){ |
2239 int a_2=src[x + (HTAPS/2-5)*stride]; | 2239 int a_2=src[x + (HTAPS/2-5)*stride]; |
2240 int a_1=src[x + (HTAPS/2-4)*stride]; | 2240 int a_1=src[x + (HTAPS/2-4)*stride]; |
2241 int a0= src[x + (HTAPS/2-3)*stride]; | 2241 int a0= src[x + (HTAPS/2-3)*stride]; |
2242 int a1= src[x + (HTAPS/2-2)*stride]; | 2242 int a1= src[x + (HTAPS/2-2)*stride]; |
2243 int a2= src[x + (HTAPS/2-1)*stride]; | 2243 int a2= src[x + (HTAPS/2-1)*stride]; |
2244 int a3= src[x + (HTAPS/2+0)*stride]; | 2244 int a3= src[x + (HTAPS/2+0)*stride]; |
2245 int a4= src[x + (HTAPS/2+1)*stride]; | 2245 int a4= src[x + (HTAPS/2+1)*stride]; |
2246 int a5= src[x + (HTAPS/2+2)*stride]; | 2246 int a5= src[x + (HTAPS/2+2)*stride]; |
2247 int a6= src[x + (HTAPS/2+3)*stride]; | 2247 int a6= src[x + (HTAPS/2+3)*stride]; |
2248 int a7= src[x + (HTAPS/2+4)*stride]; | 2248 int a7= src[x + (HTAPS/2+4)*stride]; |
2249 #if HTAPS==6 | 2249 #if HTAPS==6 |
2250 int am= 20*(a2+a3) - 5*(a1+a4) + (a0+a5); | 2250 int am= 20*(a2+a3) - 5*(a1+a4) + (a0+a5); |
2251 #else | 2251 #else |
2252 int am= 21*(a2+a3) - 7*(a1+a4) + 3*(a0+a5) - (a_1+a6); | 2252 int am= 21*(a2+a3) - 7*(a1+a4) + 3*(a0+a5) - (a_1+a6); |
2253 #endif | 2253 #endif |
2254 // int am= 18*(a2+a3) - 2*(a1+a4); | 2254 // int am= 18*(a2+a3) - 2*(a1+a4); |
2255 /* int aL= (-7*a0 + 105*a1 + 35*a2 - 5*a3)>>3; | 2255 /* int aL= (-7*a0 + 105*a1 + 35*a2 - 5*a3)>>3; |
2256 int aR= (-7*a3 + 105*a2 + 35*a1 - 5*a0)>>3;*/ | 2256 int aR= (-7*a3 + 105*a2 + 35*a1 - 5*a0)>>3;*/ |
2257 | 2257 |
2258 // if(b_w==16) am= 8*(a1+a2); | 2258 // if(b_w==16) am= 8*(a1+a2); |
2259 | 2259 |
2260 am= (am + 16)>>5; | 2260 am= (am + 16)>>5; |
2261 if(am&(~255)) am= ~(am>>31); | 2261 if(am&(~255)) am= ~(am>>31); |
2262 tmp2[x]= am; | 2262 tmp2[x]= am; |
2263 } | 2263 } |
2264 src += stride; | 2264 src += stride; |
2265 tmp2+= stride; | 2265 tmp2+= stride; |
2266 } | 2266 } |
2267 src -= stride*y; | 2267 src -= stride*y; |
2268 } | 2268 } |
2269 src += stride*(HTAPS/2 - 1); | 2269 src += stride*(HTAPS/2 - 1); |
2270 tmp2= tmp2t[2]; | 2270 tmp2= tmp2t[2]; |
2271 tmpI= tmpIt; | 2271 tmpI= tmpIt; |
2272 if(b&4){ | 2272 if(b&4){ |