summaryrefslogtreecommitdiff
path: root/libswscale/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 3daa4f4fad..5693291d13 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -1208,6 +1208,16 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
flags |= SWS_FULL_CHR_H_INT;
c->flags = flags;
}
+
+ if ( c->chrSrcHSubSample == 0
+ && c->chrSrcVSubSample == 0
+ && c->dither != SWS_DITHER_BAYER //SWS_FULL_CHR_H_INT is currently not supported with SWS_DITHER_BAYER
+ && !(c->flags & SWS_FAST_BILINEAR)
+ ) {
+ av_log(c, AV_LOG_DEBUG, "Forcing full internal H chroma due to input having non subsampled chroma\n");
+ flags |= SWS_FULL_CHR_H_INT;
+ c->flags = flags;
+ }
}
if (c->dither == SWS_DITHER_AUTO) {