Commit d3e7c68b authored by Yaowu Xu's avatar Yaowu Xu

Remove the use of macro "CONFIG_HIGHBITDEPTH"

Change-Id: I523d9a89493895eb6a7af1df30a39f36ca9f159f
parent 4ce0f8cc
...@@ -548,7 +548,6 @@ void aom_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ...@@ -548,7 +548,6 @@ void aom_scaled_avg_2d_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst,
filter_y, y_step_q4, w, h); filter_y, y_step_q4, w, h);
} }
#if CONFIG_HIGHBITDEPTH || CONFIG_LOOP_RESTORATION
static INLINE int highbd_vert_scalar_product(const uint16_t *a, static INLINE int highbd_vert_scalar_product(const uint16_t *a,
ptrdiff_t a_stride, ptrdiff_t a_stride,
const int16_t *b) { const int16_t *b) {
...@@ -556,7 +555,6 @@ static INLINE int highbd_vert_scalar_product(const uint16_t *a, ...@@ -556,7 +555,6 @@ static INLINE int highbd_vert_scalar_product(const uint16_t *a,
for (int k = 0; k < SUBPEL_TAPS; ++k) sum += a[k * a_stride] * b[k]; for (int k = 0; k < SUBPEL_TAPS; ++k) sum += a[k * a_stride] * b[k];
return sum; return sum;
} }
#endif
// TODO(afergs): Make sure this works too // TODO(afergs): Make sure this works too
#if CONFIG_LOOP_RESTORATION #if CONFIG_LOOP_RESTORATION
...@@ -790,9 +788,6 @@ void aom_convolve8_add_src_hip_c(const uint8_t *src, ptrdiff_t src_stride, ...@@ -790,9 +788,6 @@ void aom_convolve8_add_src_hip_c(const uint8_t *src, ptrdiff_t src_stride,
} }
#endif // CONFIG_LOOP_RESTORATION #endif // CONFIG_LOOP_RESTORATION
// TODO(afergs): Make sure this works too
#if CONFIG_HIGHBITDEPTH
static INLINE int highbd_horz_scalar_product(const uint16_t *a, static INLINE int highbd_horz_scalar_product(const uint16_t *a,
const int16_t *b) { const int16_t *b) {
int sum = 0; int sum = 0;
...@@ -1258,6 +1253,4 @@ void aom_highbd_convolve8_add_src_hip_c(const uint8_t *src, ...@@ -1258,6 +1253,4 @@ void aom_highbd_convolve8_add_src_hip_c(const uint8_t *src,
x0_q4, x_step_q4, filters_y, y0_q4, y_step_q4, w, x0_q4, x_step_q4, filters_y, y0_q4, y_step_q4, w,
h, bd); h, bd);
} }
#endif // CONFIG_LOOP_RESTORATION #endif // CONFIG_LOOP_RESTORATION
#endif // CONFIG_HIGHBITDEPTH
...@@ -47,13 +47,11 @@ typedef void (*convolve_fn_t)(const uint8_t *src, ptrdiff_t src_stride, ...@@ -47,13 +47,11 @@ typedef void (*convolve_fn_t)(const uint8_t *src, ptrdiff_t src_stride,
const int16_t *filter_y, int y_step_q4, int w, const int16_t *filter_y, int y_step_q4, int w,
int h); int h);
#if CONFIG_HIGHBITDEPTH
typedef void (*highbd_convolve_fn_t)(const uint8_t *src, ptrdiff_t src_stride, typedef void (*highbd_convolve_fn_t)(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride, uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter_x, int x_step_q4, const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4, const int16_t *filter_y, int y_step_q4,
int w, int h, int bd); int w, int h, int bd);
#endif
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
......
...@@ -238,7 +238,6 @@ if (NOT CONFIG_PARALLEL_DEBLOCKING) ...@@ -238,7 +238,6 @@ if (NOT CONFIG_PARALLEL_DEBLOCKING)
"${AOM_ROOT}/aom_dsp/mips/loopfilter_msa.h") "${AOM_ROOT}/aom_dsp/mips/loopfilter_msa.h")
endif () endif ()
if (CONFIG_HIGHBITDEPTH)
set(AOM_DSP_COMMON_ASM_SSE2 set(AOM_DSP_COMMON_ASM_SSE2
${AOM_DSP_COMMON_ASM_SSE2} ${AOM_DSP_COMMON_ASM_SSE2}
"${AOM_ROOT}/aom_dsp/x86/aom_high_subpixel_8t_sse2.asm" "${AOM_ROOT}/aom_dsp/x86/aom_high_subpixel_8t_sse2.asm"
...@@ -259,15 +258,6 @@ if (CONFIG_HIGHBITDEPTH) ...@@ -259,15 +258,6 @@ if (CONFIG_HIGHBITDEPTH)
"${AOM_ROOT}/aom_dsp/x86/highbd_convolve_avx2.c" "${AOM_ROOT}/aom_dsp/x86/highbd_convolve_avx2.c"
"${AOM_ROOT}/aom_dsp/x86/highbd_intrapred_avx2.c" "${AOM_ROOT}/aom_dsp/x86/highbd_intrapred_avx2.c"
"${AOM_ROOT}/aom_dsp/x86/highbd_loopfilter_avx2.c") "${AOM_ROOT}/aom_dsp/x86/highbd_loopfilter_avx2.c")
else ()
set(AOM_DSP_COMMON_INTRIN_DSPR2
${AOM_DSP_COMMON_INTRIN_DSPR2}
"${AOM_ROOT}/aom_dsp/mips/itrans16_dspr2.c"
"${AOM_ROOT}/aom_dsp/mips/itrans32_cols_dspr2.c"
"${AOM_ROOT}/aom_dsp/mips/itrans32_dspr2.c"
"${AOM_ROOT}/aom_dsp/mips/itrans4_dspr2.c"
"${AOM_ROOT}/aom_dsp/mips/itrans8_dspr2.c")
endif ()
set(AOM_DSP_COMMON_SOURCES set(AOM_DSP_COMMON_SOURCES
${AOM_DSP_COMMON_SOURCES} ${AOM_DSP_COMMON_SOURCES}
...@@ -395,14 +385,11 @@ if (CONFIG_AV1_ENCODER) ...@@ -395,14 +385,11 @@ if (CONFIG_AV1_ENCODER)
"${AOM_ROOT}/aom_dsp/x86/masked_sad_intrin_ssse3.c" "${AOM_ROOT}/aom_dsp/x86/masked_sad_intrin_ssse3.c"
"${AOM_ROOT}/aom_dsp/x86/masked_variance_intrin_ssse3.c") "${AOM_ROOT}/aom_dsp/x86/masked_variance_intrin_ssse3.c")
if (CONFIG_HIGHBITDEPTH)
set(AOM_DSP_ENCODER_INTRIN_SSE2 set(AOM_DSP_ENCODER_INTRIN_SSE2
${AOM_DSP_ENCODER_INTRIN_SSE2} ${AOM_DSP_ENCODER_INTRIN_SSE2}
"${AOM_ROOT}/aom_dsp/x86/highbd_subtract_sse2.c") "${AOM_ROOT}/aom_dsp/x86/highbd_subtract_sse2.c")
endif ()
endif () endif ()
if (CONFIG_HIGHBITDEPTH)
set(AOM_DSP_ENCODER_ASM_SSE2 set(AOM_DSP_ENCODER_ASM_SSE2
${AOM_DSP_ENCODER_ASM_SSE2} ${AOM_DSP_ENCODER_ASM_SSE2}
"${AOM_ROOT}/aom_dsp/x86/highbd_sad4d_sse2.asm" "${AOM_ROOT}/aom_dsp/x86/highbd_sad4d_sse2.asm"
...@@ -421,7 +408,6 @@ if (CONFIG_AV1_ENCODER) ...@@ -421,7 +408,6 @@ if (CONFIG_AV1_ENCODER)
set(AOM_DSP_ENCODER_INTRIN_AVX2 set(AOM_DSP_ENCODER_INTRIN_AVX2
${AOM_DSP_ENCODER_INTRIN_AVX2} ${AOM_DSP_ENCODER_INTRIN_AVX2}
"${AOM_ROOT}/aom_dsp/x86/sad_highbd_avx2.c") "${AOM_ROOT}/aom_dsp/x86/sad_highbd_avx2.c")
endif ()
set(AOM_DSP_ENCODER_SOURCES set(AOM_DSP_ENCODER_SOURCES
${AOM_DSP_ENCODER_SOURCES} ${AOM_DSP_ENCODER_SOURCES}
...@@ -445,11 +431,9 @@ if (CONFIG_LOOP_RESTORATION) ...@@ -445,11 +431,9 @@ if (CONFIG_LOOP_RESTORATION)
${AOM_DSP_COMMON_INTRIN_SSE2} ${AOM_DSP_COMMON_INTRIN_SSE2}
"${AOM_ROOT}/aom_dsp/x86/aom_convolve_hip_sse2.c") "${AOM_ROOT}/aom_dsp/x86/aom_convolve_hip_sse2.c")
if (CONFIG_HIGHBITDEPTH)
set(AOM_DSP_COMMON_INTRIN_SSSE3 set(AOM_DSP_COMMON_INTRIN_SSSE3
${AOM_DSP_COMMON_INTRIN_SSSE3} ${AOM_DSP_COMMON_INTRIN_SSSE3}
"${AOM_ROOT}/aom_dsp/x86/aom_highbd_convolve_hip_ssse3.c") "${AOM_ROOT}/aom_dsp/x86/aom_highbd_convolve_hip_ssse3.c")
endif ()
endif () endif ()
set(AOM_DSP_ENCODER_INTRIN_SSE4_1 set(AOM_DSP_ENCODER_INTRIN_SSE4_1
......
...@@ -67,13 +67,11 @@ DSP_SRCS-$(HAVE_SSE2) += x86/intrapred_sse2.c ...@@ -67,13 +67,11 @@ DSP_SRCS-$(HAVE_SSE2) += x86/intrapred_sse2.c
DSP_SRCS-$(HAVE_SSSE3) += x86/intrapred_ssse3.c DSP_SRCS-$(HAVE_SSSE3) += x86/intrapred_ssse3.c
DSP_SRCS-$(HAVE_AVX2) += x86/intrapred_avx2.c DSP_SRCS-$(HAVE_AVX2) += x86/intrapred_avx2.c
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE) += x86/highbd_intrapred_sse2.asm DSP_SRCS-$(HAVE_SSE) += x86/highbd_intrapred_sse2.asm
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_intrapred_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/highbd_intrapred_sse2.asm
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_intrapred_sse2.c DSP_SRCS-$(HAVE_SSE2) += x86/highbd_intrapred_sse2.c
DSP_SRCS-$(HAVE_SSSE3) += x86/highbd_intrapred_ssse3.c DSP_SRCS-$(HAVE_SSSE3) += x86/highbd_intrapred_ssse3.c
DSP_SRCS-$(HAVE_AVX2) += x86/highbd_intrapred_avx2.c DSP_SRCS-$(HAVE_AVX2) += x86/highbd_intrapred_avx2.c
endif # CONFIG_HIGHBITDEPTH
DSP_SRCS-$(HAVE_NEON_ASM) += arm/intrapred_neon_asm$(ASM) DSP_SRCS-$(HAVE_NEON_ASM) += arm/intrapred_neon_asm$(ASM)
DSP_SRCS-$(HAVE_NEON) += arm/intrapred_neon.c DSP_SRCS-$(HAVE_NEON) += arm/intrapred_neon.c
...@@ -112,11 +110,9 @@ DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_8t_ssse3.asm ...@@ -112,11 +110,9 @@ DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_8t_ssse3.asm
DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_bilinear_ssse3.asm DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_bilinear_ssse3.asm
DSP_SRCS-$(HAVE_AVX2) += x86/aom_subpixel_8t_intrin_avx2.c DSP_SRCS-$(HAVE_AVX2) += x86/aom_subpixel_8t_intrin_avx2.c
DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_8t_intrin_ssse3.c DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_8t_intrin_ssse3.c
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2) += x86/aom_high_subpixel_8t_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/aom_high_subpixel_8t_sse2.asm
DSP_SRCS-$(HAVE_SSE2) += x86/aom_high_subpixel_bilinear_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/aom_high_subpixel_bilinear_sse2.asm
DSP_SRCS-$(HAVE_AVX2) += x86/highbd_convolve_avx2.c DSP_SRCS-$(HAVE_AVX2) += x86/highbd_convolve_avx2.c
endif
DSP_SRCS-$(HAVE_SSE2) += x86/aom_convolve_copy_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/aom_convolve_copy_sse2.asm
ifneq ($(CONFIG_EXT_PARTITION),yes) ifneq ($(CONFIG_EXT_PARTITION),yes)
...@@ -197,10 +193,8 @@ DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_mb_horiz_dspr2.c ...@@ -197,10 +193,8 @@ DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_mb_horiz_dspr2.c
DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_mb_vert_dspr2.c DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_mb_vert_dspr2.c
endif # !CONFIG_PARALLEL_DEBLOCKING endif # !CONFIG_PARALLEL_DEBLOCKING
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_loopfilter_sse2.c DSP_SRCS-$(HAVE_SSE2) += x86/highbd_loopfilter_sse2.c
DSP_SRCS-$(HAVE_AVX2) += x86/highbd_loopfilter_avx2.c DSP_SRCS-$(HAVE_AVX2) += x86/highbd_loopfilter_avx2.c
endif # CONFIG_HIGHBITDEPTH
DSP_SRCS-yes += txfm_common.h DSP_SRCS-yes += txfm_common.h
DSP_SRCS-yes += x86/txfm_common_intrin.h DSP_SRCS-yes += x86/txfm_common_intrin.h
...@@ -275,20 +269,16 @@ DSP_SRCS-$(HAVE_MSA) += mips/idct8x8_msa.c ...@@ -275,20 +269,16 @@ DSP_SRCS-$(HAVE_MSA) += mips/idct8x8_msa.c
DSP_SRCS-$(HAVE_MSA) += mips/idct16x16_msa.c DSP_SRCS-$(HAVE_MSA) += mips/idct16x16_msa.c
DSP_SRCS-$(HAVE_MSA) += mips/idct32x32_msa.c DSP_SRCS-$(HAVE_MSA) += mips/idct32x32_msa.c
ifneq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_DSPR2) += mips/inv_txfm_dspr2.h DSP_SRCS-$(HAVE_DSPR2) += mips/inv_txfm_dspr2.h
DSP_SRCS-$(HAVE_DSPR2) += mips/itrans4_dspr2.c DSP_SRCS-$(HAVE_DSPR2) += mips/itrans4_dspr2.c
DSP_SRCS-$(HAVE_DSPR2) += mips/itrans8_dspr2.c DSP_SRCS-$(HAVE_DSPR2) += mips/itrans8_dspr2.c
DSP_SRCS-$(HAVE_DSPR2) += mips/itrans16_dspr2.c DSP_SRCS-$(HAVE_DSPR2) += mips/itrans16_dspr2.c
DSP_SRCS-$(HAVE_DSPR2) += mips/itrans32_dspr2.c DSP_SRCS-$(HAVE_DSPR2) += mips/itrans32_dspr2.c
DSP_SRCS-$(HAVE_DSPR2) += mips/itrans32_cols_dspr2.c DSP_SRCS-$(HAVE_DSPR2) += mips/itrans32_cols_dspr2.c
endif # CONFIG_HIGHBITDEPTH
ifeq ($(CONFIG_LOOP_RESTORATION),yes) ifeq ($(CONFIG_LOOP_RESTORATION),yes)
DSP_SRCS-$(HAVE_SSE2) += x86/aom_convolve_hip_sse2.c DSP_SRCS-$(HAVE_SSE2) += x86/aom_convolve_hip_sse2.c
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSSE3) += x86/aom_highbd_convolve_hip_ssse3.c DSP_SRCS-$(HAVE_SSSE3) += x86/aom_highbd_convolve_hip_ssse3.c
endif
endif # CONFIG_LOOP_RESTORATION endif # CONFIG_LOOP_RESTORATION
endif # CONFIG_AV1 endif # CONFIG_AV1
...@@ -317,9 +307,7 @@ DSP_SRCS-$(HAVE_SSSE3) += x86/avg_ssse3_x86_64.asm ...@@ -317,9 +307,7 @@ DSP_SRCS-$(HAVE_SSSE3) += x86/avg_ssse3_x86_64.asm
endif endif
# high bit depth subtract # high bit depth subtract
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_subtract_sse2.c DSP_SRCS-$(HAVE_SSE2) += x86/highbd_subtract_sse2.c
endif
endif # CONFIG_AV1_ENCODER endif # CONFIG_AV1_ENCODER
...@@ -346,10 +334,7 @@ DSP_SRCS-$(HAVE_SSSE3) += x86/sad_ssse3.asm ...@@ -346,10 +334,7 @@ DSP_SRCS-$(HAVE_SSSE3) += x86/sad_ssse3.asm
DSP_SRCS-$(HAVE_SSE4_1) += x86/sad_sse4.asm DSP_SRCS-$(HAVE_SSE4_1) += x86/sad_sse4.asm
DSP_SRCS-$(HAVE_AVX2) += x86/sad4d_avx2.c DSP_SRCS-$(HAVE_AVX2) += x86/sad4d_avx2.c
DSP_SRCS-$(HAVE_AVX2) += x86/sad_avx2.c DSP_SRCS-$(HAVE_AVX2) += x86/sad_avx2.c
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_AVX2) += x86/sad_highbd_avx2.c DSP_SRCS-$(HAVE_AVX2) += x86/sad_highbd_avx2.c
endif
ifeq ($(CONFIG_AV1_ENCODER),yes) ifeq ($(CONFIG_AV1_ENCODER),yes)
DSP_SRCS-$(HAVE_SSSE3) += x86/masked_sad_intrin_ssse3.c DSP_SRCS-$(HAVE_SSSE3) += x86/masked_sad_intrin_ssse3.c
...@@ -366,11 +351,8 @@ DSP_SRCS-$(HAVE_SSE) += x86/sad_sse2.asm ...@@ -366,11 +351,8 @@ DSP_SRCS-$(HAVE_SSE) += x86/sad_sse2.asm
DSP_SRCS-$(HAVE_SSE2) += x86/sad4d_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/sad4d_sse2.asm
DSP_SRCS-$(HAVE_SSE2) += x86/sad_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/sad_sse2.asm
DSP_SRCS-$(HAVE_SSE2) += x86/subtract_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/subtract_sse2.asm
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_sad4d_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/highbd_sad4d_sse2.asm
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_sad_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/highbd_sad_sse2.asm
endif # CONFIG_HIGHBITDEPTH
endif # CONFIG_AV1_ENCODER endif # CONFIG_AV1_ENCODER
...@@ -397,13 +379,10 @@ endif # ARCH_X86_64 ...@@ -397,13 +379,10 @@ endif # ARCH_X86_64
DSP_SRCS-$(HAVE_SSE) += x86/subpel_variance_sse2.asm DSP_SRCS-$(HAVE_SSE) += x86/subpel_variance_sse2.asm
DSP_SRCS-$(HAVE_SSE2) += x86/subpel_variance_sse2.asm # Contains SSE2 and SSSE3 DSP_SRCS-$(HAVE_SSE2) += x86/subpel_variance_sse2.asm # Contains SSE2 and SSSE3
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_variance_sse2.c DSP_SRCS-$(HAVE_SSE2) += x86/highbd_variance_sse2.c
DSP_SRCS-$(HAVE_SSE4_1) += x86/highbd_variance_sse4.c DSP_SRCS-$(HAVE_SSE4_1) += x86/highbd_variance_sse4.c
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_variance_impl_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/highbd_variance_impl_sse2.asm
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_subpel_variance_impl_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/highbd_subpel_variance_impl_sse2.asm
endif # CONFIG_HIGHBITDEPTH
endif # CONFIG_AV1_ENCODER endif # CONFIG_AV1_ENCODER
DSP_SRCS-no += $(DSP_SRCS_REMOVE-yes) DSP_SRCS-no += $(DSP_SRCS_REMOVE-yes)
......
...@@ -55,19 +55,11 @@ extern "C" { ...@@ -55,19 +55,11 @@ extern "C" {
typedef uint16_t qm_val_t; typedef uint16_t qm_val_t;
#define AOM_QM_BITS 5 #define AOM_QM_BITS 5
#if CONFIG_HIGHBITDEPTH
// Note: // Note:
// tran_low_t is the datatype used for final transform coefficients. // tran_low_t is the datatype used for final transform coefficients.
// tran_high_t is the datatype used for intermediate transform stages. // tran_high_t is the datatype used for intermediate transform stages.
typedef int64_t tran_high_t; typedef int64_t tran_high_t;
typedef int32_t tran_low_t; typedef int32_t tran_low_t;
#else
// Note:
// tran_low_t is the datatype used for final transform coefficients.
// tran_high_t is the datatype used for intermediate transform stages.
typedef int32_t tran_high_t;
typedef int16_t tran_low_t;
#endif // CONFIG_HIGHBITDEPTH
static INLINE uint8_t clip_pixel(int val) { static INLINE uint8_t clip_pixel(int val) {
return (val > 255) ? 255 : (val < 0) ? 0 : val; return (val > 255) ? 255 : (val < 0) ? 0 : val;
......
This diff is collapsed.
...@@ -171,7 +171,6 @@ void aom_minmax_8x8_c(const uint8_t *src, int src_stride, const uint8_t *ref, ...@@ -171,7 +171,6 @@ void aom_minmax_8x8_c(const uint8_t *src, int src_stride, const uint8_t *ref,
} }
} }
#if CONFIG_HIGHBITDEPTH
void aom_highbd_minmax_8x8_c(const uint8_t *s8, int p, const uint8_t *d8, void aom_highbd_minmax_8x8_c(const uint8_t *s8, int p, const uint8_t *d8,
int dp, int *min, int *max) { int dp, int *min, int *max) {
int i, j; int i, j;
...@@ -187,4 +186,3 @@ void aom_highbd_minmax_8x8_c(const uint8_t *s8, int p, const uint8_t *d8, ...@@ -187,4 +186,3 @@ void aom_highbd_minmax_8x8_c(const uint8_t *s8, int p, const uint8_t *d8,
} }
} }
} }
#endif // CONFIG_HIGHBITDEPTH
...@@ -40,7 +40,6 @@ void aom_blend_a64_hmask_c(uint8_t *dst, uint32_t dst_stride, ...@@ -40,7 +40,6 @@ void aom_blend_a64_hmask_c(uint8_t *dst, uint32_t dst_stride,
} }
} }
#if CONFIG_HIGHBITDEPTH
void aom_highbd_blend_a64_hmask_c(uint8_t *dst_8, uint32_t dst_stride, void aom_highbd_blend_a64_hmask_c(uint8_t *dst_8, uint32_t dst_stride,
const uint8_t *src0_8, uint32_t src0_stride, const uint8_t *src0_8, uint32_t src0_stride,
const uint8_t *src1_8, uint32_t src1_stride, const uint8_t *src1_8, uint32_t src1_stride,
...@@ -68,4 +67,3 @@ void aom_highbd_blend_a64_hmask_c(uint8_t *dst_8, uint32_t dst_stride, ...@@ -68,4 +67,3 @@ void aom_highbd_blend_a64_hmask_c(uint8_t *dst_8, uint32_t dst_stride,
} }
} }
} }
#endif // CONFIG_HIGHBITDEPTH
...@@ -140,7 +140,6 @@ void aom_blend_a64_mask_c(uint8_t *dst, uint32_t dst_stride, ...@@ -140,7 +140,6 @@ void aom_blend_a64_mask_c(uint8_t *dst, uint32_t dst_stride,
} }
} }
#if CONFIG_HIGHBITDEPTH
void aom_highbd_blend_a64_mask_c(uint8_t *dst_8, uint32_t dst_stride, void aom_highbd_blend_a64_mask_c(uint8_t *dst_8, uint32_t dst_stride,
const uint8_t *src0_8, uint32_t src0_stride, const uint8_t *src0_8, uint32_t src0_stride,
const uint8_t *src1_8, uint32_t src1_stride, const uint8_t *src1_8, uint32_t src1_stride,
...@@ -203,4 +202,3 @@ void aom_highbd_blend_a64_mask_c(uint8_t *dst_8, uint32_t dst_stride, ...@@ -203,4 +202,3 @@ void aom_highbd_blend_a64_mask_c(uint8_t *dst_8, uint32_t dst_stride,
} }
} }
} }
#endif // CONFIG_HIGHBITDEPTH
...@@ -41,7 +41,6 @@ void aom_blend_a64_vmask_c(uint8_t *dst, uint32_t dst_stride, ...@@ -41,7 +41,6 @@ void aom_blend_a64_vmask_c(uint8_t *dst, uint32_t dst_stride,
} }
} }
#if CONFIG_HIGHBITDEPTH
void aom_highbd_blend_a64_vmask_c(uint8_t *dst_8, uint32_t dst_stride, void aom_highbd_blend_a64_vmask_c(uint8_t *dst_8, uint32_t dst_stride,
const uint8_t *src0_8, uint32_t src0_stride, const uint8_t *src0_8, uint32_t src0_stride,
const uint8_t *src1_8, uint32_t src1_stride, const uint8_t *src1_8, uint32_t src1_stride,
...@@ -70,4 +69,3 @@ void aom_highbd_blend_a64_vmask_c(uint8_t *dst_8, uint32_t dst_stride, ...@@ -70,4 +69,3 @@ void aom_highbd_blend_a64_vmask_c(uint8_t *dst_8, uint32_t dst_stride,
} }
} }
} }
#endif // CONFIG_HIGHBITDEPTH
...@@ -25,12 +25,11 @@ typedef struct fs_ctx fs_ctx; ...@@ -25,12 +25,11 @@ typedef struct fs_ctx fs_ctx;
#define SSIM_C1 (255 * 255 * 0.01 * 0.01) #define SSIM_C1 (255 * 255 * 0.01 * 0.01)
#define SSIM_C2 (255 * 255 * 0.03 * 0.03) #define SSIM_C2 (255 * 255 * 0.03 * 0.03)
#if CONFIG_HIGHBITDEPTH
#define SSIM_C1_10 (1023 * 1023 * 0.01 * 0.01) #define SSIM_C1_10 (1023 * 1023 * 0.01 * 0.01)
#define SSIM_C1_12 (4095 * 4095 * 0.01 * 0.01) #define SSIM_C1_12 (4095 * 4095 * 0.01 * 0.01)
#define SSIM_C2_10 (1023 * 1023 * 0.03 * 0.03) #define SSIM_C2_10 (1023 * 1023 * 0.03 * 0.03)
#define SSIM_C2_12 (4095 * 4095 * 0.03 * 0.03) #define SSIM_C2_12 (4095 * 4095 * 0.03 * 0.03)
#endif
#define FS_MINI(_a, _b) ((_a) < (_b) ? (_a) : (_b)) #define FS_MINI(_a, _b) ((_a) < (_b) ? (_a) : (_b))
#define FS_MAXI(_a, _b) ((_a) > (_b) ? (_a) : (_b)) #define FS_MAXI(_a, _b) ((_a) > (_b) ? (_a) : (_b))
...@@ -198,13 +197,10 @@ static void fs_apply_luminance(fs_ctx *_ctx, int _l, int bit_depth) { ...@@ -198,13 +197,10 @@ static void fs_apply_luminance(fs_ctx *_ctx, int _l, int bit_depth) {
int i; int i;
int j; int j;
double ssim_c1 = SSIM_C1; double ssim_c1 = SSIM_C1;
#if CONFIG_HIGHBITDEPTH
if (bit_depth == 10) ssim_c1 = SSIM_C1_10; if (bit_depth == 10) ssim_c1 = SSIM_C1_10;
if (bit_depth == 12) ssim_c1 = SSIM_C1_12; if (bit_depth == 12) ssim_c1 = SSIM_C1_12;
#else
assert(bit_depth == 8);
(void)bit_depth;
#endif
w = _ctx->level[_l].w; w = _ctx->level[_l].w;
h = _ctx->level[_l].h; h = _ctx->level[_l].h;
col_sums_x = _ctx->col_buf; col_sums_x = _ctx->col_buf;
...@@ -323,13 +319,8 @@ static void fs_calc_structure(fs_ctx *_ctx, int _l, int bit_depth) { ...@@ -323,13 +319,8 @@ static void fs_calc_structure(fs_ctx *_ctx, int _l, int bit_depth) {
int i; int i;
int j; int j;
double ssim_c2 = SSIM_C2; double ssim_c2 = SSIM_C2;
#if CONFIG_HIGHBITDEPTH
if (bit_depth == 10) ssim_c2 = SSIM_C2_10; if (bit_depth == 10) ssim_c2 = SSIM_C2_10;
if (bit_depth == 12) ssim_c2 = SSIM_C2_12; if (bit_depth == 12) ssim_c2 = SSIM_C2_12;
#else
assert(bit_depth == 8);
(void)bit_depth;
#endif
w = _ctx->level[_l].w; w = _ctx->level[_l].w;
h = _ctx->level[_l].h; h = _ctx->level[_l].h;
......
...@@ -740,7 +740,6 @@ void aom_fdct32x32_rd_c(const int16_t *input, tran_low_t *out, int stride) { ...@@ -740,7 +740,6 @@ void aom_fdct32x32_rd_c(const int16_t *input, tran_low_t *out, int stride) {
} }
} }
#if CONFIG_HIGHBITDEPTH
void aom_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output, void aom_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output,
int stride) { int stride) {
aom_fdct4x4_c(input, output, stride); aom_fdct4x4_c(input, output, stride);
...@@ -763,5 +762,3 @@ void aom_highbd_fdct32x32_rd_c(const int16_t *input, tran_low_t *out, ...@@ -763,5 +762,3 @@ void aom_highbd_fdct32x32_rd_c(const int16_t *input, tran_low_t *out,
int stride) { int stride) {
aom_fdct32x32_rd_c(input, out, stride); aom_fdct32x32_rd_c(input, out, stride);
} }
#endif // CONFIG_HIGHBITDEPTH
...@@ -512,7 +512,6 @@ void aom_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride, ...@@ -512,7 +512,6 @@ void aom_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride,
DST(1, 3) = AVG3(L, K, J); DST(1, 3) = AVG3(L, K, J);
} }
#if CONFIG_HIGHBITDEPTH
static INLINE void highbd_d207e_predictor(uint16_t *dst, ptrdiff_t stride, static INLINE void highbd_d207e_predictor(uint16_t *dst, ptrdiff_t stride,
int bw, int bh, const uint16_t *above, int bw, int bh, const uint16_t *above,
const uint16_t *left, int bd) { const uint16_t *left, int bd) {
...@@ -918,7 +917,6 @@ static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride, int bw, ...@@ -918,7 +917,6 @@ static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride, int bw,
dst += stride; dst += stride;
} }
} }
#endif // CONFIG_HIGHBITDEPTH
// This serves as a wrapper function, so that all the prediction functions // This serves as a wrapper function, so that all the prediction functions
// can be unified and accessed as a pointer array. Note that the boundary // can be unified and accessed as a pointer array. Note that the boundary
...@@ -930,7 +928,6 @@ static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride, int bw, ...@@ -930,7 +928,6 @@ static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride, int bw,
type##_predictor(dst, stride, width, height, above, left); \ type##_predictor(dst, stride, width, height, above, left); \
} }
#if CONFIG_HIGHBITDEPTH
#define intra_pred_highbd_sized(type, width, height) \ #define intra_pred_highbd_sized(type, width, height) \
void aom_highbd_##type##_predictor_##width##x##height##_c( \ void aom_highbd_##type##_predictor_##width##x##height##_c( \
uint16_t *dst, ptrdiff_t stride, const uint16_t *above, \ uint16_t *dst, ptrdiff_t stride, const uint16_t *above, \
...@@ -1023,59 +1020,6 @@ static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride, int bw, ...@@ -1023,59 +1020,6 @@ static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride, int bw,
intra_pred_above_4x4(type) intra_pred_above_4x4(type)
#endif // CONFIG_TX64X64 #endif // CONFIG_TX64X64
#else
#if CONFIG_TX64X64
#define intra_pred_rectangular(type) \
intra_pred_sized(type, 4, 8) \
intra_pred_sized(type, 8, 4) \
intra_pred_sized(type, 8, 16) \
intra_pred_sized(type, 16, 8) \
intra_pred_sized(type, 16, 32) \
intra_pred_sized(type, 32, 16) \
intra_pred_sized(type, 32, 64) \
intra_pred_sized(type, 64, 32) \
intra_pred_sized(type, 4, 16) \
intra_pred_sized(type, 16, 4) \
intra_pred_sized(type, 8, 32) \
intra_pred_sized(type, 32, 8) \
intra_pred_sized(type, 16, 64) \
intra_pred_sized(type, 64, 16)
#define intra_pred_above_4x4(type) \
intra_pred_sized(type, 8, 8) \
intra_pred_sized(type, 16, 16) \
intra_pred_sized(type, 32, 32) \
intra_pred_sized(type, 64, 64) \
intra_pred_rectangular(type)
#define intra_pred_allsizes(type) \
intra_pred_sized(type, 2, 2) \
intra_pred_sized(type, 4, 4) \
intra_pred_above_4x4(type)
#else // CONFIG_TX64X64
#define intra_pred_rectangular(type) \
intra_pred_sized(type, 4, 8) \
intra_pred_sized(type, 8, 4) \
intra_pred_sized(type, 8, 16) \
intra_pred_sized(type, 16, 8) \
intra_pred_sized(type, 16, 32) \
intra_pred_sized(type, 32, 16) \
intra_pred_sized(type, 4, 16) \
intra_pred_sized(type, 16, 4) \
intra_pred_sized(type, 8, 32) \
intra_pred_sized(type, 32, 8)
#define intra_pred_above_4x4(type) \
intra_pred_sized(type, 8, 8) \
intra_pred_sized(type, 16, 16) \
intra_pred_sized(type, 32, 32) \
intra_pred_rectangular(type)
#define intra_pred_allsizes(type) \
intra_pred_sized(type, 2, 2) \
intra_pred_sized(type, 4, 4) \
intra_pred_above_4x4(type)
#endif // CONFIG_TX64X64
#endif // CONFIG_HIGHBITDEPTH
intra_pred_allsizes(d207e) intra_pred_allsizes(d207e)
intra_pred_allsizes(d63e) intra_pred_allsizes(d63e)
intra_pred_above_4x4(d45e) intra_pred_above_4x4(d45e)
......
...@@ -28,7 +28,6 @@ static INLINE int8_t signed_char_clamp(int t) { ...@@ -28,7 +28,6 @@ static INLINE int8_t signed_char_clamp(int t) {
#define PARALLEL_DEBLOCKING_5_TAP_CHROMA 0 #define PARALLEL_DEBLOCKING_5_TAP_CHROMA 0
#endif #endif
#if CONFIG_HIGHBITDEPTH
static INLINE int16_t signed_char_clamp_high(int t, int bd) { static INLINE int16_t signed_char_clamp_high(int t, int bd) {
switch (bd) { switch (bd) {
case 10: return (int16_t)clamp(t, -128 * 4, 128 * 4 - 1); case 10: return (int16_t)clamp(t, -128 * 4, 128 * 4 - 1);
...@@ -37,7 +36,6 @@ static INLINE int16_t signed_char_clamp_high(int t, int bd) { ...@@ -37,7 +36,6 @@ static INLINE int16_t signed_char_clamp_high(int t, int bd) {
default: return (int16_t)clamp(t, -128, 128 - 1); default: return (int16_t)clamp(t, -128, 128 - 1);
} }
} }
#endif
#if CONFIG_PARALLEL_DEBLOCKING #if CONFIG_PARALLEL_DEBLOCKING
// should we apply any filter at all: 11111111 yes, 00000000 no // should we apply any filter at all: 11111111 yes, 00000000 no
static INLINE int8_t filter_mask2(uint8_t limit, uint8_t blimit, uint8_t p1, static INLINE int8_t filter_mask2(uint8_t limit, uint8_t blimit, uint8_t p1,
...@@ -591,7 +589,6 @@ void aom_lpf_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit, ...@@ -591,7 +589,6 @@ void aom_lpf_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit,
#endif #endif
} }
#if CONFIG_HIGHBITDEPTH
#if CONFIG_PARALLEL_DEBLOCKING #if CONFIG_PARALLEL_DEBLOCKING
// Should we apply any filter at all: 11111111 yes, 00000000 no ? // Should we apply any filter at all: 11111111 yes, 00000000 no ?
static INLINE int8_t highbd_filter_mask2(uint8_t limit, uint8_t blimit, static INLINE int8_t highbd_filter_mask2(uint8_t limit, uint8_t blimit,
...@@ -1228,4 +1225,3 @@ void aom_highbd_lpf_vertical_16_dual_c(uint16_t *s, int p, ...@@ -1228,4 +1225,3 @@ void aom_highbd_lpf_vertical_16_dual_c(uint16_t *s, int p,
highbd_mb_lpf_vertical_edge_w(s, p, blimit, limit, thresh, 16, bd); highbd_mb_lpf_vertical_edge_w(s, p, blimit, limit, thresh, 16, bd);
#endif #endif
} }
#endif // CONFIG_HIGHBITDEPTH
...@@ -48,7 +48,6 @@ static void encoder_variance(const uint8_t *a, int a_stride, const uint8_t *b, ...@@ -48,7 +48,6 @@ static void encoder_variance(const uint8_t *a, int a_stride, const uint8_t *b,
} }
} }
#if CONFIG_HIGHBITDEPTH
static void encoder_highbd_variance64(const uint8_t *a8, int a_stride, static void encoder_highbd_variance64(const uint8_t *a8, int a_stride,
const uint8_t *b8, int b_stride, int w, const uint8_t *b8, int b_stride, int w,
int h, uint64_t *sse, int64_t *sum) { int h, uint64_t *sse, int64_t *sum) {
...@@ -80,7 +79,6 @@ static void encoder_highbd_8_variance(const uint8_t *a8, int a_stride, ...@@ -80,7 +79,6 @@ static void encoder_highbd_8_variance(const uint8_t *a8, int a_stride,
*sse = (unsigned int)sse_long; *sse = (unsigned int)sse_long;
*sum = (int)sum_long; *sum = (int)sum_long;
} }
#endif // C