aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/x86
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-03 04:10:11 +0200
committerLuca Barbato <lu_zero@gentoo.org>2016-10-12 17:39:30 +0200
commit328ea6a9a5ab3ddeec19939e8a381cf6a704e466 (patch)
tree0291421b1a4e936641516d13b1a60521de0b496f /libswscale/x86
parent1e93aa69a60815d1407a6c34d8da3f83ab193ad5 (diff)
downloadffmpeg-328ea6a9a5ab3ddeec19939e8a381cf6a704e466.tar.gz
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/x86')
-rw-r--r--libswscale/x86/swscale.c3
-rw-r--r--libswscale/x86/swscale_template.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c
index 48b5b49ce8..326f824d3e 100644
--- a/libswscale/x86/swscale.c
+++ b/libswscale/x86/swscale.c
@@ -324,6 +324,9 @@ av_cold void ff_sws_init_swscale_x86(SwsContext *c)
} else if (c->srcBpc == 10) { \
hscalefn = c->dstBpc <= 15 ? ff_hscale10to15_ ## filtersize ## _ ## opt2 : \
ff_hscale10to19_ ## filtersize ## _ ## opt1; \
+ } else if (c->srcBpc == 12) { \
+ hscalefn = c->dstBpc <= 15 ? ff_hscale16to15_ ## filtersize ## _ ## opt2 : \
+ ff_hscale16to19_ ## filtersize ## _ ## opt1; \
} else if (c->srcBpc == 16) { \
hscalefn = c->dstBpc <= 15 ? ff_hscale16to15_ ## filtersize ## _ ## opt2 : \
ff_hscale16to19_ ## filtersize ## _ ## opt1; \
diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c
index e0d1abe207..5160cbde84 100644
--- a/libswscale/x86/swscale_template.c
+++ b/libswscale/x86/swscale_template.c
@@ -1619,7 +1619,7 @@ static av_cold void RENAME(sws_init_swscale)(SwsContext *c)
}
}
- if (c->srcBpc == 8 && c->dstBpc <= 10) {
+ if (c->srcBpc == 8 && c->dstBpc <= 12) {
// Use the new MMX scaler if the MMXEXT one can't be used (it is faster than the x86 ASM one).
#if COMPILE_TEMPLATE_MMXEXT
if (c->flags & SWS_FAST_BILINEAR && c->canMMXEXTBeUsed) {