summaryrefslogtreecommitdiff
path: root/libswscale/swscale.c
Commit message (Collapse)AuthorAge
* lavu: add AV_CEIL_RSHIFT and use it in various placesClément Bœsch2016-01-11
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fieldsVittorio Giovara2015-09-07
| | | | | | The new fields can be accessed directly and are more intelligible. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* libswscale: GBRAP input & output and GBRAP16 input supportPaul B Mahol2015-01-14
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* swscale: cosmetics: Drop silly camelCase from swScale function pointer nameDiego Biurrun2013-08-29
|
* swscale: ppc: Hide arch-specific initialization detailsDiego Biurrun2013-08-29
| | | | Also give consistent names to init functions.
* swscale: x86: Hide arch-specific initialization detailsDiego Biurrun2013-08-28
| | | | Also give consistent names to init functions.
* swscale: Move extern declarations for tables to swscale_internal.hDiego Biurrun2013-08-15
| | | | Also add missing ff_ prefixes where necessary.
* swscale: Mark a bunch of tables only used within one file staticDiego Biurrun2013-08-15
|
* swscale: GBRP output supportMichael Niedermayer2013-01-27
| | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* miscellaneous typo fixesDiego Biurrun2012-12-21
|
* swscale: support gray to 9bit and 10bit formatsLuca Barbato2012-10-30
| | | | With the input of Kostya and Ronald.
* 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: Remove two bogus assertsDiego Biurrun2012-09-13
|
* x86: more specific checks for availability of required assembly capabilitiesDiego Biurrun2012-09-07
|
* x86: Split inline and external assembly #ifdefsDiego Biurrun2012-08-31
|
* 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: bury one more piece of inline asm under HAVE_INLINE_ASM.Ronald S. Bultje2012-07-29
|
* swscale: add missing HAVE_INLINE_ASM check.Ronald S. Bultje2012-07-22
| | | | The function called in this block is under HAVE_INLINE_ASM itself also.
* 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 underflows in firstline calculations for extreme resizes.Ronald S. Bultje2012-02-23
| | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* swscale: Remove unused variable alpMmxFilter.Diego Biurrun2012-02-13
|
* swscale: handle gray16 as a "planar" YUV format (Y-only, of course).Ronald S. Bultje2012-02-13
| | | | | This allows removing any gray16-specific code, which is essentially identical to the per-plane code in yuv2plane*().
* swscale: use yuv2packed1() functions for unscaled chroma also.Ronald S. Bultje2012-02-13
|
* swscale: split C output functions into separate file.Ronald S. Bultje2012-02-07
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* swscale: Split C input functions into separate file.Ronald S. Bultje2012-02-07
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* swscale: remove obsolete comment.Ronald S. Bultje2012-02-01
|
* swscale: more generic check for planar destination formats with alphaPaul B Mahol2012-01-30
| | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> 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: remove unused U/V arguments from yuv2rgb_write().Ronald S. Bultje2012-01-05
| | | | Also document the function somewhat.
* swscale: remove obsolete comment.Ronald S. Bultje2012-01-03
|
* 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: 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: 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: fix overflows in RGB rounding constants.Ronald S. Bultje2011-12-17
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove extraneous semicolonsMans Rullgard2011-12-11
| | | | | | These semicolons cause invalid empty top-level declarations. Signed-off-by: Mans Rullgard <mans@mansr.com>
* 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: add support for planar RGB input.Ronald S. Bultje2011-11-24
|
* swscale: decide whether to use yuv2plane1/X on a per-plane basis.Ronald S. Bultje2011-10-22
|
* swscale: reintroduce full precision in 16-bit output.Ronald S. Bultje2011-10-22
|
* Split up yuv2yuvX functionsKieran Kunhya2011-10-22
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Split out yuv2yuv1 luma and chroma in order to make them generic DSP functionsKieran Kunhya2011-10-22
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* sws/pixfmt/pixdesc: add support for yuv420p9le/be.Ronald S. Bultje2011-10-21
|
* Fix unnecessary shift with 9/10bit vertical scalingKieran Kunhya2011-09-23
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* swscale: split hScale() function pointer into h[cy]Scale().Ronald S. Bultje2011-08-17
| | | | | | 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.
* swscale: use 15-bit intermediates for 9/10-bit scaling.Ronald S. Bultje2011-08-12
|
* 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.