Homogenize configuration option name.

Rename '--enable-aom-highbitdepth' to '--enable-highbitdepth'

Change-Id: I1de13c3508c30c552532993419d8ace326142ab6
This commit is contained in:
Sebastien Alaiwan 2017-04-12 16:03:28 +02:00 коммит произвёл James Zern
Родитель f6214b9647
Коммит 71e87847eb
175 изменённых файлов: 1322 добавлений и 1318 удалений

Просмотреть файл

@ -448,7 +448,7 @@ void aom_convolve8_add_src_c(const uint8_t *src, ptrdiff_t src_stride,
}
#endif // CONFIG_LOOP_RESTORATION
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void highbd_convolve_horiz(const uint8_t *src8, ptrdiff_t src_stride,
uint8_t *dst8, ptrdiff_t dst_stride,
const InterpKernel *x_filters, int x0_q4,
@ -851,4 +851,4 @@ void aom_highbd_convolve8_add_src_c(const uint8_t *src, ptrdiff_t src_stride,
x_step_q4, filters_y, y0_q4, y_step_q4, w, h, bd);
}
#endif // CONFIG_LOOP_RESTORATION
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -42,7 +42,7 @@ typedef void (*convolve_fn_t)(const uint8_t *src, ptrdiff_t src_stride,
const int16_t *filter_y, int y_step_q4, int w,
int h);
#if CONFIG_AOM_HIGHBITDEPTH
#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,

Просмотреть файл

@ -119,7 +119,7 @@ if ("${AOM_TARGET_CPU}" STREQUAL "arm64")
"${AOM_ROOT}/aom_dsp/arm/loopfilter_8_neon.c")
endif ()
if (CONFIG_AOM_HIGHBITDEPTH)
if (CONFIG_HIGHBITDEPTH)
set(AOM_DSP_COMMON_ASM_SSE2
${AOM_DSP_COMMON_ASM_SSE2}
"${AOM_ROOT}/aom_dsp/x86/highbd_intrapred_sse2.asm")
@ -263,7 +263,7 @@ if (CONFIG_ENCODERS)
${AOM_DSP_ENCODER_AVX_ASM_X86_64}
"${AOM_ROOT}/aom_dsp/x86/quantize_avx_x86_64.asm")
if (CONFIG_AOM_HIGHBITDEPTH)
if (CONFIG_HIGHBITDEPTH)
set(AOM_DSP_ENCODER_INTRIN_SSE2
${AOM_DSP_ENCODER_INTRIN_SSE2}
"${AOM_ROOT}/aom_dsp/x86/highbd_quantize_intrin_sse2.c"
@ -271,7 +271,7 @@ if (CONFIG_ENCODERS)
endif ()
endif ()
if (CONFIG_AOM_HIGHBITDEPTH)
if (CONFIG_HIGHBITDEPTH)
set(AOM_DSP_ENCODER_ASM_SSE2
${AOM_DSP_ENCODER_ASM_SSE2}
"${AOM_ROOT}/aom_dsp/x86/highbd_sad4d_sse2.asm"

Просмотреть файл

@ -81,10 +81,10 @@ DSP_SRCS-$(HAVE_SSE2) += x86/intrapred_sse2.asm
DSP_SRCS-$(HAVE_SSSE3) += x86/intrapred_ssse3.asm
DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_8t_ssse3.asm
ifeq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE) += x86/highbd_intrapred_sse2.asm
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_intrapred_sse2.asm
endif # CONFIG_AOM_HIGHBITDEPTH
endif # CONFIG_HIGHBITDEPTH
DSP_SRCS-$(HAVE_NEON_ASM) += arm/intrapred_neon_asm$(ASM)
DSP_SRCS-$(HAVE_NEON) += arm/intrapred_neon.c
@ -119,7 +119,7 @@ DSP_SRCS-$(HAVE_SSSE3) += x86/aom_subpixel_8t_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_SSSE3) += x86/aom_subpixel_8t_intrin_ssse3.c
ifeq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
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
@ -198,9 +198,9 @@ DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_mb_dspr2.c
DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_mb_horiz_dspr2.c
DSP_SRCS-$(HAVE_DSPR2) += mips/loopfilter_mb_vert_dspr2.c
ifeq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_loopfilter_sse2.c
endif # CONFIG_AOM_HIGHBITDEPTH
endif # CONFIG_HIGHBITDEPTH
DSP_SRCS-yes += txfm_common.h
DSP_SRCS-yes += x86/txfm_common_intrin.h
@ -272,14 +272,14 @@ DSP_SRCS-$(HAVE_MSA) += mips/idct8x8_msa.c
DSP_SRCS-$(HAVE_MSA) += mips/idct16x16_msa.c
DSP_SRCS-$(HAVE_MSA) += mips/idct32x32_msa.c
ifneq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
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_AOM_HIGHBITDEPTH
endif # CONFIG_HIGHBITDEPTH
endif # CONFIG_AV1
# quantization
@ -288,7 +288,7 @@ DSP_SRCS-yes += quantize.c
DSP_SRCS-yes += quantize.h
DSP_SRCS-$(HAVE_SSE2) += x86/quantize_sse2.c
ifeq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_quantize_intrin_sse2.c
endif
ifeq ($(ARCH_X86_64),yes)
@ -307,7 +307,7 @@ DSP_SRCS-$(HAVE_SSSE3) += x86/avg_ssse3_x86_64.asm
endif
# high bit depth subtract
ifeq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_subtract_sse2.c
endif
@ -337,7 +337,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_AOM_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_AVX2) += x86/sad_highbd_avx2.c
endif
@ -361,10 +361,10 @@ 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_AOM_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_sad4d_sse2.asm
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_sad_sse2.asm
endif # CONFIG_AOM_HIGHBITDEPTH
endif # CONFIG_HIGHBITDEPTH
endif # CONFIG_ENCODERS
@ -398,12 +398,12 @@ endif # ARCH_X86_64
DSP_SRCS-$(HAVE_SSE) += x86/subpel_variance_sse2.asm
DSP_SRCS-$(HAVE_SSE2) += x86/subpel_variance_sse2.asm # Contains SSE2 and SSSE3
ifeq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
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_AOM_HIGHBITDEPTH
endif # CONFIG_HIGHBITDEPTH
endif # CONFIG_ENCODERS
DSP_SRCS-no += $(DSP_SRCS_REMOVE-yes)

Просмотреть файл

