From a0d60e751b0f9e659fd552111971243988ff21fd Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sat, 10 Sep 2022 02:01:32 +0200 Subject: [PATCH] encoder/handler/dnxhd: Use endian-independent formats --- source/encoders/handlers/dnxhd_handler.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/encoders/handlers/dnxhd_handler.cpp b/source/encoders/handlers/dnxhd_handler.cpp index af48d3a..4348cd9 100644 --- a/source/encoders/handlers/dnxhd_handler.cpp +++ b/source/encoders/handlers/dnxhd_handler.cpp @@ -1,3 +1,5 @@ +// Copyright (c) 2022 Michael Fabian Dirks + #include "dnxhd_handler.hpp" #include "common.hpp" #include "../codecs/dnxhr.hpp" @@ -23,8 +25,8 @@ void dnxhd_handler::override_colorformat(AVPixelFormat& target_format, obs_data_ { static const std::array, static_cast(5)> profile_to_format_map{ std::pair{"dnxhr_lb", AV_PIX_FMT_YUV422P}, std::pair{"dnxhr_sq", AV_PIX_FMT_YUV422P}, - std::pair{"dnxhr_hq", AV_PIX_FMT_YUV422P}, std::pair{"dnxhr_hqx", AV_PIX_FMT_YUV422P10LE}, - std::pair{"dnxhr_444", AV_PIX_FMT_YUV444P10LE}}; + std::pair{"dnxhr_hq", AV_PIX_FMT_YUV422P}, std::pair{"dnxhr_hqx", AV_PIX_FMT_YUV422P10}, + std::pair{"dnxhr_444", AV_PIX_FMT_YUV444P10}}; const char* selected_profile = obs_data_get_string(settings, S_CODEC_DNXHR_PROFILE); for (const auto& kv : profile_to_format_map) { @@ -34,7 +36,7 @@ void dnxhd_handler::override_colorformat(AVPixelFormat& target_format, obs_data_ } } - //Fallback for (yet) unknown formats + // Fallback for (yet) unknown formats target_format = AV_PIX_FMT_YUV422P; }