From d6d5ef5534d582f9dbaf18ac2605cf5bb72cd821 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 25 Jan 2013 23:05:48 +0100 Subject: sws: GBRP9, GBRP10, and GBRP16 output support Signed-off-by: Michael Niedermayer Signed-off-by: Derek Buitenhuis --- libswscale/utils.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libswscale/utils.c') diff --git a/libswscale/utils.c b/libswscale/utils.c index a65922bdec..b0a4d04dd6 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -164,12 +164,12 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = { [AV_PIX_FMT_YUV444P10BE] = { 1, 1 }, [AV_PIX_FMT_YUV444P10LE] = { 1, 1 }, [AV_PIX_FMT_GBRP] = { 1, 1 }, - [AV_PIX_FMT_GBRP9LE] = { 1, 0 }, - [AV_PIX_FMT_GBRP9BE] = { 1, 0 }, - [AV_PIX_FMT_GBRP10LE] = { 1, 0 }, - [AV_PIX_FMT_GBRP10BE] = { 1, 0 }, - [AV_PIX_FMT_GBRP16LE] = { 1, 0 }, - [AV_PIX_FMT_GBRP16BE] = { 1, 0 }, + [AV_PIX_FMT_GBRP9LE] = { 1, 1 }, + [AV_PIX_FMT_GBRP9BE] = { 1, 1 }, + [AV_PIX_FMT_GBRP10LE] = { 1, 1 }, + [AV_PIX_FMT_GBRP10BE] = { 1, 1 }, + [AV_PIX_FMT_GBRP16LE] = { 1, 1 }, + [AV_PIX_FMT_GBRP16BE] = { 1, 1 }, }; int sws_isSupportedInput(enum AVPixelFormat pix_fmt) @@ -938,7 +938,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, getSubSampleFactors(&c->chrSrcHSubSample, &c->chrSrcVSubSample, srcFormat); getSubSampleFactors(&c->chrDstHSubSample, &c->chrDstVSubSample, dstFormat); - if (dstFormat == AV_PIX_FMT_GBRP) { + if (isPlanarRGB(dstFormat)) { if (!(flags & SWS_FULL_CHR_H_INT)) { av_log(c, AV_LOG_DEBUG, "%s output is not supported with half chroma resolution, switching to full\n", @@ -952,7 +952,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, * chroma interpolation */ if (flags & SWS_FULL_CHR_H_INT && isAnyRGB(dstFormat) && - dstFormat != AV_PIX_FMT_GBRP && + !isPlanarRGB(dstFormat) && dstFormat != AV_PIX_FMT_RGBA && dstFormat != AV_PIX_FMT_ARGB && dstFormat != AV_PIX_FMT_BGRA && -- cgit v1.2.3