Commit fa8ca9f2 authored by Adrian Grange's avatar Adrian Grange

Change "vp9" to "av1"

Change-Id: I5942c24dec6fdcfe7e27518c8049b59e6f99a1aa
parent ec838b76
......@@ -37,8 +37,8 @@
/examples/twopass_encoder
/examples/aom_multi_resolution_encoder
/examples/aomcx_set_ref
/examples/vp9_lossless_encoder
/examples/vp9_spatial_scalable_encoder
/examples/av1_lossless_encoder
/examples/av1_spatial_scalable_encoder
/examples/aom_temporal_scalable_patterns
/examples/aom_temporal_svc_encoder
/ivfdec
......
......@@ -115,12 +115,12 @@ typedef struct aom_ref_frame {
/*!\brief AV1 specific reference frame data struct
*
* Define the data struct to access vp9 reference frames.
* Define the data struct to access av1 reference frames.
*/
typedef struct vp9_ref_frame {
typedef struct av1_ref_frame {
int idx; /**< frame index to get (input) */
aom_image_t img; /**< img structure to populate (output) */
} vp9_ref_frame_t;
} av1_ref_frame_t;
/*!\cond */
/*!\brief aom decoder control function parameter type
......@@ -141,7 +141,7 @@ AOM_CTRL_USE_TYPE(AOM_SET_DBG_COLOR_B_MODES, int)
#define AOM_CTRL_AOM_SET_DBG_COLOR_B_MODES
AOM_CTRL_USE_TYPE(AOM_SET_DBG_DISPLAY_MV, int)
#define AOM_CTRL_AOM_SET_DBG_DISPLAY_MV
AOM_CTRL_USE_TYPE(AV1_GET_REFERENCE, vp9_ref_frame_t *)
AOM_CTRL_USE_TYPE(AV1_GET_REFERENCE, av1_ref_frame_t *)
#define AOM_CTRL_AV1_GET_REFERENCE
/*!\endcond */
......
......@@ -709,7 +709,7 @@ typedef struct aom_codec_enc_cfg {
int temporal_layering_mode;
} aom_codec_enc_cfg_t; /**< alias for struct aom_codec_enc_cfg */
/*!\brief vp9 svc extra configure parameters
/*!\brief av1 svc extra configure parameters
*
* This defines max/min quantizers and scale factors for each layer
*
......
......@@ -590,7 +590,7 @@ typedef enum aom_scaling_mode_1d {
* Supported codecs: AV1 (in SVC mode)
*
*/
typedef enum vp9e_temporal_layering_mode {
typedef enum av1e_temporal_layering_mode {
/*!\brief No temporal layering.
* Used when only spatial layering is used.
*/
......@@ -683,7 +683,7 @@ typedef enum {
*/
typedef enum { AOM_TUNE_PSNR, AOM_TUNE_SSIM } aom_tune_metric;
/*!\brief vp9 svc layer parameters
/*!\brief av1 svc layer parameters
*
* This defines the spatial and temporal layer id numbers for svc encoding.
* This is used with the #AV1E_SET_SVC_LAYER_ID control to set the spatial and
......@@ -695,7 +695,7 @@ typedef struct aom_svc_layer_id {
int temporal_layer_id; /**< Temporal layer id number. */
} aom_svc_layer_id_t;
/*!\brief vp9 svc frame flag parameters.
/*!\brief av1 svc frame flag parameters.
*
* This defines the frame flags and buffer indices for each spatial layer for
* svc encoding.
......
......@@ -33,7 +33,7 @@ static INLINE unsigned int sad(const uint8_t *a, int a_stride, const uint8_t *b,
}
// TODO(johannkoenig): this moved to aom_dsp, should be able to clean this up.
/* Remove dependency on vp9 variance function by duplicating vp9_comp_avg_pred.
/* Remove dependency on av1 variance function by duplicating av1_comp_avg_pred.
* The function averages every corresponding element of the buffers and stores
* the value in a third buffer, comp_pred.
* pred and comp_pred are assumed to have stride = width
......
......@@ -2939,7 +2939,7 @@ void FDCT32x32_2D_AVX2(const int16_t *input, int16_t *output_org, int stride) {
tr2_6 = _mm256_sub_epi16(tr2_6, tr2_6_0);
tr2_7 = _mm256_sub_epi16(tr2_7, tr2_7_0);
// ... and here.
// PS: also change code in vp9/encoder/vp9_dct.c
// PS: also change code in av1/encoder/av1_dct.c
tr2_0 = _mm256_add_epi16(tr2_0, kOne);
tr2_1 = _mm256_add_epi16(tr2_1, kOne);
tr2_2 = _mm256_add_epi16(tr2_2, kOne);
......
......@@ -3146,7 +3146,7 @@ void FDCT32x32_2D(const int16_t *input, tran_low_t *output_org, int stride) {
tr2_6 = _mm_sub_epi16(tr2_6, tr2_6_0);
tr2_7 = _mm_sub_epi16(tr2_7, tr2_7_0);
// ... and here.
// PS: also change code in vp9/encoder/vp9_dct.c
// PS: also change code in av1/encoder/av1_dct.c
tr2_0 = _mm_add_epi16(tr2_0, kOne);
tr2_1 = _mm_add_epi16(tr2_1, kOne);
tr2_2 = _mm_add_epi16(tr2_2, kOne);
......
......@@ -326,7 +326,7 @@ struct ExternalFrameBufferList {
// Application private data passed into the set function. |min_size| is the
// minimum size in bytes needed to decode the next frame. |fb| pointer to the
// frame buffer.
static int get_vp9_frame_buffer(void *cb_priv, size_t min_size,
static int get_av1_frame_buffer(void *cb_priv, size_t min_size,
aom_codec_frame_buffer_t *fb) {
int i;
struct ExternalFrameBufferList *const ext_fb_list =
......@@ -360,7 +360,7 @@ static int get_vp9_frame_buffer(void *cb_priv, size_t min_size,
// Callback used by libaom when there are no references to the frame buffer.
// |cb_priv| user private data passed into the set function. |fb| pointer
// to the frame buffer.
static int release_vp9_frame_buffer(void *cb_priv,
static int release_av1_frame_buffer(void *cb_priv,
aom_codec_frame_buffer_t *fb) {
struct ExternalFrameBuffer *const ext_fb =
(struct ExternalFrameBuffer *)fb->priv;
......@@ -688,8 +688,8 @@ static int main_loop(int argc, const char **argv_) {
ext_fb_list.num_external_frame_buffers = num_external_frame_buffers;
ext_fb_list.ext_fb = (struct ExternalFrameBuffer *)calloc(
num_external_frame_buffers, sizeof(*ext_fb_list.ext_fb));
if (aom_codec_set_frame_buffer_functions(&decoder, get_vp9_frame_buffer,
release_vp9_frame_buffer,
if (aom_codec_set_frame_buffer_functions(&decoder, get_av1_frame_buffer,
release_av1_frame_buffer,
&ext_fb_list)) {
fprintf(stderr, "Failed to configure external frame buffers: %s\n",
aom_codec_error(&decoder));
......
......@@ -358,7 +358,7 @@ static const arg_def_t max_intra_rate_pct =
ARG_DEF(NULL, "max-intra-rate", 1, "Max I-frame bitrate (pct)");
#if CONFIG_AV1_ENCODER
static const arg_def_t cpu_used_vp9 =
static const arg_def_t cpu_used_av1 =
ARG_DEF(NULL, "cpu-used", 1, "CPU Used (-8..8)");
static const arg_def_t tile_cols =
ARG_DEF(NULL, "tile-columns", 1, "Number of tile columns to use, log2");
......@@ -437,7 +437,7 @@ static const arg_def_t tune_content = ARG_DEF_ENUM(
#if CONFIG_AV1_ENCODER
/* clang-format off */
static const arg_def_t *av1_args[] = {
&cpu_used_vp9, &auto_altref, &sharpness,
&cpu_used_av1, &auto_altref, &sharpness,
&static_thresh, &tile_cols, &tile_rows,
&arnr_maxframes, &arnr_strength, &arnr_type,
&tune_ssim, &cq_level, &max_intra_rate_pct,
......@@ -902,7 +902,7 @@ static void parse_global_config(struct VpxEncoderConfig *global, char **argv) {
// Make default AV1 passes = 2 until there is a better quality 1-pass
// encoder
if (global->codec != NULL && global->codec->name != NULL)
global->passes = (strcmp(global->codec->name, "vp9") == 0 &&
global->passes = (strcmp(global->codec->name, "av1") == 0 &&
global->deadline != AOM_DL_REALTIME)
? 2
: 1;
......@@ -1160,7 +1160,7 @@ static int parse_stream_params(struct VpxEncoderConfig *global,
config->cfg.kf_mode = AOM_KF_DISABLED;
#if CONFIG_AOM_HIGHBITDEPTH
} else if (arg_match(&arg, &test16bitinternalarg, argi)) {
if (strcmp(global->codec->name, "vp9") == 0 ||
if (strcmp(global->codec->name, "av1") == 0 ||
strcmp(global->codec->name, "av1") == 0) {
test_16bit_internal = 1;
}
......@@ -1193,7 +1193,7 @@ static int parse_stream_params(struct VpxEncoderConfig *global,
}
}
#if CONFIG_AOM_HIGHBITDEPTH
if (strcmp(global->codec->name, "vp9") == 0 ||
if (strcmp(global->codec->name, "av1") == 0 ||
strcmp(global->codec->name, "av1") == 0) {
config->use_16bit_internal =
test_16bit_internal | (config->cfg.g_profile > 1);
......@@ -1711,7 +1711,7 @@ static void test_decode(struct stream_state *stream,
enum TestDecodeFatality fatal,
const VpxInterface *codec) {
aom_image_t enc_img, dec_img;
struct vp9_ref_frame ref_enc, ref_dec;
struct av1_ref_frame ref_enc, ref_dec;
if (stream->mismatch_seen) return;
......@@ -1965,7 +1965,7 @@ int main(int argc, const char **argv_) {
FOREACH_STREAM(initialize_encoder(stream, &global));
#if CONFIG_AOM_HIGHBITDEPTH
if (strcmp(global.codec->name, "vp9") == 0 ||
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.
// Currently assume that the bit_depths for all streams using
......
......@@ -1120,7 +1120,7 @@ static aom_codec_err_t ctrl_copy_reference(aom_codec_alg_priv_t *ctx,
static aom_codec_err_t ctrl_get_reference(aom_codec_alg_priv_t *ctx,
va_list args) {
vp9_ref_frame_t *const frame = va_arg(args, vp9_ref_frame_t *);
av1_ref_frame_t *const frame = va_arg(args, av1_ref_frame_t *);
if (frame != NULL) {
YV12_BUFFER_CONFIG *fb = get_ref_frame(&ctx->cpi->common, frame->idx);
......
......@@ -809,7 +809,7 @@ static aom_codec_err_t ctrl_copy_reference(aom_codec_alg_priv_t *ctx,
static aom_codec_err_t ctrl_get_reference(aom_codec_alg_priv_t *ctx,
va_list args) {
vp9_ref_frame_t *data = va_arg(args, vp9_ref_frame_t *);
av1_ref_frame_t *data = va_arg(args, av1_ref_frame_t *);
// Only support this function in serial decode.
if (ctx->frame_parallel_decode) {
......
......@@ -140,8 +140,8 @@ $(BUILD_PFX)%_avx.c.d: CFLAGS += -mavx $(STACKREALIGN)
$(BUILD_PFX)%_avx.c.o: CFLAGS += -mavx $(STACKREALIGN)
$(BUILD_PFX)%_avx2.c.d: CFLAGS += -mavx2 $(STACKREALIGN)
$(BUILD_PFX)%_avx2.c.o: CFLAGS += -mavx2 $(STACKREALIGN)
$(BUILD_PFX)%vp9_reconintra.c.d: CFLAGS += $(STACKREALIGN)
$(BUILD_PFX)%vp9_reconintra.c.o: CFLAGS += $(STACKREALIGN)
$(BUILD_PFX)%av1_reconintra.c.d: CFLAGS += $(STACKREALIGN)
$(BUILD_PFX)%av1_reconintra.c.o: CFLAGS += $(STACKREALIGN)
$(BUILD_PFX)%.c.d: %.c
$(if $(quiet),@echo " [DEP] $@")
......
......@@ -507,13 +507,13 @@ int main(int argc, char **argv) {
if (argc < min_args) {
#if CONFIG_AOM_HIGHBITDEPTH
die(
"Usage: %s <infile> <outfile> <codec_type(aom/vp9)> <width> <height> "
"Usage: %s <infile> <outfile> <codec_type(aom/av1)> <width> <height> "
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> "
"<Rate_0> ... <Rate_nlayers-1> <bit-depth> \n",
argv[0]);
#else
die(
"Usage: %s <infile> <outfile> <codec_type(aom/vp9)> <width> <height> "
"Usage: %s <infile> <outfile> <codec_type(aom/av1)> <width> <height> "
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> "
"<Rate_0> ... <Rate_nlayers-1> \n",
argv[0]);
......@@ -600,7 +600,7 @@ int main(int argc, char **argv) {
rc.layer_target_bitrate[i - 11] = strtol(argv[i], NULL, 0);
if (strncmp(encoder->name, "aom", 3) == 0)
cfg.ts_target_bitrate[i - 11] = rc.layer_target_bitrate[i - 11];
else if (strncmp(encoder->name, "vp9", 3) == 0)
else if (strncmp(encoder->name, "av1", 3) == 0)
cfg.layer_target_bitrate[i - 11] = rc.layer_target_bitrate[i - 11];
}
......@@ -609,7 +609,7 @@ int main(int argc, char **argv) {
cfg.rc_end_usage = AOM_CBR;
cfg.rc_min_quantizer = 2;
cfg.rc_max_quantizer = 56;
if (strncmp(encoder->name, "vp9", 3) == 0) cfg.rc_max_quantizer = 52;
if (strncmp(encoder->name, "av1", 3) == 0) cfg.rc_max_quantizer = 52;
cfg.rc_undershoot_pct = 50;
cfg.rc_overshoot_pct = 50;
cfg.rc_buf_initial_sz = 500;
......@@ -680,7 +680,7 @@ int main(int argc, char **argv) {
aom_codec_control(&codec, AOME_SET_CPUUSED, -speed);
aom_codec_control(&codec, AOME_SET_NOISE_SENSITIVITY, kDenoiserOff);
aom_codec_control(&codec, AOME_SET_STATIC_THRESHOLD, 1);
} else if (strncmp(encoder->name, "vp9", 3) == 0) {
} else if (strncmp(encoder->name, "av1", 3) == 0) {
aom_svc_extra_cfg_t svc_params;
aom_codec_control(&codec, AOME_SET_CPUUSED, speed);
aom_codec_control(&codec, AV1E_SET_AQ_MODE, 3);
......@@ -723,7 +723,7 @@ int main(int argc, char **argv) {
#endif
layer_id.temporal_layer_id =
cfg.ts_layer_id[frame_cnt % cfg.ts_periodicity];
if (strncmp(encoder->name, "vp9", 3) == 0) {
if (strncmp(encoder->name, "av1", 3) == 0) {
aom_codec_control(&codec, AV1E_SET_SVC_LAYER_ID, &layer_id);
} else if (strncmp(encoder->name, "aom", 3) == 0) {
aom_codec_control(&codec, AOME_SET_TEMPORAL_LAYER_ID,
......
......@@ -68,7 +68,7 @@ files_exist() {
done
}
# Run aom_temporal_svc_encoder in all supported modes for aom and vp9.
# Run aom_temporal_svc_encoder in all supported modes for aom and av1.
aom_tsvc_encoder_aom_mode_0() {
if [ "$(aom_encode_available)" = "yes" ]; then
......@@ -166,97 +166,97 @@ aom_tsvc_encoder_aom_mode_11() {
fi
}
aom_tsvc_encoder_vp9_mode_0() {
if [ "$(vp9_encode_available)" = "yes" ]; then
aom_tsvc_encoder vp9 "${FUNCNAME}" 0 200 || return 1
aom_tsvc_encoder_av1_mode_0() {
if [ "$(av1_encode_available)" = "yes" ]; then
aom_tsvc_encoder av1 "${FUNCNAME}" 0 200 || return 1
# Mode 0 produces 1 stream
files_exist "${FUNCNAME}" 1 || return 1
fi
}
aom_tsvc_encoder_vp9_mode_1() {
if [ "$(vp9_encode_available)" = "yes" ]; then
aom_tsvc_encoder vp9 "${FUNCNAME}" 1 200 400 || return 1
aom_tsvc_encoder_av1_mode_1() {
if [ "$(av1_encode_available)" = "yes" ]; then
aom_tsvc_encoder av1 "${FUNCNAME}" 1 200 400 || return 1
# Mode 1 produces 2 streams
files_exist "${FUNCNAME}" 2 || return 1
fi
}
aom_tsvc_encoder_vp9_mode_2() {
if [ "$(vp9_encode_available)" = "yes" ]; then
aom_tsvc_encoder vp9 "${FUNCNAME}" 2 200 400 || return 1
aom_tsvc_encoder_av1_mode_2() {
if [ "$(av1_encode_available)" = "yes" ]; then
aom_tsvc_encoder av1 "${FUNCNAME}" 2 200 400 || return 1
# Mode 2 produces 2 streams
files_exist "${FUNCNAME}" 2 || return 1
fi
}
aom_tsvc_encoder_vp9_mode_3() {
if [ "$(vp9_encode_available)" = "yes" ]; then
aom_tsvc_encoder vp9 "${FUNCNAME}" 3 200 400 600 || return 1
aom_tsvc_encoder_av1_mode_3() {
if [ "$(av1_encode_available)" = "yes" ]; then
aom_tsvc_encoder av1 "${FUNCNAME}" 3 200 400 600 || return 1
# Mode 3 produces 3 streams
files_exist "${FUNCNAME}" 3 || return 1
fi
}
aom_tsvc_encoder_vp9_mode_4() {
if [ "$(vp9_encode_available)" = "yes" ]; then
aom_tsvc_encoder vp9 "${FUNCNAME}" 4 200 400 600 || return 1
aom_tsvc_encoder_av1_mode_4() {
if [ "$(av1_encode_available)" = "yes" ]; then
aom_tsvc_encoder av1 "${FUNCNAME}" 4 200 400 600 || return 1
# Mode 4 produces 3 streams
files_exist "${FUNCNAME}" 3 || return 1
fi
}
aom_tsvc_encoder_vp9_mode_5() {
if [ "$(vp9_encode_available)" = "yes" ]; then
aom_tsvc_encoder vp9 "${FUNCNAME}" 5 200 400 600 || return 1
aom_tsvc_encoder_av1_mode_5() {
if [ "$(av1_encode_available)" = "yes" ]; then
aom_tsvc_encoder av1 "${FUNCNAME}" 5 200 400 600 || return 1
# Mode 5 produces 3 streams
files_exist "${FUNCNAME}" 3 || return 1
fi
}
aom_tsvc_encoder_vp9_mode_6() {
if [ "$(vp9_encode_available)" = "yes" ]; then
aom_tsvc_encoder vp9 "${FUNCNAME}" 6 200 400 600 || return 1
aom_tsvc_encoder_av1_mode_6() {
if [ "$(av1_encode_available)" = "yes" ]; then
aom_tsvc_encoder av1 "${FUNCNAME}" 6 200 400 600 || return 1
# Mode 6 produces 3 streams
files_exist "${FUNCNAME}" 3 || return 1
fi
}
aom_tsvc_encoder_vp9_mode_7() {
if [ "$(vp9_encode_available)" = "yes" ]; then
aom_tsvc_encoder vp9 "${FUNCNAME}" 7 200 400 600 800 1000 || return 1
aom_tsvc_encoder_av1_mode_7() {
if [ "$(av1_encode_available)" = "yes" ]; then
aom_tsvc_encoder av1 "${FUNCNAME}" 7 200 400 600 800 1000 || return 1
# Mode 7 produces 5 streams
files_exist "${FUNCNAME}" 5 || return 1
fi
}
aom_tsvc_encoder_vp9_mode_8() {
if [ "$(vp9_encode_available)" = "yes" ]; then
aom_tsvc_encoder vp9 "${FUNCNAME}" 8 200 400 || return 1
aom_tsvc_encoder_av1_mode_8() {
if [ "$(av1_encode_available)" = "yes" ]; then
aom_tsvc_encoder av1 "${FUNCNAME}" 8 200 400 || return 1
# Mode 8 produces 2 streams
files_exist "${FUNCNAME}" 2 || return 1
fi
}
aom_tsvc_encoder_vp9_mode_9() {
if [ "$(vp9_encode_available)" = "yes" ]; then
aom_tsvc_encoder vp9 "${FUNCNAME}" 9 200 400 600 || return 1
aom_tsvc_encoder_av1_mode_9() {
if [ "$(av1_encode_available)" = "yes" ]; then
aom_tsvc_encoder av1 "${FUNCNAME}" 9 200 400 600 || return 1
# Mode 9 produces 3 streams
files_exist "${FUNCNAME}" 3 || return 1
fi
}
aom_tsvc_encoder_vp9_mode_10() {
if [ "$(vp9_encode_available)" = "yes" ]; then
aom_tsvc_encoder vp9 "${FUNCNAME}" 10 200 400 600 || return 1
aom_tsvc_encoder_av1_mode_10() {
if [ "$(av1_encode_available)" = "yes" ]; then
aom_tsvc_encoder av1 "${FUNCNAME}" 10 200 400 600 || return 1
# Mode 10 produces 3 streams
files_exist "${FUNCNAME}" 3 || return 1
fi
}
aom_tsvc_encoder_vp9_mode_11() {
if [ "$(vp9_encode_available)" = "yes" ]; then
aom_tsvc_encoder vp9 "${FUNCNAME}" 11 200 400 600 || return 1
aom_tsvc_encoder_av1_mode_11() {
if [ "$(av1_encode_available)" = "yes" ]; then
aom_tsvc_encoder av1 "${FUNCNAME}" 11 200 400 600 || return 1
# Mode 11 produces 3 streams
files_exist "${FUNCNAME}" 3 || return 1
fi
......@@ -274,17 +274,17 @@ aom_tsvc_encoder_tests="aom_tsvc_encoder_aom_mode_0
aom_tsvc_encoder_aom_mode_9
aom_tsvc_encoder_aom_mode_10
aom_tsvc_encoder_aom_mode_11
aom_tsvc_encoder_vp9_mode_0
aom_tsvc_encoder_vp9_mode_1
aom_tsvc_encoder_vp9_mode_2
aom_tsvc_encoder_vp9_mode_3
aom_tsvc_encoder_vp9_mode_4
aom_tsvc_encoder_vp9_mode_5
aom_tsvc_encoder_vp9_mode_6
aom_tsvc_encoder_vp9_mode_7
aom_tsvc_encoder_vp9_mode_8
aom_tsvc_encoder_vp9_mode_9
aom_tsvc_encoder_vp9_mode_10
aom_tsvc_encoder_vp9_mode_11"
aom_tsvc_encoder_av1_mode_0
aom_tsvc_encoder_av1_mode_1
aom_tsvc_encoder_av1_mode_2
aom_tsvc_encoder_av1_mode_3
aom_tsvc_encoder_av1_mode_4
aom_tsvc_encoder_av1_mode_5
aom_tsvc_encoder_av1_mode_6
aom_tsvc_encoder_av1_mode_7
aom_tsvc_encoder_av1_mode_8
aom_tsvc_encoder_av1_mode_9
aom_tsvc_encoder_av1_mode_10
aom_tsvc_encoder_av1_mode_11"
run_tests aom_tsvc_encoder_verify_environment "${aom_tsvc_encoder_tests}"
......@@ -55,8 +55,8 @@ aomdec_can_decode_aom() {
fi
}
aomdec_can_decode_vp9() {
if [ "$(vp9_decode_available)" = "yes" ]; then
aomdec_can_decode_av1() {
if [ "$(av1_decode_available)" = "yes" ]; then
echo yes
fi
}
......@@ -73,15 +73,15 @@ aomdec_aom_ivf_pipe_input() {
fi
}
aomdec_vp9_webm() {
if [ "$(aomdec_can_decode_vp9)" = "yes" ] && \
aomdec_av1_webm() {
if [ "$(aomdec_can_decode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
aomdec "${AV1_WEBM_FILE}" --summary --noblit
fi
}
aomdec_vp9_webm_frame_parallel() {
if [ "$(aomdec_can_decode_vp9)" = "yes" ] && \
aomdec_av1_webm_frame_parallel() {
if [ "$(aomdec_can_decode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
for threads in 2 3 4 5 6 7 8; do
aomdec "${AV1_FPM_WEBM_FILE}" --summary --noblit --threads=$threads \
......@@ -90,10 +90,10 @@ aomdec_vp9_webm_frame_parallel() {
fi
}
aomdec_vp9_webm_less_than_50_frames() {
aomdec_av1_webm_less_than_50_frames() {
# ensure that reaching eof in webm_guess_framerate doesn't result in invalid
# frames in actual webm_read_frame calls.
if [ "$(aomdec_can_decode_vp9)" = "yes" ] && \
if [ "$(aomdec_can_decode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
local readonly decoder="$(aom_tool_path aomdec)"
local readonly expected=10
......@@ -109,8 +109,8 @@ aomdec_vp9_webm_less_than_50_frames() {
aomdec_tests="aomdec_aom_ivf
aomdec_aom_ivf_pipe_input
aomdec_vp9_webm
aomdec_vp9_webm_frame_parallel
aomdec_vp9_webm_less_than_50_frames"
aomdec_av1_webm
aomdec_av1_webm_frame_parallel
aomdec_av1_webm_less_than_50_frames"
run_tests aomdec_verify_environment "${aomdec_tests}"
......@@ -23,7 +23,7 @@ aomenc_verify_environment() {
elog "The file ${YUV_RAW_INPUT##*/} must exist in LIBAOM_TEST_DATA_PATH."
return 1
fi
if [ "$(aomenc_can_encode_vp9)" = "yes" ]; then
if [ "$(aomenc_can_encode_av1)" = "yes" ]; then
if [ ! -e "${Y4M_NOSQ_PAR_INPUT}" ]; then
elog "The file ${Y4M_NOSQ_PAR_INPUT##*/} must exist in"
elog "LIBAOM_TEST_DATA_PATH."
......@@ -42,8 +42,8 @@ aomenc_can_encode_aom() {
fi
}
aomenc_can_encode_vp9() {
if [ "$(vp9_encode_available)" = "yes" ]; then
aomenc_can_encode_av1() {
if [ "$(av1_encode_available)" = "yes" ]; then
echo yes
fi
}
......@@ -215,11 +215,11 @@ aomenc_aom_ivf_piped_input() {
fi
}
aomenc_vp9_ivf() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9.ivf"
aomenc_av1_ivf() {
if [ "$(aomenc_can_encode_av1)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1.ivf"
aomenc $(yuv_input_hantro_collage) \
--codec=vp9 \
--codec=av1 \
--limit="${TEST_FRAMES}" \
--ivf \
--output="${output}"
......@@ -231,12 +231,12 @@ aomenc_vp9_ivf() {
fi
}
aomenc_vp9_webm() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \
aomenc_av1_webm() {
if [ "$(aomenc_can_encode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9.webm"
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1.webm"
aomenc $(yuv_input_hantro_collage) \
--codec=vp9 \
--codec=av1 \
--limit="${TEST_FRAMES}" \
--output="${output}"
......@@ -247,12 +247,12 @@ aomenc_vp9_webm() {
fi
}
aomenc_vp9_webm_rt() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \
aomenc_av1_webm_rt() {
if [ "$(aomenc_can_encode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9_rt.webm"
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_rt.webm"
aomenc $(yuv_input_hantro_collage) \
$(aomenc_rt_params vp9) \
$(aomenc_rt_params av1) \
--output="${output}"
if [ ! -e "${output}" ]; then
......@@ -262,10 +262,10 @@ aomenc_vp9_webm_rt() {
fi
}
aomenc_vp9_webm_rt_multithread_tiled() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \
aomenc_av1_webm_rt_multithread_tiled() {
if [ "$(aomenc_can_encode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9_rt_multithread_tiled.webm"
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_rt_multithread_tiled.webm"
local readonly tilethread_min=2
local readonly tilethread_max=4
local readonly num_threads="$(seq ${tilethread_min} ${tilethread_max})"
......@@ -274,7 +274,7 @@ aomenc_vp9_webm_rt_multithread_tiled() {
for threads in ${num_threads}; do
for tile_cols in ${num_tile_cols}; do
aomenc $(y4m_input_720p) \
$(aomenc_rt_params vp9) \
$(aomenc_rt_params av1) \
--threads=${threads} \
--tile-columns=${tile_cols} \
--output="${output}"
......@@ -290,10 +290,10 @@ aomenc_vp9_webm_rt_multithread_tiled() {
fi
}
aomenc_vp9_webm_rt_multithread_tiled_frameparallel() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \
aomenc_av1_webm_rt_multithread_tiled_frameparallel() {
if [ "$(aomenc_can_encode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9_rt_mt_t_fp.webm"
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_rt_mt_t_fp.webm"
local readonly tilethread_min=2
local readonly tilethread_max=4
local readonly num_threads="$(seq ${tilethread_min} ${tilethread_max})"
......@@ -302,7 +302,7 @@ aomenc_vp9_webm_rt_multithread_tiled_frameparallel() {
for threads in ${num_threads}; do
for tile_cols in ${num_tile_cols}; do
aomenc $(y4m_input_720p) \
$(aomenc_rt_params vp9) \
$(aomenc_rt_params av1) \
--threads=${threads} \
--tile-columns=${tile_cols} \
--frame-parallel=1 \
......@@ -319,12 +319,12 @@ aomenc_vp9_webm_rt_multithread_tiled_frameparallel() {
fi
}
aomenc_vp9_webm_2pass() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \
aomenc_av1_webm_2pass() {
if [ "$(aomenc_can_encode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9.webm"
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1.webm"
aomenc $(yuv_input_hantro_collage) \
--codec=vp9 \
--codec=av1 \
--limit="${TEST_FRAMES}" \
--output="${output}" \
--passes=2
......@@ -336,11 +336,11 @@ aomenc_vp9_webm_2pass() {
fi
}
aomenc_vp9_ivf_lossless() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9_lossless.ivf"
aomenc_av1_ivf_lossless() {
if [ "$(aomenc_can_encode_av1)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_lossless.ivf"
aomenc $(yuv_input_hantro_collage) \
--codec=vp9 \
--codec=av1 \
--limit="${TEST_FRAMES}" \
--ivf \
--output="${output}" \
......@@ -353,11 +353,11 @@ aomenc_vp9_ivf_lossless() {
fi
}
aomenc_vp9_ivf_minq0_maxq0() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9_lossless_minq0_maxq0.ivf"
aomenc_av1_ivf_minq0_maxq0() {
if [ "$(aomenc_can_encode_av1)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_lossless_minq0_maxq0.ivf"
aomenc $(yuv_input_hantro_collage) \
--codec=vp9 \
--codec=av1 \
--limit="${TEST_FRAMES}" \
--ivf \
--output="${output}" \
......@@ -371,14 +371,14 @@ aomenc_vp9_ivf_minq0_maxq0() {
fi
}
aomenc_vp9_webm_lag10_frames20() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \
aomenc_av1_webm_lag10_frames20() {
if [ "$(aomenc_can_encode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
local readonly lag_total_frames=20
local readonly lag_frames=10
local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9_lag10_frames20.webm"
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_lag10_frames20.webm"
aomenc $(yuv_input_hantro_collage) \
--codec=vp9 \
--codec=av1 \
--limit="${lag_total_frames}" \
--lag-in-frames="${lag_frames}" \
--output="${output}" \
......@@ -393,12 +393,12 @@ aomenc_vp9_webm_lag10_frames20() {
}
# TODO(fgalligan): Test that DisplayWidth is different than video width.
aomenc_vp9_webm_non_square_par() {
if [ "$(aomenc_can_encode_vp9)" = "yes" ] && \
aomenc_av1_webm_non_square_par() {
if [ "$(aomenc_can_encode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/vp9_non_square_par.webm"
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_non_square_par.webm"
aomenc $(y4m_input_non_square_par) \
--codec=vp9 \
--codec=av1 \
--limit="${TEST_FRAMES}" \
--output="${output}"
......@@ -415,15 +415,15 @@ aomenc_tests="aomenc_aom_ivf
aomenc_aom_webm_2pass
aomenc_aom_webm_lag10_frames20
aomenc_aom_ivf_piped_input
aomenc_vp9_ivf
aomenc_vp9_webm
aomenc_vp9_webm_rt
aomenc_vp9_webm_rt_multithread_tiled
aomenc_vp9_webm_rt_multithread_tiled_frameparallel
aomenc_vp9_webm_2pass
aomenc_vp9_ivf_lossless
aomenc_vp9_ivf_minq0_maxq0
aomenc_vp9_webm_lag10_frames20
aomenc_vp9_webm_non_square_par"
aomenc_av1_ivf
aomenc_av1_webm
aomenc_av1_webm_rt
aomenc_av1_webm_rt_multithread_tiled
aomenc_av1_webm_rt_multithread_tiled_frameparallel
aomenc_av1_webm_2pass
aomenc_av1_ivf_lossless
aomenc_av1_ivf_minq0_maxq0
aomenc_av1_webm_lag10_frames20
aomenc_av1_webm_non_square_par"
run_tests aomenc_verify_environment "${aomenc_tests}"
......@@ -38,25 +38,25 @@ const char kNewEncodeOutputFile[] = "new_encode.ivf";