64 #if AV_HAVE_INCOMPATIBLE_LIBAV_ABI
67 int has_alpha,
int *loss_ptr){
80 int has_alpha,
int *loss_ptr){
100 for(;height > 0; height--) {
104 for(w = width;w >= 4; w-=4) {
105 d[0] = (s1[0] + s1[1] + s2[0] + s2[1] + 2) >> 2;
106 d[1] = (s1[2] + s1[3] + s2[2] + s2[3] + 2) >> 2;
107 d[2] = (s1[4] + s1[5] + s2[4] + s2[5] + 2) >> 2;
108 d[3] = (s1[6] + s1[7] + s2[6] + s2[7] + 2) >> 2;
114 d[0] = (s1[0] + s1[1] + s2[0] + s2[1] + 2) >> 2;
133 for(;height > 0; height--) {
139 for(w = width;w > 0; w--) {
140 d[0] = (s1[0] + s1[1] + s1[2] + s1[3] +
141 s2[0] + s2[1] + s2[2] + s2[3] +
142 s3[0] + s3[1] + s3[2] + s3[3] +
143 s4[0] + s4[1] + s4[2] + s4[3] + 8) >> 4;
162 for(;height > 0; height--) {
163 for(w = width;w > 0; w--) {
166 tmp += src[0] + src[1] + src[2] + src[3] + src[4] + src[5] + src[6] + src[7];
169 *(dst++) = (tmp + 32)>>6;
170 src += 8 - 8*src_wrap;
172 src += 8*src_wrap - 8*
width;
173 dst += dst_wrap -
width;
181 int planes[4] = { 0 };
213 dst->
data[1] = src->
data[1] + ((top_band >> y_shift) * src->
linesize[1]) + (left_band >> x_shift);
214 dst->
data[2] = src->
data[2] + ((top_band >> y_shift) * src->
linesize[2]) + (left_band >> x_shift);
216 if(top_band % (1<<y_shift) || left_band % (1<<x_shift))
243 for (i = 0; i < 3; i++) {
247 if (padtop || padleft) {
248 memset(dst->
data[i], color[i],
249 dst->
linesize[i] * (padtop >> y_shift) + (padleft >> x_shift));
252 if (padleft || padright) {
253 optr = dst->
data[i] + dst->
linesize[i] * (padtop >> y_shift) +
254 (dst->
linesize[i] - (padright >> x_shift));
255 yheight = (height - 1 - (padtop + padbottom)) >> y_shift;
256 for (y = 0; y < yheight; y++) {
257 memset(optr, color[i], (padleft + padright) >> x_shift);
264 optr = dst->
data[i] + dst->
linesize[i] * (padtop >> y_shift) +
265 (padleft >> x_shift);
266 memcpy(optr, iptr, (width - padleft - padright) >> x_shift);
268 optr = dst->
data[i] + dst->
linesize[i] * (padtop >> y_shift) +
269 (dst->
linesize[i] - (padright >> x_shift));
270 yheight = (height - 1 - (padtop + padbottom)) >> y_shift;
271 for (y = 0; y < yheight; y++) {
272 memset(optr, color[i], (padleft + padright) >> x_shift);
273 memcpy(optr + ((padleft + padright) >> x_shift), iptr,
274 (width - padleft - padright) >> x_shift);
280 if (padbottom || padright) {
282 ((height - padbottom) >> y_shift) - (padright >> x_shift);
283 memset(optr, color[i],dst->
linesize[i] *
284 (padbottom >> y_shift) + (padright >> x_shift));
290 #if FF_API_DEINTERLACE
292 #if HAVE_MMX_EXTERNAL
293 #define deinterlace_line_inplace ff_deinterlace_line_inplace_mmx
294 #define deinterlace_line ff_deinterlace_line_mmx
296 #define deinterlace_line_inplace deinterlace_line_inplace_c
297 #define deinterlace_line deinterlace_line_c
309 for(;size > 0;size--) {
311 sum += lum_m3[0] << 2;
312 sum += lum_m2[0] << 1;
313 sum += lum_m1[0] << 2;
315 dst[0] = cm[(sum + 4) >> 3];
332 for(;size > 0;size--) {
334 sum += lum_m3[0] << 2;
335 sum += lum_m2[0] << 1;
337 sum += lum_m1[0] << 2;
339 lum_m2[0] = cm[(sum + 4) >> 3];
353 const uint8_t *src1,
int src_wrap,
356 const uint8_t *src_m2, *src_m1, *src_0, *src_p1, *src_p2;
361 src_0=&src_m1[src_wrap];
362 src_p1=&src_0[src_wrap];
363 src_p2=&src_p1[src_wrap];
364 for(y=0;y<(height-2);y+=2) {
365 memcpy(dst,src_m1,width);
371 src_p1 += 2*src_wrap;
372 src_p2 += 2*src_wrap;
375 memcpy(dst,src_m1,width);
384 uint8_t *src_m1, *src_0, *src_p1, *src_p2;
390 memcpy(buf,src_m1,width);
391 src_0=&src_m1[src_wrap];
392 src_p1=&src_0[src_wrap];
393 src_p2=&src_p1[src_wrap];
394 for(y=0;y<(height-2);y+=2) {
398 src_p1 += 2*src_wrap;
399 src_p2 += 2*src_wrap;
419 if ((width & 3) != 0 || (height & 3) != 0)
468 if(!desc || !desc->
name) {