Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
dav1d
Commits
c1c15e0d
Commit
c1c15e0d
authored
Sep 27, 2018
by
Raphaël Zumer
Browse files
Handle chroma position in 4:2:0 Y4M output
parent
b1adc7cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/output/y4m2.c
View file @
c1c15e0d
...
...
@@ -49,14 +49,24 @@ static int y4m2_open(Y4m2OutputContext *const c, const char *const file,
return
-
1
;
}
static
const
char
*
const
ss_name
[][
2
]
=
{
static
const
char
*
const
ss_name
s
[][
2
]
=
{
[
DAV1D_PIXEL_LAYOUT_I400
]
=
{
"mono"
,
"mono10"
},
[
DAV1D_PIXEL_LAYOUT_I420
]
=
{
"420jpeg"
,
"420p10"
},
[
DAV1D_PIXEL_LAYOUT_I422
]
=
{
"422"
,
"422p10"
},
[
DAV1D_PIXEL_LAYOUT_I444
]
=
{
"444"
,
"444p10"
}
};
static
const
char
*
const
chr_names_8bpc_i420
[]
=
{
[
DAV1D_CHR_UNKNOWN
]
=
"420jpeg"
,
[
DAV1D_CHR_VERTICAL
]
=
"420mpeg2"
,
[
DAV1D_CHR_COLOCATED
]
=
"420"
};
const
char
*
const
ss_name
=
p
->
layout
==
DAV1D_PIXEL_LAYOUT_I420
&&
p
->
bpc
==
8
?
chr_names_8bpc_i420
[
p
->
chr
]
:
ss_names
[
p
->
layout
][
p
->
bpc
>
8
];
fprintf
(
c
->
f
,
"YUV4MPEG2 W%d H%d C%s Ip F%d:%d
\n
"
,
p
->
w
,
p
->
h
,
ss_name
[
p
->
layout
][
p
->
bpc
>
8
]
,
fps
[
0
],
fps
[
1
]);
p
->
w
,
p
->
h
,
ss_name
,
fps
[
0
],
fps
[
1
]);
return
0
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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