From 81dc813cda9ace9951e0aabb835bdfff098da2de Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 28 Nov 2023 00:33:22 +0100 Subject: Support YUV422P9LE in alpha_blend() (#2671). --- src/lib/image.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/image.cc') diff --git a/src/lib/image.cc b/src/lib/image.cc index 6feea10ca..2588d9f21 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -862,7 +862,7 @@ alpha_blend_onto_yuv420p10(TargetParams const& target, OtherParams const& other, static void -alpha_blend_onto_yuv422p10le(TargetParams const& target, OtherParams const& other, uint8_t* const* alpha_data, int const* alpha_stride) +alpha_blend_onto_yuv422p9or10le(TargetParams const& target, OtherParams const& other, uint8_t* const* alpha_data, int const* alpha_stride) { auto const ts = target.size; auto const os = other.size; @@ -1006,12 +1006,13 @@ Image::alpha_blend (shared_ptr other, Position position) alpha_blend_onto_yuv420p10(target_params, other_params, other->data(), other->stride()); break; } + case AV_PIX_FMT_YUV422P9LE: case AV_PIX_FMT_YUV422P10LE: { auto yuv = other->convert_pixel_format (dcp::YUVToRGB::REC709, _pixel_format, Alignment::COMPACT, false); other_params.data = yuv->data(); other_params.stride = yuv->stride(); - alpha_blend_onto_yuv422p10le(target_params, other_params, other->data(), other->stride()); + alpha_blend_onto_yuv422p9or10le(target_params, other_params, other->data(), other->stride()); break; } default: -- cgit v1.2.3