Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
fa8ca9f2
Commit
fa8ca9f2
authored
Mar 28, 2016
by
Adrian Grange
Browse files
Change "vp9" to "av1"
Change-Id: I5942c24dec6fdcfe7e27518c8049b59e6f99a1aa
parent
ec838b76
Changes
31
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
fa8ca9f2
...
...
@@ -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
...
...
aom/aom.h
View file @
fa8ca9f2
...
...
@@ -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 */
...
...
aom/aom_encoder.h
View file @
fa8ca9f2
...
...
@@ -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
*
...
...
aom/aomcx.h
View file @
fa8ca9f2
...
...
@@ -590,7 +590,7 @@ typedef enum aom_scaling_mode_1d {
* Supported codecs: AV1 (in SVC mode)
*
*/
typedef
enum
vp9
e_temporal_layering_mode
{
typedef
enum
av1
e_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.
...
...
aom_dsp/sad.c
View file @
fa8ca9f2
...
...
@@ -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
...
...
aom_dsp/x86/fwd_dct32x32_impl_avx2.h
View file @
fa8ca9f2
...
...
@@ -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
);
...
...
aom_dsp/x86/fwd_dct32x32_impl_sse2.h
View file @
fa8ca9f2
...
...
@@ -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
);
...
...
aomdec.c
View file @
fa8ca9f2
...
...
@@ -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
));
...
...
aomenc.c
View file @
fa8ca9f2
...
...
@@ -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
...
...
av1/av1_cx_iface.c
View file @
fa8ca9f2
...
...
@@ -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
);
...
...
av1/av1_dx_iface.c
View file @
fa8ca9f2
...
...
@@ -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
)
{
...
...
build/make/Makefile
View file @
fa8ca9f2
...
...
@@ -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]
$@
"
)
...
...
examples/aom_temporal_svc_encoder.c
View file @
fa8ca9f2
...
...
@@ -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
,
...
...
test/aom_temporal_svc_encoder.sh
View file @
fa8ca9f2
...
...
@@ -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
}
"
test/aomdec.sh
View file @
fa8ca9f2
...
...
@@ -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
}
"
test/aomenc.sh
View file @
fa8ca9f2
...
...
@@ -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