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
6a4e85a1
Commit
6a4e85a1
authored
Mar 16, 2015
by
Frank Galligan
Browse files
Add protection for codec interface name change.
Change-Id: I9101cb1132aa580fc32fd47e8ac9d91d5b09e963
parent
09e0b38a
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/encode_test_driver.cc
View file @
6a4e85a1
...
...
@@ -29,18 +29,26 @@ void Encoder::InitEncoder(VideoSource *video) {
cfg_
.
g_timebase
=
video
->
timebase
();
cfg_
.
rc_twopass_stats_in
=
stats_
->
buf
();
// Default to 1 thread
and 1 tile column
.
// Default to 1 thread.
cfg_
.
g_threads
=
1
;
res
=
vpx_codec_enc_init
(
&
encoder_
,
CodecInterface
(),
&
cfg_
,
init_flags_
);
ASSERT_EQ
(
VPX_CODEC_OK
,
res
)
<<
EncoderError
();
std
::
string
codec_name
(
encoder_
.
name
);
if
(
codec_name
.
find
(
"WebM Project VP9 Encoder"
)
!=
std
::
string
::
npos
)
{
#if CONFIG_VP9_ENCODER
if
(
CodecInterface
()
==
&
vpx_codec_vp9_cx_algo
)
{
// Default to 1 tile column for VP9.
const
int
log2_tile_columns
=
0
;
res
=
vpx_codec_control_
(
&
encoder_
,
VP9E_SET_TILE_COLUMNS
,
log2_tile_columns
);
ASSERT_EQ
(
VPX_CODEC_OK
,
res
)
<<
EncoderError
();
}
else
#endif
{
#if CONFIG_VP8_ENCODER
ASSERT_EQ
(
&
vpx_codec_vp8_cx_algo
,
CodecInterface
())
<<
"Unknown Codec Interface"
;
#endif
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment