Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
e8f0a463
Commit
e8f0a463
authored
Dec 10, 2017
by
Tristan Matthews
Committed by
Rostislav Pehlivanov
Dec 13, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ivfenc: add AV1 support
libaom tools work with ivf files.
parent
309ddcbe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
ivfenc.c
libavformat/ivfenc.c
+7
-3
No files found.
libavformat/ivfenc.c
View file @
e8f0a463
...
...
@@ -37,14 +37,17 @@ static int ivf_write_header(AVFormatContext *s)
}
par
=
s
->
streams
[
0
]
->
codecpar
;
if
(
par
->
codec_type
!=
AVMEDIA_TYPE_VIDEO
||
!
(
par
->
codec_id
==
AV_CODEC_ID_VP8
||
par
->
codec_id
==
AV_CODEC_ID_VP9
))
{
av_log
(
s
,
AV_LOG_ERROR
,
"Currently only VP8 and VP9 are supported!
\n
"
);
!
(
par
->
codec_id
==
AV_CODEC_ID_VP8
||
par
->
codec_id
==
AV_CODEC_ID_VP9
||
par
->
codec_id
==
AV_CODEC_ID_AV1
))
{
av_log
(
s
,
AV_LOG_ERROR
,
"Currently only VP8, VP9 and AV1 are supported!
\n
"
);
return
AVERROR
(
EINVAL
);
}
avio_write
(
pb
,
"DKIF"
,
4
);
avio_wl16
(
pb
,
0
);
// version
avio_wl16
(
pb
,
32
);
// header length
avio_wl32
(
pb
,
par
->
codec_tag
?
par
->
codec_tag
:
par
->
codec_id
==
AV_CODEC_ID_VP9
?
AV_RL32
(
"VP90"
)
:
AV_RL32
(
"VP80"
));
avio_wl32
(
pb
,
par
->
codec_tag
?
par
->
codec_tag
:
par
->
codec_id
==
AV_CODEC_ID_VP9
?
AV_RL32
(
"VP90"
)
:
par
->
codec_id
==
AV_CODEC_ID_VP8
?
AV_RL32
(
"VP80"
)
:
AV_RL32
(
"AV01"
));
avio_wl16
(
pb
,
par
->
width
);
avio_wl16
(
pb
,
par
->
height
);
avio_wl32
(
pb
,
s
->
streams
[
0
]
->
time_base
.
den
);
...
...
@@ -100,6 +103,7 @@ static int ivf_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt)
static
const
AVCodecTag
codec_ivf_tags
[]
=
{
{
AV_CODEC_ID_VP8
,
MKTAG
(
'V'
,
'P'
,
'8'
,
'0'
)
},
{
AV_CODEC_ID_VP9
,
MKTAG
(
'V'
,
'P'
,
'9'
,
'0'
)
},
{
AV_CODEC_ID_AV1
,
MKTAG
(
'A'
,
'V'
,
'0'
,
'1'
)
},
{
AV_CODEC_ID_NONE
,
0
}
};
...
...
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