Andreas Cadhalpun
319438e2f2
swscale: save ebx register when it is not available
...
Configure checks if the ebx register can be used for asm and it has to
be saved if and only if this is not the case.
Without this the build fails when configuring with --toolchain=hardened
--disable-pic on i386 using gcc 4.8:
error: PIC register clobbered by '%ebx' in 'asm'
In that case gcc 4.8 reserves the ebx register for the GOT needed for
PIE, so it can't be used in asm directly.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years ago
Michael Niedermayer
d736b52a04
swscale: Drop is9_OR_10BPS() use, its name is not correct
...
Found-by: Luca Barbato
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
f59750641a
swscale: x86: Add some forgotten 12-bit planar YUV cases
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years ago
Michael Niedermayer
328ea6a9a5
swscale: Add input support for 12-bit formats
...
Implemented for AV_PIX_FMT_GBRP12.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years ago
Luca Barbato
2b5b1e1e9b
swscale: Rename is9_OR_10 to match what it does
...
It is used to select functions that work with 9-15bits.
8 years ago
Luca Barbato
e87a501e7d
swscale: Update bitdepth range check
...
Make sure the scaling functions for the 9-15bits are used for
9-15bits bit depths correctly.
8 years ago
Timo Rothenpieler
99882d05a6
swscale: add support for P010LE/BE output
8 years ago
Diego Biurrun
facdfe4080
swscale: Add proper ff_ prefix to init functions
...
They are internal symbols that should not be exported.
based on a patch by Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
8 years ago
Matthieu Bouron
9eb3da2f99
asm: FF_-prefix internal macros used in inline assembly
...
See merge commit '39d6d3618d48625decaff7d9bdbb45b44ef2a805'.
9 years ago
Diego Biurrun
1e9c5bf4c1
asm: FF_-prefix internal macros used in inline assembly
...
These warnings conflict with system macros on Solaris, producing
truckloads of warnings about macro redefinition.
9 years ago
Diego Biurrun
dc40a70c57
Drop unnecessary libavutil/x86/asm.h #includes
9 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Diego Biurrun
0f40c90984
Drop pointless assert.h #includes
9 years ago
Pedro Arthur
6de58b4903
swscale: cleanup unused code
...
Removed previous swscale code under '#ifndef NEW_FILTER'
and removed unused fields of SwsContext
9 years ago
Michael Niedermayer
f6492a2ea8
swscale/x86/output: Fix yuv2planeX_16* with unaligned destination
...
Reviewed-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
d07f6e5f1c
swscale/x86/output: Move code into yuv2planeX_mainloop
...
Reviewed-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Derek Buitenhuis
21f9468402
avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPAT
...
Libav, for some reason, merged this as a public API function. This will
aid in future merges.
A define is left for backwards compat, just in case some person
used it, since it is in a public header.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
9 years ago
Michael Niedermayer
c8a9aaab26
swscale/x86/rgb2rgb_template: Fix planar2x() for short width
...
Fixes: 451b3e0cf956c0bd2f27ed753ac24050/asan_heap-oob_2873c01_3231_7ed10a9464d15f0d57277f5917c566a8.AVI
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Clément Bœsch
e8bc642202
lavu: add AV_CEIL_RSHIFT and use it in various places
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
a066ff89bc
swscale/x86/rgb2rgb_template: Fallback to mmx in interleaveBytes() if the alignment is insufficient for SSE*
...
This also as a sideeffect fixes the non aligned case
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
80bfce35cc
swscale/x86/rgb2rgb_template: Do not crash on misaligend stride
...
Fixes Ticket5013
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Hendrik Leppkes
5d8e836d0e
Replace all remaining occurances of step/depth_minus1 and offset_plus1
9 years ago
Pedro Arthur
62d176de12
swscale: refactor vertical scaler
9 years ago
Pedro Arthur
ed80dec621
swscale: fixed compiler warnings
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Pedro Arthur
e0a3173a94
swscale: refactor horizontal scaling
...
+ split color conversion from scaling
- disabled gamma correction, until it's refactored too
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Kevin Coyle
1262711388
YUV->BGR32 MMX support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
e22edbfd41
swscale/x86/rgb2rgb_template: fix signedness of v in shuffle_bytes_2103_{mmx,mmxext}
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
James Almer
0c15f2f158
swscale/x86/rgb2rgb_template: don't call emms on sse2/avx functions
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
James Almer
910eeab480
swscale/x86/rgb2rgb_template: add missing xmm clobbers
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Nick Lewycky
891df2a1ae
libswscale/x86/hscale_fast_bilinear_simd.c: There's no need to save BX if it's in the clobber list.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Nick Lewycky
48e9f68384
libswscale/x86/hscale_fast_bilinear_simd.c: Include BX in the clobber list on x86_64, because it isn't implicitly included when PIC is on.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
54e64eaf68
swscale/x86/swscale: Fix warning about loosing significant bits in cast
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
3b12335395
swscale/x86/hscale_fast_bilinear_simd: Remove ancient out-commented debug code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
21b30947f2
swscale/x86/hscale_fast_bilinear_simd: Fix variable names in comments
...
Found-by: Nick Lewycky <nlewycky@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ae20682f6b
swscale: Add prefix to updateMMXDitherTables()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
8524558858
swscale/x86/rgb2rgb_template: fix crash with tiny size and nv12 output
...
Fixes Ticket4151
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
4388e78a0f
swscale/x86/rgb2rgb_template: handle the first 2 lines with C in rgb24toyv12_*()
...
This avoids out of array accesses
Should fix Ticket3451
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Kieran Kunhya
b546023b93
swscale: fix yuv2yuvX_8 assembly on x86
...
use_mmx_vfilter check/fix by commiter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vitor Sessak
55d11d277b
swscale/x86: do not expect registers to be preserved across inline ASM blocks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
e96c3b81ca
avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8
...
The rationale is that you have a packed format in form
<greyscale sample> <alpha sample> <greyscale sample> <alpha sample>
and shortening greyscale to 'G' might make one thing about Greenscale instead.
An alias pixel format and color space name are provided for compatibility.
10 years ago
Michael Niedermayer
54cba3f53e
swscale/x86/hscale_fast_bilinear_simd: add inline asm guards
...
Should fix MSVC build
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
d5ee3580d8
sws: move inline asm hscale to MMX_OBJS
...
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
6532a1a828
sws/x86: split mmxext fast bilinear scaler out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
1e3f77b53a
swscale/x86/rgb2rgb_template: fix 1 byte overread in yuyvtoyuv420 and uyvytoyuv420
...
might fix ticket 3410
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
4abffbbc54
swscale/x86/input: prevent RGB32_TO_Y_FN from reading into the padding
...
This avoids reading uninitialized bytes and confusing valgrind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a1a76b209b
swscale/x86/input: prevent RGB32_TO_UV_FN from reading into the padding
...
This avoids reading uninitialized bytes and confusing valgrind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Carl Eugen Hoyos
891307b4d1
s86/scale: Do not return the result of a (void) function from a void function.
...
Fixes compilation with Sun C 5.12.
Reported by Bradley Mitchell in ticket #3649 .
11 years ago
James Almer
345f2234d1
x86/scale: fix xmm register count for hscale*_sse2
...
xmm6 was being clobbered in ff_hscale8to{15,19}_8_sse2 on Win64
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Matt Oliver
1898c2f49d
inline asm: fix arrays as named constraints.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Carl Eugen Hoyos
b38910c979
Fix compilation with !HAVE_6REGS.
...
Can be tested with:
$ ./configure --cc='cc -m32' --disable-optimizations --enable-pic
11 years ago