44 #define deinterlace_line_inplace ff_deinterlace_line_inplace_mmx
45 #define deinterlace_line ff_deinterlace_line_mmx
47 #define deinterlace_line_inplace deinterlace_line_inplace_c
48 #define deinterlace_line deinterlace_line_c
72 #if AV_HAVE_INCOMPATIBLE_LIBAV_ABI
75 int has_alpha,
int *loss_ptr){
88 int has_alpha,
int *loss_ptr){
108 for(;height > 0; height--) {
112 for(w = width;w >= 4; w-=4) {
113 d[0] = (s1[0] + s1[1] + s2[0] + s2[1] + 2) >> 2;
114 d[1] = (s1[2] + s1[3] + s2[2] + s2[3] + 2) >> 2;
115 d[2] = (s1[4] + s1[5] + s2[4] + s2[5] + 2) >> 2;
116 d[3] = (s1[6] + s1[7] + s2[6] + s2[7] + 2) >> 2;
122 d[0] = (s1[0] + s1[1] + s2[0] + s2[1] + 2) >> 2;
141 for(;height > 0; height--) {
147 for(w = width;w > 0; w--) {
148 d[0] = (s1[0] + s1[1] + s1[2] + s1[3] +
149 s2[0] + s2[1] + s2[2] + s2[3] +
150 s3[0] + s3[1] + s3[2] + s3[3] +
151 s4[0] + s4[1] + s4[2] + s4[3] + 8) >> 4;
170 for(;height > 0; height--) {
171 for(w = width;w > 0; w--) {
174 tmp += src[0] + src[1] + src[2] + src[3] + src[4] + src[5] + src[6] + src[7];
177 *(dst++) = (tmp + 32)>>6;
178 src += 8 - 8*src_wrap;
180 src += 8*src_wrap - 8*
width;
181 dst += dst_wrap -
width;
189 int planes[4] = { 0 };
221 dst->
data[1] = src->
data[1] + ((top_band >> y_shift) * src->
linesize[1]) + (left_band >> x_shift);
222 dst->
data[2] = src->
data[2] + ((top_band >> y_shift) * src->
linesize[2]) + (left_band >> x_shift);
224 if(top_band % (1<<y_shift) || left_band % (1<<x_shift))
251 for (i = 0; i < 3; i++) {
255 if (padtop || padleft) {
256 memset(dst->
data[i], color[i],
257 dst->
linesize[i] * (padtop >> y_shift) + (padleft >> x_shift));
260 if (padleft || padright) {
261 optr = dst->
data[i] + dst->
linesize[i] * (padtop >> y_shift) +
262 (dst->
linesize[i] - (padright >> x_shift));
263 yheight = (height - 1 - (padtop + padbottom)) >> y_shift;
264 for (y = 0; y < yheight; y++) {
265 memset(optr, color[i], (padleft + padright) >> x_shift);
272 optr = dst->
data[i] + dst->
linesize[i] * (padtop >> y_shift) +
273 (padleft >> x_shift);
274 memcpy(optr, iptr, (width - padleft - padright) >> x_shift);
276 optr = dst->
data[i] + dst->
linesize[i] * (padtop >> y_shift) +
277 (dst->
linesize[i] - (padright >> x_shift));
278 yheight = (height - 1 - (padtop + padbottom)) >> y_shift;
279 for (y = 0; y < yheight; y++) {
280 memset(optr, color[i], (padleft + padright) >> x_shift);
281 memcpy(optr + ((padleft + padright) >> x_shift), iptr,
282 (width - padleft - padright) >> x_shift);
288 if (padbottom || padright) {
290 ((height - padbottom) >> y_shift) - (padright >> x_shift);
291 memset(optr, color[i],dst->
linesize[i] *
292 (padbottom >> y_shift) + (padright >> x_shift));
298 #if FF_API_DEINTERLACE
300 #if !HAVE_MMX_EXTERNAL
311 for(;size > 0;size--) {
313 sum += lum_m3[0] << 2;
314 sum += lum_m2[0] << 1;
315 sum += lum_m1[0] << 2;
317 dst[0] = cm[(sum + 4) >> 3];
334 for(;size > 0;size--) {
336 sum += lum_m3[0] << 2;
337 sum += lum_m2[0] << 1;
339 sum += lum_m1[0] << 2;
341 lum_m2[0] = cm[(sum + 4) >> 3];
355 const uint8_t *src1,
int src_wrap,
358 const uint8_t *src_m2, *src_m1, *src_0, *src_p1, *src_p2;
363 src_0=&src_m1[src_wrap];
364 src_p1=&src_0[src_wrap];
365 src_p2=&src_p1[src_wrap];
366 for(y=0;y<(height-2);y+=2) {
367 memcpy(dst,src_m1,width);
373 src_p1 += 2*src_wrap;
374 src_p2 += 2*src_wrap;
377 memcpy(dst,src_m1,width);
386 uint8_t *src_m1, *src_0, *src_p1, *src_p2;
392 memcpy(buf,src_m1,width);
393 src_0=&src_m1[src_wrap];
394 src_p1=&src_0[src_wrap];
395 src_p2=&src_p1[src_wrap];
396 for(y=0;y<(height-2);y+=2) {
400 src_p1 += 2*src_wrap;
401 src_p2 += 2*src_wrap;
421 if ((width & 3) != 0 || (height & 3) != 0)
470 if(!desc || !desc->
name) {