Move encoder-only transform code to encoder/ Update make files, include paths etc. Change-Id: I78153b28890c7610d65c846eb72cb9dacd30bc2e
diff --git a/av1/av1.cmake b/av1/av1.cmake index 1a79da6..df73ad8 100644 --- a/av1/av1.cmake +++ b/av1/av1.cmake
@@ -15,11 +15,6 @@ "${AOM_ROOT}/av1/av1_iface_common.h" "${AOM_ROOT}/av1/common/alloccommon.c" "${AOM_ROOT}/av1/common/alloccommon.h" - # TODO(tomfinegan): Foward transform belongs in encoder. - "${AOM_ROOT}/av1/common/av1_fwd_txfm1d.c" - "${AOM_ROOT}/av1/common/av1_fwd_txfm1d.h" - "${AOM_ROOT}/av1/common/av1_fwd_txfm2d.c" - "${AOM_ROOT}/av1/common/av1_fwd_txfm1d_cfg.h" "${AOM_ROOT}/av1/common/av1_inv_txfm1d.c" "${AOM_ROOT}/av1/common/av1_inv_txfm1d.h" "${AOM_ROOT}/av1/common/av1_inv_txfm2d.c" @@ -106,6 +101,10 @@ "${AOM_ROOT}/av1/encoder/aq_cyclicrefresh.h" "${AOM_ROOT}/av1/encoder/aq_variance.c" "${AOM_ROOT}/av1/encoder/aq_variance.h" + "${AOM_ROOT}/av1/encoder/av1_fwd_txfm1d.c" + "${AOM_ROOT}/av1/encoder/av1_fwd_txfm1d.h" + "${AOM_ROOT}/av1/encoder/av1_fwd_txfm1d_cfg.h" + "${AOM_ROOT}/av1/encoder/av1_fwd_txfm2d.c" "${AOM_ROOT}/av1/encoder/av1_quantize.c" "${AOM_ROOT}/av1/encoder/av1_quantize.h" "${AOM_ROOT}/av1/encoder/bitstream.c" @@ -179,8 +178,6 @@ set(AOM_AV1_COMMON_INTRIN_SSE4_1 "${AOM_ROOT}/av1/common/x86/av1_txfm_sse4.c" "${AOM_ROOT}/av1/common/x86/av1_txfm_sse4.h" - "${AOM_ROOT}/av1/common/x86/av1_fwd_txfm1d_sse4.c" - "${AOM_ROOT}/av1/common/x86/av1_fwd_txfm2d_sse4.c" "${AOM_ROOT}/av1/common/x86/highbd_inv_txfm_sse4.c") set(AOM_AV1_COMMON_INTRIN_AVX2 @@ -213,6 +210,8 @@ set(AOM_AV1_ENCODER_INTRIN_SSE4_1 ${AOM_AV1_ENCODER_INTRIN_SSE4_1} + "${AOM_ROOT}/av1/encoder/x86/av1_fwd_txfm1d_sse4.c" + "${AOM_ROOT}/av1/encoder/x86/av1_fwd_txfm2d_sse4.c" "${AOM_ROOT}/av1/encoder/x86/av1_highbd_quantize_sse4.c" "${AOM_ROOT}/av1/encoder/x86/highbd_fwd_txfm_sse4.c")
diff --git a/av1/av1_common.mk b/av1/av1_common.mk index ee2de39..c9ddf39 100644 --- a/av1/av1_common.mk +++ b/av1/av1_common.mk
@@ -67,17 +67,12 @@ AV1_COMMON_SRCS-yes += common/common_data.h AV1_COMMON_SRCS-yes += common/scan.c AV1_COMMON_SRCS-yes += common/scan.h -# TODO(angiebird) the forward transform belongs under encoder/ AV1_COMMON_SRCS-yes += common/av1_txfm.h AV1_COMMON_SRCS-yes += common/av1_txfm.c AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/av1_txfm_sse4.h AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/av1_txfm_sse4.c -AV1_COMMON_SRCS-yes += common/av1_fwd_txfm1d.h -AV1_COMMON_SRCS-yes += common/av1_fwd_txfm1d.c AV1_COMMON_SRCS-yes += common/av1_inv_txfm1d.h AV1_COMMON_SRCS-yes += common/av1_inv_txfm1d.c -AV1_COMMON_SRCS-yes += common/av1_fwd_txfm2d.c -AV1_COMMON_SRCS-yes += common/av1_fwd_txfm1d_cfg.h AV1_COMMON_SRCS-yes += common/av1_inv_txfm2d.c AV1_COMMON_SRCS-yes += common/av1_inv_txfm1d_cfg.h AV1_COMMON_SRCS-$(HAVE_AVX2) += common/x86/convolve_avx2.c @@ -135,12 +130,6 @@ AV1_COMMON_SRCS-$(HAVE_SSE2) += common/x86/idct_intrin_sse2.c AV1_COMMON_SRCS-$(HAVE_AVX2) += common/x86/hybrid_inv_txfm_avx2.c -ifeq ($(CONFIG_AV1_ENCODER),yes) -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/av1_txfm1d_sse4.h -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/av1_fwd_txfm1d_sse4.c -AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/av1_fwd_txfm2d_sse4.c -endif - AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/highbd_txfm_utility_sse4.h AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/highbd_inv_txfm_sse4.c AV1_COMMON_SRCS-$(HAVE_AVX2) += common/x86/highbd_inv_txfm_avx2.c
diff --git a/av1/av1_cx.mk b/av1/av1_cx.mk index 3ae1772..d35bb89 100644 --- a/av1/av1_cx.mk +++ b/av1/av1_cx.mk
@@ -18,6 +18,10 @@ AV1_CX_SRCS-yes += av1_cx_iface.c +AV1_CX_SRCS-yes += encoder/av1_fwd_txfm1d.c +AV1_CX_SRCS-yes += encoder/av1_fwd_txfm1d.h +AV1_CX_SRCS-yes += encoder/av1_fwd_txfm1d_cfg.h +AV1_CX_SRCS-yes += encoder/av1_fwd_txfm2d.c AV1_CX_SRCS-yes += encoder/av1_quantize.c AV1_CX_SRCS-yes += encoder/av1_quantize.h AV1_CX_SRCS-yes += encoder/bitstream.c @@ -137,8 +141,10 @@ AV1_CX_SRCS-$(HAVE_SSE2) += encoder/x86/dct_intrin_sse2.c AV1_CX_SRCS-$(HAVE_AVX2) += encoder/x86/hybrid_fwd_txfm_avx2.c +AV1_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/av1_fwd_txfm1d_sse4.c +AV1_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/av1_fwd_txfm2d_sse4.c AV1_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/av1_highbd_quantize_sse4.c - +AV1_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/av1_txfm1d_sse4.h AV1_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/highbd_fwd_txfm_sse4.c AV1_CX_SRCS-yes += encoder/wedge_utils.c
diff --git a/av1/common/av1_fwd_txfm1d.c b/av1/encoder/av1_fwd_txfm1d.c similarity index 99% rename from av1/common/av1_fwd_txfm1d.c rename to av1/encoder/av1_fwd_txfm1d.c index 2d998d7..64d0316 100644 --- a/av1/common/av1_fwd_txfm1d.c +++ b/av1/encoder/av1_fwd_txfm1d.c
@@ -11,7 +11,7 @@ #include <stdlib.h> #include "aom_dsp/inv_txfm.h" -#include "av1/common/av1_fwd_txfm1d.h" +#include "av1/encoder/av1_fwd_txfm1d.h" #if CONFIG_COEFFICIENT_RANGE_CHECKING void range_check_func(int32_t stage, const int32_t *input, const int32_t *buf,
diff --git a/av1/common/av1_fwd_txfm1d.h b/av1/encoder/av1_fwd_txfm1d.h similarity index 100% rename from av1/common/av1_fwd_txfm1d.h rename to av1/encoder/av1_fwd_txfm1d.h
diff --git a/av1/common/av1_fwd_txfm1d_cfg.h b/av1/encoder/av1_fwd_txfm1d_cfg.h similarity index 99% rename from av1/common/av1_fwd_txfm1d_cfg.h rename to av1/encoder/av1_fwd_txfm1d_cfg.h index 1bfb5ac..9223e63 100644 --- a/av1/common/av1_fwd_txfm1d_cfg.h +++ b/av1/encoder/av1_fwd_txfm1d_cfg.h
@@ -12,7 +12,7 @@ #ifndef AV1_FWD_TXFM2D_CFG_H_ #define AV1_FWD_TXFM2D_CFG_H_ #include "av1/common/enums.h" -#include "av1/common/av1_fwd_txfm1d.h" +#include "av1/encoder/av1_fwd_txfm1d.h" // ---------------- 4x4 1D constants ----------------------- // shift
diff --git a/av1/common/av1_fwd_txfm2d.c b/av1/encoder/av1_fwd_txfm2d.c similarity index 99% rename from av1/common/av1_fwd_txfm2d.c rename to av1/encoder/av1_fwd_txfm2d.c index 734b2d9..c4125af 100644 --- a/av1/common/av1_fwd_txfm2d.c +++ b/av1/encoder/av1_fwd_txfm2d.c
@@ -15,9 +15,9 @@ #include "./av1_rtcd.h" #include "aom_dsp/txfm_common.h" #include "av1/common/enums.h" -#include "av1/common/av1_fwd_txfm1d.h" -#include "av1/common/av1_fwd_txfm1d_cfg.h" #include "av1/common/av1_txfm.h" +#include "av1/encoder/av1_fwd_txfm1d.h" +#include "av1/encoder/av1_fwd_txfm1d_cfg.h" static INLINE TxfmFunc fwd_txfm_type_to_func(TXFM_TYPE txfm_type) { switch (txfm_type) {
diff --git a/av1/encoder/dct.c b/av1/encoder/dct.c index 2156934..a814e7a 100644 --- a/av1/encoder/dct.c +++ b/av1/encoder/dct.c
@@ -18,13 +18,13 @@ #include "aom_dsp/fwd_txfm.h" #include "aom_ports/mem.h" #include "av1/common/blockd.h" -#include "av1/common/av1_fwd_txfm1d.h" -#include "av1/common/av1_fwd_txfm1d_cfg.h" #include "av1/common/idct.h" #if CONFIG_DAALA_TX4 || CONFIG_DAALA_TX8 || CONFIG_DAALA_TX16 || \ CONFIG_DAALA_TX32 || CONFIG_DAALA_TX64 #include "av1/common/daala_tx.h" #endif +#include "av1/encoder/av1_fwd_txfm1d.h" +#include "av1/encoder/av1_fwd_txfm1d_cfg.h" static INLINE void range_check(const tran_low_t *input, const int size, const int bit) {
diff --git a/av1/common/x86/av1_fwd_txfm1d_sse4.c b/av1/encoder/x86/av1_fwd_txfm1d_sse4.c similarity index 99% rename from av1/common/x86/av1_fwd_txfm1d_sse4.c rename to av1/encoder/x86/av1_fwd_txfm1d_sse4.c index 97d2e74..5bff91c 100644 --- a/av1/common/x86/av1_fwd_txfm1d_sse4.c +++ b/av1/encoder/x86/av1_fwd_txfm1d_sse4.c
@@ -1,4 +1,4 @@ -#include "av1/common/x86/av1_txfm1d_sse4.h" +#include "av1/encoder/x86/av1_txfm1d_sse4.h" void av1_fdct32_new_sse4_1(const __m128i *input, __m128i *output, const int8_t *cos_bit, const int8_t *stage_range) {
diff --git a/av1/common/x86/av1_fwd_txfm2d_sse4.c b/av1/encoder/x86/av1_fwd_txfm2d_sse4.c similarity index 98% rename from av1/common/x86/av1_fwd_txfm2d_sse4.c rename to av1/encoder/x86/av1_fwd_txfm2d_sse4.c index cbb8989..8ca6a28 100644 --- a/av1/common/x86/av1_fwd_txfm2d_sse4.c +++ b/av1/encoder/x86/av1_fwd_txfm2d_sse4.c
@@ -12,7 +12,7 @@ #include "./av1_rtcd.h" #include "av1/common/enums.h" #include "av1/common/av1_txfm.h" -#include "av1/common/x86/av1_txfm1d_sse4.h" +#include "av1/encoder/x86/av1_txfm1d_sse4.h" static INLINE void int16_array_with_stride_to_int32_array_without_stride( const int16_t *input, int stride, int32_t *output, int txfm1d_size) {
diff --git a/av1/common/x86/av1_txfm1d_sse4.h b/av1/encoder/x86/av1_txfm1d_sse4.h similarity index 100% rename from av1/common/x86/av1_txfm1d_sse4.h rename to av1/encoder/x86/av1_txfm1d_sse4.h
diff --git a/av1/encoder/x86/highbd_fwd_txfm_sse4.c b/av1/encoder/x86/highbd_fwd_txfm_sse4.c index e620eee..9fc900d 100644 --- a/av1/encoder/x86/highbd_fwd_txfm_sse4.c +++ b/av1/encoder/x86/highbd_fwd_txfm_sse4.c
@@ -13,9 +13,9 @@ #include "./av1_rtcd.h" #include "./aom_config.h" -#include "av1/common/av1_fwd_txfm1d_cfg.h" #include "av1/common/av1_txfm.h" #include "av1/common/x86/highbd_txfm_utility_sse4.h" +#include "av1/encoder/av1_fwd_txfm1d_cfg.h" #include "aom_dsp/txfm_common.h" #include "aom_dsp/x86/txfm_common_sse2.h" #include "aom_ports/mem.h"
diff --git a/test/av1_fwd_txfm1d_test.cc b/test/av1_fwd_txfm1d_test.cc index 9deef3c..34c80f9 100644 --- a/test/av1_fwd_txfm1d_test.cc +++ b/test/av1_fwd_txfm1d_test.cc
@@ -9,7 +9,7 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include "av1/common/av1_fwd_txfm1d.h" +#include "av1/encoder/av1_fwd_txfm1d.h" #include "test/av1_txfm_test.h" using libaom_test::ACMRandom;
diff --git a/test/av1_inv_txfm1d_test.cc b/test/av1_inv_txfm1d_test.cc index 54d19f9..52f84bc 100644 --- a/test/av1_inv_txfm1d_test.cc +++ b/test/av1_inv_txfm1d_test.cc
@@ -13,8 +13,8 @@ #include "test/av1_txfm_test.h" #include "test/util.h" -#include "av1/common/av1_fwd_txfm1d.h" #include "av1/common/av1_inv_txfm1d.h" +#include "av1/encoder/av1_fwd_txfm1d.h" using libaom_test::ACMRandom; using libaom_test::input_base;