Commit Graph

243 Commits

Author SHA1 Message Date
Michael Niedermayer
7727f76230 avcodec/tiff: Support uncompressed G3 CCITT fax
Fixes part of Ticket700

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-13 17:02:05 +02:00
Michael Niedermayer
dd1b4ed6d9 avcodec/tiff: Support uncompressed G4 CCITT fax
Fixes part of ticket700

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-13 16:33:36 +02:00
Michael Niedermayer
29d147c94d Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'
* commit '059a934806d61f7af9ab3fd9f74994b838ea5eba':
  lavc: Consistently prefix input buffer defines

Conflicts:
	doc/examples/decoding_encoding.c
	libavcodec/4xm.c
	libavcodec/aac_adtstoasc_bsf.c
	libavcodec/aacdec.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.h
	libavcodec/asvenc.c
	libavcodec/avcodec.h
	libavcodec/avpacket.c
	libavcodec/dvdec.c
	libavcodec/ffv1enc.c
	libavcodec/g2meet.c
	libavcodec/gif.c
	libavcodec/h264.c
	libavcodec/h264_mp4toannexb_bsf.c
	libavcodec/huffyuvdec.c
	libavcodec/huffyuvenc.c
	libavcodec/jpeglsenc.c
	libavcodec/libxvid.c
	libavcodec/mdec.c
	libavcodec/motionpixels.c
	libavcodec/mpeg4videodec.c
	libavcodec/mpegvideo.c
	libavcodec/noise_bsf.c
	libavcodec/nuv.c
	libavcodec/nvenc.c
	libavcodec/options.c
	libavcodec/parser.c
	libavcodec/pngenc.c
	libavcodec/proresenc_kostya.c
	libavcodec/qsvdec.c
	libavcodec/svq1enc.c
	libavcodec/tiffenc.c
	libavcodec/truemotion2.c
	libavcodec/utils.c
	libavcodec/utvideoenc.c
	libavcodec/vc1dec.c
	libavcodec/wmalosslessdec.c
	libavformat/adxdec.c
	libavformat/aiffdec.c
	libavformat/apc.c
	libavformat/apetag.c
	libavformat/avidec.c
	libavformat/bink.c
	libavformat/cafdec.c
	libavformat/flvdec.c
	libavformat/id3v2.c
	libavformat/isom.c
	libavformat/matroskadec.c
	libavformat/mov.c
	libavformat/mpc.c
	libavformat/mpc8.c
	libavformat/mpegts.c
	libavformat/mvi.c
	libavformat/mxfdec.c
	libavformat/mxg.c
	libavformat/nutdec.c
	libavformat/oggdec.c
	libavformat/oggparsecelt.c
	libavformat/oggparseflac.c
	libavformat/oggparseopus.c
	libavformat/oggparsespeex.c
	libavformat/omadec.c
	libavformat/rawdec.c
	libavformat/riffdec.c
	libavformat/rl2.c
	libavformat/rmdec.c
	libavformat/rtpdec_latm.c
	libavformat/rtpdec_mpeg4.c
	libavformat/rtpdec_qdm2.c
	libavformat/rtpdec_svq3.c
	libavformat/sierravmd.c
	libavformat/smacker.c
	libavformat/smush.c
	libavformat/spdifenc.c
	libavformat/takdec.c
	libavformat/tta.c
	libavformat/utils.c
	libavformat/vqf.c
	libavformat/westwood_vqa.c
	libavformat/xmv.c
	libavformat/xwma.c
	libavformat/yop.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 23:15:19 +02:00
Michael Niedermayer
444e9874a7 Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
* commit 'def97856de6021965db86c25a732d78689bd6bb0':
  lavc: AV-prefix all codec capabilities

Conflicts:
	cmdutils.c
	ffmpeg.c
	ffplay.c
	libavcodec/8svx.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/adpcm.c
	libavcodec/alac.c
	libavcodec/atrac3plusdec.c
	libavcodec/bink.c
	libavcodec/dnxhddec.c
	libavcodec/dvdec.c
	libavcodec/dvenc.c
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c
	libavcodec/fic.c
	libavcodec/flacdec.c
	libavcodec/flacenc.c
	libavcodec/flvdec.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/gifdec.c
	libavcodec/h261dec.c
	libavcodec/hevc.c
	libavcodec/iff.c
	libavcodec/imc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libvo-aacenc.c
	libavcodec/libvorbisenc.c
	libavcodec/libvpxdec.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpegaudiodec_float.c
	libavcodec/msmpeg4dec.c
	libavcodec/mxpegdec.c
	libavcodec/nvenc_h264.c
	libavcodec/nvenc_hevc.c
	libavcodec/pngdec.c
	libavcodec/qpeg.c
	libavcodec/ra288.c
	libavcodec/rv10.c
	libavcodec/s302m.c
	libavcodec/sp5xdec.c
	libavcodec/takdec.c
	libavcodec/tiff.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/vp6.c
	libavcodec/vp9.c
	libavcodec/wavpack.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:50:18 +02:00
Vittorio Giovara
059a934806 lavc: Consistently prefix input buffer defines
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:59 +01:00
Vittorio Giovara
def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
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>
2015-03-08 23:36:46 +01:00
Michael Niedermayer
9889762a9b Merge commit 'ae5e1f3d663a8c9a532d89e588cbc61f171c9186'
* commit 'ae5e1f3d663a8c9a532d89e588cbc61f171c9186':
  tiff: Check that there is no aliasing in pixel format selection

See: e1c0cfaa41
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-08 23:19:30 +01:00
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>
2015-03-08 19:14:14 +01:00
Carl Eugen Hoyos
50144b91ea Respect horizontal differencing predictor for 16bit gray tiff images.
Fixes ticket #4291.
2015-01-30 14:12:55 +01:00
Michael Niedermayer
3779973a9b Merge commit 'f86f39cb9b1fcd063d5e4812132a75c06cc7acd2'
* commit 'f86f39cb9b1fcd063d5e4812132a75c06cc7acd2':
  tiff: support decoding GBRP and GBRAP formats

Conflicts:
	libavcodec/tiff.c

See: 379ad9788b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-15 06:11:32 +01:00
Paul B Mahol
f86f39cb9b tiff: support decoding GBRP and GBRAP formats
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-01-14 17:17:24 +01:00
Carl Eugen Hoyos
3a3790b8f8 tiff: support encoding and decoding 64bit images 2014-12-18 23:22:59 +01:00
Matthew Oliver
293fee4bc2 libavcodec/tiff: Fix static linking of lzma with msvc.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-22 22:12:19 +01:00
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