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

Unified Diff: source/libvpx/vp9/encoder/x86/vp9_dct_avx2.c

Issue 168343002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: libvpx: Pull from upstream Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_writer.c ('k') | source/libvpx/vp9/encoder/x86/vp9_dct_sse2.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/encoder/x86/vp9_dct_avx2.c
===================================================================
--- source/libvpx/vp9/encoder/x86/vp9_dct_avx2.c (revision 251189)
+++ source/libvpx/vp9/encoder/x86/vp9_dct_avx2.c (working copy)
@@ -244,32 +244,36 @@
transpose_4x4_avx2(in);
}
-void vp9_short_fht4x4_avx2(const int16_t *input, int16_t *output,
- int stride, int tx_type) {
+void vp9_fht4x4_avx2(const int16_t *input, int16_t *output,
+ int stride, int tx_type) {
__m128i in[4];
- load_buffer_4x4_avx2(input, in, stride);
+
switch (tx_type) {
- case 0: // DCT_DCT
- fdct4_avx2(in);
- fdct4_avx2(in);
+ case DCT_DCT:
+ vp9_fdct4x4_avx2(input, output, stride);
break;
- case 1: // ADST_DCT
+ case ADST_DCT:
+ load_buffer_4x4_avx2(input, in, stride);
fadst4_avx2(in);
fdct4_avx2(in);
+ write_buffer_4x4_avx2(output, in);
break;
- case 2: // DCT_ADST
+ case DCT_ADST:
+ load_buffer_4x4_avx2(input, in, stride);
fdct4_avx2(in);
fadst4_avx2(in);
+ write_buffer_4x4_avx2(output, in);
break;
- case 3: // ADST_ADST
+ case ADST_ADST:
+ load_buffer_4x4_avx2(input, in, stride);
fadst4_avx2(in);
fadst4_avx2(in);
+ write_buffer_4x4_avx2(output, in);
break;
default:
assert(0);
break;
}
- write_buffer_4x4_avx2(output, in);
}
void vp9_fdct8x8_avx2(const int16_t *input, int16_t *output, int stride) {
@@ -1028,33 +1032,39 @@
array_transpose_8x8_avx2(in, in);
}
-void vp9_short_fht8x8_avx2(const int16_t *input, int16_t *output,
- int stride, int tx_type) {
+void vp9_fht8x8_avx2(const int16_t *input, int16_t *output,
+ int stride, int tx_type) {
__m128i in[8];
- load_buffer_8x8_avx2(input, in, stride);
+
switch (tx_type) {
- case 0: // DCT_DCT
- fdct8_avx2(in);
- fdct8_avx2(in);
+ case DCT_DCT:
+ vp9_fdct8x8_avx2(input, output, stride);
break;
- case 1: // ADST_DCT
+ case ADST_DCT:
+ load_buffer_8x8_avx2(input, in, stride);
fadst8_avx2(in);
fdct8_avx2(in);
+ right_shift_8x8_avx2(in, 1);
+ write_buffer_8x8_avx2(output, in, 8);
break;
- case 2: // DCT_ADST
+ case DCT_ADST:
+ load_buffer_8x8_avx2(input, in, stride);
fdct8_avx2(in);
fadst8_avx2(in);
+ right_shift_8x8_avx2(in, 1);
+ write_buffer_8x8_avx2(output, in, 8);
break;
- case 3: // ADST_ADST
+ case ADST_ADST:
+ load_buffer_8x8_avx2(input, in, stride);
fadst8_avx2(in);
fadst8_avx2(in);
+ right_shift_8x8_avx2(in, 1);
+ write_buffer_8x8_avx2(output, in, 8);
break;
default:
assert(0);
break;
}
- right_shift_8x8_avx2(in, 1);
- write_buffer_8x8_avx2(output, in, 8);
}
void vp9_fdct16x16_avx2(const int16_t *input, int16_t *output, int stride) {
@@ -2534,36 +2544,39 @@
array_transpose_16x16_avx2(in0, in1);
}
-void vp9_short_fht16x16_avx2(const int16_t *input, int16_t *output,
- int stride, int tx_type) {
+void vp9_fht16x16_avx2(const int16_t *input, int16_t *output,
+ int stride, int tx_type) {
__m128i in0[16], in1[16];
- load_buffer_16x16_avx2(input, in0, in1, stride);
+
switch (tx_type) {
- case 0: // DCT_DCT
- fdct16_avx2(in0, in1);
- right_shift_16x16_avx2(in0, in1);
- fdct16_avx2(in0, in1);
+ case DCT_DCT:
+ vp9_fdct16x16_avx2(input, output, stride);
break;
- case 1: // ADST_DCT
+ case ADST_DCT:
+ load_buffer_16x16_avx2(input, in0, in1, stride);
fadst16_avx2(in0, in1);
right_shift_16x16_avx2(in0, in1);
fdct16_avx2(in0, in1);
+ write_buffer_16x16_avx2(output, in0, in1, 16);
break;
- case 2: // DCT_ADST
+ case DCT_ADST:
+ load_buffer_16x16_avx2(input, in0, in1, stride);
fdct16_avx2(in0, in1);
right_shift_16x16_avx2(in0, in1);
fadst16_avx2(in0, in1);
+ write_buffer_16x16_avx2(output, in0, in1, 16);
break;
- case 3: // ADST_ADST
+ case ADST_ADST:
+ load_buffer_16x16_avx2(input, in0, in1, stride);
fadst16_avx2(in0, in1);
right_shift_16x16_avx2(in0, in1);
fadst16_avx2(in0, in1);
+ write_buffer_16x16_avx2(output, in0, in1, 16);
break;
default:
assert(0);
break;
}
- write_buffer_16x16_avx2(output, in0, in1, 16);
}
#define FDCT32x32_2D_AVX2 vp9_fdct32x32_rd_avx2
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_writer.c ('k') | source/libvpx/vp9/encoder/x86/vp9_dct_sse2.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698