Commit Graph

336 Commits

Author SHA1 Message Date
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>
2016-12-21 01:26:10 +01:00
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>
2016-11-10 00:33:12 +01:00
Timo Rothenpieler 99882d05a6 swscale: add support for P010LE/BE output 2016-08-31 13:19:46 +02:00
Matthieu Bouron 9eb3da2f99 asm: FF_-prefix internal macros used in inline assembly
See merge commit '39d6d3618d48625decaff7d9bdbb45b44ef2a805'.
2016-06-27 17:21:18 +02:00
Hendrik Leppkes c142dc203e Merge commit 'dc40a70c5755bccfb1a1349639943e1f408bea50'
* commit 'dc40a70c5755bccfb1a1349639943e1f408bea50':
  Drop unnecessary libavutil/x86/asm.h #includes

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-06-26 15:53:00 +02:00
Clément Bœsch 8ef57a0d61 Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
  cosmetics: Fix spelling mistakes

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Diego Biurrun dc40a70c57 Drop unnecessary libavutil/x86/asm.h #includes 2016-05-28 19:18:26 +02:00
Vittorio Giovara 41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Diego Biurrun 0f40c90984 Drop pointless assert.h #includes 2016-05-03 15:45:10 +02:00
Pedro Arthur 6de58b4903 swscale: cleanup unused code
Removed previous swscale code under '#ifndef NEW_FILTER'
and removed unused fields of SwsContext
2016-03-31 16:36:16 -03:00
Michael Niedermayer f6492a2ea8 swscale/x86/output: Fix yuv2planeX_16* with unaligned destination
Reviewed-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-17 04:47:51 +01:00
Michael Niedermayer d07f6e5f1c swscale/x86/output: Move code into yuv2planeX_mainloop
Reviewed-by: BBB
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-17 04:47:34 +01:00
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>
2016-01-27 16:36:46 +00:00
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>
2016-01-17 12:34:34 +01:00
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>
2016-01-11 15:32:56 -05:00
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>
2015-12-15 03:06:33 +01:00
Michael Niedermayer 80bfce35cc swscale/x86/rgb2rgb_template: Do not crash on misaligend stride
Fixes Ticket5013

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-15 02:32:23 +01:00
Hendrik Leppkes 5d8e836d0e Replace all remaining occurances of step/depth_minus1 and offset_plus1 2015-09-08 17:10:48 +02:00
Pedro Arthur 62d176de12 swscale: refactor vertical scaler 2015-08-19 10:43:52 -03:00
Pedro Arthur ed80dec621 swscale: fixed compiler warnings
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-18 22:56:50 +02:00
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>
2015-08-18 01:33:32 +02:00
Kevin Coyle 1262711388 YUV->BGR32 MMX support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-04 00:03:45 +02:00
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>
2015-06-23 13:28:09 -03:00
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>
2015-06-23 13:28:03 -03:00
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>
2015-06-23 13:27:56 -03:00
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>
2015-05-13 11:59:30 +02:00
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>
2015-05-13 11:59:12 +02:00
Michael Niedermayer 54e64eaf68 swscale/x86/swscale: Fix warning about loosing significant bits in cast
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-10 15:09:04 +02:00
Michael Niedermayer 3b12335395 swscale/x86/hscale_fast_bilinear_simd: Remove ancient out-commented debug code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-07 23:58:08 +02:00
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>
2015-05-07 03:57:21 +02:00
Michael Niedermayer ae20682f6b swscale: Add prefix to updateMMXDitherTables()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-27 19:23:46 +01:00
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>
2014-12-03 20:21:56 +01:00
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>
2014-11-20 01:20:31 +01:00
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>
2014-11-09 23:52:17 +01:00
Vitor Sessak 55d11d277b swscale/x86: do not expect registers to be preserved across inline ASM blocks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-18 00:03:29 +02:00
Michael Niedermayer 4c8bc6fdee Merge commit 'e96c3b81cadd0ba84d43b1f3a54980df3785d9a5'
* commit 'e96c3b81cadd0ba84d43b1f3a54980df3785d9a5':
  avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8

Conflicts:
	libavcodec/libopenjpegdec.c
	libavcodec/libopenjpegenc.c
	libavcodec/raw.c
	libavutil/pixdesc.c
	libavutil/pixfmt.h
	libavutil/version.h
	libswscale/swscale_internal.h
	libswscale/swscale_unscaled.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 21:48:00 +02:00
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.
2014-08-04 12:55:08 +01:00
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>
2014-07-19 13:26:36 +02:00
Michael Niedermayer d5ee3580d8 sws: move inline asm hscale to MMX_OBJS
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-19 05:53:42 +02:00
Michael Niedermayer 6532a1a828 sws/x86: split mmxext fast bilinear scaler out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-19 05:36:27 +02:00
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>
2014-07-13 05:48:09 +02:00
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>
2014-06-22 03:09:28 +02:00
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>
2014-06-22 02:32:30 +02:00
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.
2014-06-19 18:45:13 +02:00
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>
2014-06-09 04:13:23 +02:00
Matt Oliver 1898c2f49d inline asm: fix arrays as named constraints.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-07 15:02:45 +02:00
Carl Eugen Hoyos b38910c979 Fix compilation with !HAVE_6REGS.
Can be tested with:
$ ./configure --cc='cc -m32' --disable-optimizations --enable-pic
2014-04-19 09:56:01 +02:00
Lukasz Marek fbf05759e3 sws: fix warning about RGB_PACK24_B_OPERANDS redefinition
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 02:07:07 +02:00
Michael Niedermayer f6759d9ad4 swscale/x86/swscale_template: loose hardcoded dstw_offset
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-08 18:39:39 +02:00
Michael Niedermayer 0371eaebcd Merge commit 'aba70bb5387f12dfa5e6cd8cb861c9c7e668151f'
* commit 'aba70bb5387f12dfa5e6cd8cb861c9c7e668151f':
  Add missing headers to make template files compile (more) standalone

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-26 14:50:55 +01:00