[FFmpeg-cvslog] swscale/utils: Use full chroma interpolation for rgb4/8 and dither none

Michael Niedermayer git at videolan.org
Fri Jul 9 16:19:50 EEST 2021


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Jul  8 13:18:34 2021 +0200| [fa1e158ef648cc080c5c46a620d2d6aaad72ea06] | committer: Michael Niedermayer

swscale/utils: Use full chroma interpolation for rgb4/8 and dither none

Dither none is only implemented in full chroma interpolation for these rgb formats
Its also a obscure choice (producing less nice images) that implementing it in the
other code-paths makes no sense

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libswscale/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswscale/utils.c b/libswscale/utils.c
index 3836e20779..176fc6fd63 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1330,7 +1330,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
         if (c->dither == SWS_DITHER_AUTO)
             c->dither = (flags & SWS_FULL_CHR_H_INT) ? SWS_DITHER_ED : SWS_DITHER_BAYER;
         if (!(flags & SWS_FULL_CHR_H_INT)) {
-            if (c->dither == SWS_DITHER_ED || c->dither == SWS_DITHER_A_DITHER || c->dither == SWS_DITHER_X_DITHER) {
+            if (c->dither == SWS_DITHER_ED || c->dither == SWS_DITHER_A_DITHER || c->dither == SWS_DITHER_X_DITHER || c->dither == SWS_DITHER_NONE) {
                 av_log(c, AV_LOG_DEBUG,
                     "Desired dithering only supported in full chroma interpolation for destination format '%s'\n",
                     av_get_pix_fmt_name(dstFormat));



More information about the ffmpeg-cvslog mailing list