Reimar Döffinger
4fab08c94f
Optimize pure C unscaled yuv2rgb.
...
Aligning the tables reduces the amount of code generated on
e.g. ARM as the offset constant then has few enough set bits
so it can be encoded inside a single instruction instead of 2.
Ideally all should be declared aligned, but the DECLARE_ALIGNED
macros does not work with pointer tables, thus also reordered
the tables.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
11 years ago
Stefano Sabatini
ff9d11f95d
lsws: use av_pix_fmt_get_chroma_sub_sample()
...
Remove duplicated getSubSampleFactors() function. Simplify.
11 years ago
Michael Niedermayer
eb4205cc89
swscale/utils: check mprotect() return code
...
Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d0a3bc1302
swscale/yuv2rgb: clip cy, avoid division by 0 with 0 contrast
...
Found-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
2db6547237
swscale/utils/sws_setColorspaceDetails(): fix indention
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Paul B Mahol
37d6b2b4e6
swsscale/swscale_unscaled: add GBRAP16
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
9ec9d46365
swscale/swscale_unscaled: fix alpha pointer & stride for planarRgb16ToRgb16Wrapper()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a830915b78
swscale: Use full resolution chroma for yuv2rgb when the input has full chroma
...
See Ticket3028
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ccf96f8c64
swscale/options: switch default to bicubic
...
Suggested-by: Ronald S. Bultje
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Vittorio Giovara
6b3ff6f91a
swscale: provide a default scaler if none is set
...
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>
11 years ago
Michael Niedermayer
2e2a2d8801
swscale/utils: dont divide by zero with zero vectors
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
wm4
01e3340fb6
swscale: make bilinear scaling the default
...
Before this commit, sws_init_context() failed with an error if no scaler
was explicitly set.
Defaulting to something reasonable is better behavior.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
13eff473ad
swscale/swscale_unscaled: fix alpha values for rgb/bgr -> RGB32_1 / BGR32_1
...
Found-by: Justin Ruggles
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
2d28950da9
swscale/utils: remove redundant NULL checks before sws_freeVec()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a446657d8c
swscale/utils: simplify cpu caps printing code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
9d052adbeb
swscale/utils: Simplify scaler name printing code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
aec91de549
swscale/utils: Allow sws_setColorspaceDetails() to use the tables from sws_getColorspaceDetails()
...
Previously this would have lead to a memcpy(a,a) which violates the
requirement of non overlapping src and dst.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
46a723ec72
swscale/yuv2rgb: make sure yuvTable is set to NULL after deallocation
...
ensures no stale pointers remain
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
a0b901a348
Drop pointless directory name prefixes from #includes in the current dir
11 years ago
Michael Niedermayer
c914c99d4b
swscale/utils: use memcpy instead of loop in sws_cloneVec()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Thilo Borgmann
d814a839ac
Reinstate proper FFmpeg license for all files.
11 years ago
Sean McGovern
01a82f1dc5
ppc: don't return a value from a function declared void
...
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Sean McGovern
f1f728cbe4
ppc: don't return a value from a function declared void
...
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Diego Biurrun
79aec43ce8
x86: Add and use more convenience macros to check CPU extension availability
11 years ago
Diego Biurrun
a6b6501185
ppc: cosmetics: Consistently format CPU flag detection invocations
11 years ago
Diego Biurrun
67e6a9f558
cosmetics: Place arch initialization calls in alphabetical order
11 years ago
Diego Biurrun
1909f6b1b6
swscale: cosmetics: Drop silly camelCase from swScale function pointer name
11 years ago
Diego Biurrun
4e0799a4d0
swscale: Add some missing av_cold to arch-specific init functions
11 years ago
Diego Biurrun
3aa682f253
swscale: consistent names for arch-specific acceleration functions
11 years ago
Diego Biurrun
c2503d9c8a
swscale: ppc: Hide arch-specific initialization details
...
Also give consistent names to init functions.
11 years ago
Diego Biurrun
a519583991
swscale: x86: Hide arch-specific initialization details
...
Also give consistent names to init functions.
11 years ago
Diego Biurrun
f61bece684
ppc: Add and use convenience macro to check for AltiVec availability
11 years ago
Michael Niedermayer
23b3141261
swscale: improve dither checks
...
Bssed on patch by Øyvind Kolås <pippin@gimp.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
8c50ea2251
swscale: set dither to a specific value for rgb/bgr8 output
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
c62801270f
swscale: change ff_dither_8x8_128 dimensions to be consistent with the others
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
1e0e193240
sws: add dither enum
...
This allows specifying more dither algorithms without using up flags and
without ambiguities.
Also initialize the new field based on the flags and use it.
Note, improving the logic of the checks is left to subsequent
commits, this here only switches from flags to enum.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
60e9b8556a
swscale_unscaled: make dither_scale static, its not used elsewhere and has no prefix
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
aa2ba8c99e
swscale: Move extern declarations for tables to swscale_internal.h
...
Also add missing ff_ prefixes where necessary.
11 years ago
Diego Biurrun
d258531502
swscale: Mark a bunch of tables only used within one file static
11 years ago
Michael Niedermayer
8d745281a4
swscale/utils: Fix potential overflow of srcPos*C before converting to 64bit
...
Fixes CID1061054
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
bc721ac9f7
swscale/utils: Fix potential overflow of dstPos*xInc before converting to 64bit
...
Fixes CID1061053
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
b5a138652f
Give less generic names to global library option arrays
11 years ago
Michael Niedermayer
8efe96ee6f
swscale/fill_rgb2yuv_table: fix default detection
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a7e45cfa11
swscale/sws_getColorspaceDetails: dont fail for non yuv
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
436616fd42
swscale: exchange src & dst chroma pos
...
Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
clook
b9b1a2c3e4
libswscale: Adding RGB => XYZ support
11 years ago
Michael Niedermayer
6d323ff57a
swscale: remove unneeded include assert.h
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a4b55bbb6f
swscale/input: fix 16bit gbrp input
...
Fixes Ticket2793
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a0b7e73f8b
swscale/options: fix copy and paste typo
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b405f4e916
swscale: Add support to specify chroma position
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago