Michael Niedermayer
2dc2e4f5af
sws: Enable full chroma resolution when needed for ED dither
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ca447592b1
sws: rgb/bgr 4/8 error diffusion dither
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
646ade7679
sws: Support error diffusion dither for mono output
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Xi Wang
f73f76fd20
swscale: fix NULL checking in sws_alloc_context()
...
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>
12 years ago
Diego Biurrun
d8eda37080
x86: mmx2 ---> mmxext in function names
12 years ago
Diego Biurrun
a65bdceb06
x86: mmx2 ---> mmxext in variable names
12 years ago
Diego Biurrun
652f518594
x86: mmx2 ---> mmxext in comments and messages
12 years ago
Luca Barbato
7658295ba3
pixfmt: support more yuva formats
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Michael Niedermayer
8edf9b1fa4
sws: rgb has no range, avoid random results if the user tries to mess with it anyway.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
425c30ddae
sws: loose the minimum dimension checks
...
A few quick tests show no fundamental problem with such diemnsions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
733f85b7ae
sws: improve error messages
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7de2196029
sws: fix extreem downscaling
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
e823e73677
sws_getGaussianVec: check variance and quality
...
Found-by: Reimar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
fe573d1a9b
sws_allocVec: check length validity
...
Found-by: Reimar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
95cd815c36
swscale: try to use mmap only if available
...
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>
12 years ago
Paul B Mahol
a291345b1e
sws: do not use av_pix_fmt_descriptors directly
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Luca Barbato
6d5600e855
avutil: add yuva422p and yuva444p formats
12 years ago
Anton Khirnov
0a7068fa5d
sws: do not use av_pix_fmt_descriptors directly.
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Martin Storsjö
75c37c5ace
swscale: Provide the right alignment for external mmx asm
...
This reverts parts of e0c6cce447
. 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>
12 years ago
Diego Biurrun
e0c6cce447
x86: Replace checks for CPU extensions and flags by convenience macros
...
This separates code relying on inline from that relying on external
assembly and fixes instances where the coalesced check was incorrect.
12 years ago
Diego Biurrun
17337f54c0
x86: Split inline and external assembly #ifdefs
12 years ago
Mans Rullgard
c318626ce2
x86: rename libavutil/x86_cpu.h to libavutil/x86/asm.h
...
This puts x86-specific things in the x86/ subdirectory where they
belong.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Diego Biurrun
239fdf1b4a
x86: build: replace mmx2 by mmxext
...
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.
12 years ago
Diego Biurrun
5a6e3c039c
swscale: Mark all init functions as av_cold
13 years ago
Ronald S. Bultje
a6e922ffa2
swscale: place inline assembly bilinear scaler under HAVE_INLINE_ASM.
13 years ago
Michael Niedermayer
21d8255423
sws: handle non native rgb<->rgb convertions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
fa36f33422
sws: support 12&14 bit planar colorspaces
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
e003da7139
sws/utils: use av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
143a5c55ff
Add yuva422p pix_fmt.
13 years ago
Diego Biurrun
ef0ee7f657
swscale: K&R formatting cosmetics (part II)
...
Also adjust some comments including wording and typo fixes.
13 years ago
Michael Niedermayer
87a72b9122
swscale: Merge a hunk from qatar that seems to have been forgotten or lost.
...
Author of the code from qatar is Ronald S. Bultje
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
4707f1da8a
swscale: remove duplicate PIX_FMT_GBRP entry from format_entries.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
2254b559cb
swscale: make filterPos 32bit.
...
Fixes overflows for large image sizes.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Carl Eugen Hoyos
f972193a15
Support RGBA64 as input colour space.
...
Mostly fixes ticket #503 ,
opaque still overflows for RGBA64 -> RGBA conversion.
13 years ago
Ronald S. Bultje
791de61bbb
swscale: fix another integer overflow.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
2bb628f870
swscale: fix another integer overflow at large dimensions/rescales.
13 years ago
Ronald S. Bultje
19a65b5be4
swscale: fix overflows in filterPos[] calculation for large sizes.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Ronald S. Bultje
1254022ea7
swscale: fix filtersize clipping.
...
if srcW<=2, clip(x, 1, srcW-2) still allows srcW to be < 1.
13 years ago
Ronald S. Bultje
dae2ce361a
swscale: enforce a minimum filtersize.
...
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
13 years ago
Alex Converse
7181c4edee
cosmetics: Remove extra newlines at EOF
13 years ago
Paul B Mahol
f9ca1ac796
sws/pixfmt/pixdesc: add support for yuva444p
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Conflicts:
libavutil/avutil.h
libavutil/pixfmt.h
13 years ago
Alex Converse
08628b6afb
Revert "sws/pixfmt/pixdesc: add support for yuva444p"
...
This reverts commit fc115c80b7
.
Tests are broken.
13 years ago
Paul B Mahol
fc115c80b7
sws/pixfmt/pixdesc: add support for yuva444p
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Michael Niedermayer
1c910d2f11
sws: Fix RGB0->alpha containing formats.
...
Fixes Ticket869
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
0421b6dc7a
sws: In case of an invalid scaler algorithm, show the invalid value.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
e44c11e9fa
cosmetics: Move static and inline attributes to more standard places.
...
Fixes several "‘static’ is not at beginning of declaration" warnings.
13 years ago
Michael Niedermayer
ba6e36f906
swscale: Force full horizontal chroma internally when the output has a odd size.
...
This fixes a gray line on the right side due to 1 column of pixels being skiped.
Fixes Ticket891
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
5cad970971
swscale: RGB4444 and BGR444 input
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Ronald S. Bultje
9ea3501d87
swscale: don't show full-chroma-int warning for non-RGB output.
...
Non-RGB output always uses full chroma interpolation.
13 years ago