Michael Niedermayer
f05cfb654f
sws/fill_rgb2yuv_table: use ROUNDED_DIV
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
bcf643486f
sws/fill_rgb2yuv_table: increase precission to 32bit
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2fa11a94a3
sws/fill_rgb2yuv_table: avoid 2 divisions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3950236332
sws/x86: update RENAME(rgb24toyv12)() to using the user provided rgb2yuv table
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2a5d1cb2d9
sws/x86: update rgba->yuv to use user supplied table
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
17ad06c753
sws/x86: update rgb/bgr->yuv code to use provided coefficient table
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
9aafb95ae2
sws: init input_rgb2yuv_table depending on yuv colorspace
...
For the default table we keep using the exact previous
coefficients, this way individual functions can be updated seperately
without breaking fate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Martin Storsjö
d192ac3e03
swscale: Disallow conversion to GBRP16
...
This reverts parts of d6d5ef5534
, 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>
12 years ago
Michael Niedermayer
7b41c24c5f
sws: dont enable chrSrcHSubSample for planar RGB
...
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>
12 years ago
Michael Niedermayer
d6d5ef5534
sws: GBRP9, GBRP10, and GBRP16 output support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years ago
Michael Niedermayer
4eb93bed4e
swscale: GBRP output support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
12 years ago
Michael Niedermayer
3c2ecfcc24
sws: dont enable chrSrcHSubSample for planar RGB
...
This code path is not implemented and makes not much sense to implement
either.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
e4033d89f1
sws: GBRP9, GBRP10 GBRP12 GBRP14 output support
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
61884d1985
sws: GBRP output support
...
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
aef5c0b68f
sws: Check for unsupported combination of ED/FULL_CHR flags
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
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
12 years ago
Ronald S. Bultje
a6e922ffa2
swscale: place inline assembly bilinear scaler under HAVE_INLINE_ASM.
12 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