From dd30f2658a616a05c63f816fbf7757f986f945b5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 14 Apr 2020 00:28:44 +0200 Subject: zimg: fix swapped chroma planes with packed YUV bullshit I must have messed this up when I actually added the Y210 format (because that one is correct). So my comment in the commit adding this about the FFmpeg pixfmt doxygen being wrong was wrong. I'd like to use this opportunity to complain once more about the existence of these terrible pixel formats. --- video/zimg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/video/zimg.c b/video/zimg.c index f4f38f8b89..1ce73b6f2c 100644 --- a/video/zimg.c +++ b/video/zimg.c @@ -627,15 +627,15 @@ struct fringe_yuv422_repacker { enum AVPixelFormat avfmt; // In bits (depth/8 rounded up gives byte size) int8_t depth; - // Word index of each sample: {y0, y1, cr, cb} + // Word index of each sample: {y0, y1, cb, cr} uint8_t comp[4]; bool be; }; static const struct fringe_yuv422_repacker fringe_yuv422_repackers[] = { - {AV_PIX_FMT_YUYV422, 8, {0, 2, 3, 1}}, - {AV_PIX_FMT_UYVY422, 8, {1, 3, 2, 0}}, - {AV_PIX_FMT_YVYU422, 8, {0, 2, 1, 3}}, + {AV_PIX_FMT_YUYV422, 8, {0, 2, 1, 3}}, + {AV_PIX_FMT_UYVY422, 8, {1, 3, 0, 2}}, + {AV_PIX_FMT_YVYU422, 8, {0, 2, 3, 1}}, #ifdef AV_PIX_FMT_Y210 {AV_PIX_FMT_Y210LE, 10, {0, 2, 1, 3}}, {AV_PIX_FMT_Y210BE, 10, {0, 2, 1, 3}, .be = true}, -- cgit v1.2.3