Unified · Split
| @@ -630,28 +630,28 @@ yuv2mono_2_c_template(SwsContext *c, const int16_t *buf[2], · 629 unmodified lines | ||
| 630 | 630 | } |
| 631 | 631 | c->dither_error[0][i] = err; |
| 632 | 632 | } else { |
| 633 | − for (i = 0; i < dstW; i += 8) { | |
| 634 | − int Y, acc = 0; | |
| 635 | − | |
| 636 | − Y = (buf0[i + 0] * yalpha1 + buf1[i + 0] * yalpha) >> 19; | |
| 637 | − accumulate_bit(acc, Y + d128[0]); | |
| 638 | − Y = (buf0[i + 1] * yalpha1 + buf1[i + 1] * yalpha) >> 19; | |
| 639 | − accumulate_bit(acc, Y + d128[1]); | |
| 640 | − Y = (buf0[i + 2] * yalpha1 + buf1[i + 2] * yalpha) >> 19; | |
| 641 | − accumulate_bit(acc, Y + d128[2]); | |
| 642 | − Y = (buf0[i + 3] * yalpha1 + buf1[i + 3] * yalpha) >> 19; | |
| 643 | − accumulate_bit(acc, Y + d128[3]); | |
| 644 | − Y = (buf0[i + 4] * yalpha1 + buf1[i + 4] * yalpha) >> 19; | |
| 645 | − accumulate_bit(acc, Y + d128[4]); | |
| 646 | − Y = (buf0[i + 5] * yalpha1 + buf1[i + 5] * yalpha) >> 19; | |
| 647 | − accumulate_bit(acc, Y + d128[5]); | |
| 648 | − Y = (buf0[i + 6] * yalpha1 + buf1[i + 6] * yalpha) >> 19; | |
| 649 | − accumulate_bit(acc, Y + d128[6]); | |
| 650 | − Y = (buf0[i + 7] * yalpha1 + buf1[i + 7] * yalpha) >> 19; | |
| 651 | − accumulate_bit(acc, Y + d128[7]); | |
| 652 | − | |
| 653 | − output_pixel(*dest++, acc); | |
| 654 | − } | |
| 633 | + for (i = 0; i < dstW; i += 8) { | |
| 634 | + int Y, acc = 0; | |
| 635 | + | |
| 636 | + Y = (buf0[i + 0] * yalpha1 + buf1[i + 0] * yalpha) >> 19; | |
| 637 | + accumulate_bit(acc, Y + d128[0]); | |
| 638 | + Y = (buf0[i + 1] * yalpha1 + buf1[i + 1] * yalpha) >> 19; | |
| 639 | + accumulate_bit(acc, Y + d128[1]); | |
| 640 | + Y = (buf0[i + 2] * yalpha1 + buf1[i + 2] * yalpha) >> 19; | |
| 641 | + accumulate_bit(acc, Y + d128[2]); | |
| 642 | + Y = (buf0[i + 3] * yalpha1 + buf1[i + 3] * yalpha) >> 19; | |
| 643 | + accumulate_bit(acc, Y + d128[3]); | |
| 644 | + Y = (buf0[i + 4] * yalpha1 + buf1[i + 4] * yalpha) >> 19; | |
| 645 | + accumulate_bit(acc, Y + d128[4]); | |
| 646 | + Y = (buf0[i + 5] * yalpha1 + buf1[i + 5] * yalpha) >> 19; | |
| 647 | + accumulate_bit(acc, Y + d128[5]); | |
| 648 | + Y = (buf0[i + 6] * yalpha1 + buf1[i + 6] * yalpha) >> 19; | |
| 649 | + accumulate_bit(acc, Y + d128[6]); | |
| 650 | + Y = (buf0[i + 7] * yalpha1 + buf1[i + 7] * yalpha) >> 19; | |
| 651 | + accumulate_bit(acc, Y + d128[7]); | |
| 652 | + | |
| 653 | + output_pixel(*dest++, acc); | |
| 654 | + } | |
| 655 | 655 | } |
| 656 | 656 | } |
| 657 | 657 | |
| @@ -687,19 +687,19 @@ yuv2mono_1_c_template(SwsContext *c, const int16_t *buf0, · 29 unmodified lines | ||
| 687 | 687 | } |
| 688 | 688 | c->dither_error[0][i] = err; |
| 689 | 689 | } else { |
| 690 | − for (i = 0; i < dstW; i += 8) { | |
| 691 | − int acc = 0; | |
| 692 | − accumulate_bit(acc, ((buf0[i + 0] + 64) >> 7) + d128[0]); | |
| 693 | − accumulate_bit(acc, ((buf0[i + 1] + 64) >> 7) + d128[1]); | |
| 694 | − accumulate_bit(acc, ((buf0[i + 2] + 64) >> 7) + d128[2]); | |
| 695 | − accumulate_bit(acc, ((buf0[i + 3] + 64) >> 7) + d128[3]); | |
| 696 | − accumulate_bit(acc, ((buf0[i + 4] + 64) >> 7) + d128[4]); | |
| 697 | − accumulate_bit(acc, ((buf0[i + 5] + 64) >> 7) + d128[5]); | |
| 698 | − accumulate_bit(acc, ((buf0[i + 6] + 64) >> 7) + d128[6]); | |
| 699 | − accumulate_bit(acc, ((buf0[i + 7] + 64) >> 7) + d128[7]); | |
| 700 | − | |
| 701 | − output_pixel(*dest++, acc); | |
| 702 | − } | |
| 690 | + for (i = 0; i < dstW; i += 8) { | |
| 691 | + int acc = 0; | |
| 692 | + accumulate_bit(acc, ((buf0[i + 0] + 64) >> 7) + d128[0]); | |
| 693 | + accumulate_bit(acc, ((buf0[i + 1] + 64) >> 7) + d128[1]); | |
| 694 | + accumulate_bit(acc, ((buf0[i + 2] + 64) >> 7) + d128[2]); | |
| 695 | + accumulate_bit(acc, ((buf0[i + 3] + 64) >> 7) + d128[3]); | |
| 696 | + accumulate_bit(acc, ((buf0[i + 4] + 64) >> 7) + d128[4]); | |
| 697 | + accumulate_bit(acc, ((buf0[i + 5] + 64) >> 7) + d128[5]); | |
| 698 | + accumulate_bit(acc, ((buf0[i + 6] + 64) >> 7) + d128[6]); | |
| 699 | + accumulate_bit(acc, ((buf0[i + 7] + 64) >> 7) + d128[7]); | |
| 700 | + | |
| 701 | + output_pixel(*dest++, acc); | |
| 702 | + } | |
| 703 | 703 | } |
| 704 | 704 | } |
| 705 | 705 | |