summaryrefslogtreecommitdiff
path: root/libswscale/utils.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>
* swscale: Check memory allocationFederico Tomassetti2015-03-21
| | | | | | | Bug-Id: CID 1267890 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* swscale: Check memory allocationsFederico Tomassetti2015-02-17
| | | | | | CC: libav-stable@libav.org Bug-Id: CID 1267888 / CID 1267890 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: Undeprecate sws_getContext()Diego Biurrun2014-08-07
| | | | sws_getCachedContext is not a full replacement for the function.
* swscale: support AV_PIX_FMT_YA16 as inputVittorio Giovara2014-08-04
| | | | Based on a long debug session with Kostya.
* avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8Vittorio Giovara2014-08-04
| | | | | | | The rationale is that you have a packed format in form <greyscale sample> <alpha sample> <greyscale sample> <alpha sample> and shortening greyscale to 'G' might make one thing about Greenscale instead. An alias pixel format and color space name are provided for compatibility.
* swscale: Fix an undefined behaviourLuca Barbato2014-05-03
| | | | | | | | Prevent a division by zero down the codepath. Sample-Id: 00001721-google Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* swscale: support converting YVYU422 pixel formatVittorio Giovara2014-04-07
|
* swscale: add endianness conversion for AV_PIX_FMT_BGRA64|RGBA64Janne Grunau2014-04-02
|
* RGBA64 pixel formatsJean First2014-03-16
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* swscale: provide a default scaler if none is setVittorio Giovara2013-10-05
| | | | | | | | | | Lanczos for general case, sinc for upscaling, Gaussian for downscaling. According to current literature these scalers should be the best quality-wise algorithms for each case. Inspired from a patch by wm4 <nfxjfg@googlemail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* x86: Add and use more convenience macros to check CPU extension availabilityDiego Biurrun2013-08-29
|
* 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.
* ppc: Add and use convenience macro to check for AltiVec availabilityDiego Biurrun2013-08-28
|
* swscale: Move extern declarations for tables to swscale_internal.hDiego Biurrun2013-08-15
| | | | Also add missing ff_ prefixes where necessary.
* swscale: support endianness conversion for AV_PIX_FMT_XYZ12Janne Grunau2013-05-06
|
* swscale: add support for endianness only conversionJanne Grunau2013-05-06
| | | | Use bitfields in FormatEntry array to avoid wasting an int for each flag.
* swscale: Add av_cold attributes to init functions missing themDiego Biurrun2013-05-04
|
* swscale: Disallow conversion to GBRP16Martin Storsjö2013-02-11
| | | | | | | | | | | | | This reverts parts of d6d5ef5534d582, that didn't work right. (The tests that were added failed on big endian, and the output looked garbled on little endian as well.) This is due to the fact that the intermediate scaling values (from e.g. hScale8To19_c or hScale16To19_c) are stored as int32_t and thus requires a separate output function, while yuv2gbrp_full_X_c only interprets it as int16_t. Signed-off-by: Martin Storsjö <martin@martin.st>
* sws: dont enable chrSrcHSubSample for planar RGBMichael Niedermayer2013-02-09
| | | | | | | | This code path is not implemented and makes not much sense to implement either. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* sws: GBRP9, GBRP10, and GBRP16 output supportMichael Niedermayer2013-02-09
| | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* swscale: GBRP output supportMichael Niedermayer2013-01-27
| | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* swscale: fix NULL checking in sws_alloc_context()Xi Wang2013-01-04
| | | | | | | | | | | | | sws_getCachedContext() and sws_getContext() expect sws_alloc_context() to return NULL when out of memory, as follows. if (!(context = sws_alloc_context())) return NULL; This patch fixes sws_alloc_context() to return NULL in that case. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* 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.