Commit Graph

55 Commits

Author SHA1 Message Date
Luca Barbato 37f573543c swscale: Convert the check check_image_pointers helper to a macro
Avoid warnings about types mismatch and make the code a little simpler.
2017-04-15 15:37:18 +02:00
Luca Barbato ab839054e6 swscale: Add GRAY12 2016-11-07 22:42:00 +01:00
Kieran Kunhya 81f1f6c3f6 Add GBRAP12 pixel format support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-10-12 21:33:34 +02:00
Luca Barbato 9bd6ea5695 pixfmt: Add yuv444p12 pixel format 2016-09-27 18:48:30 +02:00
Luca Barbato 0aebbbd024 pixfmt: Add yuv422p12 pixel format 2016-09-27 18:48:30 +02:00
Luca Barbato 85406e7a8d pixfmt: Add yuv420p12 pixel format 2016-09-27 18:48:30 +02:00
Luca Barbato 2b5b1e1e9b swscale: Rename is9_OR_10 to match what it does
It is used to select functions that work with 9-15bits.
2016-09-27 18:48:30 +02:00
Hendrik Leppkes e78e5b735f swscale: add P010 input support
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-07-02 09:35:41 +02:00
Vittorio Giovara 41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Clément Bœsch e8bc642202 lavu: add AV_CEIL_RSHIFT and use it in various places
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-11 15:32:56 -05:00
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>
2015-09-07 12:37:47 +02:00
Himangi Saraogi 9a60b1fad0 libswscale: fix compiler warnings enumerated type mixed with another type
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-15 18:29:22 +01:00
Paul B Mahol 928061670e libswscale: GBRAP input & output and GBRAP16 input support
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-01-14 17:17:24 +01:00
Derek Buitenhuis 33c827f632 swscale: Properly scale YUV
Only shift limited range luma, and always only shift chroma
for upconversion.

Based off a patch by Michael Niedermayer.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-12-05 13:03:49 +00:00
Vittorio Giovara f84a1b597c swscale: support AV_PIX_FMT_YA16 as input
Based on a long debug session with Kostya.
2014-08-04 12:56:05 +01:00
Vittorio Giovara e96c3b81ca avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8
The rationale is that you have a packed format in form
<greyscale sample> <alpha sample> <greyscale sample> <alpha sample>
and shortening greyscale to 'G' might make one thing about Greenscale instead.
An alias pixel format and color space name are provided for compatibility.
2014-08-04 12:55:08 +01:00
Kostya Shishkov 5420099cab swscale: correctly pad destination buffer in rgb conversion
Bug-Id: 772
CC: libav-stable@libav.org
Found-By: Justin Ruggles <justin.ruggles@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-08-04 12:55:07 +01:00
Diego Biurrun 880e2aa236 Remove all Blackfin architecture optimizations
Blackfin is a painful platform to work with, no test machines are available
and the range of multimedia applications is dubious. Thus it only represents
a maintenance burden.
2014-06-02 08:41:47 -07:00
Justin Ruggles d9a542ace1 swscale: Set alpha to opaque for internal palettes.
Fixes conversion of pal8 to rgb formats with alpha.

Updated references for 2 FATE tests which previously encoded fully
transparent images.

