Revision fee0deb6 libavfilter/avfilter.c

View differences:

libavfilter/avfilter.c
416 416
        for (i = 0; i < 4; i++) {
417 417
            if (link->src_buf->data[i]) {
418 418
                src[i] = link->src_buf-> data[i] +
419
                    (y >> (i==0 ? 0 : vsub)) * link->src_buf-> linesize[i];
419
                    (y >> (i==1 || i==2 ? vsub : 0)) * link->src_buf-> linesize[i];
420 420
                dst[i] = link->cur_buf->data[i] +
421
                    (y >> (i==0 ? 0 : vsub)) * link->cur_buf->linesize[i];
421
                    (y >> (i==1 || i==2 ? vsub : 0)) * link->cur_buf->linesize[i];
422 422
            } else
423 423
                src[i] = dst[i] = NULL;
424 424
        }
......
429 429

  
430 430
            if (!src[i]) continue;
431 431

  
432
            for (j = 0; j < h >> (i==0 ? 0 : vsub); j++) {
432
            for (j = 0; j < h >> (i==1 || i==2 ? vsub : 0); j++) {
433 433
                memcpy(dst[i], src[i], planew);
434 434
                src[i] += link->src_buf->linesize[i];
435 435
                dst[i] += link->cur_buf->linesize[i];

Also available in: Unified diff