summaryrefslogtreecommitdiff
path: root/libswscale
Commit message (Collapse)AuthorAge
* cosmetics: Remove extra newlines at EOFAlex Converse2012-01-27
|
* swscale: convert rgb/bgr24ToY/UV_mmx functions from inline asm to yasm.Ronald S. Bultje2012-01-27
| | | | Also implement sse2/ssse3/avx versions.
* config.asm: change %ifdef directives to %if directives.Ronald S. Bultje2012-01-27
| | | | This allows combining multiple conditionals in a single statement.
* Revert "sws/pixfmt/pixdesc: add support for yuva444p"Alex Converse2012-01-26
| | | | | | This reverts commit fc115c80b7bf6f1f5a937ee7f6e14630d99eb4dd. Tests are broken.
* sws/pixfmt/pixdesc: add support for yuva444pPaul B Mahol2012-01-27
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* cosmetics: Remove some unnecessary block braces.Diego Biurrun2012-01-25
|
* cosmetics: Move static and inline attributes to more standard places.Diego Biurrun2012-01-14
| | | | Fixes several "‘static’ is not at beginning of declaration" warnings.
* swscale: change yuv2yuvX code to use cpuflag().Ronald S. Bultje2012-01-13
|
* rgb2rgb: rgb12to15()Paul B Mahol2012-01-12
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* swscale-test: fix stack overread.Ronald S. Bultje2012-01-12
| | | | | Fixes problems in swscale-test where it gives a 3-member array to a function expecting a 4-member array.
* swscale: fix invalid conversions and memory problems.Ronald S. Bultje2012-01-12
| | | | | | | | | | Fixes problems where rgbToRgbWrapper() is called even though it doesn't support this particular conversion (e.g. converting from RGB444 to anything). Thirdly, fixes issues where rgbToRgbWrapper() is called for non-native endiannness conversions (e.g. RGB555BE on a LE system). Fourthly, fixes crashes when converting from e.g. monowhite to monowhite, which calls planarCopyWrapper() and overwrites/reads because n_bytes != n_pixels.
* rgb2rgb: rgb12tobgr12()Paul B Mahol2012-01-11
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* swscale: fix crash in fast_bilinear code when compiled with -mred-zone.Ronald S. Bultje2012-01-10
| | | | | | | Additional comments from Måns Rullgard have been integrated by Reinhard Tartler. Signed-off-by: Reinhard Tartler <siretart@tauware.de>
* swscale: specify register type.Oka Motofumi2012-01-10
| | | | | | Fixes a compilation failure on win64. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* rgb2rgb: allow conversion for <15 bppPaul B Mahol2012-01-09
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* swscale: RGB4444 and BGR444 inputPaul B Mahol2012-01-08
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* swscale: convert yuy2/uyvy/nv12/nv21ToY/UV from inline asm to yasm.Ronald S. Bultje2012-01-08
| | | | Also implement SSE2/AVX variants.
* swscale: K&R formatting cosmetics for code examplesDiego Biurrun2012-01-08
|
* swscale: K&R reformatting cosmetics for header filesDiego Biurrun2012-01-08
|
* swscale: remove unused U/V arguments from yuv2rgb_write().Ronald S. Bultje2012-01-05
| | | | Also document the function somewhat.
* swscale: Use standard multiple inclusion guards in ppc/ header files.Diego Biurrun2012-01-04
|
* swscale: remove obsolete comment.Ronald S. Bultje2012-01-03
|
* swscale: split scale.asm.Ronald S. Bultje2012-01-03
| | | | | scale.asm keeps horizontal scaling functions, whereas output.asm gets the vertical scaling/output functions.
* swscale: don't show full-chroma-int warning for non-RGB output.Ronald S. Bultje2012-01-03
| | | | Non-RGB output always uses full chroma interpolation.
* swscale: add MMX files to MMX-OBJS instead of OBJS.Ronald S. Bultje2012-01-03
|
* Drop some pointless void* return value casts from av_malloc() invocations.Diego Biurrun2012-01-02
|
* swscale: prevent invalid writes in packed_16bpc_bswapJanne Grunau2011-12-26
| | | | | Writes past the end of the destination buffer were occuring when its stride was smaller than the stride of the source. Fixes Bug #183.
* sws: readd PAL8 to isPacked()Anton Khirnov2011-12-22
| | | | Fixes PAL8 to YUV conversion.
* swscale: fix formatting and indentation of unscaled conversion routines.Nathan Adil Maxson2011-12-18
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* swscale: fix overflows in vertical scaling at top/bottom edges.Ronald S. Bultje2011-12-18
| | | | | | | | | | | | | | | | | | | | | | This fixes integer multiplication overflows in RGB48 output (vertical) scaling as detected by IOC. What happens is that for certain types of filters (lanczos, spline, bicubic), the intermediate sum of coefficients in the middle of a filter can be larger than the fixed-point equivalent of 1.0, even if the final sum is 1.0. This is fine and we support that. However, at frame edges, initFilter() will merge the coefficients for the off-screen pixels into the top or bottom pixel, such as to emulate edge extension. This means that suddenly, a single coefficient can be larger than the fixed-point equivalent of 1.0, which the vertical scaling routines do not support. Therefore, remove the merging of coefficients for edges for the vertical scaling filter, and instead add edge detection to the scaler itself so that it copies the pointers (not data) for the edges (i.e. it uses line[0] for line[-1] as well), so that a single coefficient is never larger than the fixed-point equivalent of 1.0.
* swscale: fix overflow in gray16 vertical scaling.Ronald S. Bultje2011-12-17
| | | | | | | | | | This fixes the same overflow as in the RGB48/16-bit YUV scaling; some filters can overflow both negatively and positively (e.g. spline/lanczos), so we bias a signed integer so it's "half signed" and "half unsigned", and can cover overflows in both directions while maintaining full 31-bit depth. Signed-off-by: Mans Rullgard <mans@mansr.com>
* swscale: fix integer overflows in RGB pixel writing.Mans Rullgard2011-12-17
| | | | | | | | We're shifting individual components (8-bit, unsigned) left by 24, so making them unsigned should give the same results without the overflow. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* swscale: add endian conversion for RGB555 and RGB444 pixel formatsJanne Grunau2011-12-17
| | | | Add a macro to shorten the if condition.
* swscale: fix overflows in output of RGB48 pixels.Ronald S. Bultje2011-12-17
| | | | | | | | | | | | | | For certain types of filters where the intermediate sum of coefficients can go above the fixed-point equivalent of 1.0 in the middle of a filter, the sum of a 31-bit calculation can overflow in both directions and can thus not be represented in a 32-bit signed or unsigned integer. To work around this, we subtract 0x40000000 from a signed integer base, so that we're halfway signed/unsigned, which makes it fit even if it overflows. After the filter finishes, we add the scaled bias back after a shift. We use the same trick for 16-bit bpc YUV output routines. Signed-off-by: Mans Rullgard <mans@mansr.com>
* swscale: add rgb565 endianess conversionJanne Grunau2011-12-17
|
* swscale: fix overflows in RGB rounding constants.Ronald S. Bultje2011-12-17
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* swscale: add unscaled packed 16 bit per component endianess conversionJanne Grunau2011-12-16
|
* swscale_mmx: drop no longer required parameters from VSCALEX macrosDiego Biurrun2011-12-14
|
* swscale: Mark yuv2planeX_8_mmx as MMX2; it contains MMX2 instructions.Diego Biurrun2011-12-14
|
* build: move inclusion of subdir.mak to main subdir loopMans Rullgard2011-12-13
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* doxygen: misc consistency, spelling and wording fixesDiego Biurrun2011-12-12
|
* Remove extraneous semicolonsMans Rullgard2011-12-11
| | | | | | These semicolons cause invalid empty top-level declarations. Signed-off-by: Mans Rullgard <mans@mansr.com>
* swscale: #include "libavutil/mathematics.h"Reinhard Tartler2011-12-01
| | | | | | | | this file uses the M_PI macro since 4e74187db2f5db52f88729efc662df9d6bc763e1, so include the correct header directly. Signed-off-by: Reinhard Tartler <siretart@tauware.de>
* swscale: fix signed overflow in yuv2mono_X_c_templateMans Rullgard2011-11-26
| | | | | | | | As old bits are shifted out of the accumulator, they cause signed overflows when they reach the end. Making the variable unsigned fixes this. Signed-off-by: Mans Rullgard <mans@mansr.com>
* swscale: Readd #define _SVID_SOURCEMartin Storsjö2011-11-25
| | | | | | | | | | | | | | | | | This was removed erroneously in 046f081b46c8479820409cf8f530b988221bd15b. This define still is necessary for getting MAP_ANONYMOUS defined on linux/glibc, despite the define reshuffling done in that commit. Without MAP_ANONYMOUS defined, the mprotect calls for setting the generated mmx2 scaler code pages executable are left out, causing crashes if that codepath is chosen. This patch fixes scaling from 192x144 to 320x240 with -sws_flags fast_bilinear, which crashes on linux at the moment. Signed-off-by: Martin Storsjö <martin@martin.st>
* swscale: fix failing fate tests.Ronald S. Bultje2011-11-24
| | | | isGray() is left as a FIXME for later.
* swscale: add support for planar RGB input.Ronald S. Bultje2011-11-24
|
* Clean up swscale pixfmt macros using av_pix_fmt_descriptors[].Ronald S. Bultje2011-11-24
|
* swscale: Fix stack alignment for SSEJohn Stebbins2011-11-19
| | | | | | | | Although gcc guarantees 16 byte stack alignment, threads under WinXP don't appear to be guaranteed to start stack aligned. So fix the alignment. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* swscale: handle unaligned buffers in yuv2plane1Ronald S. Bultje2011-11-13
| | | | | | | The issue had been introduced in c435653627529e22d74214c2266f571255e404d6 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>