From 2314566a26809c51e0bbf24f77e69e19220e9194 Mon Sep 17 00:00:00 2001 From: Urvang Joshi Date: Wed, 13 Dec 2017 12:25:46 -0800 Subject: [PATCH] Move encoder-only transform code to encoder/ Update make files, include paths etc. Change-Id: I78153b28890c7610d65c846eb72cb9dacd30bc2e --- av1/av1.cmake | 13 ++++++------- av1/av1_common.mk | 11 ----------- av1/av1_cx.mk | 8 +++++++- av1/{common => encoder}/av1_fwd_txfm1d.c | 2 +- av1/{common => encoder}/av1_fwd_txfm1d.h | 0 av1/{common => encoder}/av1_fwd_txfm1d_cfg.h | 2 +- av1/{common => encoder}/av1_fwd_txfm2d.c | 4 ++-- av1/encoder/dct.c | 4 ++-- av1/{common => encoder}/x86/av1_fwd_txfm1d_sse4.c | 2 +- av1/{common => encoder}/x86/av1_fwd_txfm2d_sse4.c | 2 +- av1/{common => encoder}/x86/av1_txfm1d_sse4.h | 0 av1/encoder/x86/highbd_fwd_txfm_sse4.c | 2 +- test/av1_fwd_txfm1d_test.cc | 2 +- test/av1_inv_txfm1d_test.cc | 2 +- 14 files changed, 24 insertions(+), 30 deletions(-) rename av1/{common => encoder}/av1_fwd_txfm1d.c (99%) rename av1/{common => encoder}/av1_fwd_txfm1d.h (100%) rename av1/{common => encoder}/av1_fwd_txfm1d_cfg.h (99%) rename av1/{common => encoder}/av1_fwd_txfm2d.c (99%) rename av1/{common => encoder}/x86/av1_fwd_txfm1d_sse4.c (99%) rename av1/{common => encoder}/x86/av1_fwd_txfm2d_sse4.c (98%) rename av1/{common => encoder}/x86/av1_txfm1d_sse4.h (100%) diff --git a/av1/av1.cmake b/av1/av1.cmake index 1a79da6ad..df73ad8d9 100644 --- a/av1/av1.cmake +++ b/av1/av1.cmake @@ -15,11 +15,6 @@ set(AOM_AV1_COMMON_SOURCES "${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 @@ set(AOM_AV1_ENCODER_SOURCES "${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_SSSE3 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_ASM_SSSE3_X86_64 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 ee2de3938..c9ddf39f5 100644 --- a/av1/av1_common.mk +++ b/av1/av1_common.mk @@ -67,17 +67,12 @@ AV1_COMMON_SRCS-yes += common/resize.h 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_MSA) += common/mips/msa/av1_idct16x16_msa.c 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 3ae177294..d35bb8967 100644 --- a/av1/av1_cx.mk +++ b/av1/av1_cx.mk @@ -18,6 +18,10 @@ AV1_CX_SRCS_REMOVE-no += $(AV1_COMMON_SRCS_REMOVE-no) 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 @@ endif 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 2d998d7d0..64d0316f1 100644 --- a/av1/common/av1_fwd_txfm1d.c +++ b/av1/encoder/av1_fwd_txfm1d.c @@ -11,7 +11,7 @@ #include #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 1bfb5ac78..9223e6301 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 734b2d9db..c4125af22 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 2156934f4..a814e7a9b 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 97d2e74b1..5bff91cff 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 cbb898999..8ca6a2890 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 e620eee89..9fc900d03 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 9deef3c95..34c80f9e0 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 54d19f9e6..52f84bc53 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; -- GitLab