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
0e833f61
Commit
0e833f61
authored
Dec 12, 2018
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/libdav1d: add support for 12bit streams
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
1046cba2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
libdav1d.c
libavcodec/libdav1d.c
+6
-6
No files found.
libavcodec/libdav1d.c
View file @
0e833f61
...
...
@@ -79,11 +79,11 @@ static void libdav1d_frame_free(void *opaque, uint8_t *data) {
dav1d_picture_unref
(
&
p
);
}
static
const
enum
AVPixelFormat
pix_fmt
[][
2
]
=
{
[
DAV1D_PIXEL_LAYOUT_I400
]
=
{
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_GRAY10
},
[
DAV1D_PIXEL_LAYOUT_I420
]
=
{
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_YUV420P10
},
[
DAV1D_PIXEL_LAYOUT_I422
]
=
{
AV_PIX_FMT_YUV422P
,
AV_PIX_FMT_YUV422P10
},
[
DAV1D_PIXEL_LAYOUT_I444
]
=
{
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_YUV444P10
},
static
const
enum
AVPixelFormat
pix_fmt
[][
3
]
=
{
[
DAV1D_PIXEL_LAYOUT_I400
]
=
{
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_GRAY10
,
AV_PIX_FMT_GRAY12
},
[
DAV1D_PIXEL_LAYOUT_I420
]
=
{
AV_PIX_FMT_YUV420P
,
AV_PIX_FMT_YUV420P10
,
AV_PIX_FMT_YUV420P12
},
[
DAV1D_PIXEL_LAYOUT_I422
]
=
{
AV_PIX_FMT_YUV422P
,
AV_PIX_FMT_YUV422P10
,
AV_PIX_FMT_YUV422P12
},
[
DAV1D_PIXEL_LAYOUT_I444
]
=
{
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_YUV444P10
,
AV_PIX_FMT_YUV444P12
},
};
static
int
libdav1d_receive_frame
(
AVCodecContext
*
c
,
AVFrame
*
frame
)
...
...
@@ -151,7 +151,7 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
frame
->
linesize
[
2
]
=
p
.
stride
[
1
];
c
->
profile
=
p
.
seq_hdr
->
profile
;
frame
->
format
=
c
->
pix_fmt
=
pix_fmt
[
p
.
p
.
layout
][
p
.
p
.
bpc
==
10
];
frame
->
format
=
c
->
pix_fmt
=
pix_fmt
[
p
.
p
.
layout
][
p
.
seq_hdr
->
hbd
];
frame
->
width
=
p
.
p
.
w
;
frame
->
height
=
p
.
p
.
h
;
if
(
c
->
width
!=
p
.
p
.
w
||
c
->
height
!=
p
.
p
.
h
)
{
...
...
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