Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-30avcodec/tiff: assert that raw tiff dng blit does not write over the end of a ↵Michael Niedermayer
line Found-by: 黄宁 <tsukimurarin@163.com> Reviewed-by: Nick Renieris <velocityra@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-04-30avcodec/tiff: Check for planar DNG imagesMichael Niedermayer
The DNG code hardcodes plane 0 at some places, so its better to disallow cases that have more planes. Fixes: eg_crash Found-by: 黄宁 <tsukimurarin@163.com> Reviewed-by: Nick Renieris <velocityra@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-04-30avcodec/tiff: Replace width overriding for bayer by assertMichael Niedermayer
This is less confusing Reviewed-by: Nick Renieris <velocityra@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-04-30avcodec/tiff: Some checks on bpp for DNGMichael Niedermayer
dng spec 1.5.0.0 "BitsPerSample Supported values are from 8 to 32 bits/sample. The depth must be the same for each sample if SamplesPerPixel is not equal to 1." Fixes: eg_crash Found-by: 黄宁 <tsukimurarin@163.com> Reviewed-by: Nick Renieris <velocityra@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-04-10pthread_frame: merge the functionality for normal decoder init and ↵Anton Khirnov
init_thread_copy The current design, where - proper init is called for the first per-thread context - first thread's private data is copied into private data for all the other threads - a "fixup" function is called for all the other threads to e.g. allocate dynamically allocated data is very fragile and hard to follow, so it is abandoned. Instead, the same init function is used to init each per-thread context. Where necessary, AVCodecInternal.is_copy can be used to differentiate between the first thread and the other ones (e.g. for decoding the extradata just once).
2020-01-14tiffdec: support embedded ICC profilesLynne
2019-10-29avcodec/tiff: check the black level denominatorJames Almer
Fixes ticket #8327. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-03avcodec/tiff: Set FF_CODEC_CAP_INIT_CLEANUPMichael Niedermayer
Fixes: memleaks Fixes: 17813/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5145600206569472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-09-26Revert "lavc/tiff: correct the default value of YCbCrSubsampling to 2x2"Carl Eugen Hoyos
This reverts commit eb5d0f18ff609ba2280cea4e2c6286d216c8756b. Together with 89f464e9, it breaks decoding of tiff files like fate-suite/exif/image_small.tiff
2019-09-25lavc/tiff: correct the default value of YCbCrSubsampling to 2x2Pavel Skakov
2019-09-02avcodec/tiff: rewrite lut handlingPaul B Mahol
Remove endianess hack.
2019-09-02avcodec/tiff: set color_trc, remove sRGB conversionPaul B Mahol
2019-09-02lavc/tiff: Enable decoding of LinearRaw imagesNick Renieris
"LinearRaw" is a value that the PhotometricInterpretation tag can be set to on DNG images that contain color information for all channels instead of being bayer-encoded ("CFA" value). The DNG decoder is complete enough that we can enable this now. Sample: - http://www.rawsamples.ch/raws/nikon/SCANNER_NIKON_LS5000.DNG Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-02lavc/tiff: Default-initialize WhiteLevel DNG tag valueNick Renieris
Initialized to `(2 ^ BitsPerSample) - 1` as per the DNG Specification. Also make sure that `BlackLevel < WhiteLevel`. This fixes decoding for "X7 CinemaDNG" samples here: - https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-02lavc/tiff: Support DNGs with striped (non-tiled) JPEGs imagesNick Renieris
DNG samples here can now be decoded: - https://www.photographyblog.com/previews/pentax_k1_photos Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-02lavc/tiff: Decode 10-bit and 14-bit DNG imagesNick Renieris
10-bit sample: http://www.rawsamples.ch/raws/phones/RAW_ONEPLUS_ONE-A0001.DNG 14-bit sample: https://drive.google.com/open?id=0B4JyRT3Lth5HVndyOTVOdWktM3J4TFEydTk1MnY3RWlpSzVB Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-02lavc/tiff: Support decoding of DNGs with single-component JPEGsNick Renieris
This enables decoding of DNG images generated by the 'DJI Zenmuse X7' digital camera Samples: https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-02lavc/mjpegdec: Enable decoding of single-component bayer imagesNick Renieris
Also, ensure no false positives when determining DNG bayer images, by setting them in tiff.c instead of relying on a heuristic. There's no way to determine this just from the JPEG data, so we have to pass this information from outside the MJPEG decoder. Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-02lavc/tiff: Force DNG pixel data endianness on an edge caseNick Renieris
This fixes "X7 RAW" and "X7 CinemaDNG" samples here: - https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-02lavc/tiff: Don't apply strips-related logic to tiled imagesNick Renieris
Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-02lavc/tiff: Fix edge case with full-length/width tilesNick Renieris
When the height is equal to the tile length (full-height tile) after `height % tile_length` is applied with the current code, it results in the operating tile_length to be 0. This commit makes this leftover logic only applies if it's necessary. Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-02lavc/tiff: Apply color scaling to uncompressed DNGsNick Renieris
Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-02lavc/tiff: Convert DNGs to sRGB color spaceNick Renieris
Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-09-02lavc/tiff: Decode embedded JPEGs in DNG imagesNick Renieris
Used a technique similar to lavc/tdsc.c for invoking the MJPEG decoder. This commit adds support for: - DNG tiles - DNG tile huffman lossless JPEG decoding - DNG 8-bpp ("packed" as dcraw calls it) decoding - DNG color scaling [1] - LinearizationTable tag - BlackLevel tag [1]: As specified in the DNG Specification - Chapter 5 Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-08-28avcodec/tiff: add missing break in tiff_decode_tag()Paul B Mahol
2019-08-11avcodec/tiff: Enforce increasing offsetsMichael Niedermayer
This may break some valid tiff files, it appears the specification does not require the offsets to be increasing. They increase in the 2 test files i have though except the last offset which is 0 (an end marker) and for which a special case is added to avoid asking for a sample for that end marker. See: [FFmpeg-devel] [PATCH 2/2] avcodec/tiff: Detect infinite retry loop for an alternative implementation Fixes: Timeout (Infinite -> Finite) Fixes: 15706/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5114674904825856 This variant was requested by paul on IRC Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-05-30avcodec/tiff: Recognize DNG/CinemaDNG imagesNick Renieris
Additionally: - Renamed TIFF_WHITE_LEVEL to DNG_WHITE_LEVEL since it is specified in the DNG spec. - Added/changed some comments to be more precise in differentiating between TIFF, TIFF/EP and DNG values. Related to ticket: https://trac.ffmpeg.org/ticket/4364 Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-05-30libavcodec/tiff: Process SubIFDs tag with multiple entriesNick Renieris
SubIFDs that were part of more than single-sized "SubIFDs" tags were being ignored due to existing code ignoring that case. This patch makes is so the first entry is read, which is not ideal but enough for some DNG images present in the wild to be decodeable More specifically, the first SubIFD which we would process with this patch is the main image and the second one is a second thumbnail, which is not as important to decode. In DNG images with the .tiff extension, it solves the issue where the TIFF thumbnail in IFD 0 was incorrectly parsed (related confusion: [1]). Embedded thumbnails for DNG images can still be decoded with the "-thumbnail" option. Related to ticket: https://trac.ffmpeg.org/ticket/4364 [1]: https://superuser.com/questions/546879/creating-video-from-dng-images-with-ffmpeg Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-05-30avcodec/tiff: Option to decode embedded thumbnailNick Renieris
Adds the "-thumbnail" option, that works like the current "-subifd" option, but only for non-full-sized images. This is particularly useful for DNG images (see next commit) that have SubIFDs that are not necessarily thumbnails. Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-03-31avcodec/tiff: Multi-page supportNick Renieris
Option "-page N" (page index N starts from 1) can now be used to specify which TIFF page/subfile to decode. Signed-off-by: Nick Renieris <velocityra@gmail.com>
2019-03-24avcodec/tiff: do not allow bpp 40 with undefined pixel formatsMichael Niedermayer
Fixes: Out of array access, assertion failure Fixes: 13851/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5754570929602560 Fixes: 13869/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5695998313103360 Fixes: 13873/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5077273645940736 Fixes: 13874/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5756396757319680 Fixes: 13877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5741026750234624 Fixes: 13880/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5649148809838592 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-03-20lavc/tiff: Allow decoding of cmyka (five components).Carl Eugen Hoyos
Fixes ticket #7675.
2019-03-20lavc/tiff: Support decoding 16bit cmyk.Carl Eugen Hoyos
2019-01-20avcodec/tiff: Check for 12bit gray faxMichael Niedermayer
Fixes: Assertion failure Fixes: 11898/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5759794191794176 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-01-12lavc/tiff: Support CMYK images.Carl Eugen Hoyos
Fixes ticket #3459.
2018-12-17avcodec/tiff: add support for 12bit grayscale imagesPaul B Mahol
Fixes #4688.
2018-12-11lavc/tiff: Fix leak of yuv_line in TiffContext.Carl Hetherington
Signed-off-by: Carl Hetherington <cth@carlh.net>
2018-11-27avcodec/tiff: Fix integer overflows in left shift in init_image()Michael Niedermayer
Fixes: left shift of 255 by 24 places cannot be represented in type 'int' Fixes: 11377/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5694319101476864 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-26avcodec/tiff: Limit filtering to decoded dataMichael Niedermayer
Fixes: Timeout Fixes: 11068/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5698456681709568 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-11-12avcodec/tiff: add initial bayer and sub image supportPaul B Mahol
2018-10-03avcodec/tiff: check remaining packet size for stripsMichael Niedermayer
Fixes: Timeout Fixes: 10280/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5676217211027456 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-09-09avcodec/tiff: check ff_lzw_decode_open() for failurePaul B Mahol
2017-06-23avcodec/tiff: Update pointer only when the result is usedMichael Niedermayer
Fixes: runtime error: signed integer overflow: 538976288 * 32 cannot be represented in type 'int' Fixes: 2310/clusterfuzz-testcase-minimized-4534784887881728 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-11avcodec/tiff: Fix leak of geotags[].valMichael Niedermayer
Fixes: 2176/clusterfuzz-testcase-minimized-5908197216878592 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-05avcodec/tiff: Avoid loosing allocated geotag valuesMichael Niedermayer
Fixes memleak Fixes: 2076/clusterfuzz-testcase-minimized-6542640243802112 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-04avcodec/tiff: Clear deinvert_buf_size on deallocationMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-06-04avcodec/tiff: Use av_fast_padded_malloc() in tiff_unpack_fax()Michael Niedermayer
Fixes: Timeout Fixes: 1213/clusterfuzz-testcase-minimized-6022987469815808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-16avcodec/tiff: reset sampling[] if its invalidMichael Niedermayer
Fixes divission by 0 Fixes: clusterfuzz-testcase-minimized-5592896440893440 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-23avcodec: do not use AVFrame accessorMuhammad Faiz
Reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2017-04-11avcodec/tiff: Factor constant computation out of inner loopMichael Niedermayer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>