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
Paul B Mahol
8a7295beeb
tiff: frame multithreading support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Thilo Borgmann
b7ba7cbd6e
avcodec/tiff: Refactor TIFF tag related functions to share the code.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
61e0e80999
tiff: continue parsing on non fatal errors
...
Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
200170e8c0
avcodec/tiff: remove redundant check
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a9553e8f37
avcodec/tiff: avoid seek back on reading tags
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Paul B Mahol
86005184e3
tiff: simplify picking right pixel format
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
8cc8adaa88
tiff: correctly decode saparate planes with horizontal differencing predictor
...
Closes #2648 .
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
bbae652113
tiff: fix memleak
...
Fixes CID1026764
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
46ce9ded96
tiff: K&R formatting cosmetics
12 years ago
Carl Eugen Hoyos
a4b5863eea
Fix compilation of libavcodec/tiff.c
12 years ago
Paul B Mahol
379ad9788b
tiff: planar rgb
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
7984ed87c1
tiff: support inverted fill_order for packbits compression
...
Fixes #1995 .
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
30d7dcce4c
tiff: add helper function for fill_order case
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Hendrik Leppkes
edcc51fb8e
tiff: fix handling of metadata with refcounted frames
...
Since the conversion to refcounted frames, the tiff decoder
only wrote the metadata into its internal "picture" in its own context,
never exposing the metadata to the user, and eventually leaking the
metadata.
Instead, properly store the metadata directly into the frame being decoded into.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
1ec94b0f06
lavc: factorize ff_{thread_,re,}get_buffer error messages.
...
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Michael Niedermayer
f232659130
tiff: use AVFrame accessor functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago