From ad60ed4e62abf7a1df0a69dc1bf310ea5c402715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Garramu=C3=B1o?= Date: Mon, 19 Feb 2024 05:39:42 -0300 Subject: [PATCH] Added underscores to parsePixelFormat to make them more readable. --- lib/tlIO/FFmpegWrite.cpp | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/lib/tlIO/FFmpegWrite.cpp b/lib/tlIO/FFmpegWrite.cpp index d6b0e732..ccab661f 100644 --- a/lib/tlIO/FFmpegWrite.cpp +++ b/lib/tlIO/FFmpegWrite.cpp @@ -43,6 +43,12 @@ namespace tl o = AV_PIX_FMT_YUV422P; else if (s == "YUV444P") o = AV_PIX_FMT_YUV444P; + else if (s == "YUV_420P") + o = AV_PIX_FMT_YUV420P; + else if (s == "YUV_422P") + o = AV_PIX_FMT_YUV422P; + else if (s == "YUV_444P") + o = AV_PIX_FMT_YUV444P; // 10-bits pixel formats else if (s == "YUV420P10LE") @@ -51,19 +57,41 @@ namespace tl o = AV_PIX_FMT_YUV422P10LE; else if (s == "YUV444P10LE") o = AV_PIX_FMT_YUV444P10LE; + else if (s == "YUV_420P10LE") + o = AV_PIX_FMT_YUV420P10LE; + else if (s == "YUV_422P10LE") + o = AV_PIX_FMT_YUV422P10LE; + else if (s == "YUV_444P10LE") + o = AV_PIX_FMT_YUV444P10LE; + else if (s == "YUV_420P_10LE") + o = AV_PIX_FMT_YUV420P10LE; + else if (s == "YUV_422P_10LE") + o = AV_PIX_FMT_YUV422P10LE; + else if (s == "YUV_444P_10LE") + o = AV_PIX_FMT_YUV444P10LE; // With alpha else if (s == "YUVA420P") o = AV_PIX_FMT_YUVA420P; else if (s == "YUVA444P16LE") o = AV_PIX_FMT_YUVA444P16LE; + else if (s == "YUVA_420P") + o = AV_PIX_FMT_YUVA420P; + else if (s == "YUVA_444P16LE") + o = AV_PIX_FMT_YUVA444P16LE; + else if (s == "YUVA_444P_16LE") + o = AV_PIX_FMT_YUVA444P16LE; // RGB formats else if (s == "GBRP") o = AV_PIX_FMT_GBRP; else if (s == "GBRP10LE") o = AV_PIX_FMT_GBRP10LE; - else if (s == "GBRP") + else if (s == "GBRP_10LE") + o = AV_PIX_FMT_GBRP10LE; + else if (s == "GBRP12LE") + o = AV_PIX_FMT_GBRP12LE; + else if (s == "GBRP_12LE") o = AV_PIX_FMT_GBRP12LE; else throw std::runtime_error(