summaryrefslogtreecommitdiff
path: root/libswscale/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 9508413664..4047fb57ee 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -145,19 +145,35 @@ static const FormatEntry format_entries[PIX_FMT_NB] = {
[PIX_FMT_YUV420P9LE] = { 1, 1 },
[PIX_FMT_YUV420P10BE] = { 1, 1 },
[PIX_FMT_YUV420P10LE] = { 1, 1 },
+ [PIX_FMT_YUV420P12BE] = { 1, 1 },
+ [PIX_FMT_YUV420P12LE] = { 1, 1 },
+ [PIX_FMT_YUV420P14BE] = { 1, 1 },
+ [PIX_FMT_YUV420P14LE] = { 1, 1 },
[PIX_FMT_YUV422P9BE] = { 1, 1 },
[PIX_FMT_YUV422P9LE] = { 1, 1 },
[PIX_FMT_YUV422P10BE] = { 1, 1 },
[PIX_FMT_YUV422P10LE] = { 1, 1 },
+ [PIX_FMT_YUV422P12BE] = { 1, 1 },
+ [PIX_FMT_YUV422P12LE] = { 1, 1 },
+ [PIX_FMT_YUV422P14BE] = { 1, 1 },
+ [PIX_FMT_YUV422P14LE] = { 1, 1 },
[PIX_FMT_YUV444P9BE] = { 1, 1 },
[PIX_FMT_YUV444P9LE] = { 1, 1 },
[PIX_FMT_YUV444P10BE] = { 1, 1 },
[PIX_FMT_YUV444P10LE] = { 1, 1 },
+ [PIX_FMT_YUV444P12BE] = { 1, 1 },
+ [PIX_FMT_YUV444P12LE] = { 1, 1 },
+ [PIX_FMT_YUV444P14BE] = { 1, 1 },
+ [PIX_FMT_YUV444P14LE] = { 1, 1 },
[PIX_FMT_GBRP] = { 1, 0 },
[PIX_FMT_GBRP9LE] = { 1, 0 },
[PIX_FMT_GBRP9BE] = { 1, 0 },
[PIX_FMT_GBRP10LE] = { 1, 0 },
[PIX_FMT_GBRP10BE] = { 1, 0 },
+ [PIX_FMT_GBRP12LE] = { 1, 0 },
+ [PIX_FMT_GBRP12BE] = { 1, 0 },
+ [PIX_FMT_GBRP14LE] = { 1, 0 },
+ [PIX_FMT_GBRP14BE] = { 1, 0 },
[PIX_FMT_GBRP16LE] = { 1, 0 },
[PIX_FMT_GBRP16BE] = { 1, 0 },
};
@@ -1006,7 +1022,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
dst_stride <<= 1;
FF_ALLOC_OR_GOTO(c, c->formatConvBuffer, FFALIGN(srcW*2+78, 16) * 2, fail);
if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2 &&
- c->srcBpc == 8 && c->dstBpc <= 10) {
+ c->srcBpc == 8 && c->dstBpc <= 14) {
c->canMMX2BeUsed = (dstW >= srcW && (dstW & 31) == 0 &&
(srcW & 15) == 0) ? 1 : 0;
if (!c->canMMX2BeUsed && dstW >= srcW && (srcW & 15) == 0
@@ -1036,7 +1052,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
c->chrXInc += 20;
}
// we don't use the x86 asm scaler if MMX is available
- else if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX && c->dstBpc <= 10) {
+ else if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX && c->dstBpc <= 14) {
c->lumXInc = ((int64_t)(srcW - 2) << 16) / (dstW - 2) - 20;
c->chrXInc = ((int64_t)(c->chrSrcW - 2) << 16) / (c->chrDstW - 2) - 20;
}
@@ -1207,7 +1223,7 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
// try to avoid drawing green stuff between the right end and the stride end
for (i = 0; i < c->vChrBufSize; i++)
if(av_pix_fmt_descriptors[c->dstFormat].comp[0].depth_minus1 == 15){
- av_assert0(c->dstBpc > 10);
+ av_assert0(c->dstBpc > 14);
for(j=0; j<dst_stride/2+1; j++)
((int32_t*)(c->chrUPixBuf[i]))[j] = 1<<18;
} else