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/x86 | |
parent | 1e93aa69a60815d1407a6c34d8da3f83ab193ad5 (diff) | |
download | ffmpeg-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.c | 3 | ||||
-rw-r--r-- | libswscale/x86/swscale_template.c | 2 |
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) { |