From ea2a313d01faca02e0fb10f7385dd623c3af9704 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 18 Sep 2021 11:46:38 +0300 Subject: [PATCH] ffv1dec: Add support for 4:1:0 and 4:1:1 YUV --- video/ffv1/src/ffv1dec/imp.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/video/ffv1/src/ffv1dec/imp.rs b/video/ffv1/src/ffv1dec/imp.rs index 0c297af9..71c9a4c4 100644 --- a/video/ffv1/src/ffv1dec/imp.rs +++ b/video/ffv1/src/ffv1dec/imp.rs @@ -77,6 +77,8 @@ fn get_all_video_formats() -> Vec { VideoFormat::Gbr12be, VideoFormat::Gbra12le, VideoFormat::Gbra12be, + VideoFormat::Y41b, + VideoFormat::Yuv9, ]; values.iter().map(|i| i.to_str().to_send_value()).collect() @@ -116,6 +118,8 @@ fn get_output_format(record: &ConfigRecord) -> Option { (true, 0, 1, 10, true, false) => Some(VideoFormat::A42210be), (true, 0, 1, 12, false, true) => Some(VideoFormat::I42212le), (true, 0, 1, 12, false, false) => Some(VideoFormat::I42212be), + // 4:1:1 + (true, 0, 2, 8, false, _) => Some(VideoFormat::Y41b), // 4:2:0 (true, 1, 1, 8, false, _) => Some(VideoFormat::I420), (true, 1, 1, 8, true, _) => Some(VideoFormat::A420), @@ -123,6 +127,8 @@ fn get_output_format(record: &ConfigRecord) -> Option { (true, 1, 1, 10, false, false) => Some(VideoFormat::I42010be), (true, 1, 1, 12, false, true) => Some(VideoFormat::I42012le), (true, 1, 1, 12, false, false) => Some(VideoFormat::I42012be), + // 4:1:0 + (true, 2, 2, 8, false, _) => Some(VideoFormat::Yuv9), // Nothing matched (_, _, _, _, _, _) => None, },