@ -63,7 +63,7 @@ extern "C" {
typedef uint16_t qm_val_t;
#define AOM_QM_BITS 6
#endif
#if CONFIG_AOM_HIGHBITDEPTH
#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.
@ -75,7 +75,7 @@ typedef int32_t tran_low_t;
// 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_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
static INLINE uint8_t clip_pixel(int val) {
return (val > 255) ? 255 : (val < 0) ? 0 : val;
@ -89,7 +89,7 @@ static INLINE double fclamp(double value, double low, double high) {
return value < low ? low : (value > high ? high : value);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE uint16_t clip_pixel_highbd(int val, int bd) {
switch (bd) {
case 8:
@ -98,7 +98,7 @@ static INLINE uint16_t clip_pixel_highbd(int val, int bd) {
case 12: return (uint16_t)clamp(val, 0, 4095);
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#ifdef __cplusplus
} // extern "C"

Просмотреть файл

@ -63,7 +63,7 @@ foreach $dim (@tx_dims) {
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_AOM_HIGHBITDEPTH") eq "yes") {
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";
}
@ -124,7 +124,7 @@ specialize qw/aom_dc_top_predictor_32x32 msa neon sse2/;
specialize qw/aom_dc_left_predictor_32x32 msa neon sse2/;
specialize qw/aom_dc_128_predictor_32x32 msa neon sse2/;
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
specialize qw/aom_highbd_v_predictor_4x4 sse2/;
if (aom_config("CONFIG_ALT_INTRA") eq "") {
specialize qw/aom_highbd_tm_predictor_4x4 sse2/;
@ -145,7 +145,7 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
specialize qw/aom_highbd_tm_predictor_32x32 sse2/;
} # CONFIG_ALT_INTRA
specialize qw/aom_highbd_dc_predictor_32x32 sse2/;
} # CONFIG_AOM_HIGHBITDEPTH
} # CONFIG_HIGHBITDEPTH
#
# Sub Pixel Filters
@ -197,7 +197,7 @@ if (!(aom_config("CONFIG_AV1") eq "yes" && aom_config("CONFIG_EXT_PARTITION") eq
specialize qw/aom_convolve8_avg_vert neon dspr2 msa/;
}
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
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/;
@ -231,7 +231,7 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
# The _horiz/_vert functions are currently unused, so we don't bother
# specialising them.
} # CONFIG_LOOP_RESTORATION
} # CONFIG_AOM_HIGHBITDEPTH
} # CONFIG_HIGHBITDEPTH
#
# Loopfilter
@ -278,7 +278,7 @@ specialize qw/aom_lpf_horizontal_4 sse2 neon dspr2 msa/;
add_proto qw/void aom_lpf_horizontal_4_dual/, "uint8_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";
specialize qw/aom_lpf_horizontal_4_dual sse2 neon dspr2 msa/;
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
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/;
@ -314,7 +314,7 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
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/;
} # CONFIG_AOM_HIGHBITDEPTH
} # CONFIG_HIGHBITDEPTH
#
# Encoder functions.
@ -324,7 +324,7 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
# Forward transform
#
if ((aom_config("CONFIG_AV1_ENCODER") eq "yes") || (aom_config("CONFIG_PVQ") eq "yes")){
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") 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/;
@ -400,13 +400,13 @@ if ((aom_config("CONFIG_AV1_ENCODER") eq "yes") || (aom_config("CONFIG_PVQ") eq
add_proto qw/void aom_fdct32x32_1/, "const int16_t *input, tran_low_t *output, int stride";
specialize qw/aom_fdct32x32_1 sse2 avx2 msa/;
} # CONFIG_AOM_HIGHBITDEPTH
} # CONFIG_HIGHBITDEPTH
} # CONFIG_AV1_ENCODER
#
# Inverse transform
if (aom_config("CONFIG_AV1") eq "yes") {
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
# Note as optimized versions of these functions are added we need to add a check to ensure
# that when CONFIG_EMULATE_HARDWARE is on, it defaults to the C versions only.
add_proto qw/void aom_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
@ -599,7 +599,7 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
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_EMULATE_HARDWARE
} # CONFIG_AOM_HIGHBITDEPTH
} # CONFIG_HIGHBITDEPTH
} # CONFIG_AV1
#
@ -613,13 +613,13 @@ if (aom_config("CONFIG_AOM_QM") eq "yes") {
add_proto qw/void aom_quantize_b_64x64/, "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, const int16_t *quant_shift_ptr, 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, const qm_val_t * qm_ptr, const qm_val_t * iqm_ptr";
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
add_proto qw/void aom_highbd_quantize_b/, "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, const int16_t *quant_shift_ptr, 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, const qm_val_t * qm_ptr, const qm_val_t * iqm_ptr";
add_proto qw/void aom_highbd_quantize_b_32x32/, "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, const int16_t *quant_shift_ptr, 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, const qm_val_t * qm_ptr, const qm_val_t * iqm_ptr";
add_proto qw/void aom_highbd_quantize_b_64x64/, "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, const int16_t *quant_shift_ptr, 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, const qm_val_t * qm_ptr, const qm_val_t * iqm_ptr";
} # CONFIG_AOM_HIGHBITDEPTH
} # CONFIG_HIGHBITDEPTH
} # CONFIG_AV1_ENCODER
} else {
if (aom_config("CONFIG_AV1_ENCODER") eq "yes") {
@ -631,7 +631,7 @@ if (aom_config("CONFIG_AOM_QM") eq "yes") {
add_proto qw/void aom_quantize_b_64x64/, "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, const int16_t *quant_shift_ptr, 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";
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
add_proto qw/void aom_highbd_quantize_b/, "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, const int16_t *quant_shift_ptr, 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";
specialize qw/aom_highbd_quantize_b sse2/;
@ -639,7 +639,7 @@ if (aom_config("CONFIG_AOM_QM") eq "yes") {
specialize qw/aom_highbd_quantize_b_32x32 sse2/;
add_proto qw/void aom_highbd_quantize_b_64x64/, "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, const int16_t *quant_shift_ptr, 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";
} # CONFIG_AOM_HIGHBITDEPTH
} # CONFIG_HIGHBITDEPTH
} # CONFIG_AV1_ENCODER
} # CONFIG_AOM_QM
if (aom_config("CONFIG_AV1") eq "yes") {
@ -653,7 +653,7 @@ if (aom_config("CONFIG_AV1") eq "yes") {
specialize "aom_blend_a64_hmask", qw/sse4_1/;
specialize "aom_blend_a64_vmask", qw/sse4_1/;
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
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";
@ -693,7 +693,7 @@ if (aom_config("CONFIG_AV1_ENCODER") eq "yes") {
specialize qw/aom_avg_8x8 sse2 neon msa/;
add_proto qw/unsigned int aom_avg_4x4/, "const uint8_t *, int p";
specialize qw/aom_avg_4x4 sse2 neon msa/;
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
add_proto qw/unsigned int aom_highbd_avg_8x8/, "const uint8_t *, int p";
add_proto qw/unsigned int aom_highbd_avg_4x4/, "const uint8_t *, int p";
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";
@ -705,7 +705,7 @@ if (aom_config("CONFIG_AV1_ENCODER") eq "yes") {
#
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_AOM_HIGHBITDEPTH") eq "yes") {
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";
}
@ -771,7 +771,7 @@ specialize qw/aom_sad8x4_avg msa sse2/;
specialize qw/aom_sad4x8_avg msa sse2/;
specialize qw/aom_sad4x4_avg msa sse2/;
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
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";
@ -816,7 +816,7 @@ if (aom_config("CONFIG_EXT_INTER") eq "yes") {
specialize "aom_masked_sad${w}x${h}", qw/ssse3/;
}
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
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 *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *mask, int mask_stride";
@ -835,7 +835,7 @@ if (aom_config("CONFIG_MOTION_VAR") eq "yes") {
specialize "aom_obmc_sad${w}x${h}", qw/sse4_1/;
}
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
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";
@ -881,7 +881,7 @@ specialize qw/aom_sad8x4x8 msa/;
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_AOM_HIGHBITDEPTH") eq "yes") {
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";
@ -923,7 +923,7 @@ specialize qw/aom_sad8x4x4d msa sse2/;
specialize qw/aom_sad4x8x4d msa sse2/;
specialize qw/aom_sad4x4x4d msa sse2/;
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
#
# Multi-block SAD, comparing a reference to N independent blocks
#
@ -957,7 +957,7 @@ if (aom_config("CONFIG_INTERNAL_STATS") eq "yes") {
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_AOM_HIGHBITDEPTH") eq "yes") {
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";
}
}
@ -986,7 +986,7 @@ specialize qw/aom_mse16x8 sse2 msa/;
specialize qw/aom_mse8x16 sse2 msa/;
specialize qw/aom_mse8x8 sse2 msa/;
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
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";
@ -1009,7 +1009,7 @@ specialize qw/aom_upsampled_pred sse2/;
add_proto qw/void aom_comp_avg_upsampled_pred/, "uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride";
specialize qw/aom_comp_avg_upsampled_pred sse2/;
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
add_proto qw/void aom_highbd_upsampled_pred/, "uint16_t *comp_pred, int width, int height, const uint8_t *ref8, int ref_stride";
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, const uint8_t *ref8, int ref_stride";
@ -1082,7 +1082,7 @@ specialize qw/aom_sub_pixel_avg_variance8x8 msa sse2 ssse3/;
specialize qw/aom_sub_pixel_avg_variance8x4 msa sse2 ssse3/;
specialize qw/aom_sub_pixel_avg_variance4x8 msa sse2 ssse3/;
specialize qw/aom_sub_pixel_avg_variance4x4 msa sse2 ssse3/;
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
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";
@ -1111,7 +1111,7 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
}
}
}
} # CONFIG_AOM_HIGHBITDEPTH
} # CONFIG_HIGHBITDEPTH
if (aom_config("CONFIG_EXT_INTER") eq "yes") {
#
@ -1125,7 +1125,7 @@ if (aom_config("CONFIG_EXT_INTER") eq "yes") {
specialize "aom_masked_sub_pixel_variance${w}x${h}", qw/ssse3/;
}
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
foreach $bd ("_", "_10_", "_12_") {
foreach (@block_sizes) {
($w, $h) = @$_;
@ -1149,7 +1149,7 @@ if (aom_config("CONFIG_MOTION_VAR") eq "yes") {
specialize "aom_obmc_variance${w}x${h}", q/sse4_1/;
}
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
foreach $bd ("_", "_10_", "_12_") {
foreach (@block_sizes) {
($w, $h) = @$_;
@ -1216,7 +1216,7 @@ add_proto qw/uint32_t aom_variance_halfpixvar16x16_hv/, "const unsigned char *sr
# Comp Avg
#
add_proto qw/void aom_comp_avg_pred/, "uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride";
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
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/;
@ -1573,7 +1573,7 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
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_AOM_HIGHBITDEPTH
} # CONFIG_HIGHBITDEPTH
} # CONFIG_ENCODERS

Просмотреть файл

@ -191,7 +191,7 @@ void aom_minmax_8x8_c(const uint8_t *src, int src_stride, const uint8_t *ref,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
unsigned int aom_highbd_avg_8x8_c(const uint8_t *src, int stride) {
int i, j;
int sum = 0;
@ -229,4 +229,4 @@ void aom_highbd_minmax_8x8_c(const uint8_t *s8, int p, const uint8_t *d8,
}
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -40,7 +40,7 @@ void aom_blend_a64_hmask_c(uint8_t *dst, uint32_t dst_stride,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#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 +68,4 @@ void aom_highbd_blend_a64_hmask_c(uint8_t *dst_8, uint32_t dst_stride,
}
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -79,7 +79,7 @@ void aom_blend_a64_mask_c(uint8_t *dst, uint32_t dst_stride,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#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,
@ -142,4 +142,4 @@ void aom_highbd_blend_a64_mask_c(uint8_t *dst_8, uint32_t dst_stride,
}
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -41,7 +41,7 @@ void aom_blend_a64_vmask_c(uint8_t *dst, uint32_t dst_stride,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#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 +70,4 @@ void aom_highbd_blend_a64_vmask_c(uint8_t *dst_8, uint32_t dst_stride,
}
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -25,7 +25,7 @@ typedef struct fs_ctx fs_ctx;
#define SSIM_C1 (255 * 255 * 0.01 * 0.01)
#define SSIM_C2 (255 * 255 * 0.03 * 0.03)
#if CONFIG_AOM_HIGHBITDEPTH
#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)
@ -198,7 +198,7 @@ static void fs_apply_luminance(fs_ctx *_ctx, int _l, int bit_depth) {
int i;
int j;
double ssim_c1 = SSIM_C1;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (bit_depth == 10) ssim_c1 = SSIM_C1_10;
if (bit_depth == 12) ssim_c1 = SSIM_C1_12;
#else
@ -323,7 +323,7 @@ static void fs_calc_structure(fs_ctx *_ctx, int _l, int bit_depth) {
int i;
int j;
double ssim_c2 = SSIM_C2;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (bit_depth == 10) ssim_c2 = SSIM_C2_10;
if (bit_depth == 12) ssim_c2 = SSIM_C2_12;
#else

Просмотреть файл

@ -767,7 +767,7 @@ void aom_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride) {
output[0] = (tran_low_t)(sum >> 3);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void aom_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output,
int stride) {
aom_fdct4x4_c(input, output, stride);
@ -806,4 +806,4 @@ void aom_highbd_fdct32x32_1_c(const int16_t *input, tran_low_t *out,
int stride) {
aom_fdct32x32_1_c(input, out, stride);
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -745,7 +745,7 @@ void aom_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride,
DST(1, 3) = AVG3(L, K, J);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE void highbd_d207_predictor(uint16_t *dst, ptrdiff_t stride,
int bs, const uint16_t *above,
const uint16_t *left, int bd) {
@ -1152,7 +1152,7 @@ static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride, int bs,
dst += stride;
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#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
@ -1164,7 +1164,7 @@ static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride, int bs,
type##_predictor(dst, stride, size, above, left); \
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
#define intra_pred_highbd_sized(type, size) \
void aom_highbd_##type##_predictor_##size##x##size##_c( \
uint16_t *dst, ptrdiff_t stride, const uint16_t *above, \
@ -1249,7 +1249,7 @@ static INLINE void highbd_dc_predictor(uint16_t *dst, ptrdiff_t stride, int bs,
intra_pred_sized(type, 16) \
intra_pred_sized(type, 32)
#endif // CONFIG_TX64X64
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
intra_pred_above_4x4(d207)
intra_pred_above_4x4(d63)

Просмотреть файл

@ -1252,7 +1252,7 @@ void aom_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void aom_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8,
int stride, int bd) {
/* 4-point reversible, orthonormal inverse Walsh-Hadamard in 3.5 adds,
@ -2491,4 +2491,4 @@ void aom_highbd_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest8,
dest += stride;
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -41,7 +41,7 @@ static INLINE tran_high_t dct_const_round_shift(tran_high_t input) {
return rv;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE tran_high_t highbd_check_range(tran_high_t input, int bd) {
#if CONFIG_COEFFICIENT_RANGE_CHECKING
// For valid highbitdepth AV1 streams, intermediate stage coefficients will
@ -59,7 +59,7 @@ static INLINE tran_high_t highbd_check_range(tran_high_t input, int bd) {
return input;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#if CONFIG_EMULATE_HARDWARE
// When CONFIG_EMULATE_HARDWARE is 1 the transform performs a
@ -80,17 +80,17 @@ static INLINE tran_high_t highbd_check_range(tran_high_t input, int bd) {
// bd of x uses trans_low with 8+x bits, need to remove 24-x bits
#define WRAPLOW(x) ((((int32_t)check_range(x)) << 16) >> 16)
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
#define HIGHBD_WRAPLOW(x, bd) \
((((int32_t)highbd_check_range((x), bd)) << (24 - bd)) >> (24 - bd))
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#else // CONFIG_EMULATE_HARDWARE
#define WRAPLOW(x) ((int32_t)check_range(x))
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
#define HIGHBD_WRAPLOW(x, bd) ((int32_t)highbd_check_range((x), bd))
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_EMULATE_HARDWARE
void aom_idct4_c(const tran_low_t *input, tran_low_t *output);
@ -101,7 +101,7 @@ void aom_iadst4_c(const tran_low_t *input, tran_low_t *output);
void aom_iadst8_c(const tran_low_t *input, tran_low_t *output);
void aom_iadst16_c(const tran_low_t *input, tran_low_t *output);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void aom_highbd_idct4_c(const tran_low_t *input, tran_low_t *output, int bd);
void aom_highbd_idct8_c(const tran_low_t *input, tran_low_t *output, int bd);
void aom_highbd_idct16_c(const tran_low_t *input, tran_low_t *output, int bd);

Просмотреть файл

@ -20,7 +20,7 @@ static INLINE int8_t signed_char_clamp(int t) {
return (int8_t)clamp(t, -128, 127);
}
#if CONFIG_AOM_HIGHBITDEPTH
#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);
@ -371,7 +371,7 @@ void aom_lpf_vertical_16_dual_c(uint8_t *s, int p, const uint8_t *blimit,
mb_lpf_vertical_edge_w(s, p, blimit, limit, thresh, 16);
}
#if CONFIG_AOM_HIGHBITDEPTH
#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,
@ -782,4 +782,4 @@ void aom_highbd_lpf_vertical_16_dual_c(uint16_t *s, int p,
const uint8_t *thresh, int bd) {
highbd_mb_lpf_vertical_edge_w(s, p, blimit, limit, thresh, 16, bd);
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -48,7 +48,7 @@ static void encoder_variance(const uint8_t *a, int a_stride, const uint8_t *b,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#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 +80,7 @@ static void encoder_highbd_8_variance(const uint8_t *a8, int a_stride,
*sse = (unsigned int)sse_long;
*sum = (int)sum_long;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#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 +122,7 @@ static int64_t get_sse(const uint8_t *a, int a_stride, const uint8_t *b,
return total_sse;
}
#if CONFIG_AOM_HIGHBITDEPTH
#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 +175,7 @@ static int64_t highbd_get_sse(const uint8_t *a, int a_stride, const uint8_t *b,
}
return total_sse;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#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 +228,7 @@ int64_t aom_get_v_sse(const YV12_BUFFER_CONFIG *a,
a->uv_crop_width, a->uv_crop_height);
}
#if CONFIG_AOM_HIGHBITDEPTH
#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,9 +287,9 @@ int64_t aom_highbd_get_v_sse(const YV12_BUFFER_CONFIG *a,
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_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#if CONFIG_AOM_HIGHBITDEPTH
#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) {
@ -336,7 +336,7 @@ void aom_calc_highbd_psnr(const YV12_BUFFER_CONFIG *a,
aom_sse_to_psnr((double)total_samples, peak, (double)total_sse);
}
#endif // !CONFIG_AOM_HIGHBITDEPTH
#endif // !CONFIG_HIGHBITDEPTH
void aom_calc_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b,
PSNR_STATS *psnr) {

Просмотреть файл

@ -47,7 +47,7 @@ int64_t aom_get_v_sse_part(const YV12_BUFFER_CONFIG *a,
const YV12_BUFFER_CONFIG *b, int hstart, int width,
int vstart, int height);
int64_t aom_get_v_sse(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b);
#if CONFIG_AOM_HIGHBITDEPTH
#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);

Просмотреть файл

@ -38,7 +38,7 @@ static void od_bin_fdct8x8(tran_low_t *y, int ystride, const int16_t *x,
*(y + ystride * i + j) = (*(y + ystride * i + j) + 4) >> 3;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void hbd_od_bin_fdct8x8(tran_low_t *y, int ystride, const int16_t *x,
int xstride) {
int i, j;
@ -212,7 +212,7 @@ static double calc_psnrhvs(const unsigned char *src, int _systride,
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_AOM_HIGHBITDEPTH
#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);

Просмотреть файл

@ -40,7 +40,7 @@ void aom_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block,
*eob_ptr = eob + 1;
}
#if CONFIG_AOM_HIGHBITDEPTH
#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, tran_low_t *qcoeff_ptr,
@ -131,7 +131,7 @@ void aom_quantize_dc_64x64(const tran_low_t *coeff_ptr, int skip_block,
}
#endif // CONFIG_TX64X64
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void aom_highbd_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block,
const int16_t *round_ptr, const int16_t quant,
tran_low_t *qcoeff_ptr,
@ -256,7 +256,7 @@ void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
*eob_ptr = eob + 1;
}
#if CONFIG_AOM_HIGHBITDEPTH
#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,
@ -446,7 +446,7 @@ void aom_quantize_b_64x64_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
}
#endif // CONFIG_TX64X64
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void aom_highbd_quantize_b_32x32_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,
@ -566,7 +566,7 @@ void aom_highbd_quantize_b_64x64_c(
*eob_ptr = eob + 1;
}
#endif // CONFIG_TX64X64
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#else
@ -593,7 +593,7 @@ void aom_quantize_dc(const tran_low_t *coeff_ptr, int n_coeffs, int skip_block,
*eob_ptr = eob + 1;
}
#if CONFIG_AOM_HIGHBITDEPTH
#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, tran_low_t *qcoeff_ptr,
@ -670,7 +670,7 @@ void aom_quantize_dc_64x64(const tran_low_t *coeff_ptr, int skip_block,
}
#endif // CONFIG_TX64X64
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void aom_highbd_quantize_dc_32x32(const tran_low_t *coeff_ptr, int skip_block,
const int16_t *round_ptr, const int16_t quant,
tran_low_t *qcoeff_ptr,
@ -774,7 +774,7 @@ void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
*eob_ptr = eob + 1;
}
#if CONFIG_AOM_HIGHBITDEPTH
#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,
@ -935,7 +935,7 @@ void aom_quantize_b_64x64_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
}
#endif // CONFIG_TX64X64
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void aom_highbd_quantize_b_32x32_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,

Просмотреть файл

@ -45,7 +45,7 @@ void aom_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
uint16_t *eob_ptr, const int16_t *scan,
const int16_t *iscan, const qm_val_t *qm_ptr,
const qm_val_t *iqm_ptr);
#if CONFIG_AOM_HIGHBITDEPTH
#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,
@ -72,7 +72,7 @@ void aom_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
const int16_t *dequant_ptr, uint16_t *eob_ptr,
const int16_t *scan, const int16_t *iscan,
const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#else // CONFIG_AOM_QM
@ -90,7 +90,7 @@ void aom_quantize_dc_64x64(const tran_low_t *coeff_ptr, int skip_block,
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
const int16_t dequant_ptr, uint16_t *eob_ptr);
#endif // CONFIG_TX64X64
#if CONFIG_AOM_HIGHBITDEPTH
#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,
@ -110,7 +110,7 @@ void aom_highbd_quantize_dc_64x64(const tran_low_t *coeff_ptr, int skip_block,
tran_low_t *dqcoeff_ptr,
const int16_t dequant_ptr, uint16_t *eob_ptr);
#endif // CONFIG_TX64X64
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_AOM_QM
#ifdef __cplusplus

Просмотреть файл

@ -154,7 +154,7 @@ sadMxNxK(4, 4, 8)
sadMxNx4D(4, 4)
/* clang-format on */
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE
unsigned int highbd_sad(const uint8_t *a8, int a_stride, const uint8_t *b8,
int b_stride, int width, int height) {
@ -307,7 +307,7 @@ highbd_sadMxNxK(4, 4, 3)
highbd_sadMxNxK(4, 4, 8)
highbd_sadMxNx4D(4, 4)
/* clang-format on */
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#if CONFIG_AV1 && CONFIG_EXT_INTER
static INLINE
@ -358,7 +358,7 @@ MASKSADMxN(4, 8)
MASKSADMxN(4, 4)
/* clang-format on */
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE
unsigned int highbd_masked_sad(const uint8_t *a8, int a_stride,
const uint8_t *b8, int b_stride,
@ -407,7 +407,7 @@ HIGHBD_MASKSADMXN(8, 8)
HIGHBD_MASKSADMXN(8, 4)
HIGHBD_MASKSADMXN(4, 8)
HIGHBD_MASKSADMXN(4, 4)
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_AV1 && CONFIG_EXT_INTER
#if CONFIG_AV1 && CONFIG_MOTION_VAR
@ -460,7 +460,7 @@ OBMCSADMxN(4, 8)
OBMCSADMxN(4, 4)
/* clang-format on */
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE
unsigned int highbd_obmc_sad(const uint8_t *pre8, int pre_stride,
const int32_t *wsrc, const int32_t *mask,
@ -508,5 +508,5 @@ HIGHBD_OBMCSADMXN(8, 4)
HIGHBD_OBMCSADMXN(4, 8)
HIGHBD_OBMCSADMXN(4, 4)
/* clang-format on */
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_AV1 && CONFIG_MOTION_VAR

Просмотреть файл

@ -46,7 +46,7 @@ void aom_ssim_parms_8x8_c(const uint8_t *s, int sp, const uint8_t *r, int rp,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#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,7 @@ void aom_highbd_ssim_parms_8x8_c(const uint16_t *s, int sp, const uint16_t *r,
}
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#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 +108,7 @@ static double ssim_8x8(const uint8_t *s, int sp, const uint8_t *r, int rp) {
return similarity(sum_s, sum_r, sum_sq_s, sum_sq_r, sum_sxr, 64, 8);
}
#if CONFIG_AOM_HIGHBITDEPTH
#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 +117,7 @@ static double highbd_ssim_8x8(const uint16_t *s, int sp, const uint16_t *r,
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_AOM_HIGHBITDEPTH
#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 +142,7 @@ static double aom_ssim2(const uint8_t *img1, const uint8_t *img2,
return ssim_total;
}
#if CONFIG_AOM_HIGHBITDEPTH
#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 +164,7 @@ static double aom_highbd_ssim2(const uint8_t *img1, const uint8_t *img2,
ssim_total /= samples;
return ssim_total;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
double aom_calc_ssim(const YV12_BUFFER_CONFIG *source,
const YV12_BUFFER_CONFIG *dest, double *weight) {
@ -429,7 +429,7 @@ double aom_get_ssim_metrics(uint8_t *img1, int img1_pitch, uint8_t *img2,
return inconsistency_total;
}
#if CONFIG_AOM_HIGHBITDEPTH
#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) {
@ -459,4 +459,4 @@ double aom_highbd_calc_ssim(const YV12_BUFFER_CONFIG *source,
return ssimv;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -75,11 +75,11 @@ double aom_calc_fastssim(const YV12_BUFFER_CONFIG *source,
double *ssim_u, double *ssim_v, uint32_t bd,
uint32_t in_bd);
#if CONFIG_AOM_HIGHBITDEPTH
#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_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#ifdef __cplusplus
} // extern "C"

Просмотреть файл

@ -32,7 +32,7 @@ void aom_subtract_block_c(int rows, int cols, int16_t *diff,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#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 +52,4 @@ void aom_highbd_subtract_block_c(int rows, int cols, int16_t *diff,
src += src_stride;
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -300,7 +300,7 @@ void aom_comp_avg_upsampled_pred_c(uint8_t *comp_pred, const uint8_t *pred,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#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) {
@ -669,7 +669,7 @@ void aom_highbd_comp_avg_upsampled_pred_c(uint16_t *comp_pred,
ref += stride;
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#if CONFIG_AV1 && CONFIG_EXT_INTER
void masked_variance(const uint8_t *a, int a_stride, const uint8_t *b,
@ -772,7 +772,7 @@ MASK_VAR(128, 128)
MASK_SUBPIX_VAR(128, 128)
#endif // CONFIG_EXT_PARTITION
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void highbd_masked_variance64(const uint8_t *a8, int a_stride,
const uint8_t *b8, int b_stride, const uint8_t *m,
int m_stride, int w, int h, uint64_t *sse,
@ -961,7 +961,7 @@ HIGHBD_MASK_SUBPIX_VAR(128, 64)
HIGHBD_MASK_VAR(128, 128)
HIGHBD_MASK_SUBPIX_VAR(128, 128)
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_AV1 && CONFIG_EXT_INTER
#if CONFIG_AV1 && CONFIG_MOTION_VAR
@ -1060,7 +1060,7 @@ OBMC_VAR(128, 128)
OBMC_SUBPIX_VAR(128, 128)
#endif // CONFIG_EXT_PARTITION
#if CONFIG_AOM_HIGHBITDEPTH
#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,
@ -1237,5 +1237,5 @@ HIGHBD_OBMC_SUBPIX_VAR(128, 64)
HIGHBD_OBMC_VAR(128, 128)
HIGHBD_OBMC_SUBPIX_VAR(128, 128)
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_AV1 && CONFIG_MOTION_VAR

Просмотреть файл

@ -120,10 +120,10 @@ void aom_highbd_var_filter_block2d_bil_second_pass(
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_AOM_HIGHBITDEPTH
#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_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#ifdef __cplusplus
} // extern "C"

Просмотреть файл

@ -78,7 +78,7 @@ FUN_CONV_1D(avg_vert, y_step_q4, filter_y, v, src - src_stride * 3, avg_, sse2);
FUN_CONV_2D(, sse2);
FUN_CONV_2D(avg_, sse2);
#if CONFIG_AOM_HIGHBITDEPTH && ARCH_X86_64
#if CONFIG_HIGHBITDEPTH && 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 @@ void aom_highbd_convolve8_add_src_sse2(const uint8_t *src, ptrdiff_t src_stride,
((int16_t *)filter_y)[3] -= 128;
}
#endif // CONFIG_LOOP_RESTORATION
#endif // CONFIG_AOM_HIGHBITDEPTH && ARCH_X86_64
#endif // CONFIG_HIGHBITDEPTH && ARCH_X86_64
#endif // HAVE_SSE2

Просмотреть файл

@ -339,7 +339,7 @@ cglobal convolve_%1, 4, 7, 4+AUX_XMM_REGS, src, src_stride, \
INIT_XMM sse2
convolve_fn copy
convolve_fn avg
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
convolve_fn copy, highbd
convolve_fn avg, highbd
%endif

Просмотреть файл

@ -24,7 +24,7 @@ void aom_blend_a64_hmask_sse4_1(uint8_t *dst, uint32_t dst_stride,
src1_stride, mask, 0, h, w, 0, 0);
}
#if CONFIG_AOM_HIGHBITDEPTH
#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 +33,4 @@ void aom_highbd_blend_a64_hmask_sse4_1(
src1_8, src1_stride, mask, 0, h, w, 0, 0,
bd);
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -473,7 +473,7 @@ void aom_blend_a64_mask_sse4_1(uint8_t *dst, uint32_t dst_stride,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
//////////////////////////////////////////////////////////////////////////////
// No sub-sampling
//////////////////////////////////////////////////////////////////////////////
@ -921,4 +921,4 @@ void aom_highbd_blend_a64_mask_sse4_1(uint8_t *dst_8, uint32_t dst_stride,
mask_stride, h, w);
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -143,7 +143,7 @@ void aom_blend_a64_vmask_sse4_1(uint8_t *dst, uint32_t dst_stride,
w);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
//////////////////////////////////////////////////////////////////////////////
// Implementation - No sub-sampling
//////////////////////////////////////////////////////////////////////////////
@ -282,4 +282,4 @@ void aom_highbd_blend_a64_vmask_sse4_1(
src1_stride, mask, h, w);
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -53,7 +53,7 @@ static INLINE __m128i blend_8(const uint8_t *src0, const uint8_t *src1,
return v_res_w;
}
#if CONFIG_AOM_HIGHBITDEPTH
#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 +141,6 @@ static INLINE __m128i blend_8_b12(const uint16_t *src0, const uint16_t *src1,
return v_res_w;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // AOM_DSP_X86_BLEND_SSE4_H_

Просмотреть файл

@ -179,7 +179,7 @@ typedef void filter8_1dfunction(const uint8_t *src_ptr, ptrdiff_t src_pitch,
}
#endif
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
typedef void highbd_filter8_1dfunction(const uint16_t *src_ptr,
const ptrdiff_t src_pitch,
uint16_t *output_ptr,
@ -283,6 +283,6 @@ typedef void highbd_filter8_1dfunction(const uint16_t *src_ptr,
w, h, bd); \
} \
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // AOM_DSP_X86_CONVOLVE_H_

Просмотреть файл

@ -15,7 +15,7 @@
#include "./aom_config.h"
static INLINE void storeu_output_avx2(const __m256i *coeff, tran_low_t *out) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
const __m256i zero = _mm256_setzero_si256();
const __m256i sign = _mm256_cmpgt_epi16(zero, *coeff);

Просмотреть файл

@ -248,7 +248,7 @@ void aom_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output,
#undef FDCT32x32_HIGH_PRECISION
#undef DCT_HIGH_BIT_DEPTH
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
#define DCT_HIGH_BIT_DEPTH 1
#define FDCT4x4_2D aom_highbd_fdct4x4_sse2
#define FDCT8x8_2D aom_highbd_fdct8x8_sse2
@ -270,4 +270,4 @@ void aom_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output,
#undef FDCT32x32_2D
#undef FDCT32x32_HIGH_PRECISION
#undef DCT_HIGH_BIT_DEPTH
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -247,7 +247,7 @@ static INLINE int k_check_epi32_overflow_32(
}
static INLINE void store_output(const __m128i *poutput, tran_low_t *dst_ptr) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
const __m128i zero = _mm_setzero_si128();
const __m128i sign_bits = _mm_cmplt_epi16(*poutput, zero);
__m128i out0 = _mm_unpacklo_epi16(*poutput, sign_bits);
@ -256,7 +256,7 @@ static INLINE void store_output(const __m128i *poutput, tran_low_t *dst_ptr) {
_mm_store_si128((__m128i *)(dst_ptr + 4), out1);
#else
_mm_store_si128((__m128i *)(dst_ptr), *poutput);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
}
static INLINE __m128i mult_round_shift(const __m128i *pin0, const __m128i *pin1,

Просмотреть файл

@ -131,7 +131,7 @@ SECTION .text
%endmacro
%macro STORE_OUTPUT 2 ; index, result
%if CONFIG_AOM_HIGHBITDEPTH
%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);

Просмотреть файл

@ -15,7 +15,7 @@
#include "aom_mem/aom_mem.h"
#include "aom_ports/mem.h"
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void aom_highbd_quantize_b_sse2(const tran_low_t *coeff_ptr, intptr_t count,
int skip_block, const int16_t *zbin_ptr,
const int16_t *round_ptr,

Просмотреть файл

@ -3548,7 +3548,7 @@ void idct32_8col(__m128i *in0, __m128i *in1) {
in1[15] = _mm_sub_epi16(stp1_0, stp1_31);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE __m128i clamp_high_sse2(__m128i value, int bd) {
__m128i ubounded, retval;
const __m128i zero = _mm_set1_epi16(0);
@ -4110,4 +4110,4 @@ void aom_highbd_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest8,
}
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -102,7 +102,7 @@ static INLINE void array_transpose_16x16(__m128i *res0, __m128i *res1) {
// Function to allow 8 bit optimisations to be used when profile 0 is used with
// highbitdepth enabled
static INLINE __m128i load_input_data(const tran_low_t *data) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
return octa_set_epi16(data[0], data[1], data[2], data[3], data[4], data[5],
data[6], data[7]);
#else

Просмотреть файл

@ -223,7 +223,7 @@ cglobal idct8x8_64_add, 3, 5, 13, input, output, stride
mova m12, [pw_11585x2]
lea r3, [2 * strideq]
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
mova m0, [inputq + 0]
packssdw m0, [inputq + 16]
mova m1, [inputq + 32]
@ -274,7 +274,7 @@ cglobal idct8x8_12_add, 3, 5, 13, input, output, stride
lea r3, [2 * strideq]
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
mova m0, [inputq + 0]
packssdw m0, [inputq + 16]
mova m1, [inputq + 32]
@ -796,7 +796,7 @@ idct32x32_34:
lea r4, [rsp + transposed_in]
idct32x32_34_transpose:
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
mova m0, [r3 + 0]
packssdw m0, [r3 + 16]
mova m1, [r3 + 32 * 4]
@ -1226,7 +1226,7 @@ idct32x32_135:
mov r7, 2
idct32x32_135_transpose:
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
mova m0, [r3 + 0]
packssdw m0, [r3 + 16]
mova m1, [r3 + 32 * 4]
@ -1264,7 +1264,7 @@ idct32x32_135_transpose:
mova [r4 + 16 * 6], m6
mova [r4 + 16 * 7], m7
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
add r3, 32
%else
add r3, 16
@ -1275,7 +1275,7 @@ idct32x32_135_transpose:
IDCT32X32_135 16*0, 16*32, 16*64, 16*96
lea stp, [stp + 16 * 8]
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
lea inputq, [inputq + 32 * 32]
%else
lea inputq, [inputq + 16 * 32]
@ -1690,7 +1690,7 @@ idct32x32_1024:
mov r7, 4
idct32x32_1024_transpose:
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
mova m0, [r3 + 0]
packssdw m0, [r3 + 16]
mova m1, [r3 + 32 * 4]
@ -1728,7 +1728,7 @@ idct32x32_1024_transpose:
mova [r4 + 16 * 5], m5
mova [r4 + 16 * 6], m6
mova [r4 + 16 * 7], m7
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
add r3, 32
%else
add r3, 16
@ -1740,7 +1740,7 @@ idct32x32_1024_transpose:
IDCT32X32_1024 16*0, 16*32, 16*64, 16*96
lea stp, [stp + 16 * 8]
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
lea inputq, [inputq + 32 * 32]
%else
lea inputq, [inputq + 16 * 32]

Просмотреть файл

@ -85,7 +85,7 @@ SECTION .text
INIT_XMM sse2
cglobal iwht4x4_16_add, 3, 3, 7, input, output, stride
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
mova m0, [inputq + 0]
packssdw m0, [inputq + 16]
mova m1, [inputq + 32]

Просмотреть файл

@ -204,7 +204,7 @@ static INLINE unsigned int masked_sad4xh_ssse3(
return (_mm_cvtsi128_si32(res) + 31) >> 6;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE __m128i highbd_width4_load_2rows(const uint16_t *ptr,
int stride) {
__m128i temp1 = _mm_loadl_epi64((const __m128i *)ptr);
@ -331,4 +331,4 @@ static INLINE unsigned int highbd_masked_sad4xh_ssse3(
// sad = (sad + 31) >> 6;
return (_mm_cvtsi128_si32(res) + 31) >> 6;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -45,14 +45,14 @@ static INLINE int64_t hsum_epi64_si64(__m128i v_q) {
#endif
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE int64_t hsum_epi32_si64(__m128i v_d) {
const __m128i v_sign_d = _mm_cmplt_epi32(v_d, _mm_setzero_si128());
const __m128i v_0_q = _mm_unpacklo_epi32(v_d, v_sign_d);
const __m128i v_1_q = _mm_unpackhi_epi32(v_d, v_sign_d);
return hsum_epi64_si64(_mm_add_epi64(v_0_q, v_1_q));
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
static INLINE uint32_t calc_masked_variance(__m128i v_sum_d, __m128i v_sse_q,
uint32_t *sse, const int w,
@ -305,7 +305,7 @@ static INLINE unsigned int masked_variance4xh_ssse3(
MASKED_VAR4XH(4)
MASKED_VAR4XH(8)
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
// Main calculation for n*8 wide blocks
static INLINE void highbd_masked_variance64_ssse3(
@ -1316,7 +1316,7 @@ MASK_SUBPIX_VAR_LARGE(128, 64)
MASK_SUBPIX_VAR_LARGE(128, 128)
#endif // CONFIG_EXT_PARTITION
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
typedef uint32_t (*highbd_calc_masked_var_t)(__m128i v_sum_d, __m128i v_sse_q,
uint32_t *sse, const int w,
const int h);

Просмотреть файл

@ -141,7 +141,7 @@ OBMCSADWXH(4, 4)
// High bit-depth
////////////////////////////////////////////////////////////////////////////////
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE unsigned int hbd_obmc_sad_w4(const uint8_t *pre8,
const int pre_stride,
const int32_t *wsrc,
@ -259,4 +259,4 @@ HBD_OBMCSADWXH(8, 8)
HBD_OBMCSADWXH(8, 4)
HBD_OBMCSADWXH(4, 8)
HBD_OBMCSADWXH(4, 4)
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -150,7 +150,7 @@ OBMCVARWXH(4, 4)
// High bit-depth
////////////////////////////////////////////////////////////////////////////////
#if CONFIG_AOM_HIGHBITDEPTH
#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) {
@ -348,4 +348,4 @@ HBD_OBMCVARWXH(8, 8)
HBD_OBMCVARWXH(8, 4)
HBD_OBMCVARWXH(4, 8)
HBD_OBMCVARWXH(4, 4)
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -44,7 +44,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
mova m0, [zbinq] ; m0 = zbin
; Get DC and first 15 AC coeffs - in this special case, that is all.
%if CONFIG_AOM_HIGHBITDEPTH
%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]
@ -76,7 +76,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
ptest m14, m14
jnz .single_nonzero
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
mova [r1 ], ymm5
mova [r1+32], ymm5
mova [r2 ], ymm5
@ -124,7 +124,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
pand m8, m7
pand m13, m12
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
; Store 16bit numbers as 32bit numbers in array pointed to by qcoeff
pcmpgtw m6, m5, m8
punpckhwd m6, m8, m6
@ -145,7 +145,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
punpckhqdq m3, m3
pmullw m13, m3 ; dqc[i] = qc[i] * q
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
; Store 16bit numbers as 32bit numbers in array pointed to by qcoeff
pcmpgtw m6, m5, m8
punpckhwd m6, m8, m6
@ -229,7 +229,7 @@ DEFINE_ARGS coeff, ncoeff, skip, zbin, round, quant, shift, \
DEFINE_ARGS coeff, ncoeff, d1, qcoeff, dqcoeff, iscan, d2, d3, d4, d5, eob
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
lea coeffq, [ coeffq+ncoeffq*4]
lea qcoeffq, [ qcoeffq+ncoeffq*4]
lea dqcoeffq, [dqcoeffq+ncoeffq*4]
@ -242,7 +242,7 @@ DEFINE_ARGS coeff, ncoeff, skip, zbin, round, quant, shift, \
neg ncoeffq
; get DC and first 15 AC coeffs
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
; coeff stored as 32bit numbers & require 16bit numbers
mova m9, [coeffq+ncoeffq*4+ 0]
packssdw m9, [coeffq+ncoeffq*4+16]
@ -264,7 +264,7 @@ DEFINE_ARGS coeff, ncoeff, skip, zbin, round, quant, shift, \
ptest m14, m14
jnz .first_nonzero
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
mova [qcoeffq+ncoeffq*4 ], ymm5
mova [qcoeffq+ncoeffq*4+32], ymm5
mova [dqcoeffq+ncoeffq*4 ], ymm5
@ -302,7 +302,7 @@ DEFINE_ARGS coeff, ncoeff, skip, zbin, round, quant, shift, \
pand m8, m7
pand m13, m12
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
; store 16bit numbers as 32bit numbers in array pointed to by qcoeff
pcmpgtw m6, m5, m8
punpckhwd m6, m8, m6
@ -333,7 +333,7 @@ DEFINE_ARGS coeff, ncoeff, skip, zbin, round, quant, shift, \
psignw m13, m10
%endif
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
; store 16bit numbers as 32bit numbers in array pointed to by qcoeff
pcmpgtw m6, m5, m8
punpckhwd m6, m8, m6
@ -363,7 +363,7 @@ DEFINE_ARGS coeff, ncoeff, skip, zbin, round, quant, shift, \
.ac_only_loop:
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
; pack coeff from 32bit to 16bit array
mova m9, [coeffq+ncoeffq*4+ 0]
packssdw m9, [coeffq+ncoeffq*4+16]
@ -385,7 +385,7 @@ DEFINE_ARGS coeff, ncoeff, skip, zbin, round, quant, shift, \
ptest m14, m14
jnz .rest_nonzero
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
mova [qcoeffq+ncoeffq*4+ 0], ymm5
mova [qcoeffq+ncoeffq*4+32], ymm5
mova [dqcoeffq+ncoeffq*4+ 0], ymm5
@ -424,7 +424,7 @@ DEFINE_ARGS coeff, ncoeff, skip, zbin, round, quant, shift, \
pand m14, m7
pand m13, m12
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
; store 16bit numbers as 32bit numbers in array pointed to by qcoeff
pcmpgtw m6, m5, m14
punpckhwd m6, m14, m6
@ -454,7 +454,7 @@ DEFINE_ARGS coeff, ncoeff, skip, zbin, round, quant, shift, \
psignw m13, m10
%endif
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
; store 16bit numbers as 32bit numbers in array pointed to by qcoeff
pcmpgtw m6, m5, m14
punpckhwd m6, m14, m6
@ -510,7 +510,7 @@ DEFINE_ARGS coeff, ncoeff, skip, zbin, round, quant, shift, \
DEFINE_ARGS dqcoeff, ncoeff, qcoeff, eob
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
lea dqcoeffq, [dqcoeffq+ncoeffq*4]
lea qcoeffq, [ qcoeffq+ncoeffq*4]
%else
@ -522,7 +522,7 @@ DEFINE_ARGS dqcoeff, ncoeff, qcoeff, eob
pxor m7, m7
.blank_loop:
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
mova [dqcoeffq+ncoeffq*4+ 0], ymm7
mova [dqcoeffq+ncoeffq*4+32], ymm7
mova [qcoeffq+ncoeffq*4+ 0], ymm7

Просмотреть файл

@ -16,7 +16,7 @@
#include "aom/aom_integer.h"
static INLINE __m128i load_coefficients(const tran_low_t *coeff_ptr) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
return _mm_setr_epi16((int16_t)coeff_ptr[0], (int16_t)coeff_ptr[1],
(int16_t)coeff_ptr[2], (int16_t)coeff_ptr[3],
(int16_t)coeff_ptr[4], (int16_t)coeff_ptr[5],
@ -28,7 +28,7 @@ static INLINE __m128i load_coefficients(const tran_low_t *coeff_ptr) {
static INLINE void store_coefficients(__m128i coeff_vals,
tran_low_t *coeff_ptr) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
__m128i one = _mm_set1_epi16(1);
__m128i coeff_vals_hi = _mm_mulhi_epi16(coeff_vals, one);
__m128i coeff_vals_lo = _mm_mullo_epi16(coeff_vals, one);

Просмотреть файл

@ -56,7 +56,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
%endif
pxor m5, m5 ; m5 = dedicated zero
DEFINE_ARGS coeff, ncoeff, d1, qcoeff, dqcoeff, iscan, d2, d3, d4, d5, eob
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
lea coeffq, [ coeffq+ncoeffq*4]
lea qcoeffq, [ qcoeffq+ncoeffq*4]
lea dqcoeffq, [dqcoeffq+ncoeffq*4]
@ -69,7 +69,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
neg ncoeffq
; get DC and first 15 AC coeffs
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
; coeff stored as 32bit numbers & require 16bit numbers
mova m9, [ coeffq+ncoeffq*4+ 0]
packssdw m9, [ coeffq+ncoeffq*4+16]
@ -99,7 +99,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
psignw m13, m10 ; m13 = reinsert sign
pand m8, m7
pand m13, m12
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
; store 16bit numbers as 32bit numbers in array pointed to by qcoeff
mova m11, m8
mova m6, m8
@ -134,7 +134,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
psignw m8, m9
psignw m13, m10
%endif
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
; store 16bit numbers as 32bit numbers in array pointed to by qcoeff
mova m11, m8
mova m6, m8
@ -169,7 +169,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
jz .accumulate_eob
.ac_only_loop:
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
; pack coeff from 32bit to 16bit array
mova m9, [ coeffq+ncoeffq*4+ 0]
packssdw m9, [ coeffq+ncoeffq*4+16]
@ -201,7 +201,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
psignw m13, m10 ; m13 = reinsert sign
pand m14, m7
pand m13, m12
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
; store 16bit numbers as 32bit numbers in array pointed to by qcoeff
pxor m11, m11
mova m11, m14
@ -236,7 +236,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
psignw m14, m9
psignw m13, m10
%endif
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
; store 16bit numbers as 32bit numbers in array pointed to by qcoeff
mova m11, m14
mova m6, m14
@ -274,7 +274,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
%ifidn %1, b_32x32
jmp .accumulate_eob
.skip_iter:
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
mova [qcoeffq+ncoeffq*4+ 0], m5
mova [qcoeffq+ncoeffq*4+16], m5
mova [qcoeffq+ncoeffq*4+32], m5
@ -313,7 +313,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
mov r2, qcoeffmp
mov r3, eobmp
DEFINE_ARGS dqcoeff, ncoeff, qcoeff, eob
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
lea dqcoeffq, [dqcoeffq+ncoeffq*4]
lea qcoeffq, [ qcoeffq+ncoeffq*4]
%else
@ -323,7 +323,7 @@ cglobal quantize_%1, 0, %2, 15, coeff, ncoeff, skip, zbin, round, quant, \
neg ncoeffq
pxor m7, m7
.blank_loop:
%if CONFIG_AOM_HIGHBITDEPTH
%if CONFIG_HIGHBITDEPTH
mova [dqcoeffq+ncoeffq*4+ 0], m7
mova [dqcoeffq+ncoeffq*4+16], m7
mova [dqcoeffq+ncoeffq*4+32], m7

Просмотреть файл

@ -16,7 +16,7 @@
// This header file should be put below any x86 intrinsics head file
static INLINE void storeu_output(const __m128i *poutput, tran_low_t *dst_ptr) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
const __m128i zero = _mm_setzero_si128();
const __m128i sign_bits = _mm_cmplt_epi16(*poutput, zero);
__m128i out0 = _mm_unpacklo_epi16(*poutput, sign_bits);
@ -25,7 +25,7 @@ static INLINE void storeu_output(const __m128i *poutput, tran_low_t *dst_ptr) {
_mm_storeu_si128((__m128i *)(dst_ptr + 4), out1);
#else
_mm_storeu_si128((__m128i *)(dst_ptr), *poutput);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
}
#endif // _AOM_DSP_X86_TXFM_COMMON_INTRIN_H_

Просмотреть файл

@ -64,11 +64,11 @@ void aom_free(void *memblk) {
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void *aom_memset16(void *dest, int val, size_t length) {
size_t i;
uint16_t *dest16 = (uint16_t *)dest;
for (i = 0; i < length; i++) *dest16++ = val;
return dest;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -29,7 +29,7 @@ void *aom_malloc(size_t size);
void *aom_calloc(size_t num, size_t size);
void aom_free(void *memblk);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void *aom_memset16(void *dest, int val, size_t length);
#endif

Просмотреть файл

@ -58,8 +58,8 @@
(((value) + ((1 << (n)) - 1)) & ~((1 << (n)) - 1))
#define CONVERT_TO_SHORTPTR(x) ((uint16_t *)(((uintptr_t)(x)) << 1))
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
#define CONVERT_TO_BYTEPTR(x) ((uint8_t *)(((uintptr_t)(x)) >> 1))
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // AOM_PORTS_MEM_H_

Просмотреть файл

@ -34,7 +34,7 @@ int aom_free_frame_buffer(YV12_BUFFER_CONFIG *ybf) {
aom_free(ybf->buffer_alloc);
}
#if CONFIG_AOM_HIGHBITDEPTH && CONFIG_GLOBAL_MOTION
#if CONFIG_HIGHBITDEPTH && CONFIG_GLOBAL_MOTION
if (ybf->y_buffer_8bit) free(ybf->y_buffer_8bit);
#endif
@ -51,7 +51,7 @@ int aom_free_frame_buffer(YV12_BUFFER_CONFIG *ybf) {
int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
int ss_x, int ss_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
int use_highbitdepth,
#endif
int border, int byte_alignment,
@ -72,12 +72,12 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
const uint64_t uvplane_size =
(uv_height + 2 * uv_border_h) * (uint64_t)uv_stride + byte_alignment;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
const uint64_t frame_size =
(1 + use_highbitdepth) * (yplane_size + 2 * uvplane_size);
#else
const uint64_t frame_size = yplane_size + 2 * uvplane_size;
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
uint8_t *buf = NULL;
@ -147,7 +147,7 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
ybf->subsampling_y = ss_y;
buf = ybf->buffer_alloc;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (use_highbitdepth) {
// Store uint16 addresses when using 16bit framebuffers
buf = CONVERT_TO_BYTEPTR(ybf->buffer_alloc);
@ -155,7 +155,7 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
} else {
ybf->flags = 0;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
ybf->y_buffer = (uint8_t *)yv12_align_addr(
buf + (border * y_stride) + border, aom_byte_align);
@ -167,7 +167,7 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
(uv_border_h * uv_stride) + uv_border_w,
aom_byte_align);
#if CONFIG_AOM_HIGHBITDEPTH && CONFIG_GLOBAL_MOTION
#if CONFIG_HIGHBITDEPTH && CONFIG_GLOBAL_MOTION
if (ybf->y_buffer_8bit) {
free(ybf->y_buffer_8bit);
ybf->y_buffer_8bit = NULL;
@ -182,14 +182,14 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
int aom_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
int ss_x, int ss_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
int use_highbitdepth,
#endif
int border, int byte_alignment) {
if (ybf) {
aom_free_frame_buffer(ybf);
return aom_realloc_frame_buffer(ybf, width, height, ss_x, ss_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
use_highbitdepth,
#endif
border, byte_alignment, NULL, NULL, NULL);

Просмотреть файл

@ -57,7 +57,7 @@ static void extend_plane(uint8_t *const src, int src_stride, int width,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void extend_plane_high(uint8_t *const src8, int src_stride, int width,
int height, int extend_top, int extend_left,
int extend_bottom, int extend_right) {
@ -109,7 +109,7 @@ void aom_yv12_extend_frame_borders_c(YV12_BUFFER_CONFIG *ybf) {
assert(ybf->y_height - ybf->y_crop_height >= 0);
assert(ybf->y_width - ybf->y_crop_width >= 0);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (ybf->flags & YV12_FLAG_HIGHBITDEPTH) {
extend_plane_high(ybf->y_buffer, ybf->y_stride, ybf->y_crop_width,
ybf->y_crop_height, ybf->border, ybf->border,
@ -160,7 +160,7 @@ static void extend_frame(YV12_BUFFER_CONFIG *const ybf, int ext_size) {
assert(ybf->y_height - ybf->y_crop_height >= 0);
assert(ybf->y_width - ybf->y_crop_width >= 0);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (ybf->flags & YV12_FLAG_HIGHBITDEPTH) {
extend_plane_high(ybf->y_buffer, ybf->y_stride, ybf->y_crop_width,
ybf->y_crop_height, ext_size, ext_size,
@ -201,7 +201,7 @@ void aom_extend_frame_borders_y_c(YV12_BUFFER_CONFIG *ybf) {
assert(ybf->y_height - ybf->y_crop_height >= 0);
assert(ybf->y_width - ybf->y_crop_width >= 0);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (ybf->flags & YV12_FLAG_HIGHBITDEPTH) {
extend_plane_high(ybf->y_buffer, ybf->y_stride, ybf->y_crop_width,
ybf->y_crop_height, ext_size, ext_size,
@ -217,13 +217,13 @@ void aom_extend_frame_borders_y_c(YV12_BUFFER_CONFIG *ybf) {
}
#endif // CONFIG_AV1
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void memcpy_short_addr(uint8_t *dst8, const uint8_t *src8, int num) {
uint16_t *dst = CONVERT_TO_SHORTPTR(dst8);
uint16_t *src = CONVERT_TO_SHORTPTR(src8);
memcpy(dst, src, num * sizeof(uint16_t));
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
// Copies the source image into the destination image and updates the
// destination's UMV borders.
@ -242,7 +242,7 @@ void aom_yv12_copy_frame_c(const YV12_BUFFER_CONFIG *src_bc,
assert(src_bc->y_height == dst_bc->y_height);
#endif
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (src_bc->flags & YV12_FLAG_HIGHBITDEPTH) {
assert(dst_bc->flags & YV12_FLAG_HIGHBITDEPTH);
for (row = 0; row < src_bc->y_height; ++row) {
@ -309,7 +309,7 @@ void aom_yv12_copy_y_c(const YV12_BUFFER_CONFIG *src_ybc,
const uint8_t *src = src_ybc->y_buffer;
uint8_t *dst = dst_ybc->y_buffer;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (src_ybc->flags & YV12_FLAG_HIGHBITDEPTH) {
const uint16_t *src16 = CONVERT_TO_SHORTPTR(src);
uint16_t *dst16 = CONVERT_TO_SHORTPTR(dst);
@ -320,7 +320,7 @@ void aom_yv12_copy_y_c(const YV12_BUFFER_CONFIG *src_ybc,
}
return;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
for (row = 0; row < src_ybc->y_height; ++row) {
memcpy(dst, src, src_ybc->y_width);
@ -335,7 +335,7 @@ void aom_yv12_copy_u_c(const YV12_BUFFER_CONFIG *src_bc,
const uint8_t *src = src_bc->u_buffer;
uint8_t *dst = dst_bc->u_buffer;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (src_bc->flags & YV12_FLAG_HIGHBITDEPTH) {
const uint16_t *src16 = CONVERT_TO_SHORTPTR(src);
uint16_t *dst16 = CONVERT_TO_SHORTPTR(dst);
@ -346,7 +346,7 @@ void aom_yv12_copy_u_c(const YV12_BUFFER_CONFIG *src_bc,
}
return;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
for (row = 0; row < src_bc->uv_height; ++row) {
memcpy(dst, src, src_bc->uv_width);
@ -361,7 +361,7 @@ void aom_yv12_copy_v_c(const YV12_BUFFER_CONFIG *src_bc,
const uint8_t *src = src_bc->v_buffer;
uint8_t *dst = dst_bc->v_buffer;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (src_bc->flags & YV12_FLAG_HIGHBITDEPTH) {
const uint16_t *src16 = CONVERT_TO_SHORTPTR(src);
uint16_t *dst16 = CONVERT_TO_SHORTPTR(dst);
@ -372,7 +372,7 @@ void aom_yv12_copy_v_c(const YV12_BUFFER_CONFIG *src_bc,
}
return;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
for (row = 0; row < src_bc->uv_height; ++row) {
memcpy(dst, src, src_bc->uv_width);

Просмотреть файл

@ -55,7 +55,7 @@ typedef struct yv12_buffer_config {
uint8_t *v_buffer;
uint8_t *alpha_buffer;
#if CONFIG_AOM_HIGHBITDEPTH && CONFIG_GLOBAL_MOTION
#if CONFIG_HIGHBITDEPTH && CONFIG_GLOBAL_MOTION
// If the frame is stored in a 16-bit buffer, this stores an 8-bit version
// for use in global motion detection. It is allocated on-demand.
uint8_t *y_buffer_8bit;
@ -81,7 +81,7 @@ typedef struct yv12_buffer_config {
int aom_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
int ss_x, int ss_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
int use_highbitdepth,
#endif
int border, int byte_alignment);
@ -95,7 +95,7 @@ int aom_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
// on failure.
int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
int ss_x, int ss_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
int use_highbitdepth,
#endif
int border, int byte_alignment,

Просмотреть файл

@ -99,7 +99,7 @@ static const arg_def_t md5arg =
ARG_DEF(NULL, "md5", 0, "Compute the MD5 sum of the decoded frame");
static const arg_def_t framestatsarg =
ARG_DEF(NULL, "framestats", 1, "Output per-frame stats (.csv format)");
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static const arg_def_t outbitdeptharg =
ARG_DEF(NULL, "output-bit-depth", 1, "Output bit-depth for decoded frames");
#endif
@ -133,7 +133,7 @@ static const arg_def_t *all_args[] = { &codecarg,
&framestatsarg,
&error_concealment,
&continuearg,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
&outbitdeptharg,
#endif
#if CONFIG_EXT_TILE
@ -145,7 +145,7 @@ static const arg_def_t *all_args[] = { &codecarg,
#if CONFIG_LIBYUV
static INLINE int libyuv_scale(aom_image_t *src, aom_image_t *dst,
FilterModeEnum mode) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (src->fmt == AOM_IMG_FMT_I42016) {
assert(dst->fmt == AOM_IMG_FMT_I42016);
return I420Scale_16(
@ -287,7 +287,7 @@ static void update_image_md5(const aom_image_t *img, const int planes[3],
static void write_image_file(const aom_image_t *img, const int planes[3],
FILE *file) {
int i, y;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
const int bytes_per_sample = ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) ? 2 : 1);
#else
const int bytes_per_sample = 1;
@ -488,7 +488,7 @@ static FILE *open_outfile(const char *name) {
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static int img_shifted_realloc_required(const aom_image_t *img,
const aom_image_t *shifted,
aom_img_fmt_t required_fmt) {
@ -522,7 +522,7 @@ static int main_loop(int argc, const char **argv_) {
int opt_yv12 = 0;
int opt_i420 = 0;
aom_codec_dec_cfg_t cfg = { 0, 0, 0 };
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
unsigned int output_bit_depth = 0;
#endif
#if CONFIG_EXT_TILE
@ -533,7 +533,7 @@ static int main_loop(int argc, const char **argv_) {
int dec_flags = 0;
int do_scale = 0;
aom_image_t *scaled_img = NULL;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
aom_image_t *img_shifted = NULL;
#endif
int frame_avail, got_data, flush_decoder = 0;
@ -621,7 +621,7 @@ static int main_loop(int argc, const char **argv_) {
num_external_frame_buffers = arg_parse_uint(&arg);
else if (arg_match(&arg, &continuearg, argi))
keep_going = 1;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
else if (arg_match(&arg, &outbitdeptharg, argi)) {
output_bit_depth = arg_parse_uint(&arg);
}
@ -886,7 +886,7 @@ static int main_loop(int argc, const char **argv_) {
#endif
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
// Default to codec bit depth if output bit depth not set
if (!output_bit_depth && single_file && !do_md5) {
output_bit_depth = img->bit_depth;
@ -1031,7 +1031,7 @@ fail2:
if (input.aom_input_ctx->file_type != FILE_TYPE_WEBM) free(buf);
if (scaled_img) aom_img_free(scaled_img);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (img_shifted) aom_img_free(img_shifted);
#endif

Просмотреть файл

@ -193,7 +193,7 @@ static const arg_def_t disable_warning_prompt =
ARG_DEF("y", "disable-warning-prompt", 0,
"Display warnings, but do not prompt user to continue.");
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static const arg_def_t test16bitinternalarg = ARG_DEF(
NULL, "test-16bit-internal", 0, "Force use of 16 bit internal buffer");
@ -276,7 +276,7 @@ static const arg_def_t *global_args[] = { &use_yv12,
&timebase,
&framerate,
&error_resilient,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
&test16bitinternalarg,
&bitdeptharg,
#endif
@ -514,10 +514,10 @@ static const arg_def_t *av1_args[] = { &cpu_used_av1,
#if CONFIG_TEMPMV_SIGNALING
&disable_tempmv,
#endif
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
&bitdeptharg,
&inbitdeptharg,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
NULL };
static const int av1_arg_ctrl_map[] = { AOME_SET_CPUUSED,
AOME_SET_ENABLEAUTOALTREF,
@ -608,7 +608,7 @@ void usage_exit(void) {
#define mmin(a, b) ((a) < (b) ? (a) : (b))
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void find_mismatch_high(const aom_image_t *const img1,
const aom_image_t *const img2, int yloc[4],
int uloc[4], int vloc[4]) {
@ -805,7 +805,7 @@ static int compare_img(const aom_image_t *const img1,
match &= (img1->fmt == img2->fmt);
match &= (img1->d_w == img2->d_w);
match &= (img1->d_h == img2->d_h);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (img1->fmt & AOM_IMG_FMT_HIGHBITDEPTH) {
l_w *= 2;
c_w *= 2;
@ -854,7 +854,7 @@ struct stream_config {
int arg_ctrls[ARG_CTRL_CNT_MAX][2];
int arg_ctrl_cnt;
int write_webm;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
// whether to use 16bit internal buffers
int use_16bit_internal;
#endif
@ -1123,7 +1123,7 @@ static int parse_stream_params(struct AvxEncoderConfig *global,
static const int *ctrl_args_map = NULL;
struct stream_config *config = &stream->config;
int eos_mark_found = 0;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
int test_16bit_internal = 0;
#endif
@ -1176,7 +1176,7 @@ static int parse_stream_params(struct AvxEncoderConfig *global,
config->cfg.g_w = arg_parse_uint(&arg);
} else if (arg_match(&arg, &height, argi)) {
config->cfg.g_h = arg_parse_uint(&arg);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
} else if (arg_match(&arg, &bitdeptharg, argi)) {
config->cfg.g_bit_depth = arg_parse_enum_or_int(&arg);
} else if (arg_match(&arg, &inbitdeptharg, argi)) {
@ -1248,7 +1248,7 @@ static int parse_stream_params(struct AvxEncoderConfig *global,
config->cfg.kf_max_dist = arg_parse_uint(&arg);
} else if (arg_match(&arg, &kf_disabled, argi)) {
config->cfg.kf_mode = AOM_KF_DISABLED;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
} else if (arg_match(&arg, &test16bitinternalarg, argi)) {
if (strcmp(global->codec->name, "av1") == 0 ||
strcmp(global->codec->name, "av1") == 0) {
@ -1282,7 +1282,7 @@ static int parse_stream_params(struct AvxEncoderConfig *global,
if (!match) argj++;
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (strcmp(global->codec->name, "av1") == 0 ||
strcmp(global->codec->name, "av1") == 0) {
config->use_16bit_internal =
@ -1540,7 +1540,7 @@ static void initialize_encoder(struct stream_state *stream,
flags |= global->show_psnr ? AOM_CODEC_USE_PSNR : 0;
flags |= global->out_part ? AOM_CODEC_USE_OUTPUT_PARTITION : 0;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
flags |= stream->config.use_16bit_internal ? AOM_CODEC_USE_HIGHBITDEPTH : 0;
#endif
@ -1596,7 +1596,7 @@ static void encode_frame(struct stream_state *stream,
cfg->g_timebase.num / global->framerate.num;
/* Scale if necessary */
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (img) {
if ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) &&
(img->d_w != cfg->g_w || img->d_h != cfg->g_h)) {
@ -1822,7 +1822,7 @@ static void test_decode(struct stream_state *stream,
aom_codec_control(&stream->encoder, AV1_GET_NEW_FRAME_IMAGE, &enc_img);
aom_codec_control(&stream->decoder, AV1_GET_NEW_FRAME_IMAGE, &dec_img);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if ((enc_img.fmt & AOM_IMG_FMT_HIGHBITDEPTH) !=
(dec_img.fmt & AOM_IMG_FMT_HIGHBITDEPTH)) {
if (enc_img.fmt & AOM_IMG_FMT_HIGHBITDEPTH) {
@ -1847,7 +1847,7 @@ static void test_decode(struct stream_state *stream,
if (!compare_img(&enc_img, &dec_img)) {
int y[4], u[4], v[4];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (enc_img.fmt & AOM_IMG_FMT_HIGHBITDEPTH) {
find_mismatch_high(&enc_img, &dec_img, y, u, v);
} else {
@ -1893,7 +1893,7 @@ static void print_time(const char *label, int64_t etl) {
int main(int argc, const char **argv_) {
int pass;
aom_image_t raw;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
aom_image_t raw_shift;
int allocated_raw_shift = 0;
int use_16bit_internal = 0;
@ -2012,7 +2012,7 @@ int main(int argc, const char **argv_) {
{ stream->config.cfg.g_input_bit_depth = input.bit_depth; });
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
FOREACH_STREAM({
if (input.fmt != AOM_IMG_FMT_I420 && input.fmt != AOM_IMG_FMT_I42016) {
/* Automatically upgrade if input is non-4:2:0 but a 4:2:0 profile
@ -2141,7 +2141,7 @@ int main(int argc, const char **argv_) {
open_output_file(stream, &global, &input.pixel_aspect_ratio));
FOREACH_STREAM(initialize_encoder(stream, &global));
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (strcmp(global.codec->name, "av1") == 0 ||
strcmp(global.codec->name, "av1") == 0) {
// Check to see if at least one stream uses 16 bit internal.
@ -2196,7 +2196,7 @@ int main(int argc, const char **argv_) {
}
if (frames_in > global.skip_frames) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
aom_image_t *frame_to_encode;
if (input_shift || (use_16bit_internal && input.bit_depth == 8)) {
assert(use_16bit_internal);
@ -2352,7 +2352,7 @@ int main(int argc, const char **argv_) {
});
#endif
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (allocated_raw_shift) aom_img_free(&raw_shift);
#endif
aom_img_free(&raw);

Просмотреть файл

@ -195,7 +195,7 @@ if (CONFIG_ACCOUNTING)
"${AOM_ROOT}/av1/common/accounting.h")
endif ()
if (CONFIG_AOM_HIGHBITDEPTH)
if (CONFIG_HIGHBITDEPTH)
set(AOM_AV1_COMMON_SSE4_1_INTRIN
${AOM_AV1_COMMON_SSE4_1_INTRIN}
"${AOM_ROOT}/av1/common/x86/av1_highbd_convolve_sse4.c"

Просмотреть файл

@ -73,7 +73,7 @@ AV1_COMMON_SRCS-yes += common/av1_fwd_txfm2d_cfg.h
AV1_COMMON_SRCS-yes += common/av1_inv_txfm2d.c
AV1_COMMON_SRCS-yes += common/av1_inv_txfm2d_cfg.h
AV1_COMMON_SRCS-$(HAVE_SSSE3) += common/x86/av1_convolve_ssse3.c
ifeq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/av1_highbd_convolve_sse4.c
endif
AV1_COMMON_SRCS-yes += common/convolve.c
@ -135,7 +135,7 @@ AV1_COMMON_SRCS-yes += common/pvq_state.h
AV1_COMMON_SRCS-yes += common/generic_code.h
endif
ifneq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
ifneq ($(CONFIG_HIGHBITDEPTH),yes)
AV1_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/av1_itrans4_dspr2.c
AV1_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/av1_itrans8_dspr2.c
AV1_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/av1_itrans16_dspr2.c
@ -154,13 +154,13 @@ AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/av1_txfm1d_sse4.h
AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/av1_fwd_txfm1d_sse4.c
AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/av1_fwd_txfm2d_sse4.c
endif
ifeq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/highbd_txfm_utility_sse4.h
AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/highbd_inv_txfm_sse4.c
AV1_COMMON_SRCS-$(HAVE_AVX2) += common/x86/highbd_inv_txfm_avx2.c
endif
ifneq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
ifneq ($(CONFIG_HIGHBITDEPTH),yes)
AV1_COMMON_SRCS-$(HAVE_NEON) += common/arm/neon/iht4x4_add_neon.c
AV1_COMMON_SRCS-$(HAVE_NEON) += common/arm/neon/iht8x8_add_neon.c
endif
@ -171,7 +171,7 @@ endif
ifneq ($(findstring yes,$(CONFIG_GLOBAL_MOTION) $(CONFIG_WARPED_MOTION)),)
AV1_COMMON_SRCS-$(HAVE_SSE2) += common/x86/warp_plane_sse2.c
ifeq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
AV1_COMMON_SRCS-$(HAVE_SSSE3) += common/x86/highbd_warp_plane_ssse3.c
endif
endif

Просмотреть файл

@ -123,7 +123,7 @@ endif
AV1_CX_SRCS-$(HAVE_SSE2) += encoder/x86/av1_quantize_sse2.c
AV1_CX_SRCS-$(HAVE_SSE2) += encoder/x86/temporal_filter_apply_sse2.asm
ifeq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
AV1_CX_SRCS-$(HAVE_SSE2) += encoder/x86/highbd_block_error_intrin_sse2.c
endif
@ -137,7 +137,7 @@ endif
AV1_CX_SRCS-$(HAVE_SSE2) += encoder/x86/dct_intrin_sse2.c
AV1_CX_SRCS-$(HAVE_SSSE3) += encoder/x86/dct_ssse3.c
AV1_CX_SRCS-$(HAVE_AVX2) += encoder/x86/hybrid_fwd_txfm_avx2.c
ifeq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_HIGHBITDEPTH),yes)
AV1_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/av1_highbd_quantize_sse4.c
AV1_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/highbd_fwd_txfm_sse4.c
endif
@ -149,7 +149,7 @@ endif
AV1_CX_SRCS-$(HAVE_AVX2) += encoder/x86/error_intrin_avx2.c
ifneq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
ifneq ($(CONFIG_HIGHBITDEPTH),yes)
AV1_CX_SRCS-$(HAVE_NEON) += encoder/arm/neon/dct_neon.c
AV1_CX_SRCS-$(HAVE_NEON) += encoder/arm/neon/error_neon.c
endif

Просмотреть файл

@ -317,7 +317,7 @@ static aom_codec_err_t validate_config(aom_codec_alg_priv_t *ctx,
#endif
}
#if !CONFIG_AOM_HIGHBITDEPTH
#if !CONFIG_HIGHBITDEPTH
if (cfg->g_profile > (unsigned int)PROFILE_1) {
ERROR("Profile > 1 not supported in this build configuration");
}
@ -884,7 +884,7 @@ static aom_codec_err_t encoder_init(aom_codec_ctx_t *ctx,
if (res == AOM_CODEC_OK) {
set_encoder_config(&priv->oxcf, &priv->cfg, &priv->extra_cfg);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
priv->oxcf.use_highbitdepth =
(ctx->init_flags & AOM_CODEC_USE_HIGHBITDEPTH) ? 1 : 0;
#endif
@ -1519,7 +1519,7 @@ static aom_codec_enc_cfg_map_t encoder_usage_cfg_map[] = {
CODEC_INTERFACE(aom_codec_av1_cx) = {
"AOMedia Project AV1 Encoder" VERSION_STRING,
AOM_CODEC_INTERNAL_ABI_VERSION,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
AOM_CODEC_CAP_HIGHBITDEPTH |
#endif
AOM_CODEC_CAP_ENCODER | AOM_CODEC_CAP_PSNR, // aom_codec_caps_t

Просмотреть файл

@ -53,7 +53,7 @@ AV1_DX_SRCS-$(HAVE_SSE2) += encoder/x86/dct_sse2.asm
AV1_DX_SRCS-$(HAVE_SSE2) += encoder/x86/dct_intrin_sse2.c
AV1_DX_SRCS-$(HAVE_SSSE3) += encoder/x86/dct_ssse3.c
ifneq ($(CONFIG_AOM_HIGHBITDEPTH),yes)
ifneq ($(CONFIG_HIGHBITDEPTH),yes)
AV1_DX_SRCS-$(HAVE_NEON) += encoder/arm/neon/dct_neon.c
endif

Просмотреть файл

@ -56,7 +56,7 @@ static void yuvconfig2image(aom_image_t *img, const YV12_BUFFER_CONFIG *yv12,
img->stride[AOM_PLANE_U] = yv12->uv_stride;
img->stride[AOM_PLANE_V] = yv12->uv_stride;
img->stride[AOM_PLANE_ALPHA] = yv12->y_stride;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (yv12->flags & YV12_FLAG_HIGHBITDEPTH) {
// aom_image_t uses byte strides and a pointer to the first byte
// of the image.
@ -71,7 +71,7 @@ static void yuvconfig2image(aom_image_t *img, const YV12_BUFFER_CONFIG *yv12,
img->stride[AOM_PLANE_V] = 2 * yv12->uv_stride;
img->stride[AOM_PLANE_ALPHA] = 2 * yv12->y_stride;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
img->bps = bps;
img->user_priv = user_priv;
img->img_data = yv12->buffer_alloc;
@ -104,7 +104,7 @@ static aom_codec_err_t image2yuvconfig(const aom_image_t *img,
yv12->color_space = img->cs;
yv12->color_range = img->range;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) {
// In aom_image_t
// planes point to uint8 address of start of data
@ -128,7 +128,7 @@ static aom_codec_err_t image2yuvconfig(const aom_image_t *img,
yv12->border = (yv12->y_stride - img->w) / 2;
#else
yv12->border = (img->stride[AOM_PLANE_Y] - img->w) / 2;
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
yv12->subsampling_x = img->x_chroma_shift;
yv12->subsampling_y = img->y_chroma_shift;
return AOM_CODEC_OK;

Просмотреть файл

@ -457,7 +457,7 @@ static void filter_selectively_vert_row2(int subsampling_factor, uint8_t *s,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void highbd_filter_selectively_vert_row2(
int subsampling_factor, uint16_t *s, int pitch, unsigned int mask_16x16_l,
unsigned int mask_8x8_l, unsigned int mask_4x4_l,
@ -552,7 +552,7 @@ static void highbd_filter_selectively_vert_row2(
mask_4x4_int_1 >>= 1;
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
static void filter_selectively_horiz(
uint8_t *s, int pitch, unsigned int mask_16x16, unsigned int mask_8x8,
@ -647,7 +647,7 @@ static void filter_selectively_horiz(
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void highbd_filter_selectively_horiz(
uint16_t *s, int pitch, unsigned int mask_16x16, unsigned int mask_8x8,
unsigned int mask_4x4, unsigned int mask_4x4_int,
@ -746,7 +746,7 @@ static void highbd_filter_selectively_horiz(
mask_4x4_int >>= count;
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
// This function ors into the current lfm structure, where to do loop
// filters for the specific mi we are looking at. It uses information
@ -1259,7 +1259,7 @@ static void filter_selectively_vert(
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void highbd_filter_selectively_vert(
uint16_t *s, int pitch, unsigned int mask_16x16, unsigned int mask_8x8,
unsigned int mask_4x4, unsigned int mask_4x4_int,
@ -1293,7 +1293,7 @@ static void highbd_filter_selectively_vert(
mask_4x4_int >>= 1;
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
void av1_filter_block_plane_non420_ver(AV1_COMMON *cm,
struct macroblockd_plane *plane,
@ -1467,7 +1467,7 @@ void av1_filter_block_plane_non420_ver(AV1_COMMON *cm,
}
#endif // CONFIG_LOOPFILTERING_ACROSS_TILES
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
highbd_filter_selectively_vert(
CONVERT_TO_SHORTPTR(dst->buf), dst->stride,
@ -1484,7 +1484,7 @@ void av1_filter_block_plane_non420_ver(AV1_COMMON *cm,
filter_selectively_vert(dst->buf, dst->stride, mask_16x16_c & border_mask,
mask_8x8_c & border_mask, mask_4x4_c & border_mask,
mask_4x4_int[r], &cm->lf_info, &lfl[r][0]);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
dst->buf += 8 * dst->stride;
tmp_mi += row_step_stride;
}
@ -1684,7 +1684,7 @@ void av1_filter_block_plane_non420_hor(AV1_COMMON *cm,
mask_8x8_r = mask_8x8[r];
mask_4x4_r = mask_4x4[r];
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
highbd_filter_selectively_horiz(CONVERT_TO_SHORTPTR(dst->buf),
dst->stride, mask_16x16_r, mask_8x8_r,
@ -1699,7 +1699,7 @@ void av1_filter_block_plane_non420_hor(AV1_COMMON *cm,
filter_selectively_horiz(dst->buf, dst->stride, mask_16x16_r, mask_8x8_r,
mask_4x4_r, mask_4x4_int_r, &cm->lf_info,
&lfl[r][0]);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
dst->buf += 8 * dst->stride;
}
dst->buf = dst0;
@ -1726,7 +1726,7 @@ void av1_filter_block_plane_ss00_ver(AV1_COMMON *const cm,
unsigned int mask_4x4_int_l = mask_4x4_int & 0xffff;
// Disable filtering on the leftmost column.
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
highbd_filter_selectively_vert_row2(
plane->subsampling_x, CONVERT_TO_SHORTPTR(dst->buf), dst->stride,
@ -1741,7 +1741,7 @@ void av1_filter_block_plane_ss00_ver(AV1_COMMON *const cm,
filter_selectively_vert_row2(
plane->subsampling_x, dst->buf, dst->stride, mask_16x16_l, mask_8x8_l,
mask_4x4_l, mask_4x4_int_l, &cm->lf_info, &lfm->lfl_y[r][0]);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
dst->buf += 2 * MI_SIZE * dst->stride;
mask_16x16 >>= 2 * MI_SIZE;
mask_8x8 >>= 2 * MI_SIZE;
@ -1781,7 +1781,7 @@ void av1_filter_block_plane_ss00_hor(AV1_COMMON *const cm,
mask_4x4_r = mask_4x4 & 0xff;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
highbd_filter_selectively_horiz(
CONVERT_TO_SHORTPTR(dst->buf), dst->stride, mask_16x16_r, mask_8x8_r,
@ -1796,7 +1796,7 @@ void av1_filter_block_plane_ss00_hor(AV1_COMMON *const cm,
filter_selectively_horiz(dst->buf, dst->stride, mask_16x16_r, mask_8x8_r,
mask_4x4_r, mask_4x4_int & 0xff, &cm->lf_info,
&lfm->lfl_y[r][0]);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
dst->buf += MI_SIZE * dst->stride;
mask_16x16 >>= MI_SIZE;
@ -1838,7 +1838,7 @@ void av1_filter_block_plane_ss11_ver(AV1_COMMON *const cm,
unsigned int mask_4x4_int_l = mask_4x4_int & 0xff;
// Disable filtering on the leftmost column.
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
highbd_filter_selectively_vert_row2(
plane->subsampling_x, CONVERT_TO_SHORTPTR(dst->buf), dst->stride,
@ -1854,7 +1854,7 @@ void av1_filter_block_plane_ss11_ver(AV1_COMMON *const cm,
filter_selectively_vert_row2(
plane->subsampling_x, dst->buf, dst->stride, mask_16x16_l, mask_8x8_l,
mask_4x4_l, mask_4x4_int_l, &cm->lf_info, &lfm->lfl_uv[r >> 1][0]);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
dst->buf += 2 * MI_SIZE * dst->stride;
mask_16x16 >>= MI_SIZE;
@ -1909,7 +1909,7 @@ void av1_filter_block_plane_ss11_hor(AV1_COMMON *const cm,
mask_4x4_r = mask_4x4 & 0xf;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
highbd_filter_selectively_horiz(
CONVERT_TO_SHORTPTR(dst->buf), dst->stride, mask_16x16_r, mask_8x8_r,
@ -1924,7 +1924,7 @@ void av1_filter_block_plane_ss11_hor(AV1_COMMON *const cm,
filter_selectively_horiz(dst->buf, dst->stride, mask_16x16_r, mask_8x8_r,
mask_4x4_r, mask_4x4_int_r, &cm->lf_info,
&lfm->lfl_uv[r >> 1][0]);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
dst->buf += MI_SIZE * dst->stride;
mask_16x16 >>= MI_SIZE / 2;

Просмотреть файл

@ -49,7 +49,7 @@ specialize qw/av1_convolve_horiz ssse3/;
add_proto qw/void av1_convolve_vert/, "const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams fp, const int subpel_x_q4, int x_step_q4, ConvolveParams *conv_params";
specialize qw/av1_convolve_vert ssse3/;
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
add_proto qw/void av1_highbd_convolve_init/, "void";
specialize qw/av1_highbd_convolve_init sse4_1/;
add_proto qw/void av1_highbd_convolve_horiz/, "const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams fp, const int subpel_x_q4, int x_step_q4, int avg, int bd";
@ -61,7 +61,7 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
#
# Inverse dct
#
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
# Note as optimized versions of these functions are added we need to add a check to ensure
# that when CONFIG_EMULATE_HARDWARE is on, it defaults to the C versions only.
if (aom_config("CONFIG_EMULATE_HARDWARE") eq "yes") {
@ -240,7 +240,7 @@ if (aom_config("CONFIG_FILTER_INTRA") eq "yes") {
add_proto qw/void av1_d63_filter_predictor/, "uint8_t *dst, ptrdiff_t stride, int bs, const uint8_t *above, const uint8_t *left";
add_proto qw/void av1_tm_filter_predictor/, "uint8_t *dst, ptrdiff_t stride, int bs, const uint8_t *above, const uint8_t *left";
# High bitdepth functions
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
add_proto qw/void av1_highbd_dc_filter_predictor/, "uint16_t *dst, ptrdiff_t stride, int bs, const uint16_t *above, const uint16_t *left, int bd";
add_proto qw/void av1_highbd_v_filter_predictor/, "uint16_t *dst, ptrdiff_t stride, int bs, const uint16_t *above, const uint16_t *left, int bd";
add_proto qw/void av1_highbd_h_filter_predictor/, "uint16_t *dst, ptrdiff_t stride, int bs, const uint16_t *above, const uint16_t *left, int bd";
@ -255,7 +255,7 @@ if (aom_config("CONFIG_FILTER_INTRA") eq "yes") {
}
# High bitdepth functions
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
#
# Sub Pixel Filters
#
@ -313,7 +313,7 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
add_proto qw/void av1_highbd_iht16x16_256_add/, "const tran_low_t *input, uint8_t *output, int pitch, int tx_type, int bd";
}
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
#inv txfm
add_proto qw/void av1_inv_txfm2d_add_4x4/, "const int32_t *input, uint16_t *output, int stride, int tx_type, int bd";
specialize qw/av1_inv_txfm2d_add_4x4 sse4_1/;
@ -334,7 +334,7 @@ if (aom_config("CONFIG_AV1_ENCODER") eq "yes") {
# ENCODEMB INVOKE
if (aom_config("CONFIG_AOM_QM") eq "yes") {
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
# the transform coefficients are held in 32-bit
# values, so the assembler code for av1_block_error can no longer be used.
add_proto qw/int64_t av1_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz";
@ -366,7 +366,7 @@ if (aom_config("CONFIG_AOM_QM") eq "yes") {
add_proto qw/void av1_fdct8x8_quant/, "const int16_t *input, int stride, 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, const int16_t *quant_shift_ptr, 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, const qm_val_t * qm_ptr, const qm_val_t *iqm_ptr";
}
} else {
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
# the transform coefficients are held in 32-bit
# values, so the assembler code for av1_block_error can no longer be used.
add_proto qw/int64_t av1_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz";
@ -449,7 +449,7 @@ add_proto qw/void av1_fht8x32/, "const int16_t *input, tran_low_t *output, int s
add_proto qw/void av1_fht32x8/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") ne "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") ne "yes") {
if (aom_config("CONFIG_EXT_TX") ne "yes") {
specialize qw/av1_fht4x4 msa/;
specialize qw/av1_fht8x8 msa/;
@ -459,7 +459,7 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") ne "yes") {
add_proto qw/void av1_fwd_idtx/, "const int16_t *src_diff, tran_low_t *coeff, int stride, int bs, int tx_type";
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
#fwd txfm
add_proto qw/void av1_fwd_txfm2d_4x4/, "const int16_t *input, int32_t *output, int stride, int tx_type, int bd";
specialize qw/av1_fwd_txfm2d_4x4 sse4_1/;
@ -494,7 +494,7 @@ if (aom_config("CONFIG_AOM_QM") eq "yes") {
add_proto qw/void av1_quantize_b/, "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, const int16_t *quant_shift_ptr, 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, int log_scale";
}
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
# ENCODEMB INVOKE
if (aom_config("CONFIG_NEW_QUANT") eq "yes") {
@ -590,7 +590,7 @@ if (aom_config("CONFIG_EXT_INTER") eq "yes") {
if (aom_config("CONFIG_PVQ") eq "yes") {
# fdct functions
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
add_proto qw/void av1_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
specialize qw/av1_fht4x4 sse2/;
@ -671,7 +671,7 @@ if ((aom_config("CONFIG_WARPED_MOTION") eq "yes") ||
add_proto qw/void av1_warp_affine/, "int32_t *mat, uint8_t *ref, int width, int height, int stride, uint8_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, int ref_frm, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta";
specialize qw/av1_warp_affine sse2/;
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
add_proto qw/void av1_highbd_warp_affine/, "int32_t *mat, uint16_t *ref, int width, int height, int stride, uint16_t *pred, int p_col, int p_row, int p_width, int p_height, int p_stride, int subsampling_x, int subsampling_y, int bd, int ref_frm, int16_t alpha, int16_t beta, int16_t gamma, int16_t delta";
specialize qw/av1_highbd_warp_affine ssse3/;
}
@ -689,7 +689,7 @@ if (aom_config("CONFIG_LOOP_RESTORATION") eq "yes") {
add_proto qw/void av1_highpass_filter/, "uint8_t *dgd, int width, int height, int stride, int32_t *dst, int dst_stride, int r, int eps";
specialize qw/av1_highpass_filter sse4_1/;
if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") {
if (aom_config("CONFIG_HIGHBITDEPTH") eq "yes") {
add_proto qw/void apply_selfguided_restoration_highbd/, "uint16_t *dat, int width, int height, int stride, int bit_depth, int eps, int *xqd, uint16_t *dst, int dst_stride, int32_t *tmpbuf";
specialize qw/apply_selfguided_restoration_highbd sse4_1/;

Просмотреть файл

@ -237,11 +237,11 @@ typedef struct {
// Number of base colors for Y (0) and UV (1)
uint8_t palette_size[2];
// Value of base colors for Y, U, and V
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
uint16_t palette_colors[3 * PALETTE_MAX_SIZE];
#else
uint8_t palette_colors[3 * PALETTE_MAX_SIZE];
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
// Only used by encoder to store the color index of the top left pixel.
// TODO(huisu): move this to encoder
uint8_t palette_first_color_idx[2];
@ -561,7 +561,7 @@ typedef struct macroblockd {
#if CONFIG_EC_ADAPT
FRAME_CONTEXT *tile_ctx;
#endif
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
/* Bit depth: 8, 10, 12 */
int bd;
#endif

Просмотреть файл

@ -117,7 +117,7 @@ void copy_rect8_16bit_to_16bit_c(uint16_t *dst, int dstride,
void copy_sb8_16(UNUSED AV1_COMMON *cm, uint16_t *dst, int dstride,
const uint8_t *src, int src_voffset, int src_hoffset,
int sstride, int vsize, int hsize) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
const uint16_t *base =
&CONVERT_TO_SHORTPTR(src)[src_voffset * sstride + src_hoffset];
@ -126,7 +126,7 @@ void copy_sb8_16(UNUSED AV1_COMMON *cm, uint16_t *dst, int dstride,
#endif
const uint8_t *base = &src[src_voffset * sstride + src_hoffset];
copy_rect8_8bit_to_16bit(dst, dstride, base, sstride, vsize, hsize);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif
}
@ -402,7 +402,7 @@ void av1_cdef_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
vsize + 2 * OD_FILT_VBORDER, OD_FILT_HBORDER,
OD_DERING_VERY_LARGE);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
od_dering(
(uint8_t *)&CONVERT_TO_SHORTPTR(
@ -426,7 +426,7 @@ void av1_cdef_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
dering_count, level, clpf_strength, clpf_damping,
coeff_shift, 0, 0);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif
}

Просмотреть файл

@ -592,7 +592,7 @@ void av1_highbd_convolve_init_c(void) {
}
void av1_convolve_init(AV1_COMMON *cm) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth)
av1_highbd_convolve_init();
else
@ -604,7 +604,7 @@ void av1_convolve_init(AV1_COMMON *cm) {
return;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_highbd_convolve_horiz_c(const uint16_t *src, int src_stride,
uint16_t *dst, int dst_stride, int w, int h,
const InterpFilterParams filter_params,
@ -862,4 +862,4 @@ void av1_highbd_convolve(const uint8_t *src8, int src_stride, uint8_t *dst8,
}
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -96,7 +96,7 @@ void av1_convolve_c(const uint8_t *src, int src_stride, uint8_t *dst,
const int subpel_x, int xstep, const int subpel_y,
int ystep, ConvolveParams *conv_params);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_highbd_convolve(const uint8_t *src, int src_stride, uint8_t *dst,
int dst_stride, int w, int h,
#if CONFIG_DUAL_FILTER
@ -106,7 +106,7 @@ void av1_highbd_convolve(const uint8_t *src, int src_stride, uint8_t *dst,
#endif
const int subpel_x, int xstep, const int subpel_y,
int ystep, int avg, int bd);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#ifdef __cplusplus
} // extern "C"

Просмотреть файл

@ -146,10 +146,10 @@ static INLINE int av1_get_cat6_extrabits_size(TX_SIZE tx_size,
}
#define DCT_MAX_VALUE 16384
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
#define DCT_MAX_VALUE_HIGH10 65536
#define DCT_MAX_VALUE_HIGH12 262144
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
/* Coefficients are predicted via a 3-dimensional probability table. */

Просмотреть файл

@ -115,7 +115,7 @@ static void ihalfright64_c(const tran_low_t *input, tran_low_t *output) {
}
#endif // CONFIG_TX64X64
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
#if CONFIG_EXT_TX
static void highbd_iidtx4_c(const tran_low_t *input, tran_low_t *output,
int bd) {
@ -212,7 +212,7 @@ static void highbd_idct64_row_c(const tran_low_t *input, tran_low_t *output,
for (i = 0; i < 64; ++i) output[i] = (tran_low_t)out[i];
}
#endif // CONFIG_TX64X64
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
// Inverse identity transform and add.
#if CONFIG_EXT_TX
@ -277,7 +277,7 @@ static void maybe_flip_strides(uint8_t **dst, int *dstride, tran_low_t **src,
}
#endif // CONFIG_EXT_TX
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
#if CONFIG_EXT_TX
static void highbd_inv_idtx_add_c(const tran_low_t *input, uint8_t *dest8,
int stride, int bs, int tx_type, int bd) {
@ -333,7 +333,7 @@ static void maybe_flip_strides16(uint16_t **dst, int *dstride, tran_low_t **src,
}
}
#endif // CONFIG_EXT_TX
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
void av1_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride,
int tx_type) {
@ -1515,7 +1515,7 @@ static void inv_txfm_add_64x64(const tran_low_t *input, uint8_t *dest,
}
#endif // CONFIG_TX64X64
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_highbd_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8,
int stride, int tx_type, int bd) {
static const highbd_transform_2d HIGH_IHT_4[] = {
@ -2744,7 +2744,7 @@ static void highbd_inv_txfm_add_64x64(const tran_low_t *input, uint8_t *dest,
}
}
#endif // CONFIG_TX64X64
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
void av1_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride,
INV_TXFM_PARAM *inv_txfm_param) {
@ -2790,19 +2790,19 @@ void av1_inverse_transform_block(MACROBLOCKD *xd, const tran_low_t *dqcoeff,
const int txb_width = block_size_wide[tx_bsize];
const int txb_height = block_size_high[tx_bsize];
int r, c;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
uint16_t *dst16 = CONVERT_TO_SHORTPTR(dst);
for (r = 0; r < txb_height; r++)
for (c = 0; c < txb_width; c++)
CONVERT_TO_SHORTPTR(dst)[r * stride + c] = 0;
} else {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
for (r = 0; r < txb_height; r++)
for (c = 0; c < txb_width; c++) dst[r * stride + c] = 0;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_PVQ
INV_TXFM_PARAM inv_txfm_param;
inv_txfm_param.tx_type = tx_type;
@ -2810,16 +2810,16 @@ void av1_inverse_transform_block(MACROBLOCKD *xd, const tran_low_t *dqcoeff,
inv_txfm_param.eob = eob;
inv_txfm_param.lossless = xd->lossless[xd->mi[0]->mbmi.segment_id];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
inv_txfm_param.bd = xd->bd;
av1_highbd_inv_txfm_add(dqcoeff, dst, stride, &inv_txfm_param);
} else {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
av1_inv_txfm_add(dqcoeff, dst, stride, &inv_txfm_param);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
}
void av1_inverse_transform_block_facade(MACROBLOCKD *xd, int plane, int block,
@ -2836,7 +2836,7 @@ void av1_inverse_transform_block_facade(MACROBLOCKD *xd, int plane, int block,
eob);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_highbd_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride,
INV_TXFM_PARAM *inv_txfm_param) {
const TX_TYPE tx_type = inv_txfm_param->tx_type;
@ -2893,4 +2893,4 @@ void av1_highbd_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride,
default: assert(0 && "Invalid transform size"); break;
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -31,7 +31,7 @@ typedef struct INV_TXFM_PARAM {
TX_SIZE tx_size;
int eob;
int lossless;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
int bd;
#endif
} INV_TXFM_PARAM;
@ -42,13 +42,13 @@ typedef struct {
transform_1d cols, rows; // vertical and horizontal
} transform_2d;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
typedef void (*highbd_transform_1d)(const tran_low_t *, tran_low_t *, int bd);
typedef struct {
highbd_transform_1d cols, rows; // vertical and horizontal
} highbd_transform_2d;
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#define MAX_TX_SCALE 1
int get_tx_scale(const TX_SIZE tx_size);
@ -71,7 +71,7 @@ void av1_inverse_transform_block(MACROBLOCKD *xd, const tran_low_t *dqcoeff,
uint8_t *dst, int stride, int eob);
void av1_inverse_transform_block_facade(MACROBLOCKD *xd, int plane, int block,
int blk_row, int blk_col, int eob);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
int eob, int bd);
void av1_highbd_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
@ -85,7 +85,7 @@ void av1_highbd_inv_txfm_add_8x4(const tran_low_t *input, uint8_t *dest,
int stride, int eob, int bd, TX_TYPE tx_type);
void av1_highbd_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride,
INV_TXFM_PARAM *inv_txfm_param);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#ifdef __cplusplus
} // extern "C"
#endif

Просмотреть файл

@ -166,7 +166,7 @@ typedef struct AV1Common {
int subsampling_x;
int subsampling_y;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
// Marks if we need to use 16bit frame buffers (1: yes, 0: no).
int use_highbitdepth;
#endif

Просмотреть файл

@ -142,7 +142,7 @@ static const int16_t dc_qlookup[QINDEX_RANGE] = {
1184, 1232, 1282, 1336,
};
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static const int16_t dc_qlookup_10[QINDEX_RANGE] = {
4, 9, 10, 13, 15, 17, 20, 22, 25, 28, 31, 34, 37,
40, 43, 47, 50, 53, 57, 60, 64, 68, 71, 75, 78, 82,
@ -217,7 +217,7 @@ static const int16_t ac_qlookup[QINDEX_RANGE] = {
1567, 1597, 1628, 1660, 1692, 1725, 1759, 1793, 1828,
};
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static const int16_t ac_qlookup_10[QINDEX_RANGE] = {
4, 9, 11, 13, 16, 18, 21, 24, 27, 30, 33, 37, 40,
44, 48, 51, 55, 59, 63, 67, 71, 75, 79, 83, 88, 92,
@ -270,7 +270,7 @@ static const int16_t ac_qlookup_12[QINDEX_RANGE] = {
#endif
int16_t av1_dc_quant(int qindex, int delta, aom_bit_depth_t bit_depth) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
switch (bit_depth) {
case AOM_BITS_8: return dc_qlookup[clamp(qindex + delta, 0, MAXQ)];
case AOM_BITS_10: return dc_qlookup_10[clamp(qindex + delta, 0, MAXQ)];
@ -286,7 +286,7 @@ int16_t av1_dc_quant(int qindex, int delta, aom_bit_depth_t bit_depth) {
}
int16_t av1_ac_quant(int qindex, int delta, aom_bit_depth_t bit_depth) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
switch (bit_depth) {
case AOM_BITS_8: return ac_qlookup[clamp(qindex + delta, 0, MAXQ)];
case AOM_BITS_10: return ac_qlookup_10[clamp(qindex + delta, 0, MAXQ)];
@ -305,7 +305,7 @@ int16_t av1_qindex_from_ac(int ac, aom_bit_depth_t bit_depth) {
int i;
const int16_t *tab = ac_qlookup;
ac *= 4;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
switch (bit_depth) {
case AOM_BITS_10: {
tab = ac_qlookup_10;

Просмотреть файл

@ -409,7 +409,7 @@ void build_compound_seg_mask(uint8_t *mask, SEG_MASK_TYPE mask_type,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void build_compound_seg_mask_highbd(uint8_t *mask, SEG_MASK_TYPE mask_type,
const uint8_t *src0, int src0_stride,
const uint8_t *src1, int src1_stride,
@ -425,7 +425,7 @@ void build_compound_seg_mask_highbd(uint8_t *mask, SEG_MASK_TYPE mask_type,
default: assert(0);
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#elif COMPOUND_SEGMENT_TYPE == 1
#define DIFF_FACTOR 16
@ -463,7 +463,7 @@ void build_compound_seg_mask(uint8_t *mask, SEG_MASK_TYPE mask_type,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void diffwtd_mask_highbd(uint8_t *mask, int which_inverse, int mask_base,
const uint16_t *src0, int src0_stride,
const uint16_t *src1, int src1_stride,
@ -500,7 +500,7 @@ void build_compound_seg_mask_highbd(uint8_t *mask, SEG_MASK_TYPE mask_type,
default: assert(0);
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // COMPOUND_SEGMENT_TYPE
#endif // CONFIG_COMPOUND_SEGMENT
@ -629,7 +629,7 @@ static void build_masked_compound_wedge_extend(
mask, mask_stride, h, w, subh, subw);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void build_masked_compound_wedge_extend_highbd(
uint8_t *dst_8, int dst_stride, const uint8_t *src0_8, int src0_stride,
const uint8_t *src1_8, int src1_stride,
@ -657,7 +657,7 @@ static void build_masked_compound_wedge_extend_highbd(
src1_stride, mask, mask_stride, h, w, subh, subw,
bd);
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#else
static void build_masked_compound(
uint8_t *dst, int dst_stride, const uint8_t *src0, int src0_stride,
@ -673,7 +673,7 @@ static void build_masked_compound(
mask, block_size_wide[sb_type], h, w, subh, subw);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void build_masked_compound_highbd(
uint8_t *dst_8, int dst_stride, const uint8_t *src0_8, int src0_stride,
const uint8_t *src1_8, int src1_stride,
@ -690,7 +690,7 @@ static void build_masked_compound_highbd(
src1_stride, mask, block_size_wide[sb_type], h, w,
subh, subw, bd);
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_SUPERTX
void av1_make_masked_inter_predictor(const uint8_t *pre, int pre_stride,
@ -726,7 +726,7 @@ void av1_make_masked_inter_predictor(const uint8_t *pre, int pre_stride,
#endif // CONFIG_DUAL_FILTER
ConvolveParams conv_params = get_conv_params(0, plane);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint8_t, tmp_dst_[2 * MAX_SB_SQUARE]);
uint8_t *tmp_dst = (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
? CONVERT_TO_BYTEPTR(tmp_dst_)
@ -772,7 +772,7 @@ void av1_make_masked_inter_predictor(const uint8_t *pre, int pre_stride,
MAX_SB_SIZE, comp_data, mi->mbmi.sb_type, h, w);
#endif // CONFIG_SUPERTX
#else // CONFIG_AOM_HIGHBITDEPTH
#else // CONFIG_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint8_t, tmp_dst[MAX_SB_SQUARE]);
av1_make_inter_predictor(pre, pre_stride, tmp_dst, MAX_SB_SIZE, subpel_x,
subpel_y, sf, w, h, &conv_params, tmp_ipf,
@ -797,7 +797,7 @@ void av1_make_masked_inter_predictor(const uint8_t *pre, int pre_stride,
build_masked_compound(dst, dst_stride, dst, dst_stride, tmp_dst, MAX_SB_SIZE,
comp_data, mi->mbmi.sb_type, h, w);
#endif // CONFIG_SUPERTX
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#if CONFIG_COMPOUND_SEGMENT
(void)plane;
#endif // CONFIG_COMPOUND_SEGMENT
@ -807,7 +807,7 @@ void av1_make_masked_inter_predictor(const uint8_t *pre, int pre_stride,
// TODO(sarahparker) av1_highbd_build_inter_predictor and
// av1_build_inter_predictor should be combined with
// av1_make_inter_predictor
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_highbd_build_inter_predictor(const uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride,
const MV *src_mv,
@ -843,7 +843,7 @@ void av1_highbd_build_inter_predictor(const uint8_t *src, int src_stride,
#endif // CONFIG_GLOBAL_MOTION
sf->x_step_q4, sf->y_step_q4, xd);
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
void av1_build_inter_predictor(const uint8_t *src, int src_stride, uint8_t *dst,
int dst_stride, const MV *src_mv,
@ -1122,9 +1122,9 @@ void build_inter_predictors(MACROBLOCKD *xd, int plane,
#if CONFIG_CONVOLVE_ROUND
// TODO(angiebird): This part needs optimization
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (!(xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH))
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
av1_convolve_rounding(tmp_dst, MAX_SB_SIZE, dst, dst_buf->stride, w, h,
FILTER_BITS * 2 + is_compound -
conv_params.round_0 - conv_params.round_1);
@ -1156,7 +1156,7 @@ void av1_build_inter_predictor_sub8x8(MACROBLOCKD *xd, int plane, int i, int ir,
ConvolveParams conv_params = get_conv_params(ref, plane);
const uint8_t *pre =
&pd->pre[ref].buf[(ir * pd->pre[ref].stride + ic) << 2];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
av1_highbd_build_inter_predictor(
pre, pd->pre[ref].stride, dst, pd->dst.stride,
@ -1168,7 +1168,7 @@ void av1_build_inter_predictor_sub8x8(MACROBLOCKD *xd, int plane, int i, int ir,
plane, MV_PRECISION_Q3, mi_col * MI_SIZE + 4 * ic,
mi_row * MI_SIZE + 4 * ir, xd);
else
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
av1_build_inter_predictor(pre, pd->pre[ref].stride, dst, pd->dst.stride,
&mi->bmi[i].as_mv[ref].as_mv,
&xd->block_refs[ref]->sf, width, height,
@ -1396,9 +1396,9 @@ void av1_build_masked_inter_predictor_complex(
int w_remain, h_remain;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
const int is_hdb = (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ? 1 : 0;
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
assert(bsize <= BLOCK_32X32);
assert(IMPLIES(plane == 0, ssx == 0));
@ -1413,12 +1413,12 @@ void av1_build_masked_inter_predictor_complex(
dst += h_offset * dst_stride;
pre += h_offset * pre_stride;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (is_hdb)
aom_highbd_blend_a64_vmask(dst, dst_stride, dst, dst_stride, pre,
pre_stride, mask, h, top_w, xd->bd);
else
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
aom_blend_a64_vmask(dst, dst_stride, dst, dst_stride, pre, pre_stride,
mask, h, top_w);
@ -1434,12 +1434,12 @@ void av1_build_masked_inter_predictor_complex(
dst += w_offset;
pre += w_offset;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (is_hdb)
aom_highbd_blend_a64_hmask(dst, dst_stride, dst, dst_stride, pre,
pre_stride, mask, top_h, w, xd->bd);
else
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
aom_blend_a64_hmask(dst, dst_stride, dst, dst_stride, pre, pre_stride,
mask, top_h, w);
@ -1457,7 +1457,7 @@ void av1_build_masked_inter_predictor_complex(
return;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (is_hdb) {
dst = (uint8_t *)CONVERT_TO_SHORTPTR(dst);
pre = (const uint8_t *)CONVERT_TO_SHORTPTR(pre);
@ -1465,7 +1465,7 @@ void av1_build_masked_inter_predictor_complex(
pre_stride *= 2;
w_remain *= 2;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
do {
memcpy(dst, pre, w_remain * sizeof(uint8_t));
@ -1698,9 +1698,9 @@ void av1_build_obmc_inter_prediction(const AV1_COMMON *cm, MACROBLOCKD *xd,
int left_stride[MAX_MB_PLANE]) {
const BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type;
int plane, i;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
const int is_hbd = (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ? 1 : 0;
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
// handle above row
if (xd->up_available) {
@ -1734,12 +1734,12 @@ void av1_build_obmc_inter_prediction(const AV1_COMMON *cm, MACROBLOCKD *xd,
&above[plane][(i * MI_SIZE) >> pd->subsampling_x];
const uint8_t *const mask = av1_get_obmc_mask(bh);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (is_hbd)
aom_highbd_blend_a64_vmask(dst, dst_stride, dst, dst_stride, tmp,
tmp_stride, mask, bh, bw, xd->bd);
else
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
aom_blend_a64_vmask(dst, dst_stride, dst, dst_stride, tmp,
tmp_stride, mask, bh, bw);
}
@ -1781,12 +1781,12 @@ void av1_build_obmc_inter_prediction(const AV1_COMMON *cm, MACROBLOCKD *xd,
&left[plane][(i * MI_SIZE * tmp_stride) >> pd->subsampling_y];
const uint8_t *const mask = av1_get_obmc_mask(bw);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (is_hbd)
aom_highbd_blend_a64_hmask(dst, dst_stride, dst, dst_stride, tmp,
tmp_stride, mask, bh, bw, xd->bd);
else
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
aom_blend_a64_hmask(dst, dst_stride, dst, dst_stride, tmp,
tmp_stride, mask, bh, bw);
}
@ -1886,9 +1886,9 @@ void av1_build_prediction_by_above_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
above_mi);
av1_warp_plane(&above_mbmi->wm_params[0],
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH, xd->bd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
pd->pre[0].buf0, pd->pre[0].width, pd->pre[0].height,
pd->pre[0].stride, pd->dst.buf,
(((mi_col + i) * MI_SIZE) >> pd->subsampling_x),
@ -1990,9 +1990,9 @@ void av1_build_prediction_by_left_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
left_mi);
av1_warp_plane(&left_mbmi->wm_params[0],
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH, xd->bd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
pd->pre[0].buf0, pd->pre[0].width, pd->pre[0].height,
pd->pre[0].stride, pd->dst.buf,
((mi_col * MI_SIZE) >> pd->subsampling_x),
@ -2021,13 +2021,13 @@ void av1_build_prediction_by_left_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
void av1_build_obmc_inter_predictors_sb(const AV1_COMMON *cm, MACROBLOCKD *xd,
int mi_row, int mi_col) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint8_t, tmp_buf1[2 * MAX_MB_PLANE * MAX_SB_SQUARE]);
DECLARE_ALIGNED(16, uint8_t, tmp_buf2[2 * MAX_MB_PLANE * MAX_SB_SQUARE]);
#else
DECLARE_ALIGNED(16, uint8_t, tmp_buf1[MAX_MB_PLANE * MAX_SB_SQUARE]);
DECLARE_ALIGNED(16, uint8_t, tmp_buf2[MAX_MB_PLANE * MAX_SB_SQUARE]);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
uint8_t *dst_buf1[MAX_MB_PLANE], *dst_buf2[MAX_MB_PLANE];
int dst_stride1[MAX_MB_PLANE] = { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE };
int dst_stride2[MAX_MB_PLANE] = { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE };
@ -2036,7 +2036,7 @@ void av1_build_obmc_inter_predictors_sb(const AV1_COMMON *cm, MACROBLOCKD *xd,
int dst_height1[MAX_MB_PLANE] = { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE };
int dst_height2[MAX_MB_PLANE] = { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE };
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
int len = sizeof(uint16_t);
dst_buf1[0] = CONVERT_TO_BYTEPTR(tmp_buf1);
@ -2046,16 +2046,16 @@ void av1_build_obmc_inter_predictors_sb(const AV1_COMMON *cm, MACROBLOCKD *xd,
dst_buf2[1] = CONVERT_TO_BYTEPTR(tmp_buf2 + MAX_SB_SQUARE * len);
dst_buf2[2] = CONVERT_TO_BYTEPTR(tmp_buf2 + MAX_SB_SQUARE * 2 * len);
} else {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
dst_buf1[0] = tmp_buf1;
dst_buf1[1] = tmp_buf1 + MAX_SB_SQUARE;
dst_buf1[2] = tmp_buf1 + MAX_SB_SQUARE * 2;
dst_buf2[0] = tmp_buf2;
dst_buf2[1] = tmp_buf2 + MAX_SB_SQUARE;
dst_buf2[2] = tmp_buf2 + MAX_SB_SQUARE * 2;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
av1_build_prediction_by_above_preds(cm, xd, mi_row, mi_col, dst_buf1,
dst_width1, dst_height1, dst_stride1);
av1_build_prediction_by_left_preds(cm, xd, mi_row, mi_col, dst_buf2,
@ -2165,9 +2165,9 @@ void av1_build_prediction_by_bottom_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
mi);
av1_warp_plane(&mbmi->wm_params[0],
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH, xd->bd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
pd->pre[0].buf0, pd->pre[0].width, pd->pre[0].height,
pd->pre[0].stride, pd->dst.buf,
(((mi_col + i) * MI_SIZE) >> pd->subsampling_x),
@ -2296,9 +2296,9 @@ void av1_build_prediction_by_right_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
mi);
av1_warp_plane(&mbmi->wm_params[0],
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH, xd->bd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
pd->pre[0].buf0, pd->pre[0].width, pd->pre[0].height,
pd->pre[0].stride, pd->dst.buf,
((mi_col * MI_SIZE) >> pd->subsampling_x),
@ -2344,9 +2344,9 @@ void av1_merge_dst_bottom_right_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
const int bottom_available = mi_row + xd->n8_h < tile->mi_row_end &&
(mi_row + xd->n8_h) % MI_SIZE != 0 &&
(mi_row + xd->n8_h) < cm->mi_rows;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
int is_hbd = (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ? 1 : 0;
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
// handle bottom row
for (i = 0; bottom_available && i < AOMMIN(xd->n8_w, cm->mi_cols - mi_col);
@ -2379,12 +2379,12 @@ void av1_merge_dst_bottom_right_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
pd->subsampling_y)];
const uint8_t *const mask = av1_get_obmc_mask_flipped(bh);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (is_hbd)
aom_highbd_blend_a64_vmask(dst, dst_stride, dst, dst_stride, tmp,
tmp_stride, mask, bh, bw, xd->bd);
else
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
aom_blend_a64_vmask(dst, dst_stride, dst, dst_stride, tmp, tmp_stride,
mask, bh, bw);
}
@ -2422,12 +2422,12 @@ void av1_merge_dst_bottom_right_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
((xd->n8_w * MI_SIZE - overlap) >> pd->subsampling_x)];
const uint8_t *const mask = av1_get_obmc_mask_flipped(bw);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (is_hbd)
aom_highbd_blend_a64_hmask(dst, dst_stride, dst, dst_stride, tmp,
tmp_stride, mask, bh, bw, xd->bd);
else
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
aom_blend_a64_hmask(dst, dst_stride, dst, dst_stride, tmp, tmp_stride,
mask, bh, bw);
}
@ -2442,13 +2442,13 @@ void av1_merge_dst_bottom_right_preds(const AV1_COMMON *cm, MACROBLOCKD *xd,
// preds, and then merge them and xd->plane[].dst.buf.
void av1_build_ncobmc_inter_predictors_sb(const AV1_COMMON *cm, MACROBLOCKD *xd,
int mi_row, int mi_col) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint8_t, tmp_buf1[2 * MAX_MB_PLANE * MAX_SB_SQUARE]);
DECLARE_ALIGNED(16, uint8_t, tmp_buf2[2 * MAX_MB_PLANE * MAX_SB_SQUARE]);
#else
DECLARE_ALIGNED(16, uint8_t, tmp_buf1[MAX_MB_PLANE * MAX_SB_SQUARE]);
DECLARE_ALIGNED(16, uint8_t, tmp_buf2[MAX_MB_PLANE * MAX_SB_SQUARE]);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
uint8_t *dst_buf1[MAX_MB_PLANE], *dst_buf2[MAX_MB_PLANE];
int dst_stride1[MAX_MB_PLANE] = { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE };
int dst_stride2[MAX_MB_PLANE] = { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE };
@ -2457,7 +2457,7 @@ void av1_build_ncobmc_inter_predictors_sb(const AV1_COMMON *cm, MACROBLOCKD *xd,
int dst_height1[MAX_MB_PLANE] = { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE };
int dst_height2[MAX_MB_PLANE] = { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE };
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
int len = sizeof(uint16_t);
dst_buf1[0] = CONVERT_TO_BYTEPTR(tmp_buf1);
@ -2467,16 +2467,16 @@ void av1_build_ncobmc_inter_predictors_sb(const AV1_COMMON *cm, MACROBLOCKD *xd,
dst_buf2[1] = CONVERT_TO_BYTEPTR(tmp_buf2 + MAX_SB_SQUARE * len);
dst_buf2[2] = CONVERT_TO_BYTEPTR(tmp_buf2 + MAX_SB_SQUARE * 2 * len);
} else {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
dst_buf1[0] = tmp_buf1;
dst_buf1[1] = tmp_buf1 + MAX_SB_SQUARE;
dst_buf1[2] = tmp_buf1 + MAX_SB_SQUARE * 2;
dst_buf2[0] = tmp_buf2;
dst_buf2[1] = tmp_buf2 + MAX_SB_SQUARE;
dst_buf2[2] = tmp_buf2 + MAX_SB_SQUARE * 2;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
av1_build_prediction_by_bottom_preds(cm, xd, mi_row, mi_col, dst_buf1,
dst_width1, dst_height1, dst_stride1);
@ -2640,7 +2640,7 @@ static void combine_interintra(INTERINTRA_MODE mode, int use_wedge_interintra,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void combine_interintra_highbd(
INTERINTRA_MODE mode, int use_wedge_interintra, int wedge_index,
int wedge_sign, BLOCK_SIZE bsize, BLOCK_SIZE plane_bsize,
@ -2755,7 +2755,7 @@ static void combine_interintra_highbd(
break;
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
void av1_build_intra_predictors_for_interintra(MACROBLOCKD *xd,
BLOCK_SIZE bsize, int plane,
@ -2775,7 +2775,7 @@ void av1_combine_interintra(MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane,
const uint8_t *inter_pred, int inter_stride,
const uint8_t *intra_pred, int intra_stride) {
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, &xd->plane[plane]);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
combine_interintra_highbd(
xd->mi[0]->mbmi.interintra_mode, xd->mi[0]->mbmi.use_wedge_interintra,
@ -2785,7 +2785,7 @@ void av1_combine_interintra(MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane,
inter_stride, intra_pred, intra_stride, xd->bd);
return;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
combine_interintra(xd->mi[0]->mbmi.interintra_mode,
xd->mi[0]->mbmi.use_wedge_interintra,
xd->mi[0]->mbmi.interintra_wedge_index,
@ -2797,7 +2797,7 @@ void av1_combine_interintra(MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane,
void av1_build_interintra_predictors_sby(MACROBLOCKD *xd, uint8_t *ypred,
int ystride, BUFFER_SET *ctx,
BLOCK_SIZE bsize) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
DECLARE_ALIGNED(16, uint16_t, intrapredictor[MAX_SB_SQUARE]);
av1_build_intra_predictors_for_interintra(
@ -2806,7 +2806,7 @@ void av1_build_interintra_predictors_sby(MACROBLOCKD *xd, uint8_t *ypred,
CONVERT_TO_BYTEPTR(intrapredictor), MAX_SB_SIZE);
return;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
{
DECLARE_ALIGNED(16, uint8_t, intrapredictor[MAX_SB_SQUARE]);
av1_build_intra_predictors_for_interintra(xd, bsize, 0, ctx, intrapredictor,
@ -2819,7 +2819,7 @@ void av1_build_interintra_predictors_sby(MACROBLOCKD *xd, uint8_t *ypred,
void av1_build_interintra_predictors_sbc(MACROBLOCKD *xd, uint8_t *upred,
int ustride, BUFFER_SET *ctx,
int plane, BLOCK_SIZE bsize) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
DECLARE_ALIGNED(16, uint16_t, uintrapredictor[MAX_SB_SQUARE]);
av1_build_intra_predictors_for_interintra(
@ -2829,7 +2829,7 @@ void av1_build_interintra_predictors_sbc(MACROBLOCKD *xd, uint8_t *upred,
CONVERT_TO_BYTEPTR(uintrapredictor), MAX_SB_SIZE);
return;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
{
DECLARE_ALIGNED(16, uint8_t, uintrapredictor[MAX_SB_SQUARE]);
av1_build_intra_predictors_for_interintra(xd, bsize, plane, ctx,
@ -2869,7 +2869,7 @@ static void build_inter_predictors_single_buf(MACROBLOCKD *xd, int plane,
const struct scale_factors *const sf = &xd->block_refs[ref]->sf;
struct buf_2d *const pre_buf = &pd->pre[ref];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
uint8_t *const dst =
(xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH ? CONVERT_TO_BYTEPTR(ext_dst)
: ext_dst) +
@ -2976,7 +2976,7 @@ static void build_wedge_inter_predictor_from_buf(
if (is_compound &&
is_masked_compound_type(mbmi->interinter_compound_data.type)) {
#if CONFIG_COMPOUND_SEGMENT
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (!plane && comp_data->type == COMPOUND_SEG) {
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
build_compound_seg_mask_highbd(
@ -2994,43 +2994,43 @@ static void build_wedge_inter_predictor_from_buf(
build_compound_seg_mask(comp_data->seg_mask, comp_data->mask_type,
ext_dst0, ext_dst_stride0, ext_dst1,
ext_dst_stride1, mbmi->sb_type, h, w);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_COMPOUND_SEGMENT
#if CONFIG_SUPERTX
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
build_masked_compound_wedge_extend_highbd(
dst, dst_buf->stride, CONVERT_TO_BYTEPTR(ext_dst0), ext_dst_stride0,
CONVERT_TO_BYTEPTR(ext_dst1), ext_dst_stride1, comp_data,
mbmi->sb_type, wedge_offset_x, wedge_offset_y, h, w, xd->bd);
else
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
build_masked_compound_wedge_extend(
dst, dst_buf->stride, ext_dst0, ext_dst_stride0, ext_dst1,
ext_dst_stride1, comp_data, mbmi->sb_type, wedge_offset_x,
wedge_offset_y, h, w);
#else
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
build_masked_compound_highbd(
dst, dst_buf->stride, CONVERT_TO_BYTEPTR(ext_dst0), ext_dst_stride0,
CONVERT_TO_BYTEPTR(ext_dst1), ext_dst_stride1, comp_data,
mbmi->sb_type, h, w, xd->bd);
else
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
build_masked_compound(dst, dst_buf->stride, ext_dst0, ext_dst_stride0,
ext_dst1, ext_dst_stride1, comp_data, mbmi->sb_type,
h, w);
#endif // CONFIG_SUPERTX
} else {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
aom_highbd_convolve_copy(CONVERT_TO_BYTEPTR(ext_dst0), ext_dst_stride0,
dst, dst_buf->stride, NULL, 0, NULL, 0, w, h,
xd->bd);
else
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
aom_convolve_copy(ext_dst0, ext_dst_stride0, dst, dst_buf->stride, NULL,
0, NULL, 0, w, h);
}

Просмотреть файл

@ -100,7 +100,7 @@ static INLINE void inter_predictor(const uint8_t *src, int src_stride,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE void highbd_inter_predictor(const uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride,
const int subpel_x,
@ -148,7 +148,7 @@ static INLINE void highbd_inter_predictor(const uint8_t *src, int src_stride,
subpel_x, xs, subpel_y, ys, avg, bd);
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#if CONFIG_EXT_INTER
// Set to one to use larger codebooks
@ -243,12 +243,12 @@ void build_compound_seg_mask(uint8_t *mask, SEG_MASK_TYPE mask_type,
const uint8_t *src0, int src0_stride,
const uint8_t *src1, int src1_stride,
BLOCK_SIZE sb_type, int h, int w);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void build_compound_seg_mask_highbd(uint8_t *mask, SEG_MASK_TYPE mask_type,
const uint8_t *src0, int src0_stride,
const uint8_t *src1, int src1_stride,
BLOCK_SIZE sb_type, int h, int w, int bd);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_COMPOUND_SEGMENT
#endif // CONFIG_EXT_INTER
@ -292,23 +292,23 @@ static INLINE void av1_make_inter_predictor(
WarpedMotionParams *gm = &xd->global_motion[mi->mbmi.ref_frame[ref]];
av1_warp_plane(gm,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH, xd->bd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
pre_buf->buf0, pre_buf->width, pre_buf->height,
pre_buf->stride, dst, p_col, p_row, w, h, dst_stride,
pd->subsampling_x, pd->subsampling_y, xs, ys, ref);
return;
}
#endif // CONFIG_GLOBAL_MOTION
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
highbd_inter_predictor(src, src_stride, dst, dst_stride, subpel_x, subpel_y,
sf, w, h, conv_params->ref, interp_filter, xs, ys,
xd->bd);
return;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
inter_predictor(src, src_stride, dst, dst_stride, subpel_x, subpel_y, sf, w,
h, conv_params, interp_filter, xs, ys);
}
@ -452,7 +452,7 @@ void av1_build_inter_predictor(const uint8_t *src, int src_stride, uint8_t *dst,
enum mv_precision precision, int x, int y,
const MACROBLOCKD *xd);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_highbd_build_inter_predictor(const uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride,
const MV *mv_q3,

Просмотреть файл

@ -16,9 +16,9 @@
#include "./aom_dsp_rtcd.h"
#include "aom_ports/system_state.h"
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
#include "aom_dsp/aom_dsp_common.h"
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#include "aom_mem/aom_mem.h"
#include "aom_ports/mem.h"
#include "aom_ports/aom_once.h"
@ -542,13 +542,13 @@ typedef void (*intra_pred_fn)(uint8_t *dst, ptrdiff_t stride,
static intra_pred_fn pred[INTRA_MODES][TX_SIZES];
static intra_pred_fn dc_pred[2][2][TX_SIZES];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
typedef void (*intra_high_pred_fn)(uint16_t *dst, ptrdiff_t stride,
const uint16_t *above, const uint16_t *left,
int bd);
static intra_high_pred_fn pred_high[INTRA_MODES][TX_SIZES];
static intra_high_pred_fn dc_pred_high[2][2][TX_SIZES];
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
static void av1_init_intra_predictors_internal(void) {
#if CONFIG_TX64X64
@ -596,7 +596,7 @@ static void av1_init_intra_predictors_internal(void) {
INIT_ALL_SIZES(dc_pred[1][0], dc_left);
INIT_ALL_SIZES(dc_pred[1][1], dc);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
INIT_ALL_SIZES(pred_high[V_PRED], highbd_v);
INIT_ALL_SIZES(pred_high[H_PRED], highbd_h);
INIT_ALL_SIZES(pred_high[D207_PRED], highbd_d207e);
@ -617,7 +617,7 @@ static void av1_init_intra_predictors_internal(void) {
INIT_ALL_SIZES(dc_pred_high[0][1], highbd_dc_top);
INIT_ALL_SIZES(dc_pred_high[1][0], highbd_dc_left);
INIT_ALL_SIZES(dc_pred_high[1][1], highbd_dc);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#undef intra_pred_allsizes
}
@ -966,7 +966,7 @@ static void dr_predictor(uint8_t *dst, ptrdiff_t stride, TX_SIZE tx_size,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
#if CONFIG_INTRA_INTERP
static int highbd_intra_subpel_interp(int base, int shift, const uint16_t *ref,
int ref_start_idx, int ref_end_idx,
@ -1183,7 +1183,7 @@ static void highbd_dr_predictor(uint16_t *dst, ptrdiff_t stride, int bs,
highbd_h_predictor(dst, stride, bs, above, left, bd);
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
@ -1578,7 +1578,7 @@ static void filter_intra_predictors(FILTER_INTRA_MODE mode, uint8_t *dst,
default: assert(0);
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
#if USE_3TAP_INTRA_FILTER
static void highbd_filter_intra_predictors_3tap(uint16_t *dst, ptrdiff_t stride,
int bs, const uint16_t *above,
@ -1826,10 +1826,10 @@ static void highbd_filter_intra_predictors(FILTER_INTRA_MODE mode,
default: assert(0);
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_FILTER_INTRA
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void build_intra_predictors_high(
const MACROBLOCKD *xd, const uint8_t *ref8, int ref_stride, uint8_t *dst8,
int dst_stride, PREDICTION_MODE mode, TX_SIZE tx_size, int n_top_px,
@ -1998,7 +1998,7 @@ static void build_intra_predictors_high(
xd->bd);
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
int ref_stride, uint8_t *dst, int dst_stride,
@ -2228,15 +2228,15 @@ static void predict_square_intra_block(const MACROBLOCKD *xd, int wpx, int hpx,
const int stride = wpx;
int r, c;
const uint8_t *const map = xd->plane[plane != 0].color_index_map;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
uint16_t *palette = xd->mi[0]->mbmi.palette_mode_info.palette_colors +
plane * PALETTE_MAX_SIZE;
#else
uint8_t *palette = xd->mi[0]->mbmi.palette_mode_info.palette_colors +
plane * PALETTE_MAX_SIZE;
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
uint16_t *dst16 = CONVERT_TO_SHORTPTR(dst);
for (r = 0; r < bs; ++r)
@ -2252,12 +2252,12 @@ static void predict_square_intra_block(const MACROBLOCKD *xd, int wpx, int hpx,
for (r = 0; r < bs; ++r)
for (c = 0; c < bs; ++c)
dst[r * dst_stride + c] = palette[map[(r + y) * stride + c + x]];
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
return;
}
#endif // CONFIG_PALETTE
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
build_intra_predictors_high(
xd, ref, ref_stride, dst, dst_stride, mode, tx_size,
@ -2304,7 +2304,7 @@ void av1_predict_intra_block(const MACROBLOCKD *xd, int wpx, int hpx,
dst, dst_stride, col_off, row_off, plane);
} else {
#if (CONFIG_RECT_TX && (CONFIG_VAR_TX || CONFIG_EXT_TX)) || (CONFIG_EXT_INTER)
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
uint16_t tmp16[MAX_SB_SIZE];
#endif
uint8_t tmp[MAX_SB_SIZE];
@ -2328,7 +2328,7 @@ void av1_predict_intra_block(const MACROBLOCKD *xd, int wpx, int hpx,
// Save the last row of top square sub-block as 'above' row for bottom
// square sub-block.
if (src_2 != dst_2 || ref_stride != dst_stride) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
uint16_t *src_2_16 = CONVERT_TO_SHORTPTR(src_2);
uint16_t *dst_2_16 = CONVERT_TO_SHORTPTR(dst_2);
@ -2337,13 +2337,13 @@ void av1_predict_intra_block(const MACROBLOCKD *xd, int wpx, int hpx,
memcpy(src_2_16 - ref_stride, dst_2_16 - dst_stride,
block_width * sizeof(*src_2_16));
} else {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
memcpy(tmp, src_2 - ref_stride, block_width * sizeof(*src_2));
memcpy(src_2 - ref_stride, dst_2 - dst_stride,
block_width * sizeof(*src_2));
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
}
// Predict the bottom square sub-block.
predict_square_intra_block(xd, wpx, hpx, tx_size, mode, src_2,
@ -2351,17 +2351,17 @@ void av1_predict_intra_block(const MACROBLOCKD *xd, int wpx, int hpx,
row_off_2, plane);
// Restore the last row of top square sub-block.
if (src_2 != dst_2 || ref_stride != dst_stride) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
uint16_t *src_2_16 = CONVERT_TO_SHORTPTR(src_2);
memcpy(src_2_16 - ref_stride, tmp16,
block_width * sizeof(*src_2_16));
} else {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
memcpy(src_2 - ref_stride, tmp, block_width * sizeof(*src_2));
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
}
}
} else { // block_width > block_height
@ -2381,7 +2381,7 @@ void av1_predict_intra_block(const MACROBLOCKD *xd, int wpx, int hpx,
// Save the last column of left square sub-block as 'left' column for
// right square sub-block.
if (src_2 != dst_2 || ref_stride != dst_stride) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
uint16_t *src_2_16 = CONVERT_TO_SHORTPTR(src_2);
uint16_t *dst_2_16 = CONVERT_TO_SHORTPTR(dst_2);
@ -2390,14 +2390,14 @@ void av1_predict_intra_block(const MACROBLOCKD *xd, int wpx, int hpx,
src_2_16[i * ref_stride - 1] = dst_2_16[i * dst_stride - 1];
}
} else {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
for (i = 0; i < block_height; ++i) {
tmp[i] = src_2[i * ref_stride - 1];
src_2[i * ref_stride - 1] = dst_2[i * dst_stride - 1];
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
}
// Predict the right square sub-block.
predict_square_intra_block(xd, wpx, hpx, tx_size, mode, src_2,
@ -2405,20 +2405,20 @@ void av1_predict_intra_block(const MACROBLOCKD *xd, int wpx, int hpx,
row_off, plane);
// Restore the last column of left square sub-block.
if (src_2 != dst_2 || ref_stride != dst_stride) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
uint16_t *src_2_16 = CONVERT_TO_SHORTPTR(src_2);
for (i = 0; i < block_height; ++i) {
src_2_16[i * ref_stride - 1] = tmp16[i];
}
} else {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
for (i = 0; i < block_height; ++i) {
src_2[i * ref_stride - 1] = tmp[i];
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
}
}
}

Просмотреть файл

@ -17,9 +17,9 @@
#include <string.h>
#include "./aom_config.h"
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
#include "aom_dsp/aom_dsp_common.h"
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#include "aom_ports/mem.h"
#include "av1/common/common.h"
#include "av1/common/resize.h"
@ -452,7 +452,7 @@ Error:
free(arrbuf2);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void highbd_interpolate(const uint16_t *const input, int inlength,
uint16_t *output, int outlength, int bd) {
const int64_t delta =
@ -738,7 +738,7 @@ Error:
free(arrbuf);
free(arrbuf2);
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
void av1_resize_frame420(const uint8_t *const y, int y_stride,
const uint8_t *const u, const uint8_t *const v,
@ -776,7 +776,7 @@ void av1_resize_frame444(const uint8_t *const y, int y_stride,
ouv_stride);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_highbd_resize_frame420(const uint8_t *const y, int y_stride,
const uint8_t *const u, const uint8_t *const v,
int uv_stride, int height, int width,
@ -818,4 +818,4 @@ void av1_highbd_resize_frame444(const uint8_t *const y, int y_stride,
av1_highbd_resize_plane(v, height, width, uv_stride, ov, oheight, owidth,
ouv_stride, bd);
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -38,7 +38,7 @@ void av1_resize_frame444(const uint8_t *const y, int y_stride,
int oy_stride, uint8_t *ou, uint8_t *ov,
int ouv_stride, int oheight, int owidth);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_highbd_resize_plane(const uint8_t *const input, int height, int width,
int in_stride, uint8_t *output, int height2,
int width2, int out_stride, int bd);
@ -60,7 +60,7 @@ void av1_highbd_resize_frame444(const uint8_t *const y, int y_stride,
uint8_t *oy, int oy_stride, uint8_t *ou,
uint8_t *ov, int ouv_stride, int oheight,
int owidth, int bd);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#ifdef __cplusplus
} // extern "C"

Просмотреть файл

@ -40,12 +40,12 @@ const sgr_params_type sgr_params[SGRPROJ_PARAMS] = {
typedef void (*restore_func_type)(uint8_t *data8, int width, int height,
int stride, RestorationInternal *rst,
uint8_t *dst8, int dst_stride);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
typedef void (*restore_func_highbd_type)(uint8_t *data8, int width, int height,
int stride, RestorationInternal *rst,
int bit_depth, uint8_t *dst8,
int dst_stride);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
int av1_alloc_restoration_struct(AV1_COMMON *cm, RestorationInfo *rst_info,
int width, int height) {
@ -929,7 +929,7 @@ static void loop_switchable_filter(uint8_t *data, int width, int height,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void extend_frame_highbd(uint16_t *data, int width, int height, int stride) {
uint16_t *data_p;
int i, j;
@ -1216,7 +1216,7 @@ static void loop_switchable_filter_highbd(uint8_t *data8, int width, int height,
}
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
static void loop_restoration_rows(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
int start_mi_row, int end_mi_row,
@ -1233,16 +1233,16 @@ static void loop_restoration_rows(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
restore_func_type restore_funcs[RESTORE_TYPES] = {
NULL, loop_wiener_filter, loop_sgrproj_filter, loop_switchable_filter
};
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
restore_func_highbd_type restore_funcs_highbd[RESTORE_TYPES] = {
NULL, loop_wiener_filter_highbd, loop_sgrproj_filter_highbd,
loop_switchable_filter_highbd
};
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
restore_func_type restore_func;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
restore_func_highbd_type restore_func_highbd;
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
YV12_BUFFER_CONFIG dst_;
yend = AOMMIN(yend, cm->height);
@ -1282,7 +1282,7 @@ static void loop_restoration_rows(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
memset(dst, 0, sizeof(YV12_BUFFER_CONFIG));
if (aom_realloc_frame_buffer(
dst, cm->width, cm->height, cm->subsampling_x, cm->subsampling_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
AOM_BORDER_IN_PIXELS, cm->byte_alignment, NULL, NULL, NULL) < 0)
@ -1299,7 +1299,7 @@ static void loop_restoration_rows(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
cm->rst_internal.rsi = &rsi[0];
restore_func =
restore_funcs[cm->rst_internal.rsi->frame_restoration_type];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
restore_func_highbd =
restore_funcs_highbd[cm->rst_internal.rsi->frame_restoration_type];
if (cm->use_highbitdepth)
@ -1308,7 +1308,7 @@ static void loop_restoration_rows(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
&cm->rst_internal, cm->bit_depth,
dst->y_buffer + ystart * dst->y_stride, dst->y_stride);
else
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
restore_func(frame->y_buffer + ystart * ystride, ywidth, yend - ystart,
ystride, &cm->rst_internal,
dst->y_buffer + ystart * dst->y_stride, dst->y_stride);
@ -1328,7 +1328,7 @@ static void loop_restoration_rows(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
cm->rst_internal.rsi = &rsi[AOM_PLANE_U];
restore_func =
restore_funcs[cm->rst_internal.rsi->frame_restoration_type];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
restore_func_highbd =
restore_funcs_highbd[cm->rst_internal.rsi->frame_restoration_type];
if (cm->use_highbitdepth)
@ -1337,7 +1337,7 @@ static void loop_restoration_rows(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
uvstride, &cm->rst_internal, cm->bit_depth,
dst->u_buffer + uvstart * dst->uv_stride, dst->uv_stride);
else
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
restore_func(frame->u_buffer + uvstart * uvstride, uvwidth,
uvend - uvstart, uvstride, &cm->rst_internal,
dst->u_buffer + uvstart * dst->uv_stride, dst->uv_stride);
@ -1357,7 +1357,7 @@ static void loop_restoration_rows(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
cm->rst_internal.rsi = &rsi[AOM_PLANE_V];
restore_func =
restore_funcs[cm->rst_internal.rsi->frame_restoration_type];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
restore_func_highbd =
restore_funcs_highbd[cm->rst_internal.rsi->frame_restoration_type];
if (cm->use_highbitdepth)
@ -1366,7 +1366,7 @@ static void loop_restoration_rows(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
uvstride, &cm->rst_internal, cm->bit_depth,
dst->v_buffer + uvstart * dst->uv_stride, dst->uv_stride);
else
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
restore_func(frame->v_buffer + uvstart * uvstride, uvwidth,
uvend - uvstart, uvstride, &cm->rst_internal,
dst->v_buffer + uvstart * dst->uv_stride, dst->uv_stride);

Просмотреть файл

@ -219,9 +219,9 @@ int av1_alloc_restoration_struct(struct AV1Common *cm,
void av1_free_restoration_struct(RestorationInfo *rst_info);
void extend_frame(uint8_t *data, int width, int height, int stride);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void extend_frame_highbd(uint16_t *data, int width, int height, int stride);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
void decode_xq(int *xqd, int *xq);
void av1_loop_restoration_frame(YV12_BUFFER_CONFIG *frame, struct AV1Common *cm,
RestorationInfo *rsi, int components_pattern,

Просмотреть файл

@ -43,7 +43,7 @@ MV32 av1_scale_mv(const MV *mv, int x, int y, const struct scale_factors *sf) {
return res;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_setup_scale_factors_for_frame(struct scale_factors *sf, int other_w,
int other_h, int this_w, int this_h,
int use_highbd) {
@ -117,7 +117,7 @@ void av1_setup_scale_factors_for_frame(struct scale_factors *sf, int other_w,
sf->predict[1][1][0] = aom_convolve8;
sf->predict[1][1][1] = aom_convolve8_avg;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (use_highbd) {
if (sf->x_step_q4 == 16) {
if (sf->y_step_q4 == 16) {
@ -160,5 +160,5 @@ void av1_setup_scale_factors_for_frame(struct scale_factors *sf, int other_w,
sf->highbd_predict[1][1][0] = aom_highbd_convolve8;
sf->highbd_predict[1][1][1] = aom_highbd_convolve8_avg;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
}

Просмотреть файл

@ -33,21 +33,21 @@ struct scale_factors {
int (*scale_value_y)(int val, const struct scale_factors *sf);
convolve_fn_t predict[2][2][2]; // horiz, vert, avg
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
highbd_convolve_fn_t highbd_predict[2][2][2]; // horiz, vert, avg
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
};
MV32 av1_scale_mv(const MV *mv, int x, int y, const struct scale_factors *sf);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_setup_scale_factors_for_frame(struct scale_factors *sf, int other_w,
int other_h, int this_w, int this_h,
int use_high);
#else
void av1_setup_scale_factors_for_frame(struct scale_factors *sf, int other_w,
int other_h, int this_w, int this_h);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
static INLINE int av1_is_valid_scale(const struct scale_factors *sf) {
return sf->x_scale_fp != REF_INVALID_SCALE &&

Просмотреть файл

@ -698,7 +698,7 @@ int get_shear_params(WarpedMotionParams *wm) {
return 1;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE void highbd_get_subcolumn(int taps, uint16_t *ref, int32_t *col,
int stride, int x, int y_start) {
int i;
@ -1049,7 +1049,7 @@ static double highbd_warp_erroradv(WarpedMotionParams *wm, uint8_t *ref8,
aom_free(tmp);
return (double)gm_sumerr / no_gm_sumerr;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
static INLINE int error_measure(int err) {
return error_measure_lut[255 + err];
@ -1303,41 +1303,41 @@ static double warp_erroradv(WarpedMotionParams *wm, uint8_t *ref, int width,
}
double av1_warp_erroradv(WarpedMotionParams *wm,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
int use_hbd, int bd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
uint8_t *ref, int width, int height, int stride,
uint8_t *dst, int p_col, int p_row, int p_width,
int p_height, int p_stride, int subsampling_x,
int subsampling_y, int x_scale, int y_scale) {
if (wm->wmtype <= AFFINE)
if (!get_shear_params(wm)) return 1;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (use_hbd)
return highbd_warp_erroradv(
wm, ref, width, height, stride, dst, p_col, p_row, p_width, p_height,
p_stride, subsampling_x, subsampling_y, x_scale, y_scale, bd);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
return warp_erroradv(wm, ref, width, height, stride, dst, p_col, p_row,
p_width, p_height, p_stride, subsampling_x,
subsampling_y, x_scale, y_scale);
}
void av1_warp_plane(WarpedMotionParams *wm,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
int use_hbd, int bd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
uint8_t *ref, int width, int height, int stride,
uint8_t *pred, int p_col, int p_row, int p_width,
int p_height, int p_stride, int subsampling_x,
int subsampling_y, int x_scale, int y_scale, int ref_frm) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (use_hbd)
highbd_warp_plane(wm, ref, width, height, stride, pred, p_col, p_row,
p_width, p_height, p_stride, subsampling_x, subsampling_y,
x_scale, y_scale, bd, ref_frm);
else
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
warp_plane(wm, ref, width, height, stride, pred, p_col, p_row, p_width,
p_height, p_stride, subsampling_x, subsampling_y, x_scale,
y_scale, ref_frm);

Просмотреть файл

@ -69,18 +69,18 @@ void project_points(WarpedMotionParams *wm_params, int *points, int *proj,
const int subsampling_x, const int subsampling_y);
double av1_warp_erroradv(WarpedMotionParams *wm,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
int use_hbd, int bd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
uint8_t *ref, int width, int height, int stride,
uint8_t *dst, int p_col, int p_row, int p_width,
int p_height, int p_stride, int subsampling_x,
int subsampling_y, int x_scale, int y_scale);
void av1_warp_plane(WarpedMotionParams *wm,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
int use_hbd, int bd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
uint8_t *ref, int width, int height, int stride,
uint8_t *pred, int p_col, int p_row, int p_width,
int p_height, int p_stride, int subsampling_x,

Просмотреть файл

@ -577,7 +577,7 @@ void av1_tm_filter_predictor_sse4_1(uint8_t *dst, ptrdiff_t stride, int bs,
}
// ============== High Bit Depth ==============
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE int HighbdGetMeanValue4x4(const uint16_t *above,
const uint16_t *left, const int bd,
__m128i *params) {
@ -888,4 +888,4 @@ void av1_highbd_tm_filter_predictor_sse4_1(uint16_t *dst, ptrdiff_t stride,
GetIntraFilterParams(bs, TM_PRED, &prm[0]);
HighbdFilterPrediction(above, left, bs, bd, prm, dst, stride);
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH

Просмотреть файл

@ -17,7 +17,7 @@
#include "aom_dsp/x86/txfm_common_avx2.h"
static INLINE void load_coeff(const tran_low_t *coeff, __m256i *in) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
*in = _mm256_setr_epi16(
(int16_t)coeff[0], (int16_t)coeff[1], (int16_t)coeff[2],
(int16_t)coeff[3], (int16_t)coeff[4], (int16_t)coeff[5],

Просмотреть файл

@ -12,7 +12,7 @@ static void calc_block(__m128i sum, __m128i sum_sq, __m128i n,
__m128i one_over_n, __m128i s, int bit_depth, int idx,
int32_t *A, int32_t *B) {
__m128i a, b, p;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (bit_depth > 8) {
__m128i rounding_a = _mm_set1_epi32((1 << (2 * (bit_depth - 8))) >> 1);
__m128i rounding_b = _mm_set1_epi32((1 << (bit_depth - 8)) >> 1);
@ -29,7 +29,7 @@ static void calc_block(__m128i sum, __m128i sum_sq, __m128i n,
a = _mm_mullo_epi32(sum_sq, n);
b = _mm_mullo_epi32(sum, sum);
p = _mm_sub_epi32(a, b);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif
@ -1125,7 +1125,7 @@ void apply_selfguided_restoration_sse4_1(uint8_t *dat, int width, int height,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
// Only the vertical sums need to be adjusted for highbitdepth
static void highbd_selfguided_restoration_1_v(uint16_t *src, int width,

Просмотреть файл

@ -355,9 +355,9 @@ static int av1_pvq_decode_helper(MACROBLOCKD *xd, tran_low_t *ref_coeff,
od_coeff ref_int32[OD_TXSIZE_MAX * OD_TXSIZE_MAX];
od_coeff out_int32[OD_TXSIZE_MAX * OD_TXSIZE_MAX];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
hbd_downshift = xd->bd - 8;
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
od_raster_to_coding_order(ref_coeff_pvq, blk_size, tx_type, ref_coeff,
blk_size);
@ -458,7 +458,7 @@ static int av1_pvq_decode_helper2(AV1_COMMON *cm, MACROBLOCKD *const xd,
FWD_TXFM_PARAM fwd_txfm_param;
// ToDo(yaowu): correct this with optimal number from decoding process.
const int max_scan_line = tx_size_2d[tx_size];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
for (j = 0; j < tx_blk_size; j++)
for (i = 0; i < tx_blk_size; i++)
@ -469,7 +469,7 @@ static int av1_pvq_decode_helper2(AV1_COMMON *cm, MACROBLOCKD *const xd,
for (j = 0; j < tx_blk_size; j++)
for (i = 0; i < tx_blk_size; i++)
pred[diff_stride * j + i] = dst[pd->dst.stride * j + i];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif
@ -477,16 +477,16 @@ static int av1_pvq_decode_helper2(AV1_COMMON *cm, MACROBLOCKD *const xd,
fwd_txfm_param.tx_size = tx_size;
fwd_txfm_param.lossless = xd->lossless[seg_id];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
fwd_txfm_param.bd = xd->bd;
av1_highbd_fwd_txfm(pred, pvq_ref_coeff, diff_stride, &fwd_txfm_param);
} else {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
av1_fwd_txfm(pred, pvq_ref_coeff, diff_stride, &fwd_txfm_param);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
quant = &pd->seg_dequant[seg_id][0]; // aom's quantizer
@ -1027,7 +1027,7 @@ static void dec_predict_sb_complex(AV1Decoder *const pbi, MACROBLOCKD *const xd,
int dst_stride2[3] = { MAX_TX_SIZE, MAX_TX_SIZE, MAX_TX_SIZE };
int dst_stride3[3] = { MAX_TX_SIZE, MAX_TX_SIZE, MAX_TX_SIZE };
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
int len = sizeof(uint16_t);
dst_buf1[0] = CONVERT_TO_BYTEPTR(tmp_buf1);
@ -1050,7 +1050,7 @@ static void dec_predict_sb_complex(AV1Decoder *const pbi, MACROBLOCKD *const xd,
dst_buf3[0] = tmp_buf3;
dst_buf3[1] = tmp_buf3 + MAX_TX_SQUARE;
dst_buf3[2] = tmp_buf3 + 2 * MAX_TX_SQUARE;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif
@ -1736,9 +1736,9 @@ static void decode_token_and_recon_block(AV1Decoder *const pbi,
const struct macroblockd_plane *pd = &xd->plane[i];
av1_warp_plane(&mbmi->wm_params[0],
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH, xd->bd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
pd->pre[0].buf0, pd->pre[0].width, pd->pre[0].height,
pd->pre[0].stride, pd->dst.buf,
((mi_col * MI_SIZE) >> pd->subsampling_x),
@ -2844,7 +2844,7 @@ static void setup_frame_size(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {
if (aom_realloc_frame_buffer(
get_frame_new_buffer(cm), cm->width, cm->height, cm->subsampling_x,
cm->subsampling_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
AOM_BORDER_IN_PIXELS, cm->byte_alignment,
@ -2927,7 +2927,7 @@ static void setup_frame_size_with_refs(AV1_COMMON *cm,
if (aom_realloc_frame_buffer(
get_frame_new_buffer(cm), cm->width, cm->height, cm->subsampling_x,
cm->subsampling_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
AOM_BORDER_IN_PIXELS, cm->byte_alignment,
@ -3914,7 +3914,7 @@ static void read_bitdepth_colorspace_sampling(AV1_COMMON *cm,
cm->bit_depth = AOM_BITS_8;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->bit_depth > AOM_BITS_8) {
cm->use_highbitdepth = 1;
} else {
@ -3993,7 +3993,7 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
"Invalid frame marker");
cm->profile = av1_read_profile(rb);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->profile >= MAX_PROFILES)
aom_internal_error(&cm->error, AOM_CODEC_UNSUP_BITSTREAM,
"Unsupported bitstream profile");
@ -4207,7 +4207,7 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
#endif
for (i = 0; i < INTER_REFS_PER_FRAME; ++i) {
RefBuffer *const ref_buf = &cm->frame_refs[i];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
av1_setup_scale_factors_for_frame(
&ref_buf->sf, ref_buf->buf->y_crop_width,
ref_buf->buf->y_crop_height, cm->width, cm->height,
@ -4239,7 +4239,7 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
}
#endif
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
get_frame_new_buffer(cm)->bit_depth = cm->bit_depth;
#endif
get_frame_new_buffer(cm)->color_space = cm->color_space;
@ -4307,7 +4307,7 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
decode_restoration_mode(cm, rb);
#endif // CONFIG_LOOP_RESTORATION
setup_quantization(cm, rb);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
xd->bd = (int)cm->bit_depth;
#endif

Просмотреть файл

@ -205,7 +205,7 @@ static int decode_coefs(MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff,
val = CAT5_MIN_VAL + READ_COEFF(av1_cat5_prob, av1_cat5_cdf, 5, r);
break;
case CATEGORY6_TOKEN: {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
const int skip_bits = (int)sizeof(av1_cat6_prob) -
av1_get_cat6_extrabits_size(tx_size, xd->bd);
#else
@ -228,13 +228,13 @@ static int decode_coefs(MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff,
v = (val * dqv) >> dq_shift;
#endif
#if CONFIG_COEFFICIENT_RANGE_CHECKING
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (v)
dqcoeff[scan[c]] =
highbd_check_range((aom_read_bit(r, ACCT_STR) ? -v : v), xd->bd);
#else
if (v) dqcoeff[scan[c]] = check_range(aom_read_bit(r, ACCT_STR) ? -v : v);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#else
if (v) dqcoeff[scan[c]] = aom_read_bit(r, ACCT_STR) ? -v : v;
#endif // CONFIG_COEFFICIENT_RANGE_CHECKING
@ -303,7 +303,7 @@ static int decode_coefs(MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff,
val = CAT5_MIN_VAL + READ_COEFF(av1_cat5_prob, av1_cat5_cdf, 5, r);
break;
case CATEGORY6_TOKEN: {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
const int skip_bits = (int)sizeof(av1_cat6_prob) -
av1_get_cat6_extrabits_size(tx_size, xd->bd);
#else
@ -343,7 +343,7 @@ static int decode_coefs(MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff,
val = CAT5_MIN_VAL + read_coeff(av1_cat5_prob, 5, r);
break;
case CATEGORY6_TOKEN: {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
const int skip_bits = (int)sizeof(av1_cat6_prob) -
av1_get_cat6_extrabits_size(tx_size, xd->bd);
#else
@ -369,12 +369,12 @@ static int decode_coefs(MACROBLOCKD *xd, PLANE_TYPE type, tran_low_t *dqcoeff,
#endif // CONFIG_NEW_QUANT
#if CONFIG_COEFFICIENT_RANGE_CHECKING
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
dqcoeff[scan[c]] =
highbd_check_range((aom_read_bit(r, ACCT_STR) ? -v : v), xd->bd);
#else
dqcoeff[scan[c]] = check_range(aom_read_bit(r, ACCT_STR) ? -v : v);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#else
dqcoeff[scan[c]] = aom_read_bit(r, ACCT_STR) ? -v : v;
#endif // CONFIG_COEFFICIENT_RANGE_CHECKING

Просмотреть файл

@ -157,7 +157,7 @@ void av1_frameworker_copy_context(AVxWorker *const dst_worker,
av1_frameworker_unlock_stats(src_worker);
dst_cm->bit_depth = src_cm->bit_depth;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
dst_cm->use_highbitdepth = src_cm->use_highbitdepth;
#endif
#if CONFIG_EXT_REFS

Просмотреть файл

@ -34,7 +34,7 @@ static const int segment_id[ENERGY_SPAN] = { 0, 1, 1, 2, 3, 4 };
#define SEGMENT_ID(i) segment_id[(i)-ENERGY_MIN]
DECLARE_ALIGNED(16, static const uint8_t, av1_all_zeros[MAX_SB_SIZE]) = { 0 };
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
DECLARE_ALIGNED(16, static const uint16_t,
av1_highbd_all_zeros[MAX_SB_SIZE]) = { 0 };
#endif
@ -108,7 +108,7 @@ static void aq_variance(const uint8_t *a, int a_stride, const uint8_t *b,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void aq_highbd_variance64(const uint8_t *a8, int a_stride,
const uint8_t *b8, int b_stride, int w, int h,
uint64_t *sse, uint64_t *sum) {
@ -139,7 +139,7 @@ static void aq_highbd_8_variance(const uint8_t *a8, int a_stride,
*sse = (unsigned int)sse_long;
*sum = (int)sum_long;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
static unsigned int block_variance(const AV1_COMP *const cpi, MACROBLOCK *x,
BLOCK_SIZE bs) {
@ -154,7 +154,7 @@ static unsigned int block_variance(const AV1_COMP *const cpi, MACROBLOCK *x,
const int bw = 8 * mi_size_wide[bs] - right_overflow;
const int bh = 8 * mi_size_high[bs] - bottom_overflow;
int avg;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
aq_highbd_8_variance(x->plane[0].src.buf, x->plane[0].src.stride,
CONVERT_TO_BYTEPTR(av1_highbd_all_zeros), 0, bw, bh,
@ -168,11 +168,11 @@ static unsigned int block_variance(const AV1_COMP *const cpi, MACROBLOCK *x,
#else
aq_variance(x->plane[0].src.buf, x->plane[0].src.stride, av1_all_zeros, 0,
bw, bh, &sse, &avg);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
var = sse - (((int64_t)avg * avg) / (bw * bh));
return ((uint64_t)var * 256) / (bw * bh);
} else {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
var =
cpi->fn_ptr[bs].vf(x->plane[0].src.buf, x->plane[0].src.stride,
@ -184,7 +184,7 @@ static unsigned int block_variance(const AV1_COMP *const cpi, MACROBLOCK *x,
#else
var = cpi->fn_ptr[bs].vf(x->plane[0].src.buf, x->plane[0].src.stride,
av1_all_zeros, 0, &sse);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
return ((uint64_t)var * 256) >> num_pels_log2_lookup[bs];
}
}

Просмотреть файл

@ -717,7 +717,7 @@ void av1_quantize_dc_nuq_facade(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
}
#endif // CONFIG_NEW_QUANT
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_highbd_quantize_fp_facade(const tran_low_t *coeff_ptr,
intptr_t n_coeffs, const MACROBLOCK_PLANE *p,
tran_low_t *qcoeff_ptr,
@ -778,7 +778,7 @@ void av1_highbd_quantize_b_facade(const tran_low_t *coeff_ptr,
qparam->log_scale);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE void highbd_quantize_dc(
const tran_low_t *coeff_ptr, int n_coeffs, int skip_block,
const int16_t *round_ptr, const int16_t quant, tran_low_t *qcoeff_ptr,
@ -807,7 +807,7 @@ static INLINE void highbd_quantize_dc(
}
*eob_ptr = eob + 1;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
void av1_highbd_quantize_dc_facade(const tran_low_t *coeff_ptr,
intptr_t n_coeffs, const MACROBLOCK_PLANE *p,
@ -1346,7 +1346,7 @@ void av1_highbd_quantize_dc_nuq_facade(
}
}
#endif // CONFIG_NEW_QUANT
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
void av1_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr,
@ -1404,7 +1404,7 @@ void av1_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
*eob_ptr = eob + 1;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t count,
int skip_block, const int16_t *zbin_ptr,
const int16_t *round_ptr,
@ -1463,7 +1463,7 @@ void av1_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t count,
*eob_ptr = eob + 1;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
// TODO(jingning) Refactor this file and combine functions with similar
// operations.
@ -1676,7 +1676,7 @@ void av1_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
*eob_ptr = eob + 1;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_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,
@ -1776,7 +1776,7 @@ static void invert_quant(int16_t *quant, int16_t *shift, int d) {
static int get_qzbin_factor(int q, aom_bit_depth_t bit_depth) {
const int quant = av1_dc_quant(q, 0, bit_depth);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
switch (bit_depth) {
case AOM_BITS_8: return q == 0 ? 64 : (quant < 148 ? 84 : 80);
case AOM_BITS_10: return q == 0 ? 64 : (quant < 592 ? 84 : 80);

Просмотреть файл

@ -131,7 +131,7 @@ void av1_quantize_dc_nuq_facade(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
const QUANT_PARAM *qparam);
#endif // CONFIG_NEW_QUANT
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_highbd_quantize_fp_facade(const tran_low_t *coeff_ptr,
intptr_t n_coeffs, const MACROBLOCK_PLANE *p,
tran_low_t *qcoeff_ptr,
@ -175,7 +175,7 @@ void av1_highbd_quantize_dc_nuq_facade(
tran_low_t *dqcoeff_ptr, uint16_t *eob_ptr, const SCAN_ORDER *sc,
const QUANT_PARAM *qparam);
#endif // CONFIG_NEW_QUANT
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#ifdef __cplusplus
} // extern "C"

Просмотреть файл

@ -1985,7 +1985,7 @@ void av1_fht16x16_c(const int16_t *input, tran_low_t *output, int stride,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_highbd_fht4x4_c(const int16_t *input, tran_low_t *output, int stride,
int tx_type) {
av1_fht4x4_c(input, output, stride, tx_type);
@ -2055,7 +2055,7 @@ void av1_highbd_fht16x16_c(const int16_t *input, tran_low_t *output, int stride,
int tx_type) {
av1_fht16x16_c(input, output, stride, tx_type);
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
void av1_fht32x32_c(const int16_t *input, tran_low_t *output, int stride,
int tx_type) {
@ -2212,7 +2212,7 @@ void av1_fwd_idtx_c(const int16_t *src_diff, tran_low_t *coeff, int stride,
}
#endif // CONFIG_EXT_TX
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
void av1_highbd_fht32x32_c(const int16_t *input, tran_low_t *output, int stride,
int tx_type) {
av1_fht32x32_c(input, output, stride, tx_type);
@ -2224,5 +2224,5 @@ void av1_highbd_fht64x64_c(const int16_t *input, tran_low_t *output, int stride,
av1_fht64x64_c(input, output, stride, tx_type);
}
#endif // CONFIG_TX64X64
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // !AV1_DCT_GTEST

Просмотреть файл

@ -64,11 +64,11 @@
#include "av1/common/pvq.h"
#include "av1/encoder/pvq_encoder.h"
#endif
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
#define IF_HBD(...) __VA_ARGS__
#else
#define IF_HBD(...)
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
static void encode_superblock(const AV1_COMP *const cpi, ThreadData *td,
TOKENEXTRA **t, RUN_TYPE dry_run, int mi_row,
@ -124,7 +124,7 @@ static const uint8_t AV1_VAR_OFFS[MAX_SB_SIZE] = {
#endif // CONFIG_EXT_PARTITION
};
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static const uint16_t AV1_HIGH_VAR_OFFS_8[MAX_SB_SIZE] = {
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
@ -185,7 +185,7 @@ static const uint16_t AV1_HIGH_VAR_OFFS_12[MAX_SB_SIZE] = {
128 * 16
#endif // CONFIG_EXT_PARTITION
};
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
unsigned int av1_get_sby_perpixel_variance(const AV1_COMP *cpi,
const struct buf_2d *ref,
@ -196,7 +196,7 @@ unsigned int av1_get_sby_perpixel_variance(const AV1_COMP *cpi,
return ROUND_POWER_OF_TWO(var, num_pels_log2_lookup[bs]);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
unsigned int av1_high_get_sby_perpixel_variance(const AV1_COMP *cpi,
const struct buf_2d *ref,
BLOCK_SIZE bs, int bd) {
@ -221,7 +221,7 @@ unsigned int av1_high_get_sby_perpixel_variance(const AV1_COMP *cpi,
}
return ROUND_POWER_OF_TWO(var, num_pels_log2_lookup[bs]);
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
static unsigned int get_sby_perpixel_diff_variance(const AV1_COMP *const cpi,
const struct buf_2d *ref,
@ -607,7 +607,7 @@ void av1_set_variance_partition_thresholds(AV1_COMP *cpi, int q) {
// Compute the minmax over the 8x8 subblocks.
static int compute_minmax_8x8(const uint8_t *src, int src_stride,
const uint8_t *ref, int ref_stride,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
int highbd,
#endif
int pixels_wide, int pixels_high) {
@ -623,7 +623,7 @@ static int compute_minmax_8x8(const uint8_t *src, int src_stride,
if (x8_idx < pixels_wide && y8_idx < pixels_high) {
const int src_offset = y8_idx * src_stride + x8_idx;
const int ref_offset = y8_idx * ref_stride + x8_idx;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (highbd) {
aom_highbd_minmax_8x8(src + src_offset, src_stride, ref + ref_offset,
ref_stride, &min, &max);
@ -642,7 +642,7 @@ static int compute_minmax_8x8(const uint8_t *src, int src_stride,
return (minmax_max - minmax_min);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE int avg_4x4(const uint8_t *const src, const int stride,
const int highbd) {
if (highbd) {
@ -657,7 +657,7 @@ static INLINE int avg_4x4(const uint8_t *const src, const int stride) {
}
#endif
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static INLINE int avg_8x8(const uint8_t *const src, const int stride,
const int highbd) {
if (highbd) {
@ -673,7 +673,7 @@ static INLINE int avg_8x8(const uint8_t *const src, const int stride) {
#endif
static void init_variance_tree(VAR_TREE *const vt,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
const int highbd,
#endif
BLOCK_SIZE bsize, BLOCK_SIZE leaf_size,
@ -694,37 +694,37 @@ static void init_variance_tree(VAR_TREE *const vt,
vt->width = width;
vt->height = height;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
vt->highbd = highbd;
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
if (bsize > leaf_size) {
const BLOCK_SIZE subsize = get_subsize(bsize, PARTITION_SPLIT);
const int px = block_size_wide[subsize];
init_variance_tree(vt->split[0],
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
highbd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
subsize, leaf_size, AOMMIN(px, width),
AOMMIN(px, height), src, src_stride, ref, ref_stride);
init_variance_tree(vt->split[1],
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
highbd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
subsize, leaf_size, width - px, AOMMIN(px, height),
src + px, src_stride, ref + px, ref_stride);
init_variance_tree(vt->split[2],
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
highbd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
subsize, leaf_size, AOMMIN(px, width), height - px,
src + px * src_stride, src_stride, ref + px * ref_stride,
ref_stride);
init_variance_tree(vt->split[3],
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
highbd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
subsize, leaf_size, width - px, height - px,
src + px * src_stride + px, src_stride,
ref + px * ref_stride + px, ref_stride);
@ -811,7 +811,7 @@ static int check_split(AV1_COMP *const cpi, VAR_TREE *const vt,
// force split to 8x8 block for this 16x16 block.
int minmax =
compute_minmax_8x8(vt->src, vt->src_stride, vt->ref, vt->ref_stride,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
vt->highbd,
#endif
vt->width, vt->height);
@ -959,7 +959,7 @@ static void choose_partitioning(AV1_COMP *const cpi, ThreadData *const td,
} else {
ref = AV1_VAR_OFFS;
ref_stride = 0;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
switch (xd->bd) {
case 10: ref = CONVERT_TO_BYTEPTR(AV1_HIGH_VAR_OFFS_10); break;
@ -968,14 +968,14 @@ static void choose_partitioning(AV1_COMP *const cpi, ThreadData *const td,
default: ref = CONVERT_TO_BYTEPTR(AV1_HIGH_VAR_OFFS_8); break;
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
}
init_variance_tree(
vt,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
cm->sb_size, (is_key_frame || low_res) ? BLOCK_4X4 : BLOCK_8X8,
pixels_wide, pixels_high, src, src_stride, ref, ref_stride);
@ -1893,7 +1893,7 @@ static void rd_pick_sb_modes(const AV1_COMP *const cpi, TileDataEnc *tile_data,
xd->plane[1].subsampling_y);
#endif
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
x->source_variance = av1_high_get_sby_perpixel_variance(
cpi, &x->plane[0].src, bsize, xd->bd);
@ -1904,7 +1904,7 @@ static void rd_pick_sb_modes(const AV1_COMP *const cpi, TileDataEnc *tile_data,
#else
x->source_variance =
av1_get_sby_perpixel_variance(cpi, &x->plane[0].src, bsize);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
// Save rdmult before it might be changed, so it can be restored later.
orig_rdmult = x->rdmult;
@ -4899,11 +4899,11 @@ void av1_encode_tile(AV1_COMP *cpi, ThreadData *td, int tile_row,
int segment_id = 0;
int rdmult = set_segment_rdmult(cpi, &td->mb, segment_id);
int qindex = av1_get_qindex(&cm->seg, segment_id, cm->base_qindex);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
const int quantizer_shift = td->mb.e_mbd.bd - 8;
#else
const int quantizer_shift = 0;
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
int64_t q_ac = OD_MAXI(
1, av1_ac_quant(qindex, 0, cpi->common.bit_depth) >> quantizer_shift);
int64_t q_dc = OD_MAXI(
@ -5137,9 +5137,9 @@ static void encode_frame_internal(AV1_COMP *cpi) {
compute_global_motion_feature_based(
model, cpi->Source, ref_buf,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cpi->common.bit_depth,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
inliers_by_motion, params_by_motion, RANSAC_NUM_MOTIONS);
for (i = 0; i < RANSAC_NUM_MOTIONS; ++i) {
@ -5151,9 +5151,9 @@ static void encode_frame_internal(AV1_COMP *cpi) {
if (tmp_wm_params.wmtype != IDENTITY) {
const double erroradv_this_motion = refine_integerized_param(
&tmp_wm_params, tmp_wm_params.wmtype,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH, xd->bd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
ref_buf->y_buffer, ref_buf->y_width, ref_buf->y_height,
ref_buf->y_stride, cpi->Source->y_buffer,
cpi->Source->y_width, cpi->Source->y_height,
@ -5874,9 +5874,9 @@ static void encode_superblock(const AV1_COMP *const cpi, ThreadData *td,
for (i = 0; i < 3; ++i) {
const struct macroblockd_plane *pd = &xd->plane[i];
av1_warp_plane(&mbmi->wm_params[0],
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH, xd->bd,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
pd->pre[0].buf0, pd->pre[0].width, pd->pre[0].height,
pd->pre[0].stride, pd->dst.buf,
((mi_col * MI_SIZE) >> pd->subsampling_x),
@ -6453,7 +6453,7 @@ static void predict_sb_complex(const AV1_COMP *const cpi, ThreadData *td,
if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols) return;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
int len = sizeof(uint16_t);
dst_buf1[0] = CONVERT_TO_BYTEPTR(tmp_buf1);
@ -6466,7 +6466,7 @@ static void predict_sb_complex(const AV1_COMP *const cpi, ThreadData *td,
dst_buf3[1] = CONVERT_TO_BYTEPTR(tmp_buf3 + MAX_TX_SQUARE * len);
dst_buf3[2] = CONVERT_TO_BYTEPTR(tmp_buf3 + 2 * MAX_TX_SQUARE * len);
} else {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
dst_buf1[0] = tmp_buf1;
dst_buf1[1] = tmp_buf1 + MAX_TX_SQUARE;
dst_buf1[2] = tmp_buf1 + 2 * MAX_TX_SQUARE;
@ -6476,9 +6476,9 @@ static void predict_sb_complex(const AV1_COMP *const cpi, ThreadData *td,
dst_buf3[0] = tmp_buf3;
dst_buf3[1] = tmp_buf3 + MAX_TX_SQUARE;
dst_buf3[2] = tmp_buf3 + 2 * MAX_TX_SQUARE;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
if (!dry_run && ctx >= 0 && bsize < top_bsize) {
// Explicitly cast away const.

Просмотреть файл

@ -45,31 +45,31 @@ static void subtract_block(const MACROBLOCKD *xd, int rows, int cols,
int16_t *diff, ptrdiff_t diff_stride,
const uint8_t *src8, ptrdiff_t src_stride,
const uint8_t *pred8, ptrdiff_t pred_stride) {
#if !CONFIG_AOM_HIGHBITDEPTH
#if !CONFIG_HIGHBITDEPTH
(void)xd;
#endif
if (check_subtract_block_size(rows, cols)) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
aom_highbd_subtract_block_c(rows, cols, diff, diff_stride, src8,
src_stride, pred8, pred_stride, xd->bd);
return;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
aom_subtract_block_c(rows, cols, diff, diff_stride, src8, src_stride, pred8,
pred_stride);
return;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
aom_highbd_subtract_block(rows, cols, diff, diff_stride, src8, src_stride,
pred8, pred_stride, xd->bd);
return;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
aom_subtract_block(rows, cols, diff, diff_stride, src8, src_stride, pred8,
pred_stride);
}
@ -186,7 +186,7 @@ int av1_optimize_b(const AV1_COMMON *cm, MACROBLOCK *mb, int plane, int block,
int best, band = (eob < default_eob) ? band_translate[eob]
: band_translate[eob - 1];
int pt, i, final_eob;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
const int cat6_bits = av1_get_cat6_extrabits_size(tx_size, xd->bd);
#else
const int cat6_bits = av1_get_cat6_extrabits_size(tx_size, 8);
@ -265,11 +265,11 @@ int av1_optimize_b(const AV1_COMMON *cm, MACROBLOCK *mb, int plane, int block,
}
dx = (dqcoeff[rc] - coeff[rc]) * (1 << shift);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
dx >>= xd->bd - 8;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
d2 = (int64_t)dx * dx;
tokens[i][0].rate += (best ? rate1 : rate0);
tokens[i][0].error = d2 + (best ? error1 : error0);
@ -372,13 +372,13 @@ int av1_optimize_b(const AV1_COMMON *cm, MACROBLOCK *mb, int plane, int block,
#if CONFIG_NEW_QUANT
dx = av1_dequant_coeff_nuq(x, dqv, dequant_val[band_translate[i]]) -
(coeff[rc] << shift);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
dx >>= xd->bd - 8;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#else // CONFIG_NEW_QUANT
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
dx -= ((dqv >> (xd->bd - 8)) + sz) ^ sz;
} else {
@ -386,7 +386,7 @@ int av1_optimize_b(const AV1_COMMON *cm, MACROBLOCK *mb, int plane, int block,
}
#else
dx -= (dqv + sz) ^ sz;
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_NEW_QUANT
d2 = (int64_t)dx * dx;
@ -495,7 +495,7 @@ int av1_optimize_b(const AV1_COMMON *cm, MACROBLOCK *mb, int plane, int block,
}
#if !CONFIG_PVQ
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
typedef enum QUANT_FUNC {
QUANT_FUNC_LOWBD = 0,
QUANT_FUNC_HIGHBD = 1,
@ -536,7 +536,7 @@ static AV1_QUANT_FACADE quant_func_list[AV1_XFORM_QUANT_TYPES]
#endif // !CONFIG_NEW_QUANT
{ NULL }
};
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif // CONFIG_PVQ
void av1_xform_quant(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
@ -615,20 +615,20 @@ void av1_xform_quant(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
// transform block size in pixels
tx_blk_size = tx_size_wide[tx_size];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
for (j = 0; j < tx_blk_size; j++)
for (i = 0; i < tx_blk_size; i++)
src_int16[diff_stride * j + i] =
CONVERT_TO_SHORTPTR(src)[src_stride * j + i];
} else {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
for (j = 0; j < tx_blk_size; j++)
for (i = 0; i < tx_blk_size; i++)
src_int16[diff_stride * j + i] = src[src_stride * j + i];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif
#if CONFIG_PVQ || CONFIG_DAALA_DIST
@ -640,20 +640,20 @@ void av1_xform_quant(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
// copy uint8 orig and predicted block to int16 buffer
// in order to use existing VP10 transform functions
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
for (j = 0; j < tx_blk_size; j++)
for (i = 0; i < tx_blk_size; i++)
pred[diff_stride * j + i] =
CONVERT_TO_SHORTPTR(dst)[dst_stride * j + i];
} else {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
for (j = 0; j < tx_blk_size; j++)
for (i = 0; i < tx_blk_size; i++)
pred[diff_stride * j + i] = dst[dst_stride * j + i];
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#endif
(void)ctx;
@ -663,7 +663,7 @@ void av1_xform_quant(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
fwd_txfm_param.lossless = xd->lossless[mbmi->segment_id];
#if !CONFIG_PVQ
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
fwd_txfm_param.bd = xd->bd;
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
av1_highbd_fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
@ -681,7 +681,7 @@ void av1_xform_quant(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
#endif // CONFIG_LV_MAP
return;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
av1_fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
if (xform_quant_idx != AV1_XFORM_QUANT_SKIP_QUANT) {
if (LIKELY(!x->skip_block)) {
@ -697,7 +697,7 @@ void av1_xform_quant(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
#endif // CONFIG_LV_MAP
#else // #if !CONFIG_PVQ
(void)xform_quant_idx;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
fwd_txfm_param.bd = xd->bd;
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
av1_highbd_fwd_txfm(src_int16, coeff, diff_stride, &fwd_txfm_param);
@ -706,7 +706,7 @@ void av1_xform_quant(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
#endif
av1_fwd_txfm(src_int16, coeff, diff_stride, &fwd_txfm_param);
av1_fwd_txfm(pred, ref_coeff, diff_stride, &fwd_txfm_param);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif
@ -885,21 +885,21 @@ static void encode_block_pass1(int plane, int block, int blk_row, int blk_col,
// but av1_inv_txfm_add_*x*() also does addition of predicted image to
// inverse transformed image,
// pass blank dummy image to av1_inv_txfm_add_*x*(), i.e. set dst as zeros
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
for (j = 0; j < tx_blk_size; j++)
for (i = 0; i < tx_blk_size; i++)
CONVERT_TO_SHORTPTR(dst)[j * pd->dst.stride + i] = 0;
} else {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
for (j = 0; j < tx_blk_size; j++)
for (i = 0; i < tx_blk_size; i++) dst[j * pd->dst.stride + i] = 0;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
}
#endif // !CONFIG_PVQ
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
if (xd->lossless[xd->mi[0]->mbmi.segment_id]) {
av1_highbd_iwht4x4_add(dqcoeff, dst, pd->dst.stride, p->eobs[block],
@ -910,7 +910,7 @@ static void encode_block_pass1(int plane, int block, int blk_row, int blk_col,
}
return;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
if (xd->lossless[xd->mi[0]->mbmi.segment_id]) {
av1_iwht4x4_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
} else {
@ -1165,7 +1165,7 @@ PVQ_SKIP_TYPE av1_pvq_encode_helper(MACROBLOCK *x, tran_low_t *const coeff,
DECLARE_ALIGNED(16, int32_t, ref_int32[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
DECLARE_ALIGNED(16, int32_t, out_int32[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
hbd_downshift = x->e_mbd.bd - 8;
#endif

Просмотреть файл

@ -701,7 +701,7 @@ static void alloc_raw_frame_buffers(AV1_COMP *cpi) {
if (!cpi->lookahead)
cpi->lookahead = av1_lookahead_init(oxcf->width, oxcf->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
oxcf->lag_in_frames);
@ -712,7 +712,7 @@ static void alloc_raw_frame_buffers(AV1_COMP *cpi) {
// TODO(agrange) Check if ARF is enabled and skip allocation if not.
if (aom_realloc_frame_buffer(&cpi->alt_ref_buffer, oxcf->width, oxcf->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
AOM_BORDER_IN_PIXELS, cm->byte_alignment, NULL,
@ -725,7 +725,7 @@ static void alloc_util_frame_buffers(AV1_COMP *cpi) {
AV1_COMMON *const cm = &cpi->common;
if (aom_realloc_frame_buffer(&cpi->last_frame_uf, cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
AOM_BORDER_IN_PIXELS, cm->byte_alignment, NULL,
@ -736,7 +736,7 @@ static void alloc_util_frame_buffers(AV1_COMP *cpi) {
#if CONFIG_LOOP_RESTORATION
if (aom_realloc_frame_buffer(&cpi->last_frame_db, cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
AOM_BORDER_IN_PIXELS, cm->byte_alignment, NULL,
@ -745,7 +745,7 @@ static void alloc_util_frame_buffers(AV1_COMP *cpi) {
"Failed to allocate last frame deblocked buffer");
if (aom_realloc_frame_buffer(&cpi->trial_frame_rst, cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
AOM_BORDER_IN_PIXELS, cm->byte_alignment, NULL,
@ -764,7 +764,7 @@ static void alloc_util_frame_buffers(AV1_COMP *cpi) {
if (aom_realloc_frame_buffer(&cpi->scaled_source, cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
AOM_BORDER_IN_PIXELS, cm->byte_alignment, NULL,
@ -774,7 +774,7 @@ static void alloc_util_frame_buffers(AV1_COMP *cpi) {
if (aom_realloc_frame_buffer(&cpi->scaled_last_source, cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
AOM_BORDER_IN_PIXELS, cm->byte_alignment, NULL,
@ -964,7 +964,7 @@ static void init_config(struct AV1_COMP *cpi, AV1EncoderConfig *oxcf) {
cm->profile = oxcf->profile;
cm->bit_depth = oxcf->bit_depth;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth = oxcf->use_highbitdepth;
#endif
cm->color_space = oxcf->color_space;
@ -1000,7 +1000,7 @@ static void set_rc_buffer_sizes(RATE_CONTROL *rc,
(maximum == 0) ? bandwidth / 8 : maximum * bandwidth / 1000;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
#define HIGHBD_BFP(BT, SDF, SDAF, VF, SVF, SVAF, SDX3F, SDX8F, SDX4DF) \
cpi->fn_ptr[BT].sdf = SDF; \
cpi->fn_ptr[BT].sdaf = SDAF; \
@ -1943,7 +1943,7 @@ static void highbd_set_var_fns(AV1_COMP *const cpi) {
}
}
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
static void realloc_segmentation_maps(AV1_COMP *cpi) {
AV1_COMMON *const cm = &cpi->common;
@ -1979,9 +1979,9 @@ void av1_change_config(struct AV1_COMP *cpi, const AV1EncoderConfig *oxcf) {
assert(cm->bit_depth > AOM_BITS_8);
cpi->oxcf = *oxcf;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cpi->td.mb.e_mbd.bd = (int)cm->bit_depth;
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
#if CONFIG_GLOBAL_MOTION
cpi->td.mb.e_mbd.global_motion = cm->global_motion;
#endif // CONFIG_GLOBAL_MOTION
@ -2078,7 +2078,7 @@ void av1_change_config(struct AV1_COMP *cpi, const AV1EncoderConfig *oxcf) {
cpi->ext_refresh_frame_flags_pending = 0;
cpi->ext_refresh_frame_context_pending = 0;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
highbd_set_var_fns(cpi);
#endif
@ -2525,7 +2525,7 @@ AV1_COMP *av1_create_compressor(AV1EncoderConfig *oxcf,
aom_masked_sub_pixel_variance4x4)
#endif // CONFIG_EXT_INTER
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
highbd_set_var_fns(cpi);
#endif
@ -2716,7 +2716,7 @@ static void generate_psnr_packet(AV1_COMP *cpi) {
struct aom_codec_cx_pkt pkt;
int i;
PSNR_STATS psnr;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
aom_calc_highbd_psnr(cpi->Source, cpi->common.frame_to_show, &psnr,
cpi->td.mb.e_mbd.bd, cpi->oxcf.input_bit_depth);
#else
@ -2864,7 +2864,7 @@ void aom_write_one_yuv_frame(AV1_COMMON *cm, YV12_BUFFER_CONFIG *s) {
uint8_t *src = s->y_buffer;
int h = cm->height;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (s->flags & YV12_FLAG_HIGHBITDEPTH) {
uint16_t *src16 = CONVERT_TO_SHORTPTR(s->y_buffer);
@ -2892,7 +2892,7 @@ void aom_write_one_yuv_frame(AV1_COMMON *cm, YV12_BUFFER_CONFIG *s) {
fflush(yuv_rec_file);
return;
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
do {
fwrite(src, s->y_width, 1, yuv_rec_file);
@ -2919,14 +2919,14 @@ void aom_write_one_yuv_frame(AV1_COMMON *cm, YV12_BUFFER_CONFIG *s) {
}
#endif // OUTPUT_YUV_REC
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void scale_and_extend_frame_nonnormative(const YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst,
int bd) {
#else
static void scale_and_extend_frame_nonnormative(const YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst) {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
// TODO(dkovalev): replace YV12_BUFFER_CONFIG with aom_image_t
int i;
const uint8_t *const srcs[3] = { src->y_buffer, src->u_buffer,
@ -2944,7 +2944,7 @@ static void scale_and_extend_frame_nonnormative(const YV12_BUFFER_CONFIG *src,
dst->uv_crop_height };
for (i = 0; i < MAX_MB_PLANE; ++i) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (src->flags & YV12_FLAG_HIGHBITDEPTH) {
av1_highbd_resize_plane(srcs[i], src_heights[i], src_widths[i],
src_strides[i], dsts[i], dst_heights[i],
@ -2956,19 +2956,19 @@ static void scale_and_extend_frame_nonnormative(const YV12_BUFFER_CONFIG *src,
#else
av1_resize_plane(srcs[i], src_heights[i], src_widths[i], src_strides[i],
dsts[i], dst_heights[i], dst_widths[i], dst_strides[i]);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
}
aom_extend_frame_borders(dst);
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
static void scale_and_extend_frame(const YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst, int planes,
int bd) {
#else
static void scale_and_extend_frame(const YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst, int planes) {
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
const int src_w = src->y_crop_width;
const int src_h = src->y_crop_height;
const int dst_w = dst->y_crop_width;
@ -2998,7 +2998,7 @@ static void scale_and_extend_frame(const YV12_BUFFER_CONFIG *src,
(x / factor) * src_w / dst_w;
uint8_t *dst_ptr = dsts[i] + (y / factor) * dst_stride + (x / factor);
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (src->flags & YV12_FLAG_HIGHBITDEPTH) {
aom_highbd_convolve8(src_ptr, src_stride, dst_ptr, dst_stride,
&kernel[(x_q4 & 0xf) * taps], 16 * src_w / dst_w,
@ -3015,7 +3015,7 @@ static void scale_and_extend_frame(const YV12_BUFFER_CONFIG *src,
&kernel[(x_q4 & 0xf) * taps], 16 * src_w / dst_w,
&kernel[(y_q4 & 0xf) * taps], 16 * src_h / dst_h,
16 / factor, 16 / factor);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
}
}
}
@ -3128,7 +3128,7 @@ static INLINE int upsample_ref_frame(AV1_COMP *cpi,
if (aom_realloc_frame_buffer(upsampled_ref, (cm->width << 3),
(cm->height << 3), cm->subsampling_x,
cm->subsampling_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
(AOM_BORDER_IN_PIXELS << 3),
@ -3137,7 +3137,7 @@ static INLINE int upsample_ref_frame(AV1_COMP *cpi,
"Failed to allocate up-sampled frame buffer");
// Currently, only Y plane is up-sampled, U, V are not used.
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
scale_and_extend_frame(ref, upsampled_ref, 1, (int)cm->bit_depth);
#else
scale_and_extend_frame(ref, upsampled_ref, 1);
@ -3590,7 +3590,7 @@ void av1_scale_references(AV1_COMP *cpi) {
continue;
}
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (ref->y_crop_width != cm->width || ref->y_crop_height != cm->height) {
RefCntBuffer *new_fb_ptr = NULL;
int force_scaling = 0;
@ -3637,7 +3637,7 @@ void av1_scale_references(AV1_COMP *cpi) {
cpi->scaled_ref_idx[ref_frame - 1] = new_fb;
alloc_frame_mvs(cm, new_fb);
}
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
if (cpi->sf.use_upsampled_references &&
(force_scaling || new_fb_ptr->buf.y_crop_width != cm->width ||
@ -3649,14 +3649,14 @@ void av1_scale_references(AV1_COMP *cpi) {
if (aom_realloc_frame_buffer(&ubuf->buf, (cm->width << 3),
(cm->height << 3), cm->subsampling_x,
cm->subsampling_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
(AOM_BORDER_IN_PIXELS << 3),
cm->byte_alignment, NULL, NULL, NULL))
aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR,
"Failed to allocate up-sampled frame buffer");
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
scale_and_extend_frame(&new_fb_ptr->buf, &ubuf->buf, 1,
(int)cm->bit_depth);
#else
@ -3950,7 +3950,7 @@ static void set_frame_size(AV1_COMP *cpi) {
// Reset the frame pointers to the current frame size.
if (aom_realloc_frame_buffer(get_frame_new_buffer(cm), cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
AOM_BORDER_IN_PIXELS, cm->byte_alignment, NULL,
@ -3982,7 +3982,7 @@ static void set_frame_size(AV1_COMP *cpi) {
if (buf_idx != INVALID_IDX) {
YV12_BUFFER_CONFIG *const buf = &cm->buffer_pool->frame_bufs[buf_idx].buf;
ref_buf->buf = buf;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
av1_setup_scale_factors_for_frame(
&ref_buf->sf, buf->y_crop_width, buf->y_crop_height, cm->width,
cm->height, (buf->flags & YV12_FLAG_HIGHBITDEPTH) ? 1 : 0);
@ -3990,7 +3990,7 @@ static void set_frame_size(AV1_COMP *cpi) {
av1_setup_scale_factors_for_frame(&ref_buf->sf, buf->y_crop_width,
buf->y_crop_height, cm->width,
cm->height);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
if (av1_is_scaled(&ref_buf->sf)) aom_extend_frame_borders(buf);
} else {
ref_buf->buf = NULL;
@ -4254,7 +4254,7 @@ static void encode_with_recode_loop(AV1_COMP *cpi, size_t *size,
int64_t high_err_target = cpi->ambient_err;
int64_t low_err_target = cpi->ambient_err >> 1;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
kf_err = aom_highbd_get_y_sse(cpi->Source, get_frame_new_buffer(cm));
} else {
@ -4262,7 +4262,7 @@ static void encode_with_recode_loop(AV1_COMP *cpi, size_t *size,
}
#else
kf_err = aom_get_y_sse(cpi->Source, get_frame_new_buffer(cm));
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
// Prevent possible divide by zero error below for perfect KF
kf_err += !kf_err;
@ -4512,11 +4512,11 @@ YV12_BUFFER_CONFIG *av1_scale_if_required(AV1_COMMON *cm,
YV12_BUFFER_CONFIG *scaled) {
if (cm->mi_cols * MI_SIZE != unscaled->y_width ||
cm->mi_rows * MI_SIZE != unscaled->y_height) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
scale_and_extend_frame_nonnormative(unscaled, scaled, (int)cm->bit_depth);
#else
scale_and_extend_frame_nonnormative(unscaled, scaled);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
return scaled;
} else {
return unscaled;
@ -4866,7 +4866,7 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
if (cm->current_frame_id == -1) {
int lsb, msb;
/* quasi-random initialization of current_frame_id for a key frame */
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cpi->Source->flags & YV12_FLAG_HIGHBITDEPTH) {
lsb = CONVERT_TO_SHORTPTR(cpi->Source->y_buffer)[0] & 0xff;
msb = CONVERT_TO_SHORTPTR(cpi->Source->y_buffer)[1] & 0xff;
@ -4874,7 +4874,7 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
#endif
lsb = cpi->Source->y_buffer[0] & 0xff;
msb = cpi->Source->y_buffer[1] & 0xff;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
}
#endif
cm->current_frame_id = ((msb << 8) + lsb) % (1 << frame_id_length);
@ -4902,7 +4902,7 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
// fixed interval. Note the reconstruction error if it is the frame before
// the force key frame
if (cpi->rc.next_key_frame_forced && cpi->rc.frames_to_key == 1) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
cpi->ambient_err =
aom_highbd_get_y_sse(cpi->Source, get_frame_new_buffer(cm));
@ -4911,7 +4911,7 @@ static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
}
#else
cpi->ambient_err = aom_get_y_sse(cpi->Source, get_frame_new_buffer(cm));
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
}
// If the encoder forced a KEY_FRAME decision
@ -5165,21 +5165,21 @@ static void init_ref_frame_bufs(AV1_COMMON *cm) {
}
static void check_initial_width(AV1_COMP *cpi,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
int use_highbitdepth,
#endif
int subsampling_x, int subsampling_y) {
AV1_COMMON *const cm = &cpi->common;
if (!cpi->initial_width ||
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth != use_highbitdepth ||
#endif
cm->subsampling_x != subsampling_x ||
cm->subsampling_y != subsampling_y) {
cm->subsampling_x = subsampling_x;
cm->subsampling_y = subsampling_y;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
cm->use_highbitdepth = use_highbitdepth;
#endif
@ -5203,22 +5203,22 @@ int av1_receive_raw_frame(AV1_COMP *cpi, aom_enc_frame_flags_t frame_flags,
int res = 0;
const int subsampling_x = sd->subsampling_x;
const int subsampling_y = sd->subsampling_y;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
const int use_highbitdepth = (sd->flags & YV12_FLAG_HIGHBITDEPTH) != 0;
#endif
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
check_initial_width(cpi, use_highbitdepth, subsampling_x, subsampling_y);
#else
check_initial_width(cpi, subsampling_x, subsampling_y);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
aom_usec_timer_start(&timer);
if (av1_lookahead_push(cpi->lookahead, sd, time_stamp, end_time,
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
use_highbitdepth,
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
frame_flags))
res = -1;
aom_usec_timer_mark(&timer);
@ -5380,7 +5380,7 @@ static void compute_internal_stats(AV1_COMP *cpi) {
uint32_t in_bit_depth = 8;
uint32_t bit_depth = 8;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth) {
in_bit_depth = cpi->oxcf.input_bit_depth;
bit_depth = cm->bit_depth;
@ -5397,11 +5397,11 @@ static void compute_internal_stats(AV1_COMP *cpi) {
double frame_ssim2 = 0.0, weight = 0.0;
aom_clear_system_state();
// TODO(yaowu): unify these two versions into one.
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
aom_calc_highbd_psnr(orig, recon, &psnr, bit_depth, in_bit_depth);
#else
aom_calc_psnr(orig, recon, &psnr);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
adjust_image_stat(psnr.psnr[1], psnr.psnr[2], psnr.psnr[3], psnr.psnr[0],
&cpi->psnr);
@ -5409,7 +5409,7 @@ static void compute_internal_stats(AV1_COMP *cpi) {
cpi->total_samples += psnr.samples[0];
samples = psnr.samples[0];
// TODO(yaowu): unify these two versions into one.
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (cm->use_highbitdepth)
frame_ssim2 =
aom_highbd_calc_ssim(orig, recon, &weight, bit_depth, in_bit_depth);
@ -5417,7 +5417,7 @@ static void compute_internal_stats(AV1_COMP *cpi) {
frame_ssim2 = aom_calc_ssim(orig, recon, &weight);
#else
frame_ssim2 = aom_calc_ssim(orig, recon, &weight);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
cpi->worst_ssim = AOMMIN(cpi->worst_ssim, frame_ssim2);
cpi->summed_quality += frame_ssim2 * weight;
@ -5434,7 +5434,7 @@ static void compute_internal_stats(AV1_COMP *cpi) {
#endif
}
if (cpi->b_calculate_blockiness) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (!cm->use_highbitdepth)
#endif
{
@ -5446,7 +5446,7 @@ static void compute_internal_stats(AV1_COMP *cpi) {
}
if (cpi->b_calculate_consistency) {
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
if (!cm->use_highbitdepth)
#endif
{
@ -5871,11 +5871,11 @@ int av1_set_internal_size(AV1_COMP *cpi, AOM_SCALING horiz_mode,
int av1_set_size_literal(AV1_COMP *cpi, unsigned int width,
unsigned int height) {
AV1_COMMON *cm = &cpi->common;
#if CONFIG_AOM_HIGHBITDEPTH
#if CONFIG_HIGHBITDEPTH
check_initial_width(cpi, cm->use_highbitdepth, 1, 1);
#else
check_initial_width(cpi, 1, 1);
#endif // CONFIG_AOM_HIGHBITDEPTH
#endif // CONFIG_HIGHBITDEPTH
if (width) {
cm->width = width;

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше