Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
3f38d4b8
Commit
3f38d4b8
authored
May 27, 2015
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vp9: Parse subsampling and report missing feature
parent
d68c0538
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
vp9.c
libavcodec/vp9.c
+23
-1
vp9.h
libavcodec/vp9.h
+2
-0
No files found.
libavcodec/vp9.c
View file @
3f38d4b8
...
@@ -219,7 +219,29 @@ static int decode_frame_header(AVCodecContext *avctx,
...
@@ -219,7 +219,29 @@ static int decode_frame_header(AVCodecContext *avctx,
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
}
s
->
fullrange
=
get_bits1
(
&
s
->
gb
);
s
->
fullrange
=
get_bits1
(
&
s
->
gb
);
// for profile 1, here follows the subsampling bits
// subsampling bits
if
(
s
->
profile
==
1
||
s
->
profile
==
3
)
{
s
->
sub_x
=
get_bits1
(
&
s
->
gb
);
s
->
sub_y
=
get_bits1
(
&
s
->
gb
);
if
(
s
->
sub_x
&&
s
->
sub_y
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"4:2:0 color not supported in profile 1 or 3
\n
"
);
return
AVERROR_INVALIDDATA
;
}
if
(
get_bits1
(
&
s
->
gb
))
{
// reserved bit
av_log
(
avctx
,
AV_LOG_ERROR
,
"Reserved bit should be zero
\n
"
);
return
AVERROR_INVALIDDATA
;
}
}
else
{
s
->
sub_x
=
s
->
sub_y
=
1
;
}
if
(
!
s
->
sub_x
||
!
s
->
sub_y
)
{
avpriv_report_missing_feature
(
avctx
,
"Subsampling %d:%d"
,
s
->
sub_x
,
s
->
sub_y
);
return
AVERROR_PATCHWELCOME
;
}
s
->
refreshrefmask
=
0xff
;
s
->
refreshrefmask
=
0xff
;
w
=
get_bits
(
&
s
->
gb
,
16
)
+
1
;
w
=
get_bits
(
&
s
->
gb
,
16
)
+
1
;
h
=
get_bits
(
&
s
->
gb
,
16
)
+
1
;
h
=
get_bits
(
&
s
->
gb
,
16
)
+
1
;
...
...
libavcodec/vp9.h
View file @
3f38d4b8
...
@@ -277,6 +277,8 @@ typedef struct VP9Context {
...
@@ -277,6 +277,8 @@ typedef struct VP9Context {
uint8_t
use_last_frame_mvs
;
uint8_t
use_last_frame_mvs
;
uint8_t
errorres
;
uint8_t
errorres
;
uint8_t
colorspace
;
uint8_t
colorspace
;
uint8_t
sub_x
;
uint8_t
sub_y
;
uint8_t
fullrange
;
uint8_t
fullrange
;
uint8_t
intraonly
;
uint8_t
intraonly
;
uint8_t
resetctx
;
uint8_t
resetctx
;
...
...
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