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
Michael Niedermayer
cccb45751e
yuv2rgb: fix integer overflow in fill_gv_table()
...
Fixes CID703747
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a494792961
yuv2rgb: fix integer overflow in fill_table
...
Fixes CID703748
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
6c87b2be72
swscale_unscaled: remove unused variables
...
Fixes CID739472
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
a805cefd8b
swscale: avoid pointless use of compound literals
...
Some compilers (e.g. old gcc) have trouble with these.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Hendrik Leppkes
79393a8363
Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
364c60bf64
sws-test: parse command line args before initing contexts
...
This fixes parsing comand line args after ref
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a07e9d72a1
yuvPlanartouyvy_c: fix sign extension
...
Fixes CID732281
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a30972609c
yuvPlanartoyuy2_c: fix sign extension
...
Fixes CID732282
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
Michael Niedermayer
7a32ab5ed0
sws: get rid of C99 signed overflows try #2
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3ee8eefbf2
sws: avoid signed C99 overflows
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f70a651b3f
sws-test: raise limigts a bit.
...
these cases arent used but theres no point in failing on them
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c0f0bec2f2
sws-test: check W/H
...
Fixes CID733834
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Michael Niedermayer
adcbb3fd8b
yuv2rgb: fix declared array sizes, so they match actuals.
...
Fixes CID733789, and others
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
fac1ccbda1
swscale-test: fix freeing of uninitialized variable
...
Fixes: CID733844
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
6d0beefbf6
swscale: Do not make ff_ symbols globally visible.
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Diego Biurrun
e4cbf7529b
Give all anonymously typedeffed structs in headers a name
...
Anonymous structs cannot be forward declared and have no benefit.
12 years ago
Mans Rullgard
07eb7e20af
ppc: swscale: rework yuv2planeX_altivec()
...
This gets rid of the variable-length scratch buffer by filtering 16
pixels at a time and writing directly to the destination. The extra
loads this requires to load the source values are compensated by not
doing a round-trip to memory before shifting.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Michael Niedermayer
015b805d13
sws: drop unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
115e291b53
swscale: move main swscale wraper to swscale.c
...
It never belonged to swscale_unscaled.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
178ecfc257
swscale: fix To{Y,UV} extern prototypes.
...
This fix a bunch of "assignment from incompatible pointer type" warnings
with GCC.
12 years ago
Michael Niedermayer
db436b17e9
swscale: change assert() to av_assert()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0ed0f2e566
sws: revert: "swscale: Remove two bogus asserts"
...
Also change them to av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
b9141aa346
swscale: Remove two bogus asserts
12 years ago
Michael Niedermayer
ef912134f0
x86/swscale: use unsigned to build SIMD values to avoid signed overflow
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
14de55784d
sws/output: use unsigned variables where harmless overflows are expected.
...
signed overflow is undefined in C ...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
1169f0d0af
x86: more specific checks for availability of required assembly capabilities
12 years ago
Martin Storsjö
e6153f173a
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
d58dd4b5b5
avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
124134e424
avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Hans-Kristian Arntzen
f099fbf5f3
Remove redundant masks in STORE_BGR24_MMX.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Carl Eugen Hoyos
a26789cf9f
Fix compilation with yasm-0.6.2.
12 years ago
Carl Eugen Hoyos
52be5428c0
Add some missing _EXTERNAL suffixes to yasm source files.
12 years ago
Diego Biurrun
17337f54c0
x86: Split inline and external assembly #ifdefs
12 years ago
Diego Biurrun
a886b279a0
x86: cosmetics: Comment some #endifs for better readability
12 years ago
Michael Niedermayer
f4c020e3ad
swscale: fix usePal()
...
Fixes Ticket1702
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
afe6f337ad
swscale.c: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Ronald S. Bultje
b64a72e1b2
yuv2rgb: handle line widths that are not a multiple of 4.
...
This introduces support for width%4==2 in addition to width%4==0. For
odd widths, some more checks are needed, since the current code always
handles two luma items in a row, thus there is a possibility of an
overread by one.
12 years ago
Martin Storsjö
3ad9eac5a0
testprogs: Remove unused includes
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago