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))
250 if (padtop || padleft) {
251 memset(dst->
data[0], color[0],
252 dst->
linesize[0] * padtop + (padleft * max_step[0]));
255 if (padleft || padright) {
257 (dst->
linesize[0] - (padright * max_step[0]));
258 yheight = height - 1 - (padtop + padbottom);
259 for (y = 0; y < yheight; y++) {
260 memset(optr, color[0], (padleft + padright) * max_step[0]);
265 if (padbottom || padright) {
266 optr = dst->
data[0] + dst->
linesize[0] * (height - padbottom) -
267 (padright * max_step[0]);
268 memset(optr, color[0], dst->
linesize[0] * padbottom +
269 (padright * max_step[0]));
275 for (i = 0; i < 3; i++) {
279 if (padtop || padleft) {
280 memset(dst->
data[i], color[i],
281 dst->
linesize[i] * (padtop >> y_shift) + (padleft >> x_shift));
284 if (padleft || padright) {
285 optr = dst->
data[i] + dst->
linesize[i] * (padtop >> y_shift) +
286 (dst->
linesize[i] - (padright >> x_shift));
287 yheight = (height - 1 - (padtop + padbottom)) >> y_shift;
288 for (y = 0; y < yheight; y++) {
289 memset(optr, color[i], (padleft + padright) >> x_shift);
296 optr = dst->
data[i] + dst->
linesize[i] * (padtop >> y_shift) +
297 (padleft >> x_shift);
298 memcpy(optr, iptr, (width - padleft - padright) >> x_shift);
300 optr = dst->
data[i] + dst->
linesize[i] * (padtop >> y_shift) +
301 (dst->
linesize[i] - (padright >> x_shift));
302 yheight = (height - 1 - (padtop + padbottom)) >> y_shift;
303 for (y = 0; y < yheight; y++) {
304 memset(optr, color[i], (padleft + padright) >> x_shift);
305 memcpy(optr + ((padleft + padright) >> x_shift), iptr,
306 (width - padleft - padright) >> x_shift);
312 if (padbottom || padright) {
314 ((height - padbottom) >> y_shift) - (padright >> x_shift);
315 memset(optr, color[i],dst->
linesize[i] *
316 (padbottom >> y_shift) + (padright >> x_shift));
323 #if FF_API_DEINTERLACE
325 #if HAVE_MMX_EXTERNAL
326 #define deinterlace_line_inplace ff_deinterlace_line_inplace_mmx
327 #define deinterlace_line ff_deinterlace_line_mmx
329 #define deinterlace_line_inplace deinterlace_line_inplace_c
330 #define deinterlace_line deinterlace_line_c
342 for(;size > 0;size--) {
344 sum += lum_m3[0] << 2;
345 sum += lum_m2[0] << 1;
346 sum += lum_m1[0] << 2;
348 dst[0] = cm[(sum + 4) >> 3];
365 for(;size > 0;size--) {
367 sum += lum_m3[0] << 2;
368 sum += lum_m2[0] << 1;
370 sum += lum_m1[0] << 2;
372 lum_m2[0] = cm[(sum + 4) >> 3];
386 const uint8_t *src1,
int src_wrap,
389 const uint8_t *src_m2, *src_m1, *src_0, *src_p1, *src_p2;
394 src_0=&src_m1[src_wrap];
395 src_p1=&src_0[src_wrap];
396 src_p2=&src_p1[src_wrap];
397 for(y=0;y<(height-2);y+=2) {
398 memcpy(dst,src_m1,width);
404 src_p1 += 2*src_wrap;
405 src_p2 += 2*src_wrap;
408 memcpy(dst,src_m1,width);
417 uint8_t *src_m1, *src_0, *src_p1, *src_p2;
425 memcpy(buf,src_m1,width);
426 src_0=&src_m1[src_wrap];
427 src_p1=&src_0[src_wrap];
428 src_p2=&src_p1[src_wrap];
429 for(y=0;y<(height-2);y+=2) {
433 src_p1 += 2*src_wrap;
434 src_p2 += 2*src_wrap;
455 if ((width & 3) != 0 || (height & 3) != 0)
507 if(!desc || !desc->
name) {