Carl Eugen Hoyos
beb877bae0
lavc/tiff: Print compression debug information.
8 years ago
Michael Niedermayer
89f464e9c2
avcodec/tiff: Check subsample & rps values more completely
...
Fixes out of array access
Fixes: 83aedfb29af669c4d6e10f1bfad974d2/asan_heap-oob_1ab42fe_4984_9f6ec14462f8d8a00ea24b320572a963.tif
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
7727f76230
avcodec/tiff: Support uncompressed G3 CCITT fax
...
Fixes part of Ticket700
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Michael Niedermayer
dd1b4ed6d9
avcodec/tiff: Support uncompressed G4 CCITT fax
...
Fixes part of ticket700
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Vittorio Giovara
059a934806
lavc: Consistently prefix input buffer defines
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
d5e9fc7821
avcodec/tiff: move bpp check to after "end:"
...
This ensures that all current and future code-pathes get bpp checked
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Carl Eugen Hoyos
50144b91ea
Respect horizontal differencing predictor for 16bit gray tiff images.
...
Fixes ticket #4291 .
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
Matthew Oliver
293fee4bc2
libavcodec/tiff: Fix static linking of lzma with msvc.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
e1c0cfaa41
avcodec/tiff: more completely check bpp/bppcount
...
Fixes pixel format selection
Fixes out of array accesses
Fixes: asan_heap-oob_1766029_6_asan_heap-oob_20aa045_332_cov_1823216757_m2-d1d366d7965db766c19a66c7a2ccbb6b.tif
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
6beea6f017
avcodec/tiff: fix odd dimensioned yuv
...
Fixes Ticket3893
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Benoit Fouet
4f10495055
tiff: fix {2,4}bpp grayscale palettes.
...
Create a default grayscale palette for 2 or 4 bpp grayscale tiff, if
there is no palette defined.
Fixes ticket #3915
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
ab1e431288
avcodec/tiff: Make pixel format checks tighter
...
Fixes assertion failure with imgsrc001-lzma.tiff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
b140b51ebb
lavc/tiff: add support for LZMA compression
...
Derived from deflate code.
Requires liblzma.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
201a511bb9
lavc/tiff: add support for YUV deflate
...
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
James Almer
b4231b4fed
lavc/tiff: move unpack_yuv() above the deflate functions
...
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Michael Niedermayer
f0c0ae37c6
avcodec/tiff: Check that pix_fmt is a yuv variant for TIFF_PHOTOMETRIC_YCBCR
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
6ea69a8ffa
avcodec/tiff: do not use photometric to detect pix_fmt
...
They should match but they do not always
Fixes assertion failure
no testcase with unmodified source available
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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>
10 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>
10 years ago
Carl Eugen Hoyos
60cbd6ad84
tiff: support reading gray+alpha at 8 bits
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Vittorio Giovara
bcc5f69b33
tiff: support reading gray+alpha at 16 bits
10 years ago
Diego Biurrun
df507d5aa0
tiff: Replace deprecated PIX_FMT names by modern ones
10 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.
10 years ago
Carl Eugen Hoyos
b31d76e45f
tiff: support reading gray+alpha at 8 bits
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Michael Niedermayer
1e25afc181
avcodec/tiff: Support 410 and 440 YCbCr
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f694ca7ca7
avcodec/tiff: support 4:2:2 and 4:1:1 YCbCr
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d03defa778
avcodec/tiff: Support yuv 420 and 444
...
Fixes Ticket416
Trolled-by: jb
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
1ca21e1b76
avcodec/tiff: parse subsample factors
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
8c88ea76df
avcodec/tiff: use av_malloc(z)_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a94de50ba0
avcodec/exif/exif_add_metadata: add support for SSHORT & SBYTE
...
No working testcase, this omission was just spoted when the parser apparently went out of
sync.
Reviewed-by; Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
1dc2d4a8ef
avcodec/tiff: remove unused variables
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Carl Eugen Hoyos
993a5afaad
Read aspect ratio from tiff image files.
11 years ago
Sylvain Fabre
526049ce61
Issue-#3407 : Enhance precision for double to string conversion, useful for GEOTIFF double values
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a744064c41
avcodec/tiff: reset geotag_count in free_geotags()
...
Fixes null pointer dereference
Fixes: signal_sigsegv_19d922e_3688_cov_1577641655_aletrek_tiff.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
c265b8bb76
tiff: stop using deprecated avcodec_set_dimensions
11 years ago
Michael Niedermayer
46143d2555
avcodec/tiff: factorize offset init code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d5ad4e4a2f
avcodec/tiff: remove TIFF_LONG special case
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
0aba920d61
avcodec/tiff: Fix use of uninitialized off variable
...
Fixes CID1108608
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6338f1b3c0
avcodec/tiff: remove byte based bpp special case
...
This case does not work as off is uninitialized and it should be
handled fine by the generic code below
Fixes CID1108608
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago