summaryrefslogtreecommitdiff
path: root/libswscale/utils.c
Commit message (Collapse)AuthorAge
...
* 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.
* swscale: for >8bit scaling, read in native bit-depth.Ronald S. Bultje2011-07-01
| | | | | | For 9/10bit, it means we don't have to upscale to 16bit before actual scaling or pixel format conversion, and thus a performance gain.
* swscale: implement >8bit scaling support.Ronald S. Bultje2011-06-29
| | | | | | This means that precision is retained when scaling between sample formats with >8 bits per component (48bit RGB, 16bit grayscale, 9/10/16bit YUV).
* swscale: re-add support for non-native endianness.Ronald S. Bultje2011-06-27
| | | | This works through some non-obvious hacks in utils.c.
* swscale: use SwsContext for av_log when availableJanne Grunau2011-06-15
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* libavutil/swscale: YUV444P10/YUV444P9 support.Ronald S. Bultje2011-06-10
| | | | | | | Also add missing glue code for recently added YUV422P10 formats to swscale. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* swscale: de-macro'ify RGB15/16/32 input functions.Ronald S. Bultje2011-06-09
| | | | | | | | Inline functions are easier to read, maintain, modify and test, which justifies the slightly increased source size. This patch also adds support for non-native endianness RGB15/16 and fixes isSupportedOutput() to no longer claim that we support writing non-native RGB565/555/444.
* swscale: allocate larger buffer to handle altivec overreads.Ronald S. Bultje2011-06-02
| | | | | Altivec sws code intentionally overreads buffers for better performance, so we need to allocate larger buffers to handle that.
* swscale: fix crash in bilinear scaling.Ronald S. Bultje2011-05-28
|
* swscale: delay allocation of formatConvBuffer().Ronald S. Bultje2011-05-27
| | | | | That means it won't be allocated when not needed. Alongside this, it fixes valgrind/fate-detected memory leaks.
* swscale: remove VOF/VOFW.Ronald S. Bultje2011-05-26
|
* swscale: split chroma buffers into separate U/V planes.Ronald S. Bultje2011-05-26
| | | | Preparatory step to implement support for sizes > VOFW.
* swscale: replace formatConvBuffer[VOF] by allocated array.Ronald S. Bultje2011-05-26
| | | | | This allows to convert between formats of arbitrary width, regardless of the value of VOF/VOFW.
* swscale: Remove commented-out printf cruft.Diego Biurrun2011-05-26
|
* swscale: use emms_c().Ronald S. Bultje2011-05-24
|
* swscale: force --enable-runtime-cpudetect and remove SWS_CPU_CAPS_*.Ronald S. Bultje2011-05-24
|
* configure: Do not unconditionally add -D_POSIX_C_SOURCE to CPPFLAGS.Diego Biurrun2011-05-12
| | | | | | | | | | | | | | | | Adding _POSIX_C_SOURCE to CPPFLAGS globally produces all sorts of problems since it causes certain system functions to be hidden on some (BSD) systems. The solution is to only add the flag on systems that really require it, i.e. glibc-based ones. This change makes BSD systems compile out-of-the-box without the need for adding specific flags manually. It also allows dropping a number of flags set manually on a file-per-file basis, but were only present to work around breakage introduced by the presence of _POSIX_C_SOURCE. Also add _XOPEN_SOURCE to CPPFLAGS for glibc systems. We use XSI extensions in several places already, so it is preferable to define it globally instead of littering source files with individual #defines only needed for glibc.
* swscale: fix YUV420P 9/10bit support.Ronald S. Bultje2011-05-11
| | | | | | | Fix handling of input if not in native endianness, and add support for 9/10-bit output. This allows us to force endianness of YUV420P 9/10bit in the H264/10bit fate tests, which should fix them on big-endian systems.
* Add pixel formats for 9- and 10-bit yuv420p.Oskar Arvidsson2011-05-10
| | | | | | | | Also add support for these formats in libswscale. Needed for high bit depth h264 decoding. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* libswcale: PIX_FMT_BGR48LE and PIX_FMT_BGR48BE scaler implementationPeter Ross2011-04-28
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* sws: remove disabled cruft.Anton Khirnov2011-04-19
|
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_*Janne Grunau2011-03-16
|
* replace FFMPEG with LIBAV in FFMPEG_CONFIGURATIONJanne Grunau2011-03-16
| | | | also update the multiple inclusion guards in config.h|mak
* Store src/dstFormat after calling handle_jpegMartin Storsjö2010-10-29
| | | | | | | | | | | handle_jpeg may update the src/dstFormat variables, this makes sure the updated version is stored in the context. This fixes roundup issue 2302. Patch by Troot, all_crap_goes_here at hotmail Originally committed as revision 32562 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale