summaryrefslogtreecommitdiff
path: root/libswscale/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-25 21:51:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-26 06:11:52 +0100
commit61884d19852163f5a4cdf993722b1c290f270300 (patch)
tree8e44b5c49cf70808d23f99ca18349af84c3cce83 /libswscale/utils.c
parentc8f25cafd2f23662bcb1e62965c0c42d6989688a (diff)
sws: GBRP output support
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index e96f255255..9e2dfc0bb0 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -185,7 +185,7 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = {
[AV_PIX_FMT_YUV444P12LE] = { 1, 1 },
[AV_PIX_FMT_YUV444P14BE] = { 1, 1 },
[AV_PIX_FMT_YUV444P14LE] = { 1, 1 },
- [AV_PIX_FMT_GBRP] = { 1, 0 },
+ [AV_PIX_FMT_GBRP] = { 1, 1 },
[AV_PIX_FMT_GBRP9LE] = { 1, 0 },
[AV_PIX_FMT_GBRP9BE] = { 1, 0 },
[AV_PIX_FMT_GBRP10LE] = { 1, 0 },
@@ -1019,11 +1019,21 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter,
c->flags = flags;
}
}
+ if(dstFormat == AV_PIX_FMT_GBRP) {
+ 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",
+ av_get_pix_fmt_name(dstFormat));
+ flags |= SWS_FULL_CHR_H_INT;
+ c->flags = flags;
+ }
+ }
/* reuse chroma for 2 pixels RGB/BGR unless user wants full
* chroma interpolation */
if (flags & SWS_FULL_CHR_H_INT &&
isAnyRGB(dstFormat) &&
+ dstFormat != AV_PIX_FMT_GBRP &&
dstFormat != AV_PIX_FMT_RGBA &&
dstFormat != AV_PIX_FMT_ARGB &&
dstFormat != AV_PIX_FMT_BGRA &&