- /* We're blending BGRA images; first byte is blue, second byte is green, third byte red, fourth byte alpha */
- DCPOMATIC_ASSERT (other->pixel_format() == AV_PIX_FMT_BGRA);
+ /* We're blending RGBA or BGRA images */
+ DCPOMATIC_ASSERT (other->pixel_format() == AV_PIX_FMT_BGRA || other->pixel_format() == AV_PIX_FMT_RGBA);
+ int const blue = other->pixel_format() == AV_PIX_FMT_BGRA ? 0 : 2;
+ int const red = other->pixel_format() == AV_PIX_FMT_BGRA ? 2 : 0;
+