Optimize function vp8_mbloop_filter_vertical_edge_mmi and function vp8_mbloop_filter_horizontal_edge_mmi. Make full use of memory loading delay slot and reduce unnecessary instructions.
Unified · Split
| @@ -461,96 +461,87 @@ void vp8_loop_filter_vertical_edge_mmi(unsigned char *src_ptr, · 460 unmodified lines | ||
| 461 | 461 | ); |
| 462 | 462 | } |
| 463 | 463 | |
| 464 | +/* clang-format off */ | |
| 464 | 465 | #define VP8_MBLOOP_HPSRAB \ |
| 465 | − "xor %[ftmp3], %[ftmp3], %[ftmp3] \n\t" \ | |
| 466 | − "xor %[ftmp8], %[ftmp8], %[ftmp8] \n\t" \ | |
| 467 | − "punpcklbh %[ftmp3], %[ftmp3], %[ftmp0] \n\t" \ | |
| 468 | − "punpckhbh %[ftmp8], %[ftmp8], %[ftmp0] \n\t" \ | |
| 469 | − "psrah %[ftmp3], %[ftmp3], %[ftmp9] \n\t" \ | |
| 470 | − "psrah %[ftmp8], %[ftmp8], %[ftmp9] \n\t" \ | |
| 471 | − "packsshb %[ftmp0], %[ftmp3], %[ftmp8] \n\t" | |
| 472 | − | |
| 473 | −#define VP8_MBLOOP_HPSRAB_PMULHH(reg1, reg2) \ | |
| 474 | − "pmulhh " #reg1 ", " #reg1 ", " #reg2 " \n\t" | |
| 475 | − | |
| 476 | −#define VP8_MBLOOP_HPSRAB_ADD(reg) \ | |
| 477 | − "xor %[ftmp3], %[ftmp3], %[ftmp3] \n\t" \ | |
| 478 | − "xor %[ftmp8], %[ftmp8], %[ftmp8] \n\t" \ | |
| 479 | − "punpcklbh %[ftmp3], %[ftmp3], %[ftmp2] \n\t" \ | |
| 480 | − "punpckhbh %[ftmp8], %[ftmp8], %[ftmp2] \n\t" \ | |
| 481 | − VP8_MBLOOP_HPSRAB_PMULHH(%[ftmp3], reg) \ | |
| 482 | − VP8_MBLOOP_HPSRAB_PMULHH(%[ftmp8], reg) \ | |
| 483 | − "paddh %[ftmp3], %[ftmp3], %[ff_ph_003f] \n\t" \ | |
| 484 | − "paddh %[ftmp8], %[ftmp8], %[ff_ph_003f] \n\t" \ | |
| 485 | − "psrah %[ftmp3], %[ftmp3], %[ftmp9] \n\t" \ | |
| 486 | − "psrah %[ftmp8], %[ftmp8], %[ftmp9] \n\t" \ | |
| 487 | − "packsshb %[ftmp3], %[ftmp3], %[ftmp8] \n\t" | |
| 466 | + "punpcklbh %[ftmp10], %[ftmp10], %[ftmp0] \n\t" \ | |
| 467 | + "punpckhbh %[ftmp11], %[ftmp11], %[ftmp0] \n\t" \ | |
| 468 | + "psrah %[ftmp10], %[ftmp10], %[ftmp9] \n\t" \ | |
| 469 | + "psrah %[ftmp11], %[ftmp11], %[ftmp9] \n\t" \ | |
| 470 | + "packsshb %[ftmp0], %[ftmp10], %[ftmp11] \n\t" | |
| 471 | + | |
| 472 | +#define VP8_MBLOOP_HPSRAB_ADD(reg) \ | |
| 473 | + "punpcklbh %[ftmp1], %[ftmp0], %[ftmp12] \n\t" \ | |
| 474 | + "punpckhbh %[ftmp2], %[ftmp0], %[ftmp12] \n\t" \ | |
| 475 | + "pmulhh %[ftmp1], %[ftmp1], " #reg " \n\t" \ | |
| 476 | + "pmulhh %[ftmp2], %[ftmp2], " #reg " \n\t" \ | |
| 477 | + "paddh %[ftmp1], %[ftmp1], %[ff_ph_003f] \n\t" \ | |
| 478 | + "paddh %[ftmp2], %[ftmp2], %[ff_ph_003f] \n\t" \ | |
| 479 | + "psrah %[ftmp1], %[ftmp1], %[ftmp9] \n\t" \ | |
| 480 | + "psrah %[ftmp2], %[ftmp2], %[ftmp9] \n\t" \ | |
| 481 | + "packsshb %[ftmp1], %[ftmp1], %[ftmp2] \n\t" | |
| 482 | +/* clang-format on */ | |
| 488 | 483 | |
| 489 | 484 | void vp8_mbloop_filter_horizontal_edge_mmi( |
| 490 | 485 | unsigned char *src_ptr, int src_pixel_step, const unsigned char *blimit, |
| 491 | 486 | const unsigned char *limit, const unsigned char *thresh, int count) { |
| 492 | 487 | uint32_t tmp[1]; |
| 493 | − mips_reg addr[2]; | |
| 494 | − DECLARE_ALIGNED(8, const uint64_t, srct[1]); | |
| 495 | − double ftmp[10]; | |
| 488 | + double ftmp[13]; | |
| 496 | 489 | |
| 497 | 490 | __asm__ volatile ( |
| 491 | + MMI_SLL(%[tmp0], %[src_pixel_step], 0x02) | |
| 492 | + MMI_SUBU(%[src_ptr], %[src_ptr], %[tmp0]) | |
| 498 | 493 | "1: \n\t" |
| 499 | 494 | "gsldlc1 %[ftmp9], 0x07(%[limit]) \n\t" |
| 500 | 495 | "gsldrc1 %[ftmp9], 0x00(%[limit]) \n\t" |
| 496 | + /* ftmp1: p3 */ | |
| 497 | + "gsldlc1 %[ftmp1], 0x07(%[src_ptr]) \n\t" | |
| 498 | + "gsldrc1 %[ftmp1], 0x00(%[src_ptr]) \n\t" | |
| 499 | + /* ftmp3: p2 */ | |
| 500 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 501 | + "gsldlc1 %[ftmp3], 0x07(%[src_ptr]) \n\t" | |
| 502 | + "gsldrc1 %[ftmp3], 0x00(%[src_ptr]) \n\t" | |
| 503 | + /* ftmp4: p1 */ | |
| 504 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 505 | + "gsldlc1 %[ftmp4], 0x07(%[src_ptr]) \n\t" | |
| 506 | + "gsldrc1 %[ftmp4], 0x00(%[src_ptr]) \n\t" | |
| 507 | + /* ftmp5: p0 */ | |
| 508 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 509 | + "gsldlc1 %[ftmp5], 0x07(%[src_ptr]) \n\t" | |
| 510 | + "gsldrc1 %[ftmp5], 0x00(%[src_ptr]) \n\t" | |
| 511 | + /* ftmp6: q0 */ | |
| 512 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 513 | + "gsldlc1 %[ftmp6], 0x07(%[src_ptr]) \n\t" | |
| 514 | + "gsldrc1 %[ftmp6], 0x00(%[src_ptr]) \n\t" | |
| 515 | + /* ftmp7: q1 */ | |
| 516 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 517 | + "gsldlc1 %[ftmp7], 0x07(%[src_ptr]) \n\t" | |
| 518 | + "gsldrc1 %[ftmp7], 0x00(%[src_ptr]) \n\t" | |
| 519 | + /* ftmp8: q2 */ | |
| 520 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 521 | + "gsldlc1 %[ftmp8], 0x07(%[src_ptr]) \n\t" | |
| 522 | + "gsldrc1 %[ftmp8], 0x00(%[src_ptr]) \n\t" | |
| 523 | + /* ftmp2: q3 */ | |
| 524 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 525 | + "gsldlc1 %[ftmp2], 0x07(%[src_ptr]) \n\t" | |
| 526 | + "gsldrc1 %[ftmp2], 0x00(%[src_ptr]) \n\t" | |
| 527 | + | |
| 528 | + "gsldlc1 %[ftmp12], 0x07(%[blimit]) \n\t" | |
| 529 | + "gsldrc1 %[ftmp12], 0x00(%[blimit]) \n\t" | |
| 501 | 530 | |
| 502 | − MMI_ADDU(%[addr0], %[src_ptr], %[src_pixel_step]) | |
| 503 | − | |
| 504 | − MMI_SLL(%[tmp0], %[src_pixel_step], 0x02) | |
| 505 | − MMI_SUBU(%[addr1], %[src_ptr], %[tmp0]) | |
| 506 | − "gsldlc1 %[ftmp1], 0x07(%[addr1]) \n\t" | |
| 507 | − "gsldrc1 %[ftmp1], 0x00(%[addr1]) \n\t" | |
| 508 | − MMI_SUBU(%[addr1], %[addr0], %[tmp0]) | |
| 509 | − "gsldlc1 %[ftmp3], 0x07(%[addr1]) \n\t" | |
| 510 | − "gsldrc1 %[ftmp3], 0x00(%[addr1]) \n\t" | |
| 511 | 531 | "pasubub %[ftmp0], %[ftmp1], %[ftmp3] \n\t" |
| 512 | 532 | "psubusb %[ftmp0], %[ftmp0], %[ftmp9] \n\t" |
| 513 | − | |
| 514 | − /* ftmp4:p1 */ | |
| 515 | − MMI_SLL(%[tmp0], %[src_pixel_step], 0x01) | |
| 516 | − MMI_SUBU(%[addr1], %[src_ptr], %[tmp0]) | |
| 517 | − "gsldlc1 %[ftmp4], 0x07(%[addr1]) \n\t" | |
| 518 | − "gsldrc1 %[ftmp4], 0x00(%[addr1]) \n\t" | |
| 519 | 533 | "pasubub %[ftmp1], %[ftmp3], %[ftmp4] \n\t" |
| 520 | 534 | "psubusb %[ftmp1], %[ftmp1], %[ftmp9] \n\t" |
| 521 | 535 | "or %[ftmp0], %[ftmp0], %[ftmp1] \n\t" |
| 522 | − | |
| 523 | − /* ftmp5:p0 */ | |
| 524 | − MMI_SUBU(%[addr1], %[src_ptr], %[src_pixel_step]) | |
| 525 | − "gsldlc1 %[ftmp5], 0x07(%[addr1]) \n\t" | |
| 526 | − "gsldrc1 %[ftmp5], 0x00(%[addr1]) \n\t" | |
| 527 | − "pasubub %[ftmp1], %[ftmp4], %[ftmp5] \n\t" | |
| 528 | − "sdc1 %[ftmp1], 0x00(%[srct]) \n\t" | |
| 529 | − "psubusb %[ftmp1], %[ftmp1], %[ftmp9] \n\t" | |
| 536 | + "pasubub %[ftmp10], %[ftmp4], %[ftmp5] \n\t" | |
| 537 | + "psubusb %[ftmp1], %[ftmp10], %[ftmp9] \n\t" | |
| 530 | 538 | "or %[ftmp0], %[ftmp0], %[ftmp1] \n\t" |
| 531 | − | |
| 532 | − /* ftmp6:q0 */ | |
| 533 | − "gsldlc1 %[ftmp6], 0x07(%[src_ptr]) \n\t" | |
| 534 | − "gsldrc1 %[ftmp6], 0x00(%[src_ptr]) \n\t" | |
| 535 | − | |
| 536 | − /* ftmp7:q1 */ | |
| 537 | − "gsldlc1 %[ftmp7], 0x07(%[addr0]) \n\t" | |
| 538 | − "gsldrc1 %[ftmp7], 0x00(%[addr0]) \n\t" | |
| 539 | − "pasubub %[ftmp1], %[ftmp7], %[ftmp6] \n\t" | |
| 540 | − "sdc1 %[ftmp1], 0x08(%[srct]) \n\t" | |
| 541 | − "psubusb %[ftmp1], %[ftmp1], %[ftmp9] \n\t" | |
| 539 | + "pasubub %[ftmp11], %[ftmp7], %[ftmp6] \n\t" | |
| 540 | + "psubusb %[ftmp1], %[ftmp11], %[ftmp9] \n\t" | |
| 542 | 541 | "or %[ftmp0], %[ftmp0], %[ftmp1] \n\t" |
| 543 | − | |
| 544 | − MMI_ADDU(%[addr1], %[src_ptr], %[tmp0]) | |
| 545 | − "gsldlc1 %[ftmp8], 0x07(%[addr1]) \n\t" | |
| 546 | − "gsldrc1 %[ftmp8], 0x00(%[addr1]) \n\t" | |
| 547 | 542 | "pasubub %[ftmp1], %[ftmp8], %[ftmp7] \n\t" |
| 548 | 543 | "psubusb %[ftmp1], %[ftmp1], %[ftmp9] \n\t" |
| 549 | 544 | "or %[ftmp0], %[ftmp0], %[ftmp1] \n\t" |
| 550 | − | |
| 551 | − MMI_ADDU(%[addr1], %[addr0], %[tmp0]) | |
| 552 | − "gsldlc1 %[ftmp2], 0x07(%[addr1]) \n\t" | |
| 553 | − "gsldrc1 %[ftmp2], 0x00(%[addr1]) \n\t" | |
| 554 | 545 | "pasubub %[ftmp1], %[ftmp2], %[ftmp8] \n\t" |
| 555 | 546 | "psubusb %[ftmp1], %[ftmp1], %[ftmp9] \n\t" |
| 556 | 547 | "or %[ftmp0], %[ftmp0], %[ftmp1] \n\t" |
| @@ -563,9 +554,7 @@ void vp8_mbloop_filter_horizontal_edge_mmi( · 6 unmodified lines | ||
| 563 | 554 | "mtc1 %[tmp0], %[ftmp9] \n\t" |
| 564 | 555 | "psrlh %[ftmp2], %[ftmp2], %[ftmp9] \n\t" |
| 565 | 556 | "paddusb %[ftmp1], %[ftmp1], %[ftmp2] \n\t" |
| 566 | − "gsldlc1 %[ftmp9], 0x07(%[blimit]) \n\t" | |
| 567 | − "gsldrc1 %[ftmp9], 0x00(%[blimit]) \n\t" | |
| 568 | − "psubusb %[ftmp1], %[ftmp1], %[ftmp9] \n\t" | |
| 557 | + "psubusb %[ftmp1], %[ftmp1], %[ftmp12] \n\t" | |
| 569 | 558 | "or %[ftmp0], %[ftmp0], %[ftmp1] \n\t" |
| 570 | 559 | "xor %[ftmp9], %[ftmp9], %[ftmp9] \n\t" |
| 571 | 560 | /* ftmp0: mask */ |
| @@ -573,29 +562,26 @@ void vp8_mbloop_filter_horizontal_edge_mmi( · 1 unmodified line | ||
| 573 | 562 | |
| 574 | 563 | "gsldlc1 %[ftmp9], 0x07(%[thresh]) \n\t" |
| 575 | 564 | "gsldrc1 %[ftmp9], 0x00(%[thresh]) \n\t" |
| 576 | − "ldc1 %[ftmp1], 0x00(%[srct]) \n\t" | |
| 577 | − "psubusb %[ftmp1], %[ftmp1], %[ftmp9] \n\t" | |
| 578 | − "ldc1 %[ftmp2], 0x08(%[srct]) \n\t" | |
| 579 | − "psubusb %[ftmp2], %[ftmp2], %[ftmp9] \n\t" | |
| 565 | + "psubusb %[ftmp1], %[ftmp10], %[ftmp9] \n\t" | |
| 566 | + "psubusb %[ftmp2], %[ftmp11], %[ftmp9] \n\t" | |
| 580 | 567 | "paddb %[ftmp1], %[ftmp1], %[ftmp2] \n\t" |
| 581 | 568 | "xor %[ftmp2], %[ftmp2], %[ftmp2] \n\t" |
| 582 | 569 | "pcmpeqb %[ftmp1], %[ftmp1], %[ftmp2] \n\t" |
| 583 | 570 | "pcmpeqb %[ftmp2], %[ftmp2], %[ftmp2] \n\t" |
| 584 | − /* ftmp1:hev*/ | |
| 571 | + /* ftmp1: hev */ | |
| 585 | 572 | "xor %[ftmp1], %[ftmp1], %[ftmp2] \n\t" |
| 586 | 573 | |
| 587 | 574 | "xor %[ftmp4], %[ftmp4], %[ff_pb_80] \n\t" |
| 588 | 575 | "xor %[ftmp5], %[ftmp5], %[ff_pb_80] \n\t" |
| 589 | 576 | "xor %[ftmp6], %[ftmp6], %[ff_pb_80] \n\t" |
| 590 | 577 | "xor %[ftmp7], %[ftmp7], %[ff_pb_80] \n\t" |
| 591 | − | |
| 592 | 578 | "psubsb %[ftmp2], %[ftmp4], %[ftmp7] \n\t" |
| 593 | 579 | "psubsb %[ftmp9], %[ftmp6], %[ftmp5] \n\t" |
| 594 | 580 | "paddsb %[ftmp2], %[ftmp2], %[ftmp9] \n\t" |
| 595 | 581 | "paddsb %[ftmp2], %[ftmp2], %[ftmp9] \n\t" |
| 596 | 582 | "paddsb %[ftmp2], %[ftmp2], %[ftmp9] \n\t" |
| 597 | 583 | "and %[ftmp2], %[ftmp2], %[ftmp0] \n\t" |
| 598 | − "sdc1 %[ftmp2], 0x00(%[srct]) \n\t" | |
| 584 | + "pandn %[ftmp12], %[ftmp1], %[ftmp2] \n\t" | |
| 599 | 585 | "and %[ftmp2], %[ftmp2], %[ftmp1] \n\t" |
| 600 | 586 | |
| 601 | 587 | "li %[tmp0], 0x0b \n\t" |
| @@ -606,75 +592,71 @@ void vp8_mbloop_filter_horizontal_edge_mmi( · 4 unmodified lines | ||
| 606 | 592 | "paddsb %[ftmp0], %[ftmp2], %[ff_pb_04] \n\t" |
| 607 | 593 | VP8_MBLOOP_HPSRAB |
| 608 | 594 | "psubsb %[ftmp6], %[ftmp6], %[ftmp0] \n\t" |
| 609 | − "ldc1 %[ftmp2], 0x00(%[srct]) \n\t" | |
| 610 | − "pandn %[ftmp2], %[ftmp1], %[ftmp2] \n\t" | |
| 611 | 595 | |
| 612 | 596 | "li %[tmp0], 0x07 \n\t" |
| 613 | 597 | "mtc1 %[tmp0], %[ftmp9] \n\t" |
| 598 | + "xor %[ftmp0], %[ftmp0], %[ftmp0] \n\t" | |
| 599 | + | |
| 614 | 600 | VP8_MBLOOP_HPSRAB_ADD(%[ff_ph_1b00]) |
| 615 | − "psubsb %[ftmp6], %[ftmp6], %[ftmp3] \n\t" | |
| 616 | − "paddsb %[ftmp5], %[ftmp5], %[ftmp3] \n\t" | |
| 601 | + "psubsb %[ftmp6], %[ftmp6], %[ftmp1] \n\t" | |
| 602 | + "paddsb %[ftmp5], %[ftmp5], %[ftmp1] \n\t" | |
| 617 | 603 | "xor %[ftmp6], %[ftmp6], %[ff_pb_80] \n\t" |
| 618 | 604 | "xor %[ftmp5], %[ftmp5], %[ff_pb_80] \n\t" |
| 619 | − | |
| 620 | − MMI_SUBU(%[addr1], %[src_ptr], %[src_pixel_step]) | |
| 621 | − "gssdlc1 %[ftmp5], 0x07(%[addr1]) \n\t" | |
| 622 | − "gssdrc1 %[ftmp5], 0x00(%[addr1]) \n\t" | |
| 605 | + MMI_SLL(%[tmp0], %[src_pixel_step], 0x02) | |
| 606 | + MMI_SUBU(%[src_ptr], %[src_ptr], %[tmp0]) | |
| 607 | + "gssdlc1 %[ftmp5], 0x07(%[src_ptr]) \n\t" | |
| 608 | + "gssdrc1 %[ftmp5], 0x00(%[src_ptr]) \n\t" | |
| 609 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 623 | 610 | "gssdlc1 %[ftmp6], 0x07(%[src_ptr]) \n\t" |
| 624 | 611 | "gssdrc1 %[ftmp6], 0x00(%[src_ptr]) \n\t" |
| 612 | + | |
| 625 | 613 | VP8_MBLOOP_HPSRAB_ADD(%[ff_ph_1200]) |
| 626 | − "paddsb %[ftmp4], %[ftmp4], %[ftmp3] \n\t" | |
| 627 | − "psubsb %[ftmp7], %[ftmp7], %[ftmp3] \n\t" | |
| 614 | + "paddsb %[ftmp4], %[ftmp4], %[ftmp1] \n\t" | |
| 615 | + "psubsb %[ftmp7], %[ftmp7], %[ftmp1] \n\t" | |
| 628 | 616 | "xor %[ftmp4], %[ftmp4], %[ff_pb_80] \n\t" |
| 629 | 617 | "xor %[ftmp7], %[ftmp7], %[ff_pb_80] \n\t" |
| 630 | − | |
| 631 | − "gssdlc1 %[ftmp7], 0x07(%[addr0]) \n\t" | |
| 632 | − "gssdrc1 %[ftmp7], 0x00(%[addr0]) \n\t" | |
| 633 | − MMI_SLL(%[tmp0], %[src_pixel_step], 0x01) | |
| 634 | − MMI_SUBU(%[addr1], %[src_ptr], %[tmp0]) | |
| 635 | − "gssdlc1 %[ftmp4], 0x07(%[addr1]) \n\t" | |
| 636 | − "gssdrc1 %[ftmp4], 0x00(%[addr1]) \n\t" | |
| 618 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 619 | + "gssdlc1 %[ftmp7], 0x07(%[src_ptr]) \n\t" | |
| 620 | + "gssdrc1 %[ftmp7], 0x00(%[src_ptr]) \n\t" | |
| 621 | + MMI_SUBU(%[src_ptr], %[src_ptr], %[tmp0]) | |
| 622 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 623 | + "gssdlc1 %[ftmp4], 0x07(%[src_ptr]) \n\t" | |
| 624 | + "gssdrc1 %[ftmp4], 0x00(%[src_ptr]) \n\t" | |
| 637 | 625 | |
| 638 | 626 | VP8_MBLOOP_HPSRAB_ADD(%[ff_ph_0900]) |
| 639 | − MMI_SLL(%[tmp0], %[src_pixel_step], 0x02) | |
| 640 | − MMI_SUBU(%[addr1], %[addr0], %[tmp0]) | |
| 641 | − "gsldlc1 %[ftmp4], 0x07(%[addr1]) \n\t" | |
| 642 | − "gsldrc1 %[ftmp4], 0x00(%[addr1]) \n\t" | |
| 643 | − MMI_ADDU(%[addr1], %[addr0], %[src_pixel_step]) | |
| 644 | − "gsldlc1 %[ftmp7], 0x07(%[addr1]) \n\t" | |
| 645 | − "gsldrc1 %[ftmp7], 0x00(%[addr1]) \n\t" | |
| 646 | − | |
| 647 | − "xor %[ftmp4], %[ftmp4], %[ff_pb_80] \n\t" | |
| 648 | − "xor %[ftmp7], %[ftmp7], %[ff_pb_80] \n\t" | |
| 649 | − "paddsb %[ftmp4], %[ftmp4], %[ftmp3] \n\t" | |
| 650 | − "psubsb %[ftmp7], %[ftmp7], %[ftmp3] \n\t" | |
| 651 | − "xor %[ftmp4], %[ftmp4], %[ff_pb_80] \n\t" | |
| 652 | − "xor %[ftmp7], %[ftmp7], %[ff_pb_80] \n\t" | |
| 653 | − MMI_ADDU(%[addr1], %[addr0], %[src_pixel_step]) | |
| 654 | − "gssdlc1 %[ftmp7], 0x07(%[addr1]) \n\t" | |
| 655 | − "gssdrc1 %[ftmp7], 0x00(%[addr1]) \n\t" | |
| 656 | − MMI_SUBU(%[addr1], %[addr0], %[tmp0]) | |
| 657 | − "gssdlc1 %[ftmp4], 0x07(%[addr1]) \n\t" | |
| 658 | − "gssdrc1 %[ftmp4], 0x00(%[addr1]) \n\t" | |
| 627 | + "xor %[ftmp3], %[ftmp3], %[ff_pb_80] \n\t" | |
| 628 | + "xor %[ftmp8], %[ftmp8], %[ff_pb_80] \n\t" | |
| 629 | + "paddsb %[ftmp3], %[ftmp3], %[ftmp1] \n\t" | |
| 630 | + "psubsb %[ftmp8], %[ftmp8], %[ftmp1] \n\t" | |
| 631 | + "xor %[ftmp3], %[ftmp3], %[ff_pb_80] \n\t" | |
| 632 | + "xor %[ftmp8], %[ftmp8], %[ff_pb_80] \n\t" | |
| 633 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[tmp0]) | |
| 634 | + "gssdlc1 %[ftmp8], 0x07(%[src_ptr]) \n\t" | |
| 635 | + "gssdrc1 %[ftmp8], 0x00(%[src_ptr]) \n\t" | |
| 636 | + MMI_SUBU(%[src_ptr], %[src_ptr], %[tmp0]) | |
| 637 | + MMI_SUBU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 638 | + "gssdlc1 %[ftmp3], 0x07(%[src_ptr]) \n\t" | |
| 639 | + "gssdrc1 %[ftmp3], 0x00(%[src_ptr]) \n\t" | |
| 659 | 640 | |
| 660 | − "addiu %[count], %[count], -0x01 \n\t" | |
| 641 | + MMI_SUBU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 661 | 642 | MMI_ADDIU(%[src_ptr], %[src_ptr], 0x08) |
| 643 | + "addiu %[count], %[count], -0x01 \n\t" | |
| 662 | 644 | "bnez %[count], 1b \n\t" |
| 663 | 645 | : [ftmp0]"=&f"(ftmp[0]), [ftmp1]"=&f"(ftmp[1]), |
| 664 | 646 | [ftmp2]"=&f"(ftmp[2]), [ftmp3]"=&f"(ftmp[3]), |
| 665 | 647 | [ftmp4]"=&f"(ftmp[4]), [ftmp5]"=&f"(ftmp[5]), |
| 666 | 648 | [ftmp6]"=&f"(ftmp[6]), [ftmp7]"=&f"(ftmp[7]), |
| 667 | 649 | [ftmp8]"=&f"(ftmp[8]), [ftmp9]"=&f"(ftmp[9]), |
| 668 | − [tmp0]"=&r"(tmp[0]), | |
| 669 | − [addr0]"=&r"(addr[0]), [addr1]"=&r"(addr[1]), | |
| 670 | − [src_ptr]"+&r"(src_ptr), [count]"+&r"(count) | |
| 671 | − : [limit]"r"(limit), [blimit]"r"(blimit), | |
| 672 | − [srct]"r"(srct), [thresh]"r"(thresh), | |
| 650 | + [ftmp10]"=&f"(ftmp[10]), [ftmp11]"=&f"(ftmp[11]), | |
| 651 | + [ftmp12]"=&f"(ftmp[12]), [tmp0]"=&r"(tmp[0]), | |
| 652 | + [src_ptr]"+&r"(src_ptr), [count]"+&r"(count) | |
| 653 | + : [limit]"r"(limit), [blimit]"r"(blimit), | |
| 654 | + [thresh]"r"(thresh), | |
| 673 | 655 | [src_pixel_step]"r"((mips_reg)src_pixel_step), |
| 674 | − [ff_pb_fe]"f"(ff_pb_fe), [ff_pb_80]"f"(ff_pb_80), | |
| 675 | − [ff_pb_04]"f"(ff_pb_04), [ff_pb_03]"f"(ff_pb_03), | |
| 676 | − [ff_ph_0900]"f"(ff_ph_0900), [ff_ph_1b00]"f"(ff_ph_1b00), | |
| 677 | − [ff_ph_1200]"f"(ff_ph_1200), [ff_ph_003f]"f"(ff_ph_003f) | |
| 656 | + [ff_pb_fe]"f"(ff_pb_fe), [ff_pb_80]"f"(ff_pb_80), | |
| 657 | + [ff_pb_04]"f"(ff_pb_04), [ff_pb_03]"f"(ff_pb_03), | |
| 658 | + [ff_ph_0900]"f"(ff_ph_0900), [ff_ph_1b00]"f"(ff_ph_1b00), | |
| 659 | + [ff_ph_1200]"f"(ff_ph_1200), [ff_ph_003f]"f"(ff_ph_003f) | |
| 678 | 660 | : "memory" |
| 679 | 661 | ); |
| 680 | 662 | } |
| @@ -696,64 +678,60 @@ void vp8_mbloop_filter_vertical_edge_mmi( · 15 unmodified lines | ||
| 696 | 678 | unsigned char *src_ptr, int src_pixel_step, const unsigned char *blimit, |
| 697 | 679 | const unsigned char *limit, const unsigned char *thresh, int count) { |
| 698 | 680 | mips_reg tmp[1]; |
| 699 | − mips_reg addr[2]; | |
| 700 | 681 | DECLARE_ALIGNED(8, const uint64_t, srct[1]); |
| 701 | − double ftmp[13]; | |
| 682 | + double ftmp[14]; | |
| 702 | 683 | |
| 703 | 684 | __asm__ volatile ( |
| 704 | − MMI_SLL(%[tmp0], %[src_pixel_step], 0x02) | |
| 705 | − MMI_ADDU(%[src_ptr], %[src_ptr], %[tmp0]) | |
| 706 | 685 | MMI_SUBU(%[src_ptr], %[src_ptr], 0x04) |
| 707 | 686 | |
| 708 | 687 | "1: \n\t" |
| 709 | − MMI_SLL (%[tmp0], %[src_pixel_step], 0x01) | |
| 710 | − MMI_ADDU(%[addr0], %[src_ptr], %[tmp0]) | |
| 711 | − "gsldlc1 %[ftmp11], 0x07(%[addr0]) \n\t" | |
| 712 | − "gsldrc1 %[ftmp11], 0x00(%[addr0]) \n\t" | |
| 713 | − MMI_ADDU(%[addr0], %[addr0], %[src_pixel_step]) | |
| 714 | − "gsldlc1 %[ftmp12], 0x07(%[addr0]) \n\t" | |
| 715 | − "gsldrc1 %[ftmp12], 0x00(%[addr0]) \n\t" | |
| 716 | − "punpcklbh %[ftmp1], %[ftmp11], %[ftmp12] \n\t" | |
| 717 | − "punpckhbh %[ftmp2], %[ftmp11], %[ftmp12] \n\t" | |
| 718 | − | |
| 719 | − "gsldlc1 %[ftmp11], 0x07(%[src_ptr]) \n\t" | |
| 720 | − "gsldrc1 %[ftmp11], 0x00(%[src_ptr]) \n\t" | |
| 721 | − MMI_ADDU(%[addr0], %[src_ptr], %[src_pixel_step]) | |
| 722 | − "gsldlc1 %[ftmp12], 0x07(%[addr0]) \n\t" | |
| 723 | − "gsldrc1 %[ftmp12], 0x00(%[addr0]) \n\t" | |
| 724 | − "punpcklbh %[ftmp3], %[ftmp11], %[ftmp12] \n\t" | |
| 725 | − "punpckhbh %[ftmp4], %[ftmp11], %[ftmp12] \n\t" | |
| 726 | − | |
| 727 | − "punpcklhw %[ftmp5], %[ftmp4], %[ftmp2] \n\t" | |
| 728 | − "punpckhhw %[ftmp6], %[ftmp4], %[ftmp2] \n\t" | |
| 729 | − "punpcklhw %[ftmp7], %[ftmp3], %[ftmp1] \n\t" | |
| 730 | − "punpckhhw %[ftmp8], %[ftmp3], %[ftmp1] \n\t" | |
| 731 | − | |
| 732 | − MMI_SLL(%[tmp0], %[src_pixel_step], 0x01) | |
| 733 | − MMI_SUBU(%[addr0], %[src_ptr], %[tmp0]) | |
| 734 | − "gsldlc1 %[ftmp11], 0x07(%[addr0]) \n\t" | |
| 735 | − "gsldrc1 %[ftmp11], 0x00(%[addr0]) \n\t" | |
| 736 | − MMI_SUBU(%[addr0], %[src_ptr], %[src_pixel_step]) | |
| 737 | − "gsldlc1 %[ftmp12], 0x07(%[addr0]) \n\t" | |
| 738 | − "gsldrc1 %[ftmp12], 0x00(%[addr0]) \n\t" | |
| 739 | − "punpcklbh %[ftmp9], %[ftmp11], %[ftmp12] \n\t" | |
| 740 | − "punpckhbh %[ftmp10], %[ftmp11], %[ftmp12] \n\t" | |
| 741 | − | |
| 742 | − MMI_SLL(%[tmp0], %[src_pixel_step], 0x02) | |
| 743 | − MMI_SUBU(%[addr0], %[src_ptr], %[tmp0]) | |
| 744 | − "gsldlc1 %[ftmp11], 0x07(%[addr0]) \n\t" | |
| 745 | − "gsldrc1 %[ftmp11], 0x00(%[addr0]) \n\t" | |
| 746 | − MMI_ADDU(%[addr0], %[addr0], %[src_pixel_step]) | |
| 747 | − "gsldlc1 %[ftmp12], 0x07(%[addr0]) \n\t" | |
| 748 | − "gsldrc1 %[ftmp12], 0x00(%[addr0]) \n\t" | |
| 749 | − "punpcklbh %[ftmp0], %[ftmp11], %[ftmp12] \n\t" | |
| 750 | − "punpckhbh %[ftmp11], %[ftmp11], %[ftmp12] \n\t" | |
| 751 | − | |
| 752 | − "punpcklhw %[ftmp1], %[ftmp11], %[ftmp10] \n\t" | |
| 753 | − "punpckhhw %[ftmp2], %[ftmp11], %[ftmp10] \n\t" | |
| 754 | − "punpcklhw %[ftmp3], %[ftmp0], %[ftmp9] \n\t" | |
| 755 | − "punpckhhw %[ftmp4], %[ftmp0], %[ftmp9] \n\t" | |
| 756 | − | |
| 688 | + "gsldlc1 %[ftmp5], 0x07(%[src_ptr]) \n\t" | |
| 689 | + "gsldrc1 %[ftmp5], 0x00(%[src_ptr]) \n\t" | |
| 690 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 691 | + "gsldlc1 %[ftmp6], 0x07(%[src_ptr]) \n\t" | |
| 692 | + "gsldrc1 %[ftmp6], 0x00(%[src_ptr]) \n\t" | |
| 693 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 694 | + "gsldlc1 %[ftmp7], 0x07(%[src_ptr]) \n\t" | |
| 695 | + "gsldrc1 %[ftmp7], 0x00(%[src_ptr]) \n\t" | |
| 696 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 697 | + "gsldlc1 %[ftmp8], 0x07(%[src_ptr]) \n\t" | |
| 698 | + "gsldrc1 %[ftmp8], 0x00(%[src_ptr]) \n\t" | |
| 699 | + | |
| 700 | + "punpcklbh %[ftmp11], %[ftmp5], %[ftmp6] \n\t" | |
| 701 | + "punpckhbh %[ftmp12], %[ftmp5], %[ftmp6] \n\t" | |
| 702 | + "punpcklbh %[ftmp9], %[ftmp7], %[ftmp8] \n\t" | |
| 703 | + "punpckhbh %[ftmp10], %[ftmp7], %[ftmp8] \n\t" | |
| 704 | + | |
| 705 | + "punpcklhw %[ftmp1], %[ftmp12], %[ftmp10] \n\t" | |
| 706 | + "punpckhhw %[ftmp2], %[ftmp12], %[ftmp10] \n\t" | |
| 707 | + "punpcklhw %[ftmp3], %[ftmp11], %[ftmp9] \n\t" | |
| 708 | + "punpckhhw %[ftmp4], %[ftmp11], %[ftmp9] \n\t" | |
| 709 | + | |
| 710 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 711 | + "gsldlc1 %[ftmp5], 0x07(%[src_ptr]) \n\t" | |
| 712 | + "gsldrc1 %[ftmp5], 0x00(%[src_ptr]) \n\t" | |
| 713 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 714 | + "gsldlc1 %[ftmp6], 0x07(%[src_ptr]) \n\t" | |
| 715 | + "gsldrc1 %[ftmp6], 0x00(%[src_ptr]) \n\t" | |
| 716 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 717 | + "gsldlc1 %[ftmp7], 0x07(%[src_ptr]) \n\t" | |
| 718 | + "gsldrc1 %[ftmp7], 0x00(%[src_ptr]) \n\t" | |
| 719 | + MMI_ADDU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 720 | + "gsldlc1 %[ftmp8], 0x07(%[src_ptr]) \n\t" | |
| 721 | + "gsldrc1 %[ftmp8], 0x00(%[src_ptr]) \n\t" | |
| 722 | + | |
| 723 | + "punpcklbh %[ftmp11], %[ftmp5], %[ftmp6] \n\t" | |
| 724 | + "punpckhbh %[ftmp12], %[ftmp5], %[ftmp6] \n\t" | |
| 725 | + "punpcklbh %[ftmp9], %[ftmp7], %[ftmp8] \n\t" | |
| 726 | + "punpckhbh %[ftmp10], %[ftmp7], %[ftmp8] \n\t" | |
| 727 | + | |
| 728 | + "punpcklhw %[ftmp5], %[ftmp12], %[ftmp10] \n\t" | |
| 729 | + "punpckhhw %[ftmp6], %[ftmp12], %[ftmp10] \n\t" | |
| 730 | + "punpcklhw %[ftmp7], %[ftmp11], %[ftmp9] \n\t" | |
| 731 | + "punpckhhw %[ftmp8], %[ftmp11], %[ftmp9] \n\t" | |
| 732 | + | |
| 733 | + "gsldlc1 %[ftmp13], 0x07(%[limit]) \n\t" | |
| 734 | + "gsldrc1 %[ftmp13], 0x00(%[limit]) \n\t" | |
| 757 | 735 | /* ftmp9:q0 ftmp10:q1 */ |
| 758 | 736 | "punpcklwd %[ftmp9], %[ftmp1], %[ftmp5] \n\t" |
| 759 | 737 | "punpckhwd %[ftmp10], %[ftmp1], %[ftmp5] \n\t" |
| @@ -771,60 +749,61 @@ void vp8_mbloop_filter_vertical_edge_mmi( · 11 unmodified lines | ||
| 771 | 749 | "punpcklwd %[ftmp5], %[ftmp4], %[ftmp8] \n\t" |
| 772 | 750 | "punpckhwd %[ftmp6], %[ftmp4], %[ftmp8] \n\t" |
| 773 | 751 | |
| 774 | − "gsldlc1 %[ftmp8], 0x07(%[limit]) \n\t" | |
| 775 | − "gsldrc1 %[ftmp8], 0x00(%[limit]) \n\t" | |
| 776 | − | |
| 777 | 752 | /* abs (q3-q2) */ |
| 778 | 753 | "pasubub %[ftmp7], %[ftmp12], %[ftmp11] \n\t" |
| 779 | − "psubusb %[ftmp0], %[ftmp7], %[ftmp8] \n\t" | |
| 754 | + "psubusb %[ftmp0], %[ftmp7], %[ftmp13] \n\t" | |
| 780 | 755 | /* abs (q2-q1) */ |
| 781 | 756 | "pasubub %[ftmp7], %[ftmp11], %[ftmp10] \n\t" |
| 782 | − "psubusb %[ftmp7], %[ftmp7], %[ftmp8] \n\t" | |
| 757 | + "psubusb %[ftmp7], %[ftmp7], %[ftmp13] \n\t" | |
| 783 | 758 | "or %[ftmp0], %[ftmp0], %[ftmp7] \n\t" |
| 784 | 759 | /* ftmp3: abs(q1-q0) */ |
| 785 | 760 | "pasubub %[ftmp3], %[ftmp10], %[ftmp9] \n\t" |
| 786 | − "psubusb %[ftmp7], %[ftmp3], %[ftmp8] \n\t" | |
| 761 | + "psubusb %[ftmp7], %[ftmp3], %[ftmp13] \n\t" | |
| 787 | 762 | "or %[ftmp0], %[ftmp0], %[ftmp7] \n\t" |
| 788 | 763 | /* ftmp4: abs(p1-p0) */ |
| 789 | 764 | "pasubub %[ftmp4], %[ftmp5], %[ftmp6] \n\t" |
| 790 | − "psubusb %[ftmp7], %[ftmp4], %[ftmp8] \n\t" | |
| 765 | + "psubusb %[ftmp7], %[ftmp4], %[ftmp13] \n\t" | |
| 791 | 766 | "or %[ftmp0], %[ftmp0], %[ftmp7] \n\t" |
| 792 | 767 | /* abs (p2-p1) */ |
| 793 | 768 | "pasubub %[ftmp7], %[ftmp2], %[ftmp5] \n\t" |
| 794 | − "psubusb %[ftmp7], %[ftmp7], %[ftmp8] \n\t" | |
| 769 | + "psubusb %[ftmp7], %[ftmp7], %[ftmp13] \n\t" | |
| 795 | 770 | "or %[ftmp0], %[ftmp0], %[ftmp7] \n\t" |
| 796 | 771 | /* abs (p3-p2) */ |
| 797 | 772 | "pasubub %[ftmp7], %[ftmp1], %[ftmp2] \n\t" |
| 798 | − "psubusb %[ftmp7], %[ftmp7], %[ftmp8] \n\t" | |
| 773 | + "psubusb %[ftmp7], %[ftmp7], %[ftmp13] \n\t" | |
| 799 | 774 | "or %[ftmp0], %[ftmp0], %[ftmp7] \n\t" |
| 800 | − /* abs (p0-q0) */ | |
| 775 | + | |
| 776 | + "gsldlc1 %[ftmp13], 0x07(%[blimit]) \n\t" | |
| 777 | + "gsldrc1 %[ftmp13], 0x00(%[blimit]) \n\t" | |
| 778 | + "gsldlc1 %[ftmp7], 0x07(%[thresh]) \n\t" | |
| 779 | + "gsldrc1 %[ftmp7], 0x00(%[thresh]) \n\t" | |
| 780 | + /* abs (p0-q0) * 2 */ | |
| 801 | 781 | "pasubub %[ftmp1], %[ftmp9], %[ftmp6] \n\t" |
| 802 | 782 | "paddusb %[ftmp1], %[ftmp1], %[ftmp1] \n\t" |
| 803 | − /* abs (p1-q1) */ | |
| 783 | + /* abs (p1-q1) / 2 */ | |
| 804 | 784 | "pasubub %[ftmp12], %[ftmp10], %[ftmp5] \n\t" |
| 805 | 785 | "and %[ftmp12], %[ftmp12], %[ff_pb_fe] \n\t" |
| 806 | 786 | "li %[tmp0], 0x01 \n\t" |
| 807 | 787 | "mtc1 %[tmp0], %[ftmp8] \n\t" |
| 808 | 788 | "psrlh %[ftmp12], %[ftmp12], %[ftmp8] \n\t" |
| 809 | 789 | "paddusb %[ftmp12], %[ftmp1], %[ftmp12] \n\t" |
| 810 | − | |
| 811 | − "gsldlc1 %[ftmp8], 0x07(%[blimit]) \n\t" | |
| 812 | − "gsldrc1 %[ftmp8], 0x00(%[blimit]) \n\t" | |
| 813 | − "psubusb %[ftmp12], %[ftmp12], %[ftmp8] \n\t" | |
| 790 | + "psubusb %[ftmp12], %[ftmp12], %[ftmp13] \n\t" | |
| 814 | 791 | "or %[ftmp0], %[ftmp0], %[ftmp12] \n\t" |
| 815 | 792 | "xor %[ftmp12], %[ftmp12], %[ftmp12] \n\t" |
| 793 | + /* ftmp0: mask */ | |
| 816 | 794 | "pcmpeqb %[ftmp0], %[ftmp0], %[ftmp12] \n\t" |
| 817 | 795 | |
| 818 | − "gsldlc1 %[ftmp8], 0x07(%[thresh]) \n\t" | |
| 819 | − "gsldrc1 %[ftmp8], 0x00(%[thresh]) \n\t" | |
| 820 | − /* ftmp3: abs(q1-q0) ftmp4: abs(p1-p0) */ | |
| 821 | − "psubusb %[ftmp4], %[ftmp4], %[ftmp8] \n\t" | |
| 822 | − "psubusb %[ftmp3], %[ftmp3], %[ftmp8] \n\t" | |
| 796 | + /* abs(p1-p0) - thresh */ | |
| 797 | + "psubusb %[ftmp4], %[ftmp4], %[ftmp7] \n\t" | |
| 798 | + /* abs(q1-q0) - thresh */ | |
| 799 | + "psubusb %[ftmp3], %[ftmp3], %[ftmp7] \n\t" | |
| 823 | 800 | "or %[ftmp3], %[ftmp4], %[ftmp3] \n\t" |
| 824 | 801 | "pcmpeqb %[ftmp3], %[ftmp3], %[ftmp12] \n\t" |
| 825 | 802 | "pcmpeqb %[ftmp1], %[ftmp1], %[ftmp1] \n\t" |
| 803 | + /* ftmp1: hev */ | |
| 826 | 804 | "xor %[ftmp1], %[ftmp3], %[ftmp1] \n\t" |
| 827 | 805 | |
| 806 | + /* ftmp2:ps2, ftmp5:ps1, ftmp6:ps0, ftmp9:qs0, ftmp10:qs1, ftmp11:qs2 */ | |
| 828 | 807 | "xor %[ftmp11], %[ftmp11], %[ff_pb_80] \n\t" |
| 829 | 808 | "xor %[ftmp10], %[ftmp10], %[ff_pb_80] \n\t" |
| 830 | 809 | "xor %[ftmp9], %[ftmp9], %[ff_pb_80] \n\t" |
| @@ -837,30 +816,30 @@ void vp8_mbloop_filter_vertical_edge_mmi( · 6 unmodified lines | ||
| 837 | 816 | "paddsb %[ftmp3], %[ftmp3], %[ftmp4] \n\t" |
| 838 | 817 | "paddsb %[ftmp3], %[ftmp3], %[ftmp4] \n\t" |
| 839 | 818 | "paddsb %[ftmp3], %[ftmp3], %[ftmp4] \n\t" |
| 819 | + /* filter_value &= mask */ | |
| 840 | 820 | "and %[ftmp0], %[ftmp0], %[ftmp3] \n\t" |
| 821 | + /* Filter2 = filter_value & hev */ | |
| 841 | 822 | "and %[ftmp3], %[ftmp1], %[ftmp0] \n\t" |
| 823 | + /* filter_value &= ~hev */ | |
| 842 | 824 | "pandn %[ftmp0], %[ftmp1], %[ftmp0] \n\t" |
| 843 | 825 | |
| 844 | 826 | "paddsb %[ftmp4], %[ftmp3], %[ff_pb_04] \n\t" |
| 845 | 827 | "li %[tmp0], 0x0b \n\t" |
| 846 | 828 | "mtc1 %[tmp0], %[ftmp12] \n\t" |
| 847 | − "xor %[ftmp7], %[ftmp7], %[ftmp7] \n\t" | |
| 848 | − "xor %[ftmp8], %[ftmp8], %[ftmp8] \n\t" | |
| 849 | 829 | "punpcklbh %[ftmp7], %[ftmp7], %[ftmp4] \n\t" |
| 850 | 830 | "punpckhbh %[ftmp8], %[ftmp8], %[ftmp4] \n\t" |
| 851 | 831 | "psrah %[ftmp7], %[ftmp7], %[ftmp12] \n\t" |
| 852 | 832 | "psrah %[ftmp8], %[ftmp8], %[ftmp12] \n\t" |
| 853 | 833 | "packsshb %[ftmp4], %[ftmp7], %[ftmp8] \n\t" |
| 834 | + /* ftmp9: qs0 */ | |
| 854 | 835 | "psubsb %[ftmp9], %[ftmp9], %[ftmp4] \n\t" |
| 855 | 836 | "paddsb %[ftmp3], %[ftmp3], %[ff_pb_03] \n\t" |
| 856 | − "xor %[ftmp7], %[ftmp7], %[ftmp7] \n\t" | |
| 857 | − "xor %[ftmp8], %[ftmp8], %[ftmp8] \n\t" | |
| 858 | 837 | "punpcklbh %[ftmp7], %[ftmp7], %[ftmp3] \n\t" |
| 859 | 838 | "punpckhbh %[ftmp8], %[ftmp8], %[ftmp3] \n\t" |
| 860 | 839 | "psrah %[ftmp7], %[ftmp7], %[ftmp12] \n\t" |
| 861 | 840 | "psrah %[ftmp8], %[ftmp8], %[ftmp12] \n\t" |
| 862 | 841 | "packsshb %[ftmp3], %[ftmp7], %[ftmp8] \n\t" |
| 863 | − | |
| 842 | + /* ftmp6: ps0 */ | |
| 864 | 843 | "paddsb %[ftmp6], %[ftmp6], %[ftmp3] \n\t" |
| 865 | 844 | |
| 866 | 845 | "li %[tmp0], 0x07 \n\t" |
| @@ -872,8 +851,10 @@ void vp8_mbloop_filter_vertical_edge_mmi( · 5 unmodified lines | ||
| 872 | 851 | "pmulhh %[ftmp8], %[ftmp8], %[ftmp1] \n\t" |
| 873 | 852 | VP8_MBLOOP_VPSRAB_ADDT |
| 874 | 853 | "psubsb %[ftmp4], %[ftmp9], %[ftmp3] \n\t" |
| 854 | + /* ftmp9: oq0 */ | |
| 875 | 855 | "xor %[ftmp9], %[ftmp4], %[ff_pb_80] \n\t" |
| 876 | 856 | "paddsb %[ftmp4], %[ftmp6], %[ftmp3] \n\t" |
| 857 | + /* ftmp6: op0 */ | |
| 877 | 858 | "xor %[ftmp6], %[ftmp4], %[ff_pb_80] \n\t" |
| 878 | 859 | |
| 879 | 860 | VP8_MBLOOP_VPSRAB_ADDH |
| @@ -882,8 +863,10 @@ void vp8_mbloop_filter_vertical_edge_mmi( · 2 unmodified lines | ||
| 882 | 863 | "pmulhh %[ftmp8], %[ftmp8], %[ftmp1] \n\t" |
| 883 | 864 | VP8_MBLOOP_VPSRAB_ADDT |
| 884 | 865 | "psubsb %[ftmp4], %[ftmp10], %[ftmp3] \n\t" |
| 866 | + /* ftmp10: oq1 */ | |
| 885 | 867 | "xor %[ftmp10], %[ftmp4], %[ff_pb_80] \n\t" |
| 886 | 868 | "paddsb %[ftmp4], %[ftmp5], %[ftmp3] \n\t" |
| 869 | + /* ftmp5: op1 */ | |
| 887 | 870 | "xor %[ftmp5], %[ftmp4], %[ff_pb_80] \n\t" |
| 888 | 871 | |
| 889 | 872 | VP8_MBLOOP_VPSRAB_ADDH |
| @@ -891,8 +874,10 @@ void vp8_mbloop_filter_vertical_edge_mmi( · 1 unmodified line | ||
| 891 | 874 | "pmulhh %[ftmp8], %[ftmp8], %[ff_ph_0900] \n\t" |
| 892 | 875 | VP8_MBLOOP_VPSRAB_ADDT |
| 893 | 876 | "psubsb %[ftmp4], %[ftmp11], %[ftmp3] \n\t" |
| 877 | + /* ftmp11: oq2 */ | |
| 894 | 878 | "xor %[ftmp11], %[ftmp4], %[ff_pb_80] \n\t" |
| 895 | 879 | "paddsb %[ftmp4], %[ftmp2], %[ftmp3] \n\t" |
| 880 | + /* ftmp2: op2 */ | |
| 896 | 881 | "xor %[ftmp2], %[ftmp4], %[ff_pb_80] \n\t" |
| 897 | 882 | |
| 898 | 883 | "ldc1 %[ftmp12], 0x00(%[srct]) \n\t" |
| @@ -916,41 +901,40 @@ void vp8_mbloop_filter_vertical_edge_mmi( · 17 unmodified lines | ||
| 916 | 901 | "punpcklhw %[ftmp10], %[ftmp1], %[ftmp3] \n\t" |
| 917 | 902 | "punpckhhw %[ftmp11], %[ftmp1], %[ftmp3] \n\t" |
| 918 | 903 | |
| 904 | + "punpcklwd %[ftmp0], %[ftmp7], %[ftmp11] \n\t" | |
| 905 | + "punpckhwd %[ftmp1], %[ftmp7], %[ftmp11] \n\t" | |
| 906 | + "gssdlc1 %[ftmp1], 0x07(%[src_ptr]) \n\t" | |
| 907 | + "gssdrc1 %[ftmp1], 0x00(%[src_ptr]) \n\t" | |
| 908 | + MMI_SUBU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 909 | + "gssdlc1 %[ftmp0], 0x07(%[src_ptr]) \n\t" | |
| 910 | + "gssdrc1 %[ftmp0], 0x00(%[src_ptr]) \n\t" | |
| 911 | + | |
| 919 | 912 | "punpcklwd %[ftmp0], %[ftmp6], %[ftmp10] \n\t" |
| 920 | 913 | "punpckhwd %[ftmp1], %[ftmp6], %[ftmp10] \n\t" |
| 921 | − | |
| 914 | + MMI_SUBU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 915 | + "gssdlc1 %[ftmp1], 0x07(%[src_ptr]) \n\t" | |
| 916 | + "gssdrc1 %[ftmp1], 0x00(%[src_ptr]) \n\t" | |
| 917 | + MMI_SUBU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 922 | 918 | "gssdlc1 %[ftmp0], 0x07(%[src_ptr]) \n\t" |
| 923 | 919 | "gssdrc1 %[ftmp0], 0x00(%[src_ptr]) \n\t" |
| 924 | − MMI_ADDU(%[addr0], %[src_ptr], %[src_pixel_step]) | |
| 925 | − "gssdlc1 %[ftmp1], 0x07(%[addr0]) \n\t" | |
| 926 | − "gssdrc1 %[ftmp1], 0x00(%[addr0]) \n\t" | |
| 927 | − | |
| 928 | − "punpcklwd %[ftmp0], %[ftmp7], %[ftmp11] \n\t" | |
| 929 | − "punpckhwd %[ftmp1], %[ftmp7], %[ftmp11] \n\t" | |
| 930 | − MMI_ADDU(%[addr0], %[addr0], %[src_pixel_step]) | |
| 931 | − "gssdlc1 %[ftmp0], 0x07(%[addr0]) \n\t" | |
| 932 | − "gssdrc1 %[ftmp0], 0x00(%[addr0]) \n\t" | |
| 933 | − MMI_ADDU(%[addr0], %[addr0], %[src_pixel_step]) | |
| 934 | − "gssdlc1 %[ftmp1], 0x07(%[addr0]) \n\t" | |
| 935 | − "gssdrc1 %[ftmp1], 0x00(%[addr0]) \n\t" | |
| 936 | 920 | |
| 937 | 921 | "punpcklwd %[ftmp1], %[ftmp5], %[ftmp9] \n\t" |
| 938 | 922 | "punpckhwd %[ftmp0], %[ftmp5], %[ftmp9] \n\t" |
| 939 | − MMI_SUBU(%[addr0], %[src_ptr], %[src_pixel_step]) | |
| 940 | − "gssdlc1 %[ftmp0], 0x07(%[addr0]) \n\t" | |
| 941 | − "gssdrc1 %[ftmp0], 0x00(%[addr0]) \n\t" | |
| 942 | − MMI_SUBU(%[addr0], %[addr0], %[src_pixel_step]) | |
| 943 | − "gssdlc1 %[ftmp1], 0x07(%[addr0]) \n\t" | |
| 944 | − "gssdrc1 %[ftmp1], 0x00(%[addr0]) \n\t" | |
| 923 | + MMI_SUBU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 924 | + "gssdlc1 %[ftmp0], 0x07(%[src_ptr]) \n\t" | |
| 925 | + "gssdrc1 %[ftmp0], 0x00(%[src_ptr]) \n\t" | |
| 926 | + MMI_SUBU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 927 | + "gssdlc1 %[ftmp1], 0x07(%[src_ptr]) \n\t" | |
| 928 | + "gssdrc1 %[ftmp1], 0x00(%[src_ptr]) \n\t" | |
| 945 | 929 | |
| 946 | 930 | "punpcklwd %[ftmp1], %[ftmp4], %[ftmp8] \n\t" |
| 947 | 931 | "punpckhwd %[ftmp0], %[ftmp4], %[ftmp8] \n\t" |
| 948 | − MMI_SUBU(%[addr0], %[addr0], %[src_pixel_step]) | |
| 949 | − "gssdlc1 %[ftmp0], 0x07(%[addr0]) \n\t" | |
| 950 | − "gssdrc1 %[ftmp0], 0x00(%[addr0]) \n\t" | |
| 951 | − MMI_SUBU(%[addr0], %[addr0], %[src_pixel_step]) | |
| 952 | − "gssdlc1 %[ftmp1], 0x07(%[addr0]) \n\t" | |
| 953 | − "gssdrc1 %[ftmp1], 0x00(%[addr0]) \n\t" | |
| 932 | + MMI_SUBU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 933 | + "gssdlc1 %[ftmp0], 0x07(%[src_ptr]) \n\t" | |
| 934 | + "gssdrc1 %[ftmp0], 0x00(%[src_ptr]) \n\t" | |
| 935 | + MMI_SUBU(%[src_ptr], %[src_ptr], %[src_pixel_step]) | |
| 936 | + "gssdlc1 %[ftmp1], 0x07(%[src_ptr]) \n\t" | |
| 937 | + "gssdrc1 %[ftmp1], 0x00(%[src_ptr]) \n\t" | |
| 954 | 938 | "addiu %[count], %[count], -0x01 \n\t" |
| 955 | 939 | |
| 956 | 940 | MMI_SLL(%[tmp0], %[src_pixel_step], 0x03) |
| @@ -962,9 +946,9 @@ void vp8_mbloop_filter_vertical_edge_mmi( · 5 unmodified lines | ||
| 962 | 946 | [ftmp6]"=&f"(ftmp[6]), [ftmp7]"=&f"(ftmp[7]), |
| 963 | 947 | [ftmp8]"=&f"(ftmp[8]), [ftmp9]"=&f"(ftmp[9]), |
| 964 | 948 | [ftmp10]"=&f"(ftmp[10]), [ftmp11]"=&f"(ftmp[11]), |
| 965 | − [ftmp12]"=&f"(ftmp[12]), [tmp0]"=&r"(tmp[0]), | |
| 966 | − [addr0]"=&r"(addr[0]), | |
| 967 | − [src_ptr]"+&r"(src_ptr), [count]"+&r"(count) | |
| 949 | + [ftmp12]"=&f"(ftmp[12]), [ftmp13]"=&f"(ftmp[13]), | |
| 950 | + [tmp0]"=&r"(tmp[0]), [src_ptr]"+&r"(src_ptr), | |
| 951 | + [count]"+&r"(count) | |
| 968 | 952 | : [limit]"r"(limit), [blimit]"r"(blimit), |
| 969 | 953 | [srct]"r"(srct), [thresh]"r"(thresh), |
| 970 | 954 | [src_pixel_step]"r"((mips_reg)src_pixel_step), |