Based on a patch by Baptiste Coudurier <baptiste.coudurier@gmail.com>
2014-04-12 14:07:19 -04:00
Justin Ruggles 20c38c9c18 swscale: fix some undefined signed left shifts
Based on a patch by Michael Niedermayer <michaelni@gmx.at>
2014-04-12 13:24:47 -04:00
Justin Ruggles 60c4660ba0 swscale: fix an implementation-defined unsigned-to-signed conversion 2014-04-12 13:24:47 -04:00
Janne Grunau 0ca0924c10 swscale: add endianness conversion for AV_PIX_FMT_BGRA64|RGBA64 2014-04-02 11:39:26 +02:00
Michael Niedermayer 9047491f8b swscale: add nv12/nv21->yuv420 converter
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-01-21 17:55:07 +01:00
Michael Niedermayer eb01a25fe1 swscale: fix stride used in planarToNv12Wrapper()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-01-21 17:54:40 +01:00
Diego Biurrun 1909f6b1b6 swscale: cosmetics: Drop silly camelCase from swScale function pointer name 2013-08-29 10:23:54 +02:00
Diego Biurrun 3aa682f253 swscale: consistent names for arch-specific acceleration functions 2013-08-29 10:23:52 +02:00
Diego Biurrun c2503d9c8a swscale: ppc: Hide arch-specific initialization details
Also give consistent names to init functions.
2013-08-29 10:23:41 +02:00
Diego Biurrun aa2ba8c99e swscale: Move extern declarations for tables to swscale_internal.h
Also add missing ff_ prefixes where necessary.
2013-08-15 14:38:03 +02:00
Diego Biurrun d258531502 swscale: Mark a bunch of tables only used within one file static 2013-08-15 14:38:03 +02:00
Anton Khirnov e6c4ac7b5f pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_* 2013-05-15 07:46:51 +02:00
Janne Grunau 9cfa21c8c2 swscale: support endianness conversion for AV_PIX_FMT_XYZ12 2013-05-06 21:48:14 +02:00
Anton Khirnov 542b83fc90 Replace some forgotten instances of PIX_FMT_* with AV_PIX_FMT_*. 2013-03-08 07:42:09 +01:00
Derek Buitenhuis 57c4c25596 swscale: Add support for unscaled 8-bit Packed RGB -> Planar RGB
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-02-27 09:46:39 -05:00
Michael Niedermayer e58013dd8f sws: use planarRgbToRgbWrapper only for 8bit per component
The function doesnt support >8bit currently

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2013-02-09 14:31:53 -05:00
Luca Barbato 26b5ad2543 swscale: support gray to 9bit and 10bit formats
With the input of Kostya and Ronald.
2012-10-30 12:02:41 +01:00
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>
2012-10-23 12:00:21 +01:00
Anton Khirnov 0a7068fa5d sws: do not use av_pix_fmt_descriptors directly. 2012-10-12 12:45:38 +02:00
Anton Khirnov 716d413c13 Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat 2012-10-08 07:13:26 +02:00
Hans-Kristian Arntzen b991b300f2 Unscaled Planar RGB -> RGB support in swscale.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-04-03 13:06:42 -04:00
Paul B Mahol 0cc1a86dc3 rgb2rgb: rgb12to15()
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-12 16:43:17 -08:00
Ronald S. Bultje e7843db3df swscale: fix invalid conversions and memory problems.
Fixes problems where rgbToRgbWrapper() is called even though it doesn't
support this particular conversion (e.g. converting from RGB444 to
anything). Thirdly, fixes issues where rgbToRgbWrapper() is called for
non-native endiannness conversions (e.g. RGB555BE on a LE system).
Fourthly, fixes crashes when converting from e.g. monowhite to
monowhite, which calls planarCopyWrapper() and overwrites/reads because
n_bytes != n_pixels.
2012-01-12 16:38:29 -08:00
Paul B Mahol f7f3563214 rgb2rgb: rgb12tobgr12()
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-11 15:52:53 -08:00
Paul B Mahol 0b8b3387a9 rgb2rgb: allow conversion for <15 bpp
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-09 20:09:41 -08:00
Janne Grunau 6e9bb5aa3e swscale: prevent invalid writes in packed_16bpc_bswap
Writes past the end of the destination buffer were occuring when its
stride was smaller than the stride of the source. Fixes Bug #183.
2011-12-26 15:50:17 +01:00
Nathan Adil Maxson 7b3894bee9 swscale: fix formatting and indentation of unscaled conversion routines.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-12-18 15:32:08 -08:00
Janne Grunau b4dc68803b swscale: add endian conversion for RGB555 and RGB444 pixel formats
Add a macro to shorten the if condition.
2011-12-17 19:52:19 +01:00
Janne Grunau ed46a3d842 swscale: add rgb565 endianess conversion 2011-12-17 19:35:16 +01:00
Janne Grunau 72cb904453 swscale: add unscaled packed 16 bit per component endianess conversion 2011-12-16 01:41:33 +01:00
Ronald S. Bultje 185655c601 swscale: add support for planar RGB input. 2011-11-24 10:40:05 -08:00
John Stebbins 09d243ddd0 swscale: Fix stack alignment for SSE
Although gcc guarantees 16 byte stack alignment, threads under WinXP
don't appear to be guaranteed to start stack aligned.  So fix the
alignment.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-11-19 09:55:07 -08:00