[FFmpeg-cvslog] swscale/output: use isSwappedChroma

rcombs git at videolan.org
Wed Jan 5 03:41:21 EET 2022


ffmpeg | branch: master | rcombs <rcombs at rcombs.me> | Thu Dec 23 03:52:33 2021 -0600| [df9180d8a072ac86ced8930a5d6bd0e61e314749] | committer: rcombs

swscale/output: use isSwappedChroma

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=df9180d8a072ac86ced8930a5d6bd0e61e314749
---

 libswscale/output.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libswscale/output.c b/libswscale/output.c
index 90f5efa16e..773f3ce059 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -429,8 +429,7 @@ static void yuv2nv12cX_c(enum AVPixelFormat dstFormat, const uint8_t *chrDither,
 {
     int i;
 
-    if (dstFormat == AV_PIX_FMT_NV12 ||
-        dstFormat == AV_PIX_FMT_NV24)
+    if (!isSwappedChroma(dstFormat))
         for (i=0; i<chrDstW; i++) {
             int u = chrDither[i & 7] << 12;
             int v = chrDither[(i + 3) & 7] << 12;



More information about the ffmpeg-cvslog mailing list