rcombs
df9180d8a0
swscale/output: use isSwappedChroma
3 years ago
rcombs
cb3a6cc082
swscale/output: use isSemiPlanarYUV for NV12/21/24/42 case
3 years ago
rcombs
bb4f19f2a2
swscale/output: use isDataInHighBits for 10-bit case
...
This code will need fleshing-out (probably templating) if we ever add
e.g. a P012 format.
3 years ago
rcombs
cf9e8cb52f
swscale/output: use isSemiPlanarYUV for 16-bit case
3 years ago
rcombs
cb87a3b137
swscale/output: template-ize yuv2nv12cX 10-bit and 16-bit cases
...
Fixes incorrect big-endian output introduced in 88d804b7ff
Avoids making the filter-time BE check more expensive
3 years ago
rcombs
88d804b7ff
swscale: add P210/P410/P216/P416 output
3 years ago
Manuel Stoeckl
32329397e2
swscale: add input/output support for X2BGR10LE
...
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Andreas Rheinhardt
2c05ee092b
avutil/internal, swresample/audioconvert: Remove cpu.h inclusions
...
These inclusions are not necessary, as cpu.h is already included
wherever it is needed (via direct inclusion or via the arch-specific
headers).
Also remove other unnecessary cpu.h inclusions from ordinary
non-headers.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3 years ago
Michael Niedermayer
7528532550
swscale/output: Implement dither none for yuv2rgb_write_full()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years ago
Anton Khirnov
e15371061d
lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bump
...
They are not properly namespaced and not intended for public use.
4 years ago
Nelson Gomez
360be03b8a
swscale: cosmetic fixes
...
Signed-off-by: Nelson Gomez <nelson.gomez@microsoft.com>
4 years ago
Nelson Gomez
7c39c3c1a6
swscale: make yuv2interleavedX more asm-friendly
...
Extracting information from SwsContext in assembly is difficult, and
rearranging SwsContext just for asm access didn't look good. These
functions only need a couple of fields from it anyway, so just make
them parameters in their own right.
Signed-off-by: Nelson Gomez <nelson.gomez@microsoft.com>
4 years ago
Fei Wang
c721b45014
swscale: Add swscale input/output support for X2RGB10LE
...
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
5 years ago
Mark Reid
b4967fc71c
libswscale: add output support for AV_PIX_FMT_GBRAPF32
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Michael Niedermayer
e057e83a4f
swscale/output: Fix integer overflow in yuv2rgb_write_full() with out of range input
...
Fixes: signed integer overflow: 1169365504 + 981452800 cannot be represented in type 'int'
Fixes: ticket8293
Found-by: Suhwan
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Michael Niedermayer
49ba1879ad
swscale/output: Fix integer overflow in alpha computation in yuv2gbrp16_full_X_c()
...
Fixes: signed integer overflow: 524280 * 4432 cannot be represented in type 'int'
Fixes: ticket8322
Found-by: Suhwan
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Michael Niedermayer
7b7f97532b
swscale/output: Fix several invalid shifts in yuv2rgb_full_1_c_template()
...
Fixes: Invalid shifts
Fixes : #8320
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Michael Niedermayer
d260621089
swscale/output: Avoid 64bit in Alpha in yuv2ya16_X_c_template()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Michael Niedermayer
3e6682931b
swscale/output: Correct Alpha in yuv2ya16_X_c_template()
...
Untested, no testcase
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Michael Niedermayer
4f4ca675e5
swscale/output: Implement Luma computation from yuv2ya16_X_c_template() without 64bit
...
This also reverts 21838cad2f
The revert is in this commit to avoid 2 fate updates
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Paul B Mahol
21838cad2f
swscale/output: fix signed integer overflow for ya16
...
Fixes #7666 .
5 years ago
Linjie Fu
ef1342650f
swscale/output: fix some code indentations
...
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years ago
Philip Langdale
cd48318035
swscale: Add support for NV24 and NV42
...
The implementation is pretty straight-forward. Most of the existing
NV12 codepaths work regardless of subsampling and are re-used as is.
Where necessary I wrote the slightly different NV24 versions.
Finally, the one thing that confused me for a long time was the
asm specific x86 path that did an explicit exclusion check for NV12.
I replaced that with a semi-planar check and also updated the
equivalent PPC code, which Lauri kindly checked.
6 years ago
Lauri Kasanen
81a4719d8e
swscale: Remove duplicated code
...
In this function, the exact same clamping happens both in the if and unconditionally.
6 years ago
Martin Vignali
db4771af81
swscale : add YA16 LE/BE output
6 years ago
Sergey Lavrushkin
582bc5a348
libswscale: Adds conversions from/to float gray format.
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
Philip Langdale
9d5aff09a7
swscale: Add p016 output support and generalise yuv420p1x to p010
...
To make the best use of existing code, I generalised the wrapper
that currently does yuv420p10 to p010 to support any mixture of
input and output sizes between 10 and 16 bits. This had the side
effect of yielding a working code path for all yuv420p1x formats
to p01x.
7 years ago
James Cowgill
013ec23cbe
swscale: fix gbrap16 alpha channel issues
...
Fixes filter-pixfmts-scale test failing on big-endian systems due to
alpSrc not being cast to (const int32_t**).
Also fixes distortions in the output alpha channel values by copying the
alpha channel code from the rgba64 case found elsewhere in output.c.
Fixes ticket 6555.
Signed-off-by: James Cowgill <James.Cowgill@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Luca Barbato
f56fa95cd1
swscale: Do not shift negative values directly
...
It is undefined in C as reported:
warning: shifting a negative signed value is undefined
8 years ago
Michael Niedermayer
ac29b82ec5
swscale: Add gbrap10 output
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years ago
Paul B Mahol
6427c9ffee
swscale: add gbr(a)p16 output support
8 years ago
Michael Niedermayer
b828788d58
swscale: Add GBRAP10 output
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Luca Barbato
2c7d8cbd66
swscale: Add the GBRAP12 output
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
873d06c76e
swscale/output: Fix alpha shift in yuv2gbrp_full_X_c()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
d736b52a04
swscale: Drop is9_OR_10BPS() use, its name is not correct
...
Found-by: Luca Barbato
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Luca Barbato
881477c77b
swscale: Add the GBRAP12 output
8 years ago
Luca Barbato
ef3740c3a0
swscale: Enable GBRP12 output
8 years ago
Luca Barbato
2b5b1e1e9b
swscale: Rename is9_OR_10 to match what it does
...
It is used to select functions that work with 9-15bits.
8 years ago
Luca Barbato
85406e7a8d
pixfmt: Add yuv420p12 pixel format
8 years ago
Timo Rothenpieler
99882d05a6
swscale: add support for P010LE/BE output
8 years ago
Michael Niedermayer
76d377d0a0
swscale/output: Fix rounding offset in yuv2gbrp_full_X_c()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Diego Biurrun
0f40c90984
Drop pointless assert.h #includes
9 years ago
Pedro Arthur
6de58b4903
swscale: cleanup unused code
...
Removed previous swscale code under '#ifndef NEW_FILTER'
and removed unused fields of SwsContext
9 years ago
Michael Niedermayer
23261e6001
sws/output: fix ordered dither threshold for mono output
...
This makes sure that white stays white and black black
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
b99f498716
swscale/output: Assert that yalpha and uvalpha are within their expected range
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Ganesh Ajjanagadde
7cf22c7970
swscale/output: fix undefined left shifts of negative numbers
...
This fixes -Wshift-negative-value reported with clang 3.7+, e.g
http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7 .
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Hendrik Leppkes
5d8e836d0e
Replace all remaining occurances of step/depth_minus1 and offset_plus1
9 years ago
Vittorio Giovara
2268db2cd0
lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fields
...
The new fields can be accessed directly and are more intelligible.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
1909a9151c
swscale/output: Fix "warning: assignment from incompatible pointer type"
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago