Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-12-19swscale: fix formatting and indentation of unscaled conversion routines.Nathan Adil Maxson
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-18swscale: fix overflows in vertical scaling at top/bottom edges.Ronald S. Bultje
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.
2011-12-18swscale: fix overflow in gray16 vertical scaling.Ronald S. Bultje
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>
2011-12-17swscale: fix integer overflows in RGB pixel writing.Mans Rullgard
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>
2011-12-17swscale: add endian conversion for RGB555 and RGB444 pixel formatsJanne Grunau
Add a macro to shorten the if condition.
2011-12-17swscale: fix overflows in output of RGB48 pixels.Ronald S. Bultje
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>
2011-12-17swscale: add rgb565 endianess conversionJanne Grunau
2011-12-17swscale: fix overflows in RGB rounding constants.Ronald S. Bultje
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-16swscale: add unscaled packed 16 bit per component endianess conversionJanne Grunau
2011-12-14swscale_mmx: drop no longer required parameters from VSCALEX macrosDiego Biurrun
2011-12-14swscale: Mark yuv2planeX_8_mmx as MMX2; it contains MMX2 instructions.Diego Biurrun
2011-12-13build: move inclusion of subdir.mak to main subdir loopMans Rullgard
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-13doxygen: misc consistency, spelling and wording fixesDiego Biurrun
2011-12-11Remove extraneous semicolonsMans Rullgard
These semicolons cause invalid empty top-level declarations. Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-01swscale: #include "libavutil/mathematics.h"Reinhard Tartler
this file uses the M_PI macro since 4e74187db2f5db52f88729efc662df9d6bc763e1, so include the correct header directly. Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-27swscale: fix signed overflow in yuv2mono_X_c_templateMans Rullgard
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>
2011-11-25swscale: Readd #define _SVID_SOURCEMartin Storsjö
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>
2011-11-25swscale: fix failing fate tests.Ronald S. Bultje
isGray() is left as a FIXME for later.
2011-11-24swscale: add support for planar RGB input.Ronald S. Bultje
2011-11-24Clean up swscale pixfmt macros using av_pix_fmt_descriptors[].Ronald S. Bultje
2011-11-19swscale: Fix stack alignment for SSEJohn Stebbins
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>
2011-11-13swscale: handle unaligned buffers in yuv2plane1Ronald S. Bultje
The issue had been introduced in c435653627529e22d74214c2266f571255e404d6 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2011-11-11swscale: add padding to conversion buffer.Sean McGovern
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>
2011-11-06swscale: write yuv2plane1 MMX/SSE2/SSE4/AVX functions.Ronald S. Bultje
2011-11-05swscale: align vertical filtersize by 2 on x86.Ronald S. Bultje
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.
2011-10-23swscale: add missing colons to x86 assembly yuv2planeX.Ronald S. Bultje
This fixes assembling using "nasm".
2011-10-22swscale: update altivec yuv2planeX asm to new per-plane API.Ronald S. Bultje
2011-10-22swscale: make yuv2yuvX_10_sse2/avx 8/9/16-bits aware.Ronald S. Bultje
Also implement MMX/MMX2 versions and SSE4 versions.
2011-10-22yuv2planeX10 SIMDKieran Kunhya
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-22swscale: decide whether to use yuv2plane1/X on a per-plane basis.Ronald S. Bultje
2011-10-22swscale: reintroduce full precision in 16-bit output.Ronald S. Bultje
2011-10-22Split up yuv2yuvX functionsKieran Kunhya
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-22Split out yuv2yuv1 luma and chroma in order to make them generic DSP functionsKieran Kunhya
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-10-21swscale: fix signed shift overflows in ff_yuv2rgb_c_init_tables()Mans Rullgard
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-21sws/pixfmt/pixdesc: add support for yuv420p9le/be.Ronald S. Bultje
2011-10-21swscale: prevent overflow in coefficient calculation.Ronald S. Bultje
2011-10-18swscale: prevent overflow during initializationRonald Bultje
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2011-10-12AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*Anton Khirnov
2011-10-12sws: support yuv444p9/10 output.Anton Khirnov
2011-10-11swscale: use aligned move for storage into temporary buffer.Ronald S. Bultje
The intermediate buffer is always aligned.
2011-09-25ppc: fix some pointer to integer castsMans Rullgard
Use uintptr_t instead of plain int. Without this change, the comparisons will come out wrong for pointers in certain ranges. Fixes random failures on ppc64. Also fixes some compiler warnings. Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-09-23Fix unnecessary shift with 9/10bit vertical scalingKieran Kunhya
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-09-15swscale: fix byte overreads in SSE-optimized hscale().Ronald S. Bultje
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.
2011-09-13sws: implement MMX/SSE2/SSSE3/SSE4 versions for horizontal scaling.Ronald S. Bultje
Speed: from 3.9x to 9.6x speed improvement over C, and some small (up to 15%) speed improvements over existing MMX code (particularly for bigger filters).
2011-09-03lavf,lavc,sws: add {avcodec,avformat,sws}_get_class() functions.Anton Khirnov
2011-08-18swscale: split hScale() function pointer into h[cy]Scale().Ronald S. Bultje
This allows using more specific implementations for chroma/luma, e.g. we can make assumptions on filterSize being constant, thus avoiding that test at runtime.
2011-08-13swscale: add dithering to yuv2yuvX_altivec_realLuca Barbato
It just does that part in scalar form, I doubt using a vector store over 2 array would speed it up particularly. The function should be written to not use a scratch buffer.
2011-08-12swscale: use 15-bit intermediates for 9/10-bit scaling.Ronald S. Bultje
2011-08-05lsws: remove optimization debug logs in sws_init_context()Stefano Sabatini
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>
2011-08-05lsws: use array for storing the supported in/out informationStefano Sabatini
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>