summaryrefslogtreecommitdiff
path: root/libswscale/utils.c
Commit message (Collapse)AuthorAge
* x86: mmx2 ---> mmxext in function namesDiego Biurrun2012-10-31
|
* x86: mmx2 ---> mmxext in variable namesDiego Biurrun2012-10-31
|
* x86: mmx2 ---> mmxext in comments and messagesDiego Biurrun2012-10-31
|
* pixfmt: support more yuva formatsLuca Barbato2012-10-30
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* swscale: try to use mmap only if availableMans Rullgard2012-10-15
| | | | | | | | | | | | Some systems, e.g. Minix, have sys/mman.h defining MAP_ANONYMOUS without providing (working) mmap and friends. The mmx filter generation code checks only for MAP_ANONYMOUS, not for availability of mmap itself which leads to build errors on aforementioned systems. This changes the conditional compilation to use mmap only if all the required functions are available. Signed-off-by: Mans Rullgard <mans@mansr.com>
* avutil: add yuva422p and yuva444p formatsLuca Barbato2012-10-12
|
* sws: do not use av_pix_fmt_descriptors directly.Anton Khirnov2012-10-12
|
* Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormatAnton Khirnov2012-10-08
|
* swscale: Provide the right alignment for external mmx asmMartin Storsjö2012-09-09
| | | | | | | | | | This reverts parts of e0c6cce4472. There is external mmx asm that requires this alignment. This fixes crashes when using swscale in builds with external mmx, without inline assembly. Signed-off-by: Martin Storsjö <martin@martin.st>
* x86: Replace checks for CPU extensions and flags by convenience macrosDiego Biurrun2012-09-08
| | | | | This separates code relying on inline from that relying on external assembly and fixes instances where the coalesced check was incorrect.
* x86: Split inline and external assembly #ifdefsDiego Biurrun2012-08-31
|
* x86: rename libavutil/x86_cpu.h to libavutil/x86/asm.hMans Rullgard2012-08-09
| | | | | | | This puts x86-specific things in the x86/ subdirectory where they belong. Signed-off-by: Mans Rullgard <mans@mansr.com>
* x86: build: replace mmx2 by mmxextDiego Biurrun2012-08-03
| | | | | | | Refactoring mmx2/mmxext YASM code with cpuflags will force renames. So switching to a consistent naming scheme beforehand is sensible. The name "mmxext" is more official and widespread and also the name of the CPU flag, as reported e.g. by the Linux kernel.
* swscale: Mark all init functions as av_coldDiego Biurrun2012-07-23
|
* swscale: place inline assembly bilinear scaler under HAVE_INLINE_ASM.Ronald S. Bultje2012-07-22
|
* swscale: K&R formatting cosmetics (part II)Diego Biurrun2012-04-13
| | | | Also adjust some comments including wording and typo fixes.
* swscale: make filterPos 32bit.Ronald S. Bultje2012-03-06
| | | | | | | Fixes overflows for large image sizes. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* swscale: fix another integer overflow.Ronald S. Bultje2012-02-29
| | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* swscale: fix another integer overflow at large dimensions/rescales.Ronald S. Bultje2012-02-24
|
* swscale: fix overflows in filterPos[] calculation for large sizes.Ronald S. Bultje2012-02-23
| | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* swscale: fix filtersize clipping.Ronald S. Bultje2012-02-22
| | | | if srcW<=2, clip(x, 1, srcW-2) still allows srcW to be < 1.
* swscale: enforce a minimum filtersize.Ronald S. Bultje2012-02-11
| | | | | | | | | | | At very small dimensions, this calculation could lead to zero-sized filters, which leads to uninitialized output, zero-sized allocations, loop overflows in SIMD that uses do{..}while(i++<filtersize); instead of for(i=0;i<filtersize;i++){..} and several other similar failures. Therefore, require a minimum filtersize of 1. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* cosmetics: Remove extra newlines at EOFAlex Converse2012-01-27
|
* 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: Move static and inline attributes to more standard places.Diego Biurrun2012-01-14
| | | | Fixes several "‘static’ is not at beginning of declaration" warnings.
* swscale: RGB4444 and BGR444 inputPaul B Mahol2012-01-08
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* 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: 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: #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: 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: add support for planar RGB input.Ronald S. Bultje2011-11-24
|
* swscale: add padding to conversion buffer.Sean McGovern2011-11-11
| | | | | | | | | | | | Altivec does unaligned reads from this buffer in hscale_altivec_real(), and can thus read up to 16 bytes beyond the end of the buffer. Therefore, add an extra 16 bytes of padding at the end of the conversion buffer. This fixes fate-lavfi-pixfmts_scale on AltiVec-enabled builds under valgrind. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* swscale: align vertical filtersize by 2 on x86.Ronald S. Bultje2011-11-05
| | | | | | The vertical scaler handles 2 rows at a time and thus requires alignment by 2, or else it'll read invalid memory and result in corrupt output.
* sws/pixfmt/pixdesc: add support for yuv420p9le/be.Ronald S. Bultje2011-10-21
|
* swscale: prevent overflow in coefficient calculation.Ronald S. Bultje2011-10-21
|
* swscale: prevent overflow during initializationRonald Bultje2011-10-18
| | | | Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* sws: support yuv444p9/10 output.Anton Khirnov2011-10-12
|
* swscale: fix byte overreads in SSE-optimized hscale().Ronald S. Bultje2011-09-15
| | | | | | SSE-optimized hScale() scales up to 4 pixels at once, so we need to allocate up to 3 padding pixels to prevent overreads. This fixes valgrind errors in various swscale-tests on fate.
* swscale: use 15-bit intermediates for 9/10-bit scaling.Ronald S. Bultje2011-08-12
|
* lsws: remove optimization debug logs in sws_init_context()Stefano Sabatini2011-08-05
| | | | | | | | | The logged information is possibly false, and it tends to be outdated after each change since the logging code needs to be manually updated. Simplify and prevent confusing wrong debug messages. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* lsws: use array for storing the supported in/out informationStefano Sabatini2011-08-05
| | | | | | | | | Also remove the unnecessary isSupportedIn/Out macros. Make the code more compact/readable, and simplify the access to lsws-specific pixel format information. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Revert "swscale: use 15-bit intermediates for 9/10-bit scaling."Ronald S. Bultje2011-08-02
| | | | | | This reverts commit ac0fb5934893be554a44d2a1eb7a3bc7bf39da4a. It causes valgrind errors which I'll want to investigate before resubmitting this.
* swscale: use 15-bit intermediates for 9/10-bit scaling.Ronald S. Bultje2011-08-02
|
* swscale: mark YUV422P10(LE,BE) as supported for outputJoseph Artsimovich2011-07-21
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* swscale: extend mmx padding.Ronald S. Bultje2011-07-14
| | | | Fixes a crash when forcing libc to strictly adhere to malloc sizes.
* doxygen: Make sure parameter names match between .c and .h files.Diego Biurrun2011-07-14
|
* swscale: rename uv_off/uv_off2 to uv_off_px/byte.Ronald S. Bultje2011-07-08
|
* swscale: fix 16-bit scaling when output is 8-bits.Ronald S. Bultje2011-07-08
| | | | | We would use the second half of the U plane buffer, rather than the V plane buffer, to output the V plane pixels.
* swscale: disable full_chroma_int when converting to non-24/32bpp RGB.Ronald S. Bultje2011-07-02
| | | | | This functionality is only implemented for RGB24/32 and causes crashes otherwise.