Remove the use of macro "CONFIG_HIGHBITDEPTH" Change-Id: I523d9a89493895eb6a7af1df30a39f36ca9f159f
diff --git a/aom_dsp/aom_convolve.c b/aom_dsp/aom_convolve.c index 0684685..c99b191 100644 --- a/aom_dsp/aom_convolve.c +++ b/aom_dsp/aom_convolve.c
@@ -548,7 +548,6 @@ filter_y, y_step_q4, w, h); } -#if CONFIG_HIGHBITDEPTH || CONFIG_LOOP_RESTORATION static INLINE int highbd_vert_scalar_product(const uint16_t *a, ptrdiff_t a_stride, const int16_t *b) { @@ -556,7 +555,6 @@ for (int k = 0; k < SUBPEL_TAPS; ++k) sum += a[k * a_stride] * b[k]; return sum; } -#endif // TODO(afergs): Make sure this works too #if CONFIG_LOOP_RESTORATION @@ -790,9 +788,6 @@ } #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, const int16_t *b) { int sum = 0; @@ -1258,6 +1253,4 @@ x0_q4, x_step_q4, filters_y, y0_q4, y_step_q4, w, h, bd); } - #endif // CONFIG_LOOP_RESTORATION -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/aom_convolve.h b/aom_dsp/aom_convolve.h index c7943dc..c81557e 100644 --- a/aom_dsp/aom_convolve.h +++ b/aom_dsp/aom_convolve.h
@@ -47,13 +47,11 @@ const int16_t *filter_y, int y_step_q4, int w, int h); -#if CONFIG_HIGHBITDEPTH typedef void (*highbd_convolve_fn_t)(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bd); -#endif #ifdef __cplusplus } // extern "C"
diff --git a/aom_dsp/aom_dsp.cmake b/aom_dsp/aom_dsp.cmake index 1f0e172..0b9926e 100644 --- a/aom_dsp/aom_dsp.cmake +++ b/aom_dsp/aom_dsp.cmake
@@ -238,7 +238,6 @@ "${AOM_ROOT}/aom_dsp/mips/loopfilter_msa.h") endif () -if (CONFIG_HIGHBITDEPTH) set(AOM_DSP_COMMON_ASM_SSE2 ${AOM_DSP_COMMON_ASM_SSE2} "${AOM_ROOT}/aom_dsp/x86/aom_high_subpixel_8t_sse2.asm" @@ -259,15 +258,6 @@ "${AOM_ROOT}/aom_dsp/x86/highbd_convolve_avx2.c" "${AOM_ROOT}/aom_dsp/x86/highbd_intrapred_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 ${AOM_DSP_COMMON_SOURCES} @@ -395,14 +385,11 @@ "${AOM_ROOT}/aom_dsp/x86/masked_sad_intrin_ssse3.c" "${AOM_ROOT}/aom_dsp/x86/masked_variance_intrin_ssse3.c") - if (CONFIG_HIGHBITDEPTH) set(AOM_DSP_ENCODER_INTRIN_SSE2 ${AOM_DSP_ENCODER_INTRIN_SSE2} "${AOM_ROOT}/aom_dsp/x86/highbd_subtract_sse2.c") - endif () endif () - if (CONFIG_HIGHBITDEPTH) set(AOM_DSP_ENCODER_ASM_SSE2 ${AOM_DSP_ENCODER_ASM_SSE2} "${AOM_ROOT}/aom_dsp/x86/highbd_sad4d_sse2.asm" @@ -421,7 +408,6 @@ set(AOM_DSP_ENCODER_INTRIN_AVX2 ${AOM_DSP_ENCODER_INTRIN_AVX2} "${AOM_ROOT}/aom_dsp/x86/sad_highbd_avx2.c") - endif () set(AOM_DSP_ENCODER_SOURCES ${AOM_DSP_ENCODER_SOURCES} @@ -445,11 +431,9 @@ ${AOM_DSP_COMMON_INTRIN_SSE2} "${AOM_ROOT}/aom_dsp/x86/aom_convolve_hip_sse2.c") - if (CONFIG_HIGHBITDEPTH) set(AOM_DSP_COMMON_INTRIN_SSSE3 ${AOM_DSP_COMMON_INTRIN_SSSE3} "${AOM_ROOT}/aom_dsp/x86/aom_highbd_convolve_hip_ssse3.c") - endif () endif () set(AOM_DSP_ENCODER_INTRIN_SSE4_1
diff --git a/aom_dsp/aom_dsp.mk b/aom_dsp/aom_dsp.mk index a501a3a..09d9a8c 100644 --- a/aom_dsp/aom_dsp.mk +++ b/aom_dsp/aom_dsp.mk
@@ -67,13 +67,11 @@ DSP_SRCS-$(HAVE_SSSE3) += x86/intrapred_ssse3.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_SSE2) += x86/highbd_intrapred_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/highbd_intrapred_sse2.c DSP_SRCS-$(HAVE_SSSE3) += x86/highbd_intrapred_ssse3.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) += arm/intrapred_neon.c @@ -112,11 +110,9 @@ DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_bilinear_ssse3.asm DSP_SRCS-$(HAVE_AVX2) += x86/aom_subpixel_8t_intrin_avx2.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_bilinear_sse2.asm DSP_SRCS-$(HAVE_AVX2) += x86/highbd_convolve_avx2.c -endif DSP_SRCS-$(HAVE_SSE2) += x86/aom_convolve_copy_sse2.asm ifneq ($(CONFIG_EXT_PARTITION),yes) @@ -197,10 +193,8 @@ DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_mb_vert_dspr2.c endif # !CONFIG_PARALLEL_DEBLOCKING -ifeq ($(CONFIG_HIGHBITDEPTH),yes) DSP_SRCS-$(HAVE_SSE2) += x86/highbd_loopfilter_sse2.c DSP_SRCS-$(HAVE_AVX2) += x86/highbd_loopfilter_avx2.c -endif # CONFIG_HIGHBITDEPTH DSP_SRCS-yes += txfm_common.h DSP_SRCS-yes += x86/txfm_common_intrin.h @@ -275,20 +269,16 @@ DSP_SRCS-$(HAVE_MSA) += mips/idct16x16_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/itrans4_dspr2.c DSP_SRCS-$(HAVE_DSPR2) += mips/itrans8_dspr2.c DSP_SRCS-$(HAVE_DSPR2) += mips/itrans16_dspr2.c DSP_SRCS-$(HAVE_DSPR2) += mips/itrans32_dspr2.c DSP_SRCS-$(HAVE_DSPR2) += mips/itrans32_cols_dspr2.c -endif # CONFIG_HIGHBITDEPTH ifeq ($(CONFIG_LOOP_RESTORATION),yes) 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 -endif endif # CONFIG_LOOP_RESTORATION endif # CONFIG_AV1 @@ -317,9 +307,7 @@ endif # high bit depth subtract -ifeq ($(CONFIG_HIGHBITDEPTH),yes) DSP_SRCS-$(HAVE_SSE2) += x86/highbd_subtract_sse2.c -endif endif # CONFIG_AV1_ENCODER @@ -346,10 +334,7 @@ DSP_SRCS-$(HAVE_SSE4_1) += x86/sad_sse4.asm DSP_SRCS-$(HAVE_AVX2) += x86/sad4d_avx2.c DSP_SRCS-$(HAVE_AVX2) += x86/sad_avx2.c - -ifeq ($(CONFIG_HIGHBITDEPTH),yes) DSP_SRCS-$(HAVE_AVX2) += x86/sad_highbd_avx2.c -endif ifeq ($(CONFIG_AV1_ENCODER),yes) DSP_SRCS-$(HAVE_SSSE3) += x86/masked_sad_intrin_ssse3.c @@ -366,11 +351,8 @@ DSP_SRCS-$(HAVE_SSE2) += x86/sad4d_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/sad_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_sad_sse2.asm -endif # CONFIG_HIGHBITDEPTH endif # CONFIG_AV1_ENCODER @@ -397,13 +379,10 @@ DSP_SRCS-$(HAVE_SSE) += x86/subpel_variance_sse2.asm 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_SSE4_1) += x86/highbd_variance_sse4.c DSP_SRCS-$(HAVE_SSE2) += x86/highbd_variance_impl_sse2.asm DSP_SRCS-$(HAVE_SSE2) += x86/highbd_subpel_variance_impl_sse2.asm -endif # CONFIG_HIGHBITDEPTH endif # CONFIG_AV1_ENCODER DSP_SRCS-no += $(DSP_SRCS_REMOVE-yes)
diff --git a/aom_dsp/aom_dsp_common.h b/aom_dsp/aom_dsp_common.h index 3d3bcba..38d62e5 100644 --- a/aom_dsp/aom_dsp_common.h +++ b/aom_dsp/aom_dsp_common.h
@@ -55,19 +55,11 @@ typedef uint16_t qm_val_t; #define AOM_QM_BITS 5 -#if CONFIG_HIGHBITDEPTH // Note: // tran_low_t is the datatype used for final transform coefficients. // tran_high_t is the datatype used for intermediate transform stages. typedef int64_t tran_high_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) { return (val > 255) ? 255 : (val < 0) ? 0 : val;
diff --git a/aom_dsp/aom_dsp_rtcd_defs.pl b/aom_dsp/aom_dsp_rtcd_defs.pl index cf334b8..f6ec89d 100755 --- a/aom_dsp/aom_dsp_rtcd_defs.pl +++ b/aom_dsp/aom_dsp_rtcd_defs.pl
@@ -89,10 +89,8 @@ foreach $pred_name (@pred_names) { add_proto "void", "aom_${pred_name}_predictor_${w}x${h}", "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"; - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { - add_proto "void", "aom_highbd_${pred_name}_predictor_${w}x${h}", - "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; - } + add_proto "void", "aom_highbd_${pred_name}_predictor_${w}x${h}", + "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd"; } } @@ -221,7 +219,6 @@ specialize qw/aom_d45e_predictor_32x16 ssse3/; specialize qw/aom_d45e_predictor_32x32 ssse3/; -if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { specialize qw/aom_highbd_v_predictor_4x4 sse2/; specialize qw/aom_highbd_v_predictor_4x8 sse2/; specialize qw/aom_highbd_v_predictor_8x4 sse2/; @@ -282,7 +279,7 @@ specialize qw/aom_highbd_dc_left_predictor_32x32 sse2/; specialize qw/aom_highbd_dc_top_predictor_32x32 sse2/; specialize qw/aom_highbd_dc_128_predictor_32x32 sse2/; - + specialize qw/aom_highbd_d117_predictor_4x4 sse2/; specialize qw/aom_highbd_d117_predictor_8x8 ssse3/; specialize qw/aom_highbd_d117_predictor_16x16 ssse3/; @@ -328,7 +325,6 @@ specialize qw/aom_highbd_d63e_predictor_16x32 avx2/; specialize qw/aom_highbd_d63e_predictor_32x16 avx2/; specialize qw/aom_highbd_d63e_predictor_32x32 avx2/; -} # CONFIG_HIGHBITDEPTH # # Sub Pixel Filters @@ -391,39 +387,37 @@ specialize qw/aom_convolve8_avg_vert neon dspr2 msa/; } -if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { - add_proto qw/void aom_highbd_convolve_copy/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/aom_highbd_convolve_copy sse2 avx2/; +add_proto qw/void aom_highbd_convolve_copy/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; +specialize qw/aom_highbd_convolve_copy sse2 avx2/; - add_proto qw/void aom_highbd_convolve_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/aom_highbd_convolve_avg sse2 avx2/; +add_proto qw/void aom_highbd_convolve_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; +specialize qw/aom_highbd_convolve_avg sse2 avx2/; - add_proto qw/void aom_highbd_convolve8/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/aom_highbd_convolve8 avx2/, "$sse2_x86_64"; +add_proto qw/void aom_highbd_convolve8/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; +specialize qw/aom_highbd_convolve8 avx2/, "$sse2_x86_64"; - add_proto qw/void aom_highbd_convolve8_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/aom_highbd_convolve8_horiz avx2/, "$sse2_x86_64"; +add_proto qw/void aom_highbd_convolve8_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; +specialize qw/aom_highbd_convolve8_horiz avx2/, "$sse2_x86_64"; - add_proto qw/void aom_highbd_convolve8_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/aom_highbd_convolve8_vert avx2/, "$sse2_x86_64"; +add_proto qw/void aom_highbd_convolve8_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; +specialize qw/aom_highbd_convolve8_vert avx2/, "$sse2_x86_64"; - add_proto qw/void aom_highbd_convolve8_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/aom_highbd_convolve8_avg avx2/, "$sse2_x86_64"; +add_proto qw/void aom_highbd_convolve8_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; +specialize qw/aom_highbd_convolve8_avg avx2/, "$sse2_x86_64"; - add_proto qw/void aom_highbd_convolve8_avg_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/aom_highbd_convolve8_avg_horiz avx2/, "$sse2_x86_64"; +add_proto qw/void aom_highbd_convolve8_avg_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; +specialize qw/aom_highbd_convolve8_avg_horiz avx2/, "$sse2_x86_64"; - add_proto qw/void aom_highbd_convolve8_avg_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/aom_highbd_convolve8_avg_vert avx2/, "$sse2_x86_64"; +add_proto qw/void aom_highbd_convolve8_avg_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; +specialize qw/aom_highbd_convolve8_avg_vert avx2/, "$sse2_x86_64"; - if (aom_config("CONFIG_LOOP_RESTORATION") eq "yes") { - add_proto qw/void aom_highbd_convolve8_add_src/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - add_proto qw/void aom_highbd_convolve8_add_src_hip/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; +if (aom_config("CONFIG_LOOP_RESTORATION") eq "yes") { + add_proto qw/void aom_highbd_convolve8_add_src/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; + add_proto qw/void aom_highbd_convolve8_add_src_hip/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps"; - specialize qw/aom_highbd_convolve8_add_src/, "$sse2_x86_64"; - specialize qw/aom_highbd_convolve8_add_src_hip ssse3/; - } # CONFIG_LOOP_RESTORATION -} # CONFIG_HIGHBITDEPTH + specialize qw/aom_highbd_convolve8_add_src/, "$sse2_x86_64"; + specialize qw/aom_highbd_convolve8_add_src_hip ssse3/; +} # CONFIG_LOOP_RESTORATION # # Loopfilter @@ -508,7 +502,6 @@ specialize qw/aom_lpf_horizontal_4_dual sse2 neon dspr2 msa/; } -if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { add_proto qw/void aom_highbd_lpf_vertical_16/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd"; specialize qw/aom_highbd_lpf_vertical_16 sse2/; @@ -544,7 +537,6 @@ add_proto qw/void aom_highbd_lpf_horizontal_4_dual/, "uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd"; specialize qw/aom_highbd_lpf_horizontal_4_dual sse2 avx2/; -} # CONFIG_HIGHBITDEPTH # Helper functions. add_proto qw/void av1_round_shift_array/, "int32_t *arr, int size, int bit"; @@ -558,7 +550,6 @@ # Forward transform # if (aom_config("CONFIG_AV1_ENCODER") eq "yes"){ - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { add_proto qw/void aom_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride"; specialize qw/aom_fdct4x4 sse2/; @@ -593,25 +584,6 @@ add_proto qw/void aom_highbd_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride"; specialize qw/aom_highbd_fdct32x32_rd sse2/; - } else { - add_proto qw/void aom_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/aom_fdct4x4 sse2 msa/; - - add_proto qw/void aom_fdct4x4_1/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/aom_fdct4x4_1 sse2/; - - add_proto qw/void aom_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/aom_fdct8x8 sse2 neon msa/, "$ssse3_x86_64"; - - add_proto qw/void aom_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/aom_fdct16x16 sse2 msa/; - - add_proto qw/void aom_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/aom_fdct32x32 sse2 avx2 msa/; - - add_proto qw/void aom_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride"; - specialize qw/aom_fdct32x32_rd sse2 avx2 msa/; - } # CONFIG_HIGHBITDEPTH } # CONFIG_AV1_ENCODER # @@ -666,60 +638,6 @@ add_proto qw/void aom_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; specialize qw/aom_idct32x32_1_add sse2 avx2/; - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { - } else { - add_proto qw/void aom_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_idct4x4_1_add sse2 neon dspr2 msa/; - - add_proto qw/void aom_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_idct4x4_16_add sse2 neon dspr2 msa/; - - add_proto qw/void aom_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_idct8x8_1_add sse2 neon dspr2 msa/; - - add_proto qw/void aom_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_idct8x8_64_add sse2 ssse3 neon dspr2 msa/; - - add_proto qw/void aom_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_idct8x8_12_add sse2 ssse3 neon dspr2 msa/; - - add_proto qw/void aom_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_idct16x16_1_add sse2 avx2 neon dspr2 msa/; - - add_proto qw/void aom_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_idct16x16_256_add sse2 avx2 neon dspr2 msa/; - - add_proto qw/void aom_idct16x16_38_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_idct16x16_38_add avx2/; - - add_proto qw/void aom_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_idct16x16_10_add sse2 avx2 neon dspr2 msa/; - - add_proto qw/void aom_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_idct32x32_1024_add sse2 ssse3 avx2 neon dspr2 msa/; - - add_proto qw/void aom_idct32x32_135_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_idct32x32_135_add sse2 ssse3 avx2 neon dspr2 msa/; - # Need to add 135 eob idct32x32 implementations. - $aom_idct32x32_135_add_sse2=aom_idct32x32_1024_add_sse2; - $aom_idct32x32_135_add_neon=aom_idct32x32_1024_add_neon; - $aom_idct32x32_135_add_dspr2=aom_idct32x32_1024_add_dspr2; - $aom_idct32x32_135_add_msa=aom_idct32x32_1024_add_msa; - - add_proto qw/void aom_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_idct32x32_34_add sse2 ssse3 avx2 neon dspr2 msa/; - # Need to add 34 eob idct32x32 neon implementation. - $aom_idct32x32_34_add_neon=aom_idct32x32_1024_add_neon; - - add_proto qw/void aom_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_idct32x32_1_add sse2 avx2 neon dspr2 msa/; - - add_proto qw/void aom_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_iwht4x4_1_add msa/; - - add_proto qw/void aom_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride"; - specialize qw/aom_iwht4x4_16_add msa sse2/; - } # CONFIG_HIGHBITDEPTH } # CONFIG_AV1 # @@ -757,14 +675,13 @@ specialize "aom_blend_a64_hmask", qw/sse4_1/; specialize "aom_blend_a64_vmask", qw/sse4_1/; - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { add_proto qw/void aom_highbd_blend_a64_mask/, "uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, uint32_t mask_stride, int h, int w, int suby, int subx, int bd"; add_proto qw/void aom_highbd_blend_a64_hmask/, "uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int h, int w, int bd"; add_proto qw/void aom_highbd_blend_a64_vmask/, "uint8_t *dst, uint32_t dst_stride, const uint8_t *src0, uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride, const uint8_t *mask, int h, int w, int bd"; specialize "aom_highbd_blend_a64_mask", qw/sse4_1/; specialize "aom_highbd_blend_a64_hmask", qw/sse4_1/; specialize "aom_highbd_blend_a64_vmask", qw/sse4_1/; - } + } # CONFIG_AV1 if (aom_config("CONFIG_AV1_ENCODER") eq "yes") { @@ -794,19 +711,15 @@ # Avg # specialize qw/aom_avg_8x8 sse2 neon msa/; - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { add_proto qw/void aom_highbd_subtract_block/, "int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride, int bd"; specialize qw/aom_highbd_subtract_block sse2/; - } # # Minmax # add_proto qw/void aom_minmax_8x8/, "const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max"; specialize qw/aom_minmax_8x8 sse2 neon/; - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { add_proto qw/void aom_highbd_minmax_8x8/, "const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max"; - } add_proto qw/void aom_hadamard_8x8/, "const int16_t *src_diff, int src_stride, int16_t *coeff"; specialize qw/aom_hadamard_8x8 sse2 neon/, "$ssse3_x86_64"; @@ -917,7 +830,7 @@ specialize qw/aom_sad128xh sse2/; } - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { + foreach (@block_sizes) { ($w, $h) = @$_; add_proto qw/unsigned int/, "aom_highbd_sad${w}x${h}", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride"; @@ -953,7 +866,6 @@ specialize qw/aom_highbd_sad16x32_avg avx2/; specialize qw/aom_highbd_sad16x16_avg avx2/; specialize qw/aom_highbd_sad16x8_avg avx2/; - } # # Masked SAD @@ -964,13 +876,13 @@ specialize "aom_masked_sad${w}x${h}", qw/ssse3/; } - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { + foreach (@block_sizes) { ($w, $h) = @$_; add_proto qw/unsigned int/, "aom_highbd_masked_sad${w}x${h}", "const uint8_t *src8, int src_stride, const uint8_t *ref8, int ref_stride, const uint8_t *second_pred8, const uint8_t *msk, int msk_stride, int invert_mask"; specialize "aom_highbd_masked_sad${w}x${h}", qw/ssse3/; } - } + # # OBMC SAD @@ -983,7 +895,7 @@ } } - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { + foreach (@block_sizes) { ($w, $h) = @$_; add_proto qw/unsigned int/, "aom_highbd_obmc_sad${w}x${h}", "const uint8_t *pre, int pre_stride, const int32_t *wsrc, const int32_t *mask"; @@ -991,7 +903,7 @@ specialize "aom_highbd_obmc_sad${w}x${h}", qw/sse4_1/; } } - } + # # Multi-block SAD, comparing a reference to N blocks 1 pixel apart horizontally @@ -1030,22 +942,22 @@ add_proto qw/void/, "aom_sad4x8x8", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; specialize qw/aom_sad4x8x8 msa/; - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { - foreach $s (@block_widths) { - # Blocks of 3 - add_proto qw/void/, "aom_highbd_sad${s}x${s}x3", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - # Blocks of 8 - add_proto qw/void/, "aom_highbd_sad${s}x${s}x8", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - } + + foreach $s (@block_widths) { # Blocks of 3 - add_proto qw/void/, "aom_highbd_sad16x8x3", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - add_proto qw/void/, "aom_highbd_sad8x16x3", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + add_proto qw/void/, "aom_highbd_sad${s}x${s}x3", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; # Blocks of 8 - add_proto qw/void/, "aom_highbd_sad16x8x8", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - add_proto qw/void/, "aom_highbd_sad8x16x8", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - add_proto qw/void/, "aom_highbd_sad8x4x8", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; - add_proto qw/void/, "aom_highbd_sad4x8x8", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + add_proto qw/void/, "aom_highbd_sad${s}x${s}x8", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; } + # Blocks of 3 + add_proto qw/void/, "aom_highbd_sad16x8x3", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + add_proto qw/void/, "aom_highbd_sad8x16x3", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + # Blocks of 8 + add_proto qw/void/, "aom_highbd_sad16x8x8", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + add_proto qw/void/, "aom_highbd_sad8x16x8", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + add_proto qw/void/, "aom_highbd_sad8x4x8", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + add_proto qw/void/, "aom_highbd_sad4x8x8", "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array"; + # # Multi-block SAD, comparing a reference to N independent blocks @@ -1072,7 +984,6 @@ specialize qw/aom_sad4x8x4d msa sse2/; specialize qw/aom_sad4x4x4d msa sse2/; - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { # # Multi-block SAD, comparing a reference to N independent blocks # @@ -1094,7 +1005,7 @@ specialize qw/aom_highbd_sad16x32x4d avx2/; specialize qw/aom_highbd_sad16x16x4d avx2/; specialize qw/aom_highbd_sad16x8x4d avx2/; - } + # # Structured Similarity (SSIM) @@ -1106,9 +1017,8 @@ add_proto qw/void aom_ssim_parms_16x16/, "const uint8_t *s, int sp, const uint8_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr"; specialize qw/aom_ssim_parms_16x16/, "$sse2_x86_64"; - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { - add_proto qw/void aom_highbd_ssim_parms_8x8/, "const uint16_t *s, int sp, const uint16_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr"; - } + add_proto qw/void aom_highbd_ssim_parms_8x8/, "const uint16_t *s, int sp, const uint16_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr"; + } } # CONFIG_AV1_ENCODER @@ -1135,7 +1045,6 @@ specialize qw/aom_mse8x16 sse2 msa/; specialize qw/aom_mse8x8 sse2 msa/; - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { foreach $bd (8, 10, 12) { add_proto qw/void/, "aom_highbd_${bd}_get16x16var", "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; add_proto qw/void/, "aom_highbd_${bd}_get8x8var", "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum"; @@ -1148,10 +1057,10 @@ specialize "aom_highbd_${bd}_mse16x16", qw/sse2/; specialize "aom_highbd_${bd}_mse8x8", qw/sse2/; } - } + # - # ... + # # add_proto qw/void aom_upsampled_pred/, "uint8_t *comp_pred, int width, int height, int subsample_x_q3, int subsample_y_q3, const uint8_t *ref, int ref_stride"; specialize qw/aom_upsampled_pred sse2/; @@ -1164,20 +1073,20 @@ specialize qw/aom_jnt_comp_avg_upsampled_pred ssse3/; } - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { - add_proto qw/void aom_highbd_upsampled_pred/, "uint16_t *comp_pred, int width, int height, int subsample_x_q3, int subsample_y_q3, const uint8_t *ref8, int ref_stride, int bd"; - specialize qw/aom_highbd_upsampled_pred sse2/; - add_proto qw/void aom_highbd_comp_avg_upsampled_pred/, "uint16_t *comp_pred, const uint8_t *pred8, int width, int height, int subsample_x_q3, int subsample_y_q3, const uint8_t *ref8, int ref_stride, int bd"; - specialize qw/aom_highbd_comp_avg_upsampled_pred sse2/; - if (aom_config("CONFIG_JNT_COMP") eq "yes") { - add_proto qw/void aom_highbd_jnt_comp_avg_upsampled_pred/, "uint16_t *comp_pred, const uint8_t *pred8, int width, int height, int subsample_x_q3, int subsample_y_q3, const uint8_t *ref8, int ref_stride, int bd, const JNT_COMP_PARAMS *jcp_param"; - specialize qw/aom_highbd_jnt_comp_avg_upsampled_pred sse2/; - } + add_proto qw/void aom_highbd_upsampled_pred/, "uint16_t *comp_pred, int width, int height, int subsample_x_q3, int subsample_y_q3, const uint8_t *ref8, int ref_stride, int bd"; + specialize qw/aom_highbd_upsampled_pred sse2/; + add_proto qw/void aom_highbd_comp_avg_upsampled_pred/, "uint16_t *comp_pred, const uint8_t *pred8, int width, int height, int subsample_x_q3, int subsample_y_q3, const uint8_t *ref8, int ref_stride, int bd"; + specialize qw/aom_highbd_comp_avg_upsampled_pred sse2/; + + if (aom_config("CONFIG_JNT_COMP") eq "yes") { + add_proto qw/void aom_highbd_jnt_comp_avg_upsampled_pred/, "uint16_t *comp_pred, const uint8_t *pred8, int width, int height, int subsample_x_q3, int subsample_y_q3, const uint8_t *ref8, int ref_stride, int bd, const JNT_COMP_PARAMS *jcp_param"; + specialize qw/aom_highbd_jnt_comp_avg_upsampled_pred sse2/; } + # - # ... + # # add_proto qw/unsigned int aom_get_mb_ss/, "const int16_t *"; add_proto qw/unsigned int aom_get4x4sse_cs/, "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride"; @@ -1303,42 +1212,41 @@ } } - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { - foreach $bd (8, 10, 12) { - add_proto qw/unsigned int/, "aom_highbd_${bd}_variance2x2", "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - add_proto qw/unsigned int/, "aom_highbd_${bd}_variance2x4", "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + foreach $bd (8, 10, 12) { + add_proto qw/unsigned int/, "aom_highbd_${bd}_variance2x2", "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - add_proto qw/unsigned int/, "aom_highbd_${bd}_variance4x2", "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + add_proto qw/unsigned int/, "aom_highbd_${bd}_variance2x4", "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; - foreach (@block_sizes) { - ($w, $h) = @$_; - add_proto qw/unsigned int/, "aom_highbd_${bd}_variance${w}x${h}", "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - add_proto qw/uint32_t/, "aom_highbd_${bd}_sub_pixel_variance${w}x${h}", "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; - add_proto qw/uint32_t/, "aom_highbd_${bd}_sub_pixel_avg_variance${w}x${h}", "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - if ($w != 128 && $h != 128 && $w != 4 && $h != 4) { - specialize "aom_highbd_${bd}_variance${w}x${h}", "sse2"; - } - # TODO(david.barker): When ext-partition-types is enabled, we currently - # don't have vectorized 4x16 highbd variance functions - if ($w == 4 && $h == 4) { + add_proto qw/unsigned int/, "aom_highbd_${bd}_variance4x2", "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; + + foreach (@block_sizes) { + ($w, $h) = @$_; + add_proto qw/unsigned int/, "aom_highbd_${bd}_variance${w}x${h}", "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + add_proto qw/uint32_t/, "aom_highbd_${bd}_sub_pixel_variance${w}x${h}", "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse"; + add_proto qw/uint32_t/, "aom_highbd_${bd}_sub_pixel_avg_variance${w}x${h}", "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; + if ($w != 128 && $h != 128 && $w != 4 && $h != 4) { + specialize "aom_highbd_${bd}_variance${w}x${h}", "sse2"; + } + # TODO(david.barker): When ext-partition-types is enabled, we currently + # don't have vectorized 4x16 highbd variance functions + if ($w == 4 && $h == 4) { specialize "aom_highbd_${bd}_variance${w}x${h}", "sse4_1"; } - if ($w != 128 && $h != 128 && $w != 4) { - specialize "aom_highbd_${bd}_sub_pixel_variance${w}x${h}", qw/sse2/; - specialize "aom_highbd_${bd}_sub_pixel_avg_variance${w}x${h}", qw/sse2/; - } - if ($w == 4 && $h == 4) { - specialize "aom_highbd_${bd}_sub_pixel_variance${w}x${h}", "sse4_1"; - specialize "aom_highbd_${bd}_sub_pixel_avg_variance${w}x${h}", "sse4_1"; - } + if ($w != 128 && $h != 128 && $w != 4) { + specialize "aom_highbd_${bd}_sub_pixel_variance${w}x${h}", qw/sse2/; + specialize "aom_highbd_${bd}_sub_pixel_avg_variance${w}x${h}", qw/sse2/; + } + if ($w == 4 && $h == 4) { + specialize "aom_highbd_${bd}_sub_pixel_variance${w}x${h}", "sse4_1"; + specialize "aom_highbd_${bd}_sub_pixel_avg_variance${w}x${h}", "sse4_1"; + } - if (aom_config("CONFIG_JNT_COMP") eq "yes") { - add_proto qw/uint32_t/, "aom_highbd_${bd}_jnt_sub_pixel_avg_variance${w}x${h}", "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const JNT_COMP_PARAMS* jcp_param"; - } + if (aom_config("CONFIG_JNT_COMP") eq "yes") { + add_proto qw/uint32_t/, "aom_highbd_${bd}_jnt_sub_pixel_avg_variance${w}x${h}", "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred, const JNT_COMP_PARAMS* jcp_param"; } } - } # CONFIG_HIGHBITDEPTH + } # # Masked Variance / Masked Subpixel Variance @@ -1349,7 +1257,7 @@ specialize "aom_masked_sub_pixel_variance${w}x${h}", qw/ssse3/; } - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { + foreach $bd ("_8_", "_10_", "_12_") { foreach (@block_sizes) { ($w, $h) = @$_; @@ -1357,7 +1265,7 @@ specialize "aom_highbd${bd}masked_sub_pixel_variance${w}x${h}", qw/ssse3/; } } - } + # # OBMC Variance / OBMC Subpixel Variance @@ -1369,7 +1277,7 @@ specialize "aom_obmc_variance${w}x${h}", q/sse4_1/; } - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { + foreach $bd ("_", "_10_", "_12_") { foreach (@block_sizes) { ($w, $h) = @$_; @@ -1378,7 +1286,7 @@ specialize "aom_highbd${bd}obmc_variance${w}x${h}", qw/sse4_1/; } } - } + add_proto qw/uint32_t aom_sub_pixel_avg_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; specialize qw/aom_sub_pixel_avg_variance64x64 avx2 msa sse2 ssse3/; @@ -1438,7 +1346,7 @@ add_proto qw/void aom_jnt_comp_avg_pred/, "uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride, const JNT_COMP_PARAMS *jcp_param"; specialize qw/aom_jnt_comp_avg_pred ssse3/; } - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { + add_proto qw/unsigned int aom_highbd_12_variance64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse"; specialize qw/aom_highbd_12_variance64x64 sse2/; @@ -1800,14 +1708,14 @@ add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; add_proto qw/uint32_t aom_highbd_8_sub_pixel_avg_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, uint32_t *sse, const uint8_t *second_pred"; - } # CONFIG_HIGHBITDEPTH + add_proto qw/void aom_comp_mask_pred/, "uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride, const uint8_t *mask, int mask_stride, int invert_mask"; add_proto qw/void aom_comp_mask_upsampled_pred/, "uint8_t *comp_pred, const uint8_t *pred, int width, int height, int subsample_x_q3, int subsample_y_q3, const uint8_t *ref, int ref_stride, const uint8_t *mask, int mask_stride, int invert_mask"; - if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") { - add_proto qw/void aom_highbd_comp_mask_pred/, "uint16_t *comp_pred, const uint8_t *pred8, int width, int height, const uint8_t *ref8, int ref_stride, const uint8_t *mask, int mask_stride, int invert_mask"; - add_proto qw/void aom_highbd_comp_mask_upsampled_pred/, "uint16_t *comp_pred, const uint8_t *pred8, int width, int height, int subsample_x_q3, int subsample_y_q3, const uint8_t *ref8, int ref_stride, const uint8_t *mask, int mask_stride, int invert_mask, int bd"; - } + + add_proto qw/void aom_highbd_comp_mask_pred/, "uint16_t *comp_pred, const uint8_t *pred8, int width, int height, const uint8_t *ref8, int ref_stride, const uint8_t *mask, int mask_stride, int invert_mask"; + add_proto qw/void aom_highbd_comp_mask_upsampled_pred/, "uint16_t *comp_pred, const uint8_t *pred8, int width, int height, int subsample_x_q3, int subsample_y_q3, const uint8_t *ref8, int ref_stride, const uint8_t *mask, int mask_stride, int invert_mask, int bd"; + } # CONFIG_AV1_ENCODER
diff --git a/aom_dsp/avg.c b/aom_dsp/avg.c index f732224..b760582 100644 --- a/aom_dsp/avg.c +++ b/aom_dsp/avg.c
@@ -171,7 +171,6 @@ } } -#if CONFIG_HIGHBITDEPTH void aom_highbd_minmax_8x8_c(const uint8_t *s8, int p, const uint8_t *d8, int dp, int *min, int *max) { int i, j; @@ -187,4 +186,3 @@ } } } -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/blend_a64_hmask.c b/aom_dsp/blend_a64_hmask.c index 99b4b8a..c8dc283 100644 --- a/aom_dsp/blend_a64_hmask.c +++ b/aom_dsp/blend_a64_hmask.c
@@ -40,7 +40,6 @@ } } -#if CONFIG_HIGHBITDEPTH 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 *src1_8, uint32_t src1_stride, @@ -68,4 +67,3 @@ } } } -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/blend_a64_mask.c b/aom_dsp/blend_a64_mask.c index 384e81b..0ada244 100644 --- a/aom_dsp/blend_a64_mask.c +++ b/aom_dsp/blend_a64_mask.c
@@ -140,7 +140,6 @@ } } -#if CONFIG_HIGHBITDEPTH 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 *src1_8, uint32_t src1_stride, @@ -203,4 +202,3 @@ } } } -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/blend_a64_vmask.c b/aom_dsp/blend_a64_vmask.c index 1a5e30e..cdb1df0 100644 --- a/aom_dsp/blend_a64_vmask.c +++ b/aom_dsp/blend_a64_vmask.c
@@ -41,7 +41,6 @@ } } -#if CONFIG_HIGHBITDEPTH 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 *src1_8, uint32_t src1_stride, @@ -70,4 +69,3 @@ } } } -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/fastssim.c b/aom_dsp/fastssim.c index 09d945a..1d681fc 100644 --- a/aom_dsp/fastssim.c +++ b/aom_dsp/fastssim.c
@@ -25,12 +25,11 @@ #define SSIM_C1 (255 * 255 * 0.01 * 0.01) #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_12 (4095 * 4095 * 0.01 * 0.01) #define SSIM_C2_10 (1023 * 1023 * 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_MAXI(_a, _b) ((_a) > (_b) ? (_a) : (_b)) @@ -198,13 +197,10 @@ int i; int j; double ssim_c1 = SSIM_C1; -#if CONFIG_HIGHBITDEPTH + if (bit_depth == 10) ssim_c1 = SSIM_C1_10; if (bit_depth == 12) ssim_c1 = SSIM_C1_12; -#else - assert(bit_depth == 8); - (void)bit_depth; -#endif + w = _ctx->level[_l].w; h = _ctx->level[_l].h; col_sums_x = _ctx->col_buf; @@ -323,13 +319,8 @@ int i; int j; double ssim_c2 = SSIM_C2; -#if CONFIG_HIGHBITDEPTH if (bit_depth == 10) ssim_c2 = SSIM_C2_10; if (bit_depth == 12) ssim_c2 = SSIM_C2_12; -#else - assert(bit_depth == 8); - (void)bit_depth; -#endif w = _ctx->level[_l].w; h = _ctx->level[_l].h;
diff --git a/aom_dsp/fwd_txfm.c b/aom_dsp/fwd_txfm.c index 1ceef77..935bd07 100644 --- a/aom_dsp/fwd_txfm.c +++ b/aom_dsp/fwd_txfm.c
@@ -740,7 +740,6 @@ } } -#if CONFIG_HIGHBITDEPTH void aom_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride) { aom_fdct4x4_c(input, output, stride); @@ -763,5 +762,3 @@ int stride) { aom_fdct32x32_rd_c(input, out, stride); } - -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/intrapred.c b/aom_dsp/intrapred.c index ff58f07..27c178f 100644 --- a/aom_dsp/intrapred.c +++ b/aom_dsp/intrapred.c
@@ -512,7 +512,6 @@ DST(1, 3) = AVG3(L, K, J); } -#if CONFIG_HIGHBITDEPTH static INLINE void highbd_d207e_predictor(uint16_t *dst, ptrdiff_t stride, int bw, int bh, const uint16_t *above, const uint16_t *left, int bd) { @@ -918,7 +917,6 @@ dst += stride; } } -#endif // CONFIG_HIGHBITDEPTH // 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 @@ -930,7 +928,6 @@ type##_predictor(dst, stride, width, height, above, left); \ } -#if CONFIG_HIGHBITDEPTH #define intra_pred_highbd_sized(type, width, height) \ void aom_highbd_##type##_predictor_##width##x##height##_c( \ uint16_t *dst, ptrdiff_t stride, const uint16_t *above, \ @@ -1023,59 +1020,6 @@ intra_pred_above_4x4(type) #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(d63e) intra_pred_above_4x4(d45e)
diff --git a/aom_dsp/loopfilter.c b/aom_dsp/loopfilter.c index 9cde664..be4bd9b 100644 --- a/aom_dsp/loopfilter.c +++ b/aom_dsp/loopfilter.c
@@ -28,7 +28,6 @@ #define PARALLEL_DEBLOCKING_5_TAP_CHROMA 0 #endif -#if CONFIG_HIGHBITDEPTH static INLINE int16_t signed_char_clamp_high(int t, int bd) { switch (bd) { case 10: return (int16_t)clamp(t, -128 * 4, 128 * 4 - 1); @@ -37,7 +36,6 @@ default: return (int16_t)clamp(t, -128, 128 - 1); } } -#endif #if CONFIG_PARALLEL_DEBLOCKING // 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, @@ -591,7 +589,6 @@ #endif } -#if CONFIG_HIGHBITDEPTH #if CONFIG_PARALLEL_DEBLOCKING // Should we apply any filter at all: 11111111 yes, 00000000 no ? static INLINE int8_t highbd_filter_mask2(uint8_t limit, uint8_t blimit, @@ -1228,4 +1225,3 @@ highbd_mb_lpf_vertical_edge_w(s, p, blimit, limit, thresh, 16, bd); #endif } -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/psnr.c b/aom_dsp/psnr.c index d543f12..de6d922 100644 --- a/aom_dsp/psnr.c +++ b/aom_dsp/psnr.c
@@ -48,7 +48,6 @@ } } -#if CONFIG_HIGHBITDEPTH static void encoder_highbd_variance64(const uint8_t *a8, int a_stride, const uint8_t *b8, int b_stride, int w, int h, uint64_t *sse, int64_t *sum) { @@ -80,7 +79,6 @@ *sse = (unsigned int)sse_long; *sum = (int)sum_long; } -#endif // CONFIG_HIGHBITDEPTH static int64_t get_sse(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int width, int height) { @@ -122,7 +120,6 @@ return total_sse; } -#if CONFIG_HIGHBITDEPTH static int64_t highbd_get_sse_shift(const uint8_t *a8, int a_stride, const uint8_t *b8, int b_stride, int width, int height, unsigned int input_shift) { @@ -175,7 +172,6 @@ } return total_sse; } -#endif // CONFIG_HIGHBITDEPTH int64_t aom_get_y_sse_part(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b, int hstart, int width, @@ -228,7 +224,6 @@ a->uv_crop_width, a->uv_crop_height); } -#if CONFIG_HIGHBITDEPTH int64_t aom_highbd_get_y_sse_part(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b, int hstart, int width, int vstart, int height) { @@ -287,11 +282,9 @@ return highbd_get_sse(a->v_buffer, a->uv_stride, b->v_buffer, b->uv_stride, a->uv_crop_width, a->uv_crop_height); } -#endif // CONFIG_HIGHBITDEPTH int64_t aom_get_sse_plane(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b, int plane, int highbd) { -#if CONFIG_HIGHBITDEPTH if (highbd) { switch (plane) { case 0: return aom_highbd_get_y_sse(a, b); @@ -300,7 +293,6 @@ default: assert(plane >= 0 && plane <= 2); return 0; } } -#endif (void)highbd; switch (plane) { case 0: return aom_get_y_sse(a, b); @@ -310,7 +302,6 @@ } } -#if CONFIG_HIGHBITDEPTH void aom_calc_highbd_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b, PSNR_STATS *psnr, uint32_t bit_depth, uint32_t in_bit_depth) { @@ -356,8 +347,6 @@ aom_sse_to_psnr((double)total_samples, peak, (double)total_sse); } -#endif // !CONFIG_HIGHBITDEPTH - void aom_calc_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b, PSNR_STATS *psnr) { static const double peak = 255.0;
diff --git a/aom_dsp/psnr.h b/aom_dsp/psnr.h index df5f8f9..c7f6c45 100644 --- a/aom_dsp/psnr.h +++ b/aom_dsp/psnr.h
@@ -49,7 +49,6 @@ int64_t aom_get_v_sse(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b); int64_t aom_get_sse_plane(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b, int plane, int highbd); -#if CONFIG_HIGHBITDEPTH int64_t aom_highbd_get_y_sse_part(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b, int hstart, int width, int vstart, int height); @@ -68,7 +67,6 @@ void aom_calc_highbd_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b, PSNR_STATS *psnr, unsigned int bit_depth, unsigned int in_bit_depth); -#endif void aom_calc_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b, PSNR_STATS *psnr);
diff --git a/aom_dsp/psnrhvs.c b/aom_dsp/psnrhvs.c index 8816769..324b387 100644 --- a/aom_dsp/psnrhvs.c +++ b/aom_dsp/psnrhvs.c
@@ -38,7 +38,6 @@ *(y + ystride * i + j) = (*(y + ystride * i + j) + 4) >> 3; } -#if CONFIG_HIGHBITDEPTH static void hbd_od_bin_fdct8x8(tran_low_t *y, int ystride, const int16_t *x, int xstride) { int i, j; @@ -48,7 +47,6 @@ for (j = 0; j < 8; j++) *(y + ystride * i + j) = (*(y + ystride * i + j) + 4) >> 3; } -#endif /* Normalized inverse quantization matrix for 8x8 DCT at the point of * transparency. This is not the JPEG based matrix from the paper, @@ -214,12 +212,10 @@ s_gvar = (s_vars[0] + s_vars[1] + s_vars[2] + s_vars[3]) / s_gvar; if (d_gvar > 0) d_gvar = (d_vars[0] + d_vars[1] + d_vars[2] + d_vars[3]) / d_gvar; -#if CONFIG_HIGHBITDEPTH if (bit_depth == 10 || bit_depth == 12) { hbd_od_bin_fdct8x8(dct_s_coef, 8, dct_s, 8); hbd_od_bin_fdct8x8(dct_d_coef, 8, dct_d, 8); } -#endif if (bit_depth == 8) { od_bin_fdct8x8(dct_s_coef, 8, dct_s, 8); od_bin_fdct8x8(dct_d_coef, 8, dct_d, 8);
diff --git a/aom_dsp/quantize.h b/aom_dsp/quantize.h index 03609e8..2f58bce 100644 --- a/aom_dsp/quantize.h +++ b/aom_dsp/quantize.h
@@ -44,7 +44,6 @@ const int16_t *scan, const int16_t *iscan, const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr, const int log_scale); -#if CONFIG_HIGHBITDEPTH void aom_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, @@ -52,7 +51,6 @@ tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan); -#endif void aom_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t quant_ptr, @@ -70,7 +68,6 @@ #endif // CONFIG_TX64X64 #if CONFIG_AOM_QM -#if CONFIG_HIGHBITDEPTH void aom_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t quant_ptr, tran_low_t *qcoeff_ptr, @@ -89,11 +86,9 @@ const int16_t dequant_ptr, uint16_t *eob_ptr, const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr); #endif // CONFIG_TX64X64 -#endif // CONFIG_HIGHBITDEPTH #else // CONFIG_AOM_QM -#if CONFIG_HIGHBITDEPTH void aom_highbd_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t quant_ptr, tran_low_t *qcoeff_ptr, @@ -113,7 +108,6 @@ tran_low_t *dqcoeff_ptr, const int16_t dequant_ptr, uint16_t *eob_ptr); #endif // CONFIG_TX64X64 -#endif // CONFIG_HIGHBITDEPTH #endif // CONFIG_AOM_QM #ifdef __cplusplus
diff --git a/aom_dsp/sad.c b/aom_dsp/sad.c index 809437a..91460c5 100644 --- a/aom_dsp/sad.c +++ b/aom_dsp/sad.c
@@ -213,10 +213,9 @@ sadMxN(128, 32) sadMxNx4D(128, 32) #endif -/* clang-format on */ + /* clang-format on */ -#if CONFIG_HIGHBITDEPTH - static INLINE + static INLINE unsigned int highbd_sad(const uint8_t *a8, int a_stride, const uint8_t *b8, int b_stride, int width, int height) { int y, x; @@ -410,5 +409,4 @@ highbd_sadMxN(128, 32) highbd_sadMxNx4D(128, 32) #endif -/* clang-format on */ -#endif // CONFIG_HIGHBITDEPTH + /* clang-format on */
diff --git a/aom_dsp/sad_av1.c b/aom_dsp/sad_av1.c index 7e6ecf1..b7795de 100644 --- a/aom_dsp/sad_av1.c +++ b/aom_dsp/sad_av1.c
@@ -83,10 +83,9 @@ MASKSADMxN(32, 128) MASKSADMxN(128, 32) #endif -/* clang-format on */ + /* clang-format on */ -#if CONFIG_HIGHBITDEPTH - static INLINE + static INLINE unsigned int highbd_masked_sad(const uint8_t *src8, int src_stride, const uint8_t *a8, int a_stride, const uint8_t *b8, int b_stride, @@ -156,7 +155,6 @@ HIGHBD_MASKSADMXN(32, 128) HIGHBD_MASKSADMXN(128, 32) #endif -#endif // CONFIG_HIGHBITDEPTH // pre: predictor being evaluated // wsrc: target weighted prediction (has been *4096 to keep precision) @@ -216,10 +214,9 @@ OBMCSADMxN(32, 128) OBMCSADMxN(128, 32) #endif -/* clang-format on */ + /* clang-format on */ -#if CONFIG_HIGHBITDEPTH - static INLINE + static INLINE unsigned int highbd_obmc_sad(const uint8_t *pre8, int pre_stride, const int32_t *wsrc, const int32_t *mask, int width, int height) { @@ -277,5 +274,4 @@ HIGHBD_OBMCSADMXN(128, 32) #endif /* clang-format on */ -#endif // CONFIG_HIGHBITDEPTH #endif // CONFIG_AV1
diff --git a/aom_dsp/ssim.c b/aom_dsp/ssim.c index 6ae378f..fb9f753 100644 --- a/aom_dsp/ssim.c +++ b/aom_dsp/ssim.c
@@ -31,6 +31,7 @@ } } } + void aom_ssim_parms_8x8_c(const uint8_t *s, int sp, const uint8_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr) { @@ -46,7 +47,6 @@ } } -#if CONFIG_HIGHBITDEPTH void aom_highbd_ssim_parms_8x8_c(const uint16_t *s, int sp, const uint16_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, @@ -62,7 +62,6 @@ } } } -#endif // CONFIG_HIGHBITDEPTH static const int64_t cc1 = 26634; // (64^2*(.01*255)^2 static const int64_t cc2 = 239708; // (64^2*(.03*255)^2 @@ -108,7 +107,6 @@ return similarity(sum_s, sum_r, sum_sq_s, sum_sq_r, sum_sxr, 64, 8); } -#if CONFIG_HIGHBITDEPTH static double highbd_ssim_8x8(const uint16_t *s, int sp, const uint16_t *r, int rp, uint32_t bd, uint32_t shift) { uint32_t sum_s = 0, sum_r = 0, sum_sq_s = 0, sum_sq_r = 0, sum_sxr = 0; @@ -117,7 +115,6 @@ return similarity(sum_s >> shift, sum_r >> shift, sum_sq_s >> (2 * shift), sum_sq_r >> (2 * shift), sum_sxr >> (2 * shift), 64, bd); } -#endif // CONFIG_HIGHBITDEPTH // We are using a 8x8 moving window with starting location of each 8x8 window // on the 4x4 pixel grid. Such arrangement allows the windows to overlap @@ -142,7 +139,6 @@ return ssim_total; } -#if CONFIG_HIGHBITDEPTH static double aom_highbd_ssim2(const uint8_t *img1, const uint8_t *img2, int stride_img1, int stride_img2, int width, int height, uint32_t bd, uint32_t shift) { @@ -164,7 +160,6 @@ ssim_total /= samples; return ssim_total; } -#endif // CONFIG_HIGHBITDEPTH double aom_calc_ssim(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *weight) { @@ -422,7 +417,6 @@ return inconsistency_total; } -#if CONFIG_HIGHBITDEPTH double aom_highbd_calc_ssim(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *weight, uint32_t bd, uint32_t in_bd) { @@ -441,4 +435,3 @@ *weight = 1; return abc[0] * .8 + .1 * (abc[1] + abc[2]); } -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/ssim.h b/aom_dsp/ssim.h index 902735e..a448177 100644 --- a/aom_dsp/ssim.h +++ b/aom_dsp/ssim.h
@@ -75,11 +75,9 @@ double *ssim_u, double *ssim_v, uint32_t bd, uint32_t in_bd); -#if CONFIG_HIGHBITDEPTH double aom_highbd_calc_ssim(const YV12_BUFFER_CONFIG *source, const YV12_BUFFER_CONFIG *dest, double *weight, uint32_t bd, uint32_t in_bd); -#endif // CONFIG_HIGHBITDEPTH #ifdef __cplusplus } // extern "C"
diff --git a/aom_dsp/subtract.c b/aom_dsp/subtract.c index 8dda96e..6afd49b 100644 --- a/aom_dsp/subtract.c +++ b/aom_dsp/subtract.c
@@ -32,7 +32,6 @@ } } -#if CONFIG_HIGHBITDEPTH void aom_highbd_subtract_block_c(int rows, int cols, int16_t *diff, ptrdiff_t diff_stride, const uint8_t *src8, ptrdiff_t src_stride, const uint8_t *pred8, @@ -52,4 +51,3 @@ src += src_stride; } } -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/variance.c b/aom_dsp/variance.c index b47eca3..75ad6c0 100644 --- a/aom_dsp/variance.c +++ b/aom_dsp/variance.c
@@ -434,7 +434,6 @@ } #endif // CONFIG_JNT_COMP -#if CONFIG_HIGHBITDEPTH static void highbd_variance64(const uint8_t *a8, int a_stride, const uint8_t *b8, int b_stride, int w, int h, uint64_t *sse, int64_t *sum) { @@ -1023,7 +1022,6 @@ } } #endif // CONFIG_JNT_COMP -#endif // CONFIG_HIGHBITDEPTH #if CONFIG_AV1 void aom_comp_mask_pred_c(uint8_t *comp_pred, const uint8_t *pred, int width, @@ -1120,7 +1118,6 @@ #endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION_TYPES -#if CONFIG_HIGHBITDEPTH void aom_highbd_comp_mask_pred_c(uint16_t *comp_pred, const uint8_t *pred8, int width, int height, const uint8_t *ref8, int ref_stride, const uint8_t *mask, @@ -1262,7 +1259,6 @@ HIGHBD_MASK_SUBPIX_VAR(128, 32) #endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION_TYPES -#endif // CONFIG_HIGHBITDEPTH #endif // CONFIG_AV1 #if CONFIG_AV1 @@ -1382,7 +1378,6 @@ #endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION_TYPES -#if CONFIG_HIGHBITDEPTH static INLINE void highbd_obmc_variance64(const uint8_t *pre8, int pre_stride, const int32_t *wsrc, const int32_t *mask, int w, int h, @@ -1584,5 +1579,4 @@ HIGHBD_OBMC_SUBPIX_VAR(128, 32) #endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION_TYPES -#endif // CONFIG_HIGHBITDEPTH #endif // CONFIG_AV1
diff --git a/aom_dsp/variance.h b/aom_dsp/variance.h index d4a1e83..f720dd1 100644 --- a/aom_dsp/variance.h +++ b/aom_dsp/variance.h
@@ -129,10 +129,8 @@ uint32_t aom_sse_odd_size(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int w, int h); -#if CONFIG_HIGHBITDEPTH uint64_t aom_highbd_sse_odd_size(const uint8_t *a, int a_stride, const uint8_t *b, int b_stride, int w, int h); -#endif // CONFIG_HIGHBITDEPTH #ifdef __cplusplus } // extern "C"
diff --git a/aom_dsp/x86/aom_asm_stubs.c b/aom_dsp/x86/aom_asm_stubs.c index 4067b0b..47afd85 100644 --- a/aom_dsp/x86/aom_asm_stubs.c +++ b/aom_dsp/x86/aom_asm_stubs.c
@@ -78,7 +78,7 @@ FUN_CONV_2D(, sse2); FUN_CONV_2D(avg_, sse2); -#if CONFIG_HIGHBITDEPTH && ARCH_X86_64 +#if ARCH_X86_64 highbd_filter8_1dfunction aom_highbd_filter_block1d16_v8_sse2; highbd_filter8_1dfunction aom_highbd_filter_block1d16_h8_sse2; highbd_filter8_1dfunction aom_highbd_filter_block1d8_v8_sse2; @@ -178,5 +178,5 @@ ((int16_t *)filter_y)[3] -= 128; } #endif // CONFIG_LOOP_RESTORATION -#endif // CONFIG_HIGHBITDEPTH && ARCH_X86_64 +#endif // ARCH_X86_64 #endif // HAVE_SSE2
diff --git a/aom_dsp/x86/aom_convolve_copy_sse2.asm b/aom_dsp/x86/aom_convolve_copy_sse2.asm index 4d31428..9d4251f 100644 --- a/aom_dsp/x86/aom_convolve_copy_sse2.asm +++ b/aom_dsp/x86/aom_convolve_copy_sse2.asm
@@ -339,7 +339,5 @@ INIT_XMM sse2 convolve_fn copy convolve_fn avg -%if CONFIG_HIGHBITDEPTH convolve_fn copy, highbd convolve_fn avg, highbd -%endif
diff --git a/aom_dsp/x86/blend_a64_hmask_sse4.c b/aom_dsp/x86/blend_a64_hmask_sse4.c index e916e4f..05ebd9f 100644 --- a/aom_dsp/x86/blend_a64_hmask_sse4.c +++ b/aom_dsp/x86/blend_a64_hmask_sse4.c
@@ -24,7 +24,6 @@ src1_stride, mask, 0, h, w, 0, 0); } -#if CONFIG_HIGHBITDEPTH void aom_highbd_blend_a64_hmask_sse4_1( uint8_t *dst_8, uint32_t dst_stride, const uint8_t *src0_8, uint32_t src0_stride, const uint8_t *src1_8, uint32_t src1_stride, @@ -33,4 +32,3 @@ src1_8, src1_stride, mask, 0, h, w, 0, 0, bd); } -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/x86/blend_a64_mask_sse4.c b/aom_dsp/x86/blend_a64_mask_sse4.c index 68d74e5..ae29f1e 100644 --- a/aom_dsp/x86/blend_a64_mask_sse4.c +++ b/aom_dsp/x86/blend_a64_mask_sse4.c
@@ -473,7 +473,6 @@ } } -#if CONFIG_HIGHBITDEPTH ////////////////////////////////////////////////////////////////////////////// // No sub-sampling ////////////////////////////////////////////////////////////////////////////// @@ -921,4 +920,3 @@ mask_stride, h, w); } } -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/x86/blend_a64_vmask_sse4.c b/aom_dsp/x86/blend_a64_vmask_sse4.c index 9dabe5b..4a8fcdc 100644 --- a/aom_dsp/x86/blend_a64_vmask_sse4.c +++ b/aom_dsp/x86/blend_a64_vmask_sse4.c
@@ -143,7 +143,6 @@ w); } -#if CONFIG_HIGHBITDEPTH ////////////////////////////////////////////////////////////////////////////// // Implementation - No sub-sampling ////////////////////////////////////////////////////////////////////////////// @@ -282,4 +281,3 @@ src1_stride, mask, h, w); } } -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/x86/blend_sse4.h b/aom_dsp/x86/blend_sse4.h index daa2b2b..4880438 100644 --- a/aom_dsp/x86/blend_sse4.h +++ b/aom_dsp/x86/blend_sse4.h
@@ -53,7 +53,6 @@ return v_res_w; } -#if CONFIG_HIGHBITDEPTH typedef __m128i (*blend_unit_fn)(const uint16_t *src0, const uint16_t *src1, const __m128i v_m0_w, const __m128i v_m1_w); @@ -141,6 +140,5 @@ return v_res_w; } -#endif // CONFIG_HIGHBITDEPTH #endif // AOM_DSP_X86_BLEND_SSE4_H_
diff --git a/aom_dsp/x86/convolve.h b/aom_dsp/x86/convolve.h index 8641164..c6c3b58 100644 --- a/aom_dsp/x86/convolve.h +++ b/aom_dsp/x86/convolve.h
@@ -179,7 +179,6 @@ } #endif -#if CONFIG_HIGHBITDEPTH typedef void highbd_filter8_1dfunction(const uint16_t *src_ptr, const ptrdiff_t src_pitch, uint16_t *output_ptr, @@ -283,6 +282,5 @@ w, h, bd); \ } \ } -#endif // CONFIG_HIGHBITDEPTH #endif // AOM_DSP_X86_CONVOLVE_H_
diff --git a/aom_dsp/x86/fwd_txfm_sse2.c b/aom_dsp/x86/fwd_txfm_sse2.c index 657dcfa..463d71f 100644 --- a/aom_dsp/x86/fwd_txfm_sse2.c +++ b/aom_dsp/x86/fwd_txfm_sse2.c
@@ -107,7 +107,6 @@ #undef FDCT32x32_HIGH_PRECISION #undef DCT_HIGH_BIT_DEPTH -#if CONFIG_HIGHBITDEPTH #define DCT_HIGH_BIT_DEPTH 1 #define FDCT4x4_2D aom_highbd_fdct4x4_sse2 #define FDCT8x8_2D aom_highbd_fdct8x8_sse2 @@ -129,4 +128,3 @@ #undef FDCT32x32_2D #undef FDCT32x32_HIGH_PRECISION #undef DCT_HIGH_BIT_DEPTH -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/x86/fwd_txfm_ssse3_x86_64.asm b/aom_dsp/x86/fwd_txfm_ssse3_x86_64.asm index 8fa1c04..466d8f9 100644 --- a/aom_dsp/x86/fwd_txfm_ssse3_x86_64.asm +++ b/aom_dsp/x86/fwd_txfm_ssse3_x86_64.asm
@@ -131,7 +131,6 @@ %endmacro %macro STORE_OUTPUT 2 ; index, result -%if CONFIG_HIGHBITDEPTH ; const __m128i sign_bits = _mm_cmplt_epi16(*poutput, zero); ; __m128i out0 = _mm_unpacklo_epi16(*poutput, sign_bits); ; __m128i out1 = _mm_unpackhi_epi16(*poutput, sign_bits); @@ -144,9 +143,6 @@ punpckhwd m12, m11 mova [outputq + 4*%1 + 0], m%2 mova [outputq + 4*%1 + 16], m12 -%else - mova [outputq + 2*%1], m%2 -%endif %endmacro INIT_XMM ssse3
diff --git a/aom_dsp/x86/inv_wht_sse2.asm b/aom_dsp/x86/inv_wht_sse2.asm index f0668e6..0bc841a 100644 --- a/aom_dsp/x86/inv_wht_sse2.asm +++ b/aom_dsp/x86/inv_wht_sse2.asm
@@ -85,15 +85,10 @@ INIT_XMM sse2 cglobal iwht4x4_16_add, 3, 3, 7, input, output, stride -%if CONFIG_HIGHBITDEPTH mova m0, [inputq + 0] packssdw m0, [inputq + 16] mova m1, [inputq + 32] packssdw m1, [inputq + 48] -%else - mova m0, [inputq + 0] - mova m1, [inputq + 16] -%endif psraw m0, 2 psraw m1, 2
diff --git a/aom_dsp/x86/masked_sad_intrin_ssse3.c b/aom_dsp/x86/masked_sad_intrin_ssse3.c index 2536f91..1438948 100644 --- a/aom_dsp/x86/masked_sad_intrin_ssse3.c +++ b/aom_dsp/x86/masked_sad_intrin_ssse3.c
@@ -239,7 +239,6 @@ return (sad + 31) >> 6; } -#if CONFIG_HIGHBITDEPTH // For width a multiple of 8 static INLINE unsigned int highbd_masked_sad_ssse3( const uint8_t *src8, int src_stride, const uint8_t *a8, int a_stride, @@ -424,5 +423,3 @@ int sad = _mm_cvtsi128_si32(res); return (sad + 31) >> 6; } - -#endif
diff --git a/aom_dsp/x86/masked_variance_intrin_ssse3.c b/aom_dsp/x86/masked_variance_intrin_ssse3.c index d9118e7..d670a4f 100644 --- a/aom_dsp/x86/masked_variance_intrin_ssse3.c +++ b/aom_dsp/x86/masked_variance_intrin_ssse3.c
@@ -523,7 +523,6 @@ *sse = _mm_cvtsi128_si32(_mm_srli_si128(sum, 4)); } -#if CONFIG_HIGHBITDEPTH // For width a multiple of 8 static void highbd_bilinear_filter(const uint16_t *src, int src_stride, int xoffset, int yoffset, uint16_t *dst, @@ -1040,5 +1039,3 @@ *sum_ = _mm_cvtsi128_si32(sum); *sse = _mm_cvtsi128_si32(_mm_srli_si128(sum, 4)); } - -#endif
diff --git a/aom_dsp/x86/obmc_sad_sse4.c b/aom_dsp/x86/obmc_sad_sse4.c index 52dd508..c14351b 100644 --- a/aom_dsp/x86/obmc_sad_sse4.c +++ b/aom_dsp/x86/obmc_sad_sse4.c
@@ -150,7 +150,6 @@ // High bit-depth //////////////////////////////////////////////////////////////////////////////// -#if CONFIG_HIGHBITDEPTH static INLINE unsigned int hbd_obmc_sad_w4(const uint8_t *pre8, const int pre_stride, const int32_t *wsrc, @@ -276,4 +275,3 @@ HBD_OBMCSADWXH(16, 64) HBD_OBMCSADWXH(64, 16) #endif -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/x86/obmc_variance_sse4.c b/aom_dsp/x86/obmc_variance_sse4.c index 392616a..18f1203 100644 --- a/aom_dsp/x86/obmc_variance_sse4.c +++ b/aom_dsp/x86/obmc_variance_sse4.c
@@ -163,7 +163,6 @@ // High bit-depth //////////////////////////////////////////////////////////////////////////////// -#if CONFIG_HIGHBITDEPTH static INLINE void hbd_obmc_variance_w4( const uint8_t *pre8, const int pre_stride, const int32_t *wsrc, const int32_t *mask, uint64_t *const sse, int64_t *const sum, const int h) { @@ -377,4 +376,3 @@ HBD_OBMCVARWXH(128, 32) #endif // CONFIG_EXT_PARTITION #endif // CONFIG_EXT_PARTITION_TYPES -#endif // CONFIG_HIGHBITDEPTH
diff --git a/aom_dsp/x86/quantize_avx_x86_64.asm b/aom_dsp/x86/quantize_avx_x86_64.asm index f6e2b17..e6b4026 100644 --- a/aom_dsp/x86/quantize_avx_x86_64.asm +++ b/aom_dsp/x86/quantize_avx_x86_64.asm
@@ -44,16 +44,11 @@ mova m0, [zbinq] ; m0 = zbin ; Get DC and first 15 AC coeffs - in this special case, that is all. -%if CONFIG_HIGHBITDEPTH ; coeff stored as 32bit numbers but we process them as 16 bit numbers mova m9, [coeffq] packssdw m9, [coeffq+16] ; m9 = c[i] mova m10, [coeffq+32] packssdw m10, [coeffq+48] ; m10 = c[i] -%else - mova m9, [coeffq] ; m9 = c[i] - mova m10, [coeffq+16] ; m10 = c[i] -%endif mov r0, eobmp ; Output pointer mov r1, qcoeffmp ; Output pointer @@ -76,15 +71,10 @@ ptest m14, m14 jnz .single_nonzero -%if CONFIG_HIGHBITDEPTH mova [r1 ], ymm5 mova [r1+32], ymm5 mova [r2 ], ymm5 mova [r2+32], ymm5 -%else - mova [r1], ymm5 - mova [r2], ymm5 -%endif mov [r0], word 0 vzeroupper @@ -124,7 +114,6 @@ pand m8, m7 pand m13, m12 -%if CONFIG_HIGHBITDEPTH ; Store 16bit numbers as 32bit numbers in array pointed to by qcoeff pcmpgtw m6, m5, m8 punpckhwd m6, m8, m6 @@ -136,16 +125,11 @@ pmovsxwd m11, m13 mova [qcoeffq+32], m11 mova [qcoeffq+48], m6 -%else - mova [qcoeffq ], m8 - mova [qcoeffq+16], m13 -%endif pmullw m8, m3 ; dqc[i] = qc[i] * q punpckhqdq m3, m3 pmullw m13, m3 ; dqc[i] = qc[i] * q -%if CONFIG_HIGHBITDEPTH ; Store 16bit numbers as 32bit numbers in array pointed to by qcoeff pcmpgtw m6, m5, m8 punpckhwd m6, m8, m6 @@ -157,10 +141,6 @@ pmovsxwd m11, m13 mova [dqcoeffq+32], m11 mova [dqcoeffq+48], m6 -%else - mova [dqcoeffq ], m8 - mova [dqcoeffq+16], m13 -%endif mova m6, [iscanq] ; m6 = scan[i] mova m11, [iscanq+16] ; m11 = scan[i] @@ -229,29 +209,20 @@ DEFINE_ARGS coeff, ncoeff, d1, qcoeff, dqcoeff, iscan, d2, d3, d4, d5, eob -%if CONFIG_HIGHBITDEPTH + lea coeffq, [ coeffq+ncoeffq*4] lea qcoeffq, [ qcoeffq+ncoeffq*4] lea dqcoeffq, [dqcoeffq+ncoeffq*4] -%else - lea coeffq, [ coeffq+ncoeffq*2] - lea qcoeffq, [ qcoeffq+ncoeffq*2] - lea dqcoeffq, [dqcoeffq+ncoeffq*2] -%endif + lea iscanq, [ iscanq+ncoeffq*2] neg ncoeffq ; get DC and first 15 AC coeffs -%if CONFIG_HIGHBITDEPTH ; coeff stored as 32bit numbers & require 16bit numbers mova m9, [coeffq+ncoeffq*4+ 0] packssdw m9, [coeffq+ncoeffq*4+16] mova m10, [coeffq+ncoeffq*4+32] packssdw m10, [coeffq+ncoeffq*4+48] -%else - mova m9, [coeffq+ncoeffq*2+ 0] ; m9 = c[i] - mova m10, [coeffq+ncoeffq*2+16] ; m10 = c[i] -%endif pabsw m6, m9 ; m6 = abs(m9) pabsw m11, m10 ; m11 = abs(m10) @@ -264,16 +235,10 @@ ptest m14, m14 jnz .first_nonzero -%if CONFIG_HIGHBITDEPTH mova [qcoeffq+ncoeffq*4 ], ymm5 mova [qcoeffq+ncoeffq*4+32], ymm5 mova [dqcoeffq+ncoeffq*4 ], ymm5 mova [dqcoeffq+ncoeffq*4+32], ymm5 -%else - mova [qcoeffq+ncoeffq*2], ymm5 - mova [dqcoeffq+ncoeffq*2], ymm5 -%endif - add ncoeffq, mmsize punpckhqdq m1, m1 @@ -302,7 +267,6 @@ pand m8, m7 pand m13, m12 -%if CONFIG_HIGHBITDEPTH ; store 16bit numbers as 32bit numbers in array pointed to by qcoeff pcmpgtw m6, m5, m8 punpckhwd m6, m8, m6 @@ -314,10 +278,6 @@ pmovsxwd m11, m13 mova [qcoeffq+ncoeffq*4+32], m11 mova [qcoeffq+ncoeffq*4+48], m6 -%else - mova [qcoeffq+ncoeffq*2+ 0], m8 - mova [qcoeffq+ncoeffq*2+16], m13 -%endif %ifidn %1, b_32x32 pabsw m8, m8 @@ -333,7 +293,6 @@ psignw m13, m10 %endif -%if CONFIG_HIGHBITDEPTH ; store 16bit numbers as 32bit numbers in array pointed to by qcoeff pcmpgtw m6, m5, m8 punpckhwd m6, m8, m6 @@ -345,10 +304,6 @@ pmovsxwd m11, m13 mova [dqcoeffq+ncoeffq*4+32], m11 mova [dqcoeffq+ncoeffq*4+48], m6 -%else - mova [dqcoeffq+ncoeffq*2+ 0], m8 - mova [dqcoeffq+ncoeffq*2+16], m13 -%endif pcmpeqw m8, m5 ; m8 = c[i] == 0 pcmpeqw m13, m5 ; m13 = c[i] == 0 @@ -363,16 +318,11 @@ .ac_only_loop: -%if CONFIG_HIGHBITDEPTH ; pack coeff from 32bit to 16bit array mova m9, [coeffq+ncoeffq*4+ 0] packssdw m9, [coeffq+ncoeffq*4+16] mova m10, [coeffq+ncoeffq*4+32] packssdw m10, [coeffq+ncoeffq*4+48] -%else - mova m9, [coeffq+ncoeffq*2+ 0] ; m9 = c[i] - mova m10, [coeffq+ncoeffq*2+16] ; m10 = c[i] -%endif pabsw m6, m9 ; m6 = abs(m9) pabsw m11, m10 ; m11 = abs(m10) @@ -385,15 +335,11 @@ ptest m14, m14 jnz .rest_nonzero -%if CONFIG_HIGHBITDEPTH mova [qcoeffq+ncoeffq*4+ 0], ymm5 mova [qcoeffq+ncoeffq*4+32], ymm5 mova [dqcoeffq+ncoeffq*4+ 0], ymm5 mova [dqcoeffq+ncoeffq*4+32], ymm5 -%else - mova [qcoeffq+ncoeffq*2+ 0], ymm5 - mova [dqcoeffq+ncoeffq*2+ 0], ymm5 -%endif + add ncoeffq, mmsize jnz .ac_only_loop @@ -424,7 +370,6 @@ pand m14, m7 pand m13, m12 -%if CONFIG_HIGHBITDEPTH ; store 16bit numbers as 32bit numbers in array pointed to by qcoeff pcmpgtw m6, m5, m14 punpckhwd m6, m14, m6 @@ -436,10 +381,6 @@ pmovsxwd m11, m13 mova [qcoeffq+ncoeffq*4+32], m11 mova [qcoeffq+ncoeffq*4+48], m6 -%else - mova [qcoeffq+ncoeffq*2+ 0], m14 - mova [qcoeffq+ncoeffq*2+16], m13 -%endif %ifidn %1, b_32x32 pabsw m14, m14 @@ -454,7 +395,6 @@ psignw m13, m10 %endif -%if CONFIG_HIGHBITDEPTH ; store 16bit numbers as 32bit numbers in array pointed to by qcoeff pcmpgtw m6, m5, m14 punpckhwd m6, m14, m6 @@ -466,10 +406,6 @@ pmovsxwd m11, m13 mova [dqcoeffq+ncoeffq*4+32], m11 mova [dqcoeffq+ncoeffq*4+48], m6 -%else - mova [dqcoeffq+ncoeffq*2+ 0], m14 - mova [dqcoeffq+ncoeffq*2+16], m13 -%endif pcmpeqw m14, m5 ; m14 = c[i] == 0 pcmpeqw m13, m5 ; m13 = c[i] == 0 @@ -510,27 +446,16 @@ DEFINE_ARGS dqcoeff, ncoeff, qcoeff, eob -%if CONFIG_HIGHBITDEPTH lea dqcoeffq, [dqcoeffq+ncoeffq*4] lea qcoeffq, [ qcoeffq+ncoeffq*4] -%else - lea dqcoeffq, [dqcoeffq+ncoeffq*2] - lea qcoeffq, [ qcoeffq+ncoeffq*2] -%endif - neg ncoeffq pxor m7, m7 .blank_loop: -%if CONFIG_HIGHBITDEPTH mova [dqcoeffq+ncoeffq*4+ 0], ymm7 mova [dqcoeffq+ncoeffq*4+32], ymm7 mova [qcoeffq+ncoeffq*4+ 0], ymm7 mova [qcoeffq+ncoeffq*4+32], ymm7 -%else - mova [dqcoeffq+ncoeffq*2+ 0], ymm7 - mova [qcoeffq+ncoeffq*2+ 0], ymm7 -%endif add ncoeffq, mmsize jl .blank_loop
diff --git a/aom_dsp/x86/quantize_ssse3_x86_64.asm b/aom_dsp/x86/quantize_ssse3_x86_64.asm index 36b4ddd..7cf4bfa 100644 --- a/aom_dsp/x86/quantize_ssse3_x86_64.asm +++ b/aom_dsp/x86/quantize_ssse3_x86_64.asm
@@ -56,29 +56,18 @@ %endif pxor m5, m5 ; m5 = dedicated zero DEFINE_ARGS coeff, ncoeff, d1, qcoeff, dqcoeff, iscan, d2, d3, d4, d5, eob -%if CONFIG_HIGHBITDEPTH lea coeffq, [ coeffq+ncoeffq*4] lea qcoeffq, [ qcoeffq+ncoeffq*4] lea dqcoeffq, [dqcoeffq+ncoeffq*4] -%else - lea coeffq, [ coeffq+ncoeffq*2] - lea qcoeffq, [ qcoeffq+ncoeffq*2] - lea dqcoeffq, [dqcoeffq+ncoeffq*2] -%endif lea iscanq, [ iscanq+ncoeffq*2] neg ncoeffq ; get DC and first 15 AC coeffs -%if CONFIG_HIGHBITDEPTH ; coeff stored as 32bit numbers & require 16bit numbers mova m9, [ coeffq+ncoeffq*4+ 0] packssdw m9, [ coeffq+ncoeffq*4+16] mova m10, [ coeffq+ncoeffq*4+32] packssdw m10, [ coeffq+ncoeffq*4+48] -%else - mova m9, [ coeffq+ncoeffq*2+ 0] ; m9 = c[i] - mova m10, [ coeffq+ncoeffq*2+16] ; m10 = c[i] -%endif pabsw m6, m9 ; m6 = abs(m9) pabsw m11, m10 ; m11 = abs(m10) pcmpgtw m7, m6, m0 ; m7 = c[i] >= zbin @@ -99,7 +88,7 @@ psignw m13, m10 ; m13 = reinsert sign pand m8, m7 pand m13, m12 -%if CONFIG_HIGHBITDEPTH + ; store 16bit numbers as 32bit numbers in array pointed to by qcoeff mova m11, m8 mova m6, m8 @@ -117,10 +106,7 @@ mova [qcoeffq+ncoeffq*4+32], m11 mova [qcoeffq+ncoeffq*4+48], m6 pxor m5, m5 ; reset m5 to zero register -%else - mova [qcoeffq+ncoeffq*2+ 0], m8 - mova [qcoeffq+ncoeffq*2+16], m13 -%endif + %ifidn %1, b_32x32 pabsw m8, m8 pabsw m13, m13 @@ -134,7 +120,6 @@ psignw m8, m9 psignw m13, m10 %endif -%if CONFIG_HIGHBITDEPTH ; store 16bit numbers as 32bit numbers in array pointed to by qcoeff mova m11, m8 mova m6, m8 @@ -152,10 +137,6 @@ mova [dqcoeffq+ncoeffq*4+32], m11 mova [dqcoeffq+ncoeffq*4+48], m6 pxor m5, m5 ; reset m5 to zero register -%else - mova [dqcoeffq+ncoeffq*2+ 0], m8 - mova [dqcoeffq+ncoeffq*2+16], m13 -%endif pcmpeqw m8, m5 ; m8 = c[i] == 0 pcmpeqw m13, m5 ; m13 = c[i] == 0 mova m6, [ iscanq+ncoeffq*2+ 0] ; m6 = scan[i] @@ -169,16 +150,12 @@ jz .accumulate_eob .ac_only_loop: -%if CONFIG_HIGHBITDEPTH ; pack coeff from 32bit to 16bit array mova m9, [ coeffq+ncoeffq*4+ 0] packssdw m9, [ coeffq+ncoeffq*4+16] mova m10, [ coeffq+ncoeffq*4+32] packssdw m10, [ coeffq+ncoeffq*4+48] -%else - mova m9, [ coeffq+ncoeffq*2+ 0] ; m9 = c[i] - mova m10, [ coeffq+ncoeffq*2+16] ; m10 = c[i] -%endif + pabsw m6, m9 ; m6 = abs(m9) pabsw m11, m10 ; m11 = abs(m10) pcmpgtw m7, m6, m0 ; m7 = c[i] >= zbin @@ -201,7 +178,6 @@ psignw m13, m10 ; m13 = reinsert sign pand m14, m7 pand m13, m12 -%if CONFIG_HIGHBITDEPTH ; store 16bit numbers as 32bit numbers in array pointed to by qcoeff pxor m11, m11 mova m11, m14 @@ -220,10 +196,7 @@ mova [qcoeffq+ncoeffq*4+32], m11 mova [qcoeffq+ncoeffq*4+48], m6 pxor m5, m5 ; reset m5 to zero register -%else - mova [qcoeffq+ncoeffq*2+ 0], m14 - mova [qcoeffq+ncoeffq*2+16], m13 -%endif + %ifidn %1, b_32x32 pabsw m14, m14 pabsw m13, m13 @@ -236,7 +209,7 @@ psignw m14, m9 psignw m13, m10 %endif -%if CONFIG_HIGHBITDEPTH + ; store 16bit numbers as 32bit numbers in array pointed to by qcoeff mova m11, m14 mova m6, m14 @@ -254,10 +227,7 @@ mova [dqcoeffq+ncoeffq*4+32], m11 mova [dqcoeffq+ncoeffq*4+48], m6 pxor m5, m5 -%else - mova [dqcoeffq+ncoeffq*2+ 0], m14 - mova [dqcoeffq+ncoeffq*2+16], m13 -%endif + pcmpeqw m14, m5 ; m14 = c[i] == 0 pcmpeqw m13, m5 ; m13 = c[i] == 0 mova m6, [ iscanq+ncoeffq*2+ 0] ; m6 = scan[i] @@ -274,7 +244,6 @@ %ifidn %1, b_32x32 jmp .accumulate_eob .skip_iter: -%if CONFIG_HIGHBITDEPTH mova [qcoeffq+ncoeffq*4+ 0], m5 mova [qcoeffq+ncoeffq*4+16], m5 mova [qcoeffq+ncoeffq*4+32], m5 @@ -283,12 +252,6 @@ mova [dqcoeffq+ncoeffq*4+16], m5 mova [dqcoeffq+ncoeffq*4+32], m5 mova [dqcoeffq+ncoeffq*4+48], m5 -%else - mova [qcoeffq+ncoeffq*2+ 0], m5 - mova [qcoeffq+ncoeffq*2+16], m5 - mova [dqcoeffq+ncoeffq*2+ 0], m5 - mova [dqcoeffq+ncoeffq*2+16], m5 -%endif add ncoeffq, mmsize jl .ac_only_loop %endif @@ -313,17 +276,11 @@ mov r2, qcoeffmp mov r3, eobmp DEFINE_ARGS dqcoeff, ncoeff, qcoeff, eob -%if CONFIG_HIGHBITDEPTH lea dqcoeffq, [dqcoeffq+ncoeffq*4] lea qcoeffq, [ qcoeffq+ncoeffq*4] -%else - lea dqcoeffq, [dqcoeffq+ncoeffq*2] - lea qcoeffq, [ qcoeffq+ncoeffq*2] -%endif neg ncoeffq pxor m7, m7 .blank_loop: -%if CONFIG_HIGHBITDEPTH mova [dqcoeffq+ncoeffq*4+ 0], m7 mova [dqcoeffq+ncoeffq*4+16], m7 mova [dqcoeffq+ncoeffq*4+32], m7 @@ -332,12 +289,6 @@ mova [qcoeffq+ncoeffq*4+16], m7 mova [qcoeffq+ncoeffq*4+32], m7 mova [qcoeffq+ncoeffq*4+48], m7 -%else - mova [dqcoeffq+ncoeffq*2+ 0], m7 - mova [dqcoeffq+ncoeffq*2+16], m7 - mova [qcoeffq+ncoeffq*2+ 0], m7 - mova [qcoeffq+ncoeffq*2+16], m7 -%endif add ncoeffq, mmsize jl .blank_loop mov word [eobq], 0