aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-09 18:43:42 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-10-10 17:28:59 +0200
commita830915b78e2d96f08dc93b2d1c4330448b83ffd (patch)
treebee9f65e3acc668c8ac47c2849c6a0a016027aaf /libswscale/utils.c
parentd1d875d301384c9f9ad33fa1d35ae17f07f7abbe (diff)
downloadffmpeg-a830915b78e2d96f08dc93b2d1c4330448b83ffd.tar.gz
swscale: Use full resolution chroma for yuv2rgb when the input has full chroma
See Ticket3028 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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) {