Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2018-11-30 03:32:01 +0300
committerRonald S. Bultje <rsbultje@gmail.com>2018-12-06 02:17:51 +0300
commit012fced26756011824236b28497114d9fa02de93 (patch)
treeb5dec771c9d7d509c63019d4eb1dd88b7879c823 /tools
parent95cf7cf8f3c8b884483777e33adcc63ad7075327 (diff)
Fix 12-bit support in yuv4mpeg muxer
Diffstat (limited to 'tools')
-rw-r--r--tools/output/y4m2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/output/y4m2.c b/tools/output/y4m2.c
index cbe2b14..bcd4034 100644
--- a/tools/output/y4m2.c
+++ b/tools/output/y4m2.c
@@ -59,11 +59,11 @@ static int y4m2_open(Y4m2OutputContext *const c, const char *const file,
}
static int write_header(Y4m2OutputContext *const c, const Dav1dPicture *const p) {
- static const char *const ss_names[][2] = {
- [DAV1D_PIXEL_LAYOUT_I400] = { "mono", "mono10" },
- [DAV1D_PIXEL_LAYOUT_I420] = { NULL, "420p10" },
- [DAV1D_PIXEL_LAYOUT_I422] = { "422", "422p10" },
- [DAV1D_PIXEL_LAYOUT_I444] = { "444", "444p10" }
+ static const char *const ss_names[][3] = {
+ [DAV1D_PIXEL_LAYOUT_I400] = { "mono", "mono10", "mono12" },
+ [DAV1D_PIXEL_LAYOUT_I420] = { NULL, "420p10", "420p12" },
+ [DAV1D_PIXEL_LAYOUT_I422] = { "422", "422p10", "422p12" },
+ [DAV1D_PIXEL_LAYOUT_I444] = { "444", "444p10", "444p12" }
};
static const char *const chr_names_8bpc_i420[] = {
@@ -75,7 +75,7 @@ static int write_header(Y4m2OutputContext *const c, const Dav1dPicture *const p)
const char *const ss_name =
p->p.layout == DAV1D_PIXEL_LAYOUT_I420 && p->p.bpc == 8 ?
chr_names_8bpc_i420[p->seq_hdr->chr > 2 ? DAV1D_CHR_UNKNOWN : p->seq_hdr->chr] :
- ss_names[p->p.layout][p->p.bpc > 8];
+ ss_names[p->p.layout][p->seq_hdr->hbd];
fprintf(c->f, "YUV4MPEG2 W%d H%d F%d:%d Ip C%s\n",
p->p.w, p->p.h, c->fps[0], c->fps[1], ss_name);