Revision 0a05e494 libavcodec/imgconvert.c

View differences:

libavcodec/imgconvert.c
538 538
 
539 539
    p1 = src->data[0];
540 540
    lum1 = dst->data[0];
541
    cb1 = dst->data[0];
542
    cr1 = dst->data[0];
541
    cb1 = dst->data[1];
542
    cr1 = dst->data[2];
543 543

  
544 544
    for(;height >= 2; height -= 2) {
545 545
        p = p1;
......
582 582

  
583 583
    p1 = src->data[0];
584 584
    lum1 = dst->data[0];
585
    cb1 = dst->data[0];
586
    cr1 = dst->data[0];
587
    for(;height >= 2; height -= 2) {
585
    cb1 = dst->data[1];
586
    cr1 = dst->data[2];
587
    for(;height > 0; height--) {
588 588
        p = p1;
589 589
        lum = lum1;
590 590
        cb = cb1;
......
615 615

  
616 616
    p1 = dst->data[0];
617 617
    lum1 = src->data[0];
618
    cb1 = src->data[0];
619
    cr1 = src->data[0];
620
    for(;height >= 2; height -= 2) {
618
    cb1 = src->data[1];
619
    cr1 = src->data[2];
620
    for(;height > 0; height--) {
621 621
        p = p1;
622 622
        lum = lum1;
623 623
        cb = cb1;
......
632 632
            cb++;
633 633
            cr++;
634 634
        }
635
        p1 += src->linesize[0];
636
        lum1 += dst->linesize[0];
637
        cb1 += dst->linesize[1];
638
        cr1 += dst->linesize[2];
635
        p1 += dst->linesize[0];
636
        lum1 += src->linesize[0];
637
        cb1 += src->linesize[1];
638
        cr1 += src->linesize[2];
639 639
    }
640 640
}
641 641

  

Also available in: Unified diff