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>
2014-10-03 16:33:06 +02:00
Michael Niedermayer
6beea6f017
avcodec/tiff: fix odd dimensioned yuv
...
Fixes Ticket3893
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-15 01:38:02 +02:00
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>
2014-09-05 12:57:22 +02:00
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>
2014-08-24 01:55:19 +02:00
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>
2014-08-24 01:21:39 +02:00
James Almer
201a511bb9
lavc/tiff: add support for YUV deflate
...
Signed-off-by: James Almer <jamrial@gmail.com>
2014-08-19 18:48:39 -03:00
James Almer
b4231b4fed
lavc/tiff: move unpack_yuv() above the deflate functions
...
Signed-off-by: James Almer <jamrial@gmail.com>
2014-08-19 18:48:31 -03:00
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>
2014-08-19 21:09:07 +02:00
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>
2014-08-19 21:09:07 +02:00
Michael Niedermayer
3f0c76e262
Merge commit '12640e4cbb142be0cd025bcf37f1ea437bdfecd0'
...
* commit '12640e4cbb142be0cd025bcf37f1ea437bdfecd0':
tiff: Return proper error for missing LZMA compression
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-18 19:52:22 +02:00
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>
2014-08-18 14:23:24 +02:00
Michael Niedermayer
61b9ce00a3
Merge commit '2597a842a0a2c7e8aa76f32733d27bf64817ae86'
...
* commit '2597a842a0a2c7e8aa76f32733d27bf64817ae86':
tiff: Improve grayscale support
Conflicts:
libavcodec/tiff.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-10 18:40:46 +02:00
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>
2014-08-10 15:21:44 +02:00
Michael Niedermayer
8f83fb9991
Merge commit '60cbd6ad84de0931314030b81df87b69d6196587'
...
* commit '60cbd6ad84de0931314030b81df87b69d6196587':
tiff: support reading gray+alpha at 8 bits
Conflicts:
libavcodec/tiff.c
See: f746f37901
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 22:52:01 +02:00
Michael Niedermayer
47080b6d17
Merge commit 'bcc5f69b33e27b5e11aaea8304ee02f8d895cdab'
...
* commit 'bcc5f69b33e27b5e11aaea8304ee02f8d895cdab':
tiff: support reading gray+alpha at 16 bits
Conflicts:
libavcodec/tiff.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 22:45:33 +02:00
Carl Eugen Hoyos
60cbd6ad84
tiff: support reading gray+alpha at 8 bits
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-08-04 12:57:39 +01:00
Vittorio Giovara
bcc5f69b33
tiff: support reading gray+alpha at 16 bits
2014-08-04 12:57:38 +01:00
Diego Biurrun
df507d5aa0
tiff: Replace deprecated PIX_FMT names by modern ones
2014-08-02 12:54:37 -07:00
Janne Grunau
a9f3f5fadb
Revert "tiff: support reading gray+alpha at 8 bits"
...
This reverts commit b31d76e45f
as it
uses an unkown pixel format.
2014-07-21 08:35:32 +02:00
Carl Eugen Hoyos
b31d76e45f
tiff: support reading gray+alpha at 8 bits
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-07-20 23:32:13 +01:00
Michael Niedermayer
1e25afc181
avcodec/tiff: Support 410 and 440 YCbCr
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-30 17:41:31 +02:00
Michael Niedermayer
f694ca7ca7
avcodec/tiff: support 4:2:2 and 4:1:1 YCbCr
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-29 18:39:24 +02:00
Michael Niedermayer
d03defa778
avcodec/tiff: Support yuv 420 and 444
...
Fixes Ticket416
Trolled-by: jb
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-27 21:03:15 +02:00
Michael Niedermayer
1ca21e1b76
avcodec/tiff: parse subsample factors
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-27 18:44:58 +02:00
Michael Niedermayer
8c88ea76df
avcodec/tiff: use av_malloc(z)_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-20 17:32:17 +02:00
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>
2014-04-20 17:01:46 +02:00
Michael Niedermayer
1dc2d4a8ef
avcodec/tiff: remove unused variables
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 04:33:20 +02:00
Michael Niedermayer
a64d6d5152
Merge commit '345a96c327e8f2a8077189af9f5e8d2b3f4ad5fe'
...
* commit '345a96c327e8f2a8077189af9f5e8d2b3f4ad5fe':
tiffdec: remove an unneeded variable
Conflicts:
libavcodec/tiff.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 03:54:11 +02:00
Michael Niedermayer
b9b2f9d218
Merge commit 'a9b046fb0ae5395c4d1d8a82cd0d3e354b5034ed'
...
* commit 'a9b046fb0ae5395c4d1d8a82cd0d3e354b5034ed':
tiff: use a better name and enum values for PhotometricInterpretation
Conflicts:
libavcodec/tiff.c
libavcodec/tiff.h
libavcodec/tiffenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 03:45:45 +02:00
Michael Niedermayer
75b4e40137
Merge commit 'fdbe18b7b0545f9b5923d25a5433e4f735719ecc'
...
* commit 'fdbe18b7b0545f9b5923d25a5433e4f735719ecc':
tiffdec: use a single strip if RowsPerStrip is 0
Conflicts:
libavcodec/tiff.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 03:30:02 +02:00
Michael Niedermayer
94cf83ff91
Merge commit '0a467a9b594dd67aa96bad687d05f8845b009f18'
...
* commit '0a467a9b594dd67aa96bad687d05f8845b009f18':
tiffdec: use bytestream2 to simplify overread/overwrite protection
Conflicts:
libavcodec/tiff.c
See: 1ec83d9a9e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 03:20:09 +02:00
Michael Niedermayer
6145b1d9c1
Merge commit 'bf2064f046af64c59a416c814474a39b0a457569'
...
* commit 'bf2064f046af64c59a416c814474a39b0a457569':
tiffdec: rename variables for consistency and fix variable shadowing
Conflicts:
libavcodec/tiff.c
See: 251345a3fe
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 01:49:19 +02:00
Justin Ruggles
345a96c327
tiffdec: remove an unneeded variable
2014-04-12 14:52:10 -04:00
Jean First
e75ef2b7f4
tiffdec: support predictor type 2 with RGB48 pixel format
2014-04-12 14:52:10 -04:00
Justin Ruggles
a9b046fb0a
tiff: use a better name and enum values for PhotometricInterpretation
...
Also add additional known values and log as missing features.
2014-04-12 14:52:07 -04:00
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.
2014-04-12 14:49:08 -04:00
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
2014-04-12 14:49:08 -04:00
Jean First
bf2064f046
tiffdec: rename variables for consistency and fix variable shadowing
...
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2014-04-12 14:49:07 -04:00
Justin Ruggles
58bc38a5f2
tiffdec: use correct data type for palette entries and set alpha to 0xFF
2014-04-12 14:49:07 -04:00
Carl Eugen Hoyos
993a5afaad
Read aspect ratio from tiff image files.
2014-04-07 15:30:48 +02:00
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>
2014-02-23 13:03:18 +01:00
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>
2014-02-02 01:48:34 +01:00
Michael Niedermayer
ffd100b111
Merge commit 'c265b8bb7638546919465e3585441b1d40c4b13d'
...
* commit 'c265b8bb7638546919465e3585441b1d40c4b13d':
tiff: stop using deprecated avcodec_set_dimensions
targa: stop using deprecated avcodec_set_dimensions
svq1dec: stop using deprecated avcodec_set_dimensions
sunrast: stop using deprecated avcodec_set_dimensions
Conflicts:
libavcodec/sunrast.c
libavcodec/targa.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-01 15:43:29 +01:00
Anton Khirnov
c265b8bb76
tiff: stop using deprecated avcodec_set_dimensions
2013-10-31 20:14:16 +01:00
Michael Niedermayer
46143d2555
avcodec/tiff: factorize offset init code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-27 13:10:38 +01:00
Michael Niedermayer
d5ad4e4a2f
avcodec/tiff: remove TIFF_LONG special case
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-27 13:10:38 +01:00
Michael Niedermayer
0aba920d61
avcodec/tiff: Fix use of uninitialized off variable
...
Fixes CID1108608
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-27 13:10:38 +01:00
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>
2013-10-20 01:50:34 +02:00
Paul B Mahol
8a7295beeb
tiff: frame multithreading support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-08-13 19:29:10 +00:00
Thilo Borgmann
b7ba7cbd6e
avcodec/tiff: Refactor TIFF tag related functions to share the code.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-13 00:30:02 +02:00