Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(616)

Side by Side Diff: source/libvpx/test/fdct8x8_test.cc

Issue 1302353004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/libvpx/test/fdct4x4_test.cc ('k') | source/libvpx/test/idct8x8_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 void fdct8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { 85 void fdct8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
86 vpx_fdct8x8_c(in, out, stride); 86 vpx_fdct8x8_c(in, out, stride);
87 } 87 }
88 88
89 void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) { 89 void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
90 vp9_fht8x8_c(in, out, stride, tx_type); 90 vp9_fht8x8_c(in, out, stride, tx_type);
91 } 91 }
92 92
93 #if CONFIG_VP9_HIGHBITDEPTH 93 #if CONFIG_VP9_HIGHBITDEPTH
94 void idct8x8_10(const tran_low_t *in, uint8_t *out, int stride) { 94 void idct8x8_10(const tran_low_t *in, uint8_t *out, int stride) {
95 vp9_highbd_idct8x8_64_add_c(in, out, stride, 10); 95 vpx_highbd_idct8x8_64_add_c(in, out, stride, 10);
96 } 96 }
97 97
98 void idct8x8_12(const tran_low_t *in, uint8_t *out, int stride) { 98 void idct8x8_12(const tran_low_t *in, uint8_t *out, int stride) {
99 vp9_highbd_idct8x8_64_add_c(in, out, stride, 12); 99 vpx_highbd_idct8x8_64_add_c(in, out, stride, 12);
100 } 100 }
101 101
102 void iht8x8_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) { 102 void iht8x8_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
103 vp9_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 10); 103 vp9_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 10);
104 } 104 }
105 105
106 void iht8x8_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) { 106 void iht8x8_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
107 vp9_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 12); 107 vp9_highbd_iht8x8_64_add_c(in, out, stride, tx_type, 12);
108 } 108 }
109 109
110 void idct8x8_10_add_10_c(const tran_low_t *in, uint8_t *out, int stride) { 110 void idct8x8_10_add_10_c(const tran_low_t *in, uint8_t *out, int stride) {
111 vp9_highbd_idct8x8_10_add_c(in, out, stride, 10); 111 vpx_highbd_idct8x8_10_add_c(in, out, stride, 10);
112 } 112 }
113 113
114 void idct8x8_10_add_12_c(const tran_low_t *in, uint8_t *out, int stride) { 114 void idct8x8_10_add_12_c(const tran_low_t *in, uint8_t *out, int stride) {
115 vp9_highbd_idct8x8_10_add_c(in, out, stride, 12); 115 vpx_highbd_idct8x8_10_add_c(in, out, stride, 12);
116 } 116 }
117 117
118 #if HAVE_SSE2 118 #if HAVE_SSE2
119 void idct8x8_10_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) { 119 void idct8x8_10_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
120 vp9_highbd_idct8x8_10_add_sse2(in, out, stride, 10); 120 vpx_highbd_idct8x8_10_add_sse2(in, out, stride, 10);
121 } 121 }
122 122
123 void idct8x8_10_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) { 123 void idct8x8_10_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
124 vp9_highbd_idct8x8_10_add_sse2(in, out, stride, 12); 124 vpx_highbd_idct8x8_10_add_sse2(in, out, stride, 12);
125 } 125 }
126 126
127 void idct8x8_64_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) { 127 void idct8x8_64_add_10_sse2(const tran_low_t *in, uint8_t *out, int stride) {
128 vp9_highbd_idct8x8_64_add_sse2(in, out, stride, 10); 128 vpx_highbd_idct8x8_64_add_sse2(in, out, stride, 10);
129 } 129 }
130 130
131 void idct8x8_64_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) { 131 void idct8x8_64_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
132 vp9_highbd_idct8x8_64_add_sse2(in, out, stride, 12); 132 vpx_highbd_idct8x8_64_add_sse2(in, out, stride, 12);
133 } 133 }
134 #endif // HAVE_SSE2 134 #endif // HAVE_SSE2
135 #endif // CONFIG_VP9_HIGHBITDEPTH 135 #endif // CONFIG_VP9_HIGHBITDEPTH
136 136
137 class FwdTrans8x8TestBase { 137 class FwdTrans8x8TestBase {
138 public: 138 public:
139 virtual ~FwdTrans8x8TestBase() {} 139 virtual ~FwdTrans8x8TestBase() {}
140 140
141 protected: 141 protected:
142 virtual void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) = 0; 142 virtual void RunFwdTxfm(int16_t *in, tran_low_t *out, int stride) = 0;
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 TEST_P(InvTrans8x8DCT, CompareReference) { 651 TEST_P(InvTrans8x8DCT, CompareReference) {
652 CompareInvReference(ref_txfm_, thresh_); 652 CompareInvReference(ref_txfm_, thresh_);
653 } 653 }
654 654
655 using std::tr1::make_tuple; 655 using std::tr1::make_tuple;
656 656
657 #if CONFIG_VP9_HIGHBITDEPTH 657 #if CONFIG_VP9_HIGHBITDEPTH
658 INSTANTIATE_TEST_CASE_P( 658 INSTANTIATE_TEST_CASE_P(
659 C, FwdTrans8x8DCT, 659 C, FwdTrans8x8DCT,
660 ::testing::Values( 660 ::testing::Values(
661 make_tuple(&vpx_fdct8x8_c, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8), 661 make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, 0, VPX_BITS_8),
662 make_tuple(&vpx_highbd_fdct8x8_c, &idct8x8_10, 0, VPX_BITS_10), 662 make_tuple(&vpx_highbd_fdct8x8_c, &idct8x8_10, 0, VPX_BITS_10),
663 make_tuple(&vpx_highbd_fdct8x8_c, &idct8x8_12, 0, VPX_BITS_12))); 663 make_tuple(&vpx_highbd_fdct8x8_c, &idct8x8_12, 0, VPX_BITS_12)));
664 #else 664 #else
665 INSTANTIATE_TEST_CASE_P( 665 INSTANTIATE_TEST_CASE_P(
666 C, FwdTrans8x8DCT, 666 C, FwdTrans8x8DCT,
667 ::testing::Values( 667 ::testing::Values(
668 make_tuple(&vpx_fdct8x8_c, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8))); 668 make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, 0, VPX_BITS_8)));
669 #endif // CONFIG_VP9_HIGHBITDEPTH 669 #endif // CONFIG_VP9_HIGHBITDEPTH
670 670
671 #if CONFIG_VP9_HIGHBITDEPTH 671 #if CONFIG_VP9_HIGHBITDEPTH
672 INSTANTIATE_TEST_CASE_P( 672 INSTANTIATE_TEST_CASE_P(
673 C, FwdTrans8x8HT, 673 C, FwdTrans8x8HT,
674 ::testing::Values( 674 ::testing::Values(
675 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8), 675 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8),
676 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 0, VPX_BITS_10), 676 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 0, VPX_BITS_10),
677 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 1, VPX_BITS_10), 677 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 1, VPX_BITS_10),
678 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 2, VPX_BITS_10), 678 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 2, VPX_BITS_10),
(...skipping 12 matching lines...) Expand all
691 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8), 691 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8),
692 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 1, VPX_BITS_8), 692 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 1, VPX_BITS_8),
693 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8), 693 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8),
694 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8))); 694 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8)));
695 #endif // CONFIG_VP9_HIGHBITDEPTH 695 #endif // CONFIG_VP9_HIGHBITDEPTH
696 696
697 #if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE 697 #if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
698 INSTANTIATE_TEST_CASE_P( 698 INSTANTIATE_TEST_CASE_P(
699 NEON, FwdTrans8x8DCT, 699 NEON, FwdTrans8x8DCT,
700 ::testing::Values( 700 ::testing::Values(
701 make_tuple(&vpx_fdct8x8_neon, &vp9_idct8x8_64_add_neon, 0, 701 make_tuple(&vpx_fdct8x8_neon, &vpx_idct8x8_64_add_neon, 0,
702 VPX_BITS_8))); 702 VPX_BITS_8)));
703 #endif // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE 703 #endif // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
704 704
705 #if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE 705 #if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
706 INSTANTIATE_TEST_CASE_P( 706 INSTANTIATE_TEST_CASE_P(
707 NEON, FwdTrans8x8HT, 707 NEON, FwdTrans8x8HT,
708 ::testing::Values( 708 ::testing::Values(
709 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 0, VPX_BITS_8), 709 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 0, VPX_BITS_8),
710 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 1, VPX_BITS_8), 710 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 1, VPX_BITS_8),
711 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 2, VPX_BITS_8), 711 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 2, VPX_BITS_8),
712 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 3, VPX_BITS_8))); 712 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 3, VPX_BITS_8)));
713 #endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE 713 #endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
714 714
715 #if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE 715 #if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
716 INSTANTIATE_TEST_CASE_P( 716 INSTANTIATE_TEST_CASE_P(
717 SSE2, FwdTrans8x8DCT, 717 SSE2, FwdTrans8x8DCT,
718 ::testing::Values( 718 ::testing::Values(
719 make_tuple(&vpx_fdct8x8_sse2, &vp9_idct8x8_64_add_sse2, 0, 719 make_tuple(&vpx_fdct8x8_sse2, &vpx_idct8x8_64_add_sse2, 0,
720 VPX_BITS_8))); 720 VPX_BITS_8)));
721 INSTANTIATE_TEST_CASE_P( 721 INSTANTIATE_TEST_CASE_P(
722 SSE2, FwdTrans8x8HT, 722 SSE2, FwdTrans8x8HT,
723 ::testing::Values( 723 ::testing::Values(
724 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 0, VPX_BITS_8), 724 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 0, VPX_BITS_8),
725 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 1, VPX_BITS_8), 725 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 1, VPX_BITS_8),
726 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 2, VPX_BITS_8), 726 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 2, VPX_BITS_8),
727 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 3, VPX_BITS_8))); 727 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 3, VPX_BITS_8)));
728 #endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE 728 #endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
729 729
730 #if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE 730 #if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
731 INSTANTIATE_TEST_CASE_P( 731 INSTANTIATE_TEST_CASE_P(
732 SSE2, FwdTrans8x8DCT, 732 SSE2, FwdTrans8x8DCT,
733 ::testing::Values( 733 ::testing::Values(
734 make_tuple(&vpx_fdct8x8_sse2, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8), 734 make_tuple(&vpx_fdct8x8_sse2, &vpx_idct8x8_64_add_c, 0, VPX_BITS_8),
735 make_tuple(&vpx_highbd_fdct8x8_c, 735 make_tuple(&vpx_highbd_fdct8x8_c,
736 &idct8x8_64_add_10_sse2, 12, VPX_BITS_10), 736 &idct8x8_64_add_10_sse2, 12, VPX_BITS_10),
737 make_tuple(&vpx_highbd_fdct8x8_sse2, 737 make_tuple(&vpx_highbd_fdct8x8_sse2,
738 &idct8x8_64_add_10_sse2, 12, VPX_BITS_10), 738 &idct8x8_64_add_10_sse2, 12, VPX_BITS_10),
739 make_tuple(&vpx_highbd_fdct8x8_c, 739 make_tuple(&vpx_highbd_fdct8x8_c,
740 &idct8x8_64_add_12_sse2, 12, VPX_BITS_12), 740 &idct8x8_64_add_12_sse2, 12, VPX_BITS_12),
741 make_tuple(&vpx_highbd_fdct8x8_sse2, 741 make_tuple(&vpx_highbd_fdct8x8_sse2,
742 &idct8x8_64_add_12_sse2, 12, VPX_BITS_12))); 742 &idct8x8_64_add_12_sse2, 12, VPX_BITS_12)));
743 743
744 INSTANTIATE_TEST_CASE_P( 744 INSTANTIATE_TEST_CASE_P(
(...skipping 17 matching lines...) Expand all
762 &idct8x8_10_add_12_sse2, 6225, VPX_BITS_12), 762 &idct8x8_10_add_12_sse2, 6225, VPX_BITS_12),
763 make_tuple(&idct8x8_12, 763 make_tuple(&idct8x8_12,
764 &idct8x8_64_add_12_sse2, 6225, VPX_BITS_12))); 764 &idct8x8_64_add_12_sse2, 6225, VPX_BITS_12)));
765 #endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE 765 #endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
766 766
767 #if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64 && \ 767 #if HAVE_SSSE3 && CONFIG_USE_X86INC && ARCH_X86_64 && \
768 !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE 768 !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
769 INSTANTIATE_TEST_CASE_P( 769 INSTANTIATE_TEST_CASE_P(
770 SSSE3, FwdTrans8x8DCT, 770 SSSE3, FwdTrans8x8DCT,
771 ::testing::Values( 771 ::testing::Values(
772 make_tuple(&vpx_fdct8x8_ssse3, &vp9_idct8x8_64_add_ssse3, 0, 772 make_tuple(&vpx_fdct8x8_ssse3, &vpx_idct8x8_64_add_ssse3, 0,
773 VPX_BITS_8))); 773 VPX_BITS_8)));
774 #endif 774 #endif
775 775
776 #if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE 776 #if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
777 INSTANTIATE_TEST_CASE_P( 777 INSTANTIATE_TEST_CASE_P(
778 MSA, FwdTrans8x8DCT, 778 MSA, FwdTrans8x8DCT,
779 ::testing::Values( 779 ::testing::Values(
780 make_tuple(&vpx_fdct8x8_msa, &vp9_idct8x8_64_add_msa, 0, VPX_BITS_8))); 780 make_tuple(&vpx_fdct8x8_msa, &vpx_idct8x8_64_add_msa, 0, VPX_BITS_8)));
781 INSTANTIATE_TEST_CASE_P( 781 INSTANTIATE_TEST_CASE_P(
782 MSA, FwdTrans8x8HT, 782 MSA, FwdTrans8x8HT,
783 ::testing::Values( 783 ::testing::Values(
784 make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 0, VPX_BITS_8), 784 make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 0, VPX_BITS_8),
785 make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 1, VPX_BITS_8), 785 make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 1, VPX_BITS_8),
786 make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 2, VPX_BITS_8), 786 make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 2, VPX_BITS_8),
787 make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 3, VPX_BITS_8))); 787 make_tuple(&vp9_fht8x8_msa, &vp9_iht8x8_64_add_msa, 3, VPX_BITS_8)));
788 #endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE 788 #endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
789 } // namespace 789 } // namespace
OLDNEW
« no previous file with comments | « source/libvpx/test/fdct4x4_test.cc ('k') | source/libvpx/test/idct8x8_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698