From b03f2277a205ff7e7cdaa12c6e52322ea474a7af Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 30 Dec 2024 15:43:14 +0100 Subject: Bump libdcp for raw_convert changes. raw_convert is gone, so here we use fmt::{to_string,format} instead. Other raw_converts now use fast_float. --- src/lib/colour_conversion.cc | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'src/lib/colour_conversion.cc') diff --git a/src/lib/colour_conversion.cc b/src/lib/colour_conversion.cc index f1e625812..447382a1e 100644 --- a/src/lib/colour_conversion.cc +++ b/src/lib/colour_conversion.cc @@ -34,6 +34,7 @@ LIBDCP_DISABLE_WARNINGS #include LIBDCP_ENABLE_WARNINGS +#include #include #include "i18n.h" @@ -157,34 +158,34 @@ ColourConversion::as_xml(xmlpp::Element* element) const if (dynamic_pointer_cast (_in)) { auto tf = dynamic_pointer_cast (_in); cxml::add_text_child(in_node, "Type", "Gamma"); - cxml::add_text_child(in_node, "Gamma", raw_convert(tf->gamma())); + cxml::add_text_child(in_node, "Gamma", fmt::to_string(tf->gamma())); } else if (dynamic_pointer_cast (_in)) { auto tf = dynamic_pointer_cast (_in); cxml::add_text_child(in_node, "Type", "ModifiedGamma"); - cxml::add_text_child(in_node, "Power", raw_convert(tf->power ())); - cxml::add_text_child(in_node, "Threshold", raw_convert(tf->threshold ())); - cxml::add_text_child(in_node, "A", raw_convert(tf->A())); - cxml::add_text_child(in_node, "B", raw_convert(tf->B())); + cxml::add_text_child(in_node, "Power", fmt::to_string(tf->power())); + cxml::add_text_child(in_node, "Threshold", fmt::to_string(tf->threshold())); + cxml::add_text_child(in_node, "A", fmt::to_string(tf->A())); + cxml::add_text_child(in_node, "B", fmt::to_string(tf->B())); } else if (dynamic_pointer_cast(_in)) { cxml::add_text_child(in_node, "Type", "SGamut3"); } - cxml::add_text_child(element, "YUVToRGB", raw_convert(static_cast(_yuv_to_rgb))); - cxml::add_text_child(element, "RedX", raw_convert(_red.x)); - cxml::add_text_child(element, "RedY", raw_convert(_red.y)); - cxml::add_text_child(element, "GreenX", raw_convert(_green.x)); - cxml::add_text_child(element, "GreenY", raw_convert(_green.y)); - cxml::add_text_child(element, "BlueX", raw_convert(_blue.x)); - cxml::add_text_child(element, "BlueY", raw_convert(_blue.y)); - cxml::add_text_child(element, "WhiteX", raw_convert(_white.x)); - cxml::add_text_child(element, "WhiteY", raw_convert(_white.y)); + cxml::add_text_child(element, "YUVToRGB", fmt::to_string(static_cast(_yuv_to_rgb))); + cxml::add_text_child(element, "RedX", fmt::to_string(_red.x)); + cxml::add_text_child(element, "RedY", fmt::to_string(_red.y)); + cxml::add_text_child(element, "GreenX", fmt::to_string(_green.x)); + cxml::add_text_child(element, "GreenY", fmt::to_string(_green.y)); + cxml::add_text_child(element, "BlueX", fmt::to_string(_blue.x)); + cxml::add_text_child(element, "BlueY", fmt::to_string(_blue.y)); + cxml::add_text_child(element, "WhiteX", fmt::to_string(_white.x)); + cxml::add_text_child(element, "WhiteY", fmt::to_string(_white.y)); if (_adjusted_white) { - cxml::add_text_child(element, "AdjustedWhiteX", raw_convert(_adjusted_white.get().x)); - cxml::add_text_child(element, "AdjustedWhiteY", raw_convert(_adjusted_white.get().y)); + cxml::add_text_child(element, "AdjustedWhiteX", fmt::to_string(_adjusted_white.get().x)); + cxml::add_text_child(element, "AdjustedWhiteY", fmt::to_string(_adjusted_white.get().y)); } if (auto gf = dynamic_pointer_cast(_out)) { - cxml::add_text_child(element, "OutputGamma", raw_convert(gf->gamma())); + cxml::add_text_child(element, "OutputGamma", fmt::to_string(gf->gamma())); } } -- cgit v1.2.3