Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Anton Khirnov
ae5e1f3d66
tiff: Check that there is no aliasing in pixel format selection
...
Fixes possible issues with unexpected bpp/bppcount values.
CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Bug-Id: CVE-2014-8544
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Paul B Mahol
f86f39cb9b
tiff: support decoding GBRP and GBRAP formats
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Carl Eugen Hoyos
3a3790b8f8
tiff: support encoding and decoding 64bit images
10 years ago
Diego Elio Pettenò
12640e4cbb
tiff: Return proper error for missing LZMA compression
...
The LZMA support is a semi-official extension supported by libtiff 4.0.0
and later.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Diego Elio Pettenò
2597a842a0
tiff: Improve grayscale support
...
Only use PAL8 if palette is present, else use GRAY8 for pixfmt.
Instead of simulating a grayscale palette, use real grayscale pixels, if no
palette is actually defined.
Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Carl Eugen Hoyos
60cbd6ad84
tiff: support reading gray+alpha at 8 bits
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
11 years ago
Vittorio Giovara
bcc5f69b33
tiff: support reading gray+alpha at 16 bits
11 years ago
Diego Biurrun
df507d5aa0
tiff: Replace deprecated PIX_FMT names by modern ones
11 years ago
Janne Grunau
a9f3f5fadb
Revert "tiff: support reading gray+alpha at 8 bits"
...
This reverts commit b31d76e45f
as it
uses an unkown pixel format.
11 years ago
Carl Eugen Hoyos
b31d76e45f
tiff: support reading gray+alpha at 8 bits
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
11 years ago
Jean First
e75ef2b7f4
tiffdec: support predictor type 2 with RGB48 pixel format
11 years ago
Justin Ruggles
345a96c327
tiffdec: remove an unneeded variable
11 years ago
Justin Ruggles
a9b046fb0a
tiff: use a better name and enum values for PhotometricInterpretation
...
Also add additional known values and log as missing features.
11 years ago
Justin Ruggles
fdbe18b7b0
tiffdec: use a single strip if RowsPerStrip is 0
...
The spec does not specify that 0 is an error condition, and there
are samples which use 0 when the whole image is in one strip.
11 years ago
Justin Ruggles
0a467a9b59
tiffdec: use bytestream2 to simplify overread/overwrite protection
...
Based on a patch by Paul B Mahol <onemda@gmail.com>
CC:libav-stable@libav.org
11 years ago
Justin Ruggles
58bc38a5f2
tiffdec: use correct data type for palette entries and set alpha to 0xFF
11 years ago
Jean First
bf2064f046
tiffdec: rename variables for consistency and fix variable shadowing
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
11 years ago
Anton Khirnov
c265b8bb76
tiff: stop using deprecated avcodec_set_dimensions
11 years ago
Luca Barbato
9c22169769
tiff: do not overread the source buffer
...
At least 2 bytes from the source are read every loop.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
999ccd2d0a
tiff: cleanup the error paths
...
Return the proper error values and optionally report them.
12 years ago
Luca Barbato
016c5b066d
tiff: refactor fax support in a separate function
12 years ago
Luca Barbato
103937681d
tiff: refactor deflate support in a separate function
...
Report when zlib support is missing.
12 years ago
Diego Biurrun
46ce9ded96
tiff: K&R formatting cosmetics
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Anton Khirnov
b2a7b81b9c
tiff: return meaningful error codes.
12 years ago
Anton Khirnov
df9b956751
lavc: fix decode_frame() third parameter semantics for video decoders
...
It's got_frame, not data size
12 years ago
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Diego Biurrun
d5c62122a7
Move av_reverse table to libavcodec
...
It is only used in that library.
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Alex Converse
df6c3f9fb3
tiffdec: Add support for GRAY16LE.
...
Tested with the GraphicsMagick TIFF archive and Libav generated files.
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Alex Converse
f346b6bbeb
tiffdec: K&R cosmetics
13 years ago
Alex Converse
90a4306007
tiffdec: Add a malloc check and refactor another.
13 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Diego Biurrun
a92be9b856
Replace memset(0) by zero initializations.
...
Also remove one pointless zero initialization in rangecoder.c.
13 years ago
Alex Converse
fd0be63049
tiffdec: Prevent illegal memory access caused by recycled pointers.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Diego Biurrun
324deaa268
Replace AVFrame pointer type punning by proper struct member assignments.
13 years ago
Diego Biurrun
562b6c744a
Remove unnecessary AVFrame pointer casts.
13 years ago
Alex Converse
447363870f
tiff: Prevent overreads in the type_sizes array.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Alex Converse
e32548d133
tiff: Make the TIFF_LONG and TIFF_SHORT types unsigned.
...
TIFF v6.0 (unimplemented) adds signed equivalents.
13 years ago
Laurent Aimar
04a845caa7
tiffdec: fix out of bound reads/writes
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
13 years ago
Anton Khirnov
ec6402b7c5
lavc: use designated initialisers for all codecs.
...
It's more readable and less prone to breakage.
14 years ago
Diego Biurrun
f6f95d4e49
doxygen: consistently place brief description
14 years ago
Stefano Sabatini
1863a3c7aa
tiff: print log in case of unknown / unsupported tag.
...
Helps debugging.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Stefano Sabatini
a43458d7eb
tiff: fix linesize for mono-white/black formats.
...
Fix decoding of file Test_1bpp.tif
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Stefano Sabatini
7ca5338b49
tiff: set palette in the context when specified in TIFF_PAL tag
...
Since image initialization was moved after tag parsing, the
palette needs to be specified in the context and then copied
to the allocated image in init_image().
Fixes a regression with TIFF images that have palette data,
trac issue #230 , file Test_Flate_8bpp.tif.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago
Stefano Sabatini
bbc572a2c4
tiff: add support for SamplesPerPixel tag in tiff_decode_tag()
...
Format detection and internal frame initialization is moved to a
separate init_image() function, which is called when all the tags have
been read, and so both BitsPerSample and SamplesPerPixel information
has been collected.
This fixes decoding of the file 11.tiff from roundup issue #1925 .
Based on a patch by Kostya Shishkov <kostya.shishkov@gmail.com>.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago