diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-03 04:10:11 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2016-10-12 17:39:30 +0200 |
commit | 328ea6a9a5ab3ddeec19939e8a381cf6a704e466 (patch) | |
tree | 0291421b1a4e936641516d13b1a60521de0b496f /libswscale/utils.c | |
parent | 1e93aa69a60815d1407a6c34d8da3f83ab193ad5 (diff) |
swscale: Add input support for 12-bit formats
Implemented for AV_PIX_FMT_GBRP12.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r-- | libswscale/utils.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index b7b534dceb..55b5275e6d 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -184,6 +184,8 @@ static const FormatEntry format_entries[AV_PIX_FMT_NB] = { [AV_PIX_FMT_GBRP9BE] = { 1, 1 }, [AV_PIX_FMT_GBRP10LE] = { 1, 1 }, [AV_PIX_FMT_GBRP10BE] = { 1, 1 }, + [AV_PIX_FMT_GBRP12LE] = { 1, 0 }, + [AV_PIX_FMT_GBRP12BE] = { 1, 0 }, [AV_PIX_FMT_GBRP16LE] = { 1, 0 }, [AV_PIX_FMT_GBRP16BE] = { 1, 0 }, [AV_PIX_FMT_GBRAP] = { 1, 1 }, @@ -1015,6 +1017,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, srcFormat != AV_PIX_FMT_RGB4_BYTE && srcFormat != AV_PIX_FMT_BGR4_BYTE && srcFormat != AV_PIX_FMT_GBRP9BE && srcFormat != AV_PIX_FMT_GBRP9LE && srcFormat != AV_PIX_FMT_GBRP10BE && srcFormat != AV_PIX_FMT_GBRP10LE && + srcFormat != AV_PIX_FMT_GBRP12BE && srcFormat != AV_PIX_FMT_GBRP12LE && srcFormat != AV_PIX_FMT_GBRP16BE && srcFormat != AV_PIX_FMT_GBRP16LE && ((dstW >> c->chrDstHSubSample) <= (srcW >> 1) || (flags & SWS_FAST_BILINEAR))) @@ -1051,7 +1054,7 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, FF_ALLOC_OR_GOTO(c, c->formatConvBuffer, (FFALIGN(srcW, 16) * 2 * FFALIGN(c->srcBpc, 8) >> 3) + 16, fail); - if (INLINE_MMXEXT(cpu_flags) && c->srcBpc == 8 && c->dstBpc <= 10) { + if (INLINE_MMXEXT(cpu_flags) && c->srcBpc == 8 && c->dstBpc <= 12) { c->canMMXEXTBeUsed = (dstW >= srcW && (dstW & 31) == 0 && (srcW & 15) == 0) ? 1 : 0; if (!c->canMMXEXTBeUsed && dstW >= srcW && (srcW & 15) == 0 |