Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
149822e3
Commit
149822e3
authored
Jul 20, 2015
by
Yaowu Xu
Committed by
Gerrit Code Review
Jul 20, 2015
Browse files
Merge "Correctly report "Unsupported bitstream profile""
parents
add779e4
7c0c62df
Changes
3
Hide whitespace changes
Inline
Side-by-side
test/decode_api_test.cc
View file @
149822e3
...
...
@@ -129,8 +129,13 @@ TEST(DecodeAPI, Vp9InvalidDecode) {
vpx_codec_ctx_t
dec
;
EXPECT_EQ
(
VPX_CODEC_OK
,
vpx_codec_dec_init
(
&
dec
,
codec
,
NULL
,
0
));
const
uint32_t
frame_size
=
static_cast
<
uint32_t
>
(
video
.
frame_size
());
#if CONFIG_VP9_HIGHBITDEPTH
EXPECT_EQ
(
VPX_CODEC_MEM_ERROR
,
vpx_codec_decode
(
&
dec
,
video
.
cxdata
(),
frame_size
,
NULL
,
0
));
#else
EXPECT_EQ
(
VPX_CODEC_UNSUP_BITSTREAM
,
vpx_codec_decode
(
&
dec
,
video
.
cxdata
(),
frame_size
,
NULL
,
0
));
#endif
vpx_codec_iter_t
iter
=
NULL
;
EXPECT_EQ
(
NULL
,
vpx_codec_get_frame
(
&
dec
,
&
iter
));
...
...
test/invalid_file_test.cc
View file @
149822e3
...
...
@@ -112,7 +112,9 @@ TEST_P(InvalidFileTest, ReturnCode) {
const
DecodeParam
kVP9InvalidFileTests
[]
=
{
{
1
,
"invalid-vp90-02-v2.webm"
},
#if CONFIG_VP9_HIGHBITDEPTH
{
1
,
"invalid-vp90-2-00-quantizer-00.webm.ivf.s5861_r01-05_b6-.v2.ivf"
},
#endif
{
1
,
"invalid-vp90-03-v3.webm"
},
{
1
,
"invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-.ivf"
},
{
1
,
"invalid-vp90-2-00-quantizer-11.webm.ivf.s52984_r01-05_b6-z.ivf"
},
...
...
vp9/decoder/vp9_decodeframe.c
View file @
149822e3
...
...
@@ -1816,10 +1816,15 @@ static size_t read_uncompressed_header(VP9Decoder *pbi,
"Invalid frame marker"
);
cm
->
profile
=
vp9_read_profile
(
rb
);
#if CONFIG_VP9_HIGHBITDEPTH
if
(
cm
->
profile
>=
MAX_PROFILES
)
vpx_internal_error
(
&
cm
->
error
,
VPX_CODEC_UNSUP_BITSTREAM
,
"Unsupported bitstream profile"
);
#else
if
(
cm
->
profile
>=
PROFILE_2
)
vpx_internal_error
(
&
cm
->
error
,
VPX_CODEC_UNSUP_BITSTREAM
,
"Unsupported bitstream profile"
);
#endif
cm
->
show_existing_frame
=
vp9_rb_read_bit
(
rb
);
if
(
cm
->
show_existing_frame
)
{
...
...
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