Merge "Update README"
diff --git a/vpx/exports_com b/aom/exports_com
similarity index 100%
rename from vpx/exports_com
rename to aom/exports_com
diff --git a/vpx/exports_dec b/aom/exports_dec
similarity index 100%
rename from vpx/exports_dec
rename to aom/exports_dec
diff --git a/vpx/exports_enc b/aom/exports_enc
similarity index 100%
rename from vpx/exports_enc
rename to aom/exports_enc
diff --git a/vpx/internal/vpx_codec_internal.h b/aom/internal/vpx_codec_internal.h
similarity index 100%
rename from vpx/internal/vpx_codec_internal.h
rename to aom/internal/vpx_codec_internal.h
diff --git a/vpx/internal/vpx_psnr.h b/aom/internal/vpx_psnr.h
similarity index 100%
rename from vpx/internal/vpx_psnr.h
rename to aom/internal/vpx_psnr.h
diff --git a/vpx/src/svc_encodeframe.c b/aom/src/svc_encodeframe.c
similarity index 99%
rename from vpx/src/svc_encodeframe.c
rename to aom/src/svc_encodeframe.c
index 7f86b71..6e6be8a 100644
--- a/vpx/src/svc_encodeframe.c
+++ b/aom/src/svc_encodeframe.c
@@ -22,11 +22,11 @@
#include <string.h>
#define VPX_DISABLE_CTRL_TYPECHECKS 1
#include "./vpx_config.h"
-#include "vpx/svc_context.h"
-#include "vpx/vp8cx.h"
-#include "vpx/vpx_encoder.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vp10/common/onyxc_int.h"
+#include "aom/svc_context.h"
+#include "aom/vp8cx.h"
+#include "aom/vpx_encoder.h"
+#include "aom_mem/vpx_mem.h"
+#include "av1/common/onyxc_int.h"
#ifdef __MINGW32__
#define strtok_r strtok_s
diff --git a/vpx/src/vpx_codec.c b/aom/src/vpx_codec.c
similarity index 97%
rename from vpx/src/vpx_codec.c
rename to aom/src/vpx_codec.c
index f222b9e..7bdc870 100644
--- a/vpx/src/vpx_codec.c
+++ b/aom/src/vpx_codec.c
@@ -14,8 +14,8 @@
*/
#include <stdarg.h>
#include <stdlib.h>
-#include "vpx/vpx_integer.h"
-#include "vpx/internal/vpx_codec_internal.h"
+#include "aom/vpx_integer.h"
+#include "aom/internal/vpx_codec_internal.h"
#include "vpx_version.h"
#define SAVE_STATUS(ctx, var) (ctx ? (ctx->err = var) : var)
diff --git a/vpx/src/vpx_decoder.c b/aom/src/vpx_decoder.c
similarity index 98%
rename from vpx/src/vpx_decoder.c
rename to aom/src/vpx_decoder.c
index fc1c2bc..97709d1 100644
--- a/vpx/src/vpx_decoder.c
+++ b/aom/src/vpx_decoder.c
@@ -13,7 +13,7 @@
*
*/
#include <string.h>
-#include "vpx/internal/vpx_codec_internal.h"
+#include "aom/internal/vpx_codec_internal.h"
#define SAVE_STATUS(ctx, var) (ctx ? (ctx->err = var) : var)
diff --git a/vpx/src/vpx_encoder.c b/aom/src/vpx_encoder.c
similarity index 99%
rename from vpx/src/vpx_encoder.c
rename to aom/src/vpx_encoder.c
index 4390cf7..f3689e3 100644
--- a/vpx/src/vpx_encoder.c
+++ b/aom/src/vpx_encoder.c
@@ -15,7 +15,7 @@
#include <limits.h>
#include <string.h>
#include "vpx_config.h"
-#include "vpx/internal/vpx_codec_internal.h"
+#include "aom/internal/vpx_codec_internal.h"
#define SAVE_STATUS(ctx, var) (ctx ? (ctx->err = var) : var)
@@ -171,7 +171,7 @@
/* On X86, disable the x87 unit's internal 80 bit precision for better
* consistency with the SSE unit's 64 bit precision.
*/
-#include "vpx_ports/x86.h"
+#include "aom_ports/x86.h"
#define FLOATING_POINT_INIT() \
do { \
unsigned short x87_orig_mode = x87_set_double_precision();
diff --git a/vpx/src/vpx_image.c b/aom/src/vpx_image.c
similarity index 98%
rename from vpx/src/vpx_image.c
rename to aom/src/vpx_image.c
index dba439c..0970b06 100644
--- a/vpx/src/vpx_image.c
+++ b/aom/src/vpx_image.c
@@ -11,9 +11,9 @@
#include <stdlib.h>
#include <string.h>
-#include "vpx/vpx_image.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_mem/vpx_mem.h"
+#include "aom/vpx_image.h"
+#include "aom/vpx_integer.h"
+#include "aom_mem/vpx_mem.h"
static vpx_image_t *img_alloc_helper(vpx_image_t *img, vpx_img_fmt_t fmt,
unsigned int d_w, unsigned int d_h,
diff --git a/vpx/src/vpx_psnr.c b/aom/src/vpx_psnr.c
similarity index 94%
rename from vpx/src/vpx_psnr.c
rename to aom/src/vpx_psnr.c
index 05843ac..78c8ef0 100644
--- a/vpx/src/vpx_psnr.c
+++ b/aom/src/vpx_psnr.c
@@ -10,7 +10,7 @@
#include <math.h>
-#include "vpx/internal/vpx_psnr.h"
+#include "aom/internal/vpx_psnr.h"
#define MAX_PSNR 100.0
diff --git a/vpx/svc_context.h b/aom/svc_context.h
similarity index 100%
rename from vpx/svc_context.h
rename to aom/svc_context.h
diff --git a/vpx/vp8.h b/aom/vp8.h
similarity index 100%
rename from vpx/vp8.h
rename to aom/vp8.h
diff --git a/vpx/vp8cx.h b/aom/vp8cx.h
similarity index 100%
rename from vpx/vp8cx.h
rename to aom/vp8cx.h
diff --git a/vpx/vp8dx.h b/aom/vp8dx.h
similarity index 100%
rename from vpx/vp8dx.h
rename to aom/vp8dx.h
diff --git a/vpx/vpx_codec.h b/aom/vpx_codec.h
similarity index 100%
rename from vpx/vpx_codec.h
rename to aom/vpx_codec.h
diff --git a/vpx/vpx_codec.mk b/aom/vpx_codec.mk
similarity index 100%
rename from vpx/vpx_codec.mk
rename to aom/vpx_codec.mk
diff --git a/vpx/vpx_decoder.h b/aom/vpx_decoder.h
similarity index 100%
rename from vpx/vpx_decoder.h
rename to aom/vpx_decoder.h
diff --git a/vpx/vpx_encoder.h b/aom/vpx_encoder.h
similarity index 100%
rename from vpx/vpx_encoder.h
rename to aom/vpx_encoder.h
diff --git a/vpx/vpx_frame_buffer.h b/aom/vpx_frame_buffer.h
similarity index 100%
rename from vpx/vpx_frame_buffer.h
rename to aom/vpx_frame_buffer.h
diff --git a/vpx/vpx_image.h b/aom/vpx_image.h
similarity index 100%
rename from vpx/vpx_image.h
rename to aom/vpx_image.h
diff --git a/vpx/vpx_integer.h b/aom/vpx_integer.h
similarity index 100%
rename from vpx/vpx_integer.h
rename to aom/vpx_integer.h
diff --git a/vpx_dsp/arm/avg_neon.c b/aom_dsp/arm/avg_neon.c
similarity index 99%
rename from vpx_dsp/arm/avg_neon.c
rename to aom_dsp/arm/avg_neon.c
index d054c41..6027200 100644
--- a/vpx_dsp/arm/avg_neon.c
+++ b/aom_dsp/arm/avg_neon.c
@@ -14,7 +14,7 @@
#include "./vpx_dsp_rtcd.h"
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
static INLINE unsigned int horizontal_add_u16x8(const uint16x8_t v_16x8) {
const uint32x4_t a = vpaddlq_u16(v_16x8);
diff --git a/vpx_dsp/arm/bilinear_filter_media.asm b/aom_dsp/arm/bilinear_filter_media.asm
similarity index 100%
rename from vpx_dsp/arm/bilinear_filter_media.asm
rename to aom_dsp/arm/bilinear_filter_media.asm
diff --git a/vpx_dsp/arm/fwd_txfm_neon.c b/aom_dsp/arm/fwd_txfm_neon.c
similarity index 99%
rename from vpx_dsp/arm/fwd_txfm_neon.c
rename to aom_dsp/arm/fwd_txfm_neon.c
index 7cb2ba9..4763cdb 100644
--- a/vpx_dsp/arm/fwd_txfm_neon.c
+++ b/aom_dsp/arm/fwd_txfm_neon.c
@@ -11,7 +11,7 @@
#include <arm_neon.h>
#include "./vpx_config.h"
-#include "vpx_dsp/txfm_common.h"
+#include "aom_dsp/txfm_common.h"
void vpx_fdct8x8_neon(const int16_t *input, int16_t *final_output, int stride) {
int i;
diff --git a/vpx_dsp/arm/idct16x16_1_add_neon.asm b/aom_dsp/arm/idct16x16_1_add_neon.asm
similarity index 100%
rename from vpx_dsp/arm/idct16x16_1_add_neon.asm
rename to aom_dsp/arm/idct16x16_1_add_neon.asm
diff --git a/vpx_dsp/arm/idct16x16_1_add_neon.c b/aom_dsp/arm/idct16x16_1_add_neon.c
similarity index 97%
rename from vpx_dsp/arm/idct16x16_1_add_neon.c
rename to aom_dsp/arm/idct16x16_1_add_neon.c
index 466b408..a37e53c 100644
--- a/vpx_dsp/arm/idct16x16_1_add_neon.c
+++ b/aom_dsp/arm/idct16x16_1_add_neon.c
@@ -10,8 +10,8 @@
#include <arm_neon.h>
-#include "vpx_dsp/inv_txfm.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/inv_txfm.h"
+#include "aom_ports/mem.h"
void vpx_idct16x16_1_add_neon(int16_t *input, uint8_t *dest, int dest_stride) {
uint8x8_t d2u8, d3u8, d30u8, d31u8;
diff --git a/vpx_dsp/arm/idct16x16_add_neon.asm b/aom_dsp/arm/idct16x16_add_neon.asm
similarity index 100%
rename from vpx_dsp/arm/idct16x16_add_neon.asm
rename to aom_dsp/arm/idct16x16_add_neon.asm
diff --git a/vpx_dsp/arm/idct16x16_add_neon.c b/aom_dsp/arm/idct16x16_add_neon.c
similarity index 99%
rename from vpx_dsp/arm/idct16x16_add_neon.c
rename to aom_dsp/arm/idct16x16_add_neon.c
index 6c03aff..2bb92c6 100644
--- a/vpx_dsp/arm/idct16x16_add_neon.c
+++ b/aom_dsp/arm/idct16x16_add_neon.c
@@ -11,7 +11,7 @@
#include <arm_neon.h>
#include "./vpx_config.h"
-#include "vpx_dsp/txfm_common.h"
+#include "aom_dsp/txfm_common.h"
static INLINE void TRANSPOSE8X8(int16x8_t *q8s16, int16x8_t *q9s16,
int16x8_t *q10s16, int16x8_t *q11s16,
diff --git a/vpx_dsp/arm/idct16x16_neon.c b/aom_dsp/arm/idct16x16_neon.c
similarity index 99%
rename from vpx_dsp/arm/idct16x16_neon.c
rename to aom_dsp/arm/idct16x16_neon.c
index ecc263d..e205056 100644
--- a/vpx_dsp/arm/idct16x16_neon.c
+++ b/aom_dsp/arm/idct16x16_neon.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_dsp_common.h"
void vpx_idct16x16_256_add_neon_pass1(const int16_t *input, int16_t *output,
int output_stride);
diff --git a/vpx_dsp/arm/idct32x32_1_add_neon.asm b/aom_dsp/arm/idct32x32_1_add_neon.asm
similarity index 100%
rename from vpx_dsp/arm/idct32x32_1_add_neon.asm
rename to aom_dsp/arm/idct32x32_1_add_neon.asm
diff --git a/vpx_dsp/arm/idct32x32_1_add_neon.c b/aom_dsp/arm/idct32x32_1_add_neon.c
similarity index 98%
rename from vpx_dsp/arm/idct32x32_1_add_neon.c
rename to aom_dsp/arm/idct32x32_1_add_neon.c
index dab7d09..35bfc66 100644
--- a/vpx_dsp/arm/idct32x32_1_add_neon.c
+++ b/aom_dsp/arm/idct32x32_1_add_neon.c
@@ -12,8 +12,8 @@
#include "./vpx_config.h"
-#include "vpx_dsp/inv_txfm.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/inv_txfm.h"
+#include "aom_ports/mem.h"
static INLINE void LD_16x8(uint8_t *d, int d_stride, uint8x16_t *q8u8,
uint8x16_t *q9u8, uint8x16_t *q10u8,
diff --git a/vpx_dsp/arm/idct32x32_add_neon.asm b/aom_dsp/arm/idct32x32_add_neon.asm
similarity index 100%
rename from vpx_dsp/arm/idct32x32_add_neon.asm
rename to aom_dsp/arm/idct32x32_add_neon.asm
diff --git a/vpx_dsp/arm/idct32x32_add_neon.c b/aom_dsp/arm/idct32x32_add_neon.c
similarity index 99%
rename from vpx_dsp/arm/idct32x32_add_neon.c
rename to aom_dsp/arm/idct32x32_add_neon.c
index 88b3d01..644155c 100644
--- a/vpx_dsp/arm/idct32x32_add_neon.c
+++ b/aom_dsp/arm/idct32x32_add_neon.c
@@ -11,7 +11,7 @@
#include <arm_neon.h>
#include "./vpx_config.h"
-#include "vpx_dsp/txfm_common.h"
+#include "aom_dsp/txfm_common.h"
#define LOAD_FROM_TRANSPOSED(prev, first, second) \
q14s16 = vld1q_s16(trans_buf + first * 8); \
diff --git a/vpx_dsp/arm/idct4x4_1_add_neon.asm b/aom_dsp/arm/idct4x4_1_add_neon.asm
similarity index 100%
rename from vpx_dsp/arm/idct4x4_1_add_neon.asm
rename to aom_dsp/arm/idct4x4_1_add_neon.asm
diff --git a/vpx_dsp/arm/idct4x4_1_add_neon.c b/aom_dsp/arm/idct4x4_1_add_neon.c
similarity index 95%
rename from vpx_dsp/arm/idct4x4_1_add_neon.c
rename to aom_dsp/arm/idct4x4_1_add_neon.c
index 9f999e9..0a2e827 100644
--- a/vpx_dsp/arm/idct4x4_1_add_neon.c
+++ b/aom_dsp/arm/idct4x4_1_add_neon.c
@@ -10,8 +10,8 @@
#include <arm_neon.h>
-#include "vpx_dsp/inv_txfm.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/inv_txfm.h"
+#include "aom_ports/mem.h"
void vpx_idct4x4_1_add_neon(int16_t *input, uint8_t *dest, int dest_stride) {
uint8x8_t d6u8;
diff --git a/vpx_dsp/arm/idct4x4_add_neon.asm b/aom_dsp/arm/idct4x4_add_neon.asm
similarity index 100%
rename from vpx_dsp/arm/idct4x4_add_neon.asm
rename to aom_dsp/arm/idct4x4_add_neon.asm
diff --git a/vpx_dsp/arm/idct4x4_add_neon.c b/aom_dsp/arm/idct4x4_add_neon.c
similarity index 100%
rename from vpx_dsp/arm/idct4x4_add_neon.c
rename to aom_dsp/arm/idct4x4_add_neon.c
diff --git a/vpx_dsp/arm/idct8x8_1_add_neon.asm b/aom_dsp/arm/idct8x8_1_add_neon.asm
similarity index 100%
rename from vpx_dsp/arm/idct8x8_1_add_neon.asm
rename to aom_dsp/arm/idct8x8_1_add_neon.asm
diff --git a/vpx_dsp/arm/idct8x8_1_add_neon.c b/aom_dsp/arm/idct8x8_1_add_neon.c
similarity index 96%
rename from vpx_dsp/arm/idct8x8_1_add_neon.c
rename to aom_dsp/arm/idct8x8_1_add_neon.c
index e3db0b8..bda5998 100644
--- a/vpx_dsp/arm/idct8x8_1_add_neon.c
+++ b/aom_dsp/arm/idct8x8_1_add_neon.c
@@ -10,8 +10,8 @@
#include <arm_neon.h>
-#include "vpx_dsp/inv_txfm.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/inv_txfm.h"
+#include "aom_ports/mem.h"
void vpx_idct8x8_1_add_neon(int16_t *input, uint8_t *dest, int dest_stride) {
uint8x8_t d2u8, d3u8, d30u8, d31u8;
diff --git a/vpx_dsp/arm/idct8x8_add_neon.asm b/aom_dsp/arm/idct8x8_add_neon.asm
similarity index 100%
rename from vpx_dsp/arm/idct8x8_add_neon.asm
rename to aom_dsp/arm/idct8x8_add_neon.asm
diff --git a/vpx_dsp/arm/idct8x8_add_neon.c b/aom_dsp/arm/idct8x8_add_neon.c
similarity index 99%
rename from vpx_dsp/arm/idct8x8_add_neon.c
rename to aom_dsp/arm/idct8x8_add_neon.c
index f1c2711..124c317 100644
--- a/vpx_dsp/arm/idct8x8_add_neon.c
+++ b/aom_dsp/arm/idct8x8_add_neon.c
@@ -11,7 +11,7 @@
#include <arm_neon.h>
#include "./vpx_config.h"
-#include "vpx_dsp/txfm_common.h"
+#include "aom_dsp/txfm_common.h"
static INLINE void TRANSPOSE8X8(int16x8_t *q8s16, int16x8_t *q9s16,
int16x8_t *q10s16, int16x8_t *q11s16,
diff --git a/vpx_dsp/arm/intrapred_neon.c b/aom_dsp/arm/intrapred_neon.c
similarity index 99%
rename from vpx_dsp/arm/intrapred_neon.c
rename to aom_dsp/arm/intrapred_neon.c
index 32dd1ba..3166a4e 100644
--- a/vpx_dsp/arm/intrapred_neon.c
+++ b/aom_dsp/arm/intrapred_neon.c
@@ -12,7 +12,7 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
//------------------------------------------------------------------------------
// DC 4x4
diff --git a/vpx_dsp/arm/intrapred_neon_asm.asm b/aom_dsp/arm/intrapred_neon_asm.asm
similarity index 100%
rename from vpx_dsp/arm/intrapred_neon_asm.asm
rename to aom_dsp/arm/intrapred_neon_asm.asm
diff --git a/vpx_dsp/arm/loopfilter_16_neon.asm b/aom_dsp/arm/loopfilter_16_neon.asm
similarity index 100%
rename from vpx_dsp/arm/loopfilter_16_neon.asm
rename to aom_dsp/arm/loopfilter_16_neon.asm
diff --git a/vpx_dsp/arm/loopfilter_16_neon.c b/aom_dsp/arm/loopfilter_16_neon.c
similarity index 99%
rename from vpx_dsp/arm/loopfilter_16_neon.c
rename to aom_dsp/arm/loopfilter_16_neon.c
index 9607bb2..70087f9 100644
--- a/vpx_dsp/arm/loopfilter_16_neon.c
+++ b/aom_dsp/arm/loopfilter_16_neon.c
@@ -12,7 +12,7 @@
#include "./vpx_dsp_rtcd.h"
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
static INLINE void loop_filter_neon_16(uint8x16_t qblimit, // blimit
uint8x16_t qlimit, // limit
diff --git a/vpx_dsp/arm/loopfilter_4_neon.asm b/aom_dsp/arm/loopfilter_4_neon.asm
similarity index 100%
rename from vpx_dsp/arm/loopfilter_4_neon.asm
rename to aom_dsp/arm/loopfilter_4_neon.asm
diff --git a/vpx_dsp/arm/loopfilter_4_neon.c b/aom_dsp/arm/loopfilter_4_neon.c
similarity index 100%
rename from vpx_dsp/arm/loopfilter_4_neon.c
rename to aom_dsp/arm/loopfilter_4_neon.c
diff --git a/vpx_dsp/arm/loopfilter_8_neon.asm b/aom_dsp/arm/loopfilter_8_neon.asm
similarity index 100%
rename from vpx_dsp/arm/loopfilter_8_neon.asm
rename to aom_dsp/arm/loopfilter_8_neon.asm
diff --git a/vpx_dsp/arm/loopfilter_8_neon.c b/aom_dsp/arm/loopfilter_8_neon.c
similarity index 100%
rename from vpx_dsp/arm/loopfilter_8_neon.c
rename to aom_dsp/arm/loopfilter_8_neon.c
diff --git a/vpx_dsp/arm/loopfilter_mb_neon.asm b/aom_dsp/arm/loopfilter_mb_neon.asm
similarity index 100%
rename from vpx_dsp/arm/loopfilter_mb_neon.asm
rename to aom_dsp/arm/loopfilter_mb_neon.asm
diff --git a/vpx_dsp/arm/loopfilter_neon.c b/aom_dsp/arm/loopfilter_neon.c
similarity index 98%
rename from vpx_dsp/arm/loopfilter_neon.c
rename to aom_dsp/arm/loopfilter_neon.c
index 6abc7ae..43e24fc 100644
--- a/vpx_dsp/arm/loopfilter_neon.c
+++ b/aom_dsp/arm/loopfilter_neon.c
@@ -12,7 +12,7 @@
#include "./vpx_dsp_rtcd.h"
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
void vpx_lpf_vertical_4_dual_neon(uint8_t *s, int p, const uint8_t *blimit0,
const uint8_t *limit0, const uint8_t *thresh0,
diff --git a/vpx_dsp/arm/sad4d_neon.c b/aom_dsp/arm/sad4d_neon.c
similarity index 99%
rename from vpx_dsp/arm/sad4d_neon.c
rename to aom_dsp/arm/sad4d_neon.c
index dc20398..11f13be 100644
--- a/vpx_dsp/arm/sad4d_neon.c
+++ b/aom_dsp/arm/sad4d_neon.c
@@ -12,7 +12,7 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
static INLINE unsigned int horizontal_long_add_16x8(const uint16x8_t vec_lo,
const uint16x8_t vec_hi) {
diff --git a/vpx_dsp/arm/sad_media.asm b/aom_dsp/arm/sad_media.asm
similarity index 100%
rename from vpx_dsp/arm/sad_media.asm
rename to aom_dsp/arm/sad_media.asm
diff --git a/vpx_dsp/arm/sad_neon.c b/aom_dsp/arm/sad_neon.c
similarity index 99%
rename from vpx_dsp/arm/sad_neon.c
rename to aom_dsp/arm/sad_neon.c
index ff32287..19fa109 100644
--- a/vpx_dsp/arm/sad_neon.c
+++ b/aom_dsp/arm/sad_neon.c
@@ -12,7 +12,7 @@
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
unsigned int vpx_sad8x16_neon(unsigned char *src_ptr, int src_stride,
unsigned char *ref_ptr, int ref_stride) {
diff --git a/vpx_dsp/arm/save_reg_neon.asm b/aom_dsp/arm/save_reg_neon.asm
similarity index 100%
rename from vpx_dsp/arm/save_reg_neon.asm
rename to aom_dsp/arm/save_reg_neon.asm
diff --git a/vpx_dsp/arm/subpel_variance_media.c b/aom_dsp/arm/subpel_variance_media.c
similarity index 98%
rename from vpx_dsp/arm/subpel_variance_media.c
rename to aom_dsp/arm/subpel_variance_media.c
index ab53361..69b1b33 100644
--- a/vpx_dsp/arm/subpel_variance_media.c
+++ b/aom_dsp/arm/subpel_variance_media.c
@@ -10,8 +10,8 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/mem.h"
#if HAVE_MEDIA
static const int16_t bilinear_filters_media[8][2] = { { 128, 0 }, { 112, 16 },
diff --git a/vpx_dsp/arm/subpel_variance_neon.c b/aom_dsp/arm/subpel_variance_neon.c
similarity index 98%
rename from vpx_dsp/arm/subpel_variance_neon.c
rename to aom_dsp/arm/subpel_variance_neon.c
index f044e11..caa3f4a 100644
--- a/vpx_dsp/arm/subpel_variance_neon.c
+++ b/aom_dsp/arm/subpel_variance_neon.c
@@ -12,10 +12,10 @@
#include "./vpx_dsp_rtcd.h"
#include "./vpx_config.h"
-#include "vpx_ports/mem.h"
-#include "vpx/vpx_integer.h"
+#include "aom_ports/mem.h"
+#include "aom/vpx_integer.h"
-#include "vpx_dsp/variance.h"
+#include "aom_dsp/variance.h"
static const uint8_t bilinear_filters[8][2] = {
{ 128, 0 }, { 112, 16 }, { 96, 32 }, { 80, 48 },
diff --git a/vpx_dsp/arm/subtract_neon.c b/aom_dsp/arm/subtract_neon.c
similarity index 98%
rename from vpx_dsp/arm/subtract_neon.c
rename to aom_dsp/arm/subtract_neon.c
index ce81fb6..ab7157c 100644
--- a/vpx_dsp/arm/subtract_neon.c
+++ b/aom_dsp/arm/subtract_neon.c
@@ -11,7 +11,7 @@
#include <arm_neon.h>
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
void vpx_subtract_block_neon(int rows, int cols, int16_t *diff,
ptrdiff_t diff_stride, const uint8_t *src,
diff --git a/vpx_dsp/arm/variance_halfpixvar16x16_h_media.asm b/aom_dsp/arm/variance_halfpixvar16x16_h_media.asm
similarity index 100%
rename from vpx_dsp/arm/variance_halfpixvar16x16_h_media.asm
rename to aom_dsp/arm/variance_halfpixvar16x16_h_media.asm
diff --git a/vpx_dsp/arm/variance_halfpixvar16x16_hv_media.asm b/aom_dsp/arm/variance_halfpixvar16x16_hv_media.asm
similarity index 100%
rename from vpx_dsp/arm/variance_halfpixvar16x16_hv_media.asm
rename to aom_dsp/arm/variance_halfpixvar16x16_hv_media.asm
diff --git a/vpx_dsp/arm/variance_halfpixvar16x16_v_media.asm b/aom_dsp/arm/variance_halfpixvar16x16_v_media.asm
similarity index 100%
rename from vpx_dsp/arm/variance_halfpixvar16x16_v_media.asm
rename to aom_dsp/arm/variance_halfpixvar16x16_v_media.asm
diff --git a/vpx_dsp/arm/variance_media.asm b/aom_dsp/arm/variance_media.asm
similarity index 100%
rename from vpx_dsp/arm/variance_media.asm
rename to aom_dsp/arm/variance_media.asm
diff --git a/vpx_dsp/arm/variance_neon.c b/aom_dsp/arm/variance_neon.c
similarity index 99%
rename from vpx_dsp/arm/variance_neon.c
rename to aom_dsp/arm/variance_neon.c
index f469afc..fcf6e45 100644
--- a/vpx_dsp/arm/variance_neon.c
+++ b/aom_dsp/arm/variance_neon.c
@@ -13,8 +13,8 @@
#include "./vpx_dsp_rtcd.h"
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/mem.h"
static INLINE int horizontal_add_s16x8(const int16x8_t v_16x8) {
const int32x4_t a = vpaddlq_s16(v_16x8);
diff --git a/vpx_dsp/arm/vpx_convolve8_avg_neon.c b/aom_dsp/arm/vpx_convolve8_avg_neon.c
similarity index 99%
rename from vpx_dsp/arm/vpx_convolve8_avg_neon.c
rename to aom_dsp/arm/vpx_convolve8_avg_neon.c
index 69cb284..c6b1831 100644
--- a/vpx_dsp/arm/vpx_convolve8_avg_neon.c
+++ b/aom_dsp/arm/vpx_convolve8_avg_neon.c
@@ -13,8 +13,8 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/mem.h"
static INLINE int32x4_t MULTIPLY_BY_Q0(int16x4_t dsrc0, int16x4_t dsrc1,
int16x4_t dsrc2, int16x4_t dsrc3,
diff --git a/vpx_dsp/arm/vpx_convolve8_avg_neon_asm.asm b/aom_dsp/arm/vpx_convolve8_avg_neon_asm.asm
similarity index 100%
rename from vpx_dsp/arm/vpx_convolve8_avg_neon_asm.asm
rename to aom_dsp/arm/vpx_convolve8_avg_neon_asm.asm
diff --git a/vpx_dsp/arm/vpx_convolve8_neon.c b/aom_dsp/arm/vpx_convolve8_neon.c
similarity index 99%
rename from vpx_dsp/arm/vpx_convolve8_neon.c
rename to aom_dsp/arm/vpx_convolve8_neon.c
index 5145256..b84be93 100644
--- a/vpx_dsp/arm/vpx_convolve8_neon.c
+++ b/aom_dsp/arm/vpx_convolve8_neon.c
@@ -13,8 +13,8 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/mem.h"
static INLINE int32x4_t MULTIPLY_BY_Q0(int16x4_t dsrc0, int16x4_t dsrc1,
int16x4_t dsrc2, int16x4_t dsrc3,
diff --git a/vpx_dsp/arm/vpx_convolve8_neon_asm.asm b/aom_dsp/arm/vpx_convolve8_neon_asm.asm
similarity index 100%
rename from vpx_dsp/arm/vpx_convolve8_neon_asm.asm
rename to aom_dsp/arm/vpx_convolve8_neon_asm.asm
diff --git a/vpx_dsp/arm/vpx_convolve_avg_neon.c b/aom_dsp/arm/vpx_convolve_avg_neon.c
similarity index 98%
rename from vpx_dsp/arm/vpx_convolve_avg_neon.c
rename to aom_dsp/arm/vpx_convolve_avg_neon.c
index abc2511..a04d384 100644
--- a/vpx_dsp/arm/vpx_convolve_avg_neon.c
+++ b/aom_dsp/arm/vpx_convolve_avg_neon.c
@@ -11,7 +11,7 @@
#include <arm_neon.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
void vpx_convolve_avg_neon(const uint8_t *src, // r0
ptrdiff_t src_stride, // r1
diff --git a/vpx_dsp/arm/vpx_convolve_avg_neon_asm.asm b/aom_dsp/arm/vpx_convolve_avg_neon_asm.asm
similarity index 100%
rename from vpx_dsp/arm/vpx_convolve_avg_neon_asm.asm
rename to aom_dsp/arm/vpx_convolve_avg_neon_asm.asm
diff --git a/vpx_dsp/arm/vpx_convolve_copy_neon.c b/aom_dsp/arm/vpx_convolve_copy_neon.c
similarity index 98%
rename from vpx_dsp/arm/vpx_convolve_copy_neon.c
rename to aom_dsp/arm/vpx_convolve_copy_neon.c
index fec189e..8000eb7 100644
--- a/vpx_dsp/arm/vpx_convolve_copy_neon.c
+++ b/aom_dsp/arm/vpx_convolve_copy_neon.c
@@ -11,7 +11,7 @@
#include <arm_neon.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
void vpx_convolve_copy_neon(const uint8_t *src, // r0
ptrdiff_t src_stride, // r1
diff --git a/vpx_dsp/arm/vpx_convolve_copy_neon_asm.asm b/aom_dsp/arm/vpx_convolve_copy_neon_asm.asm
similarity index 100%
rename from vpx_dsp/arm/vpx_convolve_copy_neon_asm.asm
rename to aom_dsp/arm/vpx_convolve_copy_neon_asm.asm
diff --git a/vpx_dsp/arm/vpx_convolve_neon.c b/aom_dsp/arm/vpx_convolve_neon.c
similarity index 97%
rename from vpx_dsp/arm/vpx_convolve_neon.c
rename to aom_dsp/arm/vpx_convolve_neon.c
index c2d5895..297b64b 100644
--- a/vpx_dsp/arm/vpx_convolve_neon.c
+++ b/aom_dsp/arm/vpx_convolve_neon.c
@@ -11,8 +11,8 @@
#include <assert.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/mem.h"
void vpx_convolve8_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst,
ptrdiff_t dst_stride, const int16_t *filter_x,
diff --git a/vpx_dsp/avg.c b/aom_dsp/avg.c
similarity index 99%
rename from vpx_dsp/avg.c
rename to aom_dsp/avg.c
index 293387c..7fe28cb 100644
--- a/vpx_dsp/avg.c
+++ b/aom_dsp/avg.c
@@ -10,7 +10,7 @@
#include <stdlib.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_ports/mem.h"
+#include "aom_ports/mem.h"
unsigned int vpx_avg_8x8_c(const uint8_t *s, int p) {
int i, j;
diff --git a/vpx_dsp/bitreader.c b/aom_dsp/bitreader.c
similarity index 93%
rename from vpx_dsp/bitreader.c
rename to aom_dsp/bitreader.c
index 6e3091a..671db24 100644
--- a/vpx_dsp/bitreader.c
+++ b/aom_dsp/bitreader.c
@@ -11,12 +11,12 @@
#include "./vpx_config.h"
-#include "vpx_dsp/bitreader.h"
-#include "vpx_dsp/prob.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/mem.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_util/endian_inl.h"
+#include "aom_dsp/bitreader.h"
+#include "aom_dsp/prob.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/mem.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_util/endian_inl.h"
int vpx_reader_init(vpx_reader *r, const uint8_t *buffer, size_t size,
vpx_decrypt_cb decrypt_cb, void *decrypt_state) {
diff --git a/vpx_dsp/bitreader.h b/aom_dsp/bitreader.h
similarity index 96%
rename from vpx_dsp/bitreader.h
rename to aom_dsp/bitreader.h
index 6ee2a58..ef3e433 100644
--- a/vpx_dsp/bitreader.h
+++ b/aom_dsp/bitreader.h
@@ -15,10 +15,10 @@
#include <limits.h>
#include "./vpx_config.h"
-#include "vpx_ports/mem.h"
-#include "vpx/vp8dx.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/prob.h"
+#include "aom_ports/mem.h"
+#include "aom/vp8dx.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/prob.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/bitreader_buffer.c b/aom_dsp/bitreader_buffer.c
similarity index 100%
rename from vpx_dsp/bitreader_buffer.c
rename to aom_dsp/bitreader_buffer.c
diff --git a/vpx_dsp/bitreader_buffer.h b/aom_dsp/bitreader_buffer.h
similarity index 97%
rename from vpx_dsp/bitreader_buffer.h
rename to aom_dsp/bitreader_buffer.h
index 8a48a95..5e557ea 100644
--- a/vpx_dsp/bitreader_buffer.h
+++ b/aom_dsp/bitreader_buffer.h
@@ -13,7 +13,7 @@
#include <limits.h>
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/bitwriter.c b/aom_dsp/bitwriter.c
similarity index 100%
rename from vpx_dsp/bitwriter.c
rename to aom_dsp/bitwriter.c
diff --git a/vpx_dsp/bitwriter.h b/aom_dsp/bitwriter.h
similarity index 97%
rename from vpx_dsp/bitwriter.h
rename to aom_dsp/bitwriter.h
index 41040cf..5bf47f1 100644
--- a/vpx_dsp/bitwriter.h
+++ b/aom_dsp/bitwriter.h
@@ -11,9 +11,9 @@
#ifndef VPX_DSP_BITWRITER_H_
#define VPX_DSP_BITWRITER_H_
-#include "vpx_ports/mem.h"
+#include "aom_ports/mem.h"
-#include "vpx_dsp/prob.h"
+#include "aom_dsp/prob.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/bitwriter_buffer.c b/aom_dsp/bitwriter_buffer.c
similarity index 100%
rename from vpx_dsp/bitwriter_buffer.c
rename to aom_dsp/bitwriter_buffer.c
diff --git a/vpx_dsp/bitwriter_buffer.h b/aom_dsp/bitwriter_buffer.h
similarity index 96%
rename from vpx_dsp/bitwriter_buffer.h
rename to aom_dsp/bitwriter_buffer.h
index a123a2f..2406abd 100644
--- a/vpx_dsp/bitwriter_buffer.h
+++ b/aom_dsp/bitwriter_buffer.h
@@ -11,7 +11,7 @@
#ifndef VPX_DSP_BITWRITER_BUFFER_H_
#define VPX_DSP_BITWRITER_BUFFER_H_
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/fastssim.c b/aom_dsp/fastssim.c
similarity index 99%
rename from vpx_dsp/fastssim.c
rename to aom_dsp/fastssim.c
index d89ab6a..da301f8 100644
--- a/vpx_dsp/fastssim.c
+++ b/aom_dsp/fastssim.c
@@ -15,8 +15,8 @@
#include <string.h>
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/ssim.h"
-#include "vpx_ports/system_state.h"
+#include "aom_dsp/ssim.h"
+#include "aom_ports/system_state.h"
/* TODO(jbb): High bit depth version of this code needed */
typedef struct fs_level fs_level;
typedef struct fs_ctx fs_ctx;
diff --git a/vpx_dsp/fwd_txfm.c b/aom_dsp/fwd_txfm.c
similarity index 99%
rename from vpx_dsp/fwd_txfm.c
rename to aom_dsp/fwd_txfm.c
index 9733b88..5ece65e 100644
--- a/vpx_dsp/fwd_txfm.c
+++ b/aom_dsp/fwd_txfm.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/fwd_txfm.h"
+#include "aom_dsp/fwd_txfm.h"
void vpx_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride) {
// The 2D transform is done with two passes which are actually pretty
diff --git a/vpx_dsp/fwd_txfm.h b/aom_dsp/fwd_txfm.h
similarity index 96%
rename from vpx_dsp/fwd_txfm.h
rename to aom_dsp/fwd_txfm.h
index 29e139c..b874dd4 100644
--- a/vpx_dsp/fwd_txfm.h
+++ b/aom_dsp/fwd_txfm.h
@@ -11,7 +11,7 @@
#ifndef VPX_DSP_FWD_TXFM_H_
#define VPX_DSP_FWD_TXFM_H_
-#include "vpx_dsp/txfm_common.h"
+#include "aom_dsp/txfm_common.h"
static INLINE tran_high_t fdct_round_shift(tran_high_t input) {
tran_high_t rv = ROUND_POWER_OF_TWO(input, DCT_CONST_BITS);
diff --git a/vpx_dsp/intrapred.c b/aom_dsp/intrapred.c
similarity index 99%
rename from vpx_dsp/intrapred.c
rename to aom_dsp/intrapred.c
index a0d1f41..f9ab736 100644
--- a/vpx_dsp/intrapred.c
+++ b/aom_dsp/intrapred.c
@@ -11,8 +11,8 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
#define DST(x, y) dst[(x) + (y)*stride]
#define AVG3(a, b, c) (((a) + 2 * (b) + (c) + 2) >> 2)
diff --git a/vpx_dsp/inv_txfm.c b/aom_dsp/inv_txfm.c
similarity index 99%
rename from vpx_dsp/inv_txfm.c
rename to aom_dsp/inv_txfm.c
index 484cfa6..ccc2d3b 100644
--- a/vpx_dsp/inv_txfm.c
+++ b/aom_dsp/inv_txfm.c
@@ -11,7 +11,7 @@
#include <math.h>
#include <string.h>
-#include "vpx_dsp/inv_txfm.h"
+#include "aom_dsp/inv_txfm.h"
void vpx_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
/* 4-point reversible, orthonormal inverse Walsh-Hadamard in 3.5 adds,
diff --git a/vpx_dsp/inv_txfm.h b/aom_dsp/inv_txfm.h
similarity index 98%
rename from vpx_dsp/inv_txfm.h
rename to aom_dsp/inv_txfm.h
index b44df09..7403db9 100644
--- a/vpx_dsp/inv_txfm.h
+++ b/aom_dsp/inv_txfm.h
@@ -14,8 +14,8 @@
#include <assert.h>
#include "./vpx_config.h"
-#include "vpx_dsp/txfm_common.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/txfm_common.h"
+#include "aom_ports/mem.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/loopfilter.c b/aom_dsp/loopfilter.c
similarity index 99%
rename from vpx_dsp/loopfilter.c
rename to aom_dsp/loopfilter.c
index 07fe51a..8ddf73a 100644
--- a/vpx_dsp/loopfilter.c
+++ b/aom_dsp/loopfilter.c
@@ -11,8 +11,8 @@
#include <stdlib.h>
#include "./vpx_config.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/mem.h"
static INLINE int8_t signed_char_clamp(int t) {
return (int8_t)clamp(t, -128, 127);
diff --git a/vpx_dsp/mips/avg_msa.c b/aom_dsp/mips/avg_msa.c
similarity index 97%
rename from vpx_dsp/mips/avg_msa.c
rename to aom_dsp/mips/avg_msa.c
index 52a24ed..5896708 100644
--- a/vpx_dsp/mips/avg_msa.c
+++ b/aom_dsp/mips/avg_msa.c
@@ -9,7 +9,7 @@
*/
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/macros_msa.h"
+#include "aom_dsp/mips/macros_msa.h"
uint32_t vpx_avg_8x8_msa(const uint8_t *src, int32_t src_stride) {
uint32_t sum_out;
diff --git a/vpx_dsp/mips/common_dspr2.c b/aom_dsp/mips/common_dspr2.c
similarity index 95%
rename from vpx_dsp/mips/common_dspr2.c
rename to aom_dsp/mips/common_dspr2.c
index b22f084..268bbcd 100644
--- a/vpx_dsp/mips/common_dspr2.c
+++ b/aom_dsp/mips/common_dspr2.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/mips/common_dspr2.h"
+#include "aom_dsp/mips/common_dspr2.h"
#if HAVE_DSPR2
uint8_t vpx_ff_cropTbl_a[256 + 2 * CROP_WIDTH];
diff --git a/vpx_dsp/mips/common_dspr2.h b/aom_dsp/mips/common_dspr2.h
similarity index 93%
rename from vpx_dsp/mips/common_dspr2.h
rename to aom_dsp/mips/common_dspr2.h
index 0a42f5c..1da490a 100644
--- a/vpx_dsp/mips/common_dspr2.h
+++ b/aom_dsp/mips/common_dspr2.h
@@ -13,7 +13,7 @@
#include <assert.h>
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#ifdef __cplusplus
extern "C" {
@@ -21,7 +21,7 @@
#if HAVE_DSPR2
#define CROP_WIDTH 512
-extern uint8_t *vpx_ff_cropTbl; // From "vpx_dsp/mips/intrapred4_dspr2.c"
+extern uint8_t *vpx_ff_cropTbl; // From "aom_dsp/mips/intrapred4_dspr2.c"
static INLINE void prefetch_load(const unsigned char *src) {
__asm__ __volatile__("pref 0, 0(%[src]) \n\t" : : [src] "r"(src));
diff --git a/vpx_dsp/mips/convolve2_avg_dspr2.c b/aom_dsp/mips/convolve2_avg_dspr2.c
similarity index 98%
rename from vpx_dsp/mips/convolve2_avg_dspr2.c
rename to aom_dsp/mips/convolve2_avg_dspr2.c
index ae88edd..b73eba2 100644
--- a/vpx_dsp/mips/convolve2_avg_dspr2.c
+++ b/aom_dsp/mips/convolve2_avg_dspr2.c
@@ -12,10 +12,10 @@
#include <stdio.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/convolve_common_dspr2.h"
-#include "vpx_dsp/vpx_convolve.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/mips/convolve_common_dspr2.h"
+#include "aom_dsp/vpx_convolve.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/mem.h"
#if HAVE_DSPR2
static void convolve_bi_avg_vert_4_dspr2(const uint8_t *src, int32_t src_stride,
diff --git a/vpx_dsp/mips/convolve2_avg_horiz_dspr2.c b/aom_dsp/mips/convolve2_avg_horiz_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/convolve2_avg_horiz_dspr2.c
rename to aom_dsp/mips/convolve2_avg_horiz_dspr2.c
index e944207..765c902 100644
--- a/vpx_dsp/mips/convolve2_avg_horiz_dspr2.c
+++ b/aom_dsp/mips/convolve2_avg_horiz_dspr2.c
@@ -12,10 +12,10 @@
#include <stdio.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/convolve_common_dspr2.h"
-#include "vpx_dsp/vpx_convolve.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/mips/convolve_common_dspr2.h"
+#include "aom_dsp/vpx_convolve.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/mem.h"
#if HAVE_DSPR2
static void convolve_bi_avg_horiz_4_dspr2(const uint8_t *src,
diff --git a/vpx_dsp/mips/convolve2_dspr2.c b/aom_dsp/mips/convolve2_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/convolve2_dspr2.c
rename to aom_dsp/mips/convolve2_dspr2.c
index e355ba3..78ee6e0 100644
--- a/vpx_dsp/mips/convolve2_dspr2.c
+++ b/aom_dsp/mips/convolve2_dspr2.c
@@ -12,10 +12,10 @@
#include <stdio.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/convolve_common_dspr2.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_dsp/vpx_filter.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/mips/convolve_common_dspr2.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_filter.h"
+#include "aom_ports/mem.h"
#if HAVE_DSPR2
static void convolve_bi_horiz_4_transposed_dspr2(
diff --git a/vpx_dsp/mips/convolve2_horiz_dspr2.c b/aom_dsp/mips/convolve2_horiz_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/convolve2_horiz_dspr2.c
rename to aom_dsp/mips/convolve2_horiz_dspr2.c
index 5cc06b5..0d6ebea 100644
--- a/vpx_dsp/mips/convolve2_horiz_dspr2.c
+++ b/aom_dsp/mips/convolve2_horiz_dspr2.c
@@ -12,10 +12,10 @@
#include <stdio.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/convolve_common_dspr2.h"
-#include "vpx_dsp/vpx_convolve.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/mips/convolve_common_dspr2.h"
+#include "aom_dsp/vpx_convolve.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/mem.h"
#if HAVE_DSPR2
static void convolve_bi_horiz_4_dspr2(const uint8_t *src, int32_t src_stride,
diff --git a/vpx_dsp/mips/convolve2_vert_dspr2.c b/aom_dsp/mips/convolve2_vert_dspr2.c
similarity index 98%
rename from vpx_dsp/mips/convolve2_vert_dspr2.c
rename to aom_dsp/mips/convolve2_vert_dspr2.c
index eb1975e..a9d0cbf 100644
--- a/vpx_dsp/mips/convolve2_vert_dspr2.c
+++ b/aom_dsp/mips/convolve2_vert_dspr2.c
@@ -12,10 +12,10 @@
#include <stdio.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/convolve_common_dspr2.h"
-#include "vpx_dsp/vpx_convolve.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/mips/convolve_common_dspr2.h"
+#include "aom_dsp/vpx_convolve.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/mem.h"
#if HAVE_DSPR2
static void convolve_bi_vert_4_dspr2(const uint8_t *src, int32_t src_stride,
diff --git a/vpx_dsp/mips/convolve8_avg_dspr2.c b/aom_dsp/mips/convolve8_avg_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/convolve8_avg_dspr2.c
rename to aom_dsp/mips/convolve8_avg_dspr2.c
index 3181229..8baf33a 100644
--- a/vpx_dsp/mips/convolve8_avg_dspr2.c
+++ b/aom_dsp/mips/convolve8_avg_dspr2.c
@@ -12,10 +12,10 @@
#include <stdio.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/convolve_common_dspr2.h"
-#include "vpx_dsp/vpx_convolve.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/mips/convolve_common_dspr2.h"
+#include "aom_dsp/vpx_convolve.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/mem.h"
#if HAVE_DSPR2
static void convolve_avg_vert_4_dspr2(const uint8_t *src, int32_t src_stride,
diff --git a/vpx_dsp/mips/convolve8_avg_horiz_dspr2.c b/aom_dsp/mips/convolve8_avg_horiz_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/convolve8_avg_horiz_dspr2.c
rename to aom_dsp/mips/convolve8_avg_horiz_dspr2.c
index 9a9bab2..d732d2e 100644
--- a/vpx_dsp/mips/convolve8_avg_horiz_dspr2.c
+++ b/aom_dsp/mips/convolve8_avg_horiz_dspr2.c
@@ -12,10 +12,10 @@
#include <stdio.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/convolve_common_dspr2.h"
-#include "vpx_dsp/vpx_convolve.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/mips/convolve_common_dspr2.h"
+#include "aom_dsp/vpx_convolve.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/mem.h"
#if HAVE_DSPR2
static void convolve_avg_horiz_4_dspr2(const uint8_t *src, int32_t src_stride,
diff --git a/vpx_dsp/mips/convolve8_dspr2.c b/aom_dsp/mips/convolve8_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/convolve8_dspr2.c
rename to aom_dsp/mips/convolve8_dspr2.c
index 789ec8d..09a9083 100644
--- a/vpx_dsp/mips/convolve8_dspr2.c
+++ b/aom_dsp/mips/convolve8_dspr2.c
@@ -12,10 +12,10 @@
#include <stdio.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/convolve_common_dspr2.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_dsp/vpx_filter.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/mips/convolve_common_dspr2.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_filter.h"
+#include "aom_ports/mem.h"
#if HAVE_DSPR2
static void convolve_horiz_4_transposed_dspr2(const uint8_t *src,
diff --git a/vpx_dsp/mips/convolve8_horiz_dspr2.c b/aom_dsp/mips/convolve8_horiz_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/convolve8_horiz_dspr2.c
rename to aom_dsp/mips/convolve8_horiz_dspr2.c
index 196a0a2..66692be 100644
--- a/vpx_dsp/mips/convolve8_horiz_dspr2.c
+++ b/aom_dsp/mips/convolve8_horiz_dspr2.c
@@ -12,10 +12,10 @@
#include <stdio.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/convolve_common_dspr2.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_dsp/vpx_filter.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/mips/convolve_common_dspr2.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_filter.h"
+#include "aom_ports/mem.h"
#if HAVE_DSPR2
static void convolve_horiz_4_dspr2(const uint8_t *src, int32_t src_stride,
diff --git a/vpx_dsp/mips/convolve8_vert_dspr2.c b/aom_dsp/mips/convolve8_vert_dspr2.c
similarity index 98%
rename from vpx_dsp/mips/convolve8_vert_dspr2.c
rename to aom_dsp/mips/convolve8_vert_dspr2.c
index ad107d5..1594f10 100644
--- a/vpx_dsp/mips/convolve8_vert_dspr2.c
+++ b/aom_dsp/mips/convolve8_vert_dspr2.c
@@ -12,10 +12,10 @@
#include <stdio.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/convolve_common_dspr2.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_dsp/vpx_filter.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/mips/convolve_common_dspr2.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_filter.h"
+#include "aom_ports/mem.h"
#if HAVE_DSPR2
static void convolve_vert_4_dspr2(const uint8_t *src, int32_t src_stride,
diff --git a/vpx_dsp/mips/convolve_common_dspr2.h b/aom_dsp/mips/convolve_common_dspr2.h
similarity index 96%
rename from vpx_dsp/mips/convolve_common_dspr2.h
rename to aom_dsp/mips/convolve_common_dspr2.h
index 4eee3bd..b650019 100644
--- a/vpx_dsp/mips/convolve_common_dspr2.h
+++ b/aom_dsp/mips/convolve_common_dspr2.h
@@ -14,8 +14,8 @@
#include <assert.h>
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/mips/common_dspr2.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/mips/common_dspr2.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/mips/fwd_dct32x32_msa.c b/aom_dsp/mips/fwd_dct32x32_msa.c
similarity index 99%
rename from vpx_dsp/mips/fwd_dct32x32_msa.c
rename to aom_dsp/mips/fwd_dct32x32_msa.c
index e06a3dc..69bda4a 100644
--- a/vpx_dsp/mips/fwd_dct32x32_msa.c
+++ b/aom_dsp/mips/fwd_dct32x32_msa.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/mips/fwd_txfm_msa.h"
+#include "aom_dsp/mips/fwd_txfm_msa.h"
static void fdct8x32_1d_column_load_butterfly(const int16_t *input,
int32_t src_stride,
diff --git a/vpx_dsp/mips/fwd_txfm_msa.c b/aom_dsp/mips/fwd_txfm_msa.c
similarity index 99%
rename from vpx_dsp/mips/fwd_txfm_msa.c
rename to aom_dsp/mips/fwd_txfm_msa.c
index c0ca061..8de3a86 100644
--- a/vpx_dsp/mips/fwd_txfm_msa.c
+++ b/aom_dsp/mips/fwd_txfm_msa.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/mips/fwd_txfm_msa.h"
+#include "aom_dsp/mips/fwd_txfm_msa.h"
void fdct8x16_1d_column(const int16_t *input, int16_t *tmp_ptr,
int32_t src_stride) {
diff --git a/vpx_dsp/mips/fwd_txfm_msa.h b/aom_dsp/mips/fwd_txfm_msa.h
similarity index 99%
rename from vpx_dsp/mips/fwd_txfm_msa.h
rename to aom_dsp/mips/fwd_txfm_msa.h
index 6458dec..0911c3e 100644
--- a/vpx_dsp/mips/fwd_txfm_msa.h
+++ b/aom_dsp/mips/fwd_txfm_msa.h
@@ -11,8 +11,8 @@
#ifndef VPX_DSP_MIPS_FWD_TXFM_MSA_H_
#define VPX_DSP_MIPS_FWD_TXFM_MSA_H_
-#include "vpx_dsp/mips/txfm_macros_msa.h"
-#include "vpx_dsp/txfm_common.h"
+#include "aom_dsp/mips/txfm_macros_msa.h"
+#include "aom_dsp/txfm_common.h"
#define LD_HADD(psrc, stride) \
({ \
diff --git a/vpx_dsp/mips/idct16x16_msa.c b/aom_dsp/mips/idct16x16_msa.c
similarity index 99%
rename from vpx_dsp/mips/idct16x16_msa.c
rename to aom_dsp/mips/idct16x16_msa.c
index 8c9a848..d55ed94 100644
--- a/vpx_dsp/mips/idct16x16_msa.c
+++ b/aom_dsp/mips/idct16x16_msa.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/mips/inv_txfm_msa.h"
+#include "aom_dsp/mips/inv_txfm_msa.h"
void vpx_idct16_1d_rows_msa(const int16_t *input, int16_t *output) {
v8i16 loc0, loc1, loc2, loc3;
diff --git a/vpx_dsp/mips/idct32x32_msa.c b/aom_dsp/mips/idct32x32_msa.c
similarity index 99%
rename from vpx_dsp/mips/idct32x32_msa.c
rename to aom_dsp/mips/idct32x32_msa.c
index ed5cef1..e090c62 100644
--- a/vpx_dsp/mips/idct32x32_msa.c
+++ b/aom_dsp/mips/idct32x32_msa.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/mips/inv_txfm_msa.h"
+#include "aom_dsp/mips/inv_txfm_msa.h"
static void idct32x8_row_transpose_store(const int16_t *input,
int16_t *tmp_buf) {
diff --git a/vpx_dsp/mips/idct4x4_msa.c b/aom_dsp/mips/idct4x4_msa.c
similarity index 98%
rename from vpx_dsp/mips/idct4x4_msa.c
rename to aom_dsp/mips/idct4x4_msa.c
index 50e8248..956b5f5 100644
--- a/vpx_dsp/mips/idct4x4_msa.c
+++ b/aom_dsp/mips/idct4x4_msa.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/mips/inv_txfm_msa.h"
+#include "aom_dsp/mips/inv_txfm_msa.h"
void vpx_iwht4x4_16_add_msa(const int16_t *input, uint8_t *dst,
int32_t dst_stride) {
diff --git a/vpx_dsp/mips/idct8x8_msa.c b/aom_dsp/mips/idct8x8_msa.c
similarity index 98%
rename from vpx_dsp/mips/idct8x8_msa.c
rename to aom_dsp/mips/idct8x8_msa.c
index c06330b..420433f 100644
--- a/vpx_dsp/mips/idct8x8_msa.c
+++ b/aom_dsp/mips/idct8x8_msa.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/mips/inv_txfm_msa.h"
+#include "aom_dsp/mips/inv_txfm_msa.h"
void vpx_idct8x8_64_add_msa(const int16_t *input, uint8_t *dst,
int32_t dst_stride) {
diff --git a/vpx_dsp/mips/intrapred16_dspr2.c b/aom_dsp/mips/intrapred16_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/intrapred16_dspr2.c
rename to aom_dsp/mips/intrapred16_dspr2.c
index 3e29d0a..b9bb55c 100644
--- a/vpx_dsp/mips/intrapred16_dspr2.c
+++ b/aom_dsp/mips/intrapred16_dspr2.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/mips/common_dspr2.h"
+#include "aom_dsp/mips/common_dspr2.h"
#if HAVE_DSPR2
void vpx_h_predictor_16x16_dspr2(uint8_t *dst, ptrdiff_t stride,
diff --git a/vpx_dsp/mips/intrapred4_dspr2.c b/aom_dsp/mips/intrapred4_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/intrapred4_dspr2.c
rename to aom_dsp/mips/intrapred4_dspr2.c
index 9f51d50..4494bc8 100644
--- a/vpx_dsp/mips/intrapred4_dspr2.c
+++ b/aom_dsp/mips/intrapred4_dspr2.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/mips/common_dspr2.h"
+#include "aom_dsp/mips/common_dspr2.h"
#if HAVE_DSPR2
void vpx_h_predictor_4x4_dspr2(uint8_t *dst, ptrdiff_t stride,
diff --git a/vpx_dsp/mips/intrapred8_dspr2.c b/aom_dsp/mips/intrapred8_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/intrapred8_dspr2.c
rename to aom_dsp/mips/intrapred8_dspr2.c
index eac79d5..f85209b 100644
--- a/vpx_dsp/mips/intrapred8_dspr2.c
+++ b/aom_dsp/mips/intrapred8_dspr2.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/mips/common_dspr2.h"
+#include "aom_dsp/mips/common_dspr2.h"
#if HAVE_DSPR2
void vpx_h_predictor_8x8_dspr2(uint8_t *dst, ptrdiff_t stride,
diff --git a/vpx_dsp/mips/intrapred_msa.c b/aom_dsp/mips/intrapred_msa.c
similarity index 99%
rename from vpx_dsp/mips/intrapred_msa.c
rename to aom_dsp/mips/intrapred_msa.c
index b5ee943..17dd57b 100644
--- a/vpx_dsp/mips/intrapred_msa.c
+++ b/aom_dsp/mips/intrapred_msa.c
@@ -9,7 +9,7 @@
*/
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/macros_msa.h"
+#include "aom_dsp/mips/macros_msa.h"
#define IPRED_SUBS_UH2_UH(in0, in1, out0, out1) \
{ \
diff --git a/vpx_dsp/mips/inv_txfm_dspr2.h b/aom_dsp/mips/inv_txfm_dspr2.h
similarity index 97%
rename from vpx_dsp/mips/inv_txfm_dspr2.h
rename to aom_dsp/mips/inv_txfm_dspr2.h
index 69223a4..e0c70ba 100644
--- a/vpx_dsp/mips/inv_txfm_dspr2.h
+++ b/aom_dsp/mips/inv_txfm_dspr2.h
@@ -14,9 +14,9 @@
#include <assert.h>
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/inv_txfm.h"
-#include "vpx_dsp/mips/common_dspr2.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/inv_txfm.h"
+#include "aom_dsp/mips/common_dspr2.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/mips/inv_txfm_msa.h b/aom_dsp/mips/inv_txfm_msa.h
similarity index 99%
rename from vpx_dsp/mips/inv_txfm_msa.h
rename to aom_dsp/mips/inv_txfm_msa.h
index 9597d63..86933e3 100644
--- a/vpx_dsp/mips/inv_txfm_msa.h
+++ b/aom_dsp/mips/inv_txfm_msa.h
@@ -11,9 +11,9 @@
#ifndef VPX_DSP_MIPS_INV_TXFM_MSA_H_
#define VPX_DSP_MIPS_INV_TXFM_MSA_H_
-#include "vpx_dsp/mips/macros_msa.h"
-#include "vpx_dsp/mips/txfm_macros_msa.h"
-#include "vpx_dsp/txfm_common.h"
+#include "aom_dsp/mips/macros_msa.h"
+#include "aom_dsp/mips/txfm_macros_msa.h"
+#include "aom_dsp/txfm_common.h"
#define VP9_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, \
out3, out4, out5, out6, out7) \
diff --git a/vpx_dsp/mips/itrans16_dspr2.c b/aom_dsp/mips/itrans16_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/itrans16_dspr2.c
rename to aom_dsp/mips/itrans16_dspr2.c
index 0ec0c20..8d184cb 100644
--- a/vpx_dsp/mips/itrans16_dspr2.c
+++ b/aom_dsp/mips/itrans16_dspr2.c
@@ -10,8 +10,8 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/inv_txfm_dspr2.h"
-#include "vpx_dsp/txfm_common.h"
+#include "aom_dsp/mips/inv_txfm_dspr2.h"
+#include "aom_dsp/txfm_common.h"
#if HAVE_DSPR2
void idct16_rows_dspr2(const int16_t *input, int16_t *output,
diff --git a/vpx_dsp/mips/itrans32_cols_dspr2.c b/aom_dsp/mips/itrans32_cols_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/itrans32_cols_dspr2.c
rename to aom_dsp/mips/itrans32_cols_dspr2.c
index ce25d55..7997131 100644
--- a/vpx_dsp/mips/itrans32_cols_dspr2.c
+++ b/aom_dsp/mips/itrans32_cols_dspr2.c
@@ -9,8 +9,8 @@
*/
#include "./vpx_config.h"
-#include "vpx_dsp/mips/inv_txfm_dspr2.h"
-#include "vpx_dsp/txfm_common.h"
+#include "aom_dsp/mips/inv_txfm_dspr2.h"
+#include "aom_dsp/txfm_common.h"
#if HAVE_DSPR2
void vpx_idct32_cols_add_blk_dspr2(int16_t *input, uint8_t *dest,
diff --git a/vpx_dsp/mips/itrans32_dspr2.c b/aom_dsp/mips/itrans32_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/itrans32_dspr2.c
rename to aom_dsp/mips/itrans32_dspr2.c
index d71c5ff..74248b3 100644
--- a/vpx_dsp/mips/itrans32_dspr2.c
+++ b/aom_dsp/mips/itrans32_dspr2.c
@@ -12,8 +12,8 @@
#include <stdio.h>
#include "./vpx_config.h"
-#include "vpx_dsp/mips/inv_txfm_dspr2.h"
-#include "vpx_dsp/txfm_common.h"
+#include "aom_dsp/mips/inv_txfm_dspr2.h"
+#include "aom_dsp/txfm_common.h"
#if HAVE_DSPR2
static void idct32_rows_dspr2(const int16_t *input, int16_t *output,
diff --git a/vpx_dsp/mips/itrans4_dspr2.c b/aom_dsp/mips/itrans4_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/itrans4_dspr2.c
rename to aom_dsp/mips/itrans4_dspr2.c
index 516ea80..d6ea667 100644
--- a/vpx_dsp/mips/itrans4_dspr2.c
+++ b/aom_dsp/mips/itrans4_dspr2.c
@@ -10,8 +10,8 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/inv_txfm_dspr2.h"
-#include "vpx_dsp/txfm_common.h"
+#include "aom_dsp/mips/inv_txfm_dspr2.h"
+#include "aom_dsp/txfm_common.h"
#if HAVE_DSPR2
void vpx_idct4_rows_dspr2(const int16_t *input, int16_t *output) {
diff --git a/vpx_dsp/mips/itrans8_dspr2.c b/aom_dsp/mips/itrans8_dspr2.c
similarity index 99%
rename from vpx_dsp/mips/itrans8_dspr2.c
rename to aom_dsp/mips/itrans8_dspr2.c
index 08a6c78..4cee3d0 100644
--- a/vpx_dsp/mips/itrans8_dspr2.c
+++ b/aom_dsp/mips/itrans8_dspr2.c
@@ -10,8 +10,8 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/inv_txfm_dspr2.h"
-#include "vpx_dsp/txfm_common.h"
+#include "aom_dsp/mips/inv_txfm_dspr2.h"
+#include "aom_dsp/txfm_common.h"
#if HAVE_DSPR2
void idct8_rows_dspr2(const int16_t *input, int16_t *output, uint32_t no_rows) {
diff --git a/vpx_dsp/mips/loopfilter_16_msa.c b/aom_dsp/mips/loopfilter_16_msa.c
similarity index 99%
rename from vpx_dsp/mips/loopfilter_16_msa.c
rename to aom_dsp/mips/loopfilter_16_msa.c
index d5eae3b..e555803 100644
--- a/vpx_dsp/mips/loopfilter_16_msa.c
+++ b/aom_dsp/mips/loopfilter_16_msa.c
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_ports/mem.h"
-#include "vpx_dsp/mips/loopfilter_msa.h"
+#include "aom_ports/mem.h"
+#include "aom_dsp/mips/loopfilter_msa.h"
int32_t vpx_hz_lpf_t4_and_t8_16w(uint8_t *src, int32_t pitch, uint8_t *filter48,
const uint8_t *b_limit_ptr,
diff --git a/vpx_dsp/mips/loopfilter_4_msa.c b/aom_dsp/mips/loopfilter_4_msa.c
similarity index 99%
rename from vpx_dsp/mips/loopfilter_4_msa.c
rename to aom_dsp/mips/loopfilter_4_msa.c
index 7ca0ac6..16abbbd 100644
--- a/vpx_dsp/mips/loopfilter_4_msa.c
+++ b/aom_dsp/mips/loopfilter_4_msa.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/mips/loopfilter_msa.h"
+#include "aom_dsp/mips/loopfilter_msa.h"
void vpx_lpf_horizontal_4_msa(uint8_t *src, int32_t pitch,
const uint8_t *b_limit_ptr,
diff --git a/vpx_dsp/mips/loopfilter_8_msa.c b/aom_dsp/mips/loopfilter_8_msa.c
similarity index 99%
rename from vpx_dsp/mips/loopfilter_8_msa.c
rename to aom_dsp/mips/loopfilter_8_msa.c
index 6564af5..0091dc9 100644
--- a/vpx_dsp/mips/loopfilter_8_msa.c
+++ b/aom_dsp/mips/loopfilter_8_msa.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/mips/loopfilter_msa.h"
+#include "aom_dsp/mips/loopfilter_msa.h"
void vpx_lpf_horizontal_8_msa(uint8_t *src, int32_t pitch,
const uint8_t *b_limit_ptr,
diff --git a/vpx_dsp/mips/loopfilter_filters_dspr2.c b/aom_dsp/mips/loopfilter_filters_dspr2.c
similarity index 97%
rename from vpx_dsp/mips/loopfilter_filters_dspr2.c
rename to aom_dsp/mips/loopfilter_filters_dspr2.c
index 7d17165..df5e839 100644
--- a/vpx_dsp/mips/loopfilter_filters_dspr2.c
+++ b/aom_dsp/mips/loopfilter_filters_dspr2.c
@@ -11,12 +11,12 @@
#include <stdlib.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/mips/common_dspr2.h"
-#include "vpx_dsp/mips/loopfilter_filters_dspr2.h"
-#include "vpx_dsp/mips/loopfilter_macros_dspr2.h"
-#include "vpx_dsp/mips/loopfilter_masks_dspr2.h"
-#include "vpx_mem/vpx_mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/mips/common_dspr2.h"
+#include "aom_dsp/mips/loopfilter_filters_dspr2.h"
+#include "aom_dsp/mips/loopfilter_macros_dspr2.h"
+#include "aom_dsp/mips/loopfilter_masks_dspr2.h"
+#include "aom_mem/vpx_mem.h"
#if HAVE_DSPR2
void vpx_lpf_horizontal_4_dspr2(unsigned char *s, int pitch,
diff --git a/vpx_dsp/mips/loopfilter_filters_dspr2.h b/aom_dsp/mips/loopfilter_filters_dspr2.h
similarity index 99%
rename from vpx_dsp/mips/loopfilter_filters_dspr2.h
rename to aom_dsp/mips/loopfilter_filters_dspr2.h
index 11f286d..919618c 100644
--- a/vpx_dsp/mips/loopfilter_filters_dspr2.h
+++ b/aom_dsp/mips/loopfilter_filters_dspr2.h
@@ -14,9 +14,9 @@
#include <stdlib.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/mips/loopfilter_macros_dspr2.h b/aom_dsp/mips/loopfilter_macros_dspr2.h
similarity index 99%
rename from vpx_dsp/mips/loopfilter_macros_dspr2.h
rename to aom_dsp/mips/loopfilter_macros_dspr2.h
index 769371d..3928263 100644
--- a/vpx_dsp/mips/loopfilter_macros_dspr2.h
+++ b/aom_dsp/mips/loopfilter_macros_dspr2.h
@@ -14,8 +14,8 @@
#include <stdlib.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_mem/vpx_mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_mem/vpx_mem.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/mips/loopfilter_masks_dspr2.h b/aom_dsp/mips/loopfilter_masks_dspr2.h
similarity index 99%
rename from vpx_dsp/mips/loopfilter_masks_dspr2.h
rename to aom_dsp/mips/loopfilter_masks_dspr2.h
index 0a0cf57..986db05 100644
--- a/vpx_dsp/mips/loopfilter_masks_dspr2.h
+++ b/aom_dsp/mips/loopfilter_masks_dspr2.h
@@ -14,8 +14,8 @@
#include <stdlib.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_mem/vpx_mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_mem/vpx_mem.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/mips/loopfilter_mb_dspr2.c b/aom_dsp/mips/loopfilter_mb_dspr2.c
similarity index 98%
rename from vpx_dsp/mips/loopfilter_mb_dspr2.c
rename to aom_dsp/mips/loopfilter_mb_dspr2.c
index 0b2fcfd..1666e11 100644
--- a/vpx_dsp/mips/loopfilter_mb_dspr2.c
+++ b/aom_dsp/mips/loopfilter_mb_dspr2.c
@@ -11,12 +11,12 @@
#include <stdlib.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/mips/common_dspr2.h"
-#include "vpx_dsp/mips/loopfilter_filters_dspr2.h"
-#include "vpx_dsp/mips/loopfilter_macros_dspr2.h"
-#include "vpx_dsp/mips/loopfilter_masks_dspr2.h"
-#include "vpx_mem/vpx_mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/mips/common_dspr2.h"
+#include "aom_dsp/mips/loopfilter_filters_dspr2.h"
+#include "aom_dsp/mips/loopfilter_macros_dspr2.h"
+#include "aom_dsp/mips/loopfilter_masks_dspr2.h"
+#include "aom_mem/vpx_mem.h"
#if HAVE_DSPR2
void vpx_lpf_horizontal_8_dspr2(unsigned char *s, int pitch,
diff --git a/vpx_dsp/mips/loopfilter_mb_horiz_dspr2.c b/aom_dsp/mips/loopfilter_mb_horiz_dspr2.c
similarity index 98%
rename from vpx_dsp/mips/loopfilter_mb_horiz_dspr2.c
rename to aom_dsp/mips/loopfilter_mb_horiz_dspr2.c
index b6aa2a0..8608266 100644
--- a/vpx_dsp/mips/loopfilter_mb_horiz_dspr2.c
+++ b/aom_dsp/mips/loopfilter_mb_horiz_dspr2.c
@@ -11,12 +11,12 @@
#include <stdlib.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/mips/common_dspr2.h"
-#include "vpx_dsp/mips/loopfilter_filters_dspr2.h"
-#include "vpx_dsp/mips/loopfilter_macros_dspr2.h"
-#include "vpx_dsp/mips/loopfilter_masks_dspr2.h"
-#include "vpx_mem/vpx_mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/mips/common_dspr2.h"
+#include "aom_dsp/mips/loopfilter_filters_dspr2.h"
+#include "aom_dsp/mips/loopfilter_macros_dspr2.h"
+#include "aom_dsp/mips/loopfilter_masks_dspr2.h"
+#include "aom_mem/vpx_mem.h"
#if HAVE_DSPR2
void vpx_lpf_horizontal_16_dspr2(unsigned char *s, int pitch,
diff --git a/vpx_dsp/mips/loopfilter_mb_vert_dspr2.c b/aom_dsp/mips/loopfilter_mb_vert_dspr2.c
similarity index 98%
rename from vpx_dsp/mips/loopfilter_mb_vert_dspr2.c
rename to aom_dsp/mips/loopfilter_mb_vert_dspr2.c
index 96e8d88..22d7261 100644
--- a/vpx_dsp/mips/loopfilter_mb_vert_dspr2.c
+++ b/aom_dsp/mips/loopfilter_mb_vert_dspr2.c
@@ -11,12 +11,12 @@
#include <stdlib.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/mips/common_dspr2.h"
-#include "vpx_dsp/mips/loopfilter_filters_dspr2.h"
-#include "vpx_dsp/mips/loopfilter_macros_dspr2.h"
-#include "vpx_dsp/mips/loopfilter_masks_dspr2.h"
-#include "vpx_mem/vpx_mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/mips/common_dspr2.h"
+#include "aom_dsp/mips/loopfilter_filters_dspr2.h"
+#include "aom_dsp/mips/loopfilter_macros_dspr2.h"
+#include "aom_dsp/mips/loopfilter_masks_dspr2.h"
+#include "aom_mem/vpx_mem.h"
#if HAVE_DSPR2
void vpx_lpf_vertical_16_dspr2(uint8_t *s, int pitch, const uint8_t *blimit,
diff --git a/vpx_dsp/mips/loopfilter_msa.h b/aom_dsp/mips/loopfilter_msa.h
similarity index 99%
rename from vpx_dsp/mips/loopfilter_msa.h
rename to aom_dsp/mips/loopfilter_msa.h
index d3c2bd4..d977f34 100644
--- a/vpx_dsp/mips/loopfilter_msa.h
+++ b/aom_dsp/mips/loopfilter_msa.h
@@ -11,7 +11,7 @@
#ifndef VPX_DSP_LOOPFILTER_MSA_H_
#define VPX_DSP_LOOPFILTER_MSA_H_
-#include "vpx_dsp/mips/macros_msa.h"
+#include "aom_dsp/mips/macros_msa.h"
#define VPX_LPF_FILTER4_8W(p1_in, p0_in, q0_in, q1_in, mask_in, hev_in, \
p1_out, p0_out, q0_out, q1_out) \
diff --git a/vpx_dsp/mips/macros_msa.h b/aom_dsp/mips/macros_msa.h
similarity index 99%
rename from vpx_dsp/mips/macros_msa.h
rename to aom_dsp/mips/macros_msa.h
index ed00cc5..bb14301 100644
--- a/vpx_dsp/mips/macros_msa.h
+++ b/aom_dsp/mips/macros_msa.h
@@ -14,7 +14,7 @@
#include <msa.h>
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#define LD_B(RTYPE, psrc) *((const RTYPE *)(psrc))
#define LD_UB(...) LD_B(v16u8, __VA_ARGS__)
diff --git a/vpx_dsp/mips/sad_msa.c b/aom_dsp/mips/sad_msa.c
similarity index 99%
rename from vpx_dsp/mips/sad_msa.c
rename to aom_dsp/mips/sad_msa.c
index bfd9a69..88ec2d4 100644
--- a/vpx_dsp/mips/sad_msa.c
+++ b/aom_dsp/mips/sad_msa.c
@@ -9,7 +9,7 @@
*/
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/macros_msa.h"
+#include "aom_dsp/mips/macros_msa.h"
#define SAD_INSVE_W4(RTYPE, in0, in1, in2, in3, out) \
{ \
diff --git a/vpx_dsp/mips/sub_pixel_variance_msa.c b/aom_dsp/mips/sub_pixel_variance_msa.c
similarity index 99%
rename from vpx_dsp/mips/sub_pixel_variance_msa.c
rename to aom_dsp/mips/sub_pixel_variance_msa.c
index b893d76..6d71f7d 100644
--- a/vpx_dsp/mips/sub_pixel_variance_msa.c
+++ b/aom_dsp/mips/sub_pixel_variance_msa.c
@@ -9,9 +9,9 @@
*/
#include "./vpx_dsp_rtcd.h"
-#include "vpx_ports/mem.h"
-#include "vpx_dsp/mips/macros_msa.h"
-#include "vpx_dsp/variance.h"
+#include "aom_ports/mem.h"
+#include "aom_dsp/mips/macros_msa.h"
+#include "aom_dsp/variance.h"
static const uint8_t bilinear_filters_msa[8][2] = {
{ 128, 0 }, { 112, 16 }, { 96, 32 }, { 80, 48 },
diff --git a/vpx_dsp/mips/subtract_msa.c b/aom_dsp/mips/subtract_msa.c
similarity index 99%
rename from vpx_dsp/mips/subtract_msa.c
rename to aom_dsp/mips/subtract_msa.c
index 391a7eb..04cb922 100644
--- a/vpx_dsp/mips/subtract_msa.c
+++ b/aom_dsp/mips/subtract_msa.c
@@ -9,7 +9,7 @@
*/
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/macros_msa.h"
+#include "aom_dsp/mips/macros_msa.h"
static void sub_blk_4x4_msa(const uint8_t *src_ptr, int32_t src_stride,
const uint8_t *pred_ptr, int32_t pred_stride,
diff --git a/vpx_dsp/mips/txfm_macros_msa.h b/aom_dsp/mips/txfm_macros_msa.h
similarity index 99%
rename from vpx_dsp/mips/txfm_macros_msa.h
rename to aom_dsp/mips/txfm_macros_msa.h
index da100f6..a7da24e 100644
--- a/vpx_dsp/mips/txfm_macros_msa.h
+++ b/aom_dsp/mips/txfm_macros_msa.h
@@ -11,7 +11,7 @@
#ifndef VPX_DSP_MIPS_TXFM_MACROS_MIPS_MSA_H_
#define VPX_DSP_MIPS_TXFM_MACROS_MIPS_MSA_H_
-#include "vpx_dsp/mips/macros_msa.h"
+#include "aom_dsp/mips/macros_msa.h"
#define DOTP_CONST_PAIR(reg0, reg1, cnst0, cnst1, out0, out1) \
{ \
diff --git a/vpx_dsp/mips/variance_msa.c b/aom_dsp/mips/variance_msa.c
similarity index 99%
rename from vpx_dsp/mips/variance_msa.c
rename to aom_dsp/mips/variance_msa.c
index 54c5fca..51236c6 100644
--- a/vpx_dsp/mips/variance_msa.c
+++ b/aom_dsp/mips/variance_msa.c
@@ -9,7 +9,7 @@
*/
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/macros_msa.h"
+#include "aom_dsp/mips/macros_msa.h"
#define CALC_MSE_B(src, ref, var) \
{ \
diff --git a/vpx_dsp/mips/vpx_convolve8_avg_horiz_msa.c b/aom_dsp/mips/vpx_convolve8_avg_horiz_msa.c
similarity index 99%
rename from vpx_dsp/mips/vpx_convolve8_avg_horiz_msa.c
rename to aom_dsp/mips/vpx_convolve8_avg_horiz_msa.c
index ad2af28..300656c 100644
--- a/vpx_dsp/mips/vpx_convolve8_avg_horiz_msa.c
+++ b/aom_dsp/mips/vpx_convolve8_avg_horiz_msa.c
@@ -10,7 +10,7 @@
#include <assert.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/vpx_convolve_msa.h"
+#include "aom_dsp/mips/vpx_convolve_msa.h"
static void common_hz_8t_and_aver_dst_4x4_msa(const uint8_t *src,
int32_t src_stride, uint8_t *dst,
diff --git a/vpx_dsp/mips/vpx_convolve8_avg_msa.c b/aom_dsp/mips/vpx_convolve8_avg_msa.c
similarity index 99%
rename from vpx_dsp/mips/vpx_convolve8_avg_msa.c
rename to aom_dsp/mips/vpx_convolve8_avg_msa.c
index 1cfa632..8037661 100644
--- a/vpx_dsp/mips/vpx_convolve8_avg_msa.c
+++ b/aom_dsp/mips/vpx_convolve8_avg_msa.c
@@ -10,7 +10,7 @@
#include <assert.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/vpx_convolve_msa.h"
+#include "aom_dsp/mips/vpx_convolve_msa.h"
static void common_hv_8ht_8vt_and_aver_dst_4w_msa(
const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride,
diff --git a/vpx_dsp/mips/vpx_convolve8_avg_vert_msa.c b/aom_dsp/mips/vpx_convolve8_avg_vert_msa.c
similarity index 99%
rename from vpx_dsp/mips/vpx_convolve8_avg_vert_msa.c
rename to aom_dsp/mips/vpx_convolve8_avg_vert_msa.c
index 146ce3b..b3c9b6b 100644
--- a/vpx_dsp/mips/vpx_convolve8_avg_vert_msa.c
+++ b/aom_dsp/mips/vpx_convolve8_avg_vert_msa.c
@@ -10,7 +10,7 @@
#include <assert.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/vpx_convolve_msa.h"
+#include "aom_dsp/mips/vpx_convolve_msa.h"
static void common_vt_8t_and_aver_dst_4w_msa(const uint8_t *src,
int32_t src_stride, uint8_t *dst,
diff --git a/vpx_dsp/mips/vpx_convolve8_horiz_msa.c b/aom_dsp/mips/vpx_convolve8_horiz_msa.c
similarity index 99%
rename from vpx_dsp/mips/vpx_convolve8_horiz_msa.c
rename to aom_dsp/mips/vpx_convolve8_horiz_msa.c
index 9e8bf7b..256abd5 100644
--- a/vpx_dsp/mips/vpx_convolve8_horiz_msa.c
+++ b/aom_dsp/mips/vpx_convolve8_horiz_msa.c
@@ -10,7 +10,7 @@
#include <assert.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/vpx_convolve_msa.h"
+#include "aom_dsp/mips/vpx_convolve_msa.h"
static void common_hz_8t_4x4_msa(const uint8_t *src, int32_t src_stride,
uint8_t *dst, int32_t dst_stride,
diff --git a/vpx_dsp/mips/vpx_convolve8_msa.c b/aom_dsp/mips/vpx_convolve8_msa.c
similarity index 99%
rename from vpx_dsp/mips/vpx_convolve8_msa.c
rename to aom_dsp/mips/vpx_convolve8_msa.c
index b16ec57..81d4f14 100644
--- a/vpx_dsp/mips/vpx_convolve8_msa.c
+++ b/aom_dsp/mips/vpx_convolve8_msa.c
@@ -10,7 +10,7 @@
#include <assert.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/vpx_convolve_msa.h"
+#include "aom_dsp/mips/vpx_convolve_msa.h"
const uint8_t mc_filt_mask_arr[16 * 3] = {
/* 8 width cases */
diff --git a/vpx_dsp/mips/vpx_convolve8_vert_msa.c b/aom_dsp/mips/vpx_convolve8_vert_msa.c
similarity index 99%
rename from vpx_dsp/mips/vpx_convolve8_vert_msa.c
rename to aom_dsp/mips/vpx_convolve8_vert_msa.c
index 4106822..0404575 100644
--- a/vpx_dsp/mips/vpx_convolve8_vert_msa.c
+++ b/aom_dsp/mips/vpx_convolve8_vert_msa.c
@@ -10,7 +10,7 @@
#include <assert.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/mips/vpx_convolve_msa.h"
+#include "aom_dsp/mips/vpx_convolve_msa.h"
static void common_vt_8t_4w_msa(const uint8_t *src, int32_t src_stride,
uint8_t *dst, int32_t dst_stride,
diff --git a/vpx_dsp/mips/vpx_convolve_avg_msa.c b/aom_dsp/mips/vpx_convolve_avg_msa.c
similarity index 99%
rename from vpx_dsp/mips/vpx_convolve_avg_msa.c
rename to aom_dsp/mips/vpx_convolve_avg_msa.c
index 45399ba..313223b 100644
--- a/vpx_dsp/mips/vpx_convolve_avg_msa.c
+++ b/aom_dsp/mips/vpx_convolve_avg_msa.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/mips/macros_msa.h"
+#include "aom_dsp/mips/macros_msa.h"
static void avg_width4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst,
int32_t dst_stride, int32_t height) {
diff --git a/vpx_dsp/mips/vpx_convolve_copy_msa.c b/aom_dsp/mips/vpx_convolve_copy_msa.c
similarity index 99%
rename from vpx_dsp/mips/vpx_convolve_copy_msa.c
rename to aom_dsp/mips/vpx_convolve_copy_msa.c
index c3d87a4..520a706 100644
--- a/vpx_dsp/mips/vpx_convolve_copy_msa.c
+++ b/aom_dsp/mips/vpx_convolve_copy_msa.c
@@ -9,7 +9,7 @@
*/
#include <string.h>
-#include "vpx_dsp/mips/macros_msa.h"
+#include "aom_dsp/mips/macros_msa.h"
static void copy_width8_msa(const uint8_t *src, int32_t src_stride,
uint8_t *dst, int32_t dst_stride, int32_t height) {
diff --git a/vpx_dsp/mips/vpx_convolve_msa.h b/aom_dsp/mips/vpx_convolve_msa.h
similarity index 98%
rename from vpx_dsp/mips/vpx_convolve_msa.h
rename to aom_dsp/mips/vpx_convolve_msa.h
index 198c21e..6b48879 100644
--- a/vpx_dsp/mips/vpx_convolve_msa.h
+++ b/aom_dsp/mips/vpx_convolve_msa.h
@@ -11,8 +11,8 @@
#ifndef VPX_DSP_MIPS_VPX_CONVOLVE_MSA_H_
#define VPX_DSP_MIPS_VPX_CONVOLVE_MSA_H_
-#include "vpx_dsp/mips/macros_msa.h"
-#include "vpx_dsp/vpx_filter.h"
+#include "aom_dsp/mips/macros_msa.h"
+#include "aom_dsp/vpx_filter.h"
extern const uint8_t mc_filt_mask_arr[16 * 3];
diff --git a/vpx_dsp/prob.c b/aom_dsp/prob.c
similarity index 100%
rename from vpx_dsp/prob.c
rename to aom_dsp/prob.c
diff --git a/vpx_dsp/prob.h b/aom_dsp/prob.h
similarity index 98%
rename from vpx_dsp/prob.h
rename to aom_dsp/prob.h
index 6b4f7f9..c6e66eb 100644
--- a/vpx_dsp/prob.h
+++ b/aom_dsp/prob.h
@@ -14,7 +14,7 @@
#include "./vpx_config.h"
#include "./vpx_dsp_common.h"
-#include "vpx_ports/mem.h"
+#include "aom_ports/mem.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/psnrhvs.c b/aom_dsp/psnrhvs.c
similarity index 99%
rename from vpx_dsp/psnrhvs.c
rename to aom_dsp/psnrhvs.c
index 58ef9f0..851992c 100644
--- a/vpx_dsp/psnrhvs.c
+++ b/aom_dsp/psnrhvs.c
@@ -16,8 +16,8 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/ssim.h"
-#include "vpx_ports/system_state.h"
+#include "aom_dsp/ssim.h"
+#include "aom_ports/system_state.h"
#if !defined(M_PI)
#define M_PI (3.141592653589793238462643)
diff --git a/vpx_dsp/quantize.c b/aom_dsp/quantize.c
similarity index 99%
rename from vpx_dsp/quantize.c
rename to aom_dsp/quantize.c
index 096bc32..86400c7 100644
--- a/vpx_dsp/quantize.c
+++ b/aom_dsp/quantize.c
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/quantize.h"
-#include "vpx_mem/vpx_mem.h"
+#include "aom_dsp/quantize.h"
+#include "aom_mem/vpx_mem.h"
#if CONFIG_AOM_QM
void vpx_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block,
diff --git a/vpx_dsp/quantize.h b/aom_dsp/quantize.h
similarity index 99%
rename from vpx_dsp/quantize.h
rename to aom_dsp/quantize.h
index 229d4dc..610a5ed 100644
--- a/vpx_dsp/quantize.h
+++ b/aom_dsp/quantize.h
@@ -12,7 +12,7 @@
#define VPX_DSP_QUANTIZE_H_
#include "./vpx_config.h"
-#include "vpx_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_dsp_common.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/sad.c b/aom_dsp/sad.c
similarity index 99%
rename from vpx_dsp/sad.c
rename to aom_dsp/sad.c
index 9a4a79f..a76fabb 100644
--- a/vpx_dsp/sad.c
+++ b/aom_dsp/sad.c
@@ -13,8 +13,8 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/mem.h"
/* Sum the difference between every corresponding element of the buffers. */
static INLINE unsigned int sad(const uint8_t *a, int a_stride, const uint8_t *b,
diff --git a/vpx_dsp/ssim.c b/aom_dsp/ssim.c
similarity index 99%
rename from vpx_dsp/ssim.c
rename to aom_dsp/ssim.c
index b0bd002..7d600cc 100644
--- a/vpx_dsp/ssim.c
+++ b/aom_dsp/ssim.c
@@ -10,9 +10,9 @@
#include <math.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/ssim.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/system_state.h"
+#include "aom_dsp/ssim.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/system_state.h"
void vpx_ssim_parms_16x16_c(const uint8_t *s, int sp, const uint8_t *r, int rp,
uint32_t *sum_s, uint32_t *sum_r,
diff --git a/vpx_dsp/ssim.h b/aom_dsp/ssim.h
similarity index 98%
rename from vpx_dsp/ssim.h
rename to aom_dsp/ssim.h
index cc9e2b4..cb63b24 100644
--- a/vpx_dsp/ssim.h
+++ b/aom_dsp/ssim.h
@@ -16,7 +16,7 @@
#endif
#include "./vpx_config.h"
-#include "vpx_scale/yv12config.h"
+#include "aom_scale/yv12config.h"
// metrics used for calculating ssim, ssim2, dssim, and ssimc
typedef struct {
diff --git a/vpx_dsp/subtract.c b/aom_dsp/subtract.c
similarity index 96%
rename from vpx_dsp/subtract.c
rename to aom_dsp/subtract.c
index dc4d662..ded77ac 100644
--- a/vpx_dsp/subtract.c
+++ b/aom_dsp/subtract.c
@@ -13,8 +13,8 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/mem.h"
void vpx_subtract_block_c(int rows, int cols, int16_t *diff,
ptrdiff_t diff_stride, const uint8_t *src,
diff --git a/vpx_dsp/txfm_common.h b/aom_dsp/txfm_common.h
similarity index 98%
rename from vpx_dsp/txfm_common.h
rename to aom_dsp/txfm_common.h
index fd27f92..62a0929 100644
--- a/vpx_dsp/txfm_common.h
+++ b/aom_dsp/txfm_common.h
@@ -11,7 +11,7 @@
#ifndef VPX_DSP_TXFM_COMMON_H_
#define VPX_DSP_TXFM_COMMON_H_
-#include "vpx_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_dsp_common.h"
// Constants and Macros used by all idct/dct functions
#define DCT_CONST_BITS 14
diff --git a/vpx_dsp/variance.c b/aom_dsp/variance.c
similarity index 99%
rename from vpx_dsp/variance.c
rename to aom_dsp/variance.c
index 32ce102..519cf5c 100644
--- a/vpx_dsp/variance.c
+++ b/aom_dsp/variance.c
@@ -11,10 +11,10 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx_ports/mem.h"
-#include "vpx/vpx_integer.h"
+#include "aom_ports/mem.h"
+#include "aom/vpx_integer.h"
-#include "vpx_dsp/variance.h"
+#include "aom_dsp/variance.h"
static const uint8_t bilinear_filters[8][2] = {
{ 128, 0 }, { 112, 16 }, { 96, 32 }, { 80, 48 },
diff --git a/vpx_dsp/variance.h b/aom_dsp/variance.h
similarity index 98%
rename from vpx_dsp/variance.h
rename to aom_dsp/variance.h
index 6a32020..9f504ba 100644
--- a/vpx_dsp/variance.h
+++ b/aom_dsp/variance.h
@@ -13,7 +13,7 @@
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/vpx_convolve.c b/aom_dsp/vpx_convolve.c
similarity index 98%
rename from vpx_dsp/vpx_convolve.c
rename to aom_dsp/vpx_convolve.c
index 8d78dfb..1f50789 100644
--- a/vpx_dsp/vpx_convolve.c
+++ b/aom_dsp/vpx_convolve.c
@@ -13,11 +13,11 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/vpx_convolve.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_dsp/vpx_filter.h"
-#include "vpx_ports/mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/vpx_convolve.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_filter.h"
+#include "aom_ports/mem.h"
static void convolve_horiz(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
diff --git a/vpx_dsp/vpx_convolve.h b/aom_dsp/vpx_convolve.h
similarity index 97%
rename from vpx_dsp/vpx_convolve.h
rename to aom_dsp/vpx_convolve.h
index 00ba535..be39748 100644
--- a/vpx_dsp/vpx_convolve.h
+++ b/aom_dsp/vpx_convolve.h
@@ -11,7 +11,7 @@
#define VPX_DSP_VPX_CONVOLVE_H_
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/vpx_dsp.mk b/aom_dsp/vpx_dsp.mk
similarity index 99%
rename from vpx_dsp/vpx_dsp.mk
rename to aom_dsp/vpx_dsp.mk
index 960f9c5..8549d16 100644
--- a/vpx_dsp/vpx_dsp.mk
+++ b/aom_dsp/vpx_dsp.mk
@@ -348,4 +348,4 @@
DSP_SRCS-yes += vpx_dsp_rtcd.c
DSP_SRCS-yes += vpx_dsp_rtcd_defs.pl
-$(eval $(call rtcd_h_template,vpx_dsp_rtcd,vpx_dsp/vpx_dsp_rtcd_defs.pl))
+$(eval $(call rtcd_h_template,vpx_dsp_rtcd,aom_dsp/vpx_dsp_rtcd_defs.pl))
diff --git a/vpx_dsp/vpx_dsp_common.h b/aom_dsp/vpx_dsp_common.h
similarity index 95%
rename from vpx_dsp/vpx_dsp_common.h
rename to aom_dsp/vpx_dsp_common.h
index 4d7c78f..d8c9469 100644
--- a/vpx_dsp/vpx_dsp_common.h
+++ b/aom_dsp/vpx_dsp_common.h
@@ -12,9 +12,9 @@
#define VPX_DSP_COMMON_H_
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/mem.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/vpx_dsp_rtcd.c b/aom_dsp/vpx_dsp_rtcd.c
similarity index 94%
rename from vpx_dsp/vpx_dsp_rtcd.c
rename to aom_dsp/vpx_dsp_rtcd.c
index 030c456..3cd0cc1 100644
--- a/vpx_dsp/vpx_dsp_rtcd.c
+++ b/aom_dsp/vpx_dsp_rtcd.c
@@ -10,6 +10,6 @@
#include "./vpx_config.h"
#define RTCD_C
#include "./vpx_dsp_rtcd.h"
-#include "vpx_ports/vpx_once.h"
+#include "aom_ports/vpx_once.h"
void vpx_dsp_rtcd() { once(setup_rtcd_internal); }
diff --git a/vpx_dsp/vpx_dsp_rtcd_defs.pl b/aom_dsp/vpx_dsp_rtcd_defs.pl
similarity index 99%
rename from vpx_dsp/vpx_dsp_rtcd_defs.pl
rename to aom_dsp/vpx_dsp_rtcd_defs.pl
index 10e3321..c9c8cf7 100644
--- a/vpx_dsp/vpx_dsp_rtcd_defs.pl
+++ b/aom_dsp/vpx_dsp_rtcd_defs.pl
@@ -4,8 +4,8 @@
* DSP
*/
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/vpx_dsp_common.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/vpx_dsp_common.h"
EOF
}
diff --git a/vpx_dsp/vpx_filter.h b/aom_dsp/vpx_filter.h
similarity index 96%
rename from vpx_dsp/vpx_filter.h
rename to aom_dsp/vpx_filter.h
index 6cea251..d78ae5e 100644
--- a/vpx_dsp/vpx_filter.h
+++ b/aom_dsp/vpx_filter.h
@@ -11,7 +11,7 @@
#ifndef VPX_DSP_VPX_FILTER_H_
#define VPX_DSP_VPX_FILTER_H_
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_dsp/x86/avg_intrin_sse2.c b/aom_dsp/x86/avg_intrin_sse2.c
similarity index 99%
rename from vpx_dsp/x86/avg_intrin_sse2.c
rename to aom_dsp/x86/avg_intrin_sse2.c
index b0a104b..12c6a58 100644
--- a/vpx_dsp/x86/avg_intrin_sse2.c
+++ b/aom_dsp/x86/avg_intrin_sse2.c
@@ -11,7 +11,7 @@
#include <emmintrin.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_ports/mem.h"
+#include "aom_ports/mem.h"
void vpx_minmax_8x8_sse2(const uint8_t *s, int p, const uint8_t *d, int dp,
int *min, int *max) {
diff --git a/vpx_dsp/x86/avg_ssse3_x86_64.asm b/aom_dsp/x86/avg_ssse3_x86_64.asm
similarity index 100%
rename from vpx_dsp/x86/avg_ssse3_x86_64.asm
rename to aom_dsp/x86/avg_ssse3_x86_64.asm
diff --git a/vpx_dsp/x86/convolve.h b/aom_dsp/x86/convolve.h
similarity index 99%
rename from vpx_dsp/x86/convolve.h
rename to aom_dsp/x86/convolve.h
index 75b55cd..86f0b5a 100644
--- a/vpx_dsp/x86/convolve.h
+++ b/aom_dsp/x86/convolve.h
@@ -13,8 +13,8 @@
#include <assert.h>
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/mem.h"
typedef void filter8_1dfunction(const uint8_t *src_ptr, ptrdiff_t src_pitch,
uint8_t *output_ptr, ptrdiff_t out_pitch,
diff --git a/vpx_dsp/x86/fwd_dct32x32_impl_avx2.h b/aom_dsp/x86/fwd_dct32x32_impl_avx2.h
similarity index 99%
rename from vpx_dsp/x86/fwd_dct32x32_impl_avx2.h
rename to aom_dsp/x86/fwd_dct32x32_impl_avx2.h
index 7200dc1..1189705 100644
--- a/vpx_dsp/x86/fwd_dct32x32_impl_avx2.h
+++ b/aom_dsp/x86/fwd_dct32x32_impl_avx2.h
@@ -10,7 +10,7 @@
#include <immintrin.h> // AVX2
-#include "vpx_dsp/txfm_common.h"
+#include "aom_dsp/txfm_common.h"
#define pair256_set_epi16(a, b) \
_mm256_set_epi16((int16_t)(b), (int16_t)(a), (int16_t)(b), (int16_t)(a), \
diff --git a/vpx_dsp/x86/fwd_dct32x32_impl_sse2.h b/aom_dsp/x86/fwd_dct32x32_impl_sse2.h
similarity index 99%
copy from vpx_dsp/x86/fwd_dct32x32_impl_sse2.h
copy to aom_dsp/x86/fwd_dct32x32_impl_sse2.h
index 3744333..04e3e37 100644
--- a/vpx_dsp/x86/fwd_dct32x32_impl_sse2.h
+++ b/aom_dsp/x86/fwd_dct32x32_impl_sse2.h
@@ -10,9 +10,9 @@
#include <emmintrin.h> // SSE2
-#include "vpx_dsp/fwd_txfm.h"
-#include "vpx_dsp/txfm_common.h"
-#include "vpx_dsp/x86/txfm_common_sse2.h"
+#include "aom_dsp/fwd_txfm.h"
+#include "aom_dsp/txfm_common.h"
+#include "aom_dsp/x86/txfm_common_sse2.h"
// TODO(jingning) The high bit-depth version needs re-work for performance.
// The current SSE2 implementation also causes cross reference to the static
diff --git a/vpx_dsp/x86/fwd_txfm_avx2.c b/aom_dsp/x86/fwd_txfm_avx2.c
similarity index 86%
rename from vpx_dsp/x86/fwd_txfm_avx2.c
rename to aom_dsp/x86/fwd_txfm_avx2.c
index 21f11f0..325a5e9 100644
--- a/vpx_dsp/x86/fwd_txfm_avx2.c
+++ b/aom_dsp/x86/fwd_txfm_avx2.c
@@ -12,12 +12,12 @@
#define FDCT32x32_2D_AVX2 vpx_fdct32x32_rd_avx2
#define FDCT32x32_HIGH_PRECISION 0
-#include "vpx_dsp/x86/fwd_dct32x32_impl_avx2.h"
+#include "aom_dsp/x86/fwd_dct32x32_impl_avx2.h"
#undef FDCT32x32_2D_AVX2
#undef FDCT32x32_HIGH_PRECISION
#define FDCT32x32_2D_AVX2 vpx_fdct32x32_avx2
#define FDCT32x32_HIGH_PRECISION 1
-#include "vpx_dsp/x86/fwd_dct32x32_impl_avx2.h" // NOLINT
+#include "aom_dsp/x86/fwd_dct32x32_impl_avx2.h" // NOLINT
#undef FDCT32x32_2D_AVX2
#undef FDCT32x32_HIGH_PRECISION
diff --git a/vpx_dsp/x86/fwd_txfm_impl_sse2.h b/aom_dsp/x86/fwd_txfm_impl_sse2.h
similarity index 99%
rename from vpx_dsp/x86/fwd_txfm_impl_sse2.h
rename to aom_dsp/x86/fwd_txfm_impl_sse2.h
index d27246d..58f5b4b 100644
--- a/vpx_dsp/x86/fwd_txfm_impl_sse2.h
+++ b/aom_dsp/x86/fwd_txfm_impl_sse2.h
@@ -11,10 +11,10 @@
#include <emmintrin.h> // SSE2
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/txfm_common.h"
-#include "vpx_dsp/x86/fwd_txfm_sse2.h"
-#include "vpx_dsp/x86/txfm_common_sse2.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/txfm_common.h"
+#include "aom_dsp/x86/fwd_txfm_sse2.h"
+#include "aom_dsp/x86/txfm_common_sse2.h"
+#include "aom_ports/mem.h"
// TODO(jingning) The high bit-depth functions need rework for performance.
// After we properly fix the high bit-depth function implementations, this
diff --git a/vpx_dsp/x86/fwd_txfm_sse2.c b/aom_dsp/x86/fwd_txfm_sse2.c
similarity index 95%
rename from vpx_dsp/x86/fwd_txfm_sse2.c
rename to aom_dsp/x86/fwd_txfm_sse2.c
index 60da47e..3b85208 100644
--- a/vpx_dsp/x86/fwd_txfm_sse2.c
+++ b/aom_dsp/x86/fwd_txfm_sse2.c
@@ -11,8 +11,8 @@
#include <emmintrin.h> // SSE2
#include "./vpx_config.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_dsp/x86/fwd_txfm_sse2.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_dsp/x86/fwd_txfm_sse2.h"
void vpx_fdct4x4_1_sse2(const int16_t *input, tran_low_t *output, int stride) {
__m128i in0, in1;
@@ -228,20 +228,20 @@
#define FDCT4x4_2D vpx_fdct4x4_sse2
#define FDCT8x8_2D vpx_fdct8x8_sse2
#define FDCT16x16_2D vpx_fdct16x16_sse2
-#include "vpx_dsp/x86/fwd_txfm_impl_sse2.h"
+#include "aom_dsp/x86/fwd_txfm_impl_sse2.h"
#undef FDCT4x4_2D
#undef FDCT8x8_2D
#undef FDCT16x16_2D
#define FDCT32x32_2D vpx_fdct32x32_rd_sse2
#define FDCT32x32_HIGH_PRECISION 0
-#include "vpx_dsp/x86/fwd_dct32x32_impl_sse2.h"
+#include "aom_dsp/x86/fwd_dct32x32_impl_sse2.h"
#undef FDCT32x32_2D
#undef FDCT32x32_HIGH_PRECISION
#define FDCT32x32_2D vpx_fdct32x32_sse2
#define FDCT32x32_HIGH_PRECISION 1
-#include "vpx_dsp/x86/fwd_dct32x32_impl_sse2.h" // NOLINT
+#include "aom_dsp/x86/fwd_dct32x32_impl_sse2.h" // NOLINT
#undef FDCT32x32_2D
#undef FDCT32x32_HIGH_PRECISION
#undef DCT_HIGH_BIT_DEPTH
@@ -251,20 +251,20 @@
#define FDCT4x4_2D vpx_highbd_fdct4x4_sse2
#define FDCT8x8_2D vpx_highbd_fdct8x8_sse2
#define FDCT16x16_2D vpx_highbd_fdct16x16_sse2
-#include "vpx_dsp/x86/fwd_txfm_impl_sse2.h" // NOLINT
+#include "aom_dsp/x86/fwd_txfm_impl_sse2.h" // NOLINT
#undef FDCT4x4_2D
#undef FDCT8x8_2D
#undef FDCT16x16_2D
#define FDCT32x32_2D vpx_highbd_fdct32x32_rd_sse2
#define FDCT32x32_HIGH_PRECISION 0
-#include "vpx_dsp/x86/fwd_dct32x32_impl_sse2.h" // NOLINT
+#include "aom_dsp/x86/fwd_dct32x32_impl_sse2.h" // NOLINT
#undef FDCT32x32_2D
#undef FDCT32x32_HIGH_PRECISION
#define FDCT32x32_2D vpx_highbd_fdct32x32_sse2
#define FDCT32x32_HIGH_PRECISION 1
-#include "vpx_dsp/x86/fwd_dct32x32_impl_sse2.h" // NOLINT
+#include "aom_dsp/x86/fwd_dct32x32_impl_sse2.h" // NOLINT
#undef FDCT32x32_2D
#undef FDCT32x32_HIGH_PRECISION
#undef DCT_HIGH_BIT_DEPTH
diff --git a/vpx_dsp/x86/fwd_txfm_sse2.h b/aom_dsp/x86/fwd_txfm_sse2.h
similarity index 100%
rename from vpx_dsp/x86/fwd_txfm_sse2.h
rename to aom_dsp/x86/fwd_txfm_sse2.h
diff --git a/vpx_dsp/x86/fwd_txfm_ssse3_x86_64.asm b/aom_dsp/x86/fwd_txfm_ssse3_x86_64.asm
similarity index 100%
rename from vpx_dsp/x86/fwd_txfm_ssse3_x86_64.asm
rename to aom_dsp/x86/fwd_txfm_ssse3_x86_64.asm
diff --git a/vpx_dsp/x86/halfpix_variance_impl_sse2.asm b/aom_dsp/x86/halfpix_variance_impl_sse2.asm
similarity index 99%
rename from vpx_dsp/x86/halfpix_variance_impl_sse2.asm
rename to aom_dsp/x86/halfpix_variance_impl_sse2.asm
index cc26bb6..b91d1dc 100644
--- a/vpx_dsp/x86/halfpix_variance_impl_sse2.asm
+++ b/aom_dsp/x86/halfpix_variance_impl_sse2.asm
@@ -8,7 +8,7 @@
; be found in the AUTHORS file in the root of the source tree.
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
;void vpx_half_horiz_vert_variance16x_h_sse2(unsigned char *ref,
; int ref_stride,
diff --git a/vpx_dsp/x86/halfpix_variance_sse2.c b/aom_dsp/x86/halfpix_variance_sse2.c
similarity index 98%
rename from vpx_dsp/x86/halfpix_variance_sse2.c
rename to aom_dsp/x86/halfpix_variance_sse2.c
index 2a2bfeb..d55a472 100644
--- a/vpx_dsp/x86/halfpix_variance_sse2.c
+++ b/aom_dsp/x86/halfpix_variance_sse2.c
@@ -10,7 +10,7 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
void vpx_half_horiz_vert_variance16x_h_sse2(const unsigned char *ref,
int ref_stride,
diff --git a/vpx_dsp/x86/highbd_intrapred_sse2.asm b/aom_dsp/x86/highbd_intrapred_sse2.asm
similarity index 100%
rename from vpx_dsp/x86/highbd_intrapred_sse2.asm
rename to aom_dsp/x86/highbd_intrapred_sse2.asm
diff --git a/vpx_dsp/x86/highbd_loopfilter_sse2.c b/aom_dsp/x86/highbd_loopfilter_sse2.c
similarity index 99%
rename from vpx_dsp/x86/highbd_loopfilter_sse2.c
rename to aom_dsp/x86/highbd_loopfilter_sse2.c
index 98fed85..2a49121 100644
--- a/vpx_dsp/x86/highbd_loopfilter_sse2.c
+++ b/aom_dsp/x86/highbd_loopfilter_sse2.c
@@ -11,8 +11,8 @@
#include <emmintrin.h> // SSE2
#include "./vpx_dsp_rtcd.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/emmintrin_compat.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/emmintrin_compat.h"
static INLINE __m128i signed_char_clamp_bd_sse2(__m128i value, int bd) {
__m128i ubounded;
diff --git a/vpx_dsp/x86/highbd_quantize_intrin_sse2.c b/aom_dsp/x86/highbd_quantize_intrin_sse2.c
similarity index 98%
rename from vpx_dsp/x86/highbd_quantize_intrin_sse2.c
rename to aom_dsp/x86/highbd_quantize_intrin_sse2.c
index 6fb8891..e3cf8a9 100644
--- a/vpx_dsp/x86/highbd_quantize_intrin_sse2.c
+++ b/aom_dsp/x86/highbd_quantize_intrin_sse2.c
@@ -10,9 +10,9 @@
#include <emmintrin.h>
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
#if CONFIG_VPX_HIGHBITDEPTH
void vpx_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t count,
diff --git a/vpx_dsp/x86/highbd_sad4d_sse2.asm b/aom_dsp/x86/highbd_sad4d_sse2.asm
similarity index 100%
rename from vpx_dsp/x86/highbd_sad4d_sse2.asm
rename to aom_dsp/x86/highbd_sad4d_sse2.asm
diff --git a/vpx_dsp/x86/highbd_sad_sse2.asm b/aom_dsp/x86/highbd_sad_sse2.asm
similarity index 100%
rename from vpx_dsp/x86/highbd_sad_sse2.asm
rename to aom_dsp/x86/highbd_sad_sse2.asm
diff --git a/vpx_dsp/x86/highbd_subpel_variance_impl_sse2.asm b/aom_dsp/x86/highbd_subpel_variance_impl_sse2.asm
similarity index 100%
rename from vpx_dsp/x86/highbd_subpel_variance_impl_sse2.asm
rename to aom_dsp/x86/highbd_subpel_variance_impl_sse2.asm
diff --git a/vpx_dsp/x86/highbd_variance_impl_sse2.asm b/aom_dsp/x86/highbd_variance_impl_sse2.asm
similarity index 99%
rename from vpx_dsp/x86/highbd_variance_impl_sse2.asm
rename to aom_dsp/x86/highbd_variance_impl_sse2.asm
index 923418a..1bf3abb 100644
--- a/vpx_dsp/x86/highbd_variance_impl_sse2.asm
+++ b/aom_dsp/x86/highbd_variance_impl_sse2.asm
@@ -9,7 +9,7 @@
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
;unsigned int vpx_highbd_calc16x16var_sse2
;(
diff --git a/vpx_dsp/x86/highbd_variance_sse2.c b/aom_dsp/x86/highbd_variance_sse2.c
similarity index 99%
rename from vpx_dsp/x86/highbd_variance_sse2.c
rename to aom_dsp/x86/highbd_variance_sse2.c
index 8db997c..f7ce69b 100644
--- a/vpx_dsp/x86/highbd_variance_sse2.c
+++ b/aom_dsp/x86/highbd_variance_sse2.c
@@ -9,7 +9,7 @@
*/
#include "./vpx_config.h"
-#include "vpx_ports/mem.h"
+#include "aom_ports/mem.h"
typedef uint32_t (*high_variance_fn_t)(const uint16_t *src, int src_stride,
const uint16_t *ref, int ref_stride,
diff --git a/vpx_dsp/x86/intrapred_sse2.asm b/aom_dsp/x86/intrapred_sse2.asm
similarity index 100%
rename from vpx_dsp/x86/intrapred_sse2.asm
rename to aom_dsp/x86/intrapred_sse2.asm
diff --git a/vpx_dsp/x86/intrapred_ssse3.asm b/aom_dsp/x86/intrapred_ssse3.asm
similarity index 100%
rename from vpx_dsp/x86/intrapred_ssse3.asm
rename to aom_dsp/x86/intrapred_ssse3.asm
diff --git a/vpx_dsp/x86/inv_txfm_sse2.c b/aom_dsp/x86/inv_txfm_sse2.c
similarity index 99%
rename from vpx_dsp/x86/inv_txfm_sse2.c
rename to aom_dsp/x86/inv_txfm_sse2.c
index 929482b..1d990cc 100644
--- a/vpx_dsp/x86/inv_txfm_sse2.c
+++ b/aom_dsp/x86/inv_txfm_sse2.c
@@ -9,8 +9,8 @@
*/
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/x86/inv_txfm_sse2.h"
-#include "vpx_dsp/x86/txfm_common_sse2.h"
+#include "aom_dsp/x86/inv_txfm_sse2.h"
+#include "aom_dsp/x86/txfm_common_sse2.h"
#define RECON_AND_STORE4X4(dest, in_x) \
{ \
diff --git a/vpx_dsp/x86/inv_txfm_sse2.h b/aom_dsp/x86/inv_txfm_sse2.h
similarity index 98%
rename from vpx_dsp/x86/inv_txfm_sse2.h
rename to aom_dsp/x86/inv_txfm_sse2.h
index 4ce2504..a4266c0 100644
--- a/vpx_dsp/x86/inv_txfm_sse2.h
+++ b/aom_dsp/x86/inv_txfm_sse2.h
@@ -13,9 +13,9 @@
#include <emmintrin.h> // SSE2
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/inv_txfm.h"
-#include "vpx_dsp/x86/txfm_common_sse2.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/inv_txfm.h"
+#include "aom_dsp/x86/txfm_common_sse2.h"
// perform 8x8 transpose
static INLINE void array_transpose_8x8(__m128i *in, __m128i *res) {
diff --git a/vpx_dsp/x86/inv_txfm_ssse3_x86_64.asm b/aom_dsp/x86/inv_txfm_ssse3_x86_64.asm
similarity index 100%
rename from vpx_dsp/x86/inv_txfm_ssse3_x86_64.asm
rename to aom_dsp/x86/inv_txfm_ssse3_x86_64.asm
diff --git a/vpx_dsp/x86/inv_wht_sse2.asm b/aom_dsp/x86/inv_wht_sse2.asm
similarity index 100%
rename from vpx_dsp/x86/inv_wht_sse2.asm
rename to aom_dsp/x86/inv_wht_sse2.asm
diff --git a/vpx_dsp/x86/loopfilter_avx2.c b/aom_dsp/x86/loopfilter_avx2.c
similarity index 99%
rename from vpx_dsp/x86/loopfilter_avx2.c
rename to aom_dsp/x86/loopfilter_avx2.c
index 9105838..cec8dc1 100644
--- a/vpx_dsp/x86/loopfilter_avx2.c
+++ b/aom_dsp/x86/loopfilter_avx2.c
@@ -11,7 +11,7 @@
#include <immintrin.h> /* AVX2 */
#include "./vpx_dsp_rtcd.h"
-#include "vpx_ports/mem.h"
+#include "aom_ports/mem.h"
static void mb_lpf_horizontal_edge_w_avx2_8(unsigned char *s, int p,
const unsigned char *_blimit,
diff --git a/vpx_dsp/x86/loopfilter_mmx.asm b/aom_dsp/x86/loopfilter_mmx.asm
similarity index 99%
rename from vpx_dsp/x86/loopfilter_mmx.asm
rename to aom_dsp/x86/loopfilter_mmx.asm
index b9c18b6..dd47c99 100644
--- a/vpx_dsp/x86/loopfilter_mmx.asm
+++ b/aom_dsp/x86/loopfilter_mmx.asm
@@ -9,7 +9,7 @@
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
;void vpx_lpf_horizontal_4_mmx
diff --git a/vpx_dsp/x86/loopfilter_sse2.c b/aom_dsp/x86/loopfilter_sse2.c
similarity index 99%
rename from vpx_dsp/x86/loopfilter_sse2.c
rename to aom_dsp/x86/loopfilter_sse2.c
index 8a58a36..8a0ed2b 100644
--- a/vpx_dsp/x86/loopfilter_sse2.c
+++ b/aom_dsp/x86/loopfilter_sse2.c
@@ -11,8 +11,8 @@
#include <emmintrin.h> // SSE2
#include "./vpx_dsp_rtcd.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/emmintrin_compat.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/emmintrin_compat.h"
static INLINE __m128i abs_diff(__m128i a, __m128i b) {
return _mm_or_si128(_mm_subs_epu8(a, b), _mm_subs_epu8(b, a));
diff --git a/vpx_dsp/x86/quantize_avx_x86_64.asm b/aom_dsp/x86/quantize_avx_x86_64.asm
similarity index 100%
rename from vpx_dsp/x86/quantize_avx_x86_64.asm
rename to aom_dsp/x86/quantize_avx_x86_64.asm
diff --git a/vpx_dsp/x86/quantize_sse2.c b/aom_dsp/x86/quantize_sse2.c
similarity index 99%
rename from vpx_dsp/x86/quantize_sse2.c
rename to aom_dsp/x86/quantize_sse2.c
index 3d0ed86..7a336e3 100644
--- a/vpx_dsp/x86/quantize_sse2.c
+++ b/aom_dsp/x86/quantize_sse2.c
@@ -12,7 +12,7 @@
#include <xmmintrin.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
static INLINE __m128i load_coefficients(const tran_low_t* coeff_ptr) {
#if CONFIG_VPX_HIGHBITDEPTH
diff --git a/vpx_dsp/x86/quantize_ssse3_x86_64.asm b/aom_dsp/x86/quantize_ssse3_x86_64.asm
similarity index 100%
rename from vpx_dsp/x86/quantize_ssse3_x86_64.asm
rename to aom_dsp/x86/quantize_ssse3_x86_64.asm
diff --git a/vpx_dsp/x86/sad4d_avx2.c b/aom_dsp/x86/sad4d_avx2.c
similarity index 99%
rename from vpx_dsp/x86/sad4d_avx2.c
rename to aom_dsp/x86/sad4d_avx2.c
index 962b8fb..585d473 100644
--- a/vpx_dsp/x86/sad4d_avx2.c
+++ b/aom_dsp/x86/sad4d_avx2.c
@@ -9,7 +9,7 @@
*/
#include <immintrin.h> // AVX2
#include "./vpx_dsp_rtcd.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
void vpx_sad32x32x4d_avx2(const uint8_t *src, int src_stride,
const uint8_t *const ref[4], int ref_stride,
diff --git a/vpx_dsp/x86/sad4d_sse2.asm b/aom_dsp/x86/sad4d_sse2.asm
similarity index 100%
rename from vpx_dsp/x86/sad4d_sse2.asm
rename to aom_dsp/x86/sad4d_sse2.asm
diff --git a/vpx_dsp/x86/sad_avx2.c b/aom_dsp/x86/sad_avx2.c
similarity index 99%
rename from vpx_dsp/x86/sad_avx2.c
rename to aom_dsp/x86/sad_avx2.c
index 0d092e1..bc869c0 100644
--- a/vpx_dsp/x86/sad_avx2.c
+++ b/aom_dsp/x86/sad_avx2.c
@@ -9,7 +9,7 @@
*/
#include <immintrin.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_ports/mem.h"
+#include "aom_ports/mem.h"
#define FSAD64_H(h) \
unsigned int vpx_sad64x##h##_avx2(const uint8_t *src_ptr, int src_stride, \
diff --git a/vpx_dsp/x86/sad_mmx.asm b/aom_dsp/x86/sad_mmx.asm
similarity index 99%
rename from vpx_dsp/x86/sad_mmx.asm
rename to aom_dsp/x86/sad_mmx.asm
index 9968992..9a64416 100644
--- a/vpx_dsp/x86/sad_mmx.asm
+++ b/aom_dsp/x86/sad_mmx.asm
@@ -9,7 +9,7 @@
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
global sym(vpx_sad16x16_mmx) PRIVATE
global sym(vpx_sad8x16_mmx) PRIVATE
diff --git a/vpx_dsp/x86/sad_sse2.asm b/aom_dsp/x86/sad_sse2.asm
similarity index 100%
rename from vpx_dsp/x86/sad_sse2.asm
rename to aom_dsp/x86/sad_sse2.asm
diff --git a/vpx_dsp/x86/sad_sse3.asm b/aom_dsp/x86/sad_sse3.asm
similarity index 99%
rename from vpx_dsp/x86/sad_sse3.asm
rename to aom_dsp/x86/sad_sse3.asm
index 18279bd..747b568 100644
--- a/vpx_dsp/x86/sad_sse3.asm
+++ b/aom_dsp/x86/sad_sse3.asm
@@ -8,7 +8,7 @@
; be found in the AUTHORS file in the root of the source tree.
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
%macro STACK_FRAME_CREATE_X3 0
%if ABI_IS_32BIT
diff --git a/vpx_dsp/x86/sad_sse4.asm b/aom_dsp/x86/sad_sse4.asm
similarity index 99%
rename from vpx_dsp/x86/sad_sse4.asm
rename to aom_dsp/x86/sad_sse4.asm
index bc67447..07e28b4 100644
--- a/vpx_dsp/x86/sad_sse4.asm
+++ b/aom_dsp/x86/sad_sse4.asm
@@ -9,7 +9,7 @@
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
%macro PROCESS_16X2X8 1
%if %1
diff --git a/vpx_dsp/x86/sad_ssse3.asm b/aom_dsp/x86/sad_ssse3.asm
similarity index 99%
rename from vpx_dsp/x86/sad_ssse3.asm
rename to aom_dsp/x86/sad_ssse3.asm
index 49f204f..8315f97 100644
--- a/vpx_dsp/x86/sad_ssse3.asm
+++ b/aom_dsp/x86/sad_ssse3.asm
@@ -9,7 +9,7 @@
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
%macro PROCESS_16X2X3 1
%if %1
diff --git a/vpx_dsp/x86/ssim_opt_x86_64.asm b/aom_dsp/x86/ssim_opt_x86_64.asm
similarity index 99%
rename from vpx_dsp/x86/ssim_opt_x86_64.asm
rename to aom_dsp/x86/ssim_opt_x86_64.asm
index 6d58321..fc49c30 100644
--- a/vpx_dsp/x86/ssim_opt_x86_64.asm
+++ b/aom_dsp/x86/ssim_opt_x86_64.asm
@@ -8,7 +8,7 @@
; be found in the AUTHORS file in the root of the source tree.
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
; tabulate_ssim - sums sum_s,sum_r,sum_sq_s,sum_sq_r, sum_sxr
%macro TABULATE_SSIM 0
diff --git a/vpx_dsp/x86/subpel_variance_sse2.asm b/aom_dsp/x86/subpel_variance_sse2.asm
similarity index 100%
rename from vpx_dsp/x86/subpel_variance_sse2.asm
rename to aom_dsp/x86/subpel_variance_sse2.asm
diff --git a/vpx_dsp/x86/subtract_sse2.asm b/aom_dsp/x86/subtract_sse2.asm
similarity index 100%
rename from vpx_dsp/x86/subtract_sse2.asm
rename to aom_dsp/x86/subtract_sse2.asm
diff --git a/vpx_dsp/x86/txfm_common_sse2.h b/aom_dsp/x86/txfm_common_sse2.h
similarity index 97%
rename from vpx_dsp/x86/txfm_common_sse2.h
rename to aom_dsp/x86/txfm_common_sse2.h
index f8edb1b..339a520 100644
--- a/vpx_dsp/x86/txfm_common_sse2.h
+++ b/aom_dsp/x86/txfm_common_sse2.h
@@ -12,7 +12,7 @@
#define VPX_DSP_X86_TXFM_COMMON_SSE2_H_
#include <emmintrin.h>
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#define pair_set_epi16(a, b) \
_mm_set_epi16((int16_t)(b), (int16_t)(a), (int16_t)(b), (int16_t)(a), \
diff --git a/vpx_dsp/x86/variance_avx2.c b/aom_dsp/x86/variance_avx2.c
similarity index 100%
rename from vpx_dsp/x86/variance_avx2.c
rename to aom_dsp/x86/variance_avx2.c
diff --git a/vpx_dsp/x86/variance_impl_avx2.c b/aom_dsp/x86/variance_impl_avx2.c
similarity index 99%
rename from vpx_dsp/x86/variance_impl_avx2.c
rename to aom_dsp/x86/variance_impl_avx2.c
index 5a1f125..d277d31 100644
--- a/vpx_dsp/x86/variance_impl_avx2.c
+++ b/aom_dsp/x86/variance_impl_avx2.c
@@ -11,7 +11,7 @@
#include <immintrin.h> // AVX2
#include "./vpx_dsp_rtcd.h"
-#include "vpx_ports/mem.h"
+#include "aom_ports/mem.h"
DECLARE_ALIGNED(32, static const uint8_t, bilinear_filters_avx2[512]) = {
16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16, 0, 16,
diff --git a/vpx_dsp/x86/variance_impl_mmx.asm b/aom_dsp/x86/variance_impl_mmx.asm
similarity index 99%
rename from vpx_dsp/x86/variance_impl_mmx.asm
rename to aom_dsp/x86/variance_impl_mmx.asm
index b8ba79b..5500d97 100644
--- a/vpx_dsp/x86/variance_impl_mmx.asm
+++ b/aom_dsp/x86/variance_impl_mmx.asm
@@ -9,7 +9,7 @@
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
%define mmx_filter_shift 7
diff --git a/vpx_dsp/x86/variance_mmx.c b/aom_dsp/x86/variance_mmx.c
similarity index 99%
rename from vpx_dsp/x86/variance_mmx.c
rename to aom_dsp/x86/variance_mmx.c
index da8c8181..cac25ff 100644
--- a/vpx_dsp/x86/variance_mmx.c
+++ b/aom_dsp/x86/variance_mmx.c
@@ -10,7 +10,7 @@
#include "./vpx_dsp_rtcd.h"
-#include "vpx_ports/mem.h"
+#include "aom_ports/mem.h"
DECLARE_ALIGNED(16, static const int16_t, bilinear_filters_mmx[8][8]) = {
{ 128, 128, 128, 128, 0, 0, 0, 0 }, { 112, 112, 112, 112, 16, 16, 16, 16 },
diff --git a/vpx_dsp/x86/variance_sse2.c b/aom_dsp/x86/variance_sse2.c
similarity index 99%
rename from vpx_dsp/x86/variance_sse2.c
rename to aom_dsp/x86/variance_sse2.c
index 65f6d52..9692b0e 100644
--- a/vpx_dsp/x86/variance_sse2.c
+++ b/aom_dsp/x86/variance_sse2.c
@@ -13,7 +13,7 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx_ports/mem.h"
+#include "aom_ports/mem.h"
typedef void (*getNxMvar_fn_t)(const unsigned char *src, int src_stride,
const unsigned char *ref, int ref_stride,
diff --git a/vpx_dsp/x86/vpx_asm_stubs.c b/aom_dsp/x86/vpx_asm_stubs.c
similarity index 99%
rename from vpx_dsp/x86/vpx_asm_stubs.c
rename to aom_dsp/x86/vpx_asm_stubs.c
index e3e2075..9bbb41e 100644
--- a/vpx_dsp/x86/vpx_asm_stubs.c
+++ b/aom_dsp/x86/vpx_asm_stubs.c
@@ -10,7 +10,7 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/x86/convolve.h"
+#include "aom_dsp/x86/convolve.h"
#if HAVE_SSE2
filter8_1dfunction vpx_filter_block1d16_v8_sse2;
diff --git a/vpx_dsp/x86/vpx_convolve_copy_sse2.asm b/aom_dsp/x86/vpx_convolve_copy_sse2.asm
similarity index 100%
rename from vpx_dsp/x86/vpx_convolve_copy_sse2.asm
rename to aom_dsp/x86/vpx_convolve_copy_sse2.asm
diff --git a/vpx_dsp/x86/vpx_high_subpixel_8t_sse2.asm b/aom_dsp/x86/vpx_high_subpixel_8t_sse2.asm
similarity index 99%
rename from vpx_dsp/x86/vpx_high_subpixel_8t_sse2.asm
rename to aom_dsp/x86/vpx_high_subpixel_8t_sse2.asm
index bfc816f..f02845e 100644
--- a/vpx_dsp/x86/vpx_high_subpixel_8t_sse2.asm
+++ b/aom_dsp/x86/vpx_high_subpixel_8t_sse2.asm
@@ -9,7 +9,7 @@
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
;Note: tap3 and tap4 have to be applied and added after other taps to avoid
;overflow.
diff --git a/vpx_dsp/x86/vpx_high_subpixel_bilinear_sse2.asm b/aom_dsp/x86/vpx_high_subpixel_bilinear_sse2.asm
similarity index 99%
rename from vpx_dsp/x86/vpx_high_subpixel_bilinear_sse2.asm
rename to aom_dsp/x86/vpx_high_subpixel_bilinear_sse2.asm
index 72f2ff7..eacedc5 100644
--- a/vpx_dsp/x86/vpx_high_subpixel_bilinear_sse2.asm
+++ b/aom_dsp/x86/vpx_high_subpixel_bilinear_sse2.asm
@@ -8,7 +8,7 @@
; be found in the AUTHORS file in the root of the source tree.
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
%macro HIGH_GET_PARAM_4 0
mov rdx, arg(5) ;filter ptr
diff --git a/vpx_dsp/x86/vpx_subpixel_8t_intrin_avx2.c b/aom_dsp/x86/vpx_subpixel_8t_intrin_avx2.c
similarity index 99%
rename from vpx_dsp/x86/vpx_subpixel_8t_intrin_avx2.c
rename to aom_dsp/x86/vpx_subpixel_8t_intrin_avx2.c
index 2e8566c..6e54d23 100644
--- a/vpx_dsp/x86/vpx_subpixel_8t_intrin_avx2.c
+++ b/aom_dsp/x86/vpx_subpixel_8t_intrin_avx2.c
@@ -15,8 +15,8 @@
#include <immintrin.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/x86/convolve.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/x86/convolve.h"
+#include "aom_ports/mem.h"
// filters for 16_h8 and 16_v8
DECLARE_ALIGNED(32, static const uint8_t, filt1_global_avx2[32]) = {
diff --git a/vpx_dsp/x86/vpx_subpixel_8t_intrin_ssse3.c b/aom_dsp/x86/vpx_subpixel_8t_intrin_ssse3.c
similarity index 99%
rename from vpx_dsp/x86/vpx_subpixel_8t_intrin_ssse3.c
rename to aom_dsp/x86/vpx_subpixel_8t_intrin_ssse3.c
index 7bf7deb..4d73211 100644
--- a/vpx_dsp/x86/vpx_subpixel_8t_intrin_ssse3.c
+++ b/aom_dsp/x86/vpx_subpixel_8t_intrin_ssse3.c
@@ -15,11 +15,11 @@
#include <tmmintrin.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/vpx_filter.h"
-#include "vpx_dsp/x86/convolve.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/emmintrin_compat.h"
+#include "aom_dsp/vpx_filter.h"
+#include "aom_dsp/x86/convolve.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/emmintrin_compat.h"
// filters only for the 4_h8 convolution
DECLARE_ALIGNED(16, static const uint8_t, filt1_4_h8[16]) = {
diff --git a/vpx_dsp/x86/vpx_subpixel_8t_sse2.asm b/aom_dsp/x86/vpx_subpixel_8t_sse2.asm
similarity index 99%
rename from vpx_dsp/x86/vpx_subpixel_8t_sse2.asm
rename to aom_dsp/x86/vpx_subpixel_8t_sse2.asm
index 08f3d6a..b197150 100644
--- a/vpx_dsp/x86/vpx_subpixel_8t_sse2.asm
+++ b/aom_dsp/x86/vpx_subpixel_8t_sse2.asm
@@ -9,7 +9,7 @@
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
;Note: tap3 and tap4 have to be applied and added after other taps to avoid
;overflow.
diff --git a/vpx_dsp/x86/vpx_subpixel_8t_ssse3.asm b/aom_dsp/x86/vpx_subpixel_8t_ssse3.asm
similarity index 100%
rename from vpx_dsp/x86/vpx_subpixel_8t_ssse3.asm
rename to aom_dsp/x86/vpx_subpixel_8t_ssse3.asm
diff --git a/vpx_dsp/x86/vpx_subpixel_bilinear_sse2.asm b/aom_dsp/x86/vpx_subpixel_bilinear_sse2.asm
similarity index 99%
rename from vpx_dsp/x86/vpx_subpixel_bilinear_sse2.asm
rename to aom_dsp/x86/vpx_subpixel_bilinear_sse2.asm
index a378dd0..7de58ff 100644
--- a/vpx_dsp/x86/vpx_subpixel_bilinear_sse2.asm
+++ b/aom_dsp/x86/vpx_subpixel_bilinear_sse2.asm
@@ -8,7 +8,7 @@
; be found in the AUTHORS file in the root of the source tree.
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
%macro GET_PARAM_4 0
mov rdx, arg(5) ;filter ptr
diff --git a/vpx_dsp/x86/vpx_subpixel_bilinear_ssse3.asm b/aom_dsp/x86/vpx_subpixel_bilinear_ssse3.asm
similarity index 99%
rename from vpx_dsp/x86/vpx_subpixel_bilinear_ssse3.asm
rename to aom_dsp/x86/vpx_subpixel_bilinear_ssse3.asm
index 3c8cfd2..46ad543 100644
--- a/vpx_dsp/x86/vpx_subpixel_bilinear_ssse3.asm
+++ b/aom_dsp/x86/vpx_subpixel_bilinear_ssse3.asm
@@ -8,7 +8,7 @@
; be found in the AUTHORS file in the root of the source tree.
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
%macro GET_PARAM_4 0
mov rdx, arg(5) ;filter ptr
diff --git a/vpx_mem/include/vpx_mem_intrnl.h b/aom_mem/include/vpx_mem_intrnl.h
similarity index 100%
rename from vpx_mem/include/vpx_mem_intrnl.h
rename to aom_mem/include/vpx_mem_intrnl.h
diff --git a/vpx_mem/vpx_mem.c b/aom_mem/vpx_mem.c
similarity index 98%
rename from vpx_mem/vpx_mem.c
rename to aom_mem/vpx_mem.c
index 84b487c..a013254 100644
--- a/vpx_mem/vpx_mem.c
+++ b/aom_mem/vpx_mem.c
@@ -15,7 +15,7 @@
#include <stdlib.h>
#include <string.h>
#include "include/vpx_mem_intrnl.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
void *vpx_memalign(size_t align, size_t size) {
void *addr, *x = NULL;
diff --git a/vpx_mem/vpx_mem.h b/aom_mem/vpx_mem.h
similarity index 100%
rename from vpx_mem/vpx_mem.h
rename to aom_mem/vpx_mem.h
diff --git a/vpx_mem/vpx_mem.mk b/aom_mem/vpx_mem.mk
similarity index 100%
rename from vpx_mem/vpx_mem.mk
rename to aom_mem/vpx_mem.mk
diff --git a/vpx_ports/arm.h b/aom_ports/arm.h
similarity index 100%
rename from vpx_ports/arm.h
rename to aom_ports/arm.h
diff --git a/vpx_ports/arm_cpudetect.c b/aom_ports/arm_cpudetect.c
similarity index 99%
rename from vpx_ports/arm_cpudetect.c
rename to aom_ports/arm_cpudetect.c
index e446702..fe98662 100644
--- a/vpx_ports/arm_cpudetect.c
+++ b/aom_ports/arm_cpudetect.c
@@ -10,7 +10,7 @@
#include <stdlib.h>
#include <string.h>
-#include "vpx_ports/arm.h"
+#include "aom_ports/arm.h"
#include "./vpx_config.h"
#ifdef WINAPI_FAMILY
diff --git a/vpx_ports/bitops.h b/aom_ports/bitops.h
similarity index 98%
rename from vpx_ports/bitops.h
rename to aom_ports/bitops.h
index f2a1fe9..967183f 100644
--- a/vpx_ports/bitops.h
+++ b/aom_ports/bitops.h
@@ -13,7 +13,7 @@
#include <assert.h>
-#include "vpx_ports/msvc.h"
+#include "aom_ports/msvc.h"
#ifdef _MSC_VER
#include <math.h> // the ceil() definition must precede intrin.h
diff --git a/vpx_ports/config.h b/aom_ports/config.h
similarity index 100%
rename from vpx_ports/config.h
rename to aom_ports/config.h
diff --git a/vpx_ports/emmintrin_compat.h b/aom_ports/emmintrin_compat.h
similarity index 100%
rename from vpx_ports/emmintrin_compat.h
rename to aom_ports/emmintrin_compat.h
diff --git a/vpx_ports/emms.asm b/aom_ports/emms.asm
similarity index 95%
rename from vpx_ports/emms.asm
rename to aom_ports/emms.asm
index db8da28..a043b16 100644
--- a/vpx_ports/emms.asm
+++ b/aom_ports/emms.asm
@@ -9,7 +9,7 @@
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
section .text
global sym(vpx_reset_mmx_state) PRIVATE
diff --git a/vpx_ports/mem.h b/aom_ports/mem.h
similarity index 97%
rename from vpx_ports/mem.h
rename to aom_ports/mem.h
index 81f28f6..b82c78e 100644
--- a/vpx_ports/mem.h
+++ b/aom_ports/mem.h
@@ -12,7 +12,7 @@
#define VPX_PORTS_MEM_H_
#include "vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#if (defined(__GNUC__) && __GNUC__) || defined(__SUNPRO_C)
#define DECLARE_ALIGNED(n, typ, val) typ val __attribute__((aligned(n)))
diff --git a/vpx_ports/mem_ops.h b/aom_ports/mem_ops.h
similarity index 100%
rename from vpx_ports/mem_ops.h
rename to aom_ports/mem_ops.h
diff --git a/vpx_ports/mem_ops_aligned.h b/aom_ports/mem_ops_aligned.h
similarity index 99%
rename from vpx_ports/mem_ops_aligned.h
rename to aom_ports/mem_ops_aligned.h
index e3c0f42..fce08ae 100644
--- a/vpx_ports/mem_ops_aligned.h
+++ b/aom_ports/mem_ops_aligned.h
@@ -11,7 +11,7 @@
#ifndef VPX_PORTS_MEM_OPS_ALIGNED_H_
#define VPX_PORTS_MEM_OPS_ALIGNED_H_
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
/* \file
* \brief Provides portable memory access primitives for operating on aligned
diff --git a/vpx_ports/msvc.h b/aom_ports/msvc.h
similarity index 100%
rename from vpx_ports/msvc.h
rename to aom_ports/msvc.h
diff --git a/vpx_ports/system_state.h b/aom_ports/system_state.h
similarity index 100%
rename from vpx_ports/system_state.h
rename to aom_ports/system_state.h
diff --git a/vpx_ports/vpx_once.h b/aom_ports/vpx_once.h
similarity index 100%
rename from vpx_ports/vpx_once.h
rename to aom_ports/vpx_once.h
diff --git a/vpx_ports/vpx_ports.mk b/aom_ports/vpx_ports.mk
similarity index 100%
rename from vpx_ports/vpx_ports.mk
rename to aom_ports/vpx_ports.mk
diff --git a/vpx_ports/vpx_timer.h b/aom_ports/vpx_timer.h
similarity index 98%
rename from vpx_ports/vpx_timer.h
rename to aom_ports/vpx_timer.h
index 4aae30e..6d145da 100644
--- a/vpx_ports/vpx_timer.h
+++ b/aom_ports/vpx_timer.h
@@ -13,7 +13,7 @@
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#if CONFIG_OS_SUPPORT
diff --git a/vpx_ports/x86.h b/aom_ports/x86.h
similarity index 99%
rename from vpx_ports/x86.h
rename to aom_ports/x86.h
index 089b048..26d2d6b 100644
--- a/vpx_ports/x86.h
+++ b/aom_ports/x86.h
@@ -12,7 +12,7 @@
#define VPX_PORTS_X86_H_
#include <stdlib.h>
#include "vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpx_ports/x86_abi_support.asm b/aom_ports/x86_abi_support.asm
similarity index 100%
rename from vpx_ports/x86_abi_support.asm
rename to aom_ports/x86_abi_support.asm
diff --git a/vpx_scale/generic/gen_scalers.c b/aom_scale/generic/gen_scalers.c
similarity index 98%
rename from vpx_scale/generic/gen_scalers.c
rename to aom_scale/generic/gen_scalers.c
index 5f391cb..6d8e581 100644
--- a/vpx_scale/generic/gen_scalers.c
+++ b/aom_scale/generic/gen_scalers.c
@@ -9,8 +9,8 @@
*/
#include "./vpx_scale_rtcd.h"
-#include "vpx_scale/vpx_scale.h"
-#include "vpx_mem/vpx_mem.h"
+#include "aom_scale/vpx_scale.h"
+#include "aom_mem/vpx_mem.h"
/****************************************************************************
* Imports
****************************************************************************/
diff --git a/vpx_scale/generic/vpx_scale.c b/aom_scale/generic/vpx_scale.c
similarity index 99%
rename from vpx_scale/generic/vpx_scale.c
rename to aom_scale/generic/vpx_scale.c
index 0ac4fad..0a20da7 100644
--- a/vpx_scale/generic/vpx_scale.c
+++ b/aom_scale/generic/vpx_scale.c
@@ -20,9 +20,9 @@
* Header Files
****************************************************************************/
#include "./vpx_scale_rtcd.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_scale/vpx_scale.h"
-#include "vpx_scale/yv12config.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_scale/vpx_scale.h"
+#include "aom_scale/yv12config.h"
typedef struct {
int expanded_frame_width;
diff --git a/vpx_scale/generic/yv12config.c b/aom_scale/generic/yv12config.c
similarity index 98%
rename from vpx_scale/generic/yv12config.c
rename to aom_scale/generic/yv12config.c
index ecc2d76..1a89ae0 100644
--- a/vpx_scale/generic/yv12config.c
+++ b/aom_scale/generic/yv12config.c
@@ -10,9 +10,9 @@
#include <assert.h>
-#include "vpx_scale/yv12config.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
+#include "aom_scale/yv12config.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
/****************************************************************************
* Exports
diff --git a/vpx_scale/generic/yv12extend.c b/aom_scale/generic/yv12extend.c
similarity index 98%
rename from vpx_scale/generic/yv12extend.c
rename to aom_scale/generic/yv12extend.c
index ce7a287..29bb111 100644
--- a/vpx_scale/generic/yv12extend.c
+++ b/aom_scale/generic/yv12extend.c
@@ -11,12 +11,12 @@
#include <assert.h>
#include "./vpx_config.h"
#include "./vpx_scale_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
-#include "vpx_scale/yv12config.h"
+#include "aom/vpx_integer.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
+#include "aom_scale/yv12config.h"
#if CONFIG_VPX_HIGHBITDEPTH
-#include "vp10/common/common.h"
+#include "av1/common/common.h"
#endif
static void extend_plane(uint8_t *const src, int src_stride, int width,
diff --git a/vpx_scale/mips/dspr2/yv12extend_dspr2.c b/aom_scale/mips/dspr2/yv12extend_dspr2.c
similarity index 97%
rename from vpx_scale/mips/dspr2/yv12extend_dspr2.c
rename to aom_scale/mips/dspr2/yv12extend_dspr2.c
index 8a76c60..27a2605 100644
--- a/vpx_scale/mips/dspr2/yv12extend_dspr2.c
+++ b/aom_scale/mips/dspr2/yv12extend_dspr2.c
@@ -11,9 +11,9 @@
#include <assert.h>
#include "./vpx_config.h"
-#include "vpx_scale/yv12config.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_scale/vpx_scale.h"
+#include "aom_scale/yv12config.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_scale/vpx_scale.h"
#if HAVE_DSPR2
static void extend_plane(uint8_t *const src, int src_stride, int width,
diff --git a/vpx_scale/vpx_scale.h b/aom_scale/vpx_scale.h
similarity index 95%
rename from vpx_scale/vpx_scale.h
rename to aom_scale/vpx_scale.h
index 478a483..19bb09e 100644
--- a/vpx_scale/vpx_scale.h
+++ b/aom_scale/vpx_scale.h
@@ -11,7 +11,7 @@
#ifndef VPX_SCALE_VPX_SCALE_H_
#define VPX_SCALE_VPX_SCALE_H_
-#include "vpx_scale/yv12config.h"
+#include "aom_scale/yv12config.h"
extern void vpx_scale_frame(YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst,
unsigned char *temp_area, unsigned char temp_height,
diff --git a/vpx_scale/vpx_scale.mk b/aom_scale/vpx_scale.mk
similarity index 88%
rename from vpx_scale/vpx_scale.mk
rename to aom_scale/vpx_scale.mk
index a49abf3..2ae0d84 100644
--- a/vpx_scale/vpx_scale.mk
+++ b/aom_scale/vpx_scale.mk
@@ -13,4 +13,4 @@
SCALE_SRCS-no += $(SCALE_SRCS_REMOVE-yes)
-$(eval $(call rtcd_h_template,vpx_scale_rtcd,vpx_scale/vpx_scale_rtcd.pl))
+$(eval $(call rtcd_h_template,vpx_scale_rtcd,aom_scale/vpx_scale_rtcd.pl))
diff --git a/vpx_scale/vpx_scale_rtcd.c b/aom_scale/vpx_scale_rtcd.c
similarity index 94%
rename from vpx_scale/vpx_scale_rtcd.c
rename to aom_scale/vpx_scale_rtcd.c
index dc4d959..ed32e12 100644
--- a/vpx_scale/vpx_scale_rtcd.c
+++ b/aom_scale/vpx_scale_rtcd.c
@@ -10,6 +10,6 @@
#include "./vpx_config.h"
#define RTCD_C
#include "./vpx_scale_rtcd.h"
-#include "vpx_ports/vpx_once.h"
+#include "aom_ports/vpx_once.h"
void vpx_scale_rtcd() { once(setup_rtcd_internal); }
diff --git a/vpx_scale/vpx_scale_rtcd.pl b/aom_scale/vpx_scale_rtcd.pl
similarity index 100%
rename from vpx_scale/vpx_scale_rtcd.pl
rename to aom_scale/vpx_scale_rtcd.pl
diff --git a/vpx_scale/yv12config.h b/aom_scale/yv12config.h
similarity index 96%
rename from vpx_scale/yv12config.h
rename to aom_scale/yv12config.h
index 68544d4..4636a33 100644
--- a/vpx_scale/yv12config.h
+++ b/aom_scale/yv12config.h
@@ -16,9 +16,9 @@
#endif
#include "./vpx_config.h"
-#include "vpx/vpx_codec.h"
-#include "vpx/vpx_frame_buffer.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_codec.h"
+#include "aom/vpx_frame_buffer.h"
+#include "aom/vpx_integer.h"
#define VP8BORDERINPIXELS 32
#define VPXINNERBORDERINPIXELS 96
diff --git a/vpx_util/endian_inl.h b/aom_util/endian_inl.h
similarity index 98%
rename from vpx_util/endian_inl.h
rename to aom_util/endian_inl.h
index dc38774..36b8138 100644
--- a/vpx_util/endian_inl.h
+++ b/aom_util/endian_inl.h
@@ -14,7 +14,7 @@
#include <stdlib.h>
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#if defined(__GNUC__)
#define LOCAL_GCC_VERSION ((__GNUC__ << 8) | __GNUC_MINOR__)
diff --git a/vpx_util/vpx_thread.c b/aom_util/vpx_thread.c
similarity index 99%
rename from vpx_util/vpx_thread.c
rename to aom_util/vpx_thread.c
index 58054c8..e77e88f 100644
--- a/vpx_util/vpx_thread.c
+++ b/aom_util/vpx_thread.c
@@ -16,7 +16,7 @@
#include <assert.h>
#include <string.h> // for memset()
#include "./vpx_thread.h"
-#include "vpx_mem/vpx_mem.h"
+#include "aom_mem/vpx_mem.h"
#if CONFIG_MULTITHREAD
diff --git a/vpx_util/vpx_thread.h b/aom_util/vpx_thread.h
similarity index 100%
rename from vpx_util/vpx_thread.h
rename to aom_util/vpx_thread.h
diff --git a/vpx_util/vpx_util.mk b/aom_util/vpx_util.mk
similarity index 100%
rename from vpx_util/vpx_util.mk
rename to aom_util/vpx_util.mk
diff --git a/args.c b/args.c
index 51c0fb9..fb23c88 100644
--- a/args.c
+++ b/args.c
@@ -13,7 +13,7 @@
#include <limits.h>
#include "args.h"
-#include "vpx_ports/msvc.h"
+#include "aom_ports/msvc.h"
#if defined(__GNUC__) && __GNUC__
extern void die(const char *fmt, ...) __attribute__((noreturn));
diff --git a/vp10/common/alloccommon.c b/av1/common/alloccommon.c
similarity index 95%
rename from vp10/common/alloccommon.c
rename to av1/common/alloccommon.c
index fb6d81d..d1735cd 100644
--- a/vp10/common/alloccommon.c
+++ b/av1/common/alloccommon.c
@@ -9,13 +9,13 @@
*/
#include "./vpx_config.h"
-#include "vpx_mem/vpx_mem.h"
+#include "aom_mem/vpx_mem.h"
-#include "vp10/common/alloccommon.h"
-#include "vp10/common/blockd.h"
-#include "vp10/common/entropymode.h"
-#include "vp10/common/entropymv.h"
-#include "vp10/common/onyxc_int.h"
+#include "av1/common/alloccommon.h"
+#include "av1/common/blockd.h"
+#include "av1/common/entropymode.h"
+#include "av1/common/entropymv.h"
+#include "av1/common/onyxc_int.h"
void vp10_set_mb_mi(VP10_COMMON *cm, int width, int height) {
const int aligned_width = ALIGN_POWER_OF_TWO(width, MI_SIZE_LOG2);
diff --git a/vp10/common/alloccommon.h b/av1/common/alloccommon.h
similarity index 100%
rename from vp10/common/alloccommon.h
rename to av1/common/alloccommon.h
diff --git a/vp10/common/arm/neon/iht4x4_add_neon.c b/av1/common/arm/neon/iht4x4_add_neon.c
similarity index 99%
rename from vp10/common/arm/neon/iht4x4_add_neon.c
rename to av1/common/arm/neon/iht4x4_add_neon.c
index d074bc9..600e66b 100644
--- a/vp10/common/arm/neon/iht4x4_add_neon.c
+++ b/av1/common/arm/neon/iht4x4_add_neon.c
@@ -13,7 +13,7 @@
#include "./vp10_rtcd.h"
#include "./vpx_config.h"
-#include "vp10/common/common.h"
+#include "av1/common/common.h"
static int16_t sinpi_1_9 = 0x14a3;
static int16_t sinpi_2_9 = 0x26c9;
diff --git a/vp10/common/arm/neon/iht8x8_add_neon.c b/av1/common/arm/neon/iht8x8_add_neon.c
similarity index 99%
rename from vp10/common/arm/neon/iht8x8_add_neon.c
rename to av1/common/arm/neon/iht8x8_add_neon.c
index 7e1c83f..ff5578d 100644
--- a/vp10/common/arm/neon/iht8x8_add_neon.c
+++ b/av1/common/arm/neon/iht8x8_add_neon.c
@@ -13,7 +13,7 @@
#include "./vp10_rtcd.h"
#include "./vpx_config.h"
-#include "vp10/common/common.h"
+#include "av1/common/common.h"
static int16_t cospi_2_64 = 16305;
static int16_t cospi_4_64 = 16069;
diff --git a/vp10/common/blockd.c b/av1/common/blockd.c
similarity index 99%
rename from vp10/common/blockd.c
rename to av1/common/blockd.c
index 031ca1e..1936888 100644
--- a/vp10/common/blockd.c
+++ b/av1/common/blockd.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vp10/common/blockd.h"
+#include "av1/common/blockd.h"
PREDICTION_MODE vp10_left_block_mode(const MODE_INFO *cur_mi,
const MODE_INFO *left_mi, int b) {
diff --git a/vp10/common/blockd.h b/av1/common/blockd.h
similarity index 95%
rename from vp10/common/blockd.h
rename to av1/common/blockd.h
index c60453d..9b5480a 100644
--- a/vp10/common/blockd.h
+++ b/av1/common/blockd.h
@@ -13,20 +13,20 @@
#include "./vpx_config.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/mem.h"
-#include "vpx_scale/yv12config.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/mem.h"
+#include "aom_scale/yv12config.h"
-#include "vp10/common/common_data.h"
-#include "vp10/common/entropy.h"
-#include "vp10/common/entropymode.h"
-#include "vp10/common/mv.h"
+#include "av1/common/common_data.h"
+#include "av1/common/entropy.h"
+#include "av1/common/entropymode.h"
+#include "av1/common/mv.h"
#if CONFIG_AOM_QM
-#include "vp10/common/quant_common.h"
+#include "av1/common/quant_common.h"
#endif
-#include "vp10/common/scale.h"
-#include "vp10/common/seg_common.h"
-#include "vp10/common/tile_common.h"
+#include "av1/common/scale.h"
+#include "av1/common/seg_common.h"
+#include "av1/common/tile_common.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/clpf.c b/av1/common/clpf.c
similarity index 98%
rename from vp10/common/clpf.c
rename to av1/common/clpf.c
index b5b41ff..9c69a6c 100644
--- a/vp10/common/clpf.c
+++ b/av1/common/clpf.c
@@ -3,7 +3,7 @@
(Replace with proper AOM header)
*/
-#include "vp10/common/clpf.h"
+#include "av1/common/clpf.h"
// Apply the filter on a single block
static void clpf_block(const uint8_t *src, uint8_t *dst, int sstride,
diff --git a/vp10/common/clpf.h b/av1/common/clpf.h
similarity index 93%
rename from vp10/common/clpf.h
rename to av1/common/clpf.h
index 1776a3d..5b9d55b 100644
--- a/vp10/common/clpf.h
+++ b/av1/common/clpf.h
@@ -6,7 +6,7 @@
#ifndef VP10_COMMON_CLPF_H_
#define VP10_COMMON_CLPF_H_
-#include "vp10/common/reconinter.h"
+#include "av1/common/reconinter.h"
// Configuration
#define CLPF_ALLOW_PIXEL_PARALLELISM \
diff --git a/vp10/common/common.h b/av1/common/common.h
similarity index 95%
rename from vp10/common/common.h
rename to av1/common/common.h
index ed2f423..10eb026 100644
--- a/vp10/common/common.h
+++ b/av1/common/common.h
@@ -16,10 +16,10 @@
#include <assert.h>
#include "./vpx_config.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/bitops.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/bitops.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/common_data.h b/av1/common/common_data.h
similarity index 98%
rename from vp10/common/common_data.h
rename to av1/common/common_data.h
index 8863feb..6b26015 100644
--- a/vp10/common/common_data.h
+++ b/av1/common/common_data.h
@@ -11,9 +11,9 @@
#ifndef VP10_COMMON_COMMON_DATA_H_
#define VP10_COMMON_COMMON_DATA_H_
-#include "vp10/common/enums.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/vpx_dsp_common.h"
+#include "av1/common/enums.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/vpx_dsp_common.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/debugmodes.c b/av1/common/debugmodes.c
similarity index 97%
rename from vp10/common/debugmodes.c
rename to av1/common/debugmodes.c
index 18bbbec..6c958a8 100644
--- a/vp10/common/debugmodes.c
+++ b/av1/common/debugmodes.c
@@ -10,8 +10,8 @@
#include <stdio.h>
-#include "vp10/common/blockd.h"
-#include "vp10/common/onyxc_int.h"
+#include "av1/common/blockd.h"
+#include "av1/common/onyxc_int.h"
static void log_frame_info(VP10_COMMON *cm, const char *str, FILE *f) {
fprintf(f, "%s", str);
diff --git a/vp10/common/dering.c b/av1/common/dering.c
similarity index 96%
rename from vp10/common/dering.c
rename to av1/common/dering.c
index f657c83..c22a434 100644
--- a/vp10/common/dering.c
+++ b/av1/common/dering.c
@@ -12,11 +12,11 @@
#include <math.h>
#include "./vpx_scale_rtcd.h"
-#include "vpx/vpx_integer.h"
-#include "vp10/common/dering.h"
-#include "vp10/common/onyxc_int.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/common/od_dering.h"
+#include "aom/vpx_integer.h"
+#include "av1/common/dering.h"
+#include "av1/common/onyxc_int.h"
+#include "av1/common/reconinter.h"
+#include "av1/common/od_dering.h"
int compute_level_from_index(int global_level, int gi) {
diff --git a/vp10/common/dering.h b/av1/common/dering.h
similarity index 86%
rename from vp10/common/dering.h
rename to av1/common/dering.h
index 946366a..eefd0ae 100644
--- a/vp10/common/dering.h
+++ b/av1/common/dering.h
@@ -1,11 +1,11 @@
#ifndef VP10_COMMON_DERING_H_
#define VP10_COMMON_DERING_H_
-#include "vp10/common/od_dering.h"
-#include "vp10/common/onyxc_int.h"
-#include "vpx/vpx_integer.h"
+#include "av1/common/od_dering.h"
+#include "av1/common/onyxc_int.h"
+#include "aom/vpx_integer.h"
#include "./vpx_config.h"
-#include "vpx_ports/mem.h"
+#include "aom_ports/mem.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/entropy.c b/av1/common/entropy.c
similarity index 99%
rename from vp10/common/entropy.c
rename to av1/common/entropy.c
index e2b73cb..c4e023d 100644
--- a/vp10/common/entropy.c
+++ b/av1/common/entropy.c
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vp10/common/entropy.h"
-#include "vp10/common/blockd.h"
-#include "vp10/common/onyxc_int.h"
-#include "vp10/common/entropymode.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx/vpx_integer.h"
+#include "av1/common/entropy.h"
+#include "av1/common/blockd.h"
+#include "av1/common/onyxc_int.h"
+#include "av1/common/entropymode.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom/vpx_integer.h"
// Unconstrained Node Tree
const vpx_tree_index vp10_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)] = {
diff --git a/vp10/common/entropy.h b/av1/common/entropy.h
similarity index 98%
rename from vp10/common/entropy.h
rename to av1/common/entropy.h
index 3dd137c..42f30e4 100644
--- a/vp10/common/entropy.h
+++ b/av1/common/entropy.h
@@ -11,11 +11,11 @@
#ifndef VP10_COMMON_ENTROPY_H_
#define VP10_COMMON_ENTROPY_H_
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/prob.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/prob.h"
-#include "vp10/common/common.h"
-#include "vp10/common/enums.h"
+#include "av1/common/common.h"
+#include "av1/common/enums.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/entropymode.c b/av1/common/entropymode.c
similarity index 99%
rename from vp10/common/entropymode.c
rename to av1/common/entropymode.c
index b9ad5c9..b85bc41 100644
--- a/vp10/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_mem/vpx_mem.h"
+#include "aom_mem/vpx_mem.h"
-#include "vp10/common/onyxc_int.h"
-#include "vp10/common/seg_common.h"
+#include "av1/common/onyxc_int.h"
+#include "av1/common/seg_common.h"
const vpx_prob vp10_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] =
{ {
diff --git a/vp10/common/entropymode.h b/av1/common/entropymode.h
similarity index 96%
rename from vp10/common/entropymode.h
rename to av1/common/entropymode.h
index 377762a..3f8a125 100644
--- a/vp10/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -11,11 +11,11 @@
#ifndef VP10_COMMON_ENTROPYMODE_H_
#define VP10_COMMON_ENTROPYMODE_H_
-#include "vp10/common/entropy.h"
-#include "vp10/common/entropymv.h"
-#include "vp10/common/filter.h"
-#include "vp10/common/seg_common.h"
-#include "vpx_dsp/vpx_filter.h"
+#include "av1/common/entropy.h"
+#include "av1/common/entropymv.h"
+#include "av1/common/filter.h"
+#include "av1/common/seg_common.h"
+#include "aom_dsp/vpx_filter.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/entropymv.c b/av1/common/entropymv.c
similarity index 98%
rename from vp10/common/entropymv.c
rename to av1/common/entropymv.c
index a984241..5405a86 100644
--- a/vp10/common/entropymv.c
+++ b/av1/common/entropymv.c
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vp10/common/onyxc_int.h"
-#include "vp10/common/entropymv.h"
+#include "av1/common/onyxc_int.h"
+#include "av1/common/entropymv.h"
// Integer pel reference mv threshold for use of high-precision 1/8 mv
#define COMPANDED_MVREF_THRESH 8
diff --git a/vp10/common/entropymv.h b/av1/common/entropymv.h
similarity index 98%
rename from vp10/common/entropymv.h
rename to av1/common/entropymv.h
index 737a88c..57b9af0 100644
--- a/vp10/common/entropymv.h
+++ b/av1/common/entropymv.h
@@ -13,9 +13,9 @@
#include "./vpx_config.h"
-#include "vpx_dsp/prob.h"
+#include "aom_dsp/prob.h"
-#include "vp10/common/mv.h"
+#include "av1/common/mv.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/enums.h b/av1/common/enums.h
similarity index 98%
rename from vp10/common/enums.h
rename to av1/common/enums.h
index c08b6b9..4673989 100644
--- a/vp10/common/enums.h
+++ b/av1/common/enums.h
@@ -12,7 +12,7 @@
#define VP10_COMMON_ENUMS_H_
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/filter.c b/av1/common/filter.c
similarity index 98%
rename from vp10/common/filter.c
rename to av1/common/filter.c
index 8597efc..197d026 100644
--- a/vp10/common/filter.c
+++ b/av1/common/filter.c
@@ -10,7 +10,7 @@
#include <assert.h>
-#include "vp10/common/filter.h"
+#include "av1/common/filter.h"
DECLARE_ALIGNED(256, static const InterpKernel,
bilinear_filters[SUBPEL_SHIFTS]) = {
diff --git a/vp10/common/filter.h b/av1/common/filter.h
similarity index 92%
rename from vp10/common/filter.h
rename to av1/common/filter.h
index c0a25d3..ef35786 100644
--- a/vp10/common/filter.h
+++ b/av1/common/filter.h
@@ -12,9 +12,9 @@
#define VP10_COMMON_FILTER_H_
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/vpx_filter.h"
-#include "vpx_ports/mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/vpx_filter.h"
+#include "aom_ports/mem.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/frame_buffers.c b/av1/common/frame_buffers.c
similarity index 97%
rename from vp10/common/frame_buffers.c
rename to av1/common/frame_buffers.c
index 564fa9c..5c736a9 100644
--- a/vp10/common/frame_buffers.c
+++ b/av1/common/frame_buffers.c
@@ -10,8 +10,8 @@
#include <assert.h>
-#include "vp10/common/frame_buffers.h"
-#include "vpx_mem/vpx_mem.h"
+#include "av1/common/frame_buffers.h"
+#include "aom_mem/vpx_mem.h"
int vp10_alloc_internal_frame_buffers(InternalFrameBufferList *list) {
assert(list != NULL);
diff --git a/vp10/common/frame_buffers.h b/av1/common/frame_buffers.h
similarity index 96%
rename from vp10/common/frame_buffers.h
rename to av1/common/frame_buffers.h
index fa6a2e2..f4668fd 100644
--- a/vp10/common/frame_buffers.h
+++ b/av1/common/frame_buffers.h
@@ -11,8 +11,8 @@
#ifndef VP10_COMMON_FRAME_BUFFERS_H_
#define VP10_COMMON_FRAME_BUFFERS_H_
-#include "vpx/vpx_frame_buffer.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_frame_buffer.h"
+#include "aom/vpx_integer.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/idct.c b/av1/common/idct.c
similarity index 98%
rename from vp10/common/idct.c
rename to av1/common/idct.c
index 9870925..d35a4d0 100644
--- a/vp10/common/idct.c
+++ b/av1/common/idct.c
@@ -12,10 +12,10 @@
#include "./vp10_rtcd.h"
#include "./vpx_dsp_rtcd.h"
-#include "vp10/common/blockd.h"
-#include "vp10/common/idct.h"
-#include "vpx_dsp/inv_txfm.h"
-#include "vpx_ports/mem.h"
+#include "av1/common/blockd.h"
+#include "av1/common/idct.h"
+#include "aom_dsp/inv_txfm.h"
+#include "aom_ports/mem.h"
void vp10_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride,
int tx_type) {
diff --git a/vp10/common/idct.h b/av1/common/idct.h
similarity index 95%
rename from vp10/common/idct.h
rename to av1/common/idct.h
index a73e61f..040458c 100644
--- a/vp10/common/idct.h
+++ b/av1/common/idct.h
@@ -14,11 +14,11 @@
#include <assert.h>
#include "./vpx_config.h"
-#include "vp10/common/common.h"
-#include "vp10/common/enums.h"
-#include "vpx_dsp/inv_txfm.h"
-#include "vpx_dsp/txfm_common.h"
-#include "vpx_ports/mem.h"
+#include "av1/common/common.h"
+#include "av1/common/enums.h"
+#include "aom_dsp/inv_txfm.h"
+#include "aom_dsp/txfm_common.h"
+#include "aom_ports/mem.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/loopfilter.c b/av1/common/loopfilter.c
similarity index 99%
rename from vp10/common/loopfilter.c
rename to av1/common/loopfilter.c
index a17939d..13b804e 100644
--- a/vp10/common/loopfilter.c
+++ b/av1/common/loopfilter.c
@@ -10,14 +10,14 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vp10/common/loopfilter.h"
-#include "vp10/common/onyxc_int.h"
-#include "vp10/common/reconinter.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
+#include "av1/common/loopfilter.h"
+#include "av1/common/onyxc_int.h"
+#include "av1/common/reconinter.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
-#include "vp10/common/seg_common.h"
+#include "av1/common/seg_common.h"
// 64 bit masks for left transform size. Each 1 represents a position where
// we should apply a loop filter across the left border of an 8x8 block
diff --git a/vp10/common/loopfilter.h b/av1/common/loopfilter.h
similarity index 97%
rename from vp10/common/loopfilter.h
rename to av1/common/loopfilter.h
index 18aa7a1..f572384 100644
--- a/vp10/common/loopfilter.h
+++ b/av1/common/loopfilter.h
@@ -11,11 +11,11 @@
#ifndef VP10_COMMON_LOOPFILTER_H_
#define VP10_COMMON_LOOPFILTER_H_
-#include "vpx_ports/mem.h"
+#include "aom_ports/mem.h"
#include "./vpx_config.h"
-#include "vp10/common/blockd.h"
-#include "vp10/common/seg_common.h"
+#include "av1/common/blockd.h"
+#include "av1/common/seg_common.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/mips/dspr2/itrans16_dspr2.c b/av1/common/mips/dspr2/itrans16_dspr2.c
similarity index 93%
rename from vp10/common/mips/dspr2/itrans16_dspr2.c
rename to av1/common/mips/dspr2/itrans16_dspr2.c
index 0fcae87..c0b9b2a 100644
--- a/vp10/common/mips/dspr2/itrans16_dspr2.c
+++ b/av1/common/mips/dspr2/itrans16_dspr2.c
@@ -13,12 +13,12 @@
#include "./vpx_config.h"
#include "./vp10_rtcd.h"
-#include "vp10/common/common.h"
-#include "vp10/common/blockd.h"
-#include "vp10/common/idct.h"
-#include "vpx_dsp/mips/inv_txfm_dspr2.h"
-#include "vpx_dsp/txfm_common.h"
-#include "vpx_ports/mem.h"
+#include "av1/common/common.h"
+#include "av1/common/blockd.h"
+#include "av1/common/idct.h"
+#include "aom_dsp/mips/inv_txfm_dspr2.h"
+#include "aom_dsp/txfm_common.h"
+#include "aom_ports/mem.h"
#if HAVE_DSPR2
void vp10_iht16x16_256_add_dspr2(const int16_t *input, uint8_t *dest, int pitch,
diff --git a/vp10/common/mips/dspr2/itrans4_dspr2.c b/av1/common/mips/dspr2/itrans4_dspr2.c
similarity index 92%
rename from vp10/common/mips/dspr2/itrans4_dspr2.c
rename to av1/common/mips/dspr2/itrans4_dspr2.c
index 9d10d5e..dcb28c9 100644
--- a/vp10/common/mips/dspr2/itrans4_dspr2.c
+++ b/av1/common/mips/dspr2/itrans4_dspr2.c
@@ -13,12 +13,12 @@
#include "./vpx_config.h"
#include "./vp10_rtcd.h"
-#include "vp10/common/common.h"
-#include "vp10/common/blockd.h"
-#include "vp10/common/idct.h"
-#include "vpx_dsp/mips/inv_txfm_dspr2.h"
-#include "vpx_dsp/txfm_common.h"
-#include "vpx_ports/mem.h"
+#include "av1/common/common.h"
+#include "av1/common/blockd.h"
+#include "av1/common/idct.h"
+#include "aom_dsp/mips/inv_txfm_dspr2.h"
+#include "aom_dsp/txfm_common.h"
+#include "aom_ports/mem.h"
#if HAVE_DSPR2
void vp10_iht4x4_16_add_dspr2(const int16_t *input, uint8_t *dest,
diff --git a/vp10/common/mips/dspr2/itrans8_dspr2.c b/av1/common/mips/dspr2/itrans8_dspr2.c
similarity index 93%
rename from vp10/common/mips/dspr2/itrans8_dspr2.c
rename to av1/common/mips/dspr2/itrans8_dspr2.c
index 3ebf8ce..761d6f0 100644
--- a/vp10/common/mips/dspr2/itrans8_dspr2.c
+++ b/av1/common/mips/dspr2/itrans8_dspr2.c
@@ -13,11 +13,11 @@
#include "./vpx_config.h"
#include "./vp10_rtcd.h"
-#include "vp10/common/common.h"
-#include "vp10/common/blockd.h"
-#include "vpx_dsp/mips/inv_txfm_dspr2.h"
-#include "vpx_dsp/txfm_common.h"
-#include "vpx_ports/mem.h"
+#include "av1/common/common.h"
+#include "av1/common/blockd.h"
+#include "aom_dsp/mips/inv_txfm_dspr2.h"
+#include "aom_dsp/txfm_common.h"
+#include "aom_ports/mem.h"
#if HAVE_DSPR2
void vp10_iht8x8_64_add_dspr2(const int16_t *input, uint8_t *dest,
diff --git a/vp10/common/mips/msa/idct16x16_msa.c b/av1/common/mips/msa/idct16x16_msa.c
similarity index 96%
rename from vp10/common/mips/msa/idct16x16_msa.c
rename to av1/common/mips/msa/idct16x16_msa.c
index c73ef37..baa3a97 100644
--- a/vp10/common/mips/msa/idct16x16_msa.c
+++ b/av1/common/mips/msa/idct16x16_msa.c
@@ -10,8 +10,8 @@
#include <assert.h>
-#include "vp10/common/enums.h"
-#include "vpx_dsp/mips/inv_txfm_msa.h"
+#include "av1/common/enums.h"
+#include "aom_dsp/mips/inv_txfm_msa.h"
void vp10_iht16x16_256_add_msa(const int16_t *input, uint8_t *dst,
int32_t dst_stride, int32_t tx_type) {
diff --git a/vp10/common/mips/msa/idct4x4_msa.c b/av1/common/mips/msa/idct4x4_msa.c
similarity index 96%
rename from vp10/common/mips/msa/idct4x4_msa.c
rename to av1/common/mips/msa/idct4x4_msa.c
index ea4091b..0620df7 100644
--- a/vp10/common/mips/msa/idct4x4_msa.c
+++ b/av1/common/mips/msa/idct4x4_msa.c
@@ -10,8 +10,8 @@
#include <assert.h>
-#include "vp10/common/enums.h"
-#include "vpx_dsp/mips/inv_txfm_msa.h"
+#include "av1/common/enums.h"
+#include "aom_dsp/mips/inv_txfm_msa.h"
void vp10_iht4x4_16_add_msa(const int16_t *input, uint8_t *dst,
int32_t dst_stride, int32_t tx_type) {
diff --git a/vp10/common/mips/msa/idct8x8_msa.c b/av1/common/mips/msa/idct8x8_msa.c
similarity index 97%
rename from vp10/common/mips/msa/idct8x8_msa.c
rename to av1/common/mips/msa/idct8x8_msa.c
index c62e82d..5c62c4a 100644
--- a/vp10/common/mips/msa/idct8x8_msa.c
+++ b/av1/common/mips/msa/idct8x8_msa.c
@@ -10,8 +10,8 @@
#include <assert.h>
-#include "vp10/common/enums.h"
-#include "vpx_dsp/mips/inv_txfm_msa.h"
+#include "av1/common/enums.h"
+#include "aom_dsp/mips/inv_txfm_msa.h"
void vp10_iht8x8_64_add_msa(const int16_t *input, uint8_t *dst,
int32_t dst_stride, int32_t tx_type) {
diff --git a/vp10/common/mv.h b/av1/common/mv.h
similarity index 94%
rename from vp10/common/mv.h
rename to av1/common/mv.h
index 96656aa..0f4ac4a 100644
--- a/vp10/common/mv.h
+++ b/av1/common/mv.h
@@ -11,9 +11,9 @@
#ifndef VP10_COMMON_MV_H_
#define VP10_COMMON_MV_H_
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
-#include "vp10/common/common.h"
+#include "av1/common/common.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/mvref_common.c b/av1/common/mvref_common.c
similarity index 99%
rename from vp10/common/mvref_common.c
rename to av1/common/mvref_common.c
index 198bbf5..b632b54 100644
--- a/vp10/common/mvref_common.c
+++ b/av1/common/mvref_common.c
@@ -9,7 +9,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vp10/common/mvref_common.h"
+#include "av1/common/mvref_common.h"
// This function searches the neighbourhood of a given MB/SB
// to try and find candidate reference vectors.
diff --git a/vp10/common/mvref_common.h b/av1/common/mvref_common.h
similarity index 98%
rename from vp10/common/mvref_common.h
rename to av1/common/mvref_common.h
index 44e4bb5..a2e984d 100644
--- a/vp10/common/mvref_common.h
+++ b/av1/common/mvref_common.h
@@ -10,8 +10,8 @@
#ifndef VP10_COMMON_MVREF_COMMON_H_
#define VP10_COMMON_MVREF_COMMON_H_
-#include "vp10/common/onyxc_int.h"
-#include "vp10/common/blockd.h"
+#include "av1/common/onyxc_int.h"
+#include "av1/common/blockd.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/od_dering.c b/av1/common/od_dering.c
similarity index 100%
rename from vp10/common/od_dering.c
rename to av1/common/od_dering.c
diff --git a/vp10/common/od_dering.h b/av1/common/od_dering.h
similarity index 100%
rename from vp10/common/od_dering.h
rename to av1/common/od_dering.h
diff --git a/vp10/common/odintrin.c b/av1/common/odintrin.c
similarity index 99%
rename from vp10/common/odintrin.c
rename to av1/common/odintrin.c
index ca9a5fc..a87bda0 100644
--- a/vp10/common/odintrin.c
+++ b/av1/common/odintrin.c
@@ -22,7 +22,7 @@
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
-#include "vp10/common/odintrin.h"
+#include "av1/common/odintrin.h"
/*Constants for use with OD_DIVU_SMALL().
See \cite{Rob05} for details on computing these constants.
diff --git a/vp10/common/odintrin.h b/av1/common/odintrin.h
similarity index 86%
rename from vp10/common/odintrin.h
rename to av1/common/odintrin.h
index c96f8a7..89bc41d 100644
--- a/vp10/common/odintrin.h
+++ b/av1/common/odintrin.h
@@ -1,10 +1,14 @@
#ifndef VP10_COMMON_ODINTRIN_H_
#define VP10_COMMON_ODINTRIN_H_
-#include "vp10/common/enums.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/bitops.h"
+#include "av1/common/enums.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/bitops.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
/*Smallest blocks are 4x4*/
# define OD_LOG_BSIZE0 (2)
@@ -44,4 +48,8 @@
We define a special version of the macro to use when x can be zero.*/
# define OD_ILOG(x) ((x) ? OD_ILOG_NZ(x) : 0)
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif
diff --git a/vp10/common/onyxc_int.h b/av1/common/onyxc_int.h
similarity index 97%
rename from vp10/common/onyxc_int.h
rename to av1/common/onyxc_int.h
index c8cfe92..0031022 100644
--- a/vp10/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -12,16 +12,16 @@
#define VP10_COMMON_ONYXC_INT_H_
#include "./vpx_config.h"
-#include "vpx/internal/vpx_codec_internal.h"
-#include "vpx_util/vpx_thread.h"
+#include "aom/internal/vpx_codec_internal.h"
+#include "aom_util/vpx_thread.h"
#include "./vp10_rtcd.h"
-#include "vp10/common/alloccommon.h"
-#include "vp10/common/loopfilter.h"
-#include "vp10/common/entropymv.h"
-#include "vp10/common/entropy.h"
-#include "vp10/common/entropymode.h"
-#include "vp10/common/frame_buffers.h"
-#include "vp10/common/tile_common.h"
+#include "av1/common/alloccommon.h"
+#include "av1/common/loopfilter.h"
+#include "av1/common/entropymv.h"
+#include "av1/common/entropy.h"
+#include "av1/common/entropymode.h"
+#include "av1/common/frame_buffers.h"
+#include "av1/common/tile_common.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/pred_common.c b/av1/common/pred_common.c
similarity index 98%
rename from vp10/common/pred_common.c
rename to av1/common/pred_common.c
index b3a4531..67c7464 100644
--- a/vp10/common/pred_common.c
+++ b/av1/common/pred_common.c
@@ -9,9 +9,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vp10/common/common.h"
-#include "vp10/common/pred_common.h"
-#include "vp10/common/seg_common.h"
+#include "av1/common/common.h"
+#include "av1/common/pred_common.h"
+#include "av1/common/seg_common.h"
// Returns a context number for the given MB prediction signal
int vp10_get_pred_context_switchable_interp(const MACROBLOCKD *xd) {
diff --git a/vp10/common/pred_common.h b/av1/common/pred_common.h
similarity index 98%
rename from vp10/common/pred_common.h
rename to av1/common/pred_common.h
index dfb86f9..e5e5292 100644
--- a/vp10/common/pred_common.h
+++ b/av1/common/pred_common.h
@@ -11,9 +11,9 @@
#ifndef VP10_COMMON_PRED_COMMON_H_
#define VP10_COMMON_PRED_COMMON_H_
-#include "vp10/common/blockd.h"
-#include "vp10/common/onyxc_int.h"
-#include "vpx_dsp/vpx_dsp_common.h"
+#include "av1/common/blockd.h"
+#include "av1/common/onyxc_int.h"
+#include "aom_dsp/vpx_dsp_common.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/quant_common.c b/av1/common/quant_common.c
similarity index 99%
rename from vp10/common/quant_common.c
rename to av1/common/quant_common.c
index f993dd2..c17d17e 100644
--- a/vp10/common/quant_common.c
+++ b/av1/common/quant_common.c
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vp10/common/common.h"
-#include "vp10/common/onyxc_int.h"
-#include "vp10/common/quant_common.h"
-#include "vp10/common/seg_common.h"
+#include "av1/common/common.h"
+#include "av1/common/onyxc_int.h"
+#include "av1/common/quant_common.h"
+#include "av1/common/seg_common.h"
#if CONFIG_AOM_QM
static void make_qmatrices(qm_val_t* wmatrix[NUM_QM_LEVELS][2][2][TX_SIZES],
diff --git a/vp10/common/quant_common.h b/av1/common/quant_common.h
similarity index 95%
rename from vp10/common/quant_common.h
rename to av1/common/quant_common.h
index be71861..a2e7c05 100644
--- a/vp10/common/quant_common.h
+++ b/av1/common/quant_common.h
@@ -11,9 +11,9 @@
#ifndef VP10_COMMON_QUANT_COMMON_H_
#define VP10_COMMON_QUANT_COMMON_H_
-#include "vpx/vpx_codec.h"
-#include "vp10/common/seg_common.h"
-#include "vp10/common/enums.h"
+#include "aom/vpx_codec.h"
+#include "av1/common/seg_common.h"
+#include "av1/common/enums.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/reconinter.c b/av1/common/reconinter.c
similarity index 98%
rename from vp10/common/reconinter.c
rename to av1/common/reconinter.c
index f857e94..0a13a1f 100644
--- a/vp10/common/reconinter.c
+++ b/av1/common/reconinter.c
@@ -13,11 +13,11 @@
#include "./vpx_scale_rtcd.h"
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
-#include "vp10/common/blockd.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/common/reconintra.h"
+#include "av1/common/blockd.h"
+#include "av1/common/reconinter.h"
+#include "av1/common/reconintra.h"
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_build_inter_predictor(
diff --git a/vp10/common/reconinter.h b/av1/common/reconinter.h
similarity index 97%
rename from vp10/common/reconinter.h
rename to av1/common/reconinter.h
index 6af16ae..03beedd 100644
--- a/vp10/common/reconinter.h
+++ b/av1/common/reconinter.h
@@ -11,10 +11,10 @@
#ifndef VP10_COMMON_RECONINTER_H_
#define VP10_COMMON_RECONINTER_H_
-#include "vp10/common/filter.h"
-#include "vp10/common/onyxc_int.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/vpx_filter.h"
+#include "av1/common/filter.h"
+#include "av1/common/onyxc_int.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/vpx_filter.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/reconintra.c b/av1/common/reconintra.c
similarity index 98%
rename from vp10/common/reconintra.c
rename to av1/common/reconintra.c
index 8ad3c63..d2195fe 100644
--- a/vp10/common/reconintra.c
+++ b/av1/common/reconintra.c
@@ -12,14 +12,14 @@
#include "./vpx_dsp_rtcd.h"
#if CONFIG_VPX_HIGHBITDEPTH
-#include "vpx_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_dsp_common.h"
#endif // CONFIG_VPX_HIGHBITDEPTH
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/vpx_once.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/vpx_once.h"
-#include "vp10/common/reconintra.h"
-#include "vp10/common/onyxc_int.h"
+#include "av1/common/reconintra.h"
+#include "av1/common/onyxc_int.h"
#if CONFIG_MISC_FIXES
enum {
diff --git a/vp10/common/reconintra.h b/av1/common/reconintra.h
similarity index 93%
rename from vp10/common/reconintra.h
rename to av1/common/reconintra.h
index a38f058..5c00a6a 100644
--- a/vp10/common/reconintra.h
+++ b/av1/common/reconintra.h
@@ -11,8 +11,8 @@
#ifndef VP10_COMMON_RECONINTRA_H_
#define VP10_COMMON_RECONINTRA_H_
-#include "vpx/vpx_integer.h"
-#include "vp10/common/blockd.h"
+#include "aom/vpx_integer.h"
+#include "av1/common/blockd.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/scale.c b/av1/common/scale.c
similarity index 98%
rename from vp10/common/scale.c
rename to av1/common/scale.c
index d654b4a..e011a95 100644
--- a/vp10/common/scale.c
+++ b/av1/common/scale.c
@@ -9,9 +9,9 @@
*/
#include "./vpx_dsp_rtcd.h"
-#include "vp10/common/filter.h"
-#include "vp10/common/scale.h"
-#include "vpx_dsp/vpx_filter.h"
+#include "av1/common/filter.h"
+#include "av1/common/scale.h"
+#include "aom_dsp/vpx_filter.h"
static INLINE int scaled_x(int val, const struct scale_factors *sf) {
return (int)((int64_t)val * sf->x_scale_fp >> REF_SCALE_SHIFT);
diff --git a/vp10/common/scale.h b/av1/common/scale.h
similarity index 97%
rename from vp10/common/scale.h
rename to av1/common/scale.h
index 70e301b..ea53f35 100644
--- a/vp10/common/scale.h
+++ b/av1/common/scale.h
@@ -11,8 +11,8 @@
#ifndef VP10_COMMON_SCALE_H_
#define VP10_COMMON_SCALE_H_
-#include "vp10/common/mv.h"
-#include "vpx_dsp/vpx_convolve.h"
+#include "av1/common/mv.h"
+#include "aom_dsp/vpx_convolve.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/scan.c b/av1/common/scan.c
similarity index 99%
rename from vp10/common/scan.c
rename to av1/common/scan.c
index f11ac8d..c61a057 100644
--- a/vp10/common/scan.c
+++ b/av1/common/scan.c
@@ -10,7 +10,7 @@
#include <assert.h>
-#include "vp10/common/scan.h"
+#include "av1/common/scan.h"
DECLARE_ALIGNED(16, static const int16_t, default_scan_4x4[16]) = {
0, 4, 1, 5, 8, 2, 12, 9, 3, 6, 13, 10, 7, 14, 11, 15,
diff --git a/vp10/common/scan.h b/av1/common/scan.h
similarity index 90%
rename from vp10/common/scan.h
rename to av1/common/scan.h
index acff121..8dd35a5 100644
--- a/vp10/common/scan.h
+++ b/av1/common/scan.h
@@ -11,11 +11,11 @@
#ifndef VP10_COMMON_SCAN_H_
#define VP10_COMMON_SCAN_H_
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/mem.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/mem.h"
-#include "vp10/common/enums.h"
-#include "vp10/common/blockd.h"
+#include "av1/common/enums.h"
+#include "av1/common/blockd.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/seg_common.c b/av1/common/seg_common.c
similarity index 93%
rename from vp10/common/seg_common.c
rename to av1/common/seg_common.c
index 7e5dcc2..f131c7b 100644
--- a/vp10/common/seg_common.c
+++ b/av1/common/seg_common.c
@@ -10,10 +10,10 @@
#include <assert.h>
-#include "vp10/common/blockd.h"
-#include "vp10/common/loopfilter.h"
-#include "vp10/common/seg_common.h"
-#include "vp10/common/quant_common.h"
+#include "av1/common/blockd.h"
+#include "av1/common/loopfilter.h"
+#include "av1/common/seg_common.h"
+#include "av1/common/quant_common.h"
static const int seg_feature_data_signed[SEG_LVL_MAX] = { 1, 1, 0, 0 };
diff --git a/vp10/common/seg_common.h b/av1/common/seg_common.h
similarity index 98%
rename from vp10/common/seg_common.h
rename to av1/common/seg_common.h
index 4f8b80e..7a8fa8f 100644
--- a/vp10/common/seg_common.h
+++ b/av1/common/seg_common.h
@@ -11,7 +11,7 @@
#ifndef VP10_COMMON_SEG_COMMON_H_
#define VP10_COMMON_SEG_COMMON_H_
-#include "vpx_dsp/prob.h"
+#include "aom_dsp/prob.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/thread_common.c b/av1/common/thread_common.c
similarity index 98%
rename from vp10/common/thread_common.c
rename to av1/common/thread_common.c
index 3678c3b..667777a 100644
--- a/vp10/common/thread_common.c
+++ b/av1/common/thread_common.c
@@ -9,12 +9,12 @@
*/
#include "./vpx_config.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vp10/common/entropymode.h"
-#include "vp10/common/thread_common.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/common/loopfilter.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "av1/common/entropymode.h"
+#include "av1/common/thread_common.h"
+#include "av1/common/reconinter.h"
+#include "av1/common/loopfilter.h"
#if CONFIG_MULTITHREAD
static INLINE void mutex_lock(pthread_mutex_t *const mutex) {
diff --git a/vp10/common/thread_common.h b/av1/common/thread_common.h
similarity index 96%
rename from vp10/common/thread_common.h
rename to av1/common/thread_common.h
index 1ceb680..3e098f5 100644
--- a/vp10/common/thread_common.h
+++ b/av1/common/thread_common.h
@@ -11,8 +11,8 @@
#ifndef VP10_COMMON_LOOPFILTER_THREAD_H_
#define VP10_COMMON_LOOPFILTER_THREAD_H_
#include "./vpx_config.h"
-#include "vp10/common/loopfilter.h"
-#include "vpx_util/vpx_thread.h"
+#include "av1/common/loopfilter.h"
+#include "aom_util/vpx_thread.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/tile_common.c b/av1/common/tile_common.c
similarity index 94%
rename from vp10/common/tile_common.c
rename to av1/common/tile_common.c
index e38a704..fde5a2b 100644
--- a/vp10/common/tile_common.c
+++ b/av1/common/tile_common.c
@@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vp10/common/tile_common.h"
-#include "vp10/common/onyxc_int.h"
-#include "vpx_dsp/vpx_dsp_common.h"
+#include "av1/common/tile_common.h"
+#include "av1/common/onyxc_int.h"
+#include "aom_dsp/vpx_dsp_common.h"
#define MIN_TILE_WIDTH_B64 4
#define MAX_TILE_WIDTH_B64 64
diff --git a/vp10/common/tile_common.h b/av1/common/tile_common.h
similarity index 100%
rename from vp10/common/tile_common.h
rename to av1/common/tile_common.h
diff --git a/vp10/common/vp10_fwd_txfm.c b/av1/common/vp10_fwd_txfm.c
similarity index 99%
rename from vp10/common/vp10_fwd_txfm.c
rename to av1/common/vp10_fwd_txfm.c
index 8ec2316..f02c55f 100644
--- a/vp10/common/vp10_fwd_txfm.c
+++ b/av1/common/vp10_fwd_txfm.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vp10/common/vp10_fwd_txfm.h"
+#include "av1/common/vp10_fwd_txfm.h"
void vp10_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride) {
// The 2D transform is done with two passes which are actually pretty
diff --git a/vp10/common/vp10_fwd_txfm.h b/av1/common/vp10_fwd_txfm.h
similarity index 90%
rename from vp10/common/vp10_fwd_txfm.h
rename to av1/common/vp10_fwd_txfm.h
index 46dbf3d..a0481d3 100644
--- a/vp10/common/vp10_fwd_txfm.h
+++ b/av1/common/vp10_fwd_txfm.h
@@ -11,8 +11,8 @@
#ifndef VP10_COMMON_VP10_FWD_TXFM_H_
#define VP10_COMMON_VP10_FWD_TXFM_H_
-#include "vpx_dsp/txfm_common.h"
-#include "vpx_dsp/fwd_txfm.h"
+#include "aom_dsp/txfm_common.h"
+#include "aom_dsp/fwd_txfm.h"
void vp10_fdct32(const tran_high_t *input, tran_high_t *output, int round);
#endif // VP10_COMMON_VP10_FWD_TXFM_H_
diff --git a/vp10/common/vp10_inv_txfm.c b/av1/common/vp10_inv_txfm.c
similarity index 99%
rename from vp10/common/vp10_inv_txfm.c
rename to av1/common/vp10_inv_txfm.c
index cd5eea3..8e1e614 100644
--- a/vp10/common/vp10_inv_txfm.c
+++ b/av1/common/vp10_inv_txfm.c
@@ -12,7 +12,7 @@
#include <math.h>
#include <string.h>
-#include "vp10/common/vp10_inv_txfm.h"
+#include "av1/common/vp10_inv_txfm.h"
void vp10_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
/* 4-point reversible, orthonormal inverse Walsh-Hadamard in 3.5 adds,
diff --git a/vp10/common/vp10_inv_txfm.h b/av1/common/vp10_inv_txfm.h
similarity index 98%
rename from vp10/common/vp10_inv_txfm.h
rename to av1/common/vp10_inv_txfm.h
index ec981e8..374da9d 100644
--- a/vp10/common/vp10_inv_txfm.h
+++ b/av1/common/vp10_inv_txfm.h
@@ -14,8 +14,8 @@
#include <assert.h>
#include "./vpx_config.h"
-#include "vpx_dsp/txfm_common.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/txfm_common.h"
+#include "aom_ports/mem.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/common/vp10_rtcd.c b/av1/common/vp10_rtcd.c
similarity index 95%
rename from vp10/common/vp10_rtcd.c
rename to av1/common/vp10_rtcd.c
index 0fd8ab0..7fce6b9 100644
--- a/vp10/common/vp10_rtcd.c
+++ b/av1/common/vp10_rtcd.c
@@ -10,7 +10,7 @@
#include "./vpx_config.h"
#define RTCD_C
#include "./vp10_rtcd.h"
-#include "vpx_ports/vpx_once.h"
+#include "aom_ports/vpx_once.h"
void vp10_rtcd() {
// TODO(JBB): Remove this once, by insuring that both the encoder and
diff --git a/vp10/common/vp10_rtcd_defs.pl b/av1/common/vp10_rtcd_defs.pl
similarity index 99%
rename from vp10/common/vp10_rtcd_defs.pl
rename to av1/common/vp10_rtcd_defs.pl
index 6f8900a..7582b07 100644
--- a/vp10/common/vp10_rtcd_defs.pl
+++ b/av1/common/vp10_rtcd_defs.pl
@@ -4,9 +4,9 @@
* VP10
*/
-#include "vpx/vpx_integer.h"
-#include "vp10/common/common.h"
-#include "vp10/common/enums.h"
+#include "aom/vpx_integer.h"
+#include "av1/common/common.h"
+#include "av1/common/enums.h"
struct macroblockd;
diff --git a/vp10/common/x86/idct_intrin_sse2.c b/av1/common/x86/idct_intrin_sse2.c
similarity index 97%
rename from vp10/common/x86/idct_intrin_sse2.c
rename to av1/common/x86/idct_intrin_sse2.c
index 792e2f9..65102b7 100644
--- a/vp10/common/x86/idct_intrin_sse2.c
+++ b/av1/common/x86/idct_intrin_sse2.c
@@ -8,9 +8,9 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/x86/inv_txfm_sse2.h"
-#include "vpx_dsp/x86/txfm_common_sse2.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/x86/inv_txfm_sse2.h"
+#include "aom_dsp/x86/txfm_common_sse2.h"
+#include "aom_ports/mem.h"
void vp10_iht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride,
int tx_type) {
diff --git a/vpx_dsp/x86/fwd_dct32x32_impl_sse2.h b/av1/common/x86/vp10_fwd_dct32x32_impl_sse2.h
similarity index 99%
rename from vpx_dsp/x86/fwd_dct32x32_impl_sse2.h
rename to av1/common/x86/vp10_fwd_dct32x32_impl_sse2.h
index 3744333..e7d63fe 100644
--- a/vpx_dsp/x86/fwd_dct32x32_impl_sse2.h
+++ b/av1/common/x86/vp10_fwd_dct32x32_impl_sse2.h
@@ -10,9 +10,10 @@
#include <emmintrin.h> // SSE2
-#include "vpx_dsp/fwd_txfm.h"
-#include "vpx_dsp/txfm_common.h"
-#include "vpx_dsp/x86/txfm_common_sse2.h"
+#include "./vp10_rtcd.h"
+#include "av1/common/vp10_fwd_txfm.h"
+#include "aom_dsp/txfm_common.h"
+#include "aom_dsp/x86/txfm_common_sse2.h"
// TODO(jingning) The high bit-depth version needs re-work for performance.
// The current SSE2 implementation also causes cross reference to the static
@@ -21,31 +22,31 @@
#define ADD_EPI16 _mm_adds_epi16
#define SUB_EPI16 _mm_subs_epi16
#if FDCT32x32_HIGH_PRECISION
-void vpx_fdct32x32_rows_c(const int16_t *intermediate, tran_low_t *out) {
+void vp10_fdct32x32_rows_c(const int16_t *intermediate, tran_low_t *out) {
int i, j;
for (i = 0; i < 32; ++i) {
tran_high_t temp_in[32], temp_out[32];
for (j = 0; j < 32; ++j) temp_in[j] = intermediate[j * 32 + i];
- vpx_fdct32(temp_in, temp_out, 0);
+ vp10_fdct32(temp_in, temp_out, 0);
for (j = 0; j < 32; ++j)
out[j + i * 32] =
(tran_low_t)((temp_out[j] + 1 + (temp_out[j] < 0)) >> 2);
}
}
-#define HIGH_FDCT32x32_2D_C vpx_highbd_fdct32x32_c
-#define HIGH_FDCT32x32_2D_ROWS_C vpx_fdct32x32_rows_c
+#define HIGH_FDCT32x32_2D_C vp10_highbd_fdct32x32_c
+#define HIGH_FDCT32x32_2D_ROWS_C vp10_fdct32x32_rows_c
#else
-void vpx_fdct32x32_rd_rows_c(const int16_t *intermediate, tran_low_t *out) {
+void vp10_fdct32x32_rd_rows_c(const int16_t *intermediate, tran_low_t *out) {
int i, j;
for (i = 0; i < 32; ++i) {
tran_high_t temp_in[32], temp_out[32];
for (j = 0; j < 32; ++j) temp_in[j] = intermediate[j * 32 + i];
- vpx_fdct32(temp_in, temp_out, 1);
+ vp10_fdct32(temp_in, temp_out, 1);
for (j = 0; j < 32; ++j) out[j + i * 32] = (tran_low_t)temp_out[j];
}
}
-#define HIGH_FDCT32x32_2D_C vpx_highbd_fdct32x32_rd_c
-#define HIGH_FDCT32x32_2D_ROWS_C vpx_fdct32x32_rd_rows_c
+#define HIGH_FDCT32x32_2D_C vp10_highbd_fdct32x32_rd_c
+#define HIGH_FDCT32x32_2D_ROWS_C vp10_fdct32x32_rd_rows_c
#endif // FDCT32x32_HIGH_PRECISION
#else
#define ADD_EPI16 _mm_add_epi16
@@ -3145,7 +3146,7 @@
tr2_6 = _mm_sub_epi16(tr2_6, tr2_6_0);
tr2_7 = _mm_sub_epi16(tr2_7, tr2_7_0);
// ... and here.
- // PS: also change code in vp9/encoder/vp9_dct.c
+ // PS: also change code in av1/encoder/dct.c
tr2_0 = _mm_add_epi16(tr2_0, kOne);
tr2_1 = _mm_add_epi16(tr2_1, kOne);
tr2_2 = _mm_add_epi16(tr2_2, kOne);
diff --git a/vpx_dsp/x86/fwd_txfm_impl_sse2.h b/av1/common/x86/vp10_fwd_txfm_impl_sse2.h
similarity index 99%
copy from vpx_dsp/x86/fwd_txfm_impl_sse2.h
copy to av1/common/x86/vp10_fwd_txfm_impl_sse2.h
index d27246d..9bb8abc 100644
--- a/vpx_dsp/x86/fwd_txfm_impl_sse2.h
+++ b/av1/common/x86/vp10_fwd_txfm_impl_sse2.h
@@ -11,10 +11,10 @@
#include <emmintrin.h> // SSE2
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/txfm_common.h"
-#include "vpx_dsp/x86/fwd_txfm_sse2.h"
-#include "vpx_dsp/x86/txfm_common_sse2.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/txfm_common.h"
+#include "aom_dsp/x86/fwd_txfm_sse2.h"
+#include "aom_dsp/x86/txfm_common_sse2.h"
+#include "aom_ports/mem.h"
// TODO(jingning) The high bit-depth functions need rework for performance.
// After we properly fix the high bit-depth function implementations, this
@@ -84,12 +84,12 @@
// Load inputs.
in0 = _mm_loadl_epi64((const __m128i *)(input + 0 * stride));
in1 = _mm_loadl_epi64((const __m128i *)(input + 1 * stride));
- // in0 = [i0 i1 i2 i3 iC iD iE iF]
- // in1 = [i4 i5 i6 i7 i8 i9 iA iB]
in1 = _mm_unpacklo_epi64(
in1, _mm_loadl_epi64((const __m128i *)(input + 2 * stride)));
in0 = _mm_unpacklo_epi64(
in0, _mm_loadl_epi64((const __m128i *)(input + 3 * stride)));
+// in0 = [i0 i1 i2 i3 iC iD iE iF]
+// in1 = [i4 i5 i6 i7 i8 i9 iA iB]
#if DCT_HIGH_BIT_DEPTH
// Check inputs small enough to use optimised code
cmp0 = _mm_xor_si128(_mm_cmpgt_epi16(in0, _mm_set1_epi16(0x3ff)),
diff --git a/vp10/common/x86/vp10_fwd_txfm_sse2.c b/av1/common/x86/vp10_fwd_txfm_sse2.c
similarity index 94%
rename from vp10/common/x86/vp10_fwd_txfm_sse2.c
rename to av1/common/x86/vp10_fwd_txfm_sse2.c
index 5b26a31..2b8ed9d 100644
--- a/vp10/common/x86/vp10_fwd_txfm_sse2.c
+++ b/av1/common/x86/vp10_fwd_txfm_sse2.c
@@ -11,8 +11,8 @@
#include <emmintrin.h> // SSE2
#include "./vpx_config.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_dsp/x86/fwd_txfm_sse2.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_dsp/x86/fwd_txfm_sse2.h"
void vp10_fdct4x4_1_sse2(const int16_t *input, tran_low_t *output, int stride) {
__m128i in0, in1;
@@ -228,20 +228,20 @@
#define FDCT4x4_2D vp10_fdct4x4_sse2
#define FDCT8x8_2D vp10_fdct8x8_sse2
#define FDCT16x16_2D vp10_fdct16x16_sse2
-#include "vp10/common/x86/vp10_fwd_txfm_impl_sse2.h"
+#include "av1/common/x86/vp10_fwd_txfm_impl_sse2.h"
#undef FDCT4x4_2D
#undef FDCT8x8_2D
#undef FDCT16x16_2D
#define FDCT32x32_2D vp10_fdct32x32_rd_sse2
#define FDCT32x32_HIGH_PRECISION 0
-#include "vp10/common/x86/vp10_fwd_dct32x32_impl_sse2.h"
+#include "av1/common/x86/vp10_fwd_dct32x32_impl_sse2.h"
#undef FDCT32x32_2D
#undef FDCT32x32_HIGH_PRECISION
#define FDCT32x32_2D vp10_fdct32x32_sse2
#define FDCT32x32_HIGH_PRECISION 1
-#include "vp10/common/x86/vp10_fwd_dct32x32_impl_sse2.h" // NOLINT
+#include "av1/common/x86/vp10_fwd_dct32x32_impl_sse2.h" // NOLINT
#undef FDCT32x32_2D
#undef FDCT32x32_HIGH_PRECISION
#undef DCT_HIGH_BIT_DEPTH
@@ -251,20 +251,20 @@
#define FDCT4x4_2D vp10_highbd_fdct4x4_sse2
#define FDCT8x8_2D vp10_highbd_fdct8x8_sse2
#define FDCT16x16_2D vp10_highbd_fdct16x16_sse2
-#include "vp10/common/x86/vp10_fwd_txfm_impl_sse2.h" // NOLINT
+#include "av1/common/x86/vp10_fwd_txfm_impl_sse2.h" // NOLINT
#undef FDCT4x4_2D
#undef FDCT8x8_2D
#undef FDCT16x16_2D
#define FDCT32x32_2D vp10_highbd_fdct32x32_rd_sse2
#define FDCT32x32_HIGH_PRECISION 0
-#include "vp10/common/x86/vp10_fwd_dct32x32_impl_sse2.h" // NOLINT
+#include "av1/common/x86/vp10_fwd_dct32x32_impl_sse2.h" // NOLINT
#undef FDCT32x32_2D
#undef FDCT32x32_HIGH_PRECISION
#define FDCT32x32_2D vp10_highbd_fdct32x32_sse2
#define FDCT32x32_HIGH_PRECISION 1
-#include "vp10/common/x86/vp10_fwd_dct32x32_impl_sse2.h" // NOLINT
+#include "av1/common/x86/vp10_fwd_dct32x32_impl_sse2.h" // NOLINT
#undef FDCT32x32_2D
#undef FDCT32x32_HIGH_PRECISION
#undef DCT_HIGH_BIT_DEPTH
diff --git a/vp10/common/x86/vp10_inv_txfm_sse2.c b/av1/common/x86/vp10_inv_txfm_sse2.c
similarity index 99%
rename from vp10/common/x86/vp10_inv_txfm_sse2.c
rename to av1/common/x86/vp10_inv_txfm_sse2.c
index c200392..9abaa64 100644
--- a/vp10/common/x86/vp10_inv_txfm_sse2.c
+++ b/av1/common/x86/vp10_inv_txfm_sse2.c
@@ -9,8 +9,8 @@
*/
#include "./vp10_rtcd.h"
-#include "vp10/common/x86/vp10_inv_txfm_sse2.h"
-#include "vpx_dsp/x86/txfm_common_sse2.h"
+#include "av1/common/x86/vp10_inv_txfm_sse2.h"
+#include "aom_dsp/x86/txfm_common_sse2.h"
#define RECON_AND_STORE4X4(dest, in_x) \
{ \
diff --git a/vp10/common/x86/vp10_inv_txfm_sse2.h b/av1/common/x86/vp10_inv_txfm_sse2.h
similarity index 98%
rename from vp10/common/x86/vp10_inv_txfm_sse2.h
rename to av1/common/x86/vp10_inv_txfm_sse2.h
index 9d8c46b..0839ab9 100644
--- a/vp10/common/x86/vp10_inv_txfm_sse2.h
+++ b/av1/common/x86/vp10_inv_txfm_sse2.h
@@ -13,8 +13,8 @@
#include <emmintrin.h> // SSE2
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
-#include "vp10/common/vp10_inv_txfm.h"
+#include "aom/vpx_integer.h"
+#include "av1/common/vp10_inv_txfm.h"
// perform 8x8 transpose
static INLINE void array_transpose_8x8(__m128i *in, __m128i *res) {
diff --git a/vp10/decoder/decodeframe.c b/av1/decoder/decodeframe.c
similarity index 98%
rename from vp10/decoder/decodeframe.c
rename to av1/decoder/decodeframe.c
index c9c0676..0c44d42 100644
--- a/vp10/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -16,39 +16,39 @@
#include "./vpx_scale_rtcd.h"
#include "./vpx_config.h"
-#include "vpx_dsp/bitreader_buffer.h"
-#include "vpx_dsp/bitreader.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/mem_ops.h"
-#include "vpx_scale/vpx_scale.h"
-#include "vpx_util/vpx_thread.h"
+#include "aom_dsp/bitreader_buffer.h"
+#include "aom_dsp/bitreader.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/mem_ops.h"
+#include "aom_scale/vpx_scale.h"
+#include "aom_util/vpx_thread.h"
-#include "vp10/common/alloccommon.h"
+#include "av1/common/alloccommon.h"
#if CONFIG_CLPF
-#include "vp10/common/clpf.h"
+#include "av1/common/clpf.h"
#endif
-#include "vp10/common/common.h"
+#include "av1/common/common.h"
#if CONFIG_DERING
-#include "vp10/common/dering.h"
+#include "av1/common/dering.h"
#endif // CONFIG_DERING
-#include "vp10/common/entropy.h"
-#include "vp10/common/entropymode.h"
-#include "vp10/common/idct.h"
-#include "vp10/common/thread_common.h"
-#include "vp10/common/pred_common.h"
-#include "vp10/common/quant_common.h"
-#include "vp10/common/reconintra.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/common/seg_common.h"
-#include "vp10/common/tile_common.h"
+#include "av1/common/entropy.h"
+#include "av1/common/entropymode.h"
+#include "av1/common/idct.h"
+#include "av1/common/thread_common.h"
+#include "av1/common/pred_common.h"
+#include "av1/common/quant_common.h"
+#include "av1/common/reconintra.h"
+#include "av1/common/reconinter.h"
+#include "av1/common/seg_common.h"
+#include "av1/common/tile_common.h"
-#include "vp10/decoder/decodeframe.h"
-#include "vp10/decoder/detokenize.h"
-#include "vp10/decoder/decodemv.h"
-#include "vp10/decoder/decoder.h"
-#include "vp10/decoder/dsubexp.h"
+#include "av1/decoder/decodeframe.h"
+#include "av1/decoder/detokenize.h"
+#include "av1/decoder/decodemv.h"
+#include "av1/decoder/decoder.h"
+#include "av1/decoder/dsubexp.h"
#define MAX_VP10_HEADER_SIZE 80
diff --git a/vp10/decoder/decodeframe.h b/av1/decoder/decodeframe.h
similarity index 100%
rename from vp10/decoder/decodeframe.h
rename to av1/decoder/decodeframe.h
diff --git a/vp10/decoder/decodemv.c b/av1/decoder/decodemv.c
similarity index 98%
rename from vp10/decoder/decodemv.c
rename to av1/decoder/decodemv.c
index 68a0c79b..eade851 100644
--- a/vp10/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -10,19 +10,19 @@
#include <assert.h>
-#include "vp10/common/common.h"
-#include "vp10/common/entropy.h"
-#include "vp10/common/entropymode.h"
-#include "vp10/common/entropymv.h"
-#include "vp10/common/mvref_common.h"
-#include "vp10/common/pred_common.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/common/seg_common.h"
+#include "av1/common/common.h"
+#include "av1/common/entropy.h"
+#include "av1/common/entropymode.h"
+#include "av1/common/entropymv.h"
+#include "av1/common/mvref_common.h"
+#include "av1/common/pred_common.h"
+#include "av1/common/reconinter.h"
+#include "av1/common/seg_common.h"
-#include "vp10/decoder/decodemv.h"
-#include "vp10/decoder/decodeframe.h"
+#include "av1/decoder/decodemv.h"
+#include "av1/decoder/decodeframe.h"
-#include "vpx_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_dsp_common.h"
static PREDICTION_MODE read_intra_mode(vpx_reader *r, const vpx_prob *p) {
return (PREDICTION_MODE)vpx_read_tree(r, vp10_intra_mode_tree, p);
diff --git a/vp10/decoder/decodemv.h b/av1/decoder/decodemv.h
similarity index 91%
rename from vp10/decoder/decodemv.h
rename to av1/decoder/decodemv.h
index f7bc738..0962f97 100644
--- a/vp10/decoder/decodemv.h
+++ b/av1/decoder/decodemv.h
@@ -11,9 +11,9 @@
#ifndef VP10_DECODER_DECODEMV_H_
#define VP10_DECODER_DECODEMV_H_
-#include "vpx_dsp/bitreader.h"
+#include "aom_dsp/bitreader.h"
-#include "vp10/decoder/decoder.h"
+#include "av1/decoder/decoder.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/decoder/decoder.c b/av1/decoder/decoder.c
similarity index 96%
rename from vp10/decoder/decoder.c
rename to av1/decoder/decoder.c
index 438c2da..644dac0 100644
--- a/vp10/decoder/decoder.c
+++ b/av1/decoder/decoder.c
@@ -16,22 +16,22 @@
#include "./vpx_dsp_rtcd.h"
#include "./vpx_scale_rtcd.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/system_state.h"
-#include "vpx_ports/vpx_once.h"
-#include "vpx_ports/vpx_timer.h"
-#include "vpx_scale/vpx_scale.h"
-#include "vpx_util/vpx_thread.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/system_state.h"
+#include "aom_ports/vpx_once.h"
+#include "aom_ports/vpx_timer.h"
+#include "aom_scale/vpx_scale.h"
+#include "aom_util/vpx_thread.h"
-#include "vp10/common/alloccommon.h"
-#include "vp10/common/loopfilter.h"
-#include "vp10/common/onyxc_int.h"
-#include "vp10/common/quant_common.h"
-#include "vp10/common/reconintra.h"
+#include "av1/common/alloccommon.h"
+#include "av1/common/loopfilter.h"
+#include "av1/common/onyxc_int.h"
+#include "av1/common/quant_common.h"
+#include "av1/common/reconintra.h"
-#include "vp10/decoder/decodeframe.h"
-#include "vp10/decoder/decoder.h"
-#include "vp10/decoder/detokenize.h"
+#include "av1/decoder/decodeframe.h"
+#include "av1/decoder/decoder.h"
+#include "av1/decoder/detokenize.h"
static void initialize_dec(void) {
static volatile int init_done = 0;
diff --git a/vp10/decoder/decoder.h b/av1/decoder/decoder.h
similarity index 94%
rename from vp10/decoder/decoder.h
rename to av1/decoder/decoder.h
index 45d4f3d..d03d4d0 100644
--- a/vp10/decoder/decoder.h
+++ b/av1/decoder/decoder.h
@@ -13,14 +13,14 @@
#include "./vpx_config.h"
-#include "vpx/vpx_codec.h"
-#include "vpx_dsp/bitreader.h"
-#include "vpx_scale/yv12config.h"
-#include "vpx_util/vpx_thread.h"
+#include "aom/vpx_codec.h"
+#include "aom_dsp/bitreader.h"
+#include "aom_scale/yv12config.h"
+#include "aom_util/vpx_thread.h"
-#include "vp10/common/thread_common.h"
-#include "vp10/common/onyxc_int.h"
-#include "vp10/decoder/dthread.h"
+#include "av1/common/thread_common.h"
+#include "av1/common/onyxc_int.h"
+#include "av1/decoder/dthread.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/decoder/detokenize.c b/av1/decoder/detokenize.c
similarity index 97%
rename from vp10/decoder/detokenize.c
rename to av1/decoder/detokenize.c
index d4da4bb..3fab40f 100644
--- a/vp10/decoder/detokenize.c
+++ b/av1/decoder/detokenize.c
@@ -8,17 +8,17 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
-#include "vp10/common/blockd.h"
-#include "vp10/common/common.h"
-#include "vp10/common/entropy.h"
+#include "av1/common/blockd.h"
+#include "av1/common/common.h"
+#include "av1/common/entropy.h"
#if CONFIG_COEFFICIENT_RANGE_CHECKING
-#include "vp10/common/idct.h"
+#include "av1/common/idct.h"
#endif
-#include "vp10/decoder/detokenize.h"
+#include "av1/decoder/detokenize.h"
#define EOB_CONTEXT_NODE 0
#define ZERO_CONTEXT_NODE 1
diff --git a/vp10/decoder/detokenize.h b/av1/decoder/detokenize.h
similarity index 89%
rename from vp10/decoder/detokenize.h
rename to av1/decoder/detokenize.h
index d7b459d..9a21438 100644
--- a/vp10/decoder/detokenize.h
+++ b/av1/decoder/detokenize.h
@@ -11,9 +11,9 @@
#ifndef VP10_DECODER_DETOKENIZE_H_
#define VP10_DECODER_DETOKENIZE_H_
-#include "vpx_dsp/bitreader.h"
-#include "vp10/decoder/decoder.h"
-#include "vp10/common/scan.h"
+#include "aom_dsp/bitreader.h"
+#include "av1/decoder/decoder.h"
+#include "av1/common/scan.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/decoder/dsubexp.c b/av1/decoder/dsubexp.c
similarity index 97%
rename from vp10/decoder/dsubexp.c
rename to av1/decoder/dsubexp.c
index 4e1ccc0..bb0ed7f 100644
--- a/vp10/decoder/dsubexp.c
+++ b/av1/decoder/dsubexp.c
@@ -10,9 +10,9 @@
#include <assert.h>
-#include "vp10/common/entropy.h"
+#include "av1/common/entropy.h"
-#include "vp10/decoder/dsubexp.h"
+#include "av1/decoder/dsubexp.h"
static int inv_recenter_nonneg(int v, int m) {
if (v > 2 * m) return v;
diff --git a/vp10/decoder/dsubexp.h b/av1/decoder/dsubexp.h
similarity index 95%
rename from vp10/decoder/dsubexp.h
rename to av1/decoder/dsubexp.h
index 8d47df4..52bcb84 100644
--- a/vp10/decoder/dsubexp.h
+++ b/av1/decoder/dsubexp.h
@@ -11,7 +11,7 @@
#ifndef VP10_DECODER_DSUBEXP_H_
#define VP10_DECODER_DSUBEXP_H_
-#include "vpx_dsp/bitreader.h"
+#include "aom_dsp/bitreader.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/decoder/dthread.c b/av1/decoder/dthread.c
similarity index 97%
rename from vp10/decoder/dthread.c
rename to av1/decoder/dthread.c
index 4dbcfbc..76209ac 100644
--- a/vp10/decoder/dthread.c
+++ b/av1/decoder/dthread.c
@@ -9,10 +9,10 @@
*/
#include "./vpx_config.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/decoder/dthread.h"
-#include "vp10/decoder/decoder.h"
+#include "aom_mem/vpx_mem.h"
+#include "av1/common/reconinter.h"
+#include "av1/decoder/dthread.h"
+#include "av1/decoder/decoder.h"
// #define DEBUG_THREAD
diff --git a/vp10/decoder/dthread.h b/av1/decoder/dthread.h
similarity index 96%
rename from vp10/decoder/dthread.h
rename to av1/decoder/dthread.h
index cb78462..ef548b6 100644
--- a/vp10/decoder/dthread.h
+++ b/av1/decoder/dthread.h
@@ -12,8 +12,8 @@
#define VP10_DECODER_DTHREAD_H_
#include "./vpx_config.h"
-#include "vpx_util/vpx_thread.h"
-#include "vpx/internal/vpx_codec_internal.h"
+#include "aom_util/vpx_thread.h"
+#include "aom/internal/vpx_codec_internal.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/aq_complexity.c b/av1/encoder/aq_complexity.c
similarity index 95%
rename from vp10/encoder/aq_complexity.c
rename to av1/encoder/aq_complexity.c
index 912babc..14e3da1 100644
--- a/vp10/encoder/aq_complexity.c
+++ b/av1/encoder/aq_complexity.c
@@ -11,13 +11,13 @@
#include <limits.h>
#include <math.h>
-#include "vp10/encoder/aq_complexity.h"
-#include "vp10/encoder/aq_variance.h"
-#include "vp10/encoder/encodeframe.h"
-#include "vp10/common/seg_common.h"
-#include "vp10/encoder/segmentation.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/system_state.h"
+#include "av1/encoder/aq_complexity.h"
+#include "av1/encoder/aq_variance.h"
+#include "av1/encoder/encodeframe.h"
+#include "av1/common/seg_common.h"
+#include "av1/encoder/segmentation.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/system_state.h"
#define AQ_C_SEGMENTS 5
#define DEFAULT_AQ2_SEG 3 // Neutral Q segment
diff --git a/vp10/encoder/aq_complexity.h b/av1/encoder/aq_complexity.h
similarity index 96%
rename from vp10/encoder/aq_complexity.h
rename to av1/encoder/aq_complexity.h
index 5ed461b..db85406 100644
--- a/vp10/encoder/aq_complexity.h
+++ b/av1/encoder/aq_complexity.h
@@ -15,7 +15,7 @@
extern "C" {
#endif
-#include "vp10/common/enums.h"
+#include "av1/common/enums.h"
struct VP10_COMP;
struct macroblock;
diff --git a/vp10/encoder/aq_cyclicrefresh.c b/av1/encoder/aq_cyclicrefresh.c
similarity index 98%
rename from vp10/encoder/aq_cyclicrefresh.c
rename to av1/encoder/aq_cyclicrefresh.c
index 8413528..40391cb 100644
--- a/vp10/encoder/aq_cyclicrefresh.c
+++ b/av1/encoder/aq_cyclicrefresh.c
@@ -11,12 +11,12 @@
#include <limits.h>
#include <math.h>
-#include "vp10/common/seg_common.h"
-#include "vp10/encoder/aq_cyclicrefresh.h"
-#include "vp10/encoder/ratectrl.h"
-#include "vp10/encoder/segmentation.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/system_state.h"
+#include "av1/common/seg_common.h"
+#include "av1/encoder/aq_cyclicrefresh.h"
+#include "av1/encoder/ratectrl.h"
+#include "av1/encoder/segmentation.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/system_state.h"
struct CYCLIC_REFRESH {
// Percentage of blocks per frame that are targeted as candidates
diff --git a/vp10/encoder/aq_cyclicrefresh.h b/av1/encoder/aq_cyclicrefresh.h
similarity index 98%
rename from vp10/encoder/aq_cyclicrefresh.h
rename to av1/encoder/aq_cyclicrefresh.h
index 649d714..24491fc 100644
--- a/vp10/encoder/aq_cyclicrefresh.h
+++ b/av1/encoder/aq_cyclicrefresh.h
@@ -11,7 +11,7 @@
#ifndef VP10_ENCODER_AQ_CYCLICREFRESH_H_
#define VP10_ENCODER_AQ_CYCLICREFRESH_H_
-#include "vp10/common/blockd.h"
+#include "av1/common/blockd.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/aq_variance.c b/av1/encoder/aq_variance.c
similarity index 96%
rename from vp10/encoder/aq_variance.c
rename to av1/encoder/aq_variance.c
index 520640a..85a43db 100644
--- a/vp10/encoder/aq_variance.c
+++ b/av1/encoder/aq_variance.c
@@ -10,15 +10,15 @@
#include <math.h>
-#include "vpx_ports/mem.h"
+#include "aom_ports/mem.h"
-#include "vp10/encoder/aq_variance.h"
+#include "av1/encoder/aq_variance.h"
-#include "vp10/common/seg_common.h"
-#include "vp10/encoder/ratectrl.h"
-#include "vp10/encoder/rd.h"
-#include "vp10/encoder/segmentation.h"
-#include "vpx_ports/system_state.h"
+#include "av1/common/seg_common.h"
+#include "av1/encoder/ratectrl.h"
+#include "av1/encoder/rd.h"
+#include "av1/encoder/segmentation.h"
+#include "aom_ports/system_state.h"
#define ENERGY_MIN (-4)
#define ENERGY_MAX (1)
diff --git a/vp10/encoder/aq_variance.h b/av1/encoder/aq_variance.h
similarity index 95%
rename from vp10/encoder/aq_variance.h
rename to av1/encoder/aq_variance.h
index cfb5b86..a30a449 100644
--- a/vp10/encoder/aq_variance.h
+++ b/av1/encoder/aq_variance.h
@@ -11,7 +11,7 @@
#ifndef VP10_ENCODER_AQ_VARIANCE_H_
#define VP10_ENCODER_AQ_VARIANCE_H_
-#include "vp10/encoder/encoder.h"
+#include "av1/encoder/encoder.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/arm/neon/dct_neon.c b/av1/encoder/arm/neon/dct_neon.c
similarity index 94%
rename from vp10/encoder/arm/neon/dct_neon.c
rename to av1/encoder/arm/neon/dct_neon.c
index e83853f..f9b9cb8 100644
--- a/vp10/encoder/arm/neon/dct_neon.c
+++ b/av1/encoder/arm/neon/dct_neon.c
@@ -14,8 +14,8 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vp10/common/blockd.h"
-#include "vpx_dsp/txfm_common.h"
+#include "av1/common/blockd.h"
+#include "aom_dsp/txfm_common.h"
void vp10_fdct8x8_quant_neon(
const int16_t* input, int stride, int16_t* coeff_ptr, intptr_t n_coeffs,
diff --git a/vp10/encoder/arm/neon/error_neon.c b/av1/encoder/arm/neon/error_neon.c
similarity index 100%
rename from vp10/encoder/arm/neon/error_neon.c
rename to av1/encoder/arm/neon/error_neon.c
diff --git a/vp10/encoder/arm/neon/quantize_neon.c b/av1/encoder/arm/neon/quantize_neon.c
similarity index 95%
rename from vp10/encoder/arm/neon/quantize_neon.c
rename to av1/encoder/arm/neon/quantize_neon.c
index 7b8e447..db85b4d 100644
--- a/vp10/encoder/arm/neon/quantize_neon.c
+++ b/av1/encoder/arm/neon/quantize_neon.c
@@ -12,14 +12,14 @@
#include <math.h>
-#include "vpx_mem/vpx_mem.h"
+#include "aom_mem/vpx_mem.h"
-#include "vp10/common/quant_common.h"
-#include "vp10/common/seg_common.h"
+#include "av1/common/quant_common.h"
+#include "av1/common/seg_common.h"
-#include "vp10/encoder/encoder.h"
-#include "vp10/encoder/quantize.h"
-#include "vp10/encoder/rd.h"
+#include "av1/encoder/encoder.h"
+#include "av1/encoder/quantize.h"
+#include "av1/encoder/rd.h"
void vp10_quantize_fp_neon(const int16_t *coeff_ptr, intptr_t count,
int skip_block, const int16_t *zbin_ptr,
diff --git a/vp10/encoder/bitstream.c b/av1/encoder/bitstream.c
similarity index 98%
rename from vp10/encoder/bitstream.c
rename to av1/encoder/bitstream.c
index c03a10f..49ba305 100644
--- a/vp10/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -12,34 +12,34 @@
#include <stdio.h>
#include <limits.h>
-#include "vpx/vpx_encoder.h"
-#include "vpx_dsp/bitwriter_buffer.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem_ops.h"
-#include "vpx_ports/system_state.h"
+#include "aom/vpx_encoder.h"
+#include "aom_dsp/bitwriter_buffer.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem_ops.h"
+#include "aom_ports/system_state.h"
#if CONFIG_CLPF
-#include "vp10/common/clpf.h"
+#include "av1/common/clpf.h"
#endif
#if CONFIG_DERING
-#include "vp10/common/dering.h"
+#include "av1/common/dering.h"
#endif // CONFIG_DERING
-#include "vp10/common/entropy.h"
-#include "vp10/common/entropymode.h"
-#include "vp10/common/entropymv.h"
-#include "vp10/common/mvref_common.h"
-#include "vp10/common/pred_common.h"
-#include "vp10/common/seg_common.h"
-#include "vp10/common/tile_common.h"
+#include "av1/common/entropy.h"
+#include "av1/common/entropymode.h"
+#include "av1/common/entropymv.h"
+#include "av1/common/mvref_common.h"
+#include "av1/common/pred_common.h"
+#include "av1/common/seg_common.h"
+#include "av1/common/tile_common.h"
-#include "vp10/encoder/cost.h"
-#include "vp10/encoder/bitstream.h"
-#include "vp10/encoder/encodemv.h"
-#include "vp10/encoder/mcomp.h"
-#include "vp10/encoder/segmentation.h"
-#include "vp10/encoder/subexp.h"
-#include "vp10/encoder/tokenize.h"
+#include "av1/encoder/cost.h"
+#include "av1/encoder/bitstream.h"
+#include "av1/encoder/encodemv.h"
+#include "av1/encoder/mcomp.h"
+#include "av1/encoder/segmentation.h"
+#include "av1/encoder/subexp.h"
+#include "av1/encoder/tokenize.h"
static const struct vp10_token intra_mode_encodings[INTRA_MODES] = {
{ 0, 1 }, { 6, 3 }, { 28, 5 }, { 30, 5 }, { 58, 6 },
diff --git a/vp10/encoder/bitstream.h b/av1/encoder/bitstream.h
similarity index 95%
rename from vp10/encoder/bitstream.h
rename to av1/encoder/bitstream.h
index ab692e8..4d50071 100644
--- a/vp10/encoder/bitstream.h
+++ b/av1/encoder/bitstream.h
@@ -15,7 +15,7 @@
extern "C" {
#endif
-#include "vp10/encoder/encoder.h"
+#include "av1/encoder/encoder.h"
void vp10_encode_token_init();
void vp10_pack_bitstream(VP10_COMP *const cpi, uint8_t *dest, size_t *size);
diff --git a/vp10/encoder/block.h b/av1/encoder/block.h
similarity index 97%
rename from vp10/encoder/block.h
rename to av1/encoder/block.h
index 00181ad..53b7b80 100644
--- a/vp10/encoder/block.h
+++ b/av1/encoder/block.h
@@ -11,8 +11,8 @@
#ifndef VP10_ENCODER_BLOCK_H_
#define VP10_ENCODER_BLOCK_H_
-#include "vp10/common/entropymv.h"
-#include "vp10/common/entropy.h"
+#include "av1/common/entropymv.h"
+#include "av1/common/entropy.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/blockiness.c b/av1/encoder/blockiness.c
similarity index 94%
rename from vp10/encoder/blockiness.c
rename to av1/encoder/blockiness.c
index c57e4ef..97e201a 100644
--- a/vp10/encoder/blockiness.c
+++ b/av1/encoder/blockiness.c
@@ -11,13 +11,13 @@
#include "./vp10_rtcd.h"
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vp10/common/common.h"
-#include "vp10/common/filter.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/vpx_convolve.h"
-#include "vpx_dsp/vpx_filter.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/system_state.h"
+#include "av1/common/common.h"
+#include "av1/common/filter.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/vpx_convolve.h"
+#include "aom_dsp/vpx_filter.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/system_state.h"
static int horizontal_filter(const uint8_t *s) {
return (s[1] - s[-2]) * 2 + (s[-1] - s[0]) * 6;
diff --git a/vp10/encoder/context_tree.c b/av1/encoder/context_tree.c
similarity index 98%
rename from vp10/encoder/context_tree.c
rename to av1/encoder/context_tree.c
index 07ae254..5b762f1 100644
--- a/vp10/encoder/context_tree.c
+++ b/av1/encoder/context_tree.c
@@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vp10/encoder/context_tree.h"
-#include "vp10/encoder/encoder.h"
+#include "av1/encoder/context_tree.h"
+#include "av1/encoder/encoder.h"
static const BLOCK_SIZE square[] = {
BLOCK_8X8, BLOCK_16X16, BLOCK_32X32, BLOCK_64X64,
diff --git a/vp10/encoder/context_tree.h b/av1/encoder/context_tree.h
similarity index 97%
rename from vp10/encoder/context_tree.h
rename to av1/encoder/context_tree.h
index 0983133..5e74a0a 100644
--- a/vp10/encoder/context_tree.h
+++ b/av1/encoder/context_tree.h
@@ -11,8 +11,8 @@
#ifndef VP10_ENCODER_CONTEXT_TREE_H_
#define VP10_ENCODER_CONTEXT_TREE_H_
-#include "vp10/common/blockd.h"
-#include "vp10/encoder/block.h"
+#include "av1/common/blockd.h"
+#include "av1/encoder/block.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/cost.c b/av1/encoder/cost.c
similarity index 98%
rename from vp10/encoder/cost.c
rename to av1/encoder/cost.c
index 66d4078..e934a73 100644
--- a/vp10/encoder/cost.c
+++ b/av1/encoder/cost.c
@@ -9,7 +9,7 @@
*/
#include <assert.h>
-#include "vp10/encoder/cost.h"
+#include "av1/encoder/cost.h"
/* round(-log2(i/256.) * (1 << VP9_PROB_COST_SHIFT))
Begins and ends with a bogus entry to satisfy use of prob=0 in the firstpass.
diff --git a/vp10/encoder/cost.h b/av1/encoder/cost.h
similarity index 96%
rename from vp10/encoder/cost.h
rename to av1/encoder/cost.h
index 17c32a2..e8f0e63 100644
--- a/vp10/encoder/cost.h
+++ b/av1/encoder/cost.h
@@ -11,8 +11,8 @@
#ifndef VP10_ENCODER_COST_H_
#define VP10_ENCODER_COST_H_
-#include "vpx_dsp/prob.h"
-#include "vpx/vpx_integer.h"
+#include "aom_dsp/prob.h"
+#include "aom/vpx_integer.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/dct.c b/av1/encoder/dct.c
similarity index 99%
rename from vp10/encoder/dct.c
rename to av1/encoder/dct.c
index 300a742..0302291 100644
--- a/vp10/encoder/dct.c
+++ b/av1/encoder/dct.c
@@ -15,10 +15,10 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vp10/common/blockd.h"
-#include "vp10/common/idct.h"
-#include "vpx_dsp/fwd_txfm.h"
-#include "vpx_ports/mem.h"
+#include "av1/common/blockd.h"
+#include "av1/common/idct.h"
+#include "aom_dsp/fwd_txfm.h"
+#include "aom_ports/mem.h"
static INLINE void range_check(const tran_low_t *input, const int size,
const int bit) {
diff --git a/vp10/encoder/encodeframe.c b/av1/encoder/encodeframe.c
similarity index 98%
rename from vp10/encoder/encodeframe.c
rename to av1/encoder/encodeframe.c
index f9fa104..9805944 100644
--- a/vp10/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -16,35 +16,35 @@
#include "./vpx_dsp_rtcd.h"
#include "./vpx_config.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/vpx_timer.h"
-#include "vpx_ports/system_state.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/vpx_timer.h"
+#include "aom_ports/system_state.h"
-#include "vp10/common/common.h"
-#include "vp10/common/entropy.h"
-#include "vp10/common/entropymode.h"
-#include "vp10/common/idct.h"
-#include "vp10/common/mvref_common.h"
-#include "vp10/common/pred_common.h"
-#include "vp10/common/quant_common.h"
-#include "vp10/common/reconintra.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/common/seg_common.h"
-#include "vp10/common/tile_common.h"
+#include "av1/common/common.h"
+#include "av1/common/entropy.h"
+#include "av1/common/entropymode.h"
+#include "av1/common/idct.h"
+#include "av1/common/mvref_common.h"
+#include "av1/common/pred_common.h"
+#include "av1/common/quant_common.h"
+#include "av1/common/reconintra.h"
+#include "av1/common/reconinter.h"
+#include "av1/common/seg_common.h"
+#include "av1/common/tile_common.h"
-#include "vp10/encoder/aq_complexity.h"
-#include "vp10/encoder/aq_cyclicrefresh.h"
-#include "vp10/encoder/aq_variance.h"
-#include "vp10/encoder/encodeframe.h"
-#include "vp10/encoder/encodemb.h"
-#include "vp10/encoder/encodemv.h"
-#include "vp10/encoder/ethread.h"
-#include "vp10/encoder/extend.h"
-#include "vp10/encoder/rd.h"
-#include "vp10/encoder/rdopt.h"
-#include "vp10/encoder/segmentation.h"
-#include "vp10/encoder/tokenize.h"
+#include "av1/encoder/aq_complexity.h"
+#include "av1/encoder/aq_cyclicrefresh.h"
+#include "av1/encoder/aq_variance.h"
+#include "av1/encoder/encodeframe.h"
+#include "av1/encoder/encodemb.h"
+#include "av1/encoder/encodemv.h"
+#include "av1/encoder/ethread.h"
+#include "av1/encoder/extend.h"
+#include "av1/encoder/rd.h"
+#include "av1/encoder/rdopt.h"
+#include "av1/encoder/segmentation.h"
+#include "av1/encoder/tokenize.h"
static void encode_superblock(VP10_COMP *cpi, ThreadData *td, TOKENEXTRA **t,
int output_enabled, int mi_row, int mi_col,
diff --git a/vp10/encoder/encodeframe.h b/av1/encoder/encodeframe.h
similarity index 97%
rename from vp10/encoder/encodeframe.h
rename to av1/encoder/encodeframe.h
index f24a572..338cb86 100644
--- a/vp10/encoder/encodeframe.h
+++ b/av1/encoder/encodeframe.h
@@ -11,7 +11,7 @@
#ifndef VP10_ENCODER_ENCODEFRAME_H_
#define VP10_ENCODER_ENCODEFRAME_H_
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/encodemb.c b/av1/encoder/encodemb.c
similarity index 98%
rename from vp10/encoder/encodemb.c
rename to av1/encoder/encodemb.c
index ba58e81..853629a 100644
--- a/vp10/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -12,18 +12,18 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/quantize.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/quantize.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
-#include "vp10/common/idct.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/common/reconintra.h"
-#include "vp10/common/scan.h"
+#include "av1/common/idct.h"
+#include "av1/common/reconinter.h"
+#include "av1/common/reconintra.h"
+#include "av1/common/scan.h"
-#include "vp10/encoder/encodemb.h"
-#include "vp10/encoder/rd.h"
-#include "vp10/encoder/tokenize.h"
+#include "av1/encoder/encodemb.h"
+#include "av1/encoder/rd.h"
+#include "av1/encoder/tokenize.h"
struct optimize_ctx {
ENTROPY_CONTEXT ta[MAX_MB_PLANE][16];
diff --git a/vp10/encoder/encodemb.h b/av1/encoder/encodemb.h
similarity index 98%
rename from vp10/encoder/encodemb.h
rename to av1/encoder/encodemb.h
index 4d1c826..2faec3d 100644
--- a/vp10/encoder/encodemb.h
+++ b/av1/encoder/encodemb.h
@@ -12,7 +12,7 @@
#define VP10_ENCODER_ENCODEMB_H_
#include "./vpx_config.h"
-#include "vp10/encoder/block.h"
+#include "av1/encoder/block.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/encodemv.c b/av1/encoder/encodemv.c
similarity index 97%
rename from vp10/encoder/encodemv.c
rename to av1/encoder/encodemv.c
index ef670f5..41f4049 100644
--- a/vp10/encoder/encodemv.c
+++ b/av1/encoder/encodemv.c
@@ -10,14 +10,14 @@
#include <math.h>
-#include "vp10/common/common.h"
-#include "vp10/common/entropymode.h"
+#include "av1/common/common.h"
+#include "av1/common/entropymode.h"
-#include "vp10/encoder/cost.h"
-#include "vp10/encoder/encodemv.h"
-#include "vp10/encoder/subexp.h"
+#include "av1/encoder/cost.h"
+#include "av1/encoder/encodemv.h"
+#include "av1/encoder/subexp.h"
-#include "vpx_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_dsp_common.h"
static struct vp10_token mv_joint_encodings[MV_JOINTS];
static struct vp10_token mv_class_encodings[MV_CLASSES];
diff --git a/vp10/encoder/encodemv.h b/av1/encoder/encodemv.h
similarity index 96%
rename from vp10/encoder/encodemv.h
rename to av1/encoder/encodemv.h
index 6187488..dfcfffc 100644
--- a/vp10/encoder/encodemv.h
+++ b/av1/encoder/encodemv.h
@@ -11,7 +11,7 @@
#ifndef VP10_ENCODER_ENCODEMV_H_
#define VP10_ENCODER_ENCODEMV_H_
-#include "vp10/encoder/encoder.h"
+#include "av1/encoder/encoder.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/encoder.c b/av1/encoder/encoder.c
similarity index 98%
rename from vp10/encoder/encoder.c
rename to av1/encoder/encoder.c
index a7dd1d7..107345a 100644
--- a/vp10/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -14,52 +14,52 @@
#include "./vpx_config.h"
-#include "vp10/common/alloccommon.h"
+#include "av1/common/alloccommon.h"
#if CONFIG_CLPF
-#include "vp10/common/clpf.h"
+#include "av1/common/clpf.h"
#endif
#if CONFIG_DERING
-#include "vp10/common/dering.h"
+#include "av1/common/dering.h"
#endif // CONFIG_DERING
-#include "vp10/common/filter.h"
-#include "vp10/common/idct.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/common/reconintra.h"
-#include "vp10/common/tile_common.h"
+#include "av1/common/filter.h"
+#include "av1/common/idct.h"
+#include "av1/common/reconinter.h"
+#include "av1/common/reconintra.h"
+#include "av1/common/tile_common.h"
-#include "vp10/encoder/aq_complexity.h"
-#include "vp10/encoder/aq_cyclicrefresh.h"
-#include "vp10/encoder/aq_variance.h"
-#include "vp10/encoder/bitstream.h"
-#include "vp10/encoder/context_tree.h"
-#include "vp10/encoder/encodeframe.h"
-#include "vp10/encoder/encodemv.h"
-#include "vp10/encoder/encoder.h"
-#include "vp10/encoder/ethread.h"
-#include "vp10/encoder/firstpass.h"
-#include "vp10/encoder/mbgraph.h"
-#include "vp10/encoder/picklpf.h"
-#include "vp10/encoder/ratectrl.h"
-#include "vp10/encoder/rd.h"
-#include "vp10/encoder/resize.h"
-#include "vp10/encoder/segmentation.h"
-#include "vp10/encoder/skin_detection.h"
-#include "vp10/encoder/speed_features.h"
-#include "vp10/encoder/temporal_filter.h"
+#include "av1/encoder/aq_complexity.h"
+#include "av1/encoder/aq_cyclicrefresh.h"
+#include "av1/encoder/aq_variance.h"
+#include "av1/encoder/bitstream.h"
+#include "av1/encoder/context_tree.h"
+#include "av1/encoder/encodeframe.h"
+#include "av1/encoder/encodemv.h"
+#include "av1/encoder/encoder.h"
+#include "av1/encoder/ethread.h"
+#include "av1/encoder/firstpass.h"
+#include "av1/encoder/mbgraph.h"
+#include "av1/encoder/picklpf.h"
+#include "av1/encoder/ratectrl.h"
+#include "av1/encoder/rd.h"
+#include "av1/encoder/resize.h"
+#include "av1/encoder/segmentation.h"
+#include "av1/encoder/skin_detection.h"
+#include "av1/encoder/speed_features.h"
+#include "av1/encoder/temporal_filter.h"
#include "./vp10_rtcd.h"
#include "./vpx_dsp_rtcd.h"
#include "./vpx_scale_rtcd.h"
-#include "vpx/internal/vpx_psnr.h"
+#include "aom/internal/vpx_psnr.h"
#if CONFIG_INTERNAL_STATS
-#include "vpx_dsp/ssim.h"
+#include "aom_dsp/ssim.h"
#endif
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_dsp/vpx_filter.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/system_state.h"
-#include "vpx_ports/vpx_timer.h"
-#include "vpx_scale/vpx_scale.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_filter.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/system_state.h"
+#include "aom_ports/vpx_timer.h"
+#include "aom_scale/vpx_scale.h"
#define AM_SEGMENT_ID_INACTIVE 7
#define AM_SEGMENT_ID_ACTIVE 0
diff --git a/vp10/encoder/encoder.h b/av1/encoder/encoder.h
similarity index 95%
rename from vp10/encoder/encoder.h
rename to av1/encoder/encoder.h
index 62b261b..181e243 100644
--- a/vp10/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -14,32 +14,32 @@
#include <stdio.h>
#include "./vpx_config.h"
-#include "vpx/vp8cx.h"
+#include "aom/vp8cx.h"
-#include "vp10/common/alloccommon.h"
-#include "vp10/common/entropymode.h"
-#include "vp10/common/thread_common.h"
-#include "vp10/common/onyxc_int.h"
+#include "av1/common/alloccommon.h"
+#include "av1/common/entropymode.h"
+#include "av1/common/thread_common.h"
+#include "av1/common/onyxc_int.h"
-#include "vp10/encoder/aq_cyclicrefresh.h"
-#include "vp10/encoder/context_tree.h"
-#include "vp10/encoder/encodemb.h"
-#include "vp10/encoder/firstpass.h"
-#include "vp10/encoder/lookahead.h"
-#include "vp10/encoder/mbgraph.h"
-#include "vp10/encoder/mcomp.h"
-#include "vp10/encoder/quantize.h"
-#include "vp10/encoder/ratectrl.h"
-#include "vp10/encoder/rd.h"
-#include "vp10/encoder/speed_features.h"
-#include "vp10/encoder/tokenize.h"
+#include "av1/encoder/aq_cyclicrefresh.h"
+#include "av1/encoder/context_tree.h"
+#include "av1/encoder/encodemb.h"
+#include "av1/encoder/firstpass.h"
+#include "av1/encoder/lookahead.h"
+#include "av1/encoder/mbgraph.h"
+#include "av1/encoder/mcomp.h"
+#include "av1/encoder/quantize.h"
+#include "av1/encoder/ratectrl.h"
+#include "av1/encoder/rd.h"
+#include "av1/encoder/speed_features.h"
+#include "av1/encoder/tokenize.h"
#if CONFIG_INTERNAL_STATS
-#include "vpx_dsp/ssim.h"
+#include "aom_dsp/ssim.h"
#endif
-#include "vpx_dsp/variance.h"
-#include "vpx/internal/vpx_codec_internal.h"
-#include "vpx_util/vpx_thread.h"
+#include "aom_dsp/variance.h"
+#include "aom/internal/vpx_codec_internal.h"
+#include "aom_util/vpx_thread.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/ethread.c b/av1/encoder/ethread.c
similarity index 97%
rename from vp10/encoder/ethread.c
rename to av1/encoder/ethread.c
index 21f9d71..4117f2b 100644
--- a/vp10/encoder/ethread.c
+++ b/av1/encoder/ethread.c
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vp10/encoder/encodeframe.h"
-#include "vp10/encoder/encoder.h"
-#include "vp10/encoder/ethread.h"
-#include "vpx_dsp/vpx_dsp_common.h"
+#include "av1/encoder/encodeframe.h"
+#include "av1/encoder/encoder.h"
+#include "av1/encoder/ethread.h"
+#include "aom_dsp/vpx_dsp_common.h"
static void accumulate_rd_opt(ThreadData *td, ThreadData *td_t) {
int i, j, k, l, m, n;
diff --git a/vp10/encoder/ethread.h b/av1/encoder/ethread.h
similarity index 100%
rename from vp10/encoder/ethread.h
rename to av1/encoder/ethread.h
diff --git a/vp10/encoder/extend.c b/av1/encoder/extend.c
similarity index 97%
rename from vp10/encoder/extend.c
rename to av1/encoder/extend.c
index 3b0c20d..b0e20f0 100644
--- a/vp10/encoder/extend.c
+++ b/av1/encoder/extend.c
@@ -8,12 +8,12 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
-#include "vp10/common/common.h"
-#include "vp10/encoder/extend.h"
+#include "av1/common/common.h"
+#include "av1/encoder/extend.h"
static void copy_and_extend_plane(const uint8_t *src, int src_pitch,
uint8_t *dst, int dst_pitch, int w, int h,
diff --git a/vp10/encoder/extend.h b/av1/encoder/extend.h
similarity index 93%
rename from vp10/encoder/extend.h
rename to av1/encoder/extend.h
index f7967fd..1ad763e 100644
--- a/vp10/encoder/extend.h
+++ b/av1/encoder/extend.h
@@ -11,8 +11,8 @@
#ifndef VP10_ENCODER_EXTEND_H_
#define VP10_ENCODER_EXTEND_H_
-#include "vpx_scale/yv12config.h"
-#include "vpx/vpx_integer.h"
+#include "aom_scale/yv12config.h"
+#include "aom/vpx_integer.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/firstpass.c b/av1/encoder/firstpass.c
similarity index 98%
rename from vp10/encoder/firstpass.c
rename to av1/encoder/firstpass.c
index b5c728c..b89acfd 100644
--- a/vp10/encoder/firstpass.c
+++ b/av1/encoder/firstpass.c
@@ -15,28 +15,28 @@
#include "./vpx_dsp_rtcd.h"
#include "./vpx_scale_rtcd.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/system_state.h"
-#include "vpx_scale/vpx_scale.h"
-#include "vpx_scale/yv12config.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/system_state.h"
+#include "aom_scale/vpx_scale.h"
+#include "aom_scale/yv12config.h"
-#include "vp10/common/entropymv.h"
-#include "vp10/common/quant_common.h"
-#include "vp10/common/reconinter.h" // vp10_setup_dst_planes()
-#include "vp10/encoder/aq_variance.h"
-#include "vp10/encoder/block.h"
-#include "vp10/encoder/encodeframe.h"
-#include "vp10/encoder/encodemb.h"
-#include "vp10/encoder/encodemv.h"
-#include "vp10/encoder/encoder.h"
-#include "vp10/encoder/extend.h"
-#include "vp10/encoder/firstpass.h"
-#include "vp10/encoder/mcomp.h"
-#include "vp10/encoder/quantize.h"
-#include "vp10/encoder/rd.h"
-#include "vpx_dsp/variance.h"
+#include "av1/common/entropymv.h"
+#include "av1/common/quant_common.h"
+#include "av1/common/reconinter.h" // vp10_setup_dst_planes()
+#include "av1/encoder/aq_variance.h"
+#include "av1/encoder/block.h"
+#include "av1/encoder/encodeframe.h"
+#include "av1/encoder/encodemb.h"
+#include "av1/encoder/encodemv.h"
+#include "av1/encoder/encoder.h"
+#include "av1/encoder/extend.h"
+#include "av1/encoder/firstpass.h"
+#include "av1/encoder/mcomp.h"
+#include "av1/encoder/quantize.h"
+#include "av1/encoder/rd.h"
+#include "aom_dsp/variance.h"
#define OUTPUT_FPF 0
#define ARF_STATS_OUTPUT 0
diff --git a/vp10/encoder/firstpass.h b/av1/encoder/firstpass.h
similarity index 98%
rename from vp10/encoder/firstpass.h
rename to av1/encoder/firstpass.h
index 2fbd3f7..c08c285 100644
--- a/vp10/encoder/firstpass.h
+++ b/av1/encoder/firstpass.h
@@ -11,8 +11,8 @@
#ifndef VP10_ENCODER_FIRSTPASS_H_
#define VP10_ENCODER_FIRSTPASS_H_
-#include "vp10/encoder/lookahead.h"
-#include "vp10/encoder/ratectrl.h"
+#include "av1/encoder/lookahead.h"
+#include "av1/encoder/ratectrl.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/lookahead.c b/av1/encoder/lookahead.c
similarity index 97%
rename from vp10/encoder/lookahead.c
rename to av1/encoder/lookahead.c
index 145a4b0..3f62c98 100644
--- a/vp10/encoder/lookahead.c
+++ b/av1/encoder/lookahead.c
@@ -12,11 +12,11 @@
#include "./vpx_config.h"
-#include "vp10/common/common.h"
+#include "av1/common/common.h"
-#include "vp10/encoder/encoder.h"
-#include "vp10/encoder/extend.h"
-#include "vp10/encoder/lookahead.h"
+#include "av1/encoder/encoder.h"
+#include "av1/encoder/extend.h"
+#include "av1/encoder/lookahead.h"
/* Return the buffer at the given absolute index and increment the index */
static struct lookahead_entry *pop(struct lookahead_ctx *ctx,
diff --git a/vp10/encoder/lookahead.h b/av1/encoder/lookahead.h
similarity index 98%
rename from vp10/encoder/lookahead.h
rename to av1/encoder/lookahead.h
index 4b5fe7f..3a03ced 100644
--- a/vp10/encoder/lookahead.h
+++ b/av1/encoder/lookahead.h
@@ -11,8 +11,8 @@
#ifndef VP10_ENCODER_LOOKAHEAD_H_
#define VP10_ENCODER_LOOKAHEAD_H_
-#include "vpx_scale/yv12config.h"
-#include "vpx/vpx_integer.h"
+#include "aom_scale/yv12config.h"
+#include "aom/vpx_integer.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/mbgraph.c b/av1/encoder/mbgraph.c
similarity index 97%
rename from vp10/encoder/mbgraph.c
rename to av1/encoder/mbgraph.c
index 1579bf4..278875b 100644
--- a/vp10/encoder/mbgraph.c
+++ b/av1/encoder/mbgraph.c
@@ -13,14 +13,14 @@
#include "./vp10_rtcd.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/system_state.h"
-#include "vp10/encoder/segmentation.h"
-#include "vp10/encoder/mcomp.h"
-#include "vp10/common/blockd.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/common/reconintra.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/system_state.h"
+#include "av1/encoder/segmentation.h"
+#include "av1/encoder/mcomp.h"
+#include "av1/common/blockd.h"
+#include "av1/common/reconinter.h"
+#include "av1/common/reconintra.h"
static unsigned int do_16x16_motion_iteration(VP10_COMP *cpi, const MV *ref_mv,
MV *dst_mv, int mb_row,
diff --git a/vp10/encoder/mbgraph.h b/av1/encoder/mbgraph.h
similarity index 100%
rename from vp10/encoder/mbgraph.h
rename to av1/encoder/mbgraph.h
diff --git a/vp10/encoder/mcomp.c b/av1/encoder/mcomp.c
similarity index 99%
rename from vp10/encoder/mcomp.c
rename to av1/encoder/mcomp.c
index 28423f0..3b57ed1 100644
--- a/vp10/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -15,15 +15,15 @@
#include "./vpx_config.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
-#include "vp10/common/common.h"
-#include "vp10/common/reconinter.h"
+#include "av1/common/common.h"
+#include "av1/common/reconinter.h"
-#include "vp10/encoder/encoder.h"
-#include "vp10/encoder/mcomp.h"
+#include "av1/encoder/encoder.h"
+#include "av1/encoder/mcomp.h"
// #define NEW_DIAMOND_SEARCH
diff --git a/vp10/encoder/mcomp.h b/av1/encoder/mcomp.h
similarity index 98%
rename from vp10/encoder/mcomp.h
rename to av1/encoder/mcomp.h
index e17264b..c112061 100644
--- a/vp10/encoder/mcomp.h
+++ b/av1/encoder/mcomp.h
@@ -11,8 +11,8 @@
#ifndef VP10_ENCODER_MCOMP_H_
#define VP10_ENCODER_MCOMP_H_
-#include "vp10/encoder/block.h"
-#include "vpx_dsp/variance.h"
+#include "av1/encoder/block.h"
+#include "aom_dsp/variance.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/mips/msa/error_msa.c b/av1/encoder/mips/msa/error_msa.c
similarity index 99%
rename from vp10/encoder/mips/msa/error_msa.c
rename to av1/encoder/mips/msa/error_msa.c
index 9a098ea..71c5ad3 100644
--- a/vp10/encoder/mips/msa/error_msa.c
+++ b/av1/encoder/mips/msa/error_msa.c
@@ -9,7 +9,7 @@
*/
#include "./vp10_rtcd.h"
-#include "vpx_dsp/mips/macros_msa.h"
+#include "aom_dsp/mips/macros_msa.h"
#define BLOCK_ERROR_BLOCKSIZE_MSA(BSize) \
static int64_t block_error_##BSize##size_msa( \
diff --git a/vp10/encoder/mips/msa/fdct16x16_msa.c b/av1/encoder/mips/msa/fdct16x16_msa.c
similarity index 99%
rename from vp10/encoder/mips/msa/fdct16x16_msa.c
rename to av1/encoder/mips/msa/fdct16x16_msa.c
index c39a292..cda2138 100644
--- a/vp10/encoder/mips/msa/fdct16x16_msa.c
+++ b/av1/encoder/mips/msa/fdct16x16_msa.c
@@ -10,9 +10,9 @@
#include <assert.h>
-#include "vp10/common/enums.h"
-#include "vp10/encoder/mips/msa/fdct_msa.h"
-#include "vpx_dsp/mips/fwd_txfm_msa.h"
+#include "av1/common/enums.h"
+#include "av1/encoder/mips/msa/fdct_msa.h"
+#include "aom_dsp/mips/fwd_txfm_msa.h"
static void fadst16_cols_step1_msa(const int16_t *input, int32_t stride,
const int32_t *const0, int16_t *int_buf) {
diff --git a/vp10/encoder/mips/msa/fdct4x4_msa.c b/av1/encoder/mips/msa/fdct4x4_msa.c
similarity index 97%
rename from vp10/encoder/mips/msa/fdct4x4_msa.c
rename to av1/encoder/mips/msa/fdct4x4_msa.c
index def9b45..a3731c3 100644
--- a/vp10/encoder/mips/msa/fdct4x4_msa.c
+++ b/av1/encoder/mips/msa/fdct4x4_msa.c
@@ -10,8 +10,8 @@
#include <assert.h>
-#include "vp10/common/enums.h"
-#include "vp10/encoder/mips/msa/fdct_msa.h"
+#include "av1/common/enums.h"
+#include "av1/encoder/mips/msa/fdct_msa.h"
void vp10_fwht4x4_msa(const int16_t *input, int16_t *output,
int32_t src_stride) {
diff --git a/vp10/encoder/mips/msa/fdct8x8_msa.c b/av1/encoder/mips/msa/fdct8x8_msa.c
similarity index 96%
rename from vp10/encoder/mips/msa/fdct8x8_msa.c
rename to av1/encoder/mips/msa/fdct8x8_msa.c
index 7843a62..3b6532a 100644
--- a/vp10/encoder/mips/msa/fdct8x8_msa.c
+++ b/av1/encoder/mips/msa/fdct8x8_msa.c
@@ -10,8 +10,8 @@
#include <assert.h>
-#include "vp10/common/enums.h"
-#include "vp10/encoder/mips/msa/fdct_msa.h"
+#include "av1/common/enums.h"
+#include "av1/encoder/mips/msa/fdct_msa.h"
void vp10_fht8x8_msa(const int16_t *input, int16_t *output, int32_t stride,
int32_t tx_type) {
diff --git a/vp10/encoder/mips/msa/fdct_msa.h b/av1/encoder/mips/msa/fdct_msa.h
similarity index 98%
rename from vp10/encoder/mips/msa/fdct_msa.h
rename to av1/encoder/mips/msa/fdct_msa.h
index 9a14625..07471d0 100644
--- a/vp10/encoder/mips/msa/fdct_msa.h
+++ b/av1/encoder/mips/msa/fdct_msa.h
@@ -11,9 +11,9 @@
#ifndef VP10_ENCODER_MIPS_MSA_VP10_FDCT_MSA_H_
#define VP10_ENCODER_MIPS_MSA_VP10_FDCT_MSA_H_
-#include "vpx_dsp/mips/fwd_txfm_msa.h"
-#include "vpx_dsp/mips/txfm_macros_msa.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/mips/fwd_txfm_msa.h"
+#include "aom_dsp/mips/txfm_macros_msa.h"
+#include "aom_ports/mem.h"
#define VPX_ADST8(in0, in1, in2, in3, in4, in5, in6, in7, out0, out1, out2, \
out3, out4, out5, out6, out7) \
diff --git a/vp10/encoder/mips/msa/temporal_filter_msa.c b/av1/encoder/mips/msa/temporal_filter_msa.c
similarity index 99%
rename from vp10/encoder/mips/msa/temporal_filter_msa.c
rename to av1/encoder/mips/msa/temporal_filter_msa.c
index 5feeab3..4d60d37 100644
--- a/vp10/encoder/mips/msa/temporal_filter_msa.c
+++ b/av1/encoder/mips/msa/temporal_filter_msa.c
@@ -9,7 +9,7 @@
*/
#include "./vp10_rtcd.h"
-#include "vpx_dsp/mips/macros_msa.h"
+#include "aom_dsp/mips/macros_msa.h"
static void temporal_filter_apply_8size_msa(uint8_t *frm1_ptr, uint32_t stride,
uint8_t *frm2_ptr, int32_t filt_sth,
diff --git a/vp10/encoder/pickdering.c b/av1/encoder/pickdering.c
similarity index 96%
rename from vp10/encoder/pickdering.c
rename to av1/encoder/pickdering.c
index a7f69d2..b5399e5 100644
--- a/vp10/encoder/pickdering.c
+++ b/av1/encoder/pickdering.c
@@ -11,11 +11,11 @@
#include <string.h>
#include "./vpx_scale_rtcd.h"
-#include "vp10/common/dering.h"
-#include "vp10/common/onyxc_int.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/encoder/encoder.h"
-#include "vpx/vpx_integer.h"
+#include "av1/common/dering.h"
+#include "av1/common/onyxc_int.h"
+#include "av1/common/reconinter.h"
+#include "av1/encoder/encoder.h"
+#include "aom/vpx_integer.h"
static double compute_dist(int16_t *x, int xstride, int16_t *y, int ystride,
int nhb, int nvb, int coeff_shift) {
diff --git a/vp10/encoder/picklpf.c b/av1/encoder/picklpf.c
similarity index 95%
rename from vp10/encoder/picklpf.c
rename to av1/encoder/picklpf.c
index 0550df8..f1610fa 100644
--- a/vp10/encoder/picklpf.c
+++ b/av1/encoder/picklpf.c
@@ -13,17 +13,17 @@
#include "./vpx_scale_rtcd.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
-#include "vp10/common/loopfilter.h"
-#include "vp10/common/onyxc_int.h"
-#include "vp10/common/quant_common.h"
+#include "av1/common/loopfilter.h"
+#include "av1/common/onyxc_int.h"
+#include "av1/common/quant_common.h"
-#include "vp10/encoder/encoder.h"
-#include "vp10/encoder/picklpf.h"
-#include "vp10/encoder/quantize.h"
+#include "av1/encoder/encoder.h"
+#include "av1/encoder/picklpf.h"
+#include "av1/encoder/quantize.h"
static int get_max_filter_level(const VP10_COMP *cpi) {
if (cpi->oxcf.pass == 2) {
diff --git a/vp10/encoder/picklpf.h b/av1/encoder/picklpf.h
similarity index 95%
rename from vp10/encoder/picklpf.h
rename to av1/encoder/picklpf.h
index 7d5f167..dae0090 100644
--- a/vp10/encoder/picklpf.h
+++ b/av1/encoder/picklpf.h
@@ -15,7 +15,7 @@
extern "C" {
#endif
-#include "vp10/encoder/encoder.h"
+#include "av1/encoder/encoder.h"
struct yv12_buffer_config;
struct VP10_COMP;
diff --git a/vp10/encoder/quantize.c b/av1/encoder/quantize.c
similarity index 98%
rename from vp10/encoder/quantize.c
rename to av1/encoder/quantize.c
index f0d5c4c..86af339 100644
--- a/vp10/encoder/quantize.c
+++ b/av1/encoder/quantize.c
@@ -10,15 +10,15 @@
#include <math.h>
#include "./vpx_dsp_rtcd.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
-#include "vp10/common/quant_common.h"
-#include "vp10/common/seg_common.h"
+#include "av1/common/quant_common.h"
+#include "av1/common/seg_common.h"
-#include "vp10/encoder/encoder.h"
-#include "vp10/encoder/quantize.h"
-#include "vp10/encoder/rd.h"
+#include "av1/encoder/encoder.h"
+#include "av1/encoder/quantize.h"
+#include "av1/encoder/rd.h"
void vp10_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr,
diff --git a/vp10/encoder/quantize.h b/av1/encoder/quantize.h
similarity index 96%
rename from vp10/encoder/quantize.h
rename to av1/encoder/quantize.h
index 5f047ca..848b13d 100644
--- a/vp10/encoder/quantize.h
+++ b/av1/encoder/quantize.h
@@ -12,8 +12,8 @@
#define VP10_ENCODER_QUANTIZE_H_
#include "./vpx_config.h"
-#include "vp10/common/quant_common.h"
-#include "vp10/encoder/block.h"
+#include "av1/common/quant_common.h"
+#include "av1/encoder/block.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/ratectrl.c b/av1/encoder/ratectrl.c
similarity index 99%
rename from vp10/encoder/ratectrl.c
rename to av1/encoder/ratectrl.c
index 73593cb..8512e98 100644
--- a/vp10/encoder/ratectrl.c
+++ b/av1/encoder/ratectrl.c
@@ -15,20 +15,20 @@
#include <stdlib.h>
#include <string.h>
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/system_state.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/system_state.h"
-#include "vp10/common/alloccommon.h"
-#include "vp10/encoder/aq_cyclicrefresh.h"
-#include "vp10/common/common.h"
-#include "vp10/common/entropymode.h"
-#include "vp10/common/quant_common.h"
-#include "vp10/common/seg_common.h"
+#include "av1/common/alloccommon.h"
+#include "av1/encoder/aq_cyclicrefresh.h"
+#include "av1/common/common.h"
+#include "av1/common/entropymode.h"
+#include "av1/common/quant_common.h"
+#include "av1/common/seg_common.h"
-#include "vp10/encoder/encodemv.h"
-#include "vp10/encoder/ratectrl.h"
+#include "av1/encoder/encodemv.h"
+#include "av1/encoder/ratectrl.h"
// Max rate target for 1080P and below encodes under normal circumstances
// (1920 * 1080 / (16 * 16)) * MAX_MB_RATE bits per MB
diff --git a/vp10/encoder/ratectrl.h b/av1/encoder/ratectrl.h
similarity index 98%
rename from vp10/encoder/ratectrl.h
rename to av1/encoder/ratectrl.h
index f84df83..cdb9973 100644
--- a/vp10/encoder/ratectrl.h
+++ b/av1/encoder/ratectrl.h
@@ -11,10 +11,10 @@
#ifndef VP10_ENCODER_RATECTRL_H_
#define VP10_ENCODER_RATECTRL_H_
-#include "vpx/vpx_codec.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_codec.h"
+#include "aom/vpx_integer.h"
-#include "vp10/common/blockd.h"
+#include "av1/common/blockd.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/rd.c b/av1/encoder/rd.c
similarity index 96%
rename from vp10/encoder/rd.c
rename to av1/encoder/rd.c
index 0c6985b..1352f07 100644
--- a/vp10/encoder/rd.c
+++ b/av1/encoder/rd.c
@@ -14,31 +14,31 @@
#include "./vp10_rtcd.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/bitops.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/system_state.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/bitops.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/system_state.h"
-#include "vp10/common/common.h"
-#include "vp10/common/entropy.h"
-#include "vp10/common/entropymode.h"
-#include "vp10/common/mvref_common.h"
-#include "vp10/common/pred_common.h"
-#include "vp10/common/quant_common.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/common/reconintra.h"
-#include "vp10/common/seg_common.h"
+#include "av1/common/common.h"
+#include "av1/common/entropy.h"
+#include "av1/common/entropymode.h"
+#include "av1/common/mvref_common.h"
+#include "av1/common/pred_common.h"
+#include "av1/common/quant_common.h"
+#include "av1/common/reconinter.h"
+#include "av1/common/reconintra.h"
+#include "av1/common/seg_common.h"
-#include "vp10/encoder/cost.h"
-#include "vp10/encoder/encodemb.h"
-#include "vp10/encoder/encodemv.h"
-#include "vp10/encoder/encoder.h"
-#include "vp10/encoder/mcomp.h"
-#include "vp10/encoder/quantize.h"
-#include "vp10/encoder/ratectrl.h"
-#include "vp10/encoder/rd.h"
-#include "vp10/encoder/tokenize.h"
+#include "av1/encoder/cost.h"
+#include "av1/encoder/encodemb.h"
+#include "av1/encoder/encodemv.h"
+#include "av1/encoder/encoder.h"
+#include "av1/encoder/mcomp.h"
+#include "av1/encoder/quantize.h"
+#include "av1/encoder/ratectrl.h"
+#include "av1/encoder/rd.h"
+#include "av1/encoder/tokenize.h"
#define RD_THRESH_POW 1.25
diff --git a/vp10/encoder/rd.h b/av1/encoder/rd.h
similarity index 97%
rename from vp10/encoder/rd.h
rename to av1/encoder/rd.h
index 7255cc8..ffa9e47 100644
--- a/vp10/encoder/rd.h
+++ b/av1/encoder/rd.h
@@ -13,11 +13,11 @@
#include <limits.h>
-#include "vp10/common/blockd.h"
+#include "av1/common/blockd.h"
-#include "vp10/encoder/block.h"
-#include "vp10/encoder/context_tree.h"
-#include "vp10/encoder/cost.h"
+#include "av1/encoder/block.h"
+#include "av1/encoder/context_tree.h"
+#include "av1/encoder/cost.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/rdopt.c b/av1/encoder/rdopt.c
similarity index 99%
rename from vp10/encoder/rdopt.c
rename to av1/encoder/rdopt.c
index 9f4d4a5..d704510 100644
--- a/vp10/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -14,33 +14,33 @@
#include "./vp10_rtcd.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/system_state.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/system_state.h"
-#include "vp10/common/common.h"
-#include "vp10/common/entropy.h"
-#include "vp10/common/entropymode.h"
-#include "vp10/common/idct.h"
-#include "vp10/common/mvref_common.h"
-#include "vp10/common/pred_common.h"
-#include "vp10/common/quant_common.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/common/reconintra.h"
-#include "vp10/common/scan.h"
-#include "vp10/common/seg_common.h"
+#include "av1/common/common.h"
+#include "av1/common/entropy.h"
+#include "av1/common/entropymode.h"
+#include "av1/common/idct.h"
+#include "av1/common/mvref_common.h"
+#include "av1/common/pred_common.h"
+#include "av1/common/quant_common.h"
+#include "av1/common/reconinter.h"
+#include "av1/common/reconintra.h"
+#include "av1/common/scan.h"
+#include "av1/common/seg_common.h"
-#include "vp10/encoder/cost.h"
-#include "vp10/encoder/encodemb.h"
-#include "vp10/encoder/encodemv.h"
-#include "vp10/encoder/encoder.h"
-#include "vp10/encoder/mcomp.h"
-#include "vp10/encoder/quantize.h"
-#include "vp10/encoder/ratectrl.h"
-#include "vp10/encoder/rd.h"
-#include "vp10/encoder/rdopt.h"
-#include "vp10/encoder/aq_variance.h"
+#include "av1/encoder/cost.h"
+#include "av1/encoder/encodemb.h"
+#include "av1/encoder/encodemv.h"
+#include "av1/encoder/encoder.h"
+#include "av1/encoder/mcomp.h"
+#include "av1/encoder/quantize.h"
+#include "av1/encoder/ratectrl.h"
+#include "av1/encoder/rd.h"
+#include "av1/encoder/rdopt.h"
+#include "av1/encoder/aq_variance.h"
#define LAST_FRAME_MODE_MASK \
((1 << GOLDEN_FRAME) | (1 << ALTREF_FRAME) | (1 << INTRA_FRAME))
diff --git a/vp10/encoder/rdopt.h b/av1/encoder/rdopt.h
similarity index 95%
rename from vp10/encoder/rdopt.h
rename to av1/encoder/rdopt.h
index b887b8a..cf5efe6 100644
--- a/vp10/encoder/rdopt.h
+++ b/av1/encoder/rdopt.h
@@ -11,10 +11,10 @@
#ifndef VP10_ENCODER_RDOPT_H_
#define VP10_ENCODER_RDOPT_H_
-#include "vp10/common/blockd.h"
+#include "av1/common/blockd.h"
-#include "vp10/encoder/block.h"
-#include "vp10/encoder/context_tree.h"
+#include "av1/encoder/block.h"
+#include "av1/encoder/context_tree.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/resize.c b/av1/encoder/resize.c
similarity index 99%
rename from vp10/encoder/resize.c
rename to av1/encoder/resize.c
index b75ceb4..d3295eb 100644
--- a/vp10/encoder/resize.c
+++ b/av1/encoder/resize.c
@@ -16,11 +16,11 @@
#include <string.h>
#if CONFIG_VPX_HIGHBITDEPTH
-#include "vpx_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_dsp_common.h"
#endif // CONFIG_VPX_HIGHBITDEPTH
-#include "vpx_ports/mem.h"
-#include "vp10/common/common.h"
-#include "vp10/encoder/resize.h"
+#include "aom_ports/mem.h"
+#include "av1/common/common.h"
+#include "av1/encoder/resize.h"
#define FILTER_BITS 7
diff --git a/vp10/encoder/resize.h b/av1/encoder/resize.h
similarity index 98%
rename from vp10/encoder/resize.h
rename to av1/encoder/resize.h
index 9dc34ef..0da888c 100644
--- a/vp10/encoder/resize.h
+++ b/av1/encoder/resize.h
@@ -12,7 +12,7 @@
#define VP10_ENCODER_RESIZE_H_
#include <stdio.h>
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/segmentation.c b/av1/encoder/segmentation.c
similarity index 97%
rename from vp10/encoder/segmentation.c
rename to av1/encoder/segmentation.c
index 1b29366..118463a 100644
--- a/vp10/encoder/segmentation.c
+++ b/av1/encoder/segmentation.c
@@ -10,14 +10,14 @@
#include <limits.h>
-#include "vpx_mem/vpx_mem.h"
+#include "aom_mem/vpx_mem.h"
-#include "vp10/common/pred_common.h"
-#include "vp10/common/tile_common.h"
+#include "av1/common/pred_common.h"
+#include "av1/common/tile_common.h"
-#include "vp10/encoder/cost.h"
-#include "vp10/encoder/segmentation.h"
-#include "vp10/encoder/subexp.h"
+#include "av1/encoder/cost.h"
+#include "av1/encoder/segmentation.h"
+#include "av1/encoder/subexp.h"
void vp10_enable_segmentation(struct segmentation *seg) {
seg->enabled = 1;
diff --git a/vp10/encoder/segmentation.h b/av1/encoder/segmentation.h
similarity index 95%
rename from vp10/encoder/segmentation.h
rename to av1/encoder/segmentation.h
index c07f37f..3c79bd1 100644
--- a/vp10/encoder/segmentation.h
+++ b/av1/encoder/segmentation.h
@@ -11,8 +11,8 @@
#ifndef VP10_ENCODER_SEGMENTATION_H_
#define VP10_ENCODER_SEGMENTATION_H_
-#include "vp10/common/blockd.h"
-#include "vp10/encoder/encoder.h"
+#include "av1/common/blockd.h"
+#include "av1/encoder/encoder.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/skin_detection.c b/av1/encoder/skin_detection.c
similarity index 97%
rename from vp10/encoder/skin_detection.c
rename to av1/encoder/skin_detection.c
index 324ac59..36e8781 100644
--- a/vp10/encoder/skin_detection.c
+++ b/av1/encoder/skin_detection.c
@@ -11,9 +11,9 @@
#include <limits.h>
#include <math.h>
-#include "vp10/common/blockd.h"
-#include "vp10/encoder/encoder.h"
-#include "vp10/encoder/skin_detection.h"
+#include "av1/common/blockd.h"
+#include "av1/encoder/encoder.h"
+#include "av1/encoder/skin_detection.h"
// Fixed-point skin color model parameters.
static const int skin_mean[2] = { 7463, 9614 }; // q6
diff --git a/vp10/encoder/skin_detection.h b/av1/encoder/skin_detection.h
similarity index 96%
rename from vp10/encoder/skin_detection.h
rename to av1/encoder/skin_detection.h
index 26b7d5e..782b7a6 100644
--- a/vp10/encoder/skin_detection.h
+++ b/av1/encoder/skin_detection.h
@@ -11,7 +11,7 @@
#ifndef VP10_ENCODER_SKIN_MAP_H_
#define VP10_ENCODER_SKIN_MAP_H_
-#include "vp10/common/blockd.h"
+#include "av1/common/blockd.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/speed_features.c b/av1/encoder/speed_features.c
similarity index 98%
rename from vp10/encoder/speed_features.c
rename to av1/encoder/speed_features.c
index c961b7e..dc620a2 100644
--- a/vp10/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -10,11 +10,11 @@
#include <limits.h>
-#include "vp10/encoder/encoder.h"
-#include "vp10/encoder/speed_features.h"
-#include "vp10/encoder/rdopt.h"
+#include "av1/encoder/encoder.h"
+#include "av1/encoder/speed_features.h"
+#include "av1/encoder/rdopt.h"
-#include "vpx_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_dsp_common.h"
// Mesh search patters for various speed settings
static MESH_PATTERN best_quality_mesh_pattern[MAX_MESH_STEP] = {
diff --git a/vp10/encoder/speed_features.h b/av1/encoder/speed_features.h
similarity index 99%
rename from vp10/encoder/speed_features.h
rename to av1/encoder/speed_features.h
index 72b5847..3d4f130 100644
--- a/vp10/encoder/speed_features.h
+++ b/av1/encoder/speed_features.h
@@ -11,7 +11,7 @@
#ifndef VP10_ENCODER_SPEED_FEATURES_H_
#define VP10_ENCODER_SPEED_FEATURES_H_
-#include "vp10/common/enums.h"
+#include "av1/common/enums.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/subexp.c b/av1/encoder/subexp.c
similarity index 97%
rename from vp10/encoder/subexp.c
rename to av1/encoder/subexp.c
index b40b92c..def82ab 100644
--- a/vp10/encoder/subexp.c
+++ b/av1/encoder/subexp.c
@@ -7,12 +7,12 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vpx_dsp/bitwriter.h"
+#include "aom_dsp/bitwriter.h"
-#include "vp10/common/common.h"
-#include "vp10/common/entropy.h"
-#include "vp10/encoder/cost.h"
-#include "vp10/encoder/subexp.h"
+#include "av1/common/common.h"
+#include "av1/common/entropy.h"
+#include "av1/encoder/cost.h"
+#include "av1/encoder/subexp.h"
#define vp10_cost_upd256 ((int)(vp10_cost_one(upd) - vp10_cost_zero(upd)))
diff --git a/vp10/encoder/subexp.h b/av1/encoder/subexp.h
similarity index 97%
rename from vp10/encoder/subexp.h
rename to av1/encoder/subexp.h
index 5adc6e5..bd847cb 100644
--- a/vp10/encoder/subexp.h
+++ b/av1/encoder/subexp.h
@@ -15,7 +15,7 @@
extern "C" {
#endif
-#include "vpx_dsp/prob.h"
+#include "aom_dsp/prob.h"
struct vpx_writer;
diff --git a/vp10/encoder/temporal_filter.c b/av1/encoder/temporal_filter.c
similarity index 96%
rename from vp10/encoder/temporal_filter.c
rename to av1/encoder/temporal_filter.c
index b19469a..c13a1a8 100644
--- a/vp10/encoder/temporal_filter.c
+++ b/av1/encoder/temporal_filter.c
@@ -11,24 +11,24 @@
#include <math.h>
#include <limits.h>
-#include "vp10/common/alloccommon.h"
-#include "vp10/common/onyxc_int.h"
-#include "vp10/common/quant_common.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/common/odintrin.h"
-#include "vp10/encoder/extend.h"
-#include "vp10/encoder/firstpass.h"
-#include "vp10/encoder/mcomp.h"
-#include "vp10/encoder/encoder.h"
-#include "vp10/encoder/quantize.h"
-#include "vp10/encoder/ratectrl.h"
-#include "vp10/encoder/segmentation.h"
-#include "vp10/encoder/temporal_filter.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/vpx_timer.h"
-#include "vpx_scale/vpx_scale.h"
+#include "av1/common/alloccommon.h"
+#include "av1/common/onyxc_int.h"
+#include "av1/common/quant_common.h"
+#include "av1/common/reconinter.h"
+#include "av1/common/odintrin.h"
+#include "av1/encoder/extend.h"
+#include "av1/encoder/firstpass.h"
+#include "av1/encoder/mcomp.h"
+#include "av1/encoder/encoder.h"
+#include "av1/encoder/quantize.h"
+#include "av1/encoder/ratectrl.h"
+#include "av1/encoder/segmentation.h"
+#include "av1/encoder/temporal_filter.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/vpx_timer.h"
+#include "aom_scale/vpx_scale.h"
static void temporal_filter_predictors_mb_c(
MACROBLOCKD *xd, uint8_t *y_mb_ptr, uint8_t *u_mb_ptr, uint8_t *v_mb_ptr,
diff --git a/vp10/encoder/temporal_filter.h b/av1/encoder/temporal_filter.h
similarity index 100%
rename from vp10/encoder/temporal_filter.h
rename to av1/encoder/temporal_filter.h
diff --git a/vp10/encoder/tokenize.c b/av1/encoder/tokenize.c
similarity index 98%
rename from vp10/encoder/tokenize.c
rename to av1/encoder/tokenize.c
index 31c0a0d..1b5262b 100644
--- a/vp10/encoder/tokenize.c
+++ b/av1/encoder/tokenize.c
@@ -13,16 +13,16 @@
#include <stdio.h>
#include <string.h>
-#include "vpx_mem/vpx_mem.h"
+#include "aom_mem/vpx_mem.h"
-#include "vp10/common/entropy.h"
-#include "vp10/common/pred_common.h"
-#include "vp10/common/scan.h"
-#include "vp10/common/seg_common.h"
+#include "av1/common/entropy.h"
+#include "av1/common/pred_common.h"
+#include "av1/common/scan.h"
+#include "av1/common/seg_common.h"
-#include "vp10/encoder/cost.h"
-#include "vp10/encoder/encoder.h"
-#include "vp10/encoder/tokenize.h"
+#include "av1/encoder/cost.h"
+#include "av1/encoder/encoder.h"
+#include "av1/encoder/tokenize.h"
static const TOKENVALUE dct_cat_lt_10_value_tokens[] = {
{ 9, 63 }, { 9, 61 }, { 9, 59 }, { 9, 57 }, { 9, 55 }, { 9, 53 }, { 9, 51 },
diff --git a/vp10/encoder/tokenize.h b/av1/encoder/tokenize.h
similarity index 96%
rename from vp10/encoder/tokenize.h
rename to av1/encoder/tokenize.h
index 64a820a..27d7ed4 100644
--- a/vp10/encoder/tokenize.h
+++ b/av1/encoder/tokenize.h
@@ -11,10 +11,10 @@
#ifndef VP10_ENCODER_TOKENIZE_H_
#define VP10_ENCODER_TOKENIZE_H_
-#include "vp10/common/entropy.h"
+#include "av1/common/entropy.h"
-#include "vp10/encoder/block.h"
-#include "vp10/encoder/treewriter.h"
+#include "av1/encoder/block.h"
+#include "av1/encoder/treewriter.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/treewriter.c b/av1/encoder/treewriter.c
similarity index 97%
rename from vp10/encoder/treewriter.c
rename to av1/encoder/treewriter.c
index 152bf40..d3fcd45 100644
--- a/vp10/encoder/treewriter.c
+++ b/av1/encoder/treewriter.c
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#include "vp10/encoder/treewriter.h"
+#include "av1/encoder/treewriter.h"
static void tree2tok(struct vp10_token *tokens, const vpx_tree_index *tree,
int i, int v, int l) {
diff --git a/vp10/encoder/treewriter.h b/av1/encoder/treewriter.h
similarity index 97%
rename from vp10/encoder/treewriter.h
rename to av1/encoder/treewriter.h
index 05de002..096080c 100644
--- a/vp10/encoder/treewriter.h
+++ b/av1/encoder/treewriter.h
@@ -11,7 +11,7 @@
#ifndef VP10_ENCODER_TREEWRITER_H_
#define VP10_ENCODER_TREEWRITER_H_
-#include "vpx_dsp/bitwriter.h"
+#include "aom_dsp/bitwriter.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vp10/encoder/x86/dct_mmx.asm b/av1/encoder/x86/dct_mmx.asm
similarity index 100%
rename from vp10/encoder/x86/dct_mmx.asm
rename to av1/encoder/x86/dct_mmx.asm
diff --git a/vp10/encoder/x86/dct_sse2.c b/av1/encoder/x86/dct_sse2.c
similarity index 99%
rename from vp10/encoder/x86/dct_sse2.c
rename to av1/encoder/x86/dct_sse2.c
index 7a61ada..ca9fedb 100644
--- a/vp10/encoder/x86/dct_sse2.c
+++ b/av1/encoder/x86/dct_sse2.c
@@ -13,10 +13,10 @@
#include "./vp10_rtcd.h"
#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/txfm_common.h"
-#include "vpx_dsp/x86/fwd_txfm_sse2.h"
-#include "vpx_dsp/x86/txfm_common_sse2.h"
-#include "vpx_ports/mem.h"
+#include "aom_dsp/txfm_common.h"
+#include "aom_dsp/x86/fwd_txfm_sse2.h"
+#include "aom_dsp/x86/txfm_common_sse2.h"
+#include "aom_ports/mem.h"
static INLINE void load_buffer_4x4(const int16_t *input, __m128i *in,
int stride) {
diff --git a/vp10/encoder/x86/dct_ssse3.c b/av1/encoder/x86/dct_ssse3.c
similarity index 99%
rename from vp10/encoder/x86/dct_ssse3.c
rename to av1/encoder/x86/dct_ssse3.c
index 74794b1..601c201 100644
--- a/vp10/encoder/x86/dct_ssse3.c
+++ b/av1/encoder/x86/dct_ssse3.c
@@ -17,8 +17,8 @@
#include <tmmintrin.h> // SSSE3
#include "./vp10_rtcd.h"
-#include "vpx_dsp/x86/inv_txfm_sse2.h"
-#include "vpx_dsp/x86/txfm_common_sse2.h"
+#include "aom_dsp/x86/inv_txfm_sse2.h"
+#include "aom_dsp/x86/txfm_common_sse2.h"
void vp10_fdct8x8_quant_ssse3(
const int16_t* input, int stride, int16_t* coeff_ptr, intptr_t n_coeffs,
diff --git a/vp10/encoder/x86/error_intrin_avx2.c b/av1/encoder/x86/error_intrin_avx2.c
similarity index 98%
rename from vp10/encoder/x86/error_intrin_avx2.c
rename to av1/encoder/x86/error_intrin_avx2.c
index 560cd4a..6e7c093 100644
--- a/vp10/encoder/x86/error_intrin_avx2.c
+++ b/av1/encoder/x86/error_intrin_avx2.c
@@ -11,7 +11,7 @@
#include <immintrin.h> // AVX2
#include "./vp10_rtcd.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
int64_t vp10_block_error_avx2(const int16_t *coeff, const int16_t *dqcoeff,
intptr_t block_size, int64_t *ssz) {
diff --git a/vp10/encoder/x86/error_sse2.asm b/av1/encoder/x86/error_sse2.asm
similarity index 100%
rename from vp10/encoder/x86/error_sse2.asm
rename to av1/encoder/x86/error_sse2.asm
diff --git a/vp10/encoder/x86/highbd_block_error_intrin_sse2.c b/av1/encoder/x86/highbd_block_error_intrin_sse2.c
similarity index 98%
rename from vp10/encoder/x86/highbd_block_error_intrin_sse2.c
rename to av1/encoder/x86/highbd_block_error_intrin_sse2.c
index eefca1c..2728880 100644
--- a/vp10/encoder/x86/highbd_block_error_intrin_sse2.c
+++ b/av1/encoder/x86/highbd_block_error_intrin_sse2.c
@@ -11,7 +11,7 @@
#include <emmintrin.h>
#include <stdio.h>
-#include "vp10/common/common.h"
+#include "av1/common/common.h"
int64_t vp10_highbd_block_error_sse2(tran_low_t *coeff, tran_low_t *dqcoeff,
intptr_t block_size, int64_t *ssz,
diff --git a/vp10/encoder/x86/quantize_sse2.c b/av1/encoder/x86/quantize_sse2.c
similarity index 99%
rename from vp10/encoder/x86/quantize_sse2.c
rename to av1/encoder/x86/quantize_sse2.c
index 78d5952..7ef16e6 100644
--- a/vp10/encoder/x86/quantize_sse2.c
+++ b/av1/encoder/x86/quantize_sse2.c
@@ -12,7 +12,7 @@
#include <xmmintrin.h>
#include "./vp10_rtcd.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
void vp10_quantize_fp_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t* zbin_ptr,
diff --git a/vp10/encoder/x86/quantize_ssse3_x86_64.asm b/av1/encoder/x86/quantize_ssse3_x86_64.asm
similarity index 100%
rename from vp10/encoder/x86/quantize_ssse3_x86_64.asm
rename to av1/encoder/x86/quantize_ssse3_x86_64.asm
diff --git a/vp10/encoder/x86/ssim_opt_x86_64.asm b/av1/encoder/x86/ssim_opt_x86_64.asm
similarity index 99%
rename from vp10/encoder/x86/ssim_opt_x86_64.asm
rename to av1/encoder/x86/ssim_opt_x86_64.asm
index b45f009..29659ee 100644
--- a/vp10/encoder/x86/ssim_opt_x86_64.asm
+++ b/av1/encoder/x86/ssim_opt_x86_64.asm
@@ -8,7 +8,7 @@
; be found in the AUTHORS file in the root of the source tree.
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
; tabulate_ssim - sums sum_s,sum_r,sum_sq_s,sum_sq_r, sum_sxr
%macro TABULATE_SSIM 0
diff --git a/vp10/encoder/x86/temporal_filter_apply_sse2.asm b/av1/encoder/x86/temporal_filter_apply_sse2.asm
similarity index 99%
rename from vp10/encoder/x86/temporal_filter_apply_sse2.asm
rename to av1/encoder/x86/temporal_filter_apply_sse2.asm
index 7171807..eabe575 100644
--- a/vp10/encoder/x86/temporal_filter_apply_sse2.asm
+++ b/av1/encoder/x86/temporal_filter_apply_sse2.asm
@@ -9,7 +9,7 @@
;
-%include "vpx_ports/x86_abi_support.asm"
+%include "aom_ports/x86_abi_support.asm"
; void vp10_temporal_filter_apply_sse2 | arg
; (unsigned char *frame1, | 0
diff --git a/vp10/exports_dec b/av1/exports_dec
similarity index 100%
rename from vp10/exports_dec
rename to av1/exports_dec
diff --git a/vp10/exports_enc b/av1/exports_enc
similarity index 100%
rename from vp10/exports_enc
rename to av1/exports_enc
diff --git a/vp10/vp10_common.mk b/av1/vp10_common.mk
similarity index 97%
rename from vp10/vp10_common.mk
rename to av1/vp10_common.mk
index d0311f5..6d27eee 100644
--- a/vp10/vp10_common.mk
+++ b/av1/vp10_common.mk
@@ -95,4 +95,4 @@
VP10_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp10_inv_txfm_sse2.c
VP10_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp10_inv_txfm_sse2.h
-$(eval $(call rtcd_h_template,vp10_rtcd,vp10/common/vp10_rtcd_defs.pl))
+$(eval $(call rtcd_h_template,vp10_rtcd,av1/common/vp10_rtcd_defs.pl))
diff --git a/vp10/vp10_cx_iface.c b/av1/vp10_cx_iface.c
similarity index 99%
rename from vp10/vp10_cx_iface.c
rename to av1/vp10_cx_iface.c
index e5748ab..3f43178 100644
--- a/vp10/vp10_cx_iface.c
+++ b/av1/vp10_cx_iface.c
@@ -12,14 +12,14 @@
#include <string.h>
#include "./vpx_config.h"
-#include "vpx/vpx_encoder.h"
-#include "vpx_ports/vpx_once.h"
-#include "vpx/internal/vpx_codec_internal.h"
+#include "aom/vpx_encoder.h"
+#include "aom_ports/vpx_once.h"
+#include "aom/internal/vpx_codec_internal.h"
#include "./vpx_version.h"
-#include "vp10/encoder/encoder.h"
-#include "vpx/vp8cx.h"
-#include "vp10/encoder/firstpass.h"
-#include "vp10/vp10_iface_common.h"
+#include "av1/encoder/encoder.h"
+#include "aom/vp8cx.h"
+#include "av1/encoder/firstpass.h"
+#include "av1/vp10_iface_common.h"
struct vp10_extracfg {
int cpu_used; // available cpu percentage in 1/16
diff --git a/vp10/vp10_dx_iface.c b/av1/vp10_dx_iface.c
similarity index 98%
rename from vp10/vp10_dx_iface.c
rename to av1/vp10_dx_iface.c
index 23ba863..1b2a502 100644
--- a/vp10/vp10_dx_iface.c
+++ b/av1/vp10_dx_iface.c
@@ -14,20 +14,20 @@
#include "./vpx_config.h"
#include "./vpx_version.h"
-#include "vpx/internal/vpx_codec_internal.h"
-#include "vpx/vp8dx.h"
-#include "vpx/vpx_decoder.h"
-#include "vpx_dsp/bitreader_buffer.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_util/vpx_thread.h"
+#include "aom/internal/vpx_codec_internal.h"
+#include "aom/vp8dx.h"
+#include "aom/vpx_decoder.h"
+#include "aom_dsp/bitreader_buffer.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_util/vpx_thread.h"
-#include "vp10/common/alloccommon.h"
-#include "vp10/common/frame_buffers.h"
+#include "av1/common/alloccommon.h"
+#include "av1/common/frame_buffers.h"
-#include "vp10/decoder/decoder.h"
-#include "vp10/decoder/decodeframe.h"
+#include "av1/decoder/decoder.h"
+#include "av1/decoder/decodeframe.h"
-#include "vp10/vp10_iface_common.h"
+#include "av1/vp10_iface_common.h"
typedef vpx_codec_stream_info_t vp10_stream_info_t;
diff --git a/vp10/vp10_iface_common.h b/av1/vp10_iface_common.h
similarity index 99%
rename from vp10/vp10_iface_common.h
rename to av1/vp10_iface_common.h
index b930a2e..d512c87 100644
--- a/vp10/vp10_iface_common.h
+++ b/av1/vp10_iface_common.h
@@ -10,7 +10,7 @@
#ifndef VP10_VP10_IFACE_COMMON_H_
#define VP10_VP10_IFACE_COMMON_H_
-#include "vpx_ports/mem.h"
+#include "aom_ports/mem.h"
static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12,
void *user_priv) {
diff --git a/vp10/vp10cx.mk b/av1/vp10cx.mk
similarity index 100%
rename from vp10/vp10cx.mk
rename to av1/vp10cx.mk
diff --git a/vp10/vp10dx.mk b/av1/vp10dx.mk
similarity index 100%
rename from vp10/vp10dx.mk
rename to av1/vp10dx.mk
diff --git a/build/make/rtcd.pl b/build/make/rtcd.pl
index 50093f4..59dbe52 100755
--- a/build/make/rtcd.pl
+++ b/build/make/rtcd.pl
@@ -250,7 +250,7 @@
common_top;
print <<EOF;
#ifdef RTCD_C
-#include "vpx_ports/x86.h"
+#include "aom_ports/x86.h"
static void setup_rtcd_internal(void)
{
int flags = x86_simd_caps();
@@ -285,7 +285,7 @@
#include "vpx_config.h"
#ifdef RTCD_C
-#include "vpx_ports/arm.h"
+#include "aom_ports/arm.h"
static void setup_rtcd_internal(void)
{
int flags = arm_cpu_caps();
diff --git a/configure b/configure
index 22d13d7..b82a4a4 100755
--- a/configure
+++ b/configure
@@ -185,7 +185,7 @@
fi
# disable codecs when their source directory does not exist
-[ -d "${source_path}/vp10" ] || disable_feature vp10
+[ -d "${source_path}/av1" ] || disable_feature vp10
# install everything except the sources, by default. sources will have
# to be enabled when doing dist builds, since that's no longer a common
@@ -544,7 +544,7 @@
check_header pthread.h
check_header unistd.h # for sysconf(3) and friends.
- check_header vpx/vpx_integer.h -I${source_path} && enable_feature vpx_ports
+ check_header aom/vpx_integer.h -I${source_path} && enable_feature vpx_ports
}
process_toolchain() {
@@ -700,7 +700,7 @@
process "$@"
print_webm_license ${BUILD_PFX}vpx_config.c "/*" " */"
cat <<EOF >> ${BUILD_PFX}vpx_config.c
-#include "vpx/vpx_codec.h"
+#include "aom/vpx_codec.h"
static const char* const cfg = "$CONFIGURE_ARGS";
const char *vpx_codec_build_config(void) {return cfg;}
EOF
diff --git a/examples.mk b/examples.mk
index 0b4df5a..aa3e060 100644
--- a/examples.mk
+++ b/examples.mk
@@ -56,11 +56,11 @@
# while EXAMPLES demonstrate specific portions of the API.
UTILS-$(CONFIG_DECODERS) += vpxdec.c
vpxdec.SRCS += md5_utils.c md5_utils.h
-vpxdec.SRCS += vpx_ports/mem_ops.h
-vpxdec.SRCS += vpx_ports/mem_ops_aligned.h
-vpxdec.SRCS += vpx_ports/msvc.h
-vpxdec.SRCS += vpx_ports/vpx_timer.h
-vpxdec.SRCS += vpx/vpx_integer.h
+vpxdec.SRCS += aom_ports/mem_ops.h
+vpxdec.SRCS += aom_ports/mem_ops_aligned.h
+vpxdec.SRCS += aom_ports/msvc.h
+vpxdec.SRCS += aom_ports/vpx_timer.h
+vpxdec.SRCS += aom/vpx_integer.h
vpxdec.SRCS += args.c args.h
vpxdec.SRCS += ivfdec.c ivfdec.h
vpxdec.SRCS += tools_common.c tools_common.h
@@ -82,10 +82,10 @@
vpxenc.SRCS += rate_hist.c rate_hist.h
vpxenc.SRCS += tools_common.c tools_common.h
vpxenc.SRCS += warnings.c warnings.h
-vpxenc.SRCS += vpx_ports/mem_ops.h
-vpxenc.SRCS += vpx_ports/mem_ops_aligned.h
-vpxenc.SRCS += vpx_ports/msvc.h
-vpxenc.SRCS += vpx_ports/vpx_timer.h
+vpxenc.SRCS += aom_ports/mem_ops.h
+vpxenc.SRCS += aom_ports/mem_ops_aligned.h
+vpxenc.SRCS += aom_ports/msvc.h
+vpxenc.SRCS += aom_ports/vpx_timer.h
vpxenc.SRCS += vpxstats.c vpxstats.h
ifeq ($(CONFIG_LIBYUV),yes)
vpxenc.SRCS += $(LIBYUV_SRCS)
@@ -103,7 +103,7 @@
vpx_temporal_svc_encoder.SRCS += tools_common.c tools_common.h
vpx_temporal_svc_encoder.SRCS += video_common.h
vpx_temporal_svc_encoder.SRCS += video_writer.h video_writer.c
-vpx_temporal_svc_encoder.SRCS += vpx_ports/msvc.h
+vpx_temporal_svc_encoder.SRCS += aom_ports/msvc.h
vpx_temporal_svc_encoder.GUID = B18C08F2-A439-4502-A78E-849BE3D60947
vpx_temporal_svc_encoder.DESCRIPTION = Temporal SVC Encoder
EXAMPLES-$(CONFIG_DECODERS) += simple_decoder.c
@@ -112,9 +112,9 @@
simple_decoder.SRCS += tools_common.h tools_common.c
simple_decoder.SRCS += video_common.h
simple_decoder.SRCS += video_reader.h video_reader.c
-simple_decoder.SRCS += vpx_ports/mem_ops.h
-simple_decoder.SRCS += vpx_ports/mem_ops_aligned.h
-simple_decoder.SRCS += vpx_ports/msvc.h
+simple_decoder.SRCS += aom_ports/mem_ops.h
+simple_decoder.SRCS += aom_ports/mem_ops_aligned.h
+simple_decoder.SRCS += aom_ports/msvc.h
simple_decoder.DESCRIPTION = Simplified decoder loop
EXAMPLES-$(CONFIG_DECODERS) += decode_to_md5.c
decode_to_md5.SRCS += md5_utils.h md5_utils.c
@@ -122,9 +122,9 @@
decode_to_md5.SRCS += tools_common.h tools_common.c
decode_to_md5.SRCS += video_common.h
decode_to_md5.SRCS += video_reader.h video_reader.c
-decode_to_md5.SRCS += vpx_ports/mem_ops.h
-decode_to_md5.SRCS += vpx_ports/mem_ops_aligned.h
-decode_to_md5.SRCS += vpx_ports/msvc.h
+decode_to_md5.SRCS += aom_ports/mem_ops.h
+decode_to_md5.SRCS += aom_ports/mem_ops_aligned.h
+decode_to_md5.SRCS += aom_ports/msvc.h
decode_to_md5.GUID = 59120B9B-2735-4BFE-B022-146CA340FE42
decode_to_md5.DESCRIPTION = Frame by frame MD5 checksum
EXAMPLES-$(CONFIG_ENCODERS) += simple_encoder.c
@@ -132,7 +132,7 @@
simple_encoder.SRCS += tools_common.h tools_common.c
simple_encoder.SRCS += video_common.h
simple_encoder.SRCS += video_writer.h video_writer.c
-simple_encoder.SRCS += vpx_ports/msvc.h
+simple_encoder.SRCS += aom_ports/msvc.h
simple_encoder.GUID = 4607D299-8A71-4D2C-9B1D-071899B6FBFD
simple_encoder.DESCRIPTION = Simplified encoder loop
EXAMPLES-$(CONFIG_ENCODERS) += twopass_encoder.c
@@ -140,7 +140,7 @@
twopass_encoder.SRCS += tools_common.h tools_common.c
twopass_encoder.SRCS += video_common.h
twopass_encoder.SRCS += video_writer.h video_writer.c
-twopass_encoder.SRCS += vpx_ports/msvc.h
+twopass_encoder.SRCS += aom_ports/msvc.h
twopass_encoder.GUID = 73494FA6-4AF9-4763-8FBB-265C92402FD8
twopass_encoder.DESCRIPTION = Two-pass encoder loop
EXAMPLES-$(CONFIG_DECODERS) += decode_with_drops.c
@@ -148,9 +148,9 @@
decode_with_drops.SRCS += tools_common.h tools_common.c
decode_with_drops.SRCS += video_common.h
decode_with_drops.SRCS += video_reader.h video_reader.c
-decode_with_drops.SRCS += vpx_ports/mem_ops.h
-decode_with_drops.SRCS += vpx_ports/mem_ops_aligned.h
-decode_with_drops.SRCS += vpx_ports/msvc.h
+decode_with_drops.SRCS += aom_ports/mem_ops.h
+decode_with_drops.SRCS += aom_ports/mem_ops_aligned.h
+decode_with_drops.SRCS += aom_ports/msvc.h
decode_with_drops.GUID = CE5C53C4-8DDA-438A-86ED-0DDD3CDB8D26
decode_with_drops.DESCRIPTION = Drops frames while decoding
EXAMPLES-$(CONFIG_ENCODERS) += set_maps.c
@@ -158,7 +158,7 @@
set_maps.SRCS += tools_common.h tools_common.c
set_maps.SRCS += video_common.h
set_maps.SRCS += video_writer.h video_writer.c
-set_maps.SRCS += vpx_ports/msvc.h
+set_maps.SRCS += aom_ports/msvc.h
set_maps.GUID = ECB2D24D-98B8-4015-A465-A4AF3DCC145F
set_maps.DESCRIPTION = Set active and ROI maps
@@ -188,8 +188,8 @@
INC_PATH-yes := $(SRC_PATH_BARE)/../include
else
LIB_PATH-yes += $(if $(BUILD_PFX),$(BUILD_PFX),.)
- INC_PATH-$(CONFIG_VP10_DECODER) += $(SRC_PATH_BARE)/vp10
- INC_PATH-$(CONFIG_VP10_ENCODER) += $(SRC_PATH_BARE)/vp10
+ INC_PATH-$(CONFIG_VP10_DECODER) += $(SRC_PATH_BARE)/av1
+ INC_PATH-$(CONFIG_VP10_ENCODER) += $(SRC_PATH_BARE)/av1
endif
INC_PATH-$(CONFIG_LIBYUV) += $(SRC_PATH_BARE)/third_party/libyuv/include
LIB_PATH := $(call enabled,LIB_PATH)
@@ -253,7 +253,7 @@
# Set up additional MSVS environment
ifeq ($(CONFIG_MSVS),yes)
-CODEC_LIB=$(if $(CONFIG_SHARED),vpx,$(if $(CONFIG_STATIC_MSVCRT),vpxmt,vpxmd))
+CODEC_LIB=$(if $(CONFIG_SHARED),aom,$(if $(CONFIG_STATIC_MSVCRT),aommt,aommd))
# This variable uses deferred expansion intentionally, since the results of
# $(wildcard) may change during the course of the Make.
VS_PLATFORMS = $(foreach d,$(wildcard */Release/$(CODEC_LIB).lib),$(word 1,$(subst /, ,$(d))))
diff --git a/examples/decode_to_md5.c b/examples/decode_to_md5.c
index 51959f3..3cf40e6 100644
--- a/examples/decode_to_md5.c
+++ b/examples/decode_to_md5.c
@@ -33,8 +33,8 @@
#include <stdlib.h>
#include <string.h>
-#include "vpx/vp8dx.h"
-#include "vpx/vpx_decoder.h"
+#include "aom/vp8dx.h"
+#include "aom/vpx_decoder.h"
#include "../md5_utils.h"
#include "../tools_common.h"
diff --git a/examples/decode_with_drops.c b/examples/decode_with_drops.c
index 29b8be9..17757f6 100644
--- a/examples/decode_with_drops.c
+++ b/examples/decode_with_drops.c
@@ -56,8 +56,8 @@
#include <stdlib.h>
#include <string.h>
-#include "vpx/vp8dx.h"
-#include "vpx/vpx_decoder.h"
+#include "aom/vp8dx.h"
+#include "aom/vpx_decoder.h"
#include "../tools_common.h"
#include "../video_reader.h"
diff --git a/examples/set_maps.c b/examples/set_maps.c
index d128e7d..ae6a113 100644
--- a/examples/set_maps.c
+++ b/examples/set_maps.c
@@ -46,8 +46,8 @@
#include <stdlib.h>
#include <string.h>
-#include "vpx/vp8cx.h"
-#include "vpx/vpx_encoder.h"
+#include "aom/vp8cx.h"
+#include "aom/vpx_encoder.h"
#include "../tools_common.h"
#include "../video_writer.h"
diff --git a/examples/simple_decoder.c b/examples/simple_decoder.c
index 2bb1a05..b20e3c6 100644
--- a/examples/simple_decoder.c
+++ b/examples/simple_decoder.c
@@ -79,7 +79,7 @@
#include <stdlib.h>
#include <string.h>
-#include "vpx/vpx_decoder.h"
+#include "aom/vpx_decoder.h"
#include "../tools_common.h"
#include "../video_reader.h"
diff --git a/examples/simple_encoder.c b/examples/simple_encoder.c
index ae0c660..1fb7997 100644
--- a/examples/simple_encoder.c
+++ b/examples/simple_encoder.c
@@ -99,7 +99,7 @@
#include <stdlib.h>
#include <string.h>
-#include "vpx/vpx_encoder.h"
+#include "aom/vpx_encoder.h"
#include "../tools_common.h"
#include "../video_writer.h"
diff --git a/examples/twopass_encoder.c b/examples/twopass_encoder.c
index 41d17d0..d6ad96e 100644
--- a/examples/twopass_encoder.c
+++ b/examples/twopass_encoder.c
@@ -51,7 +51,7 @@
#include <stdlib.h>
#include <string.h>
-#include "vpx/vpx_encoder.h"
+#include "aom/vpx_encoder.h"
#include "../tools_common.h"
#include "../video_writer.h"
diff --git a/examples/vpx_temporal_svc_encoder.c b/examples/vpx_temporal_svc_encoder.c
index 68b2f71..bc0a3dd 100644
--- a/examples/vpx_temporal_svc_encoder.c
+++ b/examples/vpx_temporal_svc_encoder.c
@@ -19,9 +19,9 @@
#include <string.h>
#include "./vpx_config.h"
-#include "../vpx_ports/vpx_timer.h"
-#include "vpx/vp8cx.h"
-#include "vpx/vpx_encoder.h"
+#include "../aom_ports/vpx_timer.h"
+#include "aom/vp8cx.h"
+#include "aom/vpx_encoder.h"
#include "../tools_common.h"
#include "../video_writer.h"
diff --git a/ivfdec.c b/ivfdec.c
index d37e0bc..a9aee92 100644
--- a/ivfdec.c
+++ b/ivfdec.c
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <string.h>
-#include "vpx_ports/mem_ops.h"
+#include "aom_ports/mem_ops.h"
#include "./ivfdec.h"
diff --git a/ivfenc.c b/ivfenc.c
index a50d318..b1e0f77 100644
--- a/ivfenc.c
+++ b/ivfenc.c
@@ -10,8 +10,8 @@
#include "./ivfenc.h"
-#include "vpx/vpx_encoder.h"
-#include "vpx_ports/mem_ops.h"
+#include "aom/vpx_encoder.h"
+#include "aom_ports/mem_ops.h"
void ivf_write_file_header(FILE *outfile, const struct vpx_codec_enc_cfg *cfg,
unsigned int fourcc, int frame_cnt) {
diff --git a/libs.mk b/libs.mk
index bbbc7dd..7506df5 100644
--- a/libs.mk
+++ b/libs.mk
@@ -34,57 +34,57 @@
CODEC_SRCS-yes += CHANGELOG
CODEC_SRCS-yes += libs.mk
-include $(SRC_PATH_BARE)/vpx/vpx_codec.mk
-CODEC_SRCS-yes += $(addprefix vpx/,$(call enabled,API_SRCS))
-CODEC_DOC_SRCS += $(addprefix vpx/,$(call enabled,API_DOC_SRCS))
+include $(SRC_PATH_BARE)/aom/vpx_codec.mk
+CODEC_SRCS-yes += $(addprefix aom/,$(call enabled,API_SRCS))
+CODEC_DOC_SRCS += $(addprefix aom/,$(call enabled,API_DOC_SRCS))
-include $(SRC_PATH_BARE)/vpx_mem/vpx_mem.mk
-CODEC_SRCS-yes += $(addprefix vpx_mem/,$(call enabled,MEM_SRCS))
+include $(SRC_PATH_BARE)/aom_mem/vpx_mem.mk
+CODEC_SRCS-yes += $(addprefix aom_mem/,$(call enabled,MEM_SRCS))
-include $(SRC_PATH_BARE)/vpx_scale/vpx_scale.mk
-CODEC_SRCS-yes += $(addprefix vpx_scale/,$(call enabled,SCALE_SRCS))
+include $(SRC_PATH_BARE)/aom_scale/vpx_scale.mk
+CODEC_SRCS-yes += $(addprefix aom_scale/,$(call enabled,SCALE_SRCS))
-include $(SRC_PATH_BARE)/vpx_ports/vpx_ports.mk
-CODEC_SRCS-yes += $(addprefix vpx_ports/,$(call enabled,PORTS_SRCS))
+include $(SRC_PATH_BARE)/aom_ports/vpx_ports.mk
+CODEC_SRCS-yes += $(addprefix aom_ports/,$(call enabled,PORTS_SRCS))
-include $(SRC_PATH_BARE)/vpx_dsp/vpx_dsp.mk
-CODEC_SRCS-yes += $(addprefix vpx_dsp/,$(call enabled,DSP_SRCS))
+include $(SRC_PATH_BARE)/aom_dsp/vpx_dsp.mk
+CODEC_SRCS-yes += $(addprefix aom_dsp/,$(call enabled,DSP_SRCS))
-include $(SRC_PATH_BARE)/vpx_util/vpx_util.mk
-CODEC_SRCS-yes += $(addprefix vpx_util/,$(call enabled,UTIL_SRCS))
+include $(SRC_PATH_BARE)/aom_util/vpx_util.mk
+CODEC_SRCS-yes += $(addprefix aom_util/,$(call enabled,UTIL_SRCS))
# VP10 make file
ifeq ($(CONFIG_VP10),yes)
- VP10_PREFIX=vp10/
+ VP10_PREFIX=av1/
include $(SRC_PATH_BARE)/$(VP10_PREFIX)vp10_common.mk
endif
ifeq ($(CONFIG_VP10_ENCODER),yes)
- VP10_PREFIX=vp10/
+ VP10_PREFIX=av1/
include $(SRC_PATH_BARE)/$(VP10_PREFIX)vp10cx.mk
CODEC_SRCS-yes += $(addprefix $(VP10_PREFIX),$(call enabled,VP10_CX_SRCS))
CODEC_EXPORTS-yes += $(addprefix $(VP10_PREFIX),$(VP10_CX_EXPORTS))
- CODEC_SRCS-yes += $(VP10_PREFIX)vp10cx.mk vpx/vp8.h vpx/vp8cx.h
- INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8cx.h
- INSTALL-LIBS-$(CONFIG_SPATIAL_SVC) += include/vpx/svc_context.h
- INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP10_PREFIX)/%
- CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8cx.h
+ CODEC_SRCS-yes += $(VP10_PREFIX)vp10cx.mk aom/vp8.h aom/vp8cx.h
+ INSTALL-LIBS-yes += include/aom/vp8.h include/aom/vp8cx.h
+ INSTALL-LIBS-$(CONFIG_SPATIAL_SVC) += include/aom/svc_context.h
+ INSTALL_MAPS += include/aom/% $(SRC_PATH_BARE)/$(VP10_PREFIX)/%
+ CODEC_DOC_SRCS += aom/vp8.h aom/vp8cx.h
CODEC_DOC_SECTIONS += vp10 vp10_encoder
endif
ifeq ($(CONFIG_VP10_DECODER),yes)
- VP10_PREFIX=vp10/
+ VP10_PREFIX=av1/
include $(SRC_PATH_BARE)/$(VP10_PREFIX)vp10dx.mk
CODEC_SRCS-yes += $(addprefix $(VP10_PREFIX),$(call enabled,VP10_DX_SRCS))
CODEC_EXPORTS-yes += $(addprefix $(VP10_PREFIX),$(VP10_DX_EXPORTS))
- CODEC_SRCS-yes += $(VP10_PREFIX)vp10dx.mk vpx/vp8.h vpx/vp8dx.h
- INSTALL-LIBS-yes += include/vpx/vp8.h include/vpx/vp8dx.h
- INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/$(VP10_PREFIX)/%
- CODEC_DOC_SRCS += vpx/vp8.h vpx/vp8dx.h
+ CODEC_SRCS-yes += $(VP10_PREFIX)vp10dx.mk aom/vp8.h aom/vp8dx.h
+ INSTALL-LIBS-yes += include/aom/vp8.h include/aom/vp8dx.h
+ INSTALL_MAPS += include/aom/% $(SRC_PATH_BARE)/$(VP10_PREFIX)/%
+ CODEC_DOC_SRCS += aom/vp8.h aom/vp8dx.h
CODEC_DOC_SECTIONS += vp10 vp10_decoder
endif
-VP10_PREFIX=vp10/
+VP10_PREFIX=av1/
$(BUILD_PFX)$(VP10_PREFIX)%.c.o: CFLAGS += -Wextra
ifeq ($(CONFIG_ENCODERS),yes)
@@ -105,8 +105,8 @@
# The following pairs define a mapping of locations in the distribution
# tree to locations in the source/build trees.
-INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/vpx/%
-INSTALL_MAPS += include/vpx/% $(SRC_PATH_BARE)/vpx_ports/%
+INSTALL_MAPS += include/aom/% $(SRC_PATH_BARE)/aom/%
+INSTALL_MAPS += include/aom/% $(SRC_PATH_BARE)/aom_ports/%
INSTALL_MAPS += $(LIBSUBDIR)/% %
INSTALL_MAPS += src/% $(SRC_PATH_BARE)/%
ifeq ($(CONFIG_MSVS),yes)
@@ -116,25 +116,25 @@
CODEC_SRCS-yes += build/make/version.sh
CODEC_SRCS-yes += build/make/rtcd.pl
-CODEC_SRCS-yes += vpx_ports/emmintrin_compat.h
-CODEC_SRCS-yes += vpx_ports/mem_ops.h
-CODEC_SRCS-yes += vpx_ports/mem_ops_aligned.h
-CODEC_SRCS-yes += vpx_ports/vpx_once.h
+CODEC_SRCS-yes += aom_ports/emmintrin_compat.h
+CODEC_SRCS-yes += aom_ports/mem_ops.h
+CODEC_SRCS-yes += aom_ports/mem_ops_aligned.h
+CODEC_SRCS-yes += aom_ports/vpx_once.h
CODEC_SRCS-yes += $(BUILD_PFX)vpx_config.c
INSTALL-SRCS-no += $(BUILD_PFX)vpx_config.c
ifeq ($(ARCH_X86)$(ARCH_X86_64),yes)
INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += third_party/x86inc/x86inc.asm
endif
-CODEC_EXPORTS-yes += vpx/exports_com
-CODEC_EXPORTS-$(CONFIG_ENCODERS) += vpx/exports_enc
-CODEC_EXPORTS-$(CONFIG_DECODERS) += vpx/exports_dec
+CODEC_EXPORTS-yes += aom/exports_com
+CODEC_EXPORTS-$(CONFIG_ENCODERS) += aom/exports_enc
+CODEC_EXPORTS-$(CONFIG_DECODERS) += aom/exports_dec
-INSTALL-LIBS-yes += include/vpx/vpx_codec.h
-INSTALL-LIBS-yes += include/vpx/vpx_frame_buffer.h
-INSTALL-LIBS-yes += include/vpx/vpx_image.h
-INSTALL-LIBS-yes += include/vpx/vpx_integer.h
-INSTALL-LIBS-$(CONFIG_DECODERS) += include/vpx/vpx_decoder.h
-INSTALL-LIBS-$(CONFIG_ENCODERS) += include/vpx/vpx_encoder.h
+INSTALL-LIBS-yes += include/aom/vpx_codec.h
+INSTALL-LIBS-yes += include/aom/vpx_frame_buffer.h
+INSTALL-LIBS-yes += include/aom/vpx_image.h
+INSTALL-LIBS-yes += include/aom/vpx_integer.h
+INSTALL-LIBS-$(CONFIG_DECODERS) += include/aom/vpx_decoder.h
+INSTALL-LIBS-$(CONFIG_ENCODERS) += include/aom/vpx_encoder.h
ifeq ($(CONFIG_EXTERNAL_BUILD),yes)
ifeq ($(CONFIG_MSVS),yes)
INSTALL-LIBS-yes += $(foreach p,$(VS_PLATFORMS),$(LIBSUBDIR)/$(p)/$(CODEC_LIB).lib)
diff --git a/rate_hist.h b/rate_hist.h
index 00a1676..df49411 100644
--- a/rate_hist.h
+++ b/rate_hist.h
@@ -11,7 +11,7 @@
#ifndef RATE_HIST_H_
#define RATE_HIST_H_
-#include "vpx/vpx_encoder.h"
+#include "aom/vpx_encoder.h"
#ifdef __cplusplus
extern "C" {
diff --git a/test/acm_random.h b/test/acm_random.h
index 8ebe388..0f89bfa 100644
--- a/test/acm_random.h
+++ b/test/acm_random.h
@@ -13,7 +13,7 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
namespace libvpx_test {
diff --git a/test/arf_freq_test.cc b/test/arf_freq_test.cc
index 79fa804..aa40840 100644
--- a/test/arf_freq_test.cc
+++ b/test/arf_freq_test.cc
@@ -15,7 +15,7 @@
#include "test/util.h"
#include "test/y4m_video_source.h"
#include "test/yuv_video_source.h"
-#include "vp10/encoder/ratectrl.h"
+#include "av1/encoder/ratectrl.h"
namespace {
diff --git a/test/avg_test.cc b/test/avg_test.cc
index ae35fb1..612c7bb 100644
--- a/test/avg_test.cc
+++ b/test/avg_test.cc
@@ -21,7 +21,7 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
-#include "vpx_mem/vpx_mem.h"
+#include "aom_mem/vpx_mem.h"
using libvpx_test::ACMRandom;
diff --git a/test/boolcoder_test.cc b/test/boolcoder_test.cc
index 2121e95..094794f 100644
--- a/test/boolcoder_test.cc
+++ b/test/boolcoder_test.cc
@@ -15,9 +15,9 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/acm_random.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_dsp/bitreader.h"
-#include "vpx_dsp/bitwriter.h"
+#include "aom/vpx_integer.h"
+#include "aom_dsp/bitreader.h"
+#include "aom_dsp/bitwriter.h"
using libvpx_test::ACMRandom;
diff --git a/test/clear_system_state.h b/test/clear_system_state.h
index 044a5c7..c2285a0 100644
--- a/test/clear_system_state.h
+++ b/test/clear_system_state.h
@@ -12,7 +12,7 @@
#include "./vpx_config.h"
#if ARCH_X86 || ARCH_X86_64
-#include "vpx_ports/x86.h"
+#include "aom_ports/x86.h"
#endif
namespace libvpx_test {
diff --git a/test/codec_factory.h b/test/codec_factory.h
index ebc8401..a1895dd 100644
--- a/test/codec_factory.h
+++ b/test/codec_factory.h
@@ -11,13 +11,13 @@
#define TEST_CODEC_FACTORY_H_
#include "./vpx_config.h"
-#include "vpx/vpx_decoder.h"
-#include "vpx/vpx_encoder.h"
+#include "aom/vpx_decoder.h"
+#include "aom/vpx_encoder.h"
#if CONFIG_VP10_ENCODER
-#include "vpx/vp8cx.h"
+#include "aom/vp8cx.h"
#endif
#if CONFIG_VP10_DECODER
-#include "vpx/vp8dx.h"
+#include "aom/vp8dx.h"
#endif
#include "test/decode_test_driver.h"
diff --git a/test/convolve_test.cc b/test/convolve_test.cc
index 88eb654..fe7f312 100644
--- a/test/convolve_test.cc
+++ b/test/convolve_test.cc
@@ -19,12 +19,12 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
-#include "vp10/common/common.h"
-#include "vp10/common/filter.h"
-#include "vpx_dsp/vpx_dsp_common.h"
-#include "vpx_dsp/vpx_filter.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
+#include "av1/common/common.h"
+#include "av1/common/filter.h"
+#include "aom_dsp/vpx_dsp_common.h"
+#include "aom_dsp/vpx_filter.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
namespace {
diff --git a/test/datarate_test.cc b/test/datarate_test.cc
index f46881e..c3f4e97 100644
--- a/test/datarate_test.cc
+++ b/test/datarate_test.cc
@@ -14,7 +14,7 @@
#include "test/i420_video_source.h"
#include "test/util.h"
#include "test/y4m_video_source.h"
-#include "vpx/vpx_codec.h"
+#include "aom/vpx_codec.h"
namespace {
diff --git a/test/dct16x16_test.cc b/test/dct16x16_test.cc
index fc3fc23..ef01c74 100644
--- a/test/dct16x16_test.cc
+++ b/test/dct16x16_test.cc
@@ -20,11 +20,11 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
-#include "vp10/common/entropy.h"
-#include "vp10/common/scan.h"
-#include "vpx/vpx_codec.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/mem.h"
+#include "av1/common/entropy.h"
+#include "av1/common/scan.h"
+#include "aom/vpx_codec.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/mem.h"
using libvpx_test::ACMRandom;
diff --git a/test/dct32x32_test.cc b/test/dct32x32_test.cc
index a45fab3..63304ce 100644
--- a/test/dct32x32_test.cc
+++ b/test/dct32x32_test.cc
@@ -21,10 +21,10 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
-#include "vp10/common/entropy.h"
-#include "vpx/vpx_codec.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/mem.h"
+#include "av1/common/entropy.h"
+#include "aom/vpx_codec.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/mem.h"
using libvpx_test::ACMRandom;
diff --git a/test/decode_api_test.cc b/test/decode_api_test.cc
index 6571154..6aceaba 100644
--- a/test/decode_api_test.cc
+++ b/test/decode_api_test.cc
@@ -12,8 +12,8 @@
#include "./vpx_config.h"
#include "test/ivf_video_source.h"
-#include "vpx/vp8dx.h"
-#include "vpx/vpx_decoder.h"
+#include "aom/vp8dx.h"
+#include "aom/vpx_decoder.h"
namespace {
diff --git a/test/decode_perf_test.cc b/test/decode_perf_test.cc
index 23e3b6b..2c2a3e8 100644
--- a/test/decode_perf_test.cc
+++ b/test/decode_perf_test.cc
@@ -17,7 +17,7 @@
#include "test/md5_helper.h"
#include "test/util.h"
#include "test/webm_video_source.h"
-#include "vpx_ports/vpx_timer.h"
+#include "aom_ports/vpx_timer.h"
#include "./ivfenc.h"
#include "./vpx_version.h"
diff --git a/test/decode_test_driver.h b/test/decode_test_driver.h
index 553e81a..1950c99 100644
--- a/test/decode_test_driver.h
+++ b/test/decode_test_driver.h
@@ -13,7 +13,7 @@
#include <cstring>
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
-#include "vpx/vpx_decoder.h"
+#include "aom/vpx_decoder.h"
namespace libvpx_test {
diff --git a/test/denoiser_sse2_test.cc b/test/denoiser_sse2_test.cc
index 0a0fee7..c2e5556 100644
--- a/test/denoiser_sse2_test.cc
+++ b/test/denoiser_sse2_test.cc
@@ -18,11 +18,11 @@
#include "test/register_state_check.h"
#include "test/util.h"
-#include "vpx_scale/yv12config.h"
-#include "vpx/vpx_integer.h"
-#include "vp10/common/reconinter.h"
-#include "vp10/encoder/context_tree.h"
-#include "vp10/encoder/denoiser.h"
+#include "aom_scale/yv12config.h"
+#include "aom/vpx_integer.h"
+#include "av1/common/reconinter.h"
+#include "av1/encoder/context_tree.h"
+#include "av1/encoder/denoiser.h"
using libvpx_test::ACMRandom;
diff --git a/test/divu_small_test.cc b/test/divu_small_test.cc
index a7cfbf7..5f6aac7 100644
--- a/test/divu_small_test.cc
+++ b/test/divu_small_test.cc
@@ -27,7 +27,7 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "test/acm_random.h"
-#include "vp10/common/odintrin.h"
+#include "av1/common/odintrin.h"
using libvpx_test::ACMRandom;
diff --git a/test/encode_api_test.cc b/test/encode_api_test.cc
index e27bd12..5faf701 100644
--- a/test/encode_api_test.cc
+++ b/test/encode_api_test.cc
@@ -11,8 +11,8 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
-#include "vpx/vp8cx.h"
-#include "vpx/vpx_encoder.h"
+#include "aom/vp8cx.h"
+#include "aom/vpx_encoder.h"
namespace {
diff --git a/test/encode_perf_test.cc b/test/encode_perf_test.cc
index 2411dcd..2931dee 100644
--- a/test/encode_perf_test.cc
+++ b/test/encode_perf_test.cc
@@ -16,7 +16,7 @@
#include "test/i420_video_source.h"
#include "test/util.h"
#include "test/y4m_video_source.h"
-#include "vpx_ports/vpx_timer.h"
+#include "aom_ports/vpx_timer.h"
namespace {
diff --git a/test/encode_test_driver.h b/test/encode_test_driver.h
index 9f27e0d..c16de40 100644
--- a/test/encode_test_driver.h
+++ b/test/encode_test_driver.h
@@ -17,9 +17,9 @@
#include "./vpx_config.h"
#if CONFIG_VP10_ENCODER
-#include "vpx/vp8cx.h"
+#include "aom/vp8cx.h"
#endif
-#include "vpx/vpx_encoder.h"
+#include "aom/vpx_encoder.h"
namespace libvpx_test {
diff --git a/test/encoder_parms_get_to_decoder.cc b/test/encoder_parms_get_to_decoder.cc
index 3dd5f86..1983aba 100644
--- a/test/encoder_parms_get_to_decoder.cc
+++ b/test/encoder_parms_get_to_decoder.cc
@@ -14,7 +14,7 @@
#include "test/encode_test_driver.h"
#include "test/util.h"
#include "test/y4m_video_source.h"
-#include "vp10/vp10_dx_iface.c"
+#include "av1/vp10_dx_iface.c"
namespace {
diff --git a/test/error_block_test.cc b/test/error_block_test.cc
index 72c4714..c1ea0da 100644
--- a/test/error_block_test.cc
+++ b/test/error_block_test.cc
@@ -20,9 +20,9 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
-#include "vp10/common/entropy.h"
-#include "vpx/vpx_codec.h"
-#include "vpx/vpx_integer.h"
+#include "av1/common/entropy.h"
+#include "aom/vpx_codec.h"
+#include "aom/vpx_integer.h"
using libvpx_test::ACMRandom;
diff --git a/test/fdct4x4_test.cc b/test/fdct4x4_test.cc
index 261fb29..b36b1cf 100644
--- a/test/fdct4x4_test.cc
+++ b/test/fdct4x4_test.cc
@@ -20,10 +20,10 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
-#include "vp10/common/entropy.h"
-#include "vpx/vpx_codec.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/mem.h"
+#include "av1/common/entropy.h"
+#include "aom/vpx_codec.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/mem.h"
using libvpx_test::ACMRandom;
diff --git a/test/fdct8x8_test.cc b/test/fdct8x8_test.cc
index 5b832b9..4a9137c 100644
--- a/test/fdct8x8_test.cc
+++ b/test/fdct8x8_test.cc
@@ -20,11 +20,11 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
-#include "vp10/common/entropy.h"
-#include "vp10/common/scan.h"
-#include "vpx/vpx_codec.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/mem.h"
+#include "av1/common/entropy.h"
+#include "av1/common/scan.h"
+#include "aom/vpx_codec.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/mem.h"
using libvpx_test::ACMRandom;
diff --git a/test/idct8x8_test.cc b/test/idct8x8_test.cc
index b7256f2..9d04950 100644
--- a/test/idct8x8_test.cc
+++ b/test/idct8x8_test.cc
@@ -16,7 +16,7 @@
#include "./vpx_dsp_rtcd.h"
#include "test/acm_random.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
using libvpx_test::ACMRandom;
diff --git a/test/idct_test.cc b/test/idct_test.cc
index 39db3e4..988beb8 100644
--- a/test/idct_test.cc
+++ b/test/idct_test.cc
@@ -15,7 +15,7 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
typedef void (*IdctFunc)(int16_t *input, unsigned char *pred_ptr,
int pred_stride, unsigned char *dst_ptr,
diff --git a/test/intrapred_test.cc b/test/intrapred_test.cc
index 535a568..7bff52f 100644
--- a/test/intrapred_test.cc
+++ b/test/intrapred_test.cc
@@ -18,9 +18,9 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
-#include "vp10/common/blockd.h"
-#include "vp10/common/pred_common.h"
-#include "vpx_mem/vpx_mem.h"
+#include "av1/common/blockd.h"
+#include "av1/common/pred_common.h"
+#include "aom_mem/vpx_mem.h"
namespace {
diff --git a/test/lpf_8_test.cc b/test/lpf_8_test.cc
index 5184fcc..1a2b066 100644
--- a/test/lpf_8_test.cc
+++ b/test/lpf_8_test.cc
@@ -20,9 +20,9 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
-#include "vp10/common/entropy.h"
-#include "vp10/common/loopfilter.h"
-#include "vpx/vpx_integer.h"
+#include "av1/common/entropy.h"
+#include "av1/common/loopfilter.h"
+#include "aom/vpx_integer.h"
using libvpx_test::ACMRandom;
diff --git a/test/md5_helper.h b/test/md5_helper.h
index ef310a2..0898e02 100644
--- a/test/md5_helper.h
+++ b/test/md5_helper.h
@@ -12,7 +12,7 @@
#define TEST_MD5_HELPER_H_
#include "./md5_utils.h"
-#include "vpx/vpx_decoder.h"
+#include "aom/vpx_decoder.h"
namespace libvpx_test {
class MD5 {
diff --git a/test/partial_idct_test.cc b/test/partial_idct_test.cc
index b5fad61..5b27ae1 100644
--- a/test/partial_idct_test.cc
+++ b/test/partial_idct_test.cc
@@ -20,9 +20,9 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
-#include "vp10/common/blockd.h"
-#include "vp10/common/scan.h"
-#include "vpx/vpx_integer.h"
+#include "av1/common/blockd.h"
+#include "av1/common/scan.h"
+#include "aom/vpx_integer.h"
using libvpx_test::ACMRandom;
diff --git a/test/quantize_test.cc b/test/quantize_test.cc
index a38b8e6..51ad522 100644
--- a/test/quantize_test.cc
+++ b/test/quantize_test.cc
@@ -20,10 +20,10 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
-#include "vp10/common/entropy.h"
-#include "vp10/common/scan.h"
-#include "vpx/vpx_codec.h"
-#include "vpx/vpx_integer.h"
+#include "av1/common/entropy.h"
+#include "av1/common/scan.h"
+#include "aom/vpx_codec.h"
+#include "aom/vpx_integer.h"
using libvpx_test::ACMRandom;
diff --git a/test/register_state_check.h b/test/register_state_check.h
index 496780e..cfafed6 100644
--- a/test/register_state_check.h
+++ b/test/register_state_check.h
@@ -13,7 +13,7 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vpx_config.h"
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
// ASM_REGISTER_STATE_CHECK(asm_function)
// Minimally validates the environment pre & post function execution. This
diff --git a/test/sad_test.cc b/test/sad_test.cc
index b4d8148..9284650 100644
--- a/test/sad_test.cc
+++ b/test/sad_test.cc
@@ -20,9 +20,9 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
-#include "vpx/vpx_codec.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
+#include "aom/vpx_codec.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
typedef unsigned int (*SadMxNFunc)(const uint8_t *src_ptr, int src_stride,
const uint8_t *ref_ptr, int ref_stride);
diff --git a/test/subtract_test.cc b/test/subtract_test.cc
index 56bbf47..db7f60c 100644
--- a/test/subtract_test.cc
+++ b/test/subtract_test.cc
@@ -16,8 +16,8 @@
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
-#include "vp10/common/blockd.h"
-#include "vpx_mem/vpx_mem.h"
+#include "av1/common/blockd.h"
+#include "aom_mem/vpx_mem.h"
typedef void (*SubtractFunc)(int rows, int cols, int16_t *diff_ptr,
ptrdiff_t diff_stride, const uint8_t *src_ptr,
diff --git a/test/svc_test.cc b/test/svc_test.cc
index 2055915..e61a1b8 100644
--- a/test/svc_test.cc
+++ b/test/svc_test.cc
@@ -14,11 +14,11 @@
#include "test/decode_test_driver.h"
#include "test/i420_video_source.h"
-#include "vp10/decoder/decoder.h"
+#include "av1/decoder/decoder.h"
-#include "vpx/svc_context.h"
-#include "vpx/vp8cx.h"
-#include "vpx/vpx_encoder.h"
+#include "aom/svc_context.h"
+#include "aom/vp8cx.h"
+#include "aom/vpx_encoder.h"
namespace {
diff --git a/test/test_intra_pred_speed.cc b/test/test_intra_pred_speed.cc
index 9062f23..2f70994 100644
--- a/test/test_intra_pred_speed.cc
+++ b/test/test_intra_pred_speed.cc
@@ -18,9 +18,9 @@
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/md5_helper.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/mem.h"
-#include "vpx_ports/vpx_timer.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/mem.h"
+#include "aom_ports/vpx_timer.h"
// -----------------------------------------------------------------------------
diff --git a/test/test_libvpx.cc b/test/test_libvpx.cc
index 9867f9d..3f650ab 100644
--- a/test/test_libvpx.cc
+++ b/test/test_libvpx.cc
@@ -13,7 +13,7 @@
#include "./vpx_config.h"
#if ARCH_X86 || ARCH_X86_64
-#include "vpx_ports/x86.h"
+#include "aom_ports/x86.h"
#endif
extern "C" {
#if CONFIG_VP10
diff --git a/test/tile_independence_test.cc b/test/tile_independence_test.cc
index c28ae88..41e4e4b 100644
--- a/test/tile_independence_test.cc
+++ b/test/tile_independence_test.cc
@@ -17,7 +17,7 @@
#include "test/i420_video_source.h"
#include "test/util.h"
#include "test/md5_helper.h"
-#include "vpx_mem/vpx_mem.h"
+#include "aom_mem/vpx_mem.h"
namespace {
class TileIndependenceTest : public ::libvpx_test::EncoderTest,
diff --git a/test/util.h b/test/util.h
index 0ef2ad8..6567253 100644
--- a/test/util.h
+++ b/test/util.h
@@ -14,7 +14,7 @@
#include <stdio.h>
#include <math.h>
#include "third_party/googletest/src/include/gtest/gtest.h"
-#include "vpx/vpx_image.h"
+#include "aom/vpx_image.h"
// Macros
#define GET_PARAM(k) std::tr1::get<k>(GetParam())
diff --git a/test/variance_test.cc b/test/variance_test.cc
index 2a33ed8..c325901 100644
--- a/test/variance_test.cc
+++ b/test/variance_test.cc
@@ -18,10 +18,10 @@
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
-#include "vpx/vpx_codec.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_mem/vpx_mem.h"
-#include "vpx_ports/mem.h"
+#include "aom/vpx_codec.h"
+#include "aom/vpx_integer.h"
+#include "aom_mem/vpx_mem.h"
+#include "aom_ports/mem.h"
namespace {
diff --git a/test/video_source.h b/test/video_source.h
index 268d4e7..503e401 100644
--- a/test/video_source.h
+++ b/test/video_source.h
@@ -20,7 +20,7 @@
#include <cstdlib>
#include <string>
#include "test/acm_random.h"
-#include "vpx/vpx_encoder.h"
+#include "aom/vpx_encoder.h"
namespace libvpx_test {
diff --git a/test/vp10_dct_test.cc b/test/vp10_dct_test.cc
index a287e0c..6331d69 100644
--- a/test/vp10_dct_test.cc
+++ b/test/vp10_dct_test.cc
@@ -16,11 +16,11 @@
#include "test/acm_random.h"
#include "test/util.h"
#include "./vpx_config.h"
-#include "vpx_ports/msvc.h"
+#include "aom_ports/msvc.h"
#undef CONFIG_COEFFICIENT_RANGE_CHECKING
#define CONFIG_COEFFICIENT_RANGE_CHECKING 1
-#include "vp10/encoder/dct.c"
+#include "av1/encoder/dct.c"
using libvpx_test::ACMRandom;
diff --git a/test/vp10_inv_txfm_test.cc b/test/vp10_inv_txfm_test.cc
index aa91f19..e4b4d90 100644
--- a/test/vp10_inv_txfm_test.cc
+++ b/test/vp10_inv_txfm_test.cc
@@ -20,10 +20,10 @@
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
#include "test/util.h"
-#include "vp10/common/blockd.h"
-#include "vp10/common/scan.h"
-#include "vpx/vpx_integer.h"
-#include "vp10/common/vp10_inv_txfm.h"
+#include "av1/common/blockd.h"
+#include "av1/common/scan.h"
+#include "aom/vpx_integer.h"
+#include "av1/common/vp10_inv_txfm.h"
using libvpx_test::ACMRandom;
diff --git a/test/yuv_video_source.h b/test/yuv_video_source.h
index 2cc81a0..4f6c08e 100644
--- a/test/yuv_video_source.h
+++ b/test/yuv_video_source.h
@@ -15,7 +15,7 @@
#include <string>
#include "test/video_source.h"
-#include "vpx/vpx_image.h"
+#include "aom/vpx_image.h"
namespace libvpx_test {
diff --git a/tools_common.c b/tools_common.c
index 4f0417e..9f240a3 100644
--- a/tools_common.c
+++ b/tools_common.c
@@ -17,11 +17,11 @@
#include "./tools_common.h"
#if CONFIG_VP10_ENCODER
-#include "vpx/vp8cx.h"
+#include "aom/vp8cx.h"
#endif
#if CONFIG_VP10_DECODER
-#include "vpx/vp8dx.h"
+#include "aom/vp8dx.h"
#endif
#if defined(_WIN32) || defined(__OS2__)
diff --git a/tools_common.h b/tools_common.h
index 420af90..f9582ce 100644
--- a/tools_common.h
+++ b/tools_common.h
@@ -13,10 +13,10 @@
#include <stdio.h>
#include "./vpx_config.h"
-#include "vpx/vpx_codec.h"
-#include "vpx/vpx_image.h"
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/msvc.h"
+#include "aom/vpx_codec.h"
+#include "aom/vpx_image.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/msvc.h"
#if CONFIG_ENCODERS
#include "./y4minput.h"
diff --git a/video_reader.c b/video_reader.c
index a0ba252..c3a19d3 100644
--- a/video_reader.c
+++ b/video_reader.c
@@ -14,7 +14,7 @@
#include "./ivfdec.h"
#include "./video_reader.h"
-#include "vpx_ports/mem_ops.h"
+#include "aom_ports/mem_ops.h"
static const char *const kIVFSignature = "DKIF";
diff --git a/video_writer.c b/video_writer.c
index 56d428b..c0c292f 100644
--- a/video_writer.c
+++ b/video_writer.c
@@ -12,7 +12,7 @@
#include "./ivfenc.h"
#include "./video_writer.h"
-#include "vpx/vpx_encoder.h"
+#include "aom/vpx_encoder.h"
struct VpxVideoWriterStruct {
VpxVideoInfo info;
diff --git a/vp10/common/x86/vp10_fwd_dct32x32_impl_sse2.h b/vp10/common/x86/vp10_fwd_dct32x32_impl_sse2.h
deleted file mode 100644
index eea9f97..0000000
--- a/vp10/common/x86/vp10_fwd_dct32x32_impl_sse2.h
+++ /dev/null
@@ -1,3201 +0,0 @@
-/*
- * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include <emmintrin.h> // SSE2
-
-#include "./vp10_rtcd.h"
-#include "vp10/common/vp10_fwd_txfm.h"
-#include "vpx_dsp/txfm_common.h"
-#include "vpx_dsp/x86/txfm_common_sse2.h"
-
-// TODO(jingning) The high bit-depth version needs re-work for performance.
-// The current SSE2 implementation also causes cross reference to the static
-// functions in the C implementation file.
-#if DCT_HIGH_BIT_DEPTH
-#define ADD_EPI16 _mm_adds_epi16
-#define SUB_EPI16 _mm_subs_epi16
-#if FDCT32x32_HIGH_PRECISION
-void vp10_fdct32x32_rows_c(const int16_t *intermediate, tran_low_t *out) {
- int i, j;
- for (i = 0; i < 32; ++i) {
- tran_high_t temp_in[32], temp_out[32];
- for (j = 0; j < 32; ++j) temp_in[j] = intermediate[j * 32 + i];
- vp10_fdct32(temp_in, temp_out, 0);
- for (j = 0; j < 32; ++j)
- out[j + i * 32] =
- (tran_low_t)((temp_out[j] + 1 + (temp_out[j] < 0)) >> 2);
- }
-}
-#define HIGH_FDCT32x32_2D_C vp10_highbd_fdct32x32_c
-#define HIGH_FDCT32x32_2D_ROWS_C vp10_fdct32x32_rows_c
-#else
-void vp10_fdct32x32_rd_rows_c(const int16_t *intermediate, tran_low_t *out) {
- int i, j;
- for (i = 0; i < 32; ++i) {
- tran_high_t temp_in[32], temp_out[32];
- for (j = 0; j < 32; ++j) temp_in[j] = intermediate[j * 32 + i];
- vp10_fdct32(temp_in, temp_out, 1);
- for (j = 0; j < 32; ++j) out[j + i * 32] = (tran_low_t)temp_out[j];
- }
-}
-#define HIGH_FDCT32x32_2D_C vp10_highbd_fdct32x32_rd_c
-#define HIGH_FDCT32x32_2D_ROWS_C vp10_fdct32x32_rd_rows_c
-#endif // FDCT32x32_HIGH_PRECISION
-#else
-#define ADD_EPI16 _mm_add_epi16
-#define SUB_EPI16 _mm_sub_epi16
-#endif // DCT_HIGH_BIT_DEPTH
-
-void FDCT32x32_2D(const int16_t *input, tran_low_t *output_org, int stride) {
- // Calculate pre-multiplied strides
- const int str1 = stride;
- const int str2 = 2 * stride;
- const int str3 = 2 * stride + str1;
- // We need an intermediate buffer between passes.
- DECLARE_ALIGNED(16, int16_t, intermediate[32 * 32]);
- // Constants
- // When we use them, in one case, they are all the same. In all others
- // it's a pair of them that we need to repeat four times. This is done
- // by constructing the 32 bit constant corresponding to that pair.
- const __m128i k__cospi_p16_p16 = _mm_set1_epi16((int16_t)cospi_16_64);
- const __m128i k__cospi_p16_m16 = pair_set_epi16(+cospi_16_64, -cospi_16_64);
- const __m128i k__cospi_m08_p24 = pair_set_epi16(-cospi_8_64, cospi_24_64);
- const __m128i k__cospi_m24_m08 = pair_set_epi16(-cospi_24_64, -cospi_8_64);
- const __m128i k__cospi_p24_p08 = pair_set_epi16(+cospi_24_64, cospi_8_64);
- const __m128i k__cospi_p12_p20 = pair_set_epi16(+cospi_12_64, cospi_20_64);
- const __m128i k__cospi_m20_p12 = pair_set_epi16(-cospi_20_64, cospi_12_64);
- const __m128i k__cospi_m04_p28 = pair_set_epi16(-cospi_4_64, cospi_28_64);
- const __m128i k__cospi_p28_p04 = pair_set_epi16(+cospi_28_64, cospi_4_64);
- const __m128i k__cospi_m28_m04 = pair_set_epi16(-cospi_28_64, -cospi_4_64);
- const __m128i k__cospi_m12_m20 = pair_set_epi16(-cospi_12_64, -cospi_20_64);
- const __m128i k__cospi_p30_p02 = pair_set_epi16(+cospi_30_64, cospi_2_64);
- const __m128i k__cospi_p14_p18 = pair_set_epi16(+cospi_14_64, cospi_18_64);
- const __m128i k__cospi_p22_p10 = pair_set_epi16(+cospi_22_64, cospi_10_64);
- const __m128i k__cospi_p06_p26 = pair_set_epi16(+cospi_6_64, cospi_26_64);
- const __m128i k__cospi_m26_p06 = pair_set_epi16(-cospi_26_64, cospi_6_64);
- const __m128i k__cospi_m10_p22 = pair_set_epi16(-cospi_10_64, cospi_22_64);
- const __m128i k__cospi_m18_p14 = pair_set_epi16(-cospi_18_64, cospi_14_64);
- const __m128i k__cospi_m02_p30 = pair_set_epi16(-cospi_2_64, cospi_30_64);
- const __m128i k__cospi_p31_p01 = pair_set_epi16(+cospi_31_64, cospi_1_64);
- const __m128i k__cospi_p15_p17 = pair_set_epi16(+cospi_15_64, cospi_17_64);
- const __m128i k__cospi_p23_p09 = pair_set_epi16(+cospi_23_64, cospi_9_64);
- const __m128i k__cospi_p07_p25 = pair_set_epi16(+cospi_7_64, cospi_25_64);
- const __m128i k__cospi_m25_p07 = pair_set_epi16(-cospi_25_64, cospi_7_64);
- const __m128i k__cospi_m09_p23 = pair_set_epi16(-cospi_9_64, cospi_23_64);
- const __m128i k__cospi_m17_p15 = pair_set_epi16(-cospi_17_64, cospi_15_64);
- const __m128i k__cospi_m01_p31 = pair_set_epi16(-cospi_1_64, cospi_31_64);
- const __m128i k__cospi_p27_p05 = pair_set_epi16(+cospi_27_64, cospi_5_64);
- const __m128i k__cospi_p11_p21 = pair_set_epi16(+cospi_11_64, cospi_21_64);
- const __m128i k__cospi_p19_p13 = pair_set_epi16(+cospi_19_64, cospi_13_64);
- const __m128i k__cospi_p03_p29 = pair_set_epi16(+cospi_3_64, cospi_29_64);
- const __m128i k__cospi_m29_p03 = pair_set_epi16(-cospi_29_64, cospi_3_64);
- const __m128i k__cospi_m13_p19 = pair_set_epi16(-cospi_13_64, cospi_19_64);
- const __m128i k__cospi_m21_p11 = pair_set_epi16(-cospi_21_64, cospi_11_64);
- const __m128i k__cospi_m05_p27 = pair_set_epi16(-cospi_5_64, cospi_27_64);
- const __m128i k__DCT_CONST_ROUNDING = _mm_set1_epi32(DCT_CONST_ROUNDING);
- const __m128i kZero = _mm_set1_epi16(0);
- const __m128i kOne = _mm_set1_epi16(1);
- // Do the two transform/transpose passes
- int pass;
-#if DCT_HIGH_BIT_DEPTH
- int overflow;
-#endif
- for (pass = 0; pass < 2; ++pass) {
- // We process eight columns (transposed rows in second pass) at a time.
- int column_start;
- for (column_start = 0; column_start < 32; column_start += 8) {
- __m128i step1[32];
- __m128i step2[32];
- __m128i step3[32];
- __m128i out[32];
- // Stage 1
- // Note: even though all the loads below are aligned, using the aligned
- // intrinsic make the code slightly slower.
- if (0 == pass) {
- const int16_t *in = &input[column_start];
- // step1[i] = (in[ 0 * stride] + in[(32 - 1) * stride]) << 2;
- // Note: the next four blocks could be in a loop. That would help the
- // instruction cache but is actually slower.
- {
- const int16_t *ina = in + 0 * str1;
- const int16_t *inb = in + 31 * str1;
- __m128i *step1a = &step1[0];
- __m128i *step1b = &step1[31];
- const __m128i ina0 = _mm_loadu_si128((const __m128i *)(ina));
- const __m128i ina1 = _mm_loadu_si128((const __m128i *)(ina + str1));
- const __m128i ina2 = _mm_loadu_si128((const __m128i *)(ina + str2));
- const __m128i ina3 = _mm_loadu_si128((const __m128i *)(ina + str3));
- const __m128i inb3 = _mm_loadu_si128((const __m128i *)(inb - str3));
- const __m128i inb2 = _mm_loadu_si128((const __m128i *)(inb - str2));
- const __m128i inb1 = _mm_loadu_si128((const __m128i *)(inb - str1));
- const __m128i inb0 = _mm_loadu_si128((const __m128i *)(inb));
- step1a[0] = _mm_add_epi16(ina0, inb0);
- step1a[1] = _mm_add_epi16(ina1, inb1);
- step1a[2] = _mm_add_epi16(ina2, inb2);
- step1a[3] = _mm_add_epi16(ina3, inb3);
- step1b[-3] = _mm_sub_epi16(ina3, inb3);
- step1b[-2] = _mm_sub_epi16(ina2, inb2);
- step1b[-1] = _mm_sub_epi16(ina1, inb1);
- step1b[-0] = _mm_sub_epi16(ina0, inb0);
- step1a[0] = _mm_slli_epi16(step1a[0], 2);
- step1a[1] = _mm_slli_epi16(step1a[1], 2);
- step1a[2] = _mm_slli_epi16(step1a[2], 2);
- step1a[3] = _mm_slli_epi16(step1a[3], 2);
- step1b[-3] = _mm_slli_epi16(step1b[-3], 2);
- step1b[-2] = _mm_slli_epi16(step1b[-2], 2);
- step1b[-1] = _mm_slli_epi16(step1b[-1], 2);
- step1b[-0] = _mm_slli_epi16(step1b[-0], 2);
- }
- {
- const int16_t *ina = in + 4 * str1;
- const int16_t *inb = in + 27 * str1;
- __m128i *step1a = &step1[4];
- __m128i *step1b = &step1[27];
- const __m128i ina0 = _mm_loadu_si128((const __m128i *)(ina));
- const __m128i ina1 = _mm_loadu_si128((const __m128i *)(ina + str1));
- const __m128i ina2 = _mm_loadu_si128((const __m128i *)(ina + str2));
- const __m128i ina3 = _mm_loadu_si128((const __m128i *)(ina + str3));
- const __m128i inb3 = _mm_loadu_si128((const __m128i *)(inb - str3));
- const __m128i inb2 = _mm_loadu_si128((const __m128i *)(inb - str2));
- const __m128i inb1 = _mm_loadu_si128((const __m128i *)(inb - str1));
- const __m128i inb0 = _mm_loadu_si128((const __m128i *)(inb));
- step1a[0] = _mm_add_epi16(ina0, inb0);
- step1a[1] = _mm_add_epi16(ina1, inb1);
- step1a[2] = _mm_add_epi16(ina2, inb2);
- step1a[3] = _mm_add_epi16(ina3, inb3);
- step1b[-3] = _mm_sub_epi16(ina3, inb3);
- step1b[-2] = _mm_sub_epi16(ina2, inb2);
- step1b[-1] = _mm_sub_epi16(ina1, inb1);
- step1b[-0] = _mm_sub_epi16(ina0, inb0);
- step1a[0] = _mm_slli_epi16(step1a[0], 2);
- step1a[1] = _mm_slli_epi16(step1a[1], 2);
- step1a[2] = _mm_slli_epi16(step1a[2], 2);
- step1a[3] = _mm_slli_epi16(step1a[3], 2);
- step1b[-3] = _mm_slli_epi16(step1b[-3], 2);
- step1b[-2] = _mm_slli_epi16(step1b[-2], 2);
- step1b[-1] = _mm_slli_epi16(step1b[-1], 2);
- step1b[-0] = _mm_slli_epi16(step1b[-0], 2);
- }
- {
- const int16_t *ina = in + 8 * str1;
- const int16_t *inb = in + 23 * str1;
- __m128i *step1a = &step1[8];
- __m128i *step1b = &step1[23];
- const __m128i ina0 = _mm_loadu_si128((const __m128i *)(ina));
- const __m128i ina1 = _mm_loadu_si128((const __m128i *)(ina + str1));
- const __m128i ina2 = _mm_loadu_si128((const __m128i *)(ina + str2));
- const __m128i ina3 = _mm_loadu_si128((const __m128i *)(ina + str3));
- const __m128i inb3 = _mm_loadu_si128((const __m128i *)(inb - str3));
- const __m128i inb2 = _mm_loadu_si128((const __m128i *)(inb - str2));
- const __m128i inb1 = _mm_loadu_si128((const __m128i *)(inb - str1));
- const __m128i inb0 = _mm_loadu_si128((const __m128i *)(inb));
- step1a[0] = _mm_add_epi16(ina0, inb0);
- step1a[1] = _mm_add_epi16(ina1, inb1);
- step1a[2] = _mm_add_epi16(ina2, inb2);
- step1a[3] = _mm_add_epi16(ina3, inb3);
- step1b[-3] = _mm_sub_epi16(ina3, inb3);
- step1b[-2] = _mm_sub_epi16(ina2, inb2);
- step1b[-1] = _mm_sub_epi16(ina1, inb1);
- step1b[-0] = _mm_sub_epi16(ina0, inb0);
- step1a[0] = _mm_slli_epi16(step1a[0], 2);
- step1a[1] = _mm_slli_epi16(step1a[1], 2);
- step1a[2] = _mm_slli_epi16(step1a[2], 2);
- step1a[3] = _mm_slli_epi16(step1a[3], 2);
- step1b[-3] = _mm_slli_epi16(step1b[-3], 2);
- step1b[-2] = _mm_slli_epi16(step1b[-2], 2);
- step1b[-1] = _mm_slli_epi16(step1b[-1], 2);
- step1b[-0] = _mm_slli_epi16(step1b[-0], 2);
- }
- {
- const int16_t *ina = in + 12 * str1;
- const int16_t *inb = in + 19 * str1;
- __m128i *step1a = &step1[12];
- __m128i *step1b = &step1[19];
- const __m128i ina0 = _mm_loadu_si128((const __m128i *)(ina));
- const __m128i ina1 = _mm_loadu_si128((const __m128i *)(ina + str1));
- const __m128i ina2 = _mm_loadu_si128((const __m128i *)(ina + str2));
- const __m128i ina3 = _mm_loadu_si128((const __m128i *)(ina + str3));
- const __m128i inb3 = _mm_loadu_si128((const __m128i *)(inb - str3));
- const __m128i inb2 = _mm_loadu_si128((const __m128i *)(inb - str2));
- const __m128i inb1 = _mm_loadu_si128((const __m128i *)(inb - str1));
- const __m128i inb0 = _mm_loadu_si128((const __m128i *)(inb));
- step1a[0] = _mm_add_epi16(ina0, inb0);
- step1a[1] = _mm_add_epi16(ina1, inb1);
- step1a[2] = _mm_add_epi16(ina2, inb2);
- step1a[3] = _mm_add_epi16(ina3, inb3);
- step1b[-3] = _mm_sub_epi16(ina3, inb3);
- step1b[-2] = _mm_sub_epi16(ina2, inb2);
- step1b[-1] = _mm_sub_epi16(ina1, inb1);
- step1b[-0] = _mm_sub_epi16(ina0, inb0);
- step1a[0] = _mm_slli_epi16(step1a[0], 2);
- step1a[1] = _mm_slli_epi16(step1a[1], 2);
- step1a[2] = _mm_slli_epi16(step1a[2], 2);
- step1a[3] = _mm_slli_epi16(step1a[3], 2);
- step1b[-3] = _mm_slli_epi16(step1b[-3], 2);
- step1b[-2] = _mm_slli_epi16(step1b[-2], 2);
- step1b[-1] = _mm_slli_epi16(step1b[-1], 2);
- step1b[-0] = _mm_slli_epi16(step1b[-0], 2);
- }
- } else {
- int16_t *in = &intermediate[column_start];
- // step1[i] = in[ 0 * 32] + in[(32 - 1) * 32];
- // Note: using the same approach as above to have common offset is
- // counter-productive as all offsets can be calculated at compile
- // time.
- // Note: the next four blocks could be in a loop. That would help the
- // instruction cache but is actually slower.
- {
- __m128i in00 = _mm_loadu_si128((const __m128i *)(in + 0 * 32));
- __m128i in01 = _mm_loadu_si128((const __m128i *)(in + 1 * 32));
- __m128i in02 = _mm_loadu_si128((const __m128i *)(in + 2 * 32));
- __m128i in03 = _mm_loadu_si128((const __m128i *)(in + 3 * 32));
- __m128i in28 = _mm_loadu_si128((const __m128i *)(in + 28 * 32));
- __m128i in29 = _mm_loadu_si128((const __m128i *)(in + 29 * 32));
- __m128i in30 = _mm_loadu_si128((const __m128i *)(in + 30 * 32));
- __m128i in31 = _mm_loadu_si128((const __m128i *)(in + 31 * 32));
- step1[0] = ADD_EPI16(in00, in31);
- step1[1] = ADD_EPI16(in01, in30);
- step1[2] = ADD_EPI16(in02, in29);
- step1[3] = ADD_EPI16(in03, in28);
- step1[28] = SUB_EPI16(in03, in28);
- step1[29] = SUB_EPI16(in02, in29);
- step1[30] = SUB_EPI16(in01, in30);
- step1[31] = SUB_EPI16(in00, in31);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x8(&step1[0], &step1[1], &step1[2],
- &step1[3], &step1[28], &step1[29],
- &step1[30], &step1[31]);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- __m128i in04 = _mm_loadu_si128((const __m128i *)(in + 4 * 32));
- __m128i in05 = _mm_loadu_si128((const __m128i *)(in + 5 * 32));
- __m128i in06 = _mm_loadu_si128((const __m128i *)(in + 6 * 32));
- __m128i in07 = _mm_loadu_si128((const __m128i *)(in + 7 * 32));
- __m128i in24 = _mm_loadu_si128((const __m128i *)(in + 24 * 32));
- __m128i in25 = _mm_loadu_si128((const __m128i *)(in + 25 * 32));
- __m128i in26 = _mm_loadu_si128((const __m128i *)(in + 26 * 32));
- __m128i in27 = _mm_loadu_si128((const __m128i *)(in + 27 * 32));
- step1[4] = ADD_EPI16(in04, in27);
- step1[5] = ADD_EPI16(in05, in26);
- step1[6] = ADD_EPI16(in06, in25);
- step1[7] = ADD_EPI16(in07, in24);
- step1[24] = SUB_EPI16(in07, in24);
- step1[25] = SUB_EPI16(in06, in25);
- step1[26] = SUB_EPI16(in05, in26);
- step1[27] = SUB_EPI16(in04, in27);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x8(&step1[4], &step1[5], &step1[6],
- &step1[7], &step1[24], &step1[25],
- &step1[26], &step1[27]);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- __m128i in08 = _mm_loadu_si128((const __m128i *)(in + 8 * 32));
- __m128i in09 = _mm_loadu_si128((const __m128i *)(in + 9 * 32));
- __m128i in10 = _mm_loadu_si128((const __m128i *)(in + 10 * 32));
- __m128i in11 = _mm_loadu_si128((const __m128i *)(in + 11 * 32));
- __m128i in20 = _mm_loadu_si128((const __m128i *)(in + 20 * 32));
- __m128i in21 = _mm_loadu_si128((const __m128i *)(in + 21 * 32));
- __m128i in22 = _mm_loadu_si128((const __m128i *)(in + 22 * 32));
- __m128i in23 = _mm_loadu_si128((const __m128i *)(in + 23 * 32));
- step1[8] = ADD_EPI16(in08, in23);
- step1[9] = ADD_EPI16(in09, in22);
- step1[10] = ADD_EPI16(in10, in21);
- step1[11] = ADD_EPI16(in11, in20);
- step1[20] = SUB_EPI16(in11, in20);
- step1[21] = SUB_EPI16(in10, in21);
- step1[22] = SUB_EPI16(in09, in22);
- step1[23] = SUB_EPI16(in08, in23);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x8(&step1[8], &step1[9], &step1[10],
- &step1[11], &step1[20], &step1[21],
- &step1[22], &step1[23]);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- __m128i in12 = _mm_loadu_si128((const __m128i *)(in + 12 * 32));
- __m128i in13 = _mm_loadu_si128((const __m128i *)(in + 13 * 32));
- __m128i in14 = _mm_loadu_si128((const __m128i *)(in + 14 * 32));
- __m128i in15 = _mm_loadu_si128((const __m128i *)(in + 15 * 32));
- __m128i in16 = _mm_loadu_si128((const __m128i *)(in + 16 * 32));
- __m128i in17 = _mm_loadu_si128((const __m128i *)(in + 17 * 32));
- __m128i in18 = _mm_loadu_si128((const __m128i *)(in + 18 * 32));
- __m128i in19 = _mm_loadu_si128((const __m128i *)(in + 19 * 32));
- step1[12] = ADD_EPI16(in12, in19);
- step1[13] = ADD_EPI16(in13, in18);
- step1[14] = ADD_EPI16(in14, in17);
- step1[15] = ADD_EPI16(in15, in16);
- step1[16] = SUB_EPI16(in15, in16);
- step1[17] = SUB_EPI16(in14, in17);
- step1[18] = SUB_EPI16(in13, in18);
- step1[19] = SUB_EPI16(in12, in19);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x8(&step1[12], &step1[13], &step1[14],
- &step1[15], &step1[16], &step1[17],
- &step1[18], &step1[19]);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- }
- // Stage 2
- {
- step2[0] = ADD_EPI16(step1[0], step1[15]);
- step2[1] = ADD_EPI16(step1[1], step1[14]);
- step2[2] = ADD_EPI16(step1[2], step1[13]);
- step2[3] = ADD_EPI16(step1[3], step1[12]);
- step2[4] = ADD_EPI16(step1[4], step1[11]);
- step2[5] = ADD_EPI16(step1[5], step1[10]);
- step2[6] = ADD_EPI16(step1[6], step1[9]);
- step2[7] = ADD_EPI16(step1[7], step1[8]);
- step2[8] = SUB_EPI16(step1[7], step1[8]);
- step2[9] = SUB_EPI16(step1[6], step1[9]);
- step2[10] = SUB_EPI16(step1[5], step1[10]);
- step2[11] = SUB_EPI16(step1[4], step1[11]);
- step2[12] = SUB_EPI16(step1[3], step1[12]);
- step2[13] = SUB_EPI16(step1[2], step1[13]);
- step2[14] = SUB_EPI16(step1[1], step1[14]);
- step2[15] = SUB_EPI16(step1[0], step1[15]);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x16(
- &step2[0], &step2[1], &step2[2], &step2[3], &step2[4], &step2[5],
- &step2[6], &step2[7], &step2[8], &step2[9], &step2[10], &step2[11],
- &step2[12], &step2[13], &step2[14], &step2[15]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- const __m128i s2_20_0 = _mm_unpacklo_epi16(step1[27], step1[20]);
- const __m128i s2_20_1 = _mm_unpackhi_epi16(step1[27], step1[20]);
- const __m128i s2_21_0 = _mm_unpacklo_epi16(step1[26], step1[21]);
- const __m128i s2_21_1 = _mm_unpackhi_epi16(step1[26], step1[21]);
- const __m128i s2_22_0 = _mm_unpacklo_epi16(step1[25], step1[22]);
- const __m128i s2_22_1 = _mm_unpackhi_epi16(step1[25], step1[22]);
- const __m128i s2_23_0 = _mm_unpacklo_epi16(step1[24], step1[23]);
- const __m128i s2_23_1 = _mm_unpackhi_epi16(step1[24], step1[23]);
- const __m128i s2_20_2 = _mm_madd_epi16(s2_20_0, k__cospi_p16_m16);
- const __m128i s2_20_3 = _mm_madd_epi16(s2_20_1, k__cospi_p16_m16);
- const __m128i s2_21_2 = _mm_madd_epi16(s2_21_0, k__cospi_p16_m16);
- const __m128i s2_21_3 = _mm_madd_epi16(s2_21_1, k__cospi_p16_m16);
- const __m128i s2_22_2 = _mm_madd_epi16(s2_22_0, k__cospi_p16_m16);
- const __m128i s2_22_3 = _mm_madd_epi16(s2_22_1, k__cospi_p16_m16);
- const __m128i s2_23_2 = _mm_madd_epi16(s2_23_0, k__cospi_p16_m16);
- const __m128i s2_23_3 = _mm_madd_epi16(s2_23_1, k__cospi_p16_m16);
- const __m128i s2_24_2 = _mm_madd_epi16(s2_23_0, k__cospi_p16_p16);
- const __m128i s2_24_3 = _mm_madd_epi16(s2_23_1, k__cospi_p16_p16);
- const __m128i s2_25_2 = _mm_madd_epi16(s2_22_0, k__cospi_p16_p16);
- const __m128i s2_25_3 = _mm_madd_epi16(s2_22_1, k__cospi_p16_p16);
- const __m128i s2_26_2 = _mm_madd_epi16(s2_21_0, k__cospi_p16_p16);
- const __m128i s2_26_3 = _mm_madd_epi16(s2_21_1, k__cospi_p16_p16);
- const __m128i s2_27_2 = _mm_madd_epi16(s2_20_0, k__cospi_p16_p16);
- const __m128i s2_27_3 = _mm_madd_epi16(s2_20_1, k__cospi_p16_p16);
- // dct_const_round_shift
- const __m128i s2_20_4 = _mm_add_epi32(s2_20_2, k__DCT_CONST_ROUNDING);
- const __m128i s2_20_5 = _mm_add_epi32(s2_20_3, k__DCT_CONST_ROUNDING);
- const __m128i s2_21_4 = _mm_add_epi32(s2_21_2, k__DCT_CONST_ROUNDING);
- const __m128i s2_21_5 = _mm_add_epi32(s2_21_3, k__DCT_CONST_ROUNDING);
- const __m128i s2_22_4 = _mm_add_epi32(s2_22_2, k__DCT_CONST_ROUNDING);
- const __m128i s2_22_5 = _mm_add_epi32(s2_22_3, k__DCT_CONST_ROUNDING);
- const __m128i s2_23_4 = _mm_add_epi32(s2_23_2, k__DCT_CONST_ROUNDING);
- const __m128i s2_23_5 = _mm_add_epi32(s2_23_3, k__DCT_CONST_ROUNDING);
- const __m128i s2_24_4 = _mm_add_epi32(s2_24_2, k__DCT_CONST_ROUNDING);
- const __m128i s2_24_5 = _mm_add_epi32(s2_24_3, k__DCT_CONST_ROUNDING);
- const __m128i s2_25_4 = _mm_add_epi32(s2_25_2, k__DCT_CONST_ROUNDING);
- const __m128i s2_25_5 = _mm_add_epi32(s2_25_3, k__DCT_CONST_ROUNDING);
- const __m128i s2_26_4 = _mm_add_epi32(s2_26_2, k__DCT_CONST_ROUNDING);
- const __m128i s2_26_5 = _mm_add_epi32(s2_26_3, k__DCT_CONST_ROUNDING);
- const __m128i s2_27_4 = _mm_add_epi32(s2_27_2, k__DCT_CONST_ROUNDING);
- const __m128i s2_27_5 = _mm_add_epi32(s2_27_3, k__DCT_CONST_ROUNDING);
- const __m128i s2_20_6 = _mm_srai_epi32(s2_20_4, DCT_CONST_BITS);
- const __m128i s2_20_7 = _mm_srai_epi32(s2_20_5, DCT_CONST_BITS);
- const __m128i s2_21_6 = _mm_srai_epi32(s2_21_4, DCT_CONST_BITS);
- const __m128i s2_21_7 = _mm_srai_epi32(s2_21_5, DCT_CONST_BITS);
- const __m128i s2_22_6 = _mm_srai_epi32(s2_22_4, DCT_CONST_BITS);
- const __m128i s2_22_7 = _mm_srai_epi32(s2_22_5, DCT_CONST_BITS);
- const __m128i s2_23_6 = _mm_srai_epi32(s2_23_4, DCT_CONST_BITS);
- const __m128i s2_23_7 = _mm_srai_epi32(s2_23_5, DCT_CONST_BITS);
- const __m128i s2_24_6 = _mm_srai_epi32(s2_24_4, DCT_CONST_BITS);
- const __m128i s2_24_7 = _mm_srai_epi32(s2_24_5, DCT_CONST_BITS);
- const __m128i s2_25_6 = _mm_srai_epi32(s2_25_4, DCT_CONST_BITS);
- const __m128i s2_25_7 = _mm_srai_epi32(s2_25_5, DCT_CONST_BITS);
- const __m128i s2_26_6 = _mm_srai_epi32(s2_26_4, DCT_CONST_BITS);
- const __m128i s2_26_7 = _mm_srai_epi32(s2_26_5, DCT_CONST_BITS);
- const __m128i s2_27_6 = _mm_srai_epi32(s2_27_4, DCT_CONST_BITS);
- const __m128i s2_27_7 = _mm_srai_epi32(s2_27_5, DCT_CONST_BITS);
- // Combine
- step2[20] = _mm_packs_epi32(s2_20_6, s2_20_7);
- step2[21] = _mm_packs_epi32(s2_21_6, s2_21_7);
- step2[22] = _mm_packs_epi32(s2_22_6, s2_22_7);
- step2[23] = _mm_packs_epi32(s2_23_6, s2_23_7);
- step2[24] = _mm_packs_epi32(s2_24_6, s2_24_7);
- step2[25] = _mm_packs_epi32(s2_25_6, s2_25_7);
- step2[26] = _mm_packs_epi32(s2_26_6, s2_26_7);
- step2[27] = _mm_packs_epi32(s2_27_6, s2_27_7);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x8(&step2[20], &step2[21], &step2[22],
- &step2[23], &step2[24], &step2[25],
- &step2[26], &step2[27]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
-
-#if !FDCT32x32_HIGH_PRECISION
- // dump the magnitude by half, hence the intermediate values are within
- // the range of 16 bits.
- if (1 == pass) {
- __m128i s3_00_0 = _mm_cmplt_epi16(step2[0], kZero);
- __m128i s3_01_0 = _mm_cmplt_epi16(step2[1], kZero);
- __m128i s3_02_0 = _mm_cmplt_epi16(step2[2], kZero);
- __m128i s3_03_0 = _mm_cmplt_epi16(step2[3], kZero);
- __m128i s3_04_0 = _mm_cmplt_epi16(step2[4], kZero);
- __m128i s3_05_0 = _mm_cmplt_epi16(step2[5], kZero);
- __m128i s3_06_0 = _mm_cmplt_epi16(step2[6], kZero);
- __m128i s3_07_0 = _mm_cmplt_epi16(step2[7], kZero);
- __m128i s2_08_0 = _mm_cmplt_epi16(step2[8], kZero);
- __m128i s2_09_0 = _mm_cmplt_epi16(step2[9], kZero);
- __m128i s3_10_0 = _mm_cmplt_epi16(step2[10], kZero);
- __m128i s3_11_0 = _mm_cmplt_epi16(step2[11], kZero);
- __m128i s3_12_0 = _mm_cmplt_epi16(step2[12], kZero);
- __m128i s3_13_0 = _mm_cmplt_epi16(step2[13], kZero);
- __m128i s2_14_0 = _mm_cmplt_epi16(step2[14], kZero);
- __m128i s2_15_0 = _mm_cmplt_epi16(step2[15], kZero);
- __m128i s3_16_0 = _mm_cmplt_epi16(step1[16], kZero);
- __m128i s3_17_0 = _mm_cmplt_epi16(step1[17], kZero);
- __m128i s3_18_0 = _mm_cmplt_epi16(step1[18], kZero);
- __m128i s3_19_0 = _mm_cmplt_epi16(step1[19], kZero);
- __m128i s3_20_0 = _mm_cmplt_epi16(step2[20], kZero);
- __m128i s3_21_0 = _mm_cmplt_epi16(step2[21], kZero);
- __m128i s3_22_0 = _mm_cmplt_epi16(step2[22], kZero);
- __m128i s3_23_0 = _mm_cmplt_epi16(step2[23], kZero);
- __m128i s3_24_0 = _mm_cmplt_epi16(step2[24], kZero);
- __m128i s3_25_0 = _mm_cmplt_epi16(step2[25], kZero);
- __m128i s3_26_0 = _mm_cmplt_epi16(step2[26], kZero);
- __m128i s3_27_0 = _mm_cmplt_epi16(step2[27], kZero);
- __m128i s3_28_0 = _mm_cmplt_epi16(step1[28], kZero);
- __m128i s3_29_0 = _mm_cmplt_epi16(step1[29], kZero);
- __m128i s3_30_0 = _mm_cmplt_epi16(step1[30], kZero);
- __m128i s3_31_0 = _mm_cmplt_epi16(step1[31], kZero);
-
- step2[0] = SUB_EPI16(step2[0], s3_00_0);
- step2[1] = SUB_EPI16(step2[1], s3_01_0);
- step2[2] = SUB_EPI16(step2[2], s3_02_0);
- step2[3] = SUB_EPI16(step2[3], s3_03_0);
- step2[4] = SUB_EPI16(step2[4], s3_04_0);
- step2[5] = SUB_EPI16(step2[5], s3_05_0);
- step2[6] = SUB_EPI16(step2[6], s3_06_0);
- step2[7] = SUB_EPI16(step2[7], s3_07_0);
- step2[8] = SUB_EPI16(step2[8], s2_08_0);
- step2[9] = SUB_EPI16(step2[9], s2_09_0);
- step2[10] = SUB_EPI16(step2[10], s3_10_0);
- step2[11] = SUB_EPI16(step2[11], s3_11_0);
- step2[12] = SUB_EPI16(step2[12], s3_12_0);
- step2[13] = SUB_EPI16(step2[13], s3_13_0);
- step2[14] = SUB_EPI16(step2[14], s2_14_0);
- step2[15] = SUB_EPI16(step2[15], s2_15_0);
- step1[16] = SUB_EPI16(step1[16], s3_16_0);
- step1[17] = SUB_EPI16(step1[17], s3_17_0);
- step1[18] = SUB_EPI16(step1[18], s3_18_0);
- step1[19] = SUB_EPI16(step1[19], s3_19_0);
- step2[20] = SUB_EPI16(step2[20], s3_20_0);
- step2[21] = SUB_EPI16(step2[21], s3_21_0);
- step2[22] = SUB_EPI16(step2[22], s3_22_0);
- step2[23] = SUB_EPI16(step2[23], s3_23_0);
- step2[24] = SUB_EPI16(step2[24], s3_24_0);
- step2[25] = SUB_EPI16(step2[25], s3_25_0);
- step2[26] = SUB_EPI16(step2[26], s3_26_0);
- step2[27] = SUB_EPI16(step2[27], s3_27_0);
- step1[28] = SUB_EPI16(step1[28], s3_28_0);
- step1[29] = SUB_EPI16(step1[29], s3_29_0);
- step1[30] = SUB_EPI16(step1[30], s3_30_0);
- step1[31] = SUB_EPI16(step1[31], s3_31_0);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x32(
- &step2[0], &step2[1], &step2[2], &step2[3], &step2[4], &step2[5],
- &step2[6], &step2[7], &step2[8], &step2[9], &step2[10], &step2[11],
- &step2[12], &step2[13], &step2[14], &step2[15], &step1[16],
- &step1[17], &step1[18], &step1[19], &step2[20], &step2[21],
- &step2[22], &step2[23], &step2[24], &step2[25], &step2[26],
- &step2[27], &step1[28], &step1[29], &step1[30], &step1[31]);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- step2[0] = _mm_add_epi16(step2[0], kOne);
- step2[1] = _mm_add_epi16(step2[1], kOne);
- step2[2] = _mm_add_epi16(step2[2], kOne);
- step2[3] = _mm_add_epi16(step2[3], kOne);
- step2[4] = _mm_add_epi16(step2[4], kOne);
- step2[5] = _mm_add_epi16(step2[5], kOne);
- step2[6] = _mm_add_epi16(step2[6], kOne);
- step2[7] = _mm_add_epi16(step2[7], kOne);
- step2[8] = _mm_add_epi16(step2[8], kOne);
- step2[9] = _mm_add_epi16(step2[9], kOne);
- step2[10] = _mm_add_epi16(step2[10], kOne);
- step2[11] = _mm_add_epi16(step2[11], kOne);
- step2[12] = _mm_add_epi16(step2[12], kOne);
- step2[13] = _mm_add_epi16(step2[13], kOne);
- step2[14] = _mm_add_epi16(step2[14], kOne);
- step2[15] = _mm_add_epi16(step2[15], kOne);
- step1[16] = _mm_add_epi16(step1[16], kOne);
- step1[17] = _mm_add_epi16(step1[17], kOne);
- step1[18] = _mm_add_epi16(step1[18], kOne);
- step1[19] = _mm_add_epi16(step1[19], kOne);
- step2[20] = _mm_add_epi16(step2[20], kOne);
- step2[21] = _mm_add_epi16(step2[21], kOne);
- step2[22] = _mm_add_epi16(step2[22], kOne);
- step2[23] = _mm_add_epi16(step2[23], kOne);
- step2[24] = _mm_add_epi16(step2[24], kOne);
- step2[25] = _mm_add_epi16(step2[25], kOne);
- step2[26] = _mm_add_epi16(step2[26], kOne);
- step2[27] = _mm_add_epi16(step2[27], kOne);
- step1[28] = _mm_add_epi16(step1[28], kOne);
- step1[29] = _mm_add_epi16(step1[29], kOne);
- step1[30] = _mm_add_epi16(step1[30], kOne);
- step1[31] = _mm_add_epi16(step1[31], kOne);
-
- step2[0] = _mm_srai_epi16(step2[0], 2);
- step2[1] = _mm_srai_epi16(step2[1], 2);
- step2[2] = _mm_srai_epi16(step2[2], 2);
- step2[3] = _mm_srai_epi16(step2[3], 2);
- step2[4] = _mm_srai_epi16(step2[4], 2);
- step2[5] = _mm_srai_epi16(step2[5], 2);
- step2[6] = _mm_srai_epi16(step2[6], 2);
- step2[7] = _mm_srai_epi16(step2[7], 2);
- step2[8] = _mm_srai_epi16(step2[8], 2);
- step2[9] = _mm_srai_epi16(step2[9], 2);
- step2[10] = _mm_srai_epi16(step2[10], 2);
- step2[11] = _mm_srai_epi16(step2[11], 2);
- step2[12] = _mm_srai_epi16(step2[12], 2);
- step2[13] = _mm_srai_epi16(step2[13], 2);
- step2[14] = _mm_srai_epi16(step2[14], 2);
- step2[15] = _mm_srai_epi16(step2[15], 2);
- step1[16] = _mm_srai_epi16(step1[16], 2);
- step1[17] = _mm_srai_epi16(step1[17], 2);
- step1[18] = _mm_srai_epi16(step1[18], 2);
- step1[19] = _mm_srai_epi16(step1[19], 2);
- step2[20] = _mm_srai_epi16(step2[20], 2);
- step2[21] = _mm_srai_epi16(step2[21], 2);
- step2[22] = _mm_srai_epi16(step2[22], 2);
- step2[23] = _mm_srai_epi16(step2[23], 2);
- step2[24] = _mm_srai_epi16(step2[24], 2);
- step2[25] = _mm_srai_epi16(step2[25], 2);
- step2[26] = _mm_srai_epi16(step2[26], 2);
- step2[27] = _mm_srai_epi16(step2[27], 2);
- step1[28] = _mm_srai_epi16(step1[28], 2);
- step1[29] = _mm_srai_epi16(step1[29], 2);
- step1[30] = _mm_srai_epi16(step1[30], 2);
- step1[31] = _mm_srai_epi16(step1[31], 2);
- }
-#endif // !FDCT32x32_HIGH_PRECISION
-
-#if FDCT32x32_HIGH_PRECISION
- if (pass == 0) {
-#endif
- // Stage 3
- {
- step3[0] = ADD_EPI16(step2[(8 - 1)], step2[0]);
- step3[1] = ADD_EPI16(step2[(8 - 2)], step2[1]);
- step3[2] = ADD_EPI16(step2[(8 - 3)], step2[2]);
- step3[3] = ADD_EPI16(step2[(8 - 4)], step2[3]);
- step3[4] = SUB_EPI16(step2[(8 - 5)], step2[4]);
- step3[5] = SUB_EPI16(step2[(8 - 6)], step2[5]);
- step3[6] = SUB_EPI16(step2[(8 - 7)], step2[6]);
- step3[7] = SUB_EPI16(step2[(8 - 8)], step2[7]);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x8(&step3[0], &step3[1], &step3[2],
- &step3[3], &step3[4], &step3[5],
- &step3[6], &step3[7]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- const __m128i s3_10_0 = _mm_unpacklo_epi16(step2[13], step2[10]);
- const __m128i s3_10_1 = _mm_unpackhi_epi16(step2[13], step2[10]);
- const __m128i s3_11_0 = _mm_unpacklo_epi16(step2[12], step2[11]);
- const __m128i s3_11_1 = _mm_unpackhi_epi16(step2[12], step2[11]);
- const __m128i s3_10_2 = _mm_madd_epi16(s3_10_0, k__cospi_p16_m16);
- const __m128i s3_10_3 = _mm_madd_epi16(s3_10_1, k__cospi_p16_m16);
- const __m128i s3_11_2 = _mm_madd_epi16(s3_11_0, k__cospi_p16_m16);
- const __m128i s3_11_3 = _mm_madd_epi16(s3_11_1, k__cospi_p16_m16);
- const __m128i s3_12_2 = _mm_madd_epi16(s3_11_0, k__cospi_p16_p16);
- const __m128i s3_12_3 = _mm_madd_epi16(s3_11_1, k__cospi_p16_p16);
- const __m128i s3_13_2 = _mm_madd_epi16(s3_10_0, k__cospi_p16_p16);
- const __m128i s3_13_3 = _mm_madd_epi16(s3_10_1, k__cospi_p16_p16);
- // dct_const_round_shift
- const __m128i s3_10_4 = _mm_add_epi32(s3_10_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_10_5 = _mm_add_epi32(s3_10_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_11_4 = _mm_add_epi32(s3_11_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_11_5 = _mm_add_epi32(s3_11_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_12_4 = _mm_add_epi32(s3_12_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_12_5 = _mm_add_epi32(s3_12_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_13_4 = _mm_add_epi32(s3_13_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_13_5 = _mm_add_epi32(s3_13_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_10_6 = _mm_srai_epi32(s3_10_4, DCT_CONST_BITS);
- const __m128i s3_10_7 = _mm_srai_epi32(s3_10_5, DCT_CONST_BITS);
- const __m128i s3_11_6 = _mm_srai_epi32(s3_11_4, DCT_CONST_BITS);
- const __m128i s3_11_7 = _mm_srai_epi32(s3_11_5, DCT_CONST_BITS);
- const __m128i s3_12_6 = _mm_srai_epi32(s3_12_4, DCT_CONST_BITS);
- const __m128i s3_12_7 = _mm_srai_epi32(s3_12_5, DCT_CONST_BITS);
- const __m128i s3_13_6 = _mm_srai_epi32(s3_13_4, DCT_CONST_BITS);
- const __m128i s3_13_7 = _mm_srai_epi32(s3_13_5, DCT_CONST_BITS);
- // Combine
- step3[10] = _mm_packs_epi32(s3_10_6, s3_10_7);
- step3[11] = _mm_packs_epi32(s3_11_6, s3_11_7);
- step3[12] = _mm_packs_epi32(s3_12_6, s3_12_7);
- step3[13] = _mm_packs_epi32(s3_13_6, s3_13_7);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x4(&step3[10], &step3[11], &step3[12],
- &step3[13]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- step3[16] = ADD_EPI16(step2[23], step1[16]);
- step3[17] = ADD_EPI16(step2[22], step1[17]);
- step3[18] = ADD_EPI16(step2[21], step1[18]);
- step3[19] = ADD_EPI16(step2[20], step1[19]);
- step3[20] = SUB_EPI16(step1[19], step2[20]);
- step3[21] = SUB_EPI16(step1[18], step2[21]);
- step3[22] = SUB_EPI16(step1[17], step2[22]);
- step3[23] = SUB_EPI16(step1[16], step2[23]);
- step3[24] = SUB_EPI16(step1[31], step2[24]);
- step3[25] = SUB_EPI16(step1[30], step2[25]);
- step3[26] = SUB_EPI16(step1[29], step2[26]);
- step3[27] = SUB_EPI16(step1[28], step2[27]);
- step3[28] = ADD_EPI16(step2[27], step1[28]);
- step3[29] = ADD_EPI16(step2[26], step1[29]);
- step3[30] = ADD_EPI16(step2[25], step1[30]);
- step3[31] = ADD_EPI16(step2[24], step1[31]);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x16(
- &step3[16], &step3[17], &step3[18], &step3[19], &step3[20],
- &step3[21], &step3[22], &step3[23], &step3[24], &step3[25],
- &step3[26], &step3[27], &step3[28], &step3[29], &step3[30],
- &step3[31]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
-
- // Stage 4
- {
- step1[0] = ADD_EPI16(step3[3], step3[0]);
- step1[1] = ADD_EPI16(step3[2], step3[1]);
- step1[2] = SUB_EPI16(step3[1], step3[2]);
- step1[3] = SUB_EPI16(step3[0], step3[3]);
- step1[8] = ADD_EPI16(step3[11], step2[8]);
- step1[9] = ADD_EPI16(step3[10], step2[9]);
- step1[10] = SUB_EPI16(step2[9], step3[10]);
- step1[11] = SUB_EPI16(step2[8], step3[11]);
- step1[12] = SUB_EPI16(step2[15], step3[12]);
- step1[13] = SUB_EPI16(step2[14], step3[13]);
- step1[14] = ADD_EPI16(step3[13], step2[14]);
- step1[15] = ADD_EPI16(step3[12], step2[15]);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x16(
- &step1[0], &step1[1], &step1[2], &step1[3], &step1[4], &step1[5],
- &step1[6], &step1[7], &step1[8], &step1[9], &step1[10],
- &step1[11], &step1[12], &step1[13], &step1[14], &step1[15]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- const __m128i s1_05_0 = _mm_unpacklo_epi16(step3[6], step3[5]);
- const __m128i s1_05_1 = _mm_unpackhi_epi16(step3[6], step3[5]);
- const __m128i s1_05_2 = _mm_madd_epi16(s1_05_0, k__cospi_p16_m16);
- const __m128i s1_05_3 = _mm_madd_epi16(s1_05_1, k__cospi_p16_m16);
- const __m128i s1_06_2 = _mm_madd_epi16(s1_05_0, k__cospi_p16_p16);
- const __m128i s1_06_3 = _mm_madd_epi16(s1_05_1, k__cospi_p16_p16);
- // dct_const_round_shift
- const __m128i s1_05_4 = _mm_add_epi32(s1_05_2, k__DCT_CONST_ROUNDING);
- const __m128i s1_05_5 = _mm_add_epi32(s1_05_3, k__DCT_CONST_ROUNDING);
- const __m128i s1_06_4 = _mm_add_epi32(s1_06_2, k__DCT_CONST_ROUNDING);
- const __m128i s1_06_5 = _mm_add_epi32(s1_06_3, k__DCT_CONST_ROUNDING);
- const __m128i s1_05_6 = _mm_srai_epi32(s1_05_4, DCT_CONST_BITS);
- const __m128i s1_05_7 = _mm_srai_epi32(s1_05_5, DCT_CONST_BITS);
- const __m128i s1_06_6 = _mm_srai_epi32(s1_06_4, DCT_CONST_BITS);
- const __m128i s1_06_7 = _mm_srai_epi32(s1_06_5, DCT_CONST_BITS);
- // Combine
- step1[5] = _mm_packs_epi32(s1_05_6, s1_05_7);
- step1[6] = _mm_packs_epi32(s1_06_6, s1_06_7);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x2(&step1[5], &step1[6]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- const __m128i s1_18_0 = _mm_unpacklo_epi16(step3[18], step3[29]);
- const __m128i s1_18_1 = _mm_unpackhi_epi16(step3[18], step3[29]);
- const __m128i s1_19_0 = _mm_unpacklo_epi16(step3[19], step3[28]);
- const __m128i s1_19_1 = _mm_unpackhi_epi16(step3[19], step3[28]);
- const __m128i s1_20_0 = _mm_unpacklo_epi16(step3[20], step3[27]);
- const __m128i s1_20_1 = _mm_unpackhi_epi16(step3[20], step3[27]);
- const __m128i s1_21_0 = _mm_unpacklo_epi16(step3[21], step3[26]);
- const __m128i s1_21_1 = _mm_unpackhi_epi16(step3[21], step3[26]);
- const __m128i s1_18_2 = _mm_madd_epi16(s1_18_0, k__cospi_m08_p24);
- const __m128i s1_18_3 = _mm_madd_epi16(s1_18_1, k__cospi_m08_p24);
- const __m128i s1_19_2 = _mm_madd_epi16(s1_19_0, k__cospi_m08_p24);
- const __m128i s1_19_3 = _mm_madd_epi16(s1_19_1, k__cospi_m08_p24);
- const __m128i s1_20_2 = _mm_madd_epi16(s1_20_0, k__cospi_m24_m08);
- const __m128i s1_20_3 = _mm_madd_epi16(s1_20_1, k__cospi_m24_m08);
- const __m128i s1_21_2 = _mm_madd_epi16(s1_21_0, k__cospi_m24_m08);
- const __m128i s1_21_3 = _mm_madd_epi16(s1_21_1, k__cospi_m24_m08);
- const __m128i s1_26_2 = _mm_madd_epi16(s1_21_0, k__cospi_m08_p24);
- const __m128i s1_26_3 = _mm_madd_epi16(s1_21_1, k__cospi_m08_p24);
- const __m128i s1_27_2 = _mm_madd_epi16(s1_20_0, k__cospi_m08_p24);
- const __m128i s1_27_3 = _mm_madd_epi16(s1_20_1, k__cospi_m08_p24);
- const __m128i s1_28_2 = _mm_madd_epi16(s1_19_0, k__cospi_p24_p08);
- const __m128i s1_28_3 = _mm_madd_epi16(s1_19_1, k__cospi_p24_p08);
- const __m128i s1_29_2 = _mm_madd_epi16(s1_18_0, k__cospi_p24_p08);
- const __m128i s1_29_3 = _mm_madd_epi16(s1_18_1, k__cospi_p24_p08);
- // dct_const_round_shift
- const __m128i s1_18_4 = _mm_add_epi32(s1_18_2, k__DCT_CONST_ROUNDING);
- const __m128i s1_18_5 = _mm_add_epi32(s1_18_3, k__DCT_CONST_ROUNDING);
- const __m128i s1_19_4 = _mm_add_epi32(s1_19_2, k__DCT_CONST_ROUNDING);
- const __m128i s1_19_5 = _mm_add_epi32(s1_19_3, k__DCT_CONST_ROUNDING);
- const __m128i s1_20_4 = _mm_add_epi32(s1_20_2, k__DCT_CONST_ROUNDING);
- const __m128i s1_20_5 = _mm_add_epi32(s1_20_3, k__DCT_CONST_ROUNDING);
- const __m128i s1_21_4 = _mm_add_epi32(s1_21_2, k__DCT_CONST_ROUNDING);
- const __m128i s1_21_5 = _mm_add_epi32(s1_21_3, k__DCT_CONST_ROUNDING);
- const __m128i s1_26_4 = _mm_add_epi32(s1_26_2, k__DCT_CONST_ROUNDING);
- const __m128i s1_26_5 = _mm_add_epi32(s1_26_3, k__DCT_CONST_ROUNDING);
- const __m128i s1_27_4 = _mm_add_epi32(s1_27_2, k__DCT_CONST_ROUNDING);
- const __m128i s1_27_5 = _mm_add_epi32(s1_27_3, k__DCT_CONST_ROUNDING);
- const __m128i s1_28_4 = _mm_add_epi32(s1_28_2, k__DCT_CONST_ROUNDING);
- const __m128i s1_28_5 = _mm_add_epi32(s1_28_3, k__DCT_CONST_ROUNDING);
- const __m128i s1_29_4 = _mm_add_epi32(s1_29_2, k__DCT_CONST_ROUNDING);
- const __m128i s1_29_5 = _mm_add_epi32(s1_29_3, k__DCT_CONST_ROUNDING);
- const __m128i s1_18_6 = _mm_srai_epi32(s1_18_4, DCT_CONST_BITS);
- const __m128i s1_18_7 = _mm_srai_epi32(s1_18_5, DCT_CONST_BITS);
- const __m128i s1_19_6 = _mm_srai_epi32(s1_19_4, DCT_CONST_BITS);
- const __m128i s1_19_7 = _mm_srai_epi32(s1_19_5, DCT_CONST_BITS);
- const __m128i s1_20_6 = _mm_srai_epi32(s1_20_4, DCT_CONST_BITS);
- const __m128i s1_20_7 = _mm_srai_epi32(s1_20_5, DCT_CONST_BITS);
- const __m128i s1_21_6 = _mm_srai_epi32(s1_21_4, DCT_CONST_BITS);
- const __m128i s1_21_7 = _mm_srai_epi32(s1_21_5, DCT_CONST_BITS);
- const __m128i s1_26_6 = _mm_srai_epi32(s1_26_4, DCT_CONST_BITS);
- const __m128i s1_26_7 = _mm_srai_epi32(s1_26_5, DCT_CONST_BITS);
- const __m128i s1_27_6 = _mm_srai_epi32(s1_27_4, DCT_CONST_BITS);
- const __m128i s1_27_7 = _mm_srai_epi32(s1_27_5, DCT_CONST_BITS);
- const __m128i s1_28_6 = _mm_srai_epi32(s1_28_4, DCT_CONST_BITS);
- const __m128i s1_28_7 = _mm_srai_epi32(s1_28_5, DCT_CONST_BITS);
- const __m128i s1_29_6 = _mm_srai_epi32(s1_29_4, DCT_CONST_BITS);
- const __m128i s1_29_7 = _mm_srai_epi32(s1_29_5, DCT_CONST_BITS);
- // Combine
- step1[18] = _mm_packs_epi32(s1_18_6, s1_18_7);
- step1[19] = _mm_packs_epi32(s1_19_6, s1_19_7);
- step1[20] = _mm_packs_epi32(s1_20_6, s1_20_7);
- step1[21] = _mm_packs_epi32(s1_21_6, s1_21_7);
- step1[26] = _mm_packs_epi32(s1_26_6, s1_26_7);
- step1[27] = _mm_packs_epi32(s1_27_6, s1_27_7);
- step1[28] = _mm_packs_epi32(s1_28_6, s1_28_7);
- step1[29] = _mm_packs_epi32(s1_29_6, s1_29_7);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x8(&step1[18], &step1[19], &step1[20],
- &step1[21], &step1[26], &step1[27],
- &step1[28], &step1[29]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- // Stage 5
- {
- step2[4] = ADD_EPI16(step1[5], step3[4]);
- step2[5] = SUB_EPI16(step3[4], step1[5]);
- step2[6] = SUB_EPI16(step3[7], step1[6]);
- step2[7] = ADD_EPI16(step1[6], step3[7]);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x4(&step2[4], &step2[5], &step2[6],
- &step2[7]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- const __m128i out_00_0 = _mm_unpacklo_epi16(step1[0], step1[1]);
- const __m128i out_00_1 = _mm_unpackhi_epi16(step1[0], step1[1]);
- const __m128i out_08_0 = _mm_unpacklo_epi16(step1[2], step1[3]);
- const __m128i out_08_1 = _mm_unpackhi_epi16(step1[2], step1[3]);
- const __m128i out_00_2 = _mm_madd_epi16(out_00_0, k__cospi_p16_p16);
- const __m128i out_00_3 = _mm_madd_epi16(out_00_1, k__cospi_p16_p16);
- const __m128i out_16_2 = _mm_madd_epi16(out_00_0, k__cospi_p16_m16);
- const __m128i out_16_3 = _mm_madd_epi16(out_00_1, k__cospi_p16_m16);
- const __m128i out_08_2 = _mm_madd_epi16(out_08_0, k__cospi_p24_p08);
- const __m128i out_08_3 = _mm_madd_epi16(out_08_1, k__cospi_p24_p08);
- const __m128i out_24_2 = _mm_madd_epi16(out_08_0, k__cospi_m08_p24);
- const __m128i out_24_3 = _mm_madd_epi16(out_08_1, k__cospi_m08_p24);
- // dct_const_round_shift
- const __m128i out_00_4 =
- _mm_add_epi32(out_00_2, k__DCT_CONST_ROUNDING);
- const __m128i out_00_5 =
- _mm_add_epi32(out_00_3, k__DCT_CONST_ROUNDING);
- const __m128i out_16_4 =
- _mm_add_epi32(out_16_2, k__DCT_CONST_ROUNDING);
- const __m128i out_16_5 =
- _mm_add_epi32(out_16_3, k__DCT_CONST_ROUNDING);
- const __m128i out_08_4 =
- _mm_add_epi32(out_08_2, k__DCT_CONST_ROUNDING);
- const __m128i out_08_5 =
- _mm_add_epi32(out_08_3, k__DCT_CONST_ROUNDING);
- const __m128i out_24_4 =
- _mm_add_epi32(out_24_2, k__DCT_CONST_ROUNDING);
- const __m128i out_24_5 =
- _mm_add_epi32(out_24_3, k__DCT_CONST_ROUNDING);
- const __m128i out_00_6 = _mm_srai_epi32(out_00_4, DCT_CONST_BITS);
- const __m128i out_00_7 = _mm_srai_epi32(out_00_5, DCT_CONST_BITS);
- const __m128i out_16_6 = _mm_srai_epi32(out_16_4, DCT_CONST_BITS);
- const __m128i out_16_7 = _mm_srai_epi32(out_16_5, DCT_CONST_BITS);
- const __m128i out_08_6 = _mm_srai_epi32(out_08_4, DCT_CONST_BITS);
- const __m128i out_08_7 = _mm_srai_epi32(out_08_5, DCT_CONST_BITS);
- const __m128i out_24_6 = _mm_srai_epi32(out_24_4, DCT_CONST_BITS);
- const __m128i out_24_7 = _mm_srai_epi32(out_24_5, DCT_CONST_BITS);
- // Combine
- out[0] = _mm_packs_epi32(out_00_6, out_00_7);
- out[16] = _mm_packs_epi32(out_16_6, out_16_7);
- out[8] = _mm_packs_epi32(out_08_6, out_08_7);
- out[24] = _mm_packs_epi32(out_24_6, out_24_7);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x4(&out[0], &out[16], &out[8], &out[24]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- const __m128i s2_09_0 = _mm_unpacklo_epi16(step1[9], step1[14]);
- const __m128i s2_09_1 = _mm_unpackhi_epi16(step1[9], step1[14]);
- const __m128i s2_10_0 = _mm_unpacklo_epi16(step1[10], step1[13]);
- const __m128i s2_10_1 = _mm_unpackhi_epi16(step1[10], step1[13]);
- const __m128i s2_09_2 = _mm_madd_epi16(s2_09_0, k__cospi_m08_p24);
- const __m128i s2_09_3 = _mm_madd_epi16(s2_09_1, k__cospi_m08_p24);
- const __m128i s2_10_2 = _mm_madd_epi16(s2_10_0, k__cospi_m24_m08);
- const __m128i s2_10_3 = _mm_madd_epi16(s2_10_1, k__cospi_m24_m08);
- const __m128i s2_13_2 = _mm_madd_epi16(s2_10_0, k__cospi_m08_p24);
- const __m128i s2_13_3 = _mm_madd_epi16(s2_10_1, k__cospi_m08_p24);
- const __m128i s2_14_2 = _mm_madd_epi16(s2_09_0, k__cospi_p24_p08);
- const __m128i s2_14_3 = _mm_madd_epi16(s2_09_1, k__cospi_p24_p08);
- // dct_const_round_shift
- const __m128i s2_09_4 = _mm_add_epi32(s2_09_2, k__DCT_CONST_ROUNDING);
- const __m128i s2_09_5 = _mm_add_epi32(s2_09_3, k__DCT_CONST_ROUNDING);
- const __m128i s2_10_4 = _mm_add_epi32(s2_10_2, k__DCT_CONST_ROUNDING);
- const __m128i s2_10_5 = _mm_add_epi32(s2_10_3, k__DCT_CONST_ROUNDING);
- const __m128i s2_13_4 = _mm_add_epi32(s2_13_2, k__DCT_CONST_ROUNDING);
- const __m128i s2_13_5 = _mm_add_epi32(s2_13_3, k__DCT_CONST_ROUNDING);
- const __m128i s2_14_4 = _mm_add_epi32(s2_14_2, k__DCT_CONST_ROUNDING);
- const __m128i s2_14_5 = _mm_add_epi32(s2_14_3, k__DCT_CONST_ROUNDING);
- const __m128i s2_09_6 = _mm_srai_epi32(s2_09_4, DCT_CONST_BITS);
- const __m128i s2_09_7 = _mm_srai_epi32(s2_09_5, DCT_CONST_BITS);
- const __m128i s2_10_6 = _mm_srai_epi32(s2_10_4, DCT_CONST_BITS);
- const __m128i s2_10_7 = _mm_srai_epi32(s2_10_5, DCT_CONST_BITS);
- const __m128i s2_13_6 = _mm_srai_epi32(s2_13_4, DCT_CONST_BITS);
- const __m128i s2_13_7 = _mm_srai_epi32(s2_13_5, DCT_CONST_BITS);
- const __m128i s2_14_6 = _mm_srai_epi32(s2_14_4, DCT_CONST_BITS);
- const __m128i s2_14_7 = _mm_srai_epi32(s2_14_5, DCT_CONST_BITS);
- // Combine
- step2[9] = _mm_packs_epi32(s2_09_6, s2_09_7);
- step2[10] = _mm_packs_epi32(s2_10_6, s2_10_7);
- step2[13] = _mm_packs_epi32(s2_13_6, s2_13_7);
- step2[14] = _mm_packs_epi32(s2_14_6, s2_14_7);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x4(&step2[9], &step2[10], &step2[13],
- &step2[14]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- step2[16] = ADD_EPI16(step1[19], step3[16]);
- step2[17] = ADD_EPI16(step1[18], step3[17]);
- step2[18] = SUB_EPI16(step3[17], step1[18]);
- step2[19] = SUB_EPI16(step3[16], step1[19]);
- step2[20] = SUB_EPI16(step3[23], step1[20]);
- step2[21] = SUB_EPI16(step3[22], step1[21]);
- step2[22] = ADD_EPI16(step1[21], step3[22]);
- step2[23] = ADD_EPI16(step1[20], step3[23]);
- step2[24] = ADD_EPI16(step1[27], step3[24]);
- step2[25] = ADD_EPI16(step1[26], step3[25]);
- step2[26] = SUB_EPI16(step3[25], step1[26]);
- step2[27] = SUB_EPI16(step3[24], step1[27]);
- step2[28] = SUB_EPI16(step3[31], step1[28]);
- step2[29] = SUB_EPI16(step3[30], step1[29]);
- step2[30] = ADD_EPI16(step1[29], step3[30]);
- step2[31] = ADD_EPI16(step1[28], step3[31]);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x16(
- &step2[16], &step2[17], &step2[18], &step2[19], &step2[20],
- &step2[21], &step2[22], &step2[23], &step2[24], &step2[25],
- &step2[26], &step2[27], &step2[28], &step2[29], &step2[30],
- &step2[31]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- // Stage 6
- {
- const __m128i out_04_0 = _mm_unpacklo_epi16(step2[4], step2[7]);
- const __m128i out_04_1 = _mm_unpackhi_epi16(step2[4], step2[7]);
- const __m128i out_20_0 = _mm_unpacklo_epi16(step2[5], step2[6]);
- const __m128i out_20_1 = _mm_unpackhi_epi16(step2[5], step2[6]);
- const __m128i out_12_0 = _mm_unpacklo_epi16(step2[5], step2[6]);
- const __m128i out_12_1 = _mm_unpackhi_epi16(step2[5], step2[6]);
- const __m128i out_28_0 = _mm_unpacklo_epi16(step2[4], step2[7]);
- const __m128i out_28_1 = _mm_unpackhi_epi16(step2[4], step2[7]);
- const __m128i out_04_2 = _mm_madd_epi16(out_04_0, k__cospi_p28_p04);
- const __m128i out_04_3 = _mm_madd_epi16(out_04_1, k__cospi_p28_p04);
- const __m128i out_20_2 = _mm_madd_epi16(out_20_0, k__cospi_p12_p20);
- const __m128i out_20_3 = _mm_madd_epi16(out_20_1, k__cospi_p12_p20);
- const __m128i out_12_2 = _mm_madd_epi16(out_12_0, k__cospi_m20_p12);
- const __m128i out_12_3 = _mm_madd_epi16(out_12_1, k__cospi_m20_p12);
- const __m128i out_28_2 = _mm_madd_epi16(out_28_0, k__cospi_m04_p28);
- const __m128i out_28_3 = _mm_madd_epi16(out_28_1, k__cospi_m04_p28);
- // dct_const_round_shift
- const __m128i out_04_4 =
- _mm_add_epi32(out_04_2, k__DCT_CONST_ROUNDING);
- const __m128i out_04_5 =
- _mm_add_epi32(out_04_3, k__DCT_CONST_ROUNDING);
- const __m128i out_20_4 =
- _mm_add_epi32(out_20_2, k__DCT_CONST_ROUNDING);
- const __m128i out_20_5 =
- _mm_add_epi32(out_20_3, k__DCT_CONST_ROUNDING);
- const __m128i out_12_4 =
- _mm_add_epi32(out_12_2, k__DCT_CONST_ROUNDING);
- const __m128i out_12_5 =
- _mm_add_epi32(out_12_3, k__DCT_CONST_ROUNDING);
- const __m128i out_28_4 =
- _mm_add_epi32(out_28_2, k__DCT_CONST_ROUNDING);
- const __m128i out_28_5 =
- _mm_add_epi32(out_28_3, k__DCT_CONST_ROUNDING);
- const __m128i out_04_6 = _mm_srai_epi32(out_04_4, DCT_CONST_BITS);
- const __m128i out_04_7 = _mm_srai_epi32(out_04_5, DCT_CONST_BITS);
- const __m128i out_20_6 = _mm_srai_epi32(out_20_4, DCT_CONST_BITS);
- const __m128i out_20_7 = _mm_srai_epi32(out_20_5, DCT_CONST_BITS);
- const __m128i out_12_6 = _mm_srai_epi32(out_12_4, DCT_CONST_BITS);
- const __m128i out_12_7 = _mm_srai_epi32(out_12_5, DCT_CONST_BITS);
- const __m128i out_28_6 = _mm_srai_epi32(out_28_4, DCT_CONST_BITS);
- const __m128i out_28_7 = _mm_srai_epi32(out_28_5, DCT_CONST_BITS);
- // Combine
- out[4] = _mm_packs_epi32(out_04_6, out_04_7);
- out[20] = _mm_packs_epi32(out_20_6, out_20_7);
- out[12] = _mm_packs_epi32(out_12_6, out_12_7);
- out[28] = _mm_packs_epi32(out_28_6, out_28_7);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x4(&out[4], &out[20], &out[12], &out[28]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- step3[8] = ADD_EPI16(step2[9], step1[8]);
- step3[9] = SUB_EPI16(step1[8], step2[9]);
- step3[10] = SUB_EPI16(step1[11], step2[10]);
- step3[11] = ADD_EPI16(step2[10], step1[11]);
- step3[12] = ADD_EPI16(step2[13], step1[12]);
- step3[13] = SUB_EPI16(step1[12], step2[13]);
- step3[14] = SUB_EPI16(step1[15], step2[14]);
- step3[15] = ADD_EPI16(step2[14], step1[15]);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x8(&step3[8], &step3[9], &step3[10],
- &step3[11], &step3[12], &step3[13],
- &step3[14], &step3[15]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- const __m128i s3_17_0 = _mm_unpacklo_epi16(step2[17], step2[30]);
- const __m128i s3_17_1 = _mm_unpackhi_epi16(step2[17], step2[30]);
- const __m128i s3_18_0 = _mm_unpacklo_epi16(step2[18], step2[29]);
- const __m128i s3_18_1 = _mm_unpackhi_epi16(step2[18], step2[29]);
- const __m128i s3_21_0 = _mm_unpacklo_epi16(step2[21], step2[26]);
- const __m128i s3_21_1 = _mm_unpackhi_epi16(step2[21], step2[26]);
- const __m128i s3_22_0 = _mm_unpacklo_epi16(step2[22], step2[25]);
- const __m128i s3_22_1 = _mm_unpackhi_epi16(step2[22], step2[25]);
- const __m128i s3_17_2 = _mm_madd_epi16(s3_17_0, k__cospi_m04_p28);
- const __m128i s3_17_3 = _mm_madd_epi16(s3_17_1, k__cospi_m04_p28);
- const __m128i s3_18_2 = _mm_madd_epi16(s3_18_0, k__cospi_m28_m04);
- const __m128i s3_18_3 = _mm_madd_epi16(s3_18_1, k__cospi_m28_m04);
- const __m128i s3_21_2 = _mm_madd_epi16(s3_21_0, k__cospi_m20_p12);
- const __m128i s3_21_3 = _mm_madd_epi16(s3_21_1, k__cospi_m20_p12);
- const __m128i s3_22_2 = _mm_madd_epi16(s3_22_0, k__cospi_m12_m20);
- const __m128i s3_22_3 = _mm_madd_epi16(s3_22_1, k__cospi_m12_m20);
- const __m128i s3_25_2 = _mm_madd_epi16(s3_22_0, k__cospi_m20_p12);
- const __m128i s3_25_3 = _mm_madd_epi16(s3_22_1, k__cospi_m20_p12);
- const __m128i s3_26_2 = _mm_madd_epi16(s3_21_0, k__cospi_p12_p20);
- const __m128i s3_26_3 = _mm_madd_epi16(s3_21_1, k__cospi_p12_p20);
- const __m128i s3_29_2 = _mm_madd_epi16(s3_18_0, k__cospi_m04_p28);
- const __m128i s3_29_3 = _mm_madd_epi16(s3_18_1, k__cospi_m04_p28);
- const __m128i s3_30_2 = _mm_madd_epi16(s3_17_0, k__cospi_p28_p04);
- const __m128i s3_30_3 = _mm_madd_epi16(s3_17_1, k__cospi_p28_p04);
- // dct_const_round_shift
- const __m128i s3_17_4 = _mm_add_epi32(s3_17_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_17_5 = _mm_add_epi32(s3_17_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_18_4 = _mm_add_epi32(s3_18_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_18_5 = _mm_add_epi32(s3_18_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_21_4 = _mm_add_epi32(s3_21_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_21_5 = _mm_add_epi32(s3_21_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_22_4 = _mm_add_epi32(s3_22_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_22_5 = _mm_add_epi32(s3_22_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_17_6 = _mm_srai_epi32(s3_17_4, DCT_CONST_BITS);
- const __m128i s3_17_7 = _mm_srai_epi32(s3_17_5, DCT_CONST_BITS);
- const __m128i s3_18_6 = _mm_srai_epi32(s3_18_4, DCT_CONST_BITS);
- const __m128i s3_18_7 = _mm_srai_epi32(s3_18_5, DCT_CONST_BITS);
- const __m128i s3_21_6 = _mm_srai_epi32(s3_21_4, DCT_CONST_BITS);
- const __m128i s3_21_7 = _mm_srai_epi32(s3_21_5, DCT_CONST_BITS);
- const __m128i s3_22_6 = _mm_srai_epi32(s3_22_4, DCT_CONST_BITS);
- const __m128i s3_22_7 = _mm_srai_epi32(s3_22_5, DCT_CONST_BITS);
- const __m128i s3_25_4 = _mm_add_epi32(s3_25_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_25_5 = _mm_add_epi32(s3_25_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_26_4 = _mm_add_epi32(s3_26_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_26_5 = _mm_add_epi32(s3_26_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_29_4 = _mm_add_epi32(s3_29_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_29_5 = _mm_add_epi32(s3_29_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_30_4 = _mm_add_epi32(s3_30_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_30_5 = _mm_add_epi32(s3_30_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_25_6 = _mm_srai_epi32(s3_25_4, DCT_CONST_BITS);
- const __m128i s3_25_7 = _mm_srai_epi32(s3_25_5, DCT_CONST_BITS);
- const __m128i s3_26_6 = _mm_srai_epi32(s3_26_4, DCT_CONST_BITS);
- const __m128i s3_26_7 = _mm_srai_epi32(s3_26_5, DCT_CONST_BITS);
- const __m128i s3_29_6 = _mm_srai_epi32(s3_29_4, DCT_CONST_BITS);
- const __m128i s3_29_7 = _mm_srai_epi32(s3_29_5, DCT_CONST_BITS);
- const __m128i s3_30_6 = _mm_srai_epi32(s3_30_4, DCT_CONST_BITS);
- const __m128i s3_30_7 = _mm_srai_epi32(s3_30_5, DCT_CONST_BITS);
- // Combine
- step3[17] = _mm_packs_epi32(s3_17_6, s3_17_7);
- step3[18] = _mm_packs_epi32(s3_18_6, s3_18_7);
- step3[21] = _mm_packs_epi32(s3_21_6, s3_21_7);
- step3[22] = _mm_packs_epi32(s3_22_6, s3_22_7);
- // Combine
- step3[25] = _mm_packs_epi32(s3_25_6, s3_25_7);
- step3[26] = _mm_packs_epi32(s3_26_6, s3_26_7);
- step3[29] = _mm_packs_epi32(s3_29_6, s3_29_7);
- step3[30] = _mm_packs_epi32(s3_30_6, s3_30_7);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x8(&step3[17], &step3[18], &step3[21],
- &step3[22], &step3[25], &step3[26],
- &step3[29], &step3[30]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- // Stage 7
- {
- const __m128i out_02_0 = _mm_unpacklo_epi16(step3[8], step3[15]);
- const __m128i out_02_1 = _mm_unpackhi_epi16(step3[8], step3[15]);
- const __m128i out_18_0 = _mm_unpacklo_epi16(step3[9], step3[14]);
- const __m128i out_18_1 = _mm_unpackhi_epi16(step3[9], step3[14]);
- const __m128i out_10_0 = _mm_unpacklo_epi16(step3[10], step3[13]);
- const __m128i out_10_1 = _mm_unpackhi_epi16(step3[10], step3[13]);
- const __m128i out_26_0 = _mm_unpacklo_epi16(step3[11], step3[12]);
- const __m128i out_26_1 = _mm_unpackhi_epi16(step3[11], step3[12]);
- const __m128i out_02_2 = _mm_madd_epi16(out_02_0, k__cospi_p30_p02);
- const __m128i out_02_3 = _mm_madd_epi16(out_02_1, k__cospi_p30_p02);
- const __m128i out_18_2 = _mm_madd_epi16(out_18_0, k__cospi_p14_p18);
- const __m128i out_18_3 = _mm_madd_epi16(out_18_1, k__cospi_p14_p18);
- const __m128i out_10_2 = _mm_madd_epi16(out_10_0, k__cospi_p22_p10);
- const __m128i out_10_3 = _mm_madd_epi16(out_10_1, k__cospi_p22_p10);
- const __m128i out_26_2 = _mm_madd_epi16(out_26_0, k__cospi_p06_p26);
- const __m128i out_26_3 = _mm_madd_epi16(out_26_1, k__cospi_p06_p26);
- const __m128i out_06_2 = _mm_madd_epi16(out_26_0, k__cospi_m26_p06);
- const __m128i out_06_3 = _mm_madd_epi16(out_26_1, k__cospi_m26_p06);
- const __m128i out_22_2 = _mm_madd_epi16(out_10_0, k__cospi_m10_p22);
- const __m128i out_22_3 = _mm_madd_epi16(out_10_1, k__cospi_m10_p22);
- const __m128i out_14_2 = _mm_madd_epi16(out_18_0, k__cospi_m18_p14);
- const __m128i out_14_3 = _mm_madd_epi16(out_18_1, k__cospi_m18_p14);
- const __m128i out_30_2 = _mm_madd_epi16(out_02_0, k__cospi_m02_p30);
- const __m128i out_30_3 = _mm_madd_epi16(out_02_1, k__cospi_m02_p30);
- // dct_const_round_shift
- const __m128i out_02_4 =
- _mm_add_epi32(out_02_2, k__DCT_CONST_ROUNDING);
- const __m128i out_02_5 =
- _mm_add_epi32(out_02_3, k__DCT_CONST_ROUNDING);
- const __m128i out_18_4 =
- _mm_add_epi32(out_18_2, k__DCT_CONST_ROUNDING);
- const __m128i out_18_5 =
- _mm_add_epi32(out_18_3, k__DCT_CONST_ROUNDING);
- const __m128i out_10_4 =
- _mm_add_epi32(out_10_2, k__DCT_CONST_ROUNDING);
- const __m128i out_10_5 =
- _mm_add_epi32(out_10_3, k__DCT_CONST_ROUNDING);
- const __m128i out_26_4 =
- _mm_add_epi32(out_26_2, k__DCT_CONST_ROUNDING);
- const __m128i out_26_5 =
- _mm_add_epi32(out_26_3, k__DCT_CONST_ROUNDING);
- const __m128i out_06_4 =
- _mm_add_epi32(out_06_2, k__DCT_CONST_ROUNDING);
- const __m128i out_06_5 =
- _mm_add_epi32(out_06_3, k__DCT_CONST_ROUNDING);
- const __m128i out_22_4 =
- _mm_add_epi32(out_22_2, k__DCT_CONST_ROUNDING);
- const __m128i out_22_5 =
- _mm_add_epi32(out_22_3, k__DCT_CONST_ROUNDING);
- const __m128i out_14_4 =
- _mm_add_epi32(out_14_2, k__DCT_CONST_ROUNDING);
- const __m128i out_14_5 =
- _mm_add_epi32(out_14_3, k__DCT_CONST_ROUNDING);
- const __m128i out_30_4 =
- _mm_add_epi32(out_30_2, k__DCT_CONST_ROUNDING);
- const __m128i out_30_5 =
- _mm_add_epi32(out_30_3, k__DCT_CONST_ROUNDING);
- const __m128i out_02_6 = _mm_srai_epi32(out_02_4, DCT_CONST_BITS);
- const __m128i out_02_7 = _mm_srai_epi32(out_02_5, DCT_CONST_BITS);
- const __m128i out_18_6 = _mm_srai_epi32(out_18_4, DCT_CONST_BITS);
- const __m128i out_18_7 = _mm_srai_epi32(out_18_5, DCT_CONST_BITS);
- const __m128i out_10_6 = _mm_srai_epi32(out_10_4, DCT_CONST_BITS);
- const __m128i out_10_7 = _mm_srai_epi32(out_10_5, DCT_CONST_BITS);
- const __m128i out_26_6 = _mm_srai_epi32(out_26_4, DCT_CONST_BITS);
- const __m128i out_26_7 = _mm_srai_epi32(out_26_5, DCT_CONST_BITS);
- const __m128i out_06_6 = _mm_srai_epi32(out_06_4, DCT_CONST_BITS);
- const __m128i out_06_7 = _mm_srai_epi32(out_06_5, DCT_CONST_BITS);
- const __m128i out_22_6 = _mm_srai_epi32(out_22_4, DCT_CONST_BITS);
- const __m128i out_22_7 = _mm_srai_epi32(out_22_5, DCT_CONST_BITS);
- const __m128i out_14_6 = _mm_srai_epi32(out_14_4, DCT_CONST_BITS);
- const __m128i out_14_7 = _mm_srai_epi32(out_14_5, DCT_CONST_BITS);
- const __m128i out_30_6 = _mm_srai_epi32(out_30_4, DCT_CONST_BITS);
- const __m128i out_30_7 = _mm_srai_epi32(out_30_5, DCT_CONST_BITS);
- // Combine
- out[2] = _mm_packs_epi32(out_02_6, out_02_7);
- out[18] = _mm_packs_epi32(out_18_6, out_18_7);
- out[10] = _mm_packs_epi32(out_10_6, out_10_7);
- out[26] = _mm_packs_epi32(out_26_6, out_26_7);
- out[6] = _mm_packs_epi32(out_06_6, out_06_7);
- out[22] = _mm_packs_epi32(out_22_6, out_22_7);
- out[14] = _mm_packs_epi32(out_14_6, out_14_7);
- out[30] = _mm_packs_epi32(out_30_6, out_30_7);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x8(&out[2], &out[18], &out[10], &out[26],
- &out[6], &out[22], &out[14], &out[30]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- step1[16] = ADD_EPI16(step3[17], step2[16]);
- step1[17] = SUB_EPI16(step2[16], step3[17]);
- step1[18] = SUB_EPI16(step2[19], step3[18]);
- step1[19] = ADD_EPI16(step3[18], step2[19]);
- step1[20] = ADD_EPI16(step3[21], step2[20]);
- step1[21] = SUB_EPI16(step2[20], step3[21]);
- step1[22] = SUB_EPI16(step2[23], step3[22]);
- step1[23] = ADD_EPI16(step3[22], step2[23]);
- step1[24] = ADD_EPI16(step3[25], step2[24]);
- step1[25] = SUB_EPI16(step2[24], step3[25]);
- step1[26] = SUB_EPI16(step2[27], step3[26]);
- step1[27] = ADD_EPI16(step3[26], step2[27]);
- step1[28] = ADD_EPI16(step3[29], step2[28]);
- step1[29] = SUB_EPI16(step2[28], step3[29]);
- step1[30] = SUB_EPI16(step2[31], step3[30]);
- step1[31] = ADD_EPI16(step3[30], step2[31]);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x16(
- &step1[16], &step1[17], &step1[18], &step1[19], &step1[20],
- &step1[21], &step1[22], &step1[23], &step1[24], &step1[25],
- &step1[26], &step1[27], &step1[28], &step1[29], &step1[30],
- &step1[31]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- // Final stage --- outputs indices are bit-reversed.
- {
- const __m128i out_01_0 = _mm_unpacklo_epi16(step1[16], step1[31]);
- const __m128i out_01_1 = _mm_unpackhi_epi16(step1[16], step1[31]);
- const __m128i out_17_0 = _mm_unpacklo_epi16(step1[17], step1[30]);
- const __m128i out_17_1 = _mm_unpackhi_epi16(step1[17], step1[30]);
- const __m128i out_09_0 = _mm_unpacklo_epi16(step1[18], step1[29]);
- const __m128i out_09_1 = _mm_unpackhi_epi16(step1[18], step1[29]);
- const __m128i out_25_0 = _mm_unpacklo_epi16(step1[19], step1[28]);
- const __m128i out_25_1 = _mm_unpackhi_epi16(step1[19], step1[28]);
- const __m128i out_01_2 = _mm_madd_epi16(out_01_0, k__cospi_p31_p01);
- const __m128i out_01_3 = _mm_madd_epi16(out_01_1, k__cospi_p31_p01);
- const __m128i out_17_2 = _mm_madd_epi16(out_17_0, k__cospi_p15_p17);
- const __m128i out_17_3 = _mm_madd_epi16(out_17_1, k__cospi_p15_p17);
- const __m128i out_09_2 = _mm_madd_epi16(out_09_0, k__cospi_p23_p09);
- const __m128i out_09_3 = _mm_madd_epi16(out_09_1, k__cospi_p23_p09);
- const __m128i out_25_2 = _mm_madd_epi16(out_25_0, k__cospi_p07_p25);
- const __m128i out_25_3 = _mm_madd_epi16(out_25_1, k__cospi_p07_p25);
- const __m128i out_07_2 = _mm_madd_epi16(out_25_0, k__cospi_m25_p07);
- const __m128i out_07_3 = _mm_madd_epi16(out_25_1, k__cospi_m25_p07);
- const __m128i out_23_2 = _mm_madd_epi16(out_09_0, k__cospi_m09_p23);
- const __m128i out_23_3 = _mm_madd_epi16(out_09_1, k__cospi_m09_p23);
- const __m128i out_15_2 = _mm_madd_epi16(out_17_0, k__cospi_m17_p15);
- const __m128i out_15_3 = _mm_madd_epi16(out_17_1, k__cospi_m17_p15);
- const __m128i out_31_2 = _mm_madd_epi16(out_01_0, k__cospi_m01_p31);
- const __m128i out_31_3 = _mm_madd_epi16(out_01_1, k__cospi_m01_p31);
- // dct_const_round_shift
- const __m128i out_01_4 =
- _mm_add_epi32(out_01_2, k__DCT_CONST_ROUNDING);
- const __m128i out_01_5 =
- _mm_add_epi32(out_01_3, k__DCT_CONST_ROUNDING);
- const __m128i out_17_4 =
- _mm_add_epi32(out_17_2, k__DCT_CONST_ROUNDING);
- const __m128i out_17_5 =
- _mm_add_epi32(out_17_3, k__DCT_CONST_ROUNDING);
- const __m128i out_09_4 =
- _mm_add_epi32(out_09_2, k__DCT_CONST_ROUNDING);
- const __m128i out_09_5 =
- _mm_add_epi32(out_09_3, k__DCT_CONST_ROUNDING);
- const __m128i out_25_4 =
- _mm_add_epi32(out_25_2, k__DCT_CONST_ROUNDING);
- const __m128i out_25_5 =
- _mm_add_epi32(out_25_3, k__DCT_CONST_ROUNDING);
- const __m128i out_07_4 =
- _mm_add_epi32(out_07_2, k__DCT_CONST_ROUNDING);
- const __m128i out_07_5 =
- _mm_add_epi32(out_07_3, k__DCT_CONST_ROUNDING);
- const __m128i out_23_4 =
- _mm_add_epi32(out_23_2, k__DCT_CONST_ROUNDING);
- const __m128i out_23_5 =
- _mm_add_epi32(out_23_3, k__DCT_CONST_ROUNDING);
- const __m128i out_15_4 =
- _mm_add_epi32(out_15_2, k__DCT_CONST_ROUNDING);
- const __m128i out_15_5 =
- _mm_add_epi32(out_15_3, k__DCT_CONST_ROUNDING);
- const __m128i out_31_4 =
- _mm_add_epi32(out_31_2, k__DCT_CONST_ROUNDING);
- const __m128i out_31_5 =
- _mm_add_epi32(out_31_3, k__DCT_CONST_ROUNDING);
- const __m128i out_01_6 = _mm_srai_epi32(out_01_4, DCT_CONST_BITS);
- const __m128i out_01_7 = _mm_srai_epi32(out_01_5, DCT_CONST_BITS);
- const __m128i out_17_6 = _mm_srai_epi32(out_17_4, DCT_CONST_BITS);
- const __m128i out_17_7 = _mm_srai_epi32(out_17_5, DCT_CONST_BITS);
- const __m128i out_09_6 = _mm_srai_epi32(out_09_4, DCT_CONST_BITS);
- const __m128i out_09_7 = _mm_srai_epi32(out_09_5, DCT_CONST_BITS);
- const __m128i out_25_6 = _mm_srai_epi32(out_25_4, DCT_CONST_BITS);
- const __m128i out_25_7 = _mm_srai_epi32(out_25_5, DCT_CONST_BITS);
- const __m128i out_07_6 = _mm_srai_epi32(out_07_4, DCT_CONST_BITS);
- const __m128i out_07_7 = _mm_srai_epi32(out_07_5, DCT_CONST_BITS);
- const __m128i out_23_6 = _mm_srai_epi32(out_23_4, DCT_CONST_BITS);
- const __m128i out_23_7 = _mm_srai_epi32(out_23_5, DCT_CONST_BITS);
- const __m128i out_15_6 = _mm_srai_epi32(out_15_4, DCT_CONST_BITS);
- const __m128i out_15_7 = _mm_srai_epi32(out_15_5, DCT_CONST_BITS);
- const __m128i out_31_6 = _mm_srai_epi32(out_31_4, DCT_CONST_BITS);
- const __m128i out_31_7 = _mm_srai_epi32(out_31_5, DCT_CONST_BITS);
- // Combine
- out[1] = _mm_packs_epi32(out_01_6, out_01_7);
- out[17] = _mm_packs_epi32(out_17_6, out_17_7);
- out[9] = _mm_packs_epi32(out_09_6, out_09_7);
- out[25] = _mm_packs_epi32(out_25_6, out_25_7);
- out[7] = _mm_packs_epi32(out_07_6, out_07_7);
- out[23] = _mm_packs_epi32(out_23_6, out_23_7);
- out[15] = _mm_packs_epi32(out_15_6, out_15_7);
- out[31] = _mm_packs_epi32(out_31_6, out_31_7);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x8(&out[1], &out[17], &out[9], &out[25],
- &out[7], &out[23], &out[15], &out[31]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- const __m128i out_05_0 = _mm_unpacklo_epi16(step1[20], step1[27]);
- const __m128i out_05_1 = _mm_unpackhi_epi16(step1[20], step1[27]);
- const __m128i out_21_0 = _mm_unpacklo_epi16(step1[21], step1[26]);
- const __m128i out_21_1 = _mm_unpackhi_epi16(step1[21], step1[26]);
- const __m128i out_13_0 = _mm_unpacklo_epi16(step1[22], step1[25]);
- const __m128i out_13_1 = _mm_unpackhi_epi16(step1[22], step1[25]);
- const __m128i out_29_0 = _mm_unpacklo_epi16(step1[23], step1[24]);
- const __m128i out_29_1 = _mm_unpackhi_epi16(step1[23], step1[24]);
- const __m128i out_05_2 = _mm_madd_epi16(out_05_0, k__cospi_p27_p05);
- const __m128i out_05_3 = _mm_madd_epi16(out_05_1, k__cospi_p27_p05);
- const __m128i out_21_2 = _mm_madd_epi16(out_21_0, k__cospi_p11_p21);
- const __m128i out_21_3 = _mm_madd_epi16(out_21_1, k__cospi_p11_p21);
- const __m128i out_13_2 = _mm_madd_epi16(out_13_0, k__cospi_p19_p13);
- const __m128i out_13_3 = _mm_madd_epi16(out_13_1, k__cospi_p19_p13);
- const __m128i out_29_2 = _mm_madd_epi16(out_29_0, k__cospi_p03_p29);
- const __m128i out_29_3 = _mm_madd_epi16(out_29_1, k__cospi_p03_p29);
- const __m128i out_03_2 = _mm_madd_epi16(out_29_0, k__cospi_m29_p03);
- const __m128i out_03_3 = _mm_madd_epi16(out_29_1, k__cospi_m29_p03);
- const __m128i out_19_2 = _mm_madd_epi16(out_13_0, k__cospi_m13_p19);
- const __m128i out_19_3 = _mm_madd_epi16(out_13_1, k__cospi_m13_p19);
- const __m128i out_11_2 = _mm_madd_epi16(out_21_0, k__cospi_m21_p11);
- const __m128i out_11_3 = _mm_madd_epi16(out_21_1, k__cospi_m21_p11);
- const __m128i out_27_2 = _mm_madd_epi16(out_05_0, k__cospi_m05_p27);
- const __m128i out_27_3 = _mm_madd_epi16(out_05_1, k__cospi_m05_p27);
- // dct_const_round_shift
- const __m128i out_05_4 =
- _mm_add_epi32(out_05_2, k__DCT_CONST_ROUNDING);
- const __m128i out_05_5 =
- _mm_add_epi32(out_05_3, k__DCT_CONST_ROUNDING);
- const __m128i out_21_4 =
- _mm_add_epi32(out_21_2, k__DCT_CONST_ROUNDING);
- const __m128i out_21_5 =
- _mm_add_epi32(out_21_3, k__DCT_CONST_ROUNDING);
- const __m128i out_13_4 =
- _mm_add_epi32(out_13_2, k__DCT_CONST_ROUNDING);
- const __m128i out_13_5 =
- _mm_add_epi32(out_13_3, k__DCT_CONST_ROUNDING);
- const __m128i out_29_4 =
- _mm_add_epi32(out_29_2, k__DCT_CONST_ROUNDING);
- const __m128i out_29_5 =
- _mm_add_epi32(out_29_3, k__DCT_CONST_ROUNDING);
- const __m128i out_03_4 =
- _mm_add_epi32(out_03_2, k__DCT_CONST_ROUNDING);
- const __m128i out_03_5 =
- _mm_add_epi32(out_03_3, k__DCT_CONST_ROUNDING);
- const __m128i out_19_4 =
- _mm_add_epi32(out_19_2, k__DCT_CONST_ROUNDING);
- const __m128i out_19_5 =
- _mm_add_epi32(out_19_3, k__DCT_CONST_ROUNDING);
- const __m128i out_11_4 =
- _mm_add_epi32(out_11_2, k__DCT_CONST_ROUNDING);
- const __m128i out_11_5 =
- _mm_add_epi32(out_11_3, k__DCT_CONST_ROUNDING);
- const __m128i out_27_4 =
- _mm_add_epi32(out_27_2, k__DCT_CONST_ROUNDING);
- const __m128i out_27_5 =
- _mm_add_epi32(out_27_3, k__DCT_CONST_ROUNDING);
- const __m128i out_05_6 = _mm_srai_epi32(out_05_4, DCT_CONST_BITS);
- const __m128i out_05_7 = _mm_srai_epi32(out_05_5, DCT_CONST_BITS);
- const __m128i out_21_6 = _mm_srai_epi32(out_21_4, DCT_CONST_BITS);
- const __m128i out_21_7 = _mm_srai_epi32(out_21_5, DCT_CONST_BITS);
- const __m128i out_13_6 = _mm_srai_epi32(out_13_4, DCT_CONST_BITS);
- const __m128i out_13_7 = _mm_srai_epi32(out_13_5, DCT_CONST_BITS);
- const __m128i out_29_6 = _mm_srai_epi32(out_29_4, DCT_CONST_BITS);
- const __m128i out_29_7 = _mm_srai_epi32(out_29_5, DCT_CONST_BITS);
- const __m128i out_03_6 = _mm_srai_epi32(out_03_4, DCT_CONST_BITS);
- const __m128i out_03_7 = _mm_srai_epi32(out_03_5, DCT_CONST_BITS);
- const __m128i out_19_6 = _mm_srai_epi32(out_19_4, DCT_CONST_BITS);
- const __m128i out_19_7 = _mm_srai_epi32(out_19_5, DCT_CONST_BITS);
- const __m128i out_11_6 = _mm_srai_epi32(out_11_4, DCT_CONST_BITS);
- const __m128i out_11_7 = _mm_srai_epi32(out_11_5, DCT_CONST_BITS);
- const __m128i out_27_6 = _mm_srai_epi32(out_27_4, DCT_CONST_BITS);
- const __m128i out_27_7 = _mm_srai_epi32(out_27_5, DCT_CONST_BITS);
- // Combine
- out[5] = _mm_packs_epi32(out_05_6, out_05_7);
- out[21] = _mm_packs_epi32(out_21_6, out_21_7);
- out[13] = _mm_packs_epi32(out_13_6, out_13_7);
- out[29] = _mm_packs_epi32(out_29_6, out_29_7);
- out[3] = _mm_packs_epi32(out_03_6, out_03_7);
- out[19] = _mm_packs_epi32(out_19_6, out_19_7);
- out[11] = _mm_packs_epi32(out_11_6, out_11_7);
- out[27] = _mm_packs_epi32(out_27_6, out_27_7);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x8(&out[5], &out[21], &out[13], &out[29],
- &out[3], &out[19], &out[11], &out[27]);
- if (overflow) {
- if (pass == 0)
- HIGH_FDCT32x32_2D_C(input, output_org, stride);
- else
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
-#if FDCT32x32_HIGH_PRECISION
- } else {
- __m128i lstep1[64], lstep2[64], lstep3[64];
- __m128i u[32], v[32], sign[16];
- const __m128i K32One = _mm_set_epi32(1, 1, 1, 1);
- // start using 32-bit operations
- // stage 3
- {
- // expanding to 32-bit length priori to addition operations
- lstep2[0] = _mm_unpacklo_epi16(step2[0], kZero);
- lstep2[1] = _mm_unpackhi_epi16(step2[0], kZero);
- lstep2[2] = _mm_unpacklo_epi16(step2[1], kZero);
- lstep2[3] = _mm_unpackhi_epi16(step2[1], kZero);
- lstep2[4] = _mm_unpacklo_epi16(step2[2], kZero);
- lstep2[5] = _mm_unpackhi_epi16(step2[2], kZero);
- lstep2[6] = _mm_unpacklo_epi16(step2[3], kZero);
- lstep2[7] = _mm_unpackhi_epi16(step2[3], kZero);
- lstep2[8] = _mm_unpacklo_epi16(step2[4], kZero);
- lstep2[9] = _mm_unpackhi_epi16(step2[4], kZero);
- lstep2[10] = _mm_unpacklo_epi16(step2[5], kZero);
- lstep2[11] = _mm_unpackhi_epi16(step2[5], kZero);
- lstep2[12] = _mm_unpacklo_epi16(step2[6], kZero);
- lstep2[13] = _mm_unpackhi_epi16(step2[6], kZero);
- lstep2[14] = _mm_unpacklo_epi16(step2[7], kZero);
- lstep2[15] = _mm_unpackhi_epi16(step2[7], kZero);
- lstep2[0] = _mm_madd_epi16(lstep2[0], kOne);
- lstep2[1] = _mm_madd_epi16(lstep2[1], kOne);
- lstep2[2] = _mm_madd_epi16(lstep2[2], kOne);
- lstep2[3] = _mm_madd_epi16(lstep2[3], kOne);
- lstep2[4] = _mm_madd_epi16(lstep2[4], kOne);
- lstep2[5] = _mm_madd_epi16(lstep2[5], kOne);
- lstep2[6] = _mm_madd_epi16(lstep2[6], kOne);
- lstep2[7] = _mm_madd_epi16(lstep2[7], kOne);
- lstep2[8] = _mm_madd_epi16(lstep2[8], kOne);
- lstep2[9] = _mm_madd_epi16(lstep2[9], kOne);
- lstep2[10] = _mm_madd_epi16(lstep2[10], kOne);
- lstep2[11] = _mm_madd_epi16(lstep2[11], kOne);
- lstep2[12] = _mm_madd_epi16(lstep2[12], kOne);
- lstep2[13] = _mm_madd_epi16(lstep2[13], kOne);
- lstep2[14] = _mm_madd_epi16(lstep2[14], kOne);
- lstep2[15] = _mm_madd_epi16(lstep2[15], kOne);
-
- lstep3[0] = _mm_add_epi32(lstep2[14], lstep2[0]);
- lstep3[1] = _mm_add_epi32(lstep2[15], lstep2[1]);
- lstep3[2] = _mm_add_epi32(lstep2[12], lstep2[2]);
- lstep3[3] = _mm_add_epi32(lstep2[13], lstep2[3]);
- lstep3[4] = _mm_add_epi32(lstep2[10], lstep2[4]);
- lstep3[5] = _mm_add_epi32(lstep2[11], lstep2[5]);
- lstep3[6] = _mm_add_epi32(lstep2[8], lstep2[6]);
- lstep3[7] = _mm_add_epi32(lstep2[9], lstep2[7]);
- lstep3[8] = _mm_sub_epi32(lstep2[6], lstep2[8]);
- lstep3[9] = _mm_sub_epi32(lstep2[7], lstep2[9]);
- lstep3[10] = _mm_sub_epi32(lstep2[4], lstep2[10]);
- lstep3[11] = _mm_sub_epi32(lstep2[5], lstep2[11]);
- lstep3[12] = _mm_sub_epi32(lstep2[2], lstep2[12]);
- lstep3[13] = _mm_sub_epi32(lstep2[3], lstep2[13]);
- lstep3[14] = _mm_sub_epi32(lstep2[0], lstep2[14]);
- lstep3[15] = _mm_sub_epi32(lstep2[1], lstep2[15]);
- }
- {
- const __m128i s3_10_0 = _mm_unpacklo_epi16(step2[13], step2[10]);
- const __m128i s3_10_1 = _mm_unpackhi_epi16(step2[13], step2[10]);
- const __m128i s3_11_0 = _mm_unpacklo_epi16(step2[12], step2[11]);
- const __m128i s3_11_1 = _mm_unpackhi_epi16(step2[12], step2[11]);
- const __m128i s3_10_2 = _mm_madd_epi16(s3_10_0, k__cospi_p16_m16);
- const __m128i s3_10_3 = _mm_madd_epi16(s3_10_1, k__cospi_p16_m16);
- const __m128i s3_11_2 = _mm_madd_epi16(s3_11_0, k__cospi_p16_m16);
- const __m128i s3_11_3 = _mm_madd_epi16(s3_11_1, k__cospi_p16_m16);
- const __m128i s3_12_2 = _mm_madd_epi16(s3_11_0, k__cospi_p16_p16);
- const __m128i s3_12_3 = _mm_madd_epi16(s3_11_1, k__cospi_p16_p16);
- const __m128i s3_13_2 = _mm_madd_epi16(s3_10_0, k__cospi_p16_p16);
- const __m128i s3_13_3 = _mm_madd_epi16(s3_10_1, k__cospi_p16_p16);
- // dct_const_round_shift
- const __m128i s3_10_4 = _mm_add_epi32(s3_10_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_10_5 = _mm_add_epi32(s3_10_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_11_4 = _mm_add_epi32(s3_11_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_11_5 = _mm_add_epi32(s3_11_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_12_4 = _mm_add_epi32(s3_12_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_12_5 = _mm_add_epi32(s3_12_3, k__DCT_CONST_ROUNDING);
- const __m128i s3_13_4 = _mm_add_epi32(s3_13_2, k__DCT_CONST_ROUNDING);
- const __m128i s3_13_5 = _mm_add_epi32(s3_13_3, k__DCT_CONST_ROUNDING);
- lstep3[20] = _mm_srai_epi32(s3_10_4, DCT_CONST_BITS);
- lstep3[21] = _mm_srai_epi32(s3_10_5, DCT_CONST_BITS);
- lstep3[22] = _mm_srai_epi32(s3_11_4, DCT_CONST_BITS);
- lstep3[23] = _mm_srai_epi32(s3_11_5, DCT_CONST_BITS);
- lstep3[24] = _mm_srai_epi32(s3_12_4, DCT_CONST_BITS);
- lstep3[25] = _mm_srai_epi32(s3_12_5, DCT_CONST_BITS);
- lstep3[26] = _mm_srai_epi32(s3_13_4, DCT_CONST_BITS);
- lstep3[27] = _mm_srai_epi32(s3_13_5, DCT_CONST_BITS);
- }
- {
- lstep2[40] = _mm_unpacklo_epi16(step2[20], kZero);
- lstep2[41] = _mm_unpackhi_epi16(step2[20], kZero);
- lstep2[42] = _mm_unpacklo_epi16(step2[21], kZero);
- lstep2[43] = _mm_unpackhi_epi16(step2[21], kZero);
- lstep2[44] = _mm_unpacklo_epi16(step2[22], kZero);
- lstep2[45] = _mm_unpackhi_epi16(step2[22], kZero);
- lstep2[46] = _mm_unpacklo_epi16(step2[23], kZero);
- lstep2[47] = _mm_unpackhi_epi16(step2[23], kZero);
- lstep2[48] = _mm_unpacklo_epi16(step2[24], kZero);
- lstep2[49] = _mm_unpackhi_epi16(step2[24], kZero);
- lstep2[50] = _mm_unpacklo_epi16(step2[25], kZero);
- lstep2[51] = _mm_unpackhi_epi16(step2[25], kZero);
- lstep2[52] = _mm_unpacklo_epi16(step2[26], kZero);
- lstep2[53] = _mm_unpackhi_epi16(step2[26], kZero);
- lstep2[54] = _mm_unpacklo_epi16(step2[27], kZero);
- lstep2[55] = _mm_unpackhi_epi16(step2[27], kZero);
- lstep2[40] = _mm_madd_epi16(lstep2[40], kOne);
- lstep2[41] = _mm_madd_epi16(lstep2[41], kOne);
- lstep2[42] = _mm_madd_epi16(lstep2[42], kOne);
- lstep2[43] = _mm_madd_epi16(lstep2[43], kOne);
- lstep2[44] = _mm_madd_epi16(lstep2[44], kOne);
- lstep2[45] = _mm_madd_epi16(lstep2[45], kOne);
- lstep2[46] = _mm_madd_epi16(lstep2[46], kOne);
- lstep2[47] = _mm_madd_epi16(lstep2[47], kOne);
- lstep2[48] = _mm_madd_epi16(lstep2[48], kOne);
- lstep2[49] = _mm_madd_epi16(lstep2[49], kOne);
- lstep2[50] = _mm_madd_epi16(lstep2[50], kOne);
- lstep2[51] = _mm_madd_epi16(lstep2[51], kOne);
- lstep2[52] = _mm_madd_epi16(lstep2[52], kOne);
- lstep2[53] = _mm_madd_epi16(lstep2[53], kOne);
- lstep2[54] = _mm_madd_epi16(lstep2[54], kOne);
- lstep2[55] = _mm_madd_epi16(lstep2[55], kOne);
-
- lstep1[32] = _mm_unpacklo_epi16(step1[16], kZero);
- lstep1[33] = _mm_unpackhi_epi16(step1[16], kZero);
- lstep1[34] = _mm_unpacklo_epi16(step1[17], kZero);
- lstep1[35] = _mm_unpackhi_epi16(step1[17], kZero);
- lstep1[36] = _mm_unpacklo_epi16(step1[18], kZero);
- lstep1[37] = _mm_unpackhi_epi16(step1[18], kZero);
- lstep1[38] = _mm_unpacklo_epi16(step1[19], kZero);
- lstep1[39] = _mm_unpackhi_epi16(step1[19], kZero);
- lstep1[56] = _mm_unpacklo_epi16(step1[28], kZero);
- lstep1[57] = _mm_unpackhi_epi16(step1[28], kZero);
- lstep1[58] = _mm_unpacklo_epi16(step1[29], kZero);
- lstep1[59] = _mm_unpackhi_epi16(step1[29], kZero);
- lstep1[60] = _mm_unpacklo_epi16(step1[30], kZero);
- lstep1[61] = _mm_unpackhi_epi16(step1[30], kZero);
- lstep1[62] = _mm_unpacklo_epi16(step1[31], kZero);
- lstep1[63] = _mm_unpackhi_epi16(step1[31], kZero);
- lstep1[32] = _mm_madd_epi16(lstep1[32], kOne);
- lstep1[33] = _mm_madd_epi16(lstep1[33], kOne);
- lstep1[34] = _mm_madd_epi16(lstep1[34], kOne);
- lstep1[35] = _mm_madd_epi16(lstep1[35], kOne);
- lstep1[36] = _mm_madd_epi16(lstep1[36], kOne);
- lstep1[37] = _mm_madd_epi16(lstep1[37], kOne);
- lstep1[38] = _mm_madd_epi16(lstep1[38], kOne);
- lstep1[39] = _mm_madd_epi16(lstep1[39], kOne);
- lstep1[56] = _mm_madd_epi16(lstep1[56], kOne);
- lstep1[57] = _mm_madd_epi16(lstep1[57], kOne);
- lstep1[58] = _mm_madd_epi16(lstep1[58], kOne);
- lstep1[59] = _mm_madd_epi16(lstep1[59], kOne);
- lstep1[60] = _mm_madd_epi16(lstep1[60], kOne);
- lstep1[61] = _mm_madd_epi16(lstep1[61], kOne);
- lstep1[62] = _mm_madd_epi16(lstep1[62], kOne);
- lstep1[63] = _mm_madd_epi16(lstep1[63], kOne);
-
- lstep3[32] = _mm_add_epi32(lstep2[46], lstep1[32]);
- lstep3[33] = _mm_add_epi32(lstep2[47], lstep1[33]);
-
- lstep3[34] = _mm_add_epi32(lstep2[44], lstep1[34]);
- lstep3[35] = _mm_add_epi32(lstep2[45], lstep1[35]);
- lstep3[36] = _mm_add_epi32(lstep2[42], lstep1[36]);
- lstep3[37] = _mm_add_epi32(lstep2[43], lstep1[37]);
- lstep3[38] = _mm_add_epi32(lstep2[40], lstep1[38]);
- lstep3[39] = _mm_add_epi32(lstep2[41], lstep1[39]);
- lstep3[40] = _mm_sub_epi32(lstep1[38], lstep2[40]);
- lstep3[41] = _mm_sub_epi32(lstep1[39], lstep2[41]);
- lstep3[42] = _mm_sub_epi32(lstep1[36], lstep2[42]);
- lstep3[43] = _mm_sub_epi32(lstep1[37], lstep2[43]);
- lstep3[44] = _mm_sub_epi32(lstep1[34], lstep2[44]);
- lstep3[45] = _mm_sub_epi32(lstep1[35], lstep2[45]);
- lstep3[46] = _mm_sub_epi32(lstep1[32], lstep2[46]);
- lstep3[47] = _mm_sub_epi32(lstep1[33], lstep2[47]);
- lstep3[48] = _mm_sub_epi32(lstep1[62], lstep2[48]);
- lstep3[49] = _mm_sub_epi32(lstep1[63], lstep2[49]);
- lstep3[50] = _mm_sub_epi32(lstep1[60], lstep2[50]);
- lstep3[51] = _mm_sub_epi32(lstep1[61], lstep2[51]);
- lstep3[52] = _mm_sub_epi32(lstep1[58], lstep2[52]);
- lstep3[53] = _mm_sub_epi32(lstep1[59], lstep2[53]);
- lstep3[54] = _mm_sub_epi32(lstep1[56], lstep2[54]);
- lstep3[55] = _mm_sub_epi32(lstep1[57], lstep2[55]);
- lstep3[56] = _mm_add_epi32(lstep2[54], lstep1[56]);
- lstep3[57] = _mm_add_epi32(lstep2[55], lstep1[57]);
- lstep3[58] = _mm_add_epi32(lstep2[52], lstep1[58]);
- lstep3[59] = _mm_add_epi32(lstep2[53], lstep1[59]);
- lstep3[60] = _mm_add_epi32(lstep2[50], lstep1[60]);
- lstep3[61] = _mm_add_epi32(lstep2[51], lstep1[61]);
- lstep3[62] = _mm_add_epi32(lstep2[48], lstep1[62]);
- lstep3[63] = _mm_add_epi32(lstep2[49], lstep1[63]);
- }
-
- // stage 4
- {
- // expanding to 32-bit length priori to addition operations
- lstep2[16] = _mm_unpacklo_epi16(step2[8], kZero);
- lstep2[17] = _mm_unpackhi_epi16(step2[8], kZero);
- lstep2[18] = _mm_unpacklo_epi16(step2[9], kZero);
- lstep2[19] = _mm_unpackhi_epi16(step2[9], kZero);
- lstep2[28] = _mm_unpacklo_epi16(step2[14], kZero);
- lstep2[29] = _mm_unpackhi_epi16(step2[14], kZero);
- lstep2[30] = _mm_unpacklo_epi16(step2[15], kZero);
- lstep2[31] = _mm_unpackhi_epi16(step2[15], kZero);
- lstep2[16] = _mm_madd_epi16(lstep2[16], kOne);
- lstep2[17] = _mm_madd_epi16(lstep2[17], kOne);
- lstep2[18] = _mm_madd_epi16(lstep2[18], kOne);
- lstep2[19] = _mm_madd_epi16(lstep2[19], kOne);
- lstep2[28] = _mm_madd_epi16(lstep2[28], kOne);
- lstep2[29] = _mm_madd_epi16(lstep2[29], kOne);
- lstep2[30] = _mm_madd_epi16(lstep2[30], kOne);
- lstep2[31] = _mm_madd_epi16(lstep2[31], kOne);
-
- lstep1[0] = _mm_add_epi32(lstep3[6], lstep3[0]);
- lstep1[1] = _mm_add_epi32(lstep3[7], lstep3[1]);
- lstep1[2] = _mm_add_epi32(lstep3[4], lstep3[2]);
- lstep1[3] = _mm_add_epi32(lstep3[5], lstep3[3]);
- lstep1[4] = _mm_sub_epi32(lstep3[2], lstep3[4]);
- lstep1[5] = _mm_sub_epi32(lstep3[3], lstep3[5]);
- lstep1[6] = _mm_sub_epi32(lstep3[0], lstep3[6]);
- lstep1[7] = _mm_sub_epi32(lstep3[1], lstep3[7]);
- lstep1[16] = _mm_add_epi32(lstep3[22], lstep2[16]);
- lstep1[17] = _mm_add_epi32(lstep3[23], lstep2[17]);
- lstep1[18] = _mm_add_epi32(lstep3[20], lstep2[18]);
- lstep1[19] = _mm_add_epi32(lstep3[21], lstep2[19]);
- lstep1[20] = _mm_sub_epi32(lstep2[18], lstep3[20]);
- lstep1[21] = _mm_sub_epi32(lstep2[19], lstep3[21]);
- lstep1[22] = _mm_sub_epi32(lstep2[16], lstep3[22]);
- lstep1[23] = _mm_sub_epi32(lstep2[17], lstep3[23]);
- lstep1[24] = _mm_sub_epi32(lstep2[30], lstep3[24]);
- lstep1[25] = _mm_sub_epi32(lstep2[31], lstep3[25]);
- lstep1[26] = _mm_sub_epi32(lstep2[28], lstep3[26]);
- lstep1[27] = _mm_sub_epi32(lstep2[29], lstep3[27]);
- lstep1[28] = _mm_add_epi32(lstep3[26], lstep2[28]);
- lstep1[29] = _mm_add_epi32(lstep3[27], lstep2[29]);
- lstep1[30] = _mm_add_epi32(lstep3[24], lstep2[30]);
- lstep1[31] = _mm_add_epi32(lstep3[25], lstep2[31]);
- }
- {
- // to be continued...
- //
- const __m128i k32_p16_p16 = pair_set_epi32(cospi_16_64, cospi_16_64);
- const __m128i k32_p16_m16 = pair_set_epi32(cospi_16_64, -cospi_16_64);
-
- u[0] = _mm_unpacklo_epi32(lstep3[12], lstep3[10]);
- u[1] = _mm_unpackhi_epi32(lstep3[12], lstep3[10]);
- u[2] = _mm_unpacklo_epi32(lstep3[13], lstep3[11]);
- u[3] = _mm_unpackhi_epi32(lstep3[13], lstep3[11]);
-
- // TODO(jingning): manually inline k_madd_epi32_ to further hide
- // instruction latency.
- v[0] = k_madd_epi32(u[0], k32_p16_m16);
- v[1] = k_madd_epi32(u[1], k32_p16_m16);
- v[2] = k_madd_epi32(u[2], k32_p16_m16);
- v[3] = k_madd_epi32(u[3], k32_p16_m16);
- v[4] = k_madd_epi32(u[0], k32_p16_p16);
- v[5] = k_madd_epi32(u[1], k32_p16_p16);
- v[6] = k_madd_epi32(u[2], k32_p16_p16);
- v[7] = k_madd_epi32(u[3], k32_p16_p16);
-#if DCT_HIGH_BIT_DEPTH
- overflow = k_check_epi32_overflow_8(&v[0], &v[1], &v[2], &v[3], &v[4],
- &v[5], &v[6], &v[7], &kZero);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- u[0] = k_packs_epi64(v[0], v[1]);
- u[1] = k_packs_epi64(v[2], v[3]);
- u[2] = k_packs_epi64(v[4], v[5]);
- u[3] = k_packs_epi64(v[6], v[7]);
-
- v[0] = _mm_add_epi32(u[0], k__DCT_CONST_ROUNDING);
- v[1] = _mm_add_epi32(u[1], k__DCT_CONST_ROUNDING);
- v[2] = _mm_add_epi32(u[2], k__DCT_CONST_ROUNDING);
- v[3] = _mm_add_epi32(u[3], k__DCT_CONST_ROUNDING);
-
- lstep1[10] = _mm_srai_epi32(v[0], DCT_CONST_BITS);
- lstep1[11] = _mm_srai_epi32(v[1], DCT_CONST_BITS);
- lstep1[12] = _mm_srai_epi32(v[2], DCT_CONST_BITS);
- lstep1[13] = _mm_srai_epi32(v[3], DCT_CONST_BITS);
- }
- {
- const __m128i k32_m08_p24 = pair_set_epi32(-cospi_8_64, cospi_24_64);
- const __m128i k32_m24_m08 = pair_set_epi32(-cospi_24_64, -cospi_8_64);
- const __m128i k32_p24_p08 = pair_set_epi32(cospi_24_64, cospi_8_64);
-
- u[0] = _mm_unpacklo_epi32(lstep3[36], lstep3[58]);
- u[1] = _mm_unpackhi_epi32(lstep3[36], lstep3[58]);
- u[2] = _mm_unpacklo_epi32(lstep3[37], lstep3[59]);
- u[3] = _mm_unpackhi_epi32(lstep3[37], lstep3[59]);
- u[4] = _mm_unpacklo_epi32(lstep3[38], lstep3[56]);
- u[5] = _mm_unpackhi_epi32(lstep3[38], lstep3[56]);
- u[6] = _mm_unpacklo_epi32(lstep3[39], lstep3[57]);
- u[7] = _mm_unpackhi_epi32(lstep3[39], lstep3[57]);
- u[8] = _mm_unpacklo_epi32(lstep3[40], lstep3[54]);
- u[9] = _mm_unpackhi_epi32(lstep3[40], lstep3[54]);
- u[10] = _mm_unpacklo_epi32(lstep3[41], lstep3[55]);
- u[11] = _mm_unpackhi_epi32(lstep3[41], lstep3[55]);
- u[12] = _mm_unpacklo_epi32(lstep3[42], lstep3[52]);
- u[13] = _mm_unpackhi_epi32(lstep3[42], lstep3[52]);
- u[14] = _mm_unpacklo_epi32(lstep3[43], lstep3[53]);
- u[15] = _mm_unpackhi_epi32(lstep3[43], lstep3[53]);
-
- v[0] = k_madd_epi32(u[0], k32_m08_p24);
- v[1] = k_madd_epi32(u[1], k32_m08_p24);
- v[2] = k_madd_epi32(u[2], k32_m08_p24);
- v[3] = k_madd_epi32(u[3], k32_m08_p24);
- v[4] = k_madd_epi32(u[4], k32_m08_p24);
- v[5] = k_madd_epi32(u[5], k32_m08_p24);
- v[6] = k_madd_epi32(u[6], k32_m08_p24);
- v[7] = k_madd_epi32(u[7], k32_m08_p24);
- v[8] = k_madd_epi32(u[8], k32_m24_m08);
- v[9] = k_madd_epi32(u[9], k32_m24_m08);
- v[10] = k_madd_epi32(u[10], k32_m24_m08);
- v[11] = k_madd_epi32(u[11], k32_m24_m08);
- v[12] = k_madd_epi32(u[12], k32_m24_m08);
- v[13] = k_madd_epi32(u[13], k32_m24_m08);
- v[14] = k_madd_epi32(u[14], k32_m24_m08);
- v[15] = k_madd_epi32(u[15], k32_m24_m08);
- v[16] = k_madd_epi32(u[12], k32_m08_p24);
- v[17] = k_madd_epi32(u[13], k32_m08_p24);
- v[18] = k_madd_epi32(u[14], k32_m08_p24);
- v[19] = k_madd_epi32(u[15], k32_m08_p24);
- v[20] = k_madd_epi32(u[8], k32_m08_p24);
- v[21] = k_madd_epi32(u[9], k32_m08_p24);
- v[22] = k_madd_epi32(u[10], k32_m08_p24);
- v[23] = k_madd_epi32(u[11], k32_m08_p24);
- v[24] = k_madd_epi32(u[4], k32_p24_p08);
- v[25] = k_madd_epi32(u[5], k32_p24_p08);
- v[26] = k_madd_epi32(u[6], k32_p24_p08);
- v[27] = k_madd_epi32(u[7], k32_p24_p08);
- v[28] = k_madd_epi32(u[0], k32_p24_p08);
- v[29] = k_madd_epi32(u[1], k32_p24_p08);
- v[30] = k_madd_epi32(u[2], k32_p24_p08);
- v[31] = k_madd_epi32(u[3], k32_p24_p08);
-
-#if DCT_HIGH_BIT_DEPTH
- overflow = k_check_epi32_overflow_32(
- &v[0], &v[1], &v[2], &v[3], &v[4], &v[5], &v[6], &v[7], &v[8],
- &v[9], &v[10], &v[11], &v[12], &v[13], &v[14], &v[15], &v[16],
- &v[17], &v[18], &v[19], &v[20], &v[21], &v[22], &v[23], &v[24],
- &v[25], &v[26], &v[27], &v[28], &v[29], &v[30], &v[31], &kZero);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- u[0] = k_packs_epi64(v[0], v[1]);
- u[1] = k_packs_epi64(v[2], v[3]);
- u[2] = k_packs_epi64(v[4], v[5]);
- u[3] = k_packs_epi64(v[6], v[7]);
- u[4] = k_packs_epi64(v[8], v[9]);
- u[5] = k_packs_epi64(v[10], v[11]);
- u[6] = k_packs_epi64(v[12], v[13]);
- u[7] = k_packs_epi64(v[14], v[15]);
- u[8] = k_packs_epi64(v[16], v[17]);
- u[9] = k_packs_epi64(v[18], v[19]);
- u[10] = k_packs_epi64(v[20], v[21]);
- u[11] = k_packs_epi64(v[22], v[23]);
- u[12] = k_packs_epi64(v[24], v[25]);
- u[13] = k_packs_epi64(v[26], v[27]);
- u[14] = k_packs_epi64(v[28], v[29]);
- u[15] = k_packs_epi64(v[30], v[31]);
-
- v[0] = _mm_add_epi32(u[0], k__DCT_CONST_ROUNDING);
- v[1] = _mm_add_epi32(u[1], k__DCT_CONST_ROUNDING);
- v[2] = _mm_add_epi32(u[2], k__DCT_CONST_ROUNDING);
- v[3] = _mm_add_epi32(u[3], k__DCT_CONST_ROUNDING);
- v[4] = _mm_add_epi32(u[4], k__DCT_CONST_ROUNDING);
- v[5] = _mm_add_epi32(u[5], k__DCT_CONST_ROUNDING);
- v[6] = _mm_add_epi32(u[6], k__DCT_CONST_ROUNDING);
- v[7] = _mm_add_epi32(u[7], k__DCT_CONST_ROUNDING);
- v[8] = _mm_add_epi32(u[8], k__DCT_CONST_ROUNDING);
- v[9] = _mm_add_epi32(u[9], k__DCT_CONST_ROUNDING);
- v[10] = _mm_add_epi32(u[10], k__DCT_CONST_ROUNDING);
- v[11] = _mm_add_epi32(u[11], k__DCT_CONST_ROUNDING);
- v[12] = _mm_add_epi32(u[12], k__DCT_CONST_ROUNDING);
- v[13] = _mm_add_epi32(u[13], k__DCT_CONST_ROUNDING);
- v[14] = _mm_add_epi32(u[14], k__DCT_CONST_ROUNDING);
- v[15] = _mm_add_epi32(u[15], k__DCT_CONST_ROUNDING);
-
- lstep1[36] = _mm_srai_epi32(v[0], DCT_CONST_BITS);
- lstep1[37] = _mm_srai_epi32(v[1], DCT_CONST_BITS);
- lstep1[38] = _mm_srai_epi32(v[2], DCT_CONST_BITS);
- lstep1[39] = _mm_srai_epi32(v[3], DCT_CONST_BITS);
- lstep1[40] = _mm_srai_epi32(v[4], DCT_CONST_BITS);
- lstep1[41] = _mm_srai_epi32(v[5], DCT_CONST_BITS);
- lstep1[42] = _mm_srai_epi32(v[6], DCT_CONST_BITS);
- lstep1[43] = _mm_srai_epi32(v[7], DCT_CONST_BITS);
- lstep1[52] = _mm_srai_epi32(v[8], DCT_CONST_BITS);
- lstep1[53] = _mm_srai_epi32(v[9], DCT_CONST_BITS);
- lstep1[54] = _mm_srai_epi32(v[10], DCT_CONST_BITS);
- lstep1[55] = _mm_srai_epi32(v[11], DCT_CONST_BITS);
- lstep1[56] = _mm_srai_epi32(v[12], DCT_CONST_BITS);
- lstep1[57] = _mm_srai_epi32(v[13], DCT_CONST_BITS);
- lstep1[58] = _mm_srai_epi32(v[14], DCT_CONST_BITS);
- lstep1[59] = _mm_srai_epi32(v[15], DCT_CONST_BITS);
- }
- // stage 5
- {
- lstep2[8] = _mm_add_epi32(lstep1[10], lstep3[8]);
- lstep2[9] = _mm_add_epi32(lstep1[11], lstep3[9]);
- lstep2[10] = _mm_sub_epi32(lstep3[8], lstep1[10]);
- lstep2[11] = _mm_sub_epi32(lstep3[9], lstep1[11]);
- lstep2[12] = _mm_sub_epi32(lstep3[14], lstep1[12]);
- lstep2[13] = _mm_sub_epi32(lstep3[15], lstep1[13]);
- lstep2[14] = _mm_add_epi32(lstep1[12], lstep3[14]);
- lstep2[15] = _mm_add_epi32(lstep1[13], lstep3[15]);
- }
- {
- const __m128i k32_p16_p16 = pair_set_epi32(cospi_16_64, cospi_16_64);
- const __m128i k32_p16_m16 = pair_set_epi32(cospi_16_64, -cospi_16_64);
- const __m128i k32_p24_p08 = pair_set_epi32(cospi_24_64, cospi_8_64);
- const __m128i k32_m08_p24 = pair_set_epi32(-cospi_8_64, cospi_24_64);
-
- u[0] = _mm_unpacklo_epi32(lstep1[0], lstep1[2]);
- u[1] = _mm_unpackhi_epi32(lstep1[0], lstep1[2]);
- u[2] = _mm_unpacklo_epi32(lstep1[1], lstep1[3]);
- u[3] = _mm_unpackhi_epi32(lstep1[1], lstep1[3]);
- u[4] = _mm_unpacklo_epi32(lstep1[4], lstep1[6]);
- u[5] = _mm_unpackhi_epi32(lstep1[4], lstep1[6]);
- u[6] = _mm_unpacklo_epi32(lstep1[5], lstep1[7]);
- u[7] = _mm_unpackhi_epi32(lstep1[5], lstep1[7]);
-
- // TODO(jingning): manually inline k_madd_epi32_ to further hide
- // instruction latency.
- v[0] = k_madd_epi32(u[0], k32_p16_p16);
- v[1] = k_madd_epi32(u[1], k32_p16_p16);
- v[2] = k_madd_epi32(u[2], k32_p16_p16);
- v[3] = k_madd_epi32(u[3], k32_p16_p16);
- v[4] = k_madd_epi32(u[0], k32_p16_m16);
- v[5] = k_madd_epi32(u[1], k32_p16_m16);
- v[6] = k_madd_epi32(u[2], k32_p16_m16);
- v[7] = k_madd_epi32(u[3], k32_p16_m16);
- v[8] = k_madd_epi32(u[4], k32_p24_p08);
- v[9] = k_madd_epi32(u[5], k32_p24_p08);
- v[10] = k_madd_epi32(u[6], k32_p24_p08);
- v[11] = k_madd_epi32(u[7], k32_p24_p08);
- v[12] = k_madd_epi32(u[4], k32_m08_p24);
- v[13] = k_madd_epi32(u[5], k32_m08_p24);
- v[14] = k_madd_epi32(u[6], k32_m08_p24);
- v[15] = k_madd_epi32(u[7], k32_m08_p24);
-
-#if DCT_HIGH_BIT_DEPTH
- overflow = k_check_epi32_overflow_16(
- &v[0], &v[1], &v[2], &v[3], &v[4], &v[5], &v[6], &v[7], &v[8],
- &v[9], &v[10], &v[11], &v[12], &v[13], &v[14], &v[15], &kZero);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- u[0] = k_packs_epi64(v[0], v[1]);
- u[1] = k_packs_epi64(v[2], v[3]);
- u[2] = k_packs_epi64(v[4], v[5]);
- u[3] = k_packs_epi64(v[6], v[7]);
- u[4] = k_packs_epi64(v[8], v[9]);
- u[5] = k_packs_epi64(v[10], v[11]);
- u[6] = k_packs_epi64(v[12], v[13]);
- u[7] = k_packs_epi64(v[14], v[15]);
-
- v[0] = _mm_add_epi32(u[0], k__DCT_CONST_ROUNDING);
- v[1] = _mm_add_epi32(u[1], k__DCT_CONST_ROUNDING);
- v[2] = _mm_add_epi32(u[2], k__DCT_CONST_ROUNDING);
- v[3] = _mm_add_epi32(u[3], k__DCT_CONST_ROUNDING);
- v[4] = _mm_add_epi32(u[4], k__DCT_CONST_ROUNDING);
- v[5] = _mm_add_epi32(u[5], k__DCT_CONST_ROUNDING);
- v[6] = _mm_add_epi32(u[6], k__DCT_CONST_ROUNDING);
- v[7] = _mm_add_epi32(u[7], k__DCT_CONST_ROUNDING);
-
- u[0] = _mm_srai_epi32(v[0], DCT_CONST_BITS);
- u[1] = _mm_srai_epi32(v[1], DCT_CONST_BITS);
- u[2] = _mm_srai_epi32(v[2], DCT_CONST_BITS);
- u[3] = _mm_srai_epi32(v[3], DCT_CONST_BITS);
- u[4] = _mm_srai_epi32(v[4], DCT_CONST_BITS);
- u[5] = _mm_srai_epi32(v[5], DCT_CONST_BITS);
- u[6] = _mm_srai_epi32(v[6], DCT_CONST_BITS);
- u[7] = _mm_srai_epi32(v[7], DCT_CONST_BITS);
-
- sign[0] = _mm_cmplt_epi32(u[0], kZero);
- sign[1] = _mm_cmplt_epi32(u[1], kZero);
- sign[2] = _mm_cmplt_epi32(u[2], kZero);
- sign[3] = _mm_cmplt_epi32(u[3], kZero);
- sign[4] = _mm_cmplt_epi32(u[4], kZero);
- sign[5] = _mm_cmplt_epi32(u[5], kZero);
- sign[6] = _mm_cmplt_epi32(u[6], kZero);
- sign[7] = _mm_cmplt_epi32(u[7], kZero);
-
- u[0] = _mm_sub_epi32(u[0], sign[0]);
- u[1] = _mm_sub_epi32(u[1], sign[1]);
- u[2] = _mm_sub_epi32(u[2], sign[2]);
- u[3] = _mm_sub_epi32(u[3], sign[3]);
- u[4] = _mm_sub_epi32(u[4], sign[4]);
- u[5] = _mm_sub_epi32(u[5], sign[5]);
- u[6] = _mm_sub_epi32(u[6], sign[6]);
- u[7] = _mm_sub_epi32(u[7], sign[7]);
-
- u[0] = _mm_add_epi32(u[0], K32One);
- u[1] = _mm_add_epi32(u[1], K32One);
- u[2] = _mm_add_epi32(u[2], K32One);
- u[3] = _mm_add_epi32(u[3], K32One);
- u[4] = _mm_add_epi32(u[4], K32One);
- u[5] = _mm_add_epi32(u[5], K32One);
- u[6] = _mm_add_epi32(u[6], K32One);
- u[7] = _mm_add_epi32(u[7], K32One);
-
- u[0] = _mm_srai_epi32(u[0], 2);
- u[1] = _mm_srai_epi32(u[1], 2);
- u[2] = _mm_srai_epi32(u[2], 2);
- u[3] = _mm_srai_epi32(u[3], 2);
- u[4] = _mm_srai_epi32(u[4], 2);
- u[5] = _mm_srai_epi32(u[5], 2);
- u[6] = _mm_srai_epi32(u[6], 2);
- u[7] = _mm_srai_epi32(u[7], 2);
-
- // Combine
- out[0] = _mm_packs_epi32(u[0], u[1]);
- out[16] = _mm_packs_epi32(u[2], u[3]);
- out[8] = _mm_packs_epi32(u[4], u[5]);
- out[24] = _mm_packs_epi32(u[6], u[7]);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x4(&out[0], &out[16], &out[8], &out[24]);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- const __m128i k32_m08_p24 = pair_set_epi32(-cospi_8_64, cospi_24_64);
- const __m128i k32_m24_m08 = pair_set_epi32(-cospi_24_64, -cospi_8_64);
- const __m128i k32_p24_p08 = pair_set_epi32(cospi_24_64, cospi_8_64);
-
- u[0] = _mm_unpacklo_epi32(lstep1[18], lstep1[28]);
- u[1] = _mm_unpackhi_epi32(lstep1[18], lstep1[28]);
- u[2] = _mm_unpacklo_epi32(lstep1[19], lstep1[29]);
- u[3] = _mm_unpackhi_epi32(lstep1[19], lstep1[29]);
- u[4] = _mm_unpacklo_epi32(lstep1[20], lstep1[26]);
- u[5] = _mm_unpackhi_epi32(lstep1[20], lstep1[26]);
- u[6] = _mm_unpacklo_epi32(lstep1[21], lstep1[27]);
- u[7] = _mm_unpackhi_epi32(lstep1[21], lstep1[27]);
-
- v[0] = k_madd_epi32(u[0], k32_m08_p24);
- v[1] = k_madd_epi32(u[1], k32_m08_p24);
- v[2] = k_madd_epi32(u[2], k32_m08_p24);
- v[3] = k_madd_epi32(u[3], k32_m08_p24);
- v[4] = k_madd_epi32(u[4], k32_m24_m08);
- v[5] = k_madd_epi32(u[5], k32_m24_m08);
- v[6] = k_madd_epi32(u[6], k32_m24_m08);
- v[7] = k_madd_epi32(u[7], k32_m24_m08);
- v[8] = k_madd_epi32(u[4], k32_m08_p24);
- v[9] = k_madd_epi32(u[5], k32_m08_p24);
- v[10] = k_madd_epi32(u[6], k32_m08_p24);
- v[11] = k_madd_epi32(u[7], k32_m08_p24);
- v[12] = k_madd_epi32(u[0], k32_p24_p08);
- v[13] = k_madd_epi32(u[1], k32_p24_p08);
- v[14] = k_madd_epi32(u[2], k32_p24_p08);
- v[15] = k_madd_epi32(u[3], k32_p24_p08);
-
-#if DCT_HIGH_BIT_DEPTH
- overflow = k_check_epi32_overflow_16(
- &v[0], &v[1], &v[2], &v[3], &v[4], &v[5], &v[6], &v[7], &v[8],
- &v[9], &v[10], &v[11], &v[12], &v[13], &v[14], &v[15], &kZero);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- u[0] = k_packs_epi64(v[0], v[1]);
- u[1] = k_packs_epi64(v[2], v[3]);
- u[2] = k_packs_epi64(v[4], v[5]);
- u[3] = k_packs_epi64(v[6], v[7]);
- u[4] = k_packs_epi64(v[8], v[9]);
- u[5] = k_packs_epi64(v[10], v[11]);
- u[6] = k_packs_epi64(v[12], v[13]);
- u[7] = k_packs_epi64(v[14], v[15]);
-
- u[0] = _mm_add_epi32(u[0], k__DCT_CONST_ROUNDING);
- u[1] = _mm_add_epi32(u[1], k__DCT_CONST_ROUNDING);
- u[2] = _mm_add_epi32(u[2], k__DCT_CONST_ROUNDING);
- u[3] = _mm_add_epi32(u[3], k__DCT_CONST_ROUNDING);
- u[4] = _mm_add_epi32(u[4], k__DCT_CONST_ROUNDING);
- u[5] = _mm_add_epi32(u[5], k__DCT_CONST_ROUNDING);
- u[6] = _mm_add_epi32(u[6], k__DCT_CONST_ROUNDING);
- u[7] = _mm_add_epi32(u[7], k__DCT_CONST_ROUNDING);
-
- lstep2[18] = _mm_srai_epi32(u[0], DCT_CONST_BITS);
- lstep2[19] = _mm_srai_epi32(u[1], DCT_CONST_BITS);
- lstep2[20] = _mm_srai_epi32(u[2], DCT_CONST_BITS);
- lstep2[21] = _mm_srai_epi32(u[3], DCT_CONST_BITS);
- lstep2[26] = _mm_srai_epi32(u[4], DCT_CONST_BITS);
- lstep2[27] = _mm_srai_epi32(u[5], DCT_CONST_BITS);
- lstep2[28] = _mm_srai_epi32(u[6], DCT_CONST_BITS);
- lstep2[29] = _mm_srai_epi32(u[7], DCT_CONST_BITS);
- }
- {
- lstep2[32] = _mm_add_epi32(lstep1[38], lstep3[32]);
- lstep2[33] = _mm_add_epi32(lstep1[39], lstep3[33]);
- lstep2[34] = _mm_add_epi32(lstep1[36], lstep3[34]);
- lstep2[35] = _mm_add_epi32(lstep1[37], lstep3[35]);
- lstep2[36] = _mm_sub_epi32(lstep3[34], lstep1[36]);
- lstep2[37] = _mm_sub_epi32(lstep3[35], lstep1[37]);
- lstep2[38] = _mm_sub_epi32(lstep3[32], lstep1[38]);
- lstep2[39] = _mm_sub_epi32(lstep3[33], lstep1[39]);
- lstep2[40] = _mm_sub_epi32(lstep3[46], lstep1[40]);
- lstep2[41] = _mm_sub_epi32(lstep3[47], lstep1[41]);
- lstep2[42] = _mm_sub_epi32(lstep3[44], lstep1[42]);
- lstep2[43] = _mm_sub_epi32(lstep3[45], lstep1[43]);
- lstep2[44] = _mm_add_epi32(lstep1[42], lstep3[44]);
- lstep2[45] = _mm_add_epi32(lstep1[43], lstep3[45]);
- lstep2[46] = _mm_add_epi32(lstep1[40], lstep3[46]);
- lstep2[47] = _mm_add_epi32(lstep1[41], lstep3[47]);
- lstep2[48] = _mm_add_epi32(lstep1[54], lstep3[48]);
- lstep2[49] = _mm_add_epi32(lstep1[55], lstep3[49]);
- lstep2[50] = _mm_add_epi32(lstep1[52], lstep3[50]);
- lstep2[51] = _mm_add_epi32(lstep1[53], lstep3[51]);
- lstep2[52] = _mm_sub_epi32(lstep3[50], lstep1[52]);
- lstep2[53] = _mm_sub_epi32(lstep3[51], lstep1[53]);
- lstep2[54] = _mm_sub_epi32(lstep3[48], lstep1[54]);
- lstep2[55] = _mm_sub_epi32(lstep3[49], lstep1[55]);
- lstep2[56] = _mm_sub_epi32(lstep3[62], lstep1[56]);
- lstep2[57] = _mm_sub_epi32(lstep3[63], lstep1[57]);
- lstep2[58] = _mm_sub_epi32(lstep3[60], lstep1[58]);
- lstep2[59] = _mm_sub_epi32(lstep3[61], lstep1[59]);
- lstep2[60] = _mm_add_epi32(lstep1[58], lstep3[60]);
- lstep2[61] = _mm_add_epi32(lstep1[59], lstep3[61]);
- lstep2[62] = _mm_add_epi32(lstep1[56], lstep3[62]);
- lstep2[63] = _mm_add_epi32(lstep1[57], lstep3[63]);
- }
- // stage 6
- {
- const __m128i k32_p28_p04 = pair_set_epi32(cospi_28_64, cospi_4_64);
- const __m128i k32_p12_p20 = pair_set_epi32(cospi_12_64, cospi_20_64);
- const __m128i k32_m20_p12 = pair_set_epi32(-cospi_20_64, cospi_12_64);
- const __m128i k32_m04_p28 = pair_set_epi32(-cospi_4_64, cospi_28_64);
-
- u[0] = _mm_unpacklo_epi32(lstep2[8], lstep2[14]);
- u[1] = _mm_unpackhi_epi32(lstep2[8], lstep2[14]);
- u[2] = _mm_unpacklo_epi32(lstep2[9], lstep2[15]);
- u[3] = _mm_unpackhi_epi32(lstep2[9], lstep2[15]);
- u[4] = _mm_unpacklo_epi32(lstep2[10], lstep2[12]);
- u[5] = _mm_unpackhi_epi32(lstep2[10], lstep2[12]);
- u[6] = _mm_unpacklo_epi32(lstep2[11], lstep2[13]);
- u[7] = _mm_unpackhi_epi32(lstep2[11], lstep2[13]);
- u[8] = _mm_unpacklo_epi32(lstep2[10], lstep2[12]);
- u[9] = _mm_unpackhi_epi32(lstep2[10], lstep2[12]);
- u[10] = _mm_unpacklo_epi32(lstep2[11], lstep2[13]);
- u[11] = _mm_unpackhi_epi32(lstep2[11], lstep2[13]);
- u[12] = _mm_unpacklo_epi32(lstep2[8], lstep2[14]);
- u[13] = _mm_unpackhi_epi32(lstep2[8], lstep2[14]);
- u[14] = _mm_unpacklo_epi32(lstep2[9], lstep2[15]);
- u[15] = _mm_unpackhi_epi32(lstep2[9], lstep2[15]);
-
- v[0] = k_madd_epi32(u[0], k32_p28_p04);
- v[1] = k_madd_epi32(u[1], k32_p28_p04);
- v[2] = k_madd_epi32(u[2], k32_p28_p04);
- v[3] = k_madd_epi32(u[3], k32_p28_p04);
- v[4] = k_madd_epi32(u[4], k32_p12_p20);
- v[5] = k_madd_epi32(u[5], k32_p12_p20);
- v[6] = k_madd_epi32(u[6], k32_p12_p20);
- v[7] = k_madd_epi32(u[7], k32_p12_p20);
- v[8] = k_madd_epi32(u[8], k32_m20_p12);
- v[9] = k_madd_epi32(u[9], k32_m20_p12);
- v[10] = k_madd_epi32(u[10], k32_m20_p12);
- v[11] = k_madd_epi32(u[11], k32_m20_p12);
- v[12] = k_madd_epi32(u[12], k32_m04_p28);
- v[13] = k_madd_epi32(u[13], k32_m04_p28);
- v[14] = k_madd_epi32(u[14], k32_m04_p28);
- v[15] = k_madd_epi32(u[15], k32_m04_p28);
-
-#if DCT_HIGH_BIT_DEPTH
- overflow = k_check_epi32_overflow_16(
- &v[0], &v[1], &v[2], &v[3], &v[4], &v[5], &v[6], &v[7], &v[8],
- &v[9], &v[10], &v[11], &v[12], &v[13], &v[14], &v[15], &kZero);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- u[0] = k_packs_epi64(v[0], v[1]);
- u[1] = k_packs_epi64(v[2], v[3]);
- u[2] = k_packs_epi64(v[4], v[5]);
- u[3] = k_packs_epi64(v[6], v[7]);
- u[4] = k_packs_epi64(v[8], v[9]);
- u[5] = k_packs_epi64(v[10], v[11]);
- u[6] = k_packs_epi64(v[12], v[13]);
- u[7] = k_packs_epi64(v[14], v[15]);
-
- v[0] = _mm_add_epi32(u[0], k__DCT_CONST_ROUNDING);
- v[1] = _mm_add_epi32(u[1], k__DCT_CONST_ROUNDING);
- v[2] = _mm_add_epi32(u[2], k__DCT_CONST_ROUNDING);
- v[3] = _mm_add_epi32(u[3], k__DCT_CONST_ROUNDING);
- v[4] = _mm_add_epi32(u[4], k__DCT_CONST_ROUNDING);
- v[5] = _mm_add_epi32(u[5], k__DCT_CONST_ROUNDING);
- v[6] = _mm_add_epi32(u[6], k__DCT_CONST_ROUNDING);
- v[7] = _mm_add_epi32(u[7], k__DCT_CONST_ROUNDING);
-
- u[0] = _mm_srai_epi32(v[0], DCT_CONST_BITS);
- u[1] = _mm_srai_epi32(v[1], DCT_CONST_BITS);
- u[2] = _mm_srai_epi32(v[2], DCT_CONST_BITS);
- u[3] = _mm_srai_epi32(v[3], DCT_CONST_BITS);
- u[4] = _mm_srai_epi32(v[4], DCT_CONST_BITS);
- u[5] = _mm_srai_epi32(v[5], DCT_CONST_BITS);
- u[6] = _mm_srai_epi32(v[6], DCT_CONST_BITS);
- u[7] = _mm_srai_epi32(v[7], DCT_CONST_BITS);
-
- sign[0] = _mm_cmplt_epi32(u[0], kZero);
- sign[1] = _mm_cmplt_epi32(u[1], kZero);
- sign[2] = _mm_cmplt_epi32(u[2], kZero);
- sign[3] = _mm_cmplt_epi32(u[3], kZero);
- sign[4] = _mm_cmplt_epi32(u[4], kZero);
- sign[5] = _mm_cmplt_epi32(u[5], kZero);
- sign[6] = _mm_cmplt_epi32(u[6], kZero);
- sign[7] = _mm_cmplt_epi32(u[7], kZero);
-
- u[0] = _mm_sub_epi32(u[0], sign[0]);
- u[1] = _mm_sub_epi32(u[1], sign[1]);
- u[2] = _mm_sub_epi32(u[2], sign[2]);
- u[3] = _mm_sub_epi32(u[3], sign[3]);
- u[4] = _mm_sub_epi32(u[4], sign[4]);
- u[5] = _mm_sub_epi32(u[5], sign[5]);
- u[6] = _mm_sub_epi32(u[6], sign[6]);
- u[7] = _mm_sub_epi32(u[7], sign[7]);
-
- u[0] = _mm_add_epi32(u[0], K32One);
- u[1] = _mm_add_epi32(u[1], K32One);
- u[2] = _mm_add_epi32(u[2], K32One);
- u[3] = _mm_add_epi32(u[3], K32One);
- u[4] = _mm_add_epi32(u[4], K32One);
- u[5] = _mm_add_epi32(u[5], K32One);
- u[6] = _mm_add_epi32(u[6], K32One);
- u[7] = _mm_add_epi32(u[7], K32One);
-
- u[0] = _mm_srai_epi32(u[0], 2);
- u[1] = _mm_srai_epi32(u[1], 2);
- u[2] = _mm_srai_epi32(u[2], 2);
- u[3] = _mm_srai_epi32(u[3], 2);
- u[4] = _mm_srai_epi32(u[4], 2);
- u[5] = _mm_srai_epi32(u[5], 2);
- u[6] = _mm_srai_epi32(u[6], 2);
- u[7] = _mm_srai_epi32(u[7], 2);
-
- out[4] = _mm_packs_epi32(u[0], u[1]);
- out[20] = _mm_packs_epi32(u[2], u[3]);
- out[12] = _mm_packs_epi32(u[4], u[5]);
- out[28] = _mm_packs_epi32(u[6], u[7]);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x4(&out[4], &out[20], &out[12], &out[28]);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- lstep3[16] = _mm_add_epi32(lstep2[18], lstep1[16]);
- lstep3[17] = _mm_add_epi32(lstep2[19], lstep1[17]);
- lstep3[18] = _mm_sub_epi32(lstep1[16], lstep2[18]);
- lstep3[19] = _mm_sub_epi32(lstep1[17], lstep2[19]);
- lstep3[20] = _mm_sub_epi32(lstep1[22], lstep2[20]);
- lstep3[21] = _mm_sub_epi32(lstep1[23], lstep2[21]);
- lstep3[22] = _mm_add_epi32(lstep2[20], lstep1[22]);
- lstep3[23] = _mm_add_epi32(lstep2[21], lstep1[23]);
- lstep3[24] = _mm_add_epi32(lstep2[26], lstep1[24]);
- lstep3[25] = _mm_add_epi32(lstep2[27], lstep1[25]);
- lstep3[26] = _mm_sub_epi32(lstep1[24], lstep2[26]);
- lstep3[27] = _mm_sub_epi32(lstep1[25], lstep2[27]);
- lstep3[28] = _mm_sub_epi32(lstep1[30], lstep2[28]);
- lstep3[29] = _mm_sub_epi32(lstep1[31], lstep2[29]);
- lstep3[30] = _mm_add_epi32(lstep2[28], lstep1[30]);
- lstep3[31] = _mm_add_epi32(lstep2[29], lstep1[31]);
- }
- {
- const __m128i k32_m04_p28 = pair_set_epi32(-cospi_4_64, cospi_28_64);
- const __m128i k32_m28_m04 = pair_set_epi32(-cospi_28_64, -cospi_4_64);
- const __m128i k32_m20_p12 = pair_set_epi32(-cospi_20_64, cospi_12_64);
- const __m128i k32_m12_m20 =
- pair_set_epi32(-cospi_12_64, -cospi_20_64);
- const __m128i k32_p12_p20 = pair_set_epi32(cospi_12_64, cospi_20_64);
- const __m128i k32_p28_p04 = pair_set_epi32(cospi_28_64, cospi_4_64);
-
- u[0] = _mm_unpacklo_epi32(lstep2[34], lstep2[60]);
- u[1] = _mm_unpackhi_epi32(lstep2[34], lstep2[60]);
- u[2] = _mm_unpacklo_epi32(lstep2[35], lstep2[61]);
- u[3] = _mm_unpackhi_epi32(lstep2[35], lstep2[61]);
- u[4] = _mm_unpacklo_epi32(lstep2[36], lstep2[58]);
- u[5] = _mm_unpackhi_epi32(lstep2[36], lstep2[58]);
- u[6] = _mm_unpacklo_epi32(lstep2[37], lstep2[59]);
- u[7] = _mm_unpackhi_epi32(lstep2[37], lstep2[59]);
- u[8] = _mm_unpacklo_epi32(lstep2[42], lstep2[52]);
- u[9] = _mm_unpackhi_epi32(lstep2[42], lstep2[52]);
- u[10] = _mm_unpacklo_epi32(lstep2[43], lstep2[53]);
- u[11] = _mm_unpackhi_epi32(lstep2[43], lstep2[53]);
- u[12] = _mm_unpacklo_epi32(lstep2[44], lstep2[50]);
- u[13] = _mm_unpackhi_epi32(lstep2[44], lstep2[50]);
- u[14] = _mm_unpacklo_epi32(lstep2[45], lstep2[51]);
- u[15] = _mm_unpackhi_epi32(lstep2[45], lstep2[51]);
-
- v[0] = k_madd_epi32(u[0], k32_m04_p28);
- v[1] = k_madd_epi32(u[1], k32_m04_p28);
- v[2] = k_madd_epi32(u[2], k32_m04_p28);
- v[3] = k_madd_epi32(u[3], k32_m04_p28);
- v[4] = k_madd_epi32(u[4], k32_m28_m04);
- v[5] = k_madd_epi32(u[5], k32_m28_m04);
- v[6] = k_madd_epi32(u[6], k32_m28_m04);
- v[7] = k_madd_epi32(u[7], k32_m28_m04);
- v[8] = k_madd_epi32(u[8], k32_m20_p12);
- v[9] = k_madd_epi32(u[9], k32_m20_p12);
- v[10] = k_madd_epi32(u[10], k32_m20_p12);
- v[11] = k_madd_epi32(u[11], k32_m20_p12);
- v[12] = k_madd_epi32(u[12], k32_m12_m20);
- v[13] = k_madd_epi32(u[13], k32_m12_m20);
- v[14] = k_madd_epi32(u[14], k32_m12_m20);
- v[15] = k_madd_epi32(u[15], k32_m12_m20);
- v[16] = k_madd_epi32(u[12], k32_m20_p12);
- v[17] = k_madd_epi32(u[13], k32_m20_p12);
- v[18] = k_madd_epi32(u[14], k32_m20_p12);
- v[19] = k_madd_epi32(u[15], k32_m20_p12);
- v[20] = k_madd_epi32(u[8], k32_p12_p20);
- v[21] = k_madd_epi32(u[9], k32_p12_p20);
- v[22] = k_madd_epi32(u[10], k32_p12_p20);
- v[23] = k_madd_epi32(u[11], k32_p12_p20);
- v[24] = k_madd_epi32(u[4], k32_m04_p28);
- v[25] = k_madd_epi32(u[5], k32_m04_p28);
- v[26] = k_madd_epi32(u[6], k32_m04_p28);
- v[27] = k_madd_epi32(u[7], k32_m04_p28);
- v[28] = k_madd_epi32(u[0], k32_p28_p04);
- v[29] = k_madd_epi32(u[1], k32_p28_p04);
- v[30] = k_madd_epi32(u[2], k32_p28_p04);
- v[31] = k_madd_epi32(u[3], k32_p28_p04);
-
-#if DCT_HIGH_BIT_DEPTH
- overflow = k_check_epi32_overflow_32(
- &v[0], &v[1], &v[2], &v[3], &v[4], &v[5], &v[6], &v[7], &v[8],
- &v[9], &v[10], &v[11], &v[12], &v[13], &v[14], &v[15], &v[16],
- &v[17], &v[18], &v[19], &v[20], &v[21], &v[22], &v[23], &v[24],
- &v[25], &v[26], &v[27], &v[28], &v[29], &v[30], &v[31], &kZero);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- u[0] = k_packs_epi64(v[0], v[1]);
- u[1] = k_packs_epi64(v[2], v[3]);
- u[2] = k_packs_epi64(v[4], v[5]);
- u[3] = k_packs_epi64(v[6], v[7]);
- u[4] = k_packs_epi64(v[8], v[9]);
- u[5] = k_packs_epi64(v[10], v[11]);
- u[6] = k_packs_epi64(v[12], v[13]);
- u[7] = k_packs_epi64(v[14], v[15]);
- u[8] = k_packs_epi64(v[16], v[17]);
- u[9] = k_packs_epi64(v[18], v[19]);
- u[10] = k_packs_epi64(v[20], v[21]);
- u[11] = k_packs_epi64(v[22], v[23]);
- u[12] = k_packs_epi64(v[24], v[25]);
- u[13] = k_packs_epi64(v[26], v[27]);
- u[14] = k_packs_epi64(v[28], v[29]);
- u[15] = k_packs_epi64(v[30], v[31]);
-
- v[0] = _mm_add_epi32(u[0], k__DCT_CONST_ROUNDING);
- v[1] = _mm_add_epi32(u[1], k__DCT_CONST_ROUNDING);
- v[2] = _mm_add_epi32(u[2], k__DCT_CONST_ROUNDING);
- v[3] = _mm_add_epi32(u[3], k__DCT_CONST_ROUNDING);
- v[4] = _mm_add_epi32(u[4], k__DCT_CONST_ROUNDING);
- v[5] = _mm_add_epi32(u[5], k__DCT_CONST_ROUNDING);
- v[6] = _mm_add_epi32(u[6], k__DCT_CONST_ROUNDING);
- v[7] = _mm_add_epi32(u[7], k__DCT_CONST_ROUNDING);
- v[8] = _mm_add_epi32(u[8], k__DCT_CONST_ROUNDING);
- v[9] = _mm_add_epi32(u[9], k__DCT_CONST_ROUNDING);
- v[10] = _mm_add_epi32(u[10], k__DCT_CONST_ROUNDING);
- v[11] = _mm_add_epi32(u[11], k__DCT_CONST_ROUNDING);
- v[12] = _mm_add_epi32(u[12], k__DCT_CONST_ROUNDING);
- v[13] = _mm_add_epi32(u[13], k__DCT_CONST_ROUNDING);
- v[14] = _mm_add_epi32(u[14], k__DCT_CONST_ROUNDING);
- v[15] = _mm_add_epi32(u[15], k__DCT_CONST_ROUNDING);
-
- lstep3[34] = _mm_srai_epi32(v[0], DCT_CONST_BITS);
- lstep3[35] = _mm_srai_epi32(v[1], DCT_CONST_BITS);
- lstep3[36] = _mm_srai_epi32(v[2], DCT_CONST_BITS);
- lstep3[37] = _mm_srai_epi32(v[3], DCT_CONST_BITS);
- lstep3[42] = _mm_srai_epi32(v[4], DCT_CONST_BITS);
- lstep3[43] = _mm_srai_epi32(v[5], DCT_CONST_BITS);
- lstep3[44] = _mm_srai_epi32(v[6], DCT_CONST_BITS);
- lstep3[45] = _mm_srai_epi32(v[7], DCT_CONST_BITS);
- lstep3[50] = _mm_srai_epi32(v[8], DCT_CONST_BITS);
- lstep3[51] = _mm_srai_epi32(v[9], DCT_CONST_BITS);
- lstep3[52] = _mm_srai_epi32(v[10], DCT_CONST_BITS);
- lstep3[53] = _mm_srai_epi32(v[11], DCT_CONST_BITS);
- lstep3[58] = _mm_srai_epi32(v[12], DCT_CONST_BITS);
- lstep3[59] = _mm_srai_epi32(v[13], DCT_CONST_BITS);
- lstep3[60] = _mm_srai_epi32(v[14], DCT_CONST_BITS);
- lstep3[61] = _mm_srai_epi32(v[15], DCT_CONST_BITS);
- }
- // stage 7
- {
- const __m128i k32_p30_p02 = pair_set_epi32(cospi_30_64, cospi_2_64);
- const __m128i k32_p14_p18 = pair_set_epi32(cospi_14_64, cospi_18_64);
- const __m128i k32_p22_p10 = pair_set_epi32(cospi_22_64, cospi_10_64);
- const __m128i k32_p06_p26 = pair_set_epi32(cospi_6_64, cospi_26_64);
- const __m128i k32_m26_p06 = pair_set_epi32(-cospi_26_64, cospi_6_64);
- const __m128i k32_m10_p22 = pair_set_epi32(-cospi_10_64, cospi_22_64);
- const __m128i k32_m18_p14 = pair_set_epi32(-cospi_18_64, cospi_14_64);
- const __m128i k32_m02_p30 = pair_set_epi32(-cospi_2_64, cospi_30_64);
-
- u[0] = _mm_unpacklo_epi32(lstep3[16], lstep3[30]);
- u[1] = _mm_unpackhi_epi32(lstep3[16], lstep3[30]);
- u[2] = _mm_unpacklo_epi32(lstep3[17], lstep3[31]);
- u[3] = _mm_unpackhi_epi32(lstep3[17], lstep3[31]);
- u[4] = _mm_unpacklo_epi32(lstep3[18], lstep3[28]);
- u[5] = _mm_unpackhi_epi32(lstep3[18], lstep3[28]);
- u[6] = _mm_unpacklo_epi32(lstep3[19], lstep3[29]);
- u[7] = _mm_unpackhi_epi32(lstep3[19], lstep3[29]);
- u[8] = _mm_unpacklo_epi32(lstep3[20], lstep3[26]);
- u[9] = _mm_unpackhi_epi32(lstep3[20], lstep3[26]);
- u[10] = _mm_unpacklo_epi32(lstep3[21], lstep3[27]);
- u[11] = _mm_unpackhi_epi32(lstep3[21], lstep3[27]);
- u[12] = _mm_unpacklo_epi32(lstep3[22], lstep3[24]);
- u[13] = _mm_unpackhi_epi32(lstep3[22], lstep3[24]);
- u[14] = _mm_unpacklo_epi32(lstep3[23], lstep3[25]);
- u[15] = _mm_unpackhi_epi32(lstep3[23], lstep3[25]);
-
- v[0] = k_madd_epi32(u[0], k32_p30_p02);
- v[1] = k_madd_epi32(u[1], k32_p30_p02);
- v[2] = k_madd_epi32(u[2], k32_p30_p02);
- v[3] = k_madd_epi32(u[3], k32_p30_p02);
- v[4] = k_madd_epi32(u[4], k32_p14_p18);
- v[5] = k_madd_epi32(u[5], k32_p14_p18);
- v[6] = k_madd_epi32(u[6], k32_p14_p18);
- v[7] = k_madd_epi32(u[7], k32_p14_p18);
- v[8] = k_madd_epi32(u[8], k32_p22_p10);
- v[9] = k_madd_epi32(u[9], k32_p22_p10);
- v[10] = k_madd_epi32(u[10], k32_p22_p10);
- v[11] = k_madd_epi32(u[11], k32_p22_p10);
- v[12] = k_madd_epi32(u[12], k32_p06_p26);
- v[13] = k_madd_epi32(u[13], k32_p06_p26);
- v[14] = k_madd_epi32(u[14], k32_p06_p26);
- v[15] = k_madd_epi32(u[15], k32_p06_p26);
- v[16] = k_madd_epi32(u[12], k32_m26_p06);
- v[17] = k_madd_epi32(u[13], k32_m26_p06);
- v[18] = k_madd_epi32(u[14], k32_m26_p06);
- v[19] = k_madd_epi32(u[15], k32_m26_p06);
- v[20] = k_madd_epi32(u[8], k32_m10_p22);
- v[21] = k_madd_epi32(u[9], k32_m10_p22);
- v[22] = k_madd_epi32(u[10], k32_m10_p22);
- v[23] = k_madd_epi32(u[11], k32_m10_p22);
- v[24] = k_madd_epi32(u[4], k32_m18_p14);
- v[25] = k_madd_epi32(u[5], k32_m18_p14);
- v[26] = k_madd_epi32(u[6], k32_m18_p14);
- v[27] = k_madd_epi32(u[7], k32_m18_p14);
- v[28] = k_madd_epi32(u[0], k32_m02_p30);
- v[29] = k_madd_epi32(u[1], k32_m02_p30);
- v[30] = k_madd_epi32(u[2], k32_m02_p30);
- v[31] = k_madd_epi32(u[3], k32_m02_p30);
-
-#if DCT_HIGH_BIT_DEPTH
- overflow = k_check_epi32_overflow_32(
- &v[0], &v[1], &v[2], &v[3], &v[4], &v[5], &v[6], &v[7], &v[8],
- &v[9], &v[10], &v[11], &v[12], &v[13], &v[14], &v[15], &v[16],
- &v[17], &v[18], &v[19], &v[20], &v[21], &v[22], &v[23], &v[24],
- &v[25], &v[26], &v[27], &v[28], &v[29], &v[30], &v[31], &kZero);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- u[0] = k_packs_epi64(v[0], v[1]);
- u[1] = k_packs_epi64(v[2], v[3]);
- u[2] = k_packs_epi64(v[4], v[5]);
- u[3] = k_packs_epi64(v[6], v[7]);
- u[4] = k_packs_epi64(v[8], v[9]);
- u[5] = k_packs_epi64(v[10], v[11]);
- u[6] = k_packs_epi64(v[12], v[13]);
- u[7] = k_packs_epi64(v[14], v[15]);
- u[8] = k_packs_epi64(v[16], v[17]);
- u[9] = k_packs_epi64(v[18], v[19]);
- u[10] = k_packs_epi64(v[20], v[21]);
- u[11] = k_packs_epi64(v[22], v[23]);
- u[12] = k_packs_epi64(v[24], v[25]);
- u[13] = k_packs_epi64(v[26], v[27]);
- u[14] = k_packs_epi64(v[28], v[29]);
- u[15] = k_packs_epi64(v[30], v[31]);
-
- v[0] = _mm_add_epi32(u[0], k__DCT_CONST_ROUNDING);
- v[1] = _mm_add_epi32(u[1], k__DCT_CONST_ROUNDING);
- v[2] = _mm_add_epi32(u[2], k__DCT_CONST_ROUNDING);
- v[3] = _mm_add_epi32(u[3], k__DCT_CONST_ROUNDING);
- v[4] = _mm_add_epi32(u[4], k__DCT_CONST_ROUNDING);
- v[5] = _mm_add_epi32(u[5], k__DCT_CONST_ROUNDING);
- v[6] = _mm_add_epi32(u[6], k__DCT_CONST_ROUNDING);
- v[7] = _mm_add_epi32(u[7], k__DCT_CONST_ROUNDING);
- v[8] = _mm_add_epi32(u[8], k__DCT_CONST_ROUNDING);
- v[9] = _mm_add_epi32(u[9], k__DCT_CONST_ROUNDING);
- v[10] = _mm_add_epi32(u[10], k__DCT_CONST_ROUNDING);
- v[11] = _mm_add_epi32(u[11], k__DCT_CONST_ROUNDING);
- v[12] = _mm_add_epi32(u[12], k__DCT_CONST_ROUNDING);
- v[13] = _mm_add_epi32(u[13], k__DCT_CONST_ROUNDING);
- v[14] = _mm_add_epi32(u[14], k__DCT_CONST_ROUNDING);
- v[15] = _mm_add_epi32(u[15], k__DCT_CONST_ROUNDING);
-
- u[0] = _mm_srai_epi32(v[0], DCT_CONST_BITS);
- u[1] = _mm_srai_epi32(v[1], DCT_CONST_BITS);
- u[2] = _mm_srai_epi32(v[2], DCT_CONST_BITS);
- u[3] = _mm_srai_epi32(v[3], DCT_CONST_BITS);
- u[4] = _mm_srai_epi32(v[4], DCT_CONST_BITS);
- u[5] = _mm_srai_epi32(v[5], DCT_CONST_BITS);
- u[6] = _mm_srai_epi32(v[6], DCT_CONST_BITS);
- u[7] = _mm_srai_epi32(v[7], DCT_CONST_BITS);
- u[8] = _mm_srai_epi32(v[8], DCT_CONST_BITS);
- u[9] = _mm_srai_epi32(v[9], DCT_CONST_BITS);
- u[10] = _mm_srai_epi32(v[10], DCT_CONST_BITS);
- u[11] = _mm_srai_epi32(v[11], DCT_CONST_BITS);
- u[12] = _mm_srai_epi32(v[12], DCT_CONST_BITS);
- u[13] = _mm_srai_epi32(v[13], DCT_CONST_BITS);
- u[14] = _mm_srai_epi32(v[14], DCT_CONST_BITS);
- u[15] = _mm_srai_epi32(v[15], DCT_CONST_BITS);
-
- v[0] = _mm_cmplt_epi32(u[0], kZero);
- v[1] = _mm_cmplt_epi32(u[1], kZero);
- v[2] = _mm_cmplt_epi32(u[2], kZero);
- v[3] = _mm_cmplt_epi32(u[3], kZero);
- v[4] = _mm_cmplt_epi32(u[4], kZero);
- v[5] = _mm_cmplt_epi32(u[5], kZero);
- v[6] = _mm_cmplt_epi32(u[6], kZero);
- v[7] = _mm_cmplt_epi32(u[7], kZero);
- v[8] = _mm_cmplt_epi32(u[8], kZero);
- v[9] = _mm_cmplt_epi32(u[9], kZero);
- v[10] = _mm_cmplt_epi32(u[10], kZero);
- v[11] = _mm_cmplt_epi32(u[11], kZero);
- v[12] = _mm_cmplt_epi32(u[12], kZero);
- v[13] = _mm_cmplt_epi32(u[13], kZero);
- v[14] = _mm_cmplt_epi32(u[14], kZero);
- v[15] = _mm_cmplt_epi32(u[15], kZero);
-
- u[0] = _mm_sub_epi32(u[0], v[0]);
- u[1] = _mm_sub_epi32(u[1], v[1]);
- u[2] = _mm_sub_epi32(u[2], v[2]);
- u[3] = _mm_sub_epi32(u[3], v[3]);
- u[4] = _mm_sub_epi32(u[4], v[4]);
- u[5] = _mm_sub_epi32(u[5], v[5]);
- u[6] = _mm_sub_epi32(u[6], v[6]);
- u[7] = _mm_sub_epi32(u[7], v[7]);
- u[8] = _mm_sub_epi32(u[8], v[8]);
- u[9] = _mm_sub_epi32(u[9], v[9]);
- u[10] = _mm_sub_epi32(u[10], v[10]);
- u[11] = _mm_sub_epi32(u[11], v[11]);
- u[12] = _mm_sub_epi32(u[12], v[12]);
- u[13] = _mm_sub_epi32(u[13], v[13]);
- u[14] = _mm_sub_epi32(u[14], v[14]);
- u[15] = _mm_sub_epi32(u[15], v[15]);
-
- v[0] = _mm_add_epi32(u[0], K32One);
- v[1] = _mm_add_epi32(u[1], K32One);
- v[2] = _mm_add_epi32(u[2], K32One);
- v[3] = _mm_add_epi32(u[3], K32One);
- v[4] = _mm_add_epi32(u[4], K32One);
- v[5] = _mm_add_epi32(u[5], K32One);
- v[6] = _mm_add_epi32(u[6], K32One);
- v[7] = _mm_add_epi32(u[7], K32One);
- v[8] = _mm_add_epi32(u[8], K32One);
- v[9] = _mm_add_epi32(u[9], K32One);
- v[10] = _mm_add_epi32(u[10], K32One);
- v[11] = _mm_add_epi32(u[11], K32One);
- v[12] = _mm_add_epi32(u[12], K32One);
- v[13] = _mm_add_epi32(u[13], K32One);
- v[14] = _mm_add_epi32(u[14], K32One);
- v[15] = _mm_add_epi32(u[15], K32One);
-
- u[0] = _mm_srai_epi32(v[0], 2);
- u[1] = _mm_srai_epi32(v[1], 2);
- u[2] = _mm_srai_epi32(v[2], 2);
- u[3] = _mm_srai_epi32(v[3], 2);
- u[4] = _mm_srai_epi32(v[4], 2);
- u[5] = _mm_srai_epi32(v[5], 2);
- u[6] = _mm_srai_epi32(v[6], 2);
- u[7] = _mm_srai_epi32(v[7], 2);
- u[8] = _mm_srai_epi32(v[8], 2);
- u[9] = _mm_srai_epi32(v[9], 2);
- u[10] = _mm_srai_epi32(v[10], 2);
- u[11] = _mm_srai_epi32(v[11], 2);
- u[12] = _mm_srai_epi32(v[12], 2);
- u[13] = _mm_srai_epi32(v[13], 2);
- u[14] = _mm_srai_epi32(v[14], 2);
- u[15] = _mm_srai_epi32(v[15], 2);
-
- out[2] = _mm_packs_epi32(u[0], u[1]);
- out[18] = _mm_packs_epi32(u[2], u[3]);
- out[10] = _mm_packs_epi32(u[4], u[5]);
- out[26] = _mm_packs_epi32(u[6], u[7]);
- out[6] = _mm_packs_epi32(u[8], u[9]);
- out[22] = _mm_packs_epi32(u[10], u[11]);
- out[14] = _mm_packs_epi32(u[12], u[13]);
- out[30] = _mm_packs_epi32(u[14], u[15]);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x8(&out[2], &out[18], &out[10], &out[26],
- &out[6], &out[22], &out[14], &out[30]);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- lstep1[32] = _mm_add_epi32(lstep3[34], lstep2[32]);
- lstep1[33] = _mm_add_epi32(lstep3[35], lstep2[33]);
- lstep1[34] = _mm_sub_epi32(lstep2[32], lstep3[34]);
- lstep1[35] = _mm_sub_epi32(lstep2[33], lstep3[35]);
- lstep1[36] = _mm_sub_epi32(lstep2[38], lstep3[36]);
- lstep1[37] = _mm_sub_epi32(lstep2[39], lstep3[37]);
- lstep1[38] = _mm_add_epi32(lstep3[36], lstep2[38]);
- lstep1[39] = _mm_add_epi32(lstep3[37], lstep2[39]);
- lstep1[40] = _mm_add_epi32(lstep3[42], lstep2[40]);
- lstep1[41] = _mm_add_epi32(lstep3[43], lstep2[41]);
- lstep1[42] = _mm_sub_epi32(lstep2[40], lstep3[42]);
- lstep1[43] = _mm_sub_epi32(lstep2[41], lstep3[43]);
- lstep1[44] = _mm_sub_epi32(lstep2[46], lstep3[44]);
- lstep1[45] = _mm_sub_epi32(lstep2[47], lstep3[45]);
- lstep1[46] = _mm_add_epi32(lstep3[44], lstep2[46]);
- lstep1[47] = _mm_add_epi32(lstep3[45], lstep2[47]);
- lstep1[48] = _mm_add_epi32(lstep3[50], lstep2[48]);
- lstep1[49] = _mm_add_epi32(lstep3[51], lstep2[49]);
- lstep1[50] = _mm_sub_epi32(lstep2[48], lstep3[50]);
- lstep1[51] = _mm_sub_epi32(lstep2[49], lstep3[51]);
- lstep1[52] = _mm_sub_epi32(lstep2[54], lstep3[52]);
- lstep1[53] = _mm_sub_epi32(lstep2[55], lstep3[53]);
- lstep1[54] = _mm_add_epi32(lstep3[52], lstep2[54]);
- lstep1[55] = _mm_add_epi32(lstep3[53], lstep2[55]);
- lstep1[56] = _mm_add_epi32(lstep3[58], lstep2[56]);
- lstep1[57] = _mm_add_epi32(lstep3[59], lstep2[57]);
- lstep1[58] = _mm_sub_epi32(lstep2[56], lstep3[58]);
- lstep1[59] = _mm_sub_epi32(lstep2[57], lstep3[59]);
- lstep1[60] = _mm_sub_epi32(lstep2[62], lstep3[60]);
- lstep1[61] = _mm_sub_epi32(lstep2[63], lstep3[61]);
- lstep1[62] = _mm_add_epi32(lstep3[60], lstep2[62]);
- lstep1[63] = _mm_add_epi32(lstep3[61], lstep2[63]);
- }
- // stage 8
- {
- const __m128i k32_p31_p01 = pair_set_epi32(cospi_31_64, cospi_1_64);
- const __m128i k32_p15_p17 = pair_set_epi32(cospi_15_64, cospi_17_64);
- const __m128i k32_p23_p09 = pair_set_epi32(cospi_23_64, cospi_9_64);
- const __m128i k32_p07_p25 = pair_set_epi32(cospi_7_64, cospi_25_64);
- const __m128i k32_m25_p07 = pair_set_epi32(-cospi_25_64, cospi_7_64);
- const __m128i k32_m09_p23 = pair_set_epi32(-cospi_9_64, cospi_23_64);
- const __m128i k32_m17_p15 = pair_set_epi32(-cospi_17_64, cospi_15_64);
- const __m128i k32_m01_p31 = pair_set_epi32(-cospi_1_64, cospi_31_64);
-
- u[0] = _mm_unpacklo_epi32(lstep1[32], lstep1[62]);
- u[1] = _mm_unpackhi_epi32(lstep1[32], lstep1[62]);
- u[2] = _mm_unpacklo_epi32(lstep1[33], lstep1[63]);
- u[3] = _mm_unpackhi_epi32(lstep1[33], lstep1[63]);
- u[4] = _mm_unpacklo_epi32(lstep1[34], lstep1[60]);
- u[5] = _mm_unpackhi_epi32(lstep1[34], lstep1[60]);
- u[6] = _mm_unpacklo_epi32(lstep1[35], lstep1[61]);
- u[7] = _mm_unpackhi_epi32(lstep1[35], lstep1[61]);
- u[8] = _mm_unpacklo_epi32(lstep1[36], lstep1[58]);
- u[9] = _mm_unpackhi_epi32(lstep1[36], lstep1[58]);
- u[10] = _mm_unpacklo_epi32(lstep1[37], lstep1[59]);
- u[11] = _mm_unpackhi_epi32(lstep1[37], lstep1[59]);
- u[12] = _mm_unpacklo_epi32(lstep1[38], lstep1[56]);
- u[13] = _mm_unpackhi_epi32(lstep1[38], lstep1[56]);
- u[14] = _mm_unpacklo_epi32(lstep1[39], lstep1[57]);
- u[15] = _mm_unpackhi_epi32(lstep1[39], lstep1[57]);
-
- v[0] = k_madd_epi32(u[0], k32_p31_p01);
- v[1] = k_madd_epi32(u[1], k32_p31_p01);
- v[2] = k_madd_epi32(u[2], k32_p31_p01);
- v[3] = k_madd_epi32(u[3], k32_p31_p01);
- v[4] = k_madd_epi32(u[4], k32_p15_p17);
- v[5] = k_madd_epi32(u[5], k32_p15_p17);
- v[6] = k_madd_epi32(u[6], k32_p15_p17);
- v[7] = k_madd_epi32(u[7], k32_p15_p17);
- v[8] = k_madd_epi32(u[8], k32_p23_p09);
- v[9] = k_madd_epi32(u[9], k32_p23_p09);
- v[10] = k_madd_epi32(u[10], k32_p23_p09);
- v[11] = k_madd_epi32(u[11], k32_p23_p09);
- v[12] = k_madd_epi32(u[12], k32_p07_p25);
- v[13] = k_madd_epi32(u[13], k32_p07_p25);
- v[14] = k_madd_epi32(u[14], k32_p07_p25);
- v[15] = k_madd_epi32(u[15], k32_p07_p25);
- v[16] = k_madd_epi32(u[12], k32_m25_p07);
- v[17] = k_madd_epi32(u[13], k32_m25_p07);
- v[18] = k_madd_epi32(u[14], k32_m25_p07);
- v[19] = k_madd_epi32(u[15], k32_m25_p07);
- v[20] = k_madd_epi32(u[8], k32_m09_p23);
- v[21] = k_madd_epi32(u[9], k32_m09_p23);
- v[22] = k_madd_epi32(u[10], k32_m09_p23);
- v[23] = k_madd_epi32(u[11], k32_m09_p23);
- v[24] = k_madd_epi32(u[4], k32_m17_p15);
- v[25] = k_madd_epi32(u[5], k32_m17_p15);
- v[26] = k_madd_epi32(u[6], k32_m17_p15);
- v[27] = k_madd_epi32(u[7], k32_m17_p15);
- v[28] = k_madd_epi32(u[0], k32_m01_p31);
- v[29] = k_madd_epi32(u[1], k32_m01_p31);
- v[30] = k_madd_epi32(u[2], k32_m01_p31);
- v[31] = k_madd_epi32(u[3], k32_m01_p31);
-
-#if DCT_HIGH_BIT_DEPTH
- overflow = k_check_epi32_overflow_32(
- &v[0], &v[1], &v[2], &v[3], &v[4], &v[5], &v[6], &v[7], &v[8],
- &v[9], &v[10], &v[11], &v[12], &v[13], &v[14], &v[15], &v[16],
- &v[17], &v[18], &v[19], &v[20], &v[21], &v[22], &v[23], &v[24],
- &v[25], &v[26], &v[27], &v[28], &v[29], &v[30], &v[31], &kZero);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- u[0] = k_packs_epi64(v[0], v[1]);
- u[1] = k_packs_epi64(v[2], v[3]);
- u[2] = k_packs_epi64(v[4], v[5]);
- u[3] = k_packs_epi64(v[6], v[7]);
- u[4] = k_packs_epi64(v[8], v[9]);
- u[5] = k_packs_epi64(v[10], v[11]);
- u[6] = k_packs_epi64(v[12], v[13]);
- u[7] = k_packs_epi64(v[14], v[15]);
- u[8] = k_packs_epi64(v[16], v[17]);
- u[9] = k_packs_epi64(v[18], v[19]);
- u[10] = k_packs_epi64(v[20], v[21]);
- u[11] = k_packs_epi64(v[22], v[23]);
- u[12] = k_packs_epi64(v[24], v[25]);
- u[13] = k_packs_epi64(v[26], v[27]);
- u[14] = k_packs_epi64(v[28], v[29]);
- u[15] = k_packs_epi64(v[30], v[31]);
-
- v[0] = _mm_add_epi32(u[0], k__DCT_CONST_ROUNDING);
- v[1] = _mm_add_epi32(u[1], k__DCT_CONST_ROUNDING);
- v[2] = _mm_add_epi32(u[2], k__DCT_CONST_ROUNDING);
- v[3] = _mm_add_epi32(u[3], k__DCT_CONST_ROUNDING);
- v[4] = _mm_add_epi32(u[4], k__DCT_CONST_ROUNDING);
- v[5] = _mm_add_epi32(u[5], k__DCT_CONST_ROUNDING);
- v[6] = _mm_add_epi32(u[6], k__DCT_CONST_ROUNDING);
- v[7] = _mm_add_epi32(u[7], k__DCT_CONST_ROUNDING);
- v[8] = _mm_add_epi32(u[8], k__DCT_CONST_ROUNDING);
- v[9] = _mm_add_epi32(u[9], k__DCT_CONST_ROUNDING);
- v[10] = _mm_add_epi32(u[10], k__DCT_CONST_ROUNDING);
- v[11] = _mm_add_epi32(u[11], k__DCT_CONST_ROUNDING);
- v[12] = _mm_add_epi32(u[12], k__DCT_CONST_ROUNDING);
- v[13] = _mm_add_epi32(u[13], k__DCT_CONST_ROUNDING);
- v[14] = _mm_add_epi32(u[14], k__DCT_CONST_ROUNDING);
- v[15] = _mm_add_epi32(u[15], k__DCT_CONST_ROUNDING);
-
- u[0] = _mm_srai_epi32(v[0], DCT_CONST_BITS);
- u[1] = _mm_srai_epi32(v[1], DCT_CONST_BITS);
- u[2] = _mm_srai_epi32(v[2], DCT_CONST_BITS);
- u[3] = _mm_srai_epi32(v[3], DCT_CONST_BITS);
- u[4] = _mm_srai_epi32(v[4], DCT_CONST_BITS);
- u[5] = _mm_srai_epi32(v[5], DCT_CONST_BITS);
- u[6] = _mm_srai_epi32(v[6], DCT_CONST_BITS);
- u[7] = _mm_srai_epi32(v[7], DCT_CONST_BITS);
- u[8] = _mm_srai_epi32(v[8], DCT_CONST_BITS);
- u[9] = _mm_srai_epi32(v[9], DCT_CONST_BITS);
- u[10] = _mm_srai_epi32(v[10], DCT_CONST_BITS);
- u[11] = _mm_srai_epi32(v[11], DCT_CONST_BITS);
- u[12] = _mm_srai_epi32(v[12], DCT_CONST_BITS);
- u[13] = _mm_srai_epi32(v[13], DCT_CONST_BITS);
- u[14] = _mm_srai_epi32(v[14], DCT_CONST_BITS);
- u[15] = _mm_srai_epi32(v[15], DCT_CONST_BITS);
-
- v[0] = _mm_cmplt_epi32(u[0], kZero);
- v[1] = _mm_cmplt_epi32(u[1], kZero);
- v[2] = _mm_cmplt_epi32(u[2], kZero);
- v[3] = _mm_cmplt_epi32(u[3], kZero);
- v[4] = _mm_cmplt_epi32(u[4], kZero);
- v[5] = _mm_cmplt_epi32(u[5], kZero);
- v[6] = _mm_cmplt_epi32(u[6], kZero);
- v[7] = _mm_cmplt_epi32(u[7], kZero);
- v[8] = _mm_cmplt_epi32(u[8], kZero);
- v[9] = _mm_cmplt_epi32(u[9], kZero);
- v[10] = _mm_cmplt_epi32(u[10], kZero);
- v[11] = _mm_cmplt_epi32(u[11], kZero);
- v[12] = _mm_cmplt_epi32(u[12], kZero);
- v[13] = _mm_cmplt_epi32(u[13], kZero);
- v[14] = _mm_cmplt_epi32(u[14], kZero);
- v[15] = _mm_cmplt_epi32(u[15], kZero);
-
- u[0] = _mm_sub_epi32(u[0], v[0]);
- u[1] = _mm_sub_epi32(u[1], v[1]);
- u[2] = _mm_sub_epi32(u[2], v[2]);
- u[3] = _mm_sub_epi32(u[3], v[3]);
- u[4] = _mm_sub_epi32(u[4], v[4]);
- u[5] = _mm_sub_epi32(u[5], v[5]);
- u[6] = _mm_sub_epi32(u[6], v[6]);
- u[7] = _mm_sub_epi32(u[7], v[7]);
- u[8] = _mm_sub_epi32(u[8], v[8]);
- u[9] = _mm_sub_epi32(u[9], v[9]);
- u[10] = _mm_sub_epi32(u[10], v[10]);
- u[11] = _mm_sub_epi32(u[11], v[11]);
- u[12] = _mm_sub_epi32(u[12], v[12]);
- u[13] = _mm_sub_epi32(u[13], v[13]);
- u[14] = _mm_sub_epi32(u[14], v[14]);
- u[15] = _mm_sub_epi32(u[15], v[15]);
-
- v[0] = _mm_add_epi32(u[0], K32One);
- v[1] = _mm_add_epi32(u[1], K32One);
- v[2] = _mm_add_epi32(u[2], K32One);
- v[3] = _mm_add_epi32(u[3], K32One);
- v[4] = _mm_add_epi32(u[4], K32One);
- v[5] = _mm_add_epi32(u[5], K32One);
- v[6] = _mm_add_epi32(u[6], K32One);
- v[7] = _mm_add_epi32(u[7], K32One);
- v[8] = _mm_add_epi32(u[8], K32One);
- v[9] = _mm_add_epi32(u[9], K32One);
- v[10] = _mm_add_epi32(u[10], K32One);
- v[11] = _mm_add_epi32(u[11], K32One);
- v[12] = _mm_add_epi32(u[12], K32One);
- v[13] = _mm_add_epi32(u[13], K32One);
- v[14] = _mm_add_epi32(u[14], K32One);
- v[15] = _mm_add_epi32(u[15], K32One);
-
- u[0] = _mm_srai_epi32(v[0], 2);
- u[1] = _mm_srai_epi32(v[1], 2);
- u[2] = _mm_srai_epi32(v[2], 2);
- u[3] = _mm_srai_epi32(v[3], 2);
- u[4] = _mm_srai_epi32(v[4], 2);
- u[5] = _mm_srai_epi32(v[5], 2);
- u[6] = _mm_srai_epi32(v[6], 2);
- u[7] = _mm_srai_epi32(v[7], 2);
- u[8] = _mm_srai_epi32(v[8], 2);
- u[9] = _mm_srai_epi32(v[9], 2);
- u[10] = _mm_srai_epi32(v[10], 2);
- u[11] = _mm_srai_epi32(v[11], 2);
- u[12] = _mm_srai_epi32(v[12], 2);
- u[13] = _mm_srai_epi32(v[13], 2);
- u[14] = _mm_srai_epi32(v[14], 2);
- u[15] = _mm_srai_epi32(v[15], 2);
-
- out[1] = _mm_packs_epi32(u[0], u[1]);
- out[17] = _mm_packs_epi32(u[2], u[3]);
- out[9] = _mm_packs_epi32(u[4], u[5]);
- out[25] = _mm_packs_epi32(u[6], u[7]);
- out[7] = _mm_packs_epi32(u[8], u[9]);
- out[23] = _mm_packs_epi32(u[10], u[11]);
- out[15] = _mm_packs_epi32(u[12], u[13]);
- out[31] = _mm_packs_epi32(u[14], u[15]);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x8(&out[1], &out[17], &out[9], &out[25],
- &out[7], &out[23], &out[15], &out[31]);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- const __m128i k32_p27_p05 = pair_set_epi32(cospi_27_64, cospi_5_64);
- const __m128i k32_p11_p21 = pair_set_epi32(cospi_11_64, cospi_21_64);
- const __m128i k32_p19_p13 = pair_set_epi32(cospi_19_64, cospi_13_64);
- const __m128i k32_p03_p29 = pair_set_epi32(cospi_3_64, cospi_29_64);
- const __m128i k32_m29_p03 = pair_set_epi32(-cospi_29_64, cospi_3_64);
- const __m128i k32_m13_p19 = pair_set_epi32(-cospi_13_64, cospi_19_64);
- const __m128i k32_m21_p11 = pair_set_epi32(-cospi_21_64, cospi_11_64);
- const __m128i k32_m05_p27 = pair_set_epi32(-cospi_5_64, cospi_27_64);
-
- u[0] = _mm_unpacklo_epi32(lstep1[40], lstep1[54]);
- u[1] = _mm_unpackhi_epi32(lstep1[40], lstep1[54]);
- u[2] = _mm_unpacklo_epi32(lstep1[41], lstep1[55]);
- u[3] = _mm_unpackhi_epi32(lstep1[41], lstep1[55]);
- u[4] = _mm_unpacklo_epi32(lstep1[42], lstep1[52]);
- u[5] = _mm_unpackhi_epi32(lstep1[42], lstep1[52]);
- u[6] = _mm_unpacklo_epi32(lstep1[43], lstep1[53]);
- u[7] = _mm_unpackhi_epi32(lstep1[43], lstep1[53]);
- u[8] = _mm_unpacklo_epi32(lstep1[44], lstep1[50]);
- u[9] = _mm_unpackhi_epi32(lstep1[44], lstep1[50]);
- u[10] = _mm_unpacklo_epi32(lstep1[45], lstep1[51]);
- u[11] = _mm_unpackhi_epi32(lstep1[45], lstep1[51]);
- u[12] = _mm_unpacklo_epi32(lstep1[46], lstep1[48]);
- u[13] = _mm_unpackhi_epi32(lstep1[46], lstep1[48]);
- u[14] = _mm_unpacklo_epi32(lstep1[47], lstep1[49]);
- u[15] = _mm_unpackhi_epi32(lstep1[47], lstep1[49]);
-
- v[0] = k_madd_epi32(u[0], k32_p27_p05);
- v[1] = k_madd_epi32(u[1], k32_p27_p05);
- v[2] = k_madd_epi32(u[2], k32_p27_p05);
- v[3] = k_madd_epi32(u[3], k32_p27_p05);
- v[4] = k_madd_epi32(u[4], k32_p11_p21);
- v[5] = k_madd_epi32(u[5], k32_p11_p21);
- v[6] = k_madd_epi32(u[6], k32_p11_p21);
- v[7] = k_madd_epi32(u[7], k32_p11_p21);
- v[8] = k_madd_epi32(u[8], k32_p19_p13);
- v[9] = k_madd_epi32(u[9], k32_p19_p13);
- v[10] = k_madd_epi32(u[10], k32_p19_p13);
- v[11] = k_madd_epi32(u[11], k32_p19_p13);
- v[12] = k_madd_epi32(u[12], k32_p03_p29);
- v[13] = k_madd_epi32(u[13], k32_p03_p29);
- v[14] = k_madd_epi32(u[14], k32_p03_p29);
- v[15] = k_madd_epi32(u[15], k32_p03_p29);
- v[16] = k_madd_epi32(u[12], k32_m29_p03);
- v[17] = k_madd_epi32(u[13], k32_m29_p03);
- v[18] = k_madd_epi32(u[14], k32_m29_p03);
- v[19] = k_madd_epi32(u[15], k32_m29_p03);
- v[20] = k_madd_epi32(u[8], k32_m13_p19);
- v[21] = k_madd_epi32(u[9], k32_m13_p19);
- v[22] = k_madd_epi32(u[10], k32_m13_p19);
- v[23] = k_madd_epi32(u[11], k32_m13_p19);
- v[24] = k_madd_epi32(u[4], k32_m21_p11);
- v[25] = k_madd_epi32(u[5], k32_m21_p11);
- v[26] = k_madd_epi32(u[6], k32_m21_p11);
- v[27] = k_madd_epi32(u[7], k32_m21_p11);
- v[28] = k_madd_epi32(u[0], k32_m05_p27);
- v[29] = k_madd_epi32(u[1], k32_m05_p27);
- v[30] = k_madd_epi32(u[2], k32_m05_p27);
- v[31] = k_madd_epi32(u[3], k32_m05_p27);
-
-#if DCT_HIGH_BIT_DEPTH
- overflow = k_check_epi32_overflow_32(
- &v[0], &v[1], &v[2], &v[3], &v[4], &v[5], &v[6], &v[7], &v[8],
- &v[9], &v[10], &v[11], &v[12], &v[13], &v[14], &v[15], &v[16],
- &v[17], &v[18], &v[19], &v[20], &v[21], &v[22], &v[23], &v[24],
- &v[25], &v[26], &v[27], &v[28], &v[29], &v[30], &v[31], &kZero);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- u[0] = k_packs_epi64(v[0], v[1]);
- u[1] = k_packs_epi64(v[2], v[3]);
- u[2] = k_packs_epi64(v[4], v[5]);
- u[3] = k_packs_epi64(v[6], v[7]);
- u[4] = k_packs_epi64(v[8], v[9]);
- u[5] = k_packs_epi64(v[10], v[11]);
- u[6] = k_packs_epi64(v[12], v[13]);
- u[7] = k_packs_epi64(v[14], v[15]);
- u[8] = k_packs_epi64(v[16], v[17]);
- u[9] = k_packs_epi64(v[18], v[19]);
- u[10] = k_packs_epi64(v[20], v[21]);
- u[11] = k_packs_epi64(v[22], v[23]);
- u[12] = k_packs_epi64(v[24], v[25]);
- u[13] = k_packs_epi64(v[26], v[27]);
- u[14] = k_packs_epi64(v[28], v[29]);
- u[15] = k_packs_epi64(v[30], v[31]);
-
- v[0] = _mm_add_epi32(u[0], k__DCT_CONST_ROUNDING);
- v[1] = _mm_add_epi32(u[1], k__DCT_CONST_ROUNDING);
- v[2] = _mm_add_epi32(u[2], k__DCT_CONST_ROUNDING);
- v[3] = _mm_add_epi32(u[3], k__DCT_CONST_ROUNDING);
- v[4] = _mm_add_epi32(u[4], k__DCT_CONST_ROUNDING);
- v[5] = _mm_add_epi32(u[5], k__DCT_CONST_ROUNDING);
- v[6] = _mm_add_epi32(u[6], k__DCT_CONST_ROUNDING);
- v[7] = _mm_add_epi32(u[7], k__DCT_CONST_ROUNDING);
- v[8] = _mm_add_epi32(u[8], k__DCT_CONST_ROUNDING);
- v[9] = _mm_add_epi32(u[9], k__DCT_CONST_ROUNDING);
- v[10] = _mm_add_epi32(u[10], k__DCT_CONST_ROUNDING);
- v[11] = _mm_add_epi32(u[11], k__DCT_CONST_ROUNDING);
- v[12] = _mm_add_epi32(u[12], k__DCT_CONST_ROUNDING);
- v[13] = _mm_add_epi32(u[13], k__DCT_CONST_ROUNDING);
- v[14] = _mm_add_epi32(u[14], k__DCT_CONST_ROUNDING);
- v[15] = _mm_add_epi32(u[15], k__DCT_CONST_ROUNDING);
-
- u[0] = _mm_srai_epi32(v[0], DCT_CONST_BITS);
- u[1] = _mm_srai_epi32(v[1], DCT_CONST_BITS);
- u[2] = _mm_srai_epi32(v[2], DCT_CONST_BITS);
- u[3] = _mm_srai_epi32(v[3], DCT_CONST_BITS);
- u[4] = _mm_srai_epi32(v[4], DCT_CONST_BITS);
- u[5] = _mm_srai_epi32(v[5], DCT_CONST_BITS);
- u[6] = _mm_srai_epi32(v[6], DCT_CONST_BITS);
- u[7] = _mm_srai_epi32(v[7], DCT_CONST_BITS);
- u[8] = _mm_srai_epi32(v[8], DCT_CONST_BITS);
- u[9] = _mm_srai_epi32(v[9], DCT_CONST_BITS);
- u[10] = _mm_srai_epi32(v[10], DCT_CONST_BITS);
- u[11] = _mm_srai_epi32(v[11], DCT_CONST_BITS);
- u[12] = _mm_srai_epi32(v[12], DCT_CONST_BITS);
- u[13] = _mm_srai_epi32(v[13], DCT_CONST_BITS);
- u[14] = _mm_srai_epi32(v[14], DCT_CONST_BITS);
- u[15] = _mm_srai_epi32(v[15], DCT_CONST_BITS);
-
- v[0] = _mm_cmplt_epi32(u[0], kZero);
- v[1] = _mm_cmplt_epi32(u[1], kZero);
- v[2] = _mm_cmplt_epi32(u[2], kZero);
- v[3] = _mm_cmplt_epi32(u[3], kZero);
- v[4] = _mm_cmplt_epi32(u[4], kZero);
- v[5] = _mm_cmplt_epi32(u[5], kZero);
- v[6] = _mm_cmplt_epi32(u[6], kZero);
- v[7] = _mm_cmplt_epi32(u[7], kZero);
- v[8] = _mm_cmplt_epi32(u[8], kZero);
- v[9] = _mm_cmplt_epi32(u[9], kZero);
- v[10] = _mm_cmplt_epi32(u[10], kZero);
- v[11] = _mm_cmplt_epi32(u[11], kZero);
- v[12] = _mm_cmplt_epi32(u[12], kZero);
- v[13] = _mm_cmplt_epi32(u[13], kZero);
- v[14] = _mm_cmplt_epi32(u[14], kZero);
- v[15] = _mm_cmplt_epi32(u[15], kZero);
-
- u[0] = _mm_sub_epi32(u[0], v[0]);
- u[1] = _mm_sub_epi32(u[1], v[1]);
- u[2] = _mm_sub_epi32(u[2], v[2]);
- u[3] = _mm_sub_epi32(u[3], v[3]);
- u[4] = _mm_sub_epi32(u[4], v[4]);
- u[5] = _mm_sub_epi32(u[5], v[5]);
- u[6] = _mm_sub_epi32(u[6], v[6]);
- u[7] = _mm_sub_epi32(u[7], v[7]);
- u[8] = _mm_sub_epi32(u[8], v[8]);
- u[9] = _mm_sub_epi32(u[9], v[9]);
- u[10] = _mm_sub_epi32(u[10], v[10]);
- u[11] = _mm_sub_epi32(u[11], v[11]);
- u[12] = _mm_sub_epi32(u[12], v[12]);
- u[13] = _mm_sub_epi32(u[13], v[13]);
- u[14] = _mm_sub_epi32(u[14], v[14]);
- u[15] = _mm_sub_epi32(u[15], v[15]);
-
- v[0] = _mm_add_epi32(u[0], K32One);
- v[1] = _mm_add_epi32(u[1], K32One);
- v[2] = _mm_add_epi32(u[2], K32One);
- v[3] = _mm_add_epi32(u[3], K32One);
- v[4] = _mm_add_epi32(u[4], K32One);
- v[5] = _mm_add_epi32(u[5], K32One);
- v[6] = _mm_add_epi32(u[6], K32One);
- v[7] = _mm_add_epi32(u[7], K32One);
- v[8] = _mm_add_epi32(u[8], K32One);
- v[9] = _mm_add_epi32(u[9], K32One);
- v[10] = _mm_add_epi32(u[10], K32One);
- v[11] = _mm_add_epi32(u[11], K32One);
- v[12] = _mm_add_epi32(u[12], K32One);
- v[13] = _mm_add_epi32(u[13], K32One);
- v[14] = _mm_add_epi32(u[14], K32One);
- v[15] = _mm_add_epi32(u[15], K32One);
-
- u[0] = _mm_srai_epi32(v[0], 2);
- u[1] = _mm_srai_epi32(v[1], 2);
- u[2] = _mm_srai_epi32(v[2], 2);
- u[3] = _mm_srai_epi32(v[3], 2);
- u[4] = _mm_srai_epi32(v[4], 2);
- u[5] = _mm_srai_epi32(v[5], 2);
- u[6] = _mm_srai_epi32(v[6], 2);
- u[7] = _mm_srai_epi32(v[7], 2);
- u[8] = _mm_srai_epi32(v[8], 2);
- u[9] = _mm_srai_epi32(v[9], 2);
- u[10] = _mm_srai_epi32(v[10], 2);
- u[11] = _mm_srai_epi32(v[11], 2);
- u[12] = _mm_srai_epi32(v[12], 2);
- u[13] = _mm_srai_epi32(v[13], 2);
- u[14] = _mm_srai_epi32(v[14], 2);
- u[15] = _mm_srai_epi32(v[15], 2);
-
- out[5] = _mm_packs_epi32(u[0], u[1]);
- out[21] = _mm_packs_epi32(u[2], u[3]);
- out[13] = _mm_packs_epi32(u[4], u[5]);
- out[29] = _mm_packs_epi32(u[6], u[7]);
- out[3] = _mm_packs_epi32(u[8], u[9]);
- out[19] = _mm_packs_epi32(u[10], u[11]);
- out[11] = _mm_packs_epi32(u[12], u[13]);
- out[27] = _mm_packs_epi32(u[14], u[15]);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x8(&out[5], &out[21], &out[13], &out[29],
- &out[3], &out[19], &out[11], &out[27]);
- if (overflow) {
- HIGH_FDCT32x32_2D_ROWS_C(intermediate, output_org);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- }
-#endif // FDCT32x32_HIGH_PRECISION
- // Transpose the results, do it as four 8x8 transposes.
- {
- int transpose_block;
- int16_t *output0 = &intermediate[column_start * 32];
- tran_low_t *output1 = &output_org[column_start * 32];
- for (transpose_block = 0; transpose_block < 4; ++transpose_block) {
- __m128i *this_out = &out[8 * transpose_block];
- // 00 01 02 03 04 05 06 07
- // 10 11 12 13 14 15 16 17
- // 20 21 22 23 24 25 26 27
- // 30 31 32 33 34 35 36 37
- // 40 41 42 43 44 45 46 47
- // 50 51 52 53 54 55 56 57
- // 60 61 62 63 64 65 66 67
- // 70 71 72 73 74 75 76 77
- const __m128i tr0_0 = _mm_unpacklo_epi16(this_out[0], this_out[1]);
- const __m128i tr0_1 = _mm_unpacklo_epi16(this_out[2], this_out[3]);
- const __m128i tr0_2 = _mm_unpackhi_epi16(this_out[0], this_out[1]);
- const __m128i tr0_3 = _mm_unpackhi_epi16(this_out[2], this_out[3]);
- const __m128i tr0_4 = _mm_unpacklo_epi16(this_out[4], this_out[5]);
- const __m128i tr0_5 = _mm_unpacklo_epi16(this_out[6], this_out[7]);
- const __m128i tr0_6 = _mm_unpackhi_epi16(this_out[4], this_out[5]);
- const __m128i tr0_7 = _mm_unpackhi_epi16(this_out[6], this_out[7]);
- // 00 10 01 11 02 12 03 13
- // 20 30 21 31 22 32 23 33
- // 04 14 05 15 06 16 07 17
- // 24 34 25 35 26 36 27 37
- // 40 50 41 51 42 52 43 53
- // 60 70 61 71 62 72 63 73
- // 54 54 55 55 56 56 57 57
- // 64 74 65 75 66 76 67 77
- const __m128i tr1_0 = _mm_unpacklo_epi32(tr0_0, tr0_1);
- const __m128i tr1_1 = _mm_unpacklo_epi32(tr0_2, tr0_3);
- const __m128i tr1_2 = _mm_unpackhi_epi32(tr0_0, tr0_1);
- const __m128i tr1_3 = _mm_unpackhi_epi32(tr0_2, tr0_3);
- const __m128i tr1_4 = _mm_unpacklo_epi32(tr0_4, tr0_5);
- const __m128i tr1_5 = _mm_unpacklo_epi32(tr0_6, tr0_7);
- const __m128i tr1_6 = _mm_unpackhi_epi32(tr0_4, tr0_5);
- const __m128i tr1_7 = _mm_unpackhi_epi32(tr0_6, tr0_7);
- // 00 10 20 30 01 11 21 31
- // 40 50 60 70 41 51 61 71
- // 02 12 22 32 03 13 23 33
- // 42 52 62 72 43 53 63 73
- // 04 14 24 34 05 15 21 36
- // 44 54 64 74 45 55 61 76
- // 06 16 26 36 07 17 27 37
- // 46 56 66 76 47 57 67 77
- __m128i tr2_0 = _mm_unpacklo_epi64(tr1_0, tr1_4);
- __m128i tr2_1 = _mm_unpackhi_epi64(tr1_0, tr1_4);
- __m128i tr2_2 = _mm_unpacklo_epi64(tr1_2, tr1_6);
- __m128i tr2_3 = _mm_unpackhi_epi64(tr1_2, tr1_6);
- __m128i tr2_4 = _mm_unpacklo_epi64(tr1_1, tr1_5);
- __m128i tr2_5 = _mm_unpackhi_epi64(tr1_1, tr1_5);
- __m128i tr2_6 = _mm_unpacklo_epi64(tr1_3, tr1_7);
- __m128i tr2_7 = _mm_unpackhi_epi64(tr1_3, tr1_7);
- // 00 10 20 30 40 50 60 70
- // 01 11 21 31 41 51 61 71
- // 02 12 22 32 42 52 62 72
- // 03 13 23 33 43 53 63 73
- // 04 14 24 34 44 54 64 74
- // 05 15 25 35 45 55 65 75
- // 06 16 26 36 46 56 66 76
- // 07 17 27 37 47 57 67 77
- if (0 == pass) {
- // output[j] = (output[j] + 1 + (output[j] > 0)) >> 2;
- // TODO(cd): see quality impact of only doing
- // output[j] = (output[j] + 1) >> 2;
- // which would remove the code between here ...
- __m128i tr2_0_0 = _mm_cmpgt_epi16(tr2_0, kZero);
- __m128i tr2_1_0 = _mm_cmpgt_epi16(tr2_1, kZero);
- __m128i tr2_2_0 = _mm_cmpgt_epi16(tr2_2, kZero);
- __m128i tr2_3_0 = _mm_cmpgt_epi16(tr2_3, kZero);
- __m128i tr2_4_0 = _mm_cmpgt_epi16(tr2_4, kZero);
- __m128i tr2_5_0 = _mm_cmpgt_epi16(tr2_5, kZero);
- __m128i tr2_6_0 = _mm_cmpgt_epi16(tr2_6, kZero);
- __m128i tr2_7_0 = _mm_cmpgt_epi16(tr2_7, kZero);
- tr2_0 = _mm_sub_epi16(tr2_0, tr2_0_0);
- tr2_1 = _mm_sub_epi16(tr2_1, tr2_1_0);
- tr2_2 = _mm_sub_epi16(tr2_2, tr2_2_0);
- tr2_3 = _mm_sub_epi16(tr2_3, tr2_3_0);
- tr2_4 = _mm_sub_epi16(tr2_4, tr2_4_0);
- tr2_5 = _mm_sub_epi16(tr2_5, tr2_5_0);
- tr2_6 = _mm_sub_epi16(tr2_6, tr2_6_0);
- tr2_7 = _mm_sub_epi16(tr2_7, tr2_7_0);
- // ... and here.
- // PS: also change code in vp10/encoder/dct.c
- tr2_0 = _mm_add_epi16(tr2_0, kOne);
- tr2_1 = _mm_add_epi16(tr2_1, kOne);
- tr2_2 = _mm_add_epi16(tr2_2, kOne);
- tr2_3 = _mm_add_epi16(tr2_3, kOne);
- tr2_4 = _mm_add_epi16(tr2_4, kOne);
- tr2_5 = _mm_add_epi16(tr2_5, kOne);
- tr2_6 = _mm_add_epi16(tr2_6, kOne);
- tr2_7 = _mm_add_epi16(tr2_7, kOne);
- tr2_0 = _mm_srai_epi16(tr2_0, 2);
- tr2_1 = _mm_srai_epi16(tr2_1, 2);
- tr2_2 = _mm_srai_epi16(tr2_2, 2);
- tr2_3 = _mm_srai_epi16(tr2_3, 2);
- tr2_4 = _mm_srai_epi16(tr2_4, 2);
- tr2_5 = _mm_srai_epi16(tr2_5, 2);
- tr2_6 = _mm_srai_epi16(tr2_6, 2);
- tr2_7 = _mm_srai_epi16(tr2_7, 2);
- }
- // Note: even though all these stores are aligned, using the aligned
- // intrinsic make the code slightly slower.
- if (pass == 0) {
- _mm_storeu_si128((__m128i *)(output0 + 0 * 32), tr2_0);
- _mm_storeu_si128((__m128i *)(output0 + 1 * 32), tr2_1);
- _mm_storeu_si128((__m128i *)(output0 + 2 * 32), tr2_2);
- _mm_storeu_si128((__m128i *)(output0 + 3 * 32), tr2_3);
- _mm_storeu_si128((__m128i *)(output0 + 4 * 32), tr2_4);
- _mm_storeu_si128((__m128i *)(output0 + 5 * 32), tr2_5);
- _mm_storeu_si128((__m128i *)(output0 + 6 * 32), tr2_6);
- _mm_storeu_si128((__m128i *)(output0 + 7 * 32), tr2_7);
- // Process next 8x8
- output0 += 8;
- } else {
- storeu_output(&tr2_0, (output1 + 0 * 32));
- storeu_output(&tr2_1, (output1 + 1 * 32));
- storeu_output(&tr2_2, (output1 + 2 * 32));
- storeu_output(&tr2_3, (output1 + 3 * 32));
- storeu_output(&tr2_4, (output1 + 4 * 32));
- storeu_output(&tr2_5, (output1 + 5 * 32));
- storeu_output(&tr2_6, (output1 + 6 * 32));
- storeu_output(&tr2_7, (output1 + 7 * 32));
- // Process next 8x8
- output1 += 8;
- }
- }
- }
- }
- }
-} // NOLINT
-
-#undef ADD_EPI16
-#undef SUB_EPI16
-#undef HIGH_FDCT32x32_2D_C
-#undef HIGH_FDCT32x32_2D_ROWS_C
diff --git a/vp10/common/x86/vp10_fwd_txfm_impl_sse2.h b/vp10/common/x86/vp10_fwd_txfm_impl_sse2.h
deleted file mode 100644
index b3bcc4a..0000000
--- a/vp10/common/x86/vp10_fwd_txfm_impl_sse2.h
+++ /dev/null
@@ -1,1013 +0,0 @@
-/*
- * Copyright (c) 2014 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include <emmintrin.h> // SSE2
-
-#include "./vpx_dsp_rtcd.h"
-#include "vpx_dsp/txfm_common.h"
-#include "vpx_dsp/x86/fwd_txfm_sse2.h"
-#include "vpx_dsp/x86/txfm_common_sse2.h"
-#include "vpx_ports/mem.h"
-
-// TODO(jingning) The high bit-depth functions need rework for performance.
-// After we properly fix the high bit-depth function implementations, this
-// file's dependency should be substantially simplified.
-#if DCT_HIGH_BIT_DEPTH
-#define ADD_EPI16 _mm_adds_epi16
-#define SUB_EPI16 _mm_subs_epi16
-
-#else
-#define ADD_EPI16 _mm_add_epi16
-#define SUB_EPI16 _mm_sub_epi16
-#endif
-
-void FDCT4x4_2D(const int16_t *input, tran_low_t *output, int stride) {
- // This 2D transform implements 4 vertical 1D transforms followed
- // by 4 horizontal 1D transforms. The multiplies and adds are as given
- // by Chen, Smith and Fralick ('77). The commands for moving the data
- // around have been minimized by hand.
- // For the purposes of the comments, the 16 inputs are referred to at i0
- // through iF (in raster order), intermediate variables are a0, b0, c0
- // through f, and correspond to the in-place computations mapped to input
- // locations. The outputs, o0 through oF are labeled according to the
- // output locations.
-
- // Constants
- // These are the coefficients used for the multiplies.
- // In the comments, pN means cos(N pi /64) and mN is -cos(N pi /64),
- // where cospi_N_64 = cos(N pi /64)
- const __m128i k__cospi_A =
- octa_set_epi16(cospi_16_64, cospi_16_64, cospi_16_64, cospi_16_64,
- cospi_16_64, -cospi_16_64, cospi_16_64, -cospi_16_64);
- const __m128i k__cospi_B =
- octa_set_epi16(cospi_16_64, -cospi_16_64, cospi_16_64, -cospi_16_64,
- cospi_16_64, cospi_16_64, cospi_16_64, cospi_16_64);
- const __m128i k__cospi_C =
- octa_set_epi16(cospi_8_64, cospi_24_64, cospi_8_64, cospi_24_64,
- cospi_24_64, -cospi_8_64, cospi_24_64, -cospi_8_64);
- const __m128i k__cospi_D =
- octa_set_epi16(cospi_24_64, -cospi_8_64, cospi_24_64, -cospi_8_64,
- cospi_8_64, cospi_24_64, cospi_8_64, cospi_24_64);
- const __m128i k__cospi_E =
- octa_set_epi16(cospi_16_64, cospi_16_64, cospi_16_64, cospi_16_64,
- cospi_16_64, cospi_16_64, cospi_16_64, cospi_16_64);
- const __m128i k__cospi_F =
- octa_set_epi16(cospi_16_64, -cospi_16_64, cospi_16_64, -cospi_16_64,
- cospi_16_64, -cospi_16_64, cospi_16_64, -cospi_16_64);
- const __m128i k__cospi_G =
- octa_set_epi16(cospi_8_64, cospi_24_64, cospi_8_64, cospi_24_64,
- -cospi_8_64, -cospi_24_64, -cospi_8_64, -cospi_24_64);
- const __m128i k__cospi_H =
- octa_set_epi16(cospi_24_64, -cospi_8_64, cospi_24_64, -cospi_8_64,
- -cospi_24_64, cospi_8_64, -cospi_24_64, cospi_8_64);
-
- const __m128i k__DCT_CONST_ROUNDING = _mm_set1_epi32(DCT_CONST_ROUNDING);
- // This second rounding constant saves doing some extra adds at the end
- const __m128i k__DCT_CONST_ROUNDING2 =
- _mm_set1_epi32(DCT_CONST_ROUNDING + (DCT_CONST_ROUNDING << 1));
- const int DCT_CONST_BITS2 = DCT_CONST_BITS + 2;
- const __m128i k__nonzero_bias_a = _mm_setr_epi16(0, 1, 1, 1, 1, 1, 1, 1);
- const __m128i k__nonzero_bias_b = _mm_setr_epi16(1, 0, 0, 0, 0, 0, 0, 0);
- __m128i in0, in1;
-#if DCT_HIGH_BIT_DEPTH
- __m128i cmp0, cmp1;
- int test, overflow;
-#endif
-
- // Load inputs.
- in0 = _mm_loadl_epi64((const __m128i *)(input + 0 * stride));
- in1 = _mm_loadl_epi64((const __m128i *)(input + 1 * stride));
- in1 = _mm_unpacklo_epi64(
- in1, _mm_loadl_epi64((const __m128i *)(input + 2 * stride)));
- in0 = _mm_unpacklo_epi64(
- in0, _mm_loadl_epi64((const __m128i *)(input + 3 * stride)));
-// in0 = [i0 i1 i2 i3 iC iD iE iF]
-// in1 = [i4 i5 i6 i7 i8 i9 iA iB]
-#if DCT_HIGH_BIT_DEPTH
- // Check inputs small enough to use optimised code
- cmp0 = _mm_xor_si128(_mm_cmpgt_epi16(in0, _mm_set1_epi16(0x3ff)),
- _mm_cmplt_epi16(in0, _mm_set1_epi16(0xfc00)));
- cmp1 = _mm_xor_si128(_mm_cmpgt_epi16(in1, _mm_set1_epi16(0x3ff)),
- _mm_cmplt_epi16(in1, _mm_set1_epi16(0xfc00)));
- test = _mm_movemask_epi8(_mm_or_si128(cmp0, cmp1));
- if (test) {
- vpx_highbd_fdct4x4_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
-
- // multiply by 16 to give some extra precision
- in0 = _mm_slli_epi16(in0, 4);
- in1 = _mm_slli_epi16(in1, 4);
- // if (i == 0 && input[0]) input[0] += 1;
- // add 1 to the upper left pixel if it is non-zero, which helps reduce
- // the round-trip error
- {
- // The mask will only contain whether the first value is zero, all
- // other comparison will fail as something shifted by 4 (above << 4)
- // can never be equal to one. To increment in the non-zero case, we
- // add the mask and one for the first element:
- // - if zero, mask = -1, v = v - 1 + 1 = v
- // - if non-zero, mask = 0, v = v + 0 + 1 = v + 1
- __m128i mask = _mm_cmpeq_epi16(in0, k__nonzero_bias_a);
- in0 = _mm_add_epi16(in0, mask);
- in0 = _mm_add_epi16(in0, k__nonzero_bias_b);
- }
- // There are 4 total stages, alternating between an add/subtract stage
- // followed by an multiply-and-add stage.
- {
- // Stage 1: Add/subtract
-
- // in0 = [i0 i1 i2 i3 iC iD iE iF]
- // in1 = [i4 i5 i6 i7 i8 i9 iA iB]
- const __m128i r0 = _mm_unpacklo_epi16(in0, in1);
- const __m128i r1 = _mm_unpackhi_epi16(in0, in1);
- // r0 = [i0 i4 i1 i5 i2 i6 i3 i7]
- // r1 = [iC i8 iD i9 iE iA iF iB]
- const __m128i r2 = _mm_shuffle_epi32(r0, 0xB4);
- const __m128i r3 = _mm_shuffle_epi32(r1, 0xB4);
- // r2 = [i0 i4 i1 i5 i3 i7 i2 i6]
- // r3 = [iC i8 iD i9 iF iB iE iA]
-
- const __m128i t0 = _mm_add_epi16(r2, r3);
- const __m128i t1 = _mm_sub_epi16(r2, r3);
- // t0 = [a0 a4 a1 a5 a3 a7 a2 a6]
- // t1 = [aC a8 aD a9 aF aB aE aA]
-
- // Stage 2: multiply by constants (which gets us into 32 bits).
- // The constants needed here are:
- // k__cospi_A = [p16 p16 p16 p16 p16 m16 p16 m16]
- // k__cospi_B = [p16 m16 p16 m16 p16 p16 p16 p16]
- // k__cospi_C = [p08 p24 p08 p24 p24 m08 p24 m08]
- // k__cospi_D = [p24 m08 p24 m08 p08 p24 p08 p24]
- const __m128i u0 = _mm_madd_epi16(t0, k__cospi_A);
- const __m128i u2 = _mm_madd_epi16(t0, k__cospi_B);
- const __m128i u1 = _mm_madd_epi16(t1, k__cospi_C);
- const __m128i u3 = _mm_madd_epi16(t1, k__cospi_D);
- // Then add and right-shift to get back to 16-bit range
- const __m128i v0 = _mm_add_epi32(u0, k__DCT_CONST_ROUNDING);
- const __m128i v1 = _mm_add_epi32(u1, k__DCT_CONST_ROUNDING);
- const __m128i v2 = _mm_add_epi32(u2, k__DCT_CONST_ROUNDING);
- const __m128i v3 = _mm_add_epi32(u3, k__DCT_CONST_ROUNDING);
- const __m128i w0 = _mm_srai_epi32(v0, DCT_CONST_BITS);
- const __m128i w1 = _mm_srai_epi32(v1, DCT_CONST_BITS);
- const __m128i w2 = _mm_srai_epi32(v2, DCT_CONST_BITS);
- const __m128i w3 = _mm_srai_epi32(v3, DCT_CONST_BITS);
- // w0 = [b0 b1 b7 b6]
- // w1 = [b8 b9 bF bE]
- // w2 = [b4 b5 b3 b2]
- // w3 = [bC bD bB bA]
- const __m128i x0 = _mm_packs_epi32(w0, w1);
- const __m128i x1 = _mm_packs_epi32(w2, w3);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x2(&x0, &x1);
- if (overflow) {
- vpx_highbd_fdct4x4_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- // x0 = [b0 b1 b7 b6 b8 b9 bF bE]
- // x1 = [b4 b5 b3 b2 bC bD bB bA]
- in0 = _mm_shuffle_epi32(x0, 0xD8);
- in1 = _mm_shuffle_epi32(x1, 0x8D);
- // in0 = [b0 b1 b8 b9 b7 b6 bF bE]
- // in1 = [b3 b2 bB bA b4 b5 bC bD]
- }
- {
- // vertical DCTs finished. Now we do the horizontal DCTs.
- // Stage 3: Add/subtract
-
- // t0 = [c0 c1 c8 c9 c4 c5 cC cD]
- // t1 = [c3 c2 cB cA -c7 -c6 -cF -cE]
- const __m128i t0 = ADD_EPI16(in0, in1);
- const __m128i t1 = SUB_EPI16(in0, in1);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x2(&t0, &t1);
- if (overflow) {
- vpx_highbd_fdct4x4_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
-
- // Stage 4: multiply by constants (which gets us into 32 bits).
- {
- // The constants needed here are:
- // k__cospi_E = [p16 p16 p16 p16 p16 p16 p16 p16]
- // k__cospi_F = [p16 m16 p16 m16 p16 m16 p16 m16]
- // k__cospi_G = [p08 p24 p08 p24 m08 m24 m08 m24]
- // k__cospi_H = [p24 m08 p24 m08 m24 p08 m24 p08]
- const __m128i u0 = _mm_madd_epi16(t0, k__cospi_E);
- const __m128i u1 = _mm_madd_epi16(t0, k__cospi_F);
- const __m128i u2 = _mm_madd_epi16(t1, k__cospi_G);
- const __m128i u3 = _mm_madd_epi16(t1, k__cospi_H);
- // Then add and right-shift to get back to 16-bit range
- // but this combines the final right-shift as well to save operations
- // This unusual rounding operations is to maintain bit-accurate
- // compatibility with the c version of this function which has two
- // rounding steps in a row.
- const __m128i v0 = _mm_add_epi32(u0, k__DCT_CONST_ROUNDING2);
- const __m128i v1 = _mm_add_epi32(u1, k__DCT_CONST_ROUNDING2);
- const __m128i v2 = _mm_add_epi32(u2, k__DCT_CONST_ROUNDING2);
- const __m128i v3 = _mm_add_epi32(u3, k__DCT_CONST_ROUNDING2);
- const __m128i w0 = _mm_srai_epi32(v0, DCT_CONST_BITS2);
- const __m128i w1 = _mm_srai_epi32(v1, DCT_CONST_BITS2);
- const __m128i w2 = _mm_srai_epi32(v2, DCT_CONST_BITS2);
- const __m128i w3 = _mm_srai_epi32(v3, DCT_CONST_BITS2);
- // w0 = [o0 o4 o8 oC]
- // w1 = [o2 o6 oA oE]
- // w2 = [o1 o5 o9 oD]
- // w3 = [o3 o7 oB oF]
- // remember the o's are numbered according to the correct output location
- const __m128i x0 = _mm_packs_epi32(w0, w1);
- const __m128i x1 = _mm_packs_epi32(w2, w3);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x2(&x0, &x1);
- if (overflow) {
- vpx_highbd_fdct4x4_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- {
- // x0 = [o0 o4 o8 oC o2 o6 oA oE]
- // x1 = [o1 o5 o9 oD o3 o7 oB oF]
- const __m128i y0 = _mm_unpacklo_epi16(x0, x1);
- const __m128i y1 = _mm_unpackhi_epi16(x0, x1);
- // y0 = [o0 o1 o4 o5 o8 o9 oC oD]
- // y1 = [o2 o3 o6 o7 oA oB oE oF]
- in0 = _mm_unpacklo_epi32(y0, y1);
- // in0 = [o0 o1 o2 o3 o4 o5 o6 o7]
- in1 = _mm_unpackhi_epi32(y0, y1);
- // in1 = [o8 o9 oA oB oC oD oE oF]
- }
- }
- }
- // Post-condition (v + 1) >> 2 is now incorporated into previous
- // add and right-shift commands. Only 2 store instructions needed
- // because we are using the fact that 1/3 are stored just after 0/2.
- storeu_output(&in0, output + 0 * 4);
- storeu_output(&in1, output + 2 * 4);
-}
-
-void FDCT8x8_2D(const int16_t *input, tran_low_t *output, int stride) {
- int pass;
- // Constants
- // When we use them, in one case, they are all the same. In all others
- // it's a pair of them that we need to repeat four times. This is done
- // by constructing the 32 bit constant corresponding to that pair.
- const __m128i k__cospi_p16_p16 = _mm_set1_epi16((int16_t)cospi_16_64);
- const __m128i k__cospi_p16_m16 = pair_set_epi16(cospi_16_64, -cospi_16_64);
- const __m128i k__cospi_p24_p08 = pair_set_epi16(cospi_24_64, cospi_8_64);
- const __m128i k__cospi_m08_p24 = pair_set_epi16(-cospi_8_64, cospi_24_64);
- const __m128i k__cospi_p28_p04 = pair_set_epi16(cospi_28_64, cospi_4_64);
- const __m128i k__cospi_m04_p28 = pair_set_epi16(-cospi_4_64, cospi_28_64);
- const __m128i k__cospi_p12_p20 = pair_set_epi16(cospi_12_64, cospi_20_64);
- const __m128i k__cospi_m20_p12 = pair_set_epi16(-cospi_20_64, cospi_12_64);
- const __m128i k__DCT_CONST_ROUNDING = _mm_set1_epi32(DCT_CONST_ROUNDING);
-#if DCT_HIGH_BIT_DEPTH
- int overflow;
-#endif
- // Load input
- __m128i in0 = _mm_load_si128((const __m128i *)(input + 0 * stride));
- __m128i in1 = _mm_load_si128((const __m128i *)(input + 1 * stride));
- __m128i in2 = _mm_load_si128((const __m128i *)(input + 2 * stride));
- __m128i in3 = _mm_load_si128((const __m128i *)(input + 3 * stride));
- __m128i in4 = _mm_load_si128((const __m128i *)(input + 4 * stride));
- __m128i in5 = _mm_load_si128((const __m128i *)(input + 5 * stride));
- __m128i in6 = _mm_load_si128((const __m128i *)(input + 6 * stride));
- __m128i in7 = _mm_load_si128((const __m128i *)(input + 7 * stride));
- // Pre-condition input (shift by two)
- in0 = _mm_slli_epi16(in0, 2);
- in1 = _mm_slli_epi16(in1, 2);
- in2 = _mm_slli_epi16(in2, 2);
- in3 = _mm_slli_epi16(in3, 2);
- in4 = _mm_slli_epi16(in4, 2);
- in5 = _mm_slli_epi16(in5, 2);
- in6 = _mm_slli_epi16(in6, 2);
- in7 = _mm_slli_epi16(in7, 2);
-
- // We do two passes, first the columns, then the rows. The results of the
- // first pass are transposed so that the same column code can be reused. The
- // results of the second pass are also transposed so that the rows (processed
- // as columns) are put back in row positions.
- for (pass = 0; pass < 2; pass++) {
- // To store results of each pass before the transpose.
- __m128i res0, res1, res2, res3, res4, res5, res6, res7;
- // Add/subtract
- const __m128i q0 = ADD_EPI16(in0, in7);
- const __m128i q1 = ADD_EPI16(in1, in6);
- const __m128i q2 = ADD_EPI16(in2, in5);
- const __m128i q3 = ADD_EPI16(in3, in4);
- const __m128i q4 = SUB_EPI16(in3, in4);
- const __m128i q5 = SUB_EPI16(in2, in5);
- const __m128i q6 = SUB_EPI16(in1, in6);
- const __m128i q7 = SUB_EPI16(in0, in7);
-#if DCT_HIGH_BIT_DEPTH
- if (pass == 1) {
- overflow =
- check_epi16_overflow_x8(&q0, &q1, &q2, &q3, &q4, &q5, &q6, &q7);
- if (overflow) {
- vpx_highbd_fdct8x8_c(input, output, stride);
- return;
- }
- }
-#endif // DCT_HIGH_BIT_DEPTH
- // Work on first four results
- {
- // Add/subtract
- const __m128i r0 = ADD_EPI16(q0, q3);
- const __m128i r1 = ADD_EPI16(q1, q2);
- const __m128i r2 = SUB_EPI16(q1, q2);
- const __m128i r3 = SUB_EPI16(q0, q3);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x4(&r0, &r1, &r2, &r3);
- if (overflow) {
- vpx_highbd_fdct8x8_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- // Interleave to do the multiply by constants which gets us into 32bits
- {
- const __m128i t0 = _mm_unpacklo_epi16(r0, r1);
- const __m128i t1 = _mm_unpackhi_epi16(r0, r1);
- const __m128i t2 = _mm_unpacklo_epi16(r2, r3);
- const __m128i t3 = _mm_unpackhi_epi16(r2, r3);
- const __m128i u0 = _mm_madd_epi16(t0, k__cospi_p16_p16);
- const __m128i u1 = _mm_madd_epi16(t1, k__cospi_p16_p16);
- const __m128i u2 = _mm_madd_epi16(t0, k__cospi_p16_m16);
- const __m128i u3 = _mm_madd_epi16(t1, k__cospi_p16_m16);
- const __m128i u4 = _mm_madd_epi16(t2, k__cospi_p24_p08);
- const __m128i u5 = _mm_madd_epi16(t3, k__cospi_p24_p08);
- const __m128i u6 = _mm_madd_epi16(t2, k__cospi_m08_p24);
- const __m128i u7 = _mm_madd_epi16(t3, k__cospi_m08_p24);
- // dct_const_round_shift
- const __m128i v0 = _mm_add_epi32(u0, k__DCT_CONST_ROUNDING);
- const __m128i v1 = _mm_add_epi32(u1, k__DCT_CONST_ROUNDING);
- const __m128i v2 = _mm_add_epi32(u2, k__DCT_CONST_ROUNDING);
- const __m128i v3 = _mm_add_epi32(u3, k__DCT_CONST_ROUNDING);
- const __m128i v4 = _mm_add_epi32(u4, k__DCT_CONST_ROUNDING);
- const __m128i v5 = _mm_add_epi32(u5, k__DCT_CONST_ROUNDING);
- const __m128i v6 = _mm_add_epi32(u6, k__DCT_CONST_ROUNDING);
- const __m128i v7 = _mm_add_epi32(u7, k__DCT_CONST_ROUNDING);
- const __m128i w0 = _mm_srai_epi32(v0, DCT_CONST_BITS);
- const __m128i w1 = _mm_srai_epi32(v1, DCT_CONST_BITS);
- const __m128i w2 = _mm_srai_epi32(v2, DCT_CONST_BITS);
- const __m128i w3 = _mm_srai_epi32(v3, DCT_CONST_BITS);
- const __m128i w4 = _mm_srai_epi32(v4, DCT_CONST_BITS);
- const __m128i w5 = _mm_srai_epi32(v5, DCT_CONST_BITS);
- const __m128i w6 = _mm_srai_epi32(v6, DCT_CONST_BITS);
- const __m128i w7 = _mm_srai_epi32(v7, DCT_CONST_BITS);
- // Combine
- res0 = _mm_packs_epi32(w0, w1);
- res4 = _mm_packs_epi32(w2, w3);
- res2 = _mm_packs_epi32(w4, w5);
- res6 = _mm_packs_epi32(w6, w7);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x4(&res0, &res4, &res2, &res6);
- if (overflow) {
- vpx_highbd_fdct8x8_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- }
- // Work on next four results
- {
- // Interleave to do the multiply by constants which gets us into 32bits
- const __m128i d0 = _mm_unpacklo_epi16(q6, q5);
- const __m128i d1 = _mm_unpackhi_epi16(q6, q5);
- const __m128i e0 = _mm_madd_epi16(d0, k__cospi_p16_m16);
- const __m128i e1 = _mm_madd_epi16(d1, k__cospi_p16_m16);
- const __m128i e2 = _mm_madd_epi16(d0, k__cospi_p16_p16);
- const __m128i e3 = _mm_madd_epi16(d1, k__cospi_p16_p16);
- // dct_const_round_shift
- const __m128i f0 = _mm_add_epi32(e0, k__DCT_CONST_ROUNDING);
- const __m128i f1 = _mm_add_epi32(e1, k__DCT_CONST_ROUNDING);
- const __m128i f2 = _mm_add_epi32(e2, k__DCT_CONST_ROUNDING);
- const __m128i f3 = _mm_add_epi32(e3, k__DCT_CONST_ROUNDING);
- const __m128i s0 = _mm_srai_epi32(f0, DCT_CONST_BITS);
- const __m128i s1 = _mm_srai_epi32(f1, DCT_CONST_BITS);
- const __m128i s2 = _mm_srai_epi32(f2, DCT_CONST_BITS);
- const __m128i s3 = _mm_srai_epi32(f3, DCT_CONST_BITS);
- // Combine
- const __m128i r0 = _mm_packs_epi32(s0, s1);
- const __m128i r1 = _mm_packs_epi32(s2, s3);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x2(&r0, &r1);
- if (overflow) {
- vpx_highbd_fdct8x8_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- {
- // Add/subtract
- const __m128i x0 = ADD_EPI16(q4, r0);
- const __m128i x1 = SUB_EPI16(q4, r0);
- const __m128i x2 = SUB_EPI16(q7, r1);
- const __m128i x3 = ADD_EPI16(q7, r1);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x4(&x0, &x1, &x2, &x3);
- if (overflow) {
- vpx_highbd_fdct8x8_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- // Interleave to do the multiply by constants which gets us into 32bits
- {
- const __m128i t0 = _mm_unpacklo_epi16(x0, x3);
- const __m128i t1 = _mm_unpackhi_epi16(x0, x3);
- const __m128i t2 = _mm_unpacklo_epi16(x1, x2);
- const __m128i t3 = _mm_unpackhi_epi16(x1, x2);
- const __m128i u0 = _mm_madd_epi16(t0, k__cospi_p28_p04);
- const __m128i u1 = _mm_madd_epi16(t1, k__cospi_p28_p04);
- const __m128i u2 = _mm_madd_epi16(t0, k__cospi_m04_p28);
- const __m128i u3 = _mm_madd_epi16(t1, k__cospi_m04_p28);
- const __m128i u4 = _mm_madd_epi16(t2, k__cospi_p12_p20);
- const __m128i u5 = _mm_madd_epi16(t3, k__cospi_p12_p20);
- const __m128i u6 = _mm_madd_epi16(t2, k__cospi_m20_p12);
- const __m128i u7 = _mm_madd_epi16(t3, k__cospi_m20_p12);
- // dct_const_round_shift
- const __m128i v0 = _mm_add_epi32(u0, k__DCT_CONST_ROUNDING);
- const __m128i v1 = _mm_add_epi32(u1, k__DCT_CONST_ROUNDING);
- const __m128i v2 = _mm_add_epi32(u2, k__DCT_CONST_ROUNDING);
- const __m128i v3 = _mm_add_epi32(u3, k__DCT_CONST_ROUNDING);
- const __m128i v4 = _mm_add_epi32(u4, k__DCT_CONST_ROUNDING);
- const __m128i v5 = _mm_add_epi32(u5, k__DCT_CONST_ROUNDING);
- const __m128i v6 = _mm_add_epi32(u6, k__DCT_CONST_ROUNDING);
- const __m128i v7 = _mm_add_epi32(u7, k__DCT_CONST_ROUNDING);
- const __m128i w0 = _mm_srai_epi32(v0, DCT_CONST_BITS);
- const __m128i w1 = _mm_srai_epi32(v1, DCT_CONST_BITS);
- const __m128i w2 = _mm_srai_epi32(v2, DCT_CONST_BITS);
- const __m128i w3 = _mm_srai_epi32(v3, DCT_CONST_BITS);
- const __m128i w4 = _mm_srai_epi32(v4, DCT_CONST_BITS);
- const __m128i w5 = _mm_srai_epi32(v5, DCT_CONST_BITS);
- const __m128i w6 = _mm_srai_epi32(v6, DCT_CONST_BITS);
- const __m128i w7 = _mm_srai_epi32(v7, DCT_CONST_BITS);
- // Combine
- res1 = _mm_packs_epi32(w0, w1);
- res7 = _mm_packs_epi32(w2, w3);
- res5 = _mm_packs_epi32(w4, w5);
- res3 = _mm_packs_epi32(w6, w7);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x4(&res1, &res7, &res5, &res3);
- if (overflow) {
- vpx_highbd_fdct8x8_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- }
- }
- // Transpose the 8x8.
- {
- // 00 01 02 03 04 05 06 07
- // 10 11 12 13 14 15 16 17
- // 20 21 22 23 24 25 26 27
- // 30 31 32 33 34 35 36 37
- // 40 41 42 43 44 45 46 47
- // 50 51 52 53 54 55 56 57
- // 60 61 62 63 64 65 66 67
- // 70 71 72 73 74 75 76 77
- const __m128i tr0_0 = _mm_unpacklo_epi16(res0, res1);
- const __m128i tr0_1 = _mm_unpacklo_epi16(res2, res3);
- const __m128i tr0_2 = _mm_unpackhi_epi16(res0, res1);
- const __m128i tr0_3 = _mm_unpackhi_epi16(res2, res3);
- const __m128i tr0_4 = _mm_unpacklo_epi16(res4, res5);
- const __m128i tr0_5 = _mm_unpacklo_epi16(res6, res7);
- const __m128i tr0_6 = _mm_unpackhi_epi16(res4, res5);
- const __m128i tr0_7 = _mm_unpackhi_epi16(res6, res7);
- // 00 10 01 11 02 12 03 13
- // 20 30 21 31 22 32 23 33
- // 04 14 05 15 06 16 07 17
- // 24 34 25 35 26 36 27 37
- // 40 50 41 51 42 52 43 53
- // 60 70 61 71 62 72 63 73
- // 54 54 55 55 56 56 57 57
- // 64 74 65 75 66 76 67 77
- const __m128i tr1_0 = _mm_unpacklo_epi32(tr0_0, tr0_1);
- const __m128i tr1_1 = _mm_unpacklo_epi32(tr0_2, tr0_3);
- const __m128i tr1_2 = _mm_unpackhi_epi32(tr0_0, tr0_1);
- const __m128i tr1_3 = _mm_unpackhi_epi32(tr0_2, tr0_3);
- const __m128i tr1_4 = _mm_unpacklo_epi32(tr0_4, tr0_5);
- const __m128i tr1_5 = _mm_unpacklo_epi32(tr0_6, tr0_7);
- const __m128i tr1_6 = _mm_unpackhi_epi32(tr0_4, tr0_5);
- const __m128i tr1_7 = _mm_unpackhi_epi32(tr0_6, tr0_7);
- // 00 10 20 30 01 11 21 31
- // 40 50 60 70 41 51 61 71
- // 02 12 22 32 03 13 23 33
- // 42 52 62 72 43 53 63 73
- // 04 14 24 34 05 15 21 36
- // 44 54 64 74 45 55 61 76
- // 06 16 26 36 07 17 27 37
- // 46 56 66 76 47 57 67 77
- in0 = _mm_unpacklo_epi64(tr1_0, tr1_4);
- in1 = _mm_unpackhi_epi64(tr1_0, tr1_4);
- in2 = _mm_unpacklo_epi64(tr1_2, tr1_6);
- in3 = _mm_unpackhi_epi64(tr1_2, tr1_6);
- in4 = _mm_unpacklo_epi64(tr1_1, tr1_5);
- in5 = _mm_unpackhi_epi64(tr1_1, tr1_5);
- in6 = _mm_unpacklo_epi64(tr1_3, tr1_7);
- in7 = _mm_unpackhi_epi64(tr1_3, tr1_7);
- // 00 10 20 30 40 50 60 70
- // 01 11 21 31 41 51 61 71
- // 02 12 22 32 42 52 62 72
- // 03 13 23 33 43 53 63 73
- // 04 14 24 34 44 54 64 74
- // 05 15 25 35 45 55 65 75
- // 06 16 26 36 46 56 66 76
- // 07 17 27 37 47 57 67 77
- }
- }
- // Post-condition output and store it
- {
- // Post-condition (division by two)
- // division of two 16 bits signed numbers using shifts
- // n / 2 = (n - (n >> 15)) >> 1
- const __m128i sign_in0 = _mm_srai_epi16(in0, 15);
- const __m128i sign_in1 = _mm_srai_epi16(in1, 15);
- const __m128i sign_in2 = _mm_srai_epi16(in2, 15);
- const __m128i sign_in3 = _mm_srai_epi16(in3, 15);
- const __m128i sign_in4 = _mm_srai_epi16(in4, 15);
- const __m128i sign_in5 = _mm_srai_epi16(in5, 15);
- const __m128i sign_in6 = _mm_srai_epi16(in6, 15);
- const __m128i sign_in7 = _mm_srai_epi16(in7, 15);
- in0 = _mm_sub_epi16(in0, sign_in0);
- in1 = _mm_sub_epi16(in1, sign_in1);
- in2 = _mm_sub_epi16(in2, sign_in2);
- in3 = _mm_sub_epi16(in3, sign_in3);
- in4 = _mm_sub_epi16(in4, sign_in4);
- in5 = _mm_sub_epi16(in5, sign_in5);
- in6 = _mm_sub_epi16(in6, sign_in6);
- in7 = _mm_sub_epi16(in7, sign_in7);
- in0 = _mm_srai_epi16(in0, 1);
- in1 = _mm_srai_epi16(in1, 1);
- in2 = _mm_srai_epi16(in2, 1);
- in3 = _mm_srai_epi16(in3, 1);
- in4 = _mm_srai_epi16(in4, 1);
- in5 = _mm_srai_epi16(in5, 1);
- in6 = _mm_srai_epi16(in6, 1);
- in7 = _mm_srai_epi16(in7, 1);
- // store results
- store_output(&in0, (output + 0 * 8));
- store_output(&in1, (output + 1 * 8));
- store_output(&in2, (output + 2 * 8));
- store_output(&in3, (output + 3 * 8));
- store_output(&in4, (output + 4 * 8));
- store_output(&in5, (output + 5 * 8));
- store_output(&in6, (output + 6 * 8));
- store_output(&in7, (output + 7 * 8));
- }
-}
-
-void FDCT16x16_2D(const int16_t *input, tran_low_t *output, int stride) {
- // The 2D transform is done with two passes which are actually pretty
- // similar. In the first one, we transform the columns and transpose
- // the results. In the second one, we transform the rows. To achieve that,
- // as the first pass results are transposed, we transpose the columns (that
- // is the transposed rows) and transpose the results (so that it goes back
- // in normal/row positions).
- int pass;
- // We need an intermediate buffer between passes.
- DECLARE_ALIGNED(16, int16_t, intermediate[256]);
- const int16_t *in = input;
- int16_t *out0 = intermediate;
- tran_low_t *out1 = output;
- // Constants
- // When we use them, in one case, they are all the same. In all others
- // it's a pair of them that we need to repeat four times. This is done
- // by constructing the 32 bit constant corresponding to that pair.
- const __m128i k__cospi_p16_p16 = _mm_set1_epi16((int16_t)cospi_16_64);
- const __m128i k__cospi_p16_m16 = pair_set_epi16(cospi_16_64, -cospi_16_64);
- const __m128i k__cospi_p24_p08 = pair_set_epi16(cospi_24_64, cospi_8_64);
- const __m128i k__cospi_p08_m24 = pair_set_epi16(cospi_8_64, -cospi_24_64);
- const __m128i k__cospi_m08_p24 = pair_set_epi16(-cospi_8_64, cospi_24_64);
- const __m128i k__cospi_p28_p04 = pair_set_epi16(cospi_28_64, cospi_4_64);
- const __m128i k__cospi_m04_p28 = pair_set_epi16(-cospi_4_64, cospi_28_64);
- const __m128i k__cospi_p12_p20 = pair_set_epi16(cospi_12_64, cospi_20_64);
- const __m128i k__cospi_m20_p12 = pair_set_epi16(-cospi_20_64, cospi_12_64);
- const __m128i k__cospi_p30_p02 = pair_set_epi16(cospi_30_64, cospi_2_64);
- const __m128i k__cospi_p14_p18 = pair_set_epi16(cospi_14_64, cospi_18_64);
- const __m128i k__cospi_m02_p30 = pair_set_epi16(-cospi_2_64, cospi_30_64);
- const __m128i k__cospi_m18_p14 = pair_set_epi16(-cospi_18_64, cospi_14_64);
- const __m128i k__cospi_p22_p10 = pair_set_epi16(cospi_22_64, cospi_10_64);
- const __m128i k__cospi_p06_p26 = pair_set_epi16(cospi_6_64, cospi_26_64);
- const __m128i k__cospi_m10_p22 = pair_set_epi16(-cospi_10_64, cospi_22_64);
- const __m128i k__cospi_m26_p06 = pair_set_epi16(-cospi_26_64, cospi_6_64);
- const __m128i k__DCT_CONST_ROUNDING = _mm_set1_epi32(DCT_CONST_ROUNDING);
- const __m128i kOne = _mm_set1_epi16(1);
- // Do the two transform/transpose passes
- for (pass = 0; pass < 2; ++pass) {
- // We process eight columns (transposed rows in second pass) at a time.
- int column_start;
-#if DCT_HIGH_BIT_DEPTH
- int overflow;
-#endif
- for (column_start = 0; column_start < 16; column_start += 8) {
- __m128i in00, in01, in02, in03, in04, in05, in06, in07;
- __m128i in08, in09, in10, in11, in12, in13, in14, in15;
- __m128i input0, input1, input2, input3, input4, input5, input6, input7;
- __m128i step1_0, step1_1, step1_2, step1_3;
- __m128i step1_4, step1_5, step1_6, step1_7;
- __m128i step2_1, step2_2, step2_3, step2_4, step2_5, step2_6;
- __m128i step3_0, step3_1, step3_2, step3_3;
- __m128i step3_4, step3_5, step3_6, step3_7;
- __m128i res00, res01, res02, res03, res04, res05, res06, res07;
- __m128i res08, res09, res10, res11, res12, res13, res14, res15;
- // Load and pre-condition input.
- if (0 == pass) {
- in00 = _mm_load_si128((const __m128i *)(in + 0 * stride));
- in01 = _mm_load_si128((const __m128i *)(in + 1 * stride));
- in02 = _mm_load_si128((const __m128i *)(in + 2 * stride));
- in03 = _mm_load_si128((const __m128i *)(in + 3 * stride));
- in04 = _mm_load_si128((const __m128i *)(in + 4 * stride));
- in05 = _mm_load_si128((const __m128i *)(in + 5 * stride));
- in06 = _mm_load_si128((const __m128i *)(in + 6 * stride));
- in07 = _mm_load_si128((const __m128i *)(in + 7 * stride));
- in08 = _mm_load_si128((const __m128i *)(in + 8 * stride));
- in09 = _mm_load_si128((const __m128i *)(in + 9 * stride));
- in10 = _mm_load_si128((const __m128i *)(in + 10 * stride));
- in11 = _mm_load_si128((const __m128i *)(in + 11 * stride));
- in12 = _mm_load_si128((const __m128i *)(in + 12 * stride));
- in13 = _mm_load_si128((const __m128i *)(in + 13 * stride));
- in14 = _mm_load_si128((const __m128i *)(in + 14 * stride));
- in15 = _mm_load_si128((const __m128i *)(in + 15 * stride));
- // x = x << 2
- in00 = _mm_slli_epi16(in00, 2);
- in01 = _mm_slli_epi16(in01, 2);
- in02 = _mm_slli_epi16(in02, 2);
- in03 = _mm_slli_epi16(in03, 2);
- in04 = _mm_slli_epi16(in04, 2);
- in05 = _mm_slli_epi16(in05, 2);
- in06 = _mm_slli_epi16(in06, 2);
- in07 = _mm_slli_epi16(in07, 2);
- in08 = _mm_slli_epi16(in08, 2);
- in09 = _mm_slli_epi16(in09, 2);
- in10 = _mm_slli_epi16(in10, 2);
- in11 = _mm_slli_epi16(in11, 2);
- in12 = _mm_slli_epi16(in12, 2);
- in13 = _mm_slli_epi16(in13, 2);
- in14 = _mm_slli_epi16(in14, 2);
- in15 = _mm_slli_epi16(in15, 2);
- } else {
- in00 = _mm_load_si128((const __m128i *)(in + 0 * 16));
- in01 = _mm_load_si128((const __m128i *)(in + 1 * 16));
- in02 = _mm_load_si128((const __m128i *)(in + 2 * 16));
- in03 = _mm_load_si128((const __m128i *)(in + 3 * 16));
- in04 = _mm_load_si128((const __m128i *)(in + 4 * 16));
- in05 = _mm_load_si128((const __m128i *)(in + 5 * 16));
- in06 = _mm_load_si128((const __m128i *)(in + 6 * 16));
- in07 = _mm_load_si128((const __m128i *)(in + 7 * 16));
- in08 = _mm_load_si128((const __m128i *)(in + 8 * 16));
- in09 = _mm_load_si128((const __m128i *)(in + 9 * 16));
- in10 = _mm_load_si128((const __m128i *)(in + 10 * 16));
- in11 = _mm_load_si128((const __m128i *)(in + 11 * 16));
- in12 = _mm_load_si128((const __m128i *)(in + 12 * 16));
- in13 = _mm_load_si128((const __m128i *)(in + 13 * 16));
- in14 = _mm_load_si128((const __m128i *)(in + 14 * 16));
- in15 = _mm_load_si128((const __m128i *)(in + 15 * 16));
- // x = (x + 1) >> 2
- in00 = _mm_add_epi16(in00, kOne);
- in01 = _mm_add_epi16(in01, kOne);
- in02 = _mm_add_epi16(in02, kOne);
- in03 = _mm_add_epi16(in03, kOne);
- in04 = _mm_add_epi16(in04, kOne);
- in05 = _mm_add_epi16(in05, kOne);
- in06 = _mm_add_epi16(in06, kOne);
- in07 = _mm_add_epi16(in07, kOne);
- in08 = _mm_add_epi16(in08, kOne);
- in09 = _mm_add_epi16(in09, kOne);
- in10 = _mm_add_epi16(in10, kOne);
- in11 = _mm_add_epi16(in11, kOne);
- in12 = _mm_add_epi16(in12, kOne);
- in13 = _mm_add_epi16(in13, kOne);
- in14 = _mm_add_epi16(in14, kOne);
- in15 = _mm_add_epi16(in15, kOne);
- in00 = _mm_srai_epi16(in00, 2);
- in01 = _mm_srai_epi16(in01, 2);
- in02 = _mm_srai_epi16(in02, 2);
- in03 = _mm_srai_epi16(in03, 2);
- in04 = _mm_srai_epi16(in04, 2);
- in05 = _mm_srai_epi16(in05, 2);
- in06 = _mm_srai_epi16(in06, 2);
- in07 = _mm_srai_epi16(in07, 2);
- in08 = _mm_srai_epi16(in08, 2);
- in09 = _mm_srai_epi16(in09, 2);
- in10 = _mm_srai_epi16(in10, 2);
- in11 = _mm_srai_epi16(in11, 2);
- in12 = _mm_srai_epi16(in12, 2);
- in13 = _mm_srai_epi16(in13, 2);
- in14 = _mm_srai_epi16(in14, 2);
- in15 = _mm_srai_epi16(in15, 2);
- }
- in += 8;
- // Calculate input for the first 8 results.
- {
- input0 = ADD_EPI16(in00, in15);
- input1 = ADD_EPI16(in01, in14);
- input2 = ADD_EPI16(in02, in13);
- input3 = ADD_EPI16(in03, in12);
- input4 = ADD_EPI16(in04, in11);
- input5 = ADD_EPI16(in05, in10);
- input6 = ADD_EPI16(in06, in09);
- input7 = ADD_EPI16(in07, in08);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x8(&input0, &input1, &input2, &input3,
- &input4, &input5, &input6, &input7);
- if (overflow) {
- vpx_highbd_fdct16x16_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- // Calculate input for the next 8 results.
- {
- step1_0 = SUB_EPI16(in07, in08);
- step1_1 = SUB_EPI16(in06, in09);
- step1_2 = SUB_EPI16(in05, in10);
- step1_3 = SUB_EPI16(in04, in11);
- step1_4 = SUB_EPI16(in03, in12);
- step1_5 = SUB_EPI16(in02, in13);
- step1_6 = SUB_EPI16(in01, in14);
- step1_7 = SUB_EPI16(in00, in15);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x8(&step1_0, &step1_1, &step1_2, &step1_3,
- &step1_4, &step1_5, &step1_6, &step1_7);
- if (overflow) {
- vpx_highbd_fdct16x16_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- // Work on the first eight values; fdct8(input, even_results);
- {
- // Add/subtract
- const __m128i q0 = ADD_EPI16(input0, input7);
- const __m128i q1 = ADD_EPI16(input1, input6);
- const __m128i q2 = ADD_EPI16(input2, input5);
- const __m128i q3 = ADD_EPI16(input3, input4);
- const __m128i q4 = SUB_EPI16(input3, input4);
- const __m128i q5 = SUB_EPI16(input2, input5);
- const __m128i q6 = SUB_EPI16(input1, input6);
- const __m128i q7 = SUB_EPI16(input0, input7);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x8(&q0, &q1, &q2, &q3, &q4, &q5, &q6, &q7);
- if (overflow) {
- vpx_highbd_fdct16x16_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- // Work on first four results
- {
- // Add/subtract
- const __m128i r0 = ADD_EPI16(q0, q3);
- const __m128i r1 = ADD_EPI16(q1, q2);
- const __m128i r2 = SUB_EPI16(q1, q2);
- const __m128i r3 = SUB_EPI16(q0, q3);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x4(&r0, &r1, &r2, &r3);
- if (overflow) {
- vpx_highbd_fdct16x16_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- // Interleave to do the multiply by constants which gets us
- // into 32 bits.
- {
- const __m128i t0 = _mm_unpacklo_epi16(r0, r1);
- const __m128i t1 = _mm_unpackhi_epi16(r0, r1);
- const __m128i t2 = _mm_unpacklo_epi16(r2, r3);
- const __m128i t3 = _mm_unpackhi_epi16(r2, r3);
- res00 = mult_round_shift(&t0, &t1, &k__cospi_p16_p16,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- res08 = mult_round_shift(&t0, &t1, &k__cospi_p16_m16,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- res04 = mult_round_shift(&t2, &t3, &k__cospi_p24_p08,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- res12 = mult_round_shift(&t2, &t3, &k__cospi_m08_p24,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x4(&res00, &res08, &res04, &res12);
- if (overflow) {
- vpx_highbd_fdct16x16_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- }
- // Work on next four results
- {
- // Interleave to do the multiply by constants which gets us
- // into 32 bits.
- const __m128i d0 = _mm_unpacklo_epi16(q6, q5);
- const __m128i d1 = _mm_unpackhi_epi16(q6, q5);
- const __m128i r0 =
- mult_round_shift(&d0, &d1, &k__cospi_p16_m16,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- const __m128i r1 =
- mult_round_shift(&d0, &d1, &k__cospi_p16_p16,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x2(&r0, &r1);
- if (overflow) {
- vpx_highbd_fdct16x16_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- {
- // Add/subtract
- const __m128i x0 = ADD_EPI16(q4, r0);
- const __m128i x1 = SUB_EPI16(q4, r0);
- const __m128i x2 = SUB_EPI16(q7, r1);
- const __m128i x3 = ADD_EPI16(q7, r1);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x4(&x0, &x1, &x2, &x3);
- if (overflow) {
- vpx_highbd_fdct16x16_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- // Interleave to do the multiply by constants which gets us
- // into 32 bits.
- {
- const __m128i t0 = _mm_unpacklo_epi16(x0, x3);
- const __m128i t1 = _mm_unpackhi_epi16(x0, x3);
- const __m128i t2 = _mm_unpacklo_epi16(x1, x2);
- const __m128i t3 = _mm_unpackhi_epi16(x1, x2);
- res02 = mult_round_shift(&t0, &t1, &k__cospi_p28_p04,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- res14 = mult_round_shift(&t0, &t1, &k__cospi_m04_p28,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- res10 = mult_round_shift(&t2, &t3, &k__cospi_p12_p20,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- res06 = mult_round_shift(&t2, &t3, &k__cospi_m20_p12,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x4(&res02, &res14, &res10, &res06);
- if (overflow) {
- vpx_highbd_fdct16x16_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- }
- }
- }
- // Work on the next eight values; step1 -> odd_results
- {
- // step 2
- {
- const __m128i t0 = _mm_unpacklo_epi16(step1_5, step1_2);
- const __m128i t1 = _mm_unpackhi_epi16(step1_5, step1_2);
- const __m128i t2 = _mm_unpacklo_epi16(step1_4, step1_3);
- const __m128i t3 = _mm_unpackhi_epi16(step1_4, step1_3);
- step2_2 = mult_round_shift(&t0, &t1, &k__cospi_p16_m16,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- step2_3 = mult_round_shift(&t2, &t3, &k__cospi_p16_m16,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- step2_5 = mult_round_shift(&t0, &t1, &k__cospi_p16_p16,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- step2_4 = mult_round_shift(&t2, &t3, &k__cospi_p16_p16,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x4(&step2_2, &step2_3, &step2_5, &step2_4);
- if (overflow) {
- vpx_highbd_fdct16x16_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- // step 3
- {
- step3_0 = ADD_EPI16(step1_0, step2_3);
- step3_1 = ADD_EPI16(step1_1, step2_2);
- step3_2 = SUB_EPI16(step1_1, step2_2);
- step3_3 = SUB_EPI16(step1_0, step2_3);
- step3_4 = SUB_EPI16(step1_7, step2_4);
- step3_5 = SUB_EPI16(step1_6, step2_5);
- step3_6 = ADD_EPI16(step1_6, step2_5);
- step3_7 = ADD_EPI16(step1_7, step2_4);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x8(&step3_0, &step3_1, &step3_2, &step3_3,
- &step3_4, &step3_5, &step3_6, &step3_7);
- if (overflow) {
- vpx_highbd_fdct16x16_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- // step 4
- {
- const __m128i t0 = _mm_unpacklo_epi16(step3_1, step3_6);
- const __m128i t1 = _mm_unpackhi_epi16(step3_1, step3_6);
- const __m128i t2 = _mm_unpacklo_epi16(step3_2, step3_5);
- const __m128i t3 = _mm_unpackhi_epi16(step3_2, step3_5);
- step2_1 = mult_round_shift(&t0, &t1, &k__cospi_m08_p24,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- step2_2 = mult_round_shift(&t2, &t3, &k__cospi_p24_p08,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- step2_6 = mult_round_shift(&t0, &t1, &k__cospi_p24_p08,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- step2_5 = mult_round_shift(&t2, &t3, &k__cospi_p08_m24,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x4(&step2_1, &step2_2, &step2_6, &step2_5);
- if (overflow) {
- vpx_highbd_fdct16x16_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- // step 5
- {
- step1_0 = ADD_EPI16(step3_0, step2_1);
- step1_1 = SUB_EPI16(step3_0, step2_1);
- step1_2 = ADD_EPI16(step3_3, step2_2);
- step1_3 = SUB_EPI16(step3_3, step2_2);
- step1_4 = SUB_EPI16(step3_4, step2_5);
- step1_5 = ADD_EPI16(step3_4, step2_5);
- step1_6 = SUB_EPI16(step3_7, step2_6);
- step1_7 = ADD_EPI16(step3_7, step2_6);
-#if DCT_HIGH_BIT_DEPTH
- overflow =
- check_epi16_overflow_x8(&step1_0, &step1_1, &step1_2, &step1_3,
- &step1_4, &step1_5, &step1_6, &step1_7);
- if (overflow) {
- vpx_highbd_fdct16x16_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- // step 6
- {
- const __m128i t0 = _mm_unpacklo_epi16(step1_0, step1_7);
- const __m128i t1 = _mm_unpackhi_epi16(step1_0, step1_7);
- const __m128i t2 = _mm_unpacklo_epi16(step1_1, step1_6);
- const __m128i t3 = _mm_unpackhi_epi16(step1_1, step1_6);
- res01 = mult_round_shift(&t0, &t1, &k__cospi_p30_p02,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- res09 = mult_round_shift(&t2, &t3, &k__cospi_p14_p18,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- res15 = mult_round_shift(&t0, &t1, &k__cospi_m02_p30,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- res07 = mult_round_shift(&t2, &t3, &k__cospi_m18_p14,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x4(&res01, &res09, &res15, &res07);
- if (overflow) {
- vpx_highbd_fdct16x16_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- {
- const __m128i t0 = _mm_unpacklo_epi16(step1_2, step1_5);
- const __m128i t1 = _mm_unpackhi_epi16(step1_2, step1_5);
- const __m128i t2 = _mm_unpacklo_epi16(step1_3, step1_4);
- const __m128i t3 = _mm_unpackhi_epi16(step1_3, step1_4);
- res05 = mult_round_shift(&t0, &t1, &k__cospi_p22_p10,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- res13 = mult_round_shift(&t2, &t3, &k__cospi_p06_p26,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- res11 = mult_round_shift(&t0, &t1, &k__cospi_m10_p22,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
- res03 = mult_round_shift(&t2, &t3, &k__cospi_m26_p06,
- &k__DCT_CONST_ROUNDING, DCT_CONST_BITS);
-#if DCT_HIGH_BIT_DEPTH
- overflow = check_epi16_overflow_x4(&res05, &res13, &res11, &res03);
- if (overflow) {
- vpx_highbd_fdct16x16_c(input, output, stride);
- return;
- }
-#endif // DCT_HIGH_BIT_DEPTH
- }
- }
- // Transpose the results, do it as two 8x8 transposes.
- transpose_and_output8x8(&res00, &res01, &res02, &res03, &res04, &res05,
- &res06, &res07, pass, out0, out1);
- transpose_and_output8x8(&res08, &res09, &res10, &res11, &res12, &res13,
- &res14, &res15, pass, out0 + 8, out1 + 8);
- if (pass == 0) {
- out0 += 8 * 16;
- } else {
- out1 += 8 * 16;
- }
- }
- // Setup in/out for next pass.
- in = intermediate;
- }
-}
-
-#undef ADD_EPI16
-#undef SUB_EPI16
diff --git a/vpxdec.c b/vpxdec.c
index 14b1ec0..c225b4b 100644
--- a/vpxdec.c
+++ b/vpxdec.c
@@ -24,12 +24,12 @@
#include "./args.h"
#include "./ivfdec.h"
-#include "vpx/vpx_decoder.h"
-#include "vpx_ports/mem_ops.h"
-#include "vpx_ports/vpx_timer.h"
+#include "aom/vpx_decoder.h"
+#include "aom_ports/mem_ops.h"
+#include "aom_ports/vpx_timer.h"
#if CONFIG_VP10_DECODER
-#include "vpx/vp8dx.h"
+#include "aom/vp8dx.h"
#endif
#include "./md5_utils.h"
diff --git a/vpxenc.c b/vpxenc.c
index 41a1605..43f9c51 100644
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -23,9 +23,9 @@
#include "third_party/libyuv/include/libyuv/scale.h"
#endif
-#include "vpx/vpx_encoder.h"
+#include "aom/vpx_encoder.h"
#if CONFIG_DECODERS
-#include "vpx/vpx_decoder.h"
+#include "aom/vpx_decoder.h"
#endif
#include "./args.h"
@@ -33,15 +33,15 @@
#include "./tools_common.h"
#if CONFIG_VP10_ENCODER
-#include "vpx/vp8cx.h"
+#include "aom/vp8cx.h"
#endif
#if CONFIG_VP10_DECODER
-#include "vpx/vp8dx.h"
+#include "aom/vp8dx.h"
#endif
-#include "vpx/vpx_integer.h"
-#include "vpx_ports/mem_ops.h"
-#include "vpx_ports/vpx_timer.h"
+#include "aom/vpx_integer.h"
+#include "aom_ports/mem_ops.h"
+#include "aom_ports/vpx_timer.h"
#include "./rate_hist.h"
#include "./vpxstats.h"
#include "./warnings.h"
diff --git a/vpxenc.h b/vpxenc.h
index d867e9d..eee00d0 100644
--- a/vpxenc.h
+++ b/vpxenc.h
@@ -10,7 +10,7 @@
#ifndef VPXENC_H_
#define VPXENC_H_
-#include "vpx/vpx_encoder.h"
+#include "aom/vpx_encoder.h"
#ifdef __cplusplus
extern "C" {
diff --git a/vpxstats.h b/vpxstats.h
index 5c9ea34..0ea7ce4 100644
--- a/vpxstats.h
+++ b/vpxstats.h
@@ -13,7 +13,7 @@
#include <stdio.h>
-#include "vpx/vpx_encoder.h"
+#include "aom/vpx_encoder.h"
#ifdef __cplusplus
extern "C" {
diff --git a/warnings.c b/warnings.c
index a3e4926..eea6abc 100644
--- a/warnings.c
+++ b/warnings.c
@@ -15,7 +15,7 @@
#include <stdlib.h>
#include <string.h>
-#include "vpx/vpx_encoder.h"
+#include "aom/vpx_encoder.h"
#include "./tools_common.h"
#include "./vpxenc.h"
diff --git a/webmenc.h b/webmenc.h
index 87cb7eb..c5cf857 100644
--- a/webmenc.h
+++ b/webmenc.h
@@ -14,7 +14,7 @@
#include <stdlib.h>
#include "tools_common.h"
-#include "vpx/vpx_encoder.h"
+#include "aom/vpx_encoder.h"
#ifdef __cplusplus
extern "C" {
diff --git a/y4menc.h b/y4menc.h
index 69d5904..bd92e02 100644
--- a/y4menc.h
+++ b/y4menc.h
@@ -13,7 +13,7 @@
#include "./tools_common.h"
-#include "vpx/vpx_decoder.h"
+#include "aom/vpx_decoder.h"
#ifdef __cplusplus
extern "C" {
diff --git a/y4minput.c b/y4minput.c
index 7de859f..d2cc18a 100644
--- a/y4minput.c
+++ b/y4minput.c
@@ -14,7 +14,7 @@
#include <stdlib.h>
#include <string.h>
-#include "vpx/vpx_integer.h"
+#include "aom/vpx_integer.h"
#include "y4minput.h"
// Reads 'size' bytes from 'file' into 'buf' with some fault tolerance.
diff --git a/y4minput.h b/y4minput.h
index 9e69ceb..2037449 100644
--- a/y4minput.h
+++ b/y4minput.h
@@ -15,7 +15,7 @@
#define Y4MINPUT_H_
#include <stdio.h>
-#include "vpx/vpx_image.h"
+#include "aom/vpx_image.h"
#ifdef __cplusplus
extern "C" {