From 1936a703bf1a3b27db9bb4d503b861f6d1fa2e74 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 5 Feb 2025 11:57:52 +0200 Subject: PixelFormats: clean fourcc management Signed-off-by: Tomi Valkeinen --- utils/kmsprint.cpp | 4 ++-- utils/kmstest.cpp | 6 +++--- utils/kmsview.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'utils') diff --git a/utils/kmsprint.cpp b/utils/kmsprint.cpp index c573c2e..919b50f 100644 --- a/utils/kmsprint.cpp +++ b/utils/kmsprint.cpp @@ -111,7 +111,7 @@ static string format_plane(Plane& p) (uint32_t)p.get_prop_value("CRTC_H")); } - string fmts = join(p.get_formats(), " ", [](PixelFormat fmt) { return PixelFormatToFourCC(fmt); }); + string fmts = join(p.get_formats(), " ", [](PixelFormat fmt) { return pixel_format_to_fourcc_str(fmt); }); str += fmt::format(" ({})", fmts); @@ -122,7 +122,7 @@ static string format_fb(Framebuffer& fb) { return fmt::format("FB {} {}x{} {}", fb.id(), fb.width(), fb.height(), - PixelFormatToFourCC(fb.format())); + pixel_format_to_fourcc_str(fb.format())); } static string format_property(const Property* prop, uint64_t val) diff --git a/utils/kmstest.cpp b/utils/kmstest.cpp index de6957d..7c733da 100644 --- a/utils/kmstest.cpp +++ b/utils/kmstest.cpp @@ -361,7 +361,7 @@ static void parse_fb(Card& card, const string& fb_str, OutputInfo* output, Plane if (sm[2].matched) h = stoul(sm[2]); if (sm[3].matched) - format = FourCCToPixelFormat(sm[3]); + format = fourcc_str_to_pixel_format(sm[3]); } vector v; @@ -747,7 +747,7 @@ static void print_outputs(const vector& outputs) if (!o.legacy_fbs.empty()) { auto fb = o.legacy_fbs[0]; - fmt::print(" Fb {} {}x{}-{}\n", fb->id(), fb->width(), fb->height(), PixelFormatToFourCC(fb->format())); + fmt::print(" Fb {} {}x{}-{}\n", fb->id(), fb->width(), fb->height(), pixel_format_to_fourcc_str(fb->format())); } for (unsigned j = 0; j < o.planes.size(); ++j) { @@ -760,7 +760,7 @@ static void print_outputs(const vector& outputs) fmt::print("\n"); fmt::print(" Fb {} {}x{}-{}\n", fb->id(), fb->width(), fb->height(), - PixelFormatToFourCC(fb->format())); + pixel_format_to_fourcc_str(fb->format())); if (s_print_crc) fmt::print(" CRC16 {}\n", fb_crc(fb).c_str()); } diff --git a/utils/kmsview.cpp b/utils/kmsview.cpp index c2654b0..437d3a6 100644 --- a/utils/kmsview.cpp +++ b/utils/kmsview.cpp @@ -71,7 +71,7 @@ int main(int argc, char** argv) uint32_t h = stoi(params[2]); string modestr = params[3]; - auto pixfmt = FourCCToPixelFormat(modestr); + auto pixfmt = fourcc_str_to_pixel_format(modestr); ifstream is(filename, ifstream::binary); -- cgit v1.2.3