summaryrefslogtreecommitdiff
path: root/libavcodec/mjpegdec.h
Commit message (Collapse)AuthorAge
* avcodec/g2meet, mjpegdec: Factor out common VLC initialization codeAndreas Rheinhardt2021-02-23
| | | | | | | | | While just at it, remove the nb_codes parameter: It is redundant (the number of codes is implicitly contained in the array containing how many entries of a specific size there are) and for this reason it might even be wrong, so it is better to check what is actually used instead. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavc/mjpegdec: cosmetics, org->origAnton Khirnov2021-01-01
|
* lavu/mem: move the DECLARE_ALIGNED macro family to mem_internal on next+1 bumpAnton Khirnov2021-01-01
| | | | They are not properly namespaced and not intended for public use.
* smvjpegdec: merge into mjpegdecAnton Khirnov2020-12-10
| | | | | | | | | | | | | | | | | | | | | | | SMVJPEG stores frames as slices of a big JPEG image. The decoder is implemented as a wrapper that instantiates a full internal MJPEG decoder, then forwards the decoded frames with offset data pointers. This is unnecessarily complex and fragile, not supporting useful decoder capabilities like direct rendering. Re-implement the decoder inside the MJPEG decoder, which is accomplished by returning each decoded frame multiple times, setting cropping information appropriately on each instance. One peculiar aspect of the previous design is that since - the smvjpeg decoder returns one frame per input packet - there are multiple frames in each packets (the aformentioned slices) the demuxer needs to return each packet multiple times. This is now also eliminated - the demuxer now returns each packet exactly once, with the duration set to the number of frames it decodes to. This also removes one of the last remaining internal uses of the old video decoding API.
* mjpegdec: convert to receive_frame()Anton Khirnov2020-12-10
| | | | This will be useful in the following commit.
* lavc/mjpegdec: Decode Huffman-coded lossless JPEGs embedded in DNGsNick Renieris2019-09-02
| | | | | | | | | | | Main image data in DNGs is usually comprised of tiles, each of which is a Huffman-encoded lossless JPEG. Tested for ljpeg regressions with: `ffmpeg -f lavfi -i testsrc=d=1 -vcodec ljpeg test.avi` `ffmpeg test.avi out.avi` The modified code in ljpeg_decode_rgb_scan runs without issues. Signed-off-by: Nick Renieris <velocityra@gmail.com>
* avcodec/mjpegdec: Check input buffer size.Michael Niedermayer2018-04-12
| | | | | | | | Fixes: Timeout Fixes: 6381/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEGLS_fuzzer-5665032743419904 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mjpegdec: Add hwaccel hooksMark Thompson2018-02-21
| | | | | Also adds some extra fields to the main context structure that may be needed by a hwaccel decoder.
* fix MSVC compilation errorsMateusz2017-12-10
| | | | | | | | | After commit 3701d49 'error_resilience: remove avpriv_atomic usage' we have included windows.h in much more files and we should avoid conflicts with defines/function declarations. Signed-off-by: Mateusz Brzostek <mateuszb@poczta.onet.pl> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/blockdsp : add AVX versionMartin Vignali2017-10-03
| | | | | | | Also modify the required alignment, to 32 instead of 16 for several codecs Signed-off-by: James Almer <jamrial@gmail.com>
* mjpeg: Add support for ICC side dataDerek Buitenhuis2017-08-25
| | | | | | | | JPEGs store embedded profiles under the APP2 marker, signified with a "ICC_PROFILE" null-terminated string header, and can be split across multiple APP2 markers, out of order. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/mjpegdec: quant_matrixes can be up to 65535, use uint16_tMichael Niedermayer2017-03-20
| | | | | | | | Fixes invalid shift Fixes: 870/clusterfuzz-testcase-5649105424482304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegdec: dont try to combine fields for decimated multiscope 2 materialMichael Niedermayer2015-06-21
| | | | | | Fixes Ticket4535 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/mjpegdec: Change upscale_* to an array instead of a bitmaskMichael Niedermayer2015-03-18
| | | | | | This allows storing integer factors instead of just 0 and 1 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avcodec/mjpegdec: simplify chroma_height calculationMichael Niedermayer2014-10-21
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit 'e3fcb14347466095839c2a3c47ebecff02da891e'Michael Niedermayer2014-07-01
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e3fcb14347466095839c2a3c47ebecff02da891e': dsputil: Split off IDCT bits into their own context Conflicts: configure libavcodec/aic.c libavcodec/arm/Makefile libavcodec/arm/dsputil_init_arm.c libavcodec/arm/dsputil_init_armv6.c libavcodec/asvdec.c libavcodec/dnxhdenc.c libavcodec/dsputil.c libavcodec/dvdec.c libavcodec/dxva2_mpeg2.c libavcodec/intrax8.c libavcodec/mdec.c libavcodec/mjpegdec.c libavcodec/mjpegenc_common.h libavcodec/mpegvideo.c libavcodec/ppc/dsputil_altivec.h libavcodec/ppc/dsputil_ppc.c libavcodec/ppc/idctdsp.c libavcodec/x86/Makefile libavcodec/x86/dsputil_init.c libavcodec/x86/dsputil_mmx.c libavcodec/x86/dsputil_x86.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dsputil: Split off IDCT bits into their own contextDiego Biurrun2014-06-30
| |
* | Merge commit 'e74433a8e6fc00c8dbde293c97a3e45384c2c1d9'Michael Niedermayer2014-06-19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e74433a8e6fc00c8dbde293c97a3e45384c2c1d9': dsputil: Split clear_block*/fill_block* off into a separate context Conflicts: configure libavcodec/asvdec.c libavcodec/dnxhddec.c libavcodec/dnxhdenc.c libavcodec/dsputil.h libavcodec/eamad.c libavcodec/intrax8.c libavcodec/mjpegdec.c libavcodec/ppc/dsputil_ppc.c libavcodec/vc1dec.c libavcodec/x86/dsputil_init.c libavcodec/x86/dsputil_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * dsputil: Split clear_block*/fill_block* off into a separate contextDiego Biurrun2014-06-18
| |
* | avcodec/jpeglsdec: add PAL8 supportMichael Niedermayer2014-04-01
| | | | | | | | | | | | Fixes Ticket3478 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mjpegdec: parse adobe_transformMichael Niedermayer2014-02-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mjpegdec: pass into ff_mjpeg_decode_sos() and check bitmask sizeMichael Niedermayer2014-01-31
| | | | | | | | | | | | | | Fixes: heap array overread Fixes: asan_heap-oob_149b2bc_6577_m1.mxg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mjpegdec: parse JPS extension and save relevant stereo3d informationKirill Gavrilov2014-01-30
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2014-01-09
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: mjpegdec: apply flipping after decoding, not before Conflicts: libavcodec/mjpegdec.c libavcodec/mjpegdec.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mjpegdec: apply flipping after decoding, not beforeAnton Khirnov2014-01-09
| | | | | | | | This is simpler and removes a silly restriction on edges being present.
* | Merge commit 'e2274aa555f023e4f4e4819bf29b2d7e0adec7d5'Michael Niedermayer2013-12-09
|\| | | | | | | | | | | | | | | | | | | * commit 'e2274aa555f023e4f4e4819bf29b2d7e0adec7d5': mjpegdec: use the AVFrame API properly. Conflicts: libavcodec/mjpegdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mjpegdec: use the AVFrame API properly.Anton Khirnov2013-12-09
| |
| * mjpeg: Use hpeldsp instead of dsputil for half-pel functionsRonald S. Bultje2013-04-19
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | avcodec/mjpegdec: Read EXIF metadata in JPEG input.Thilo Borgmann2013-08-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mjpegdec: parse app-xfrmMichael Niedermayer2013-07-11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mjpegdec: parse app-colrMichael Niedermayer2013-07-11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mjpegdec: Fix used quant index for gbrMichael Niedermayer2013-07-11
| | | | | | | | | | | | Fixes Ticket1651 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mjpeg: use hpeldsp instead of dsputil for half-pel functions.Ronald S. Bultje2013-03-13
| |
* | Merge commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f'Michael Niedermayer2013-01-23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f': Drop DCTELEM typedef Conflicts: libavcodec/alpha/dsputil_alpha.h libavcodec/alpha/motion_est_alpha.c libavcodec/arm/dsputil_init_armv6.c libavcodec/bfin/dsputil_bfin.h libavcodec/bfin/pixels_bfin.S libavcodec/cavs.c libavcodec/cavsdec.c libavcodec/dct-test.c libavcodec/dnxhdenc.c libavcodec/dsputil.c libavcodec/dsputil.h libavcodec/dsputil_template.c libavcodec/eamad.c libavcodec/h264_cavlc.c libavcodec/h264idct_template.c libavcodec/mpeg12.c libavcodec/mpegvideo.c libavcodec/mpegvideo.h libavcodec/mpegvideo_enc.c libavcodec/ppc/dsputil_altivec.c libavcodec/proresdsp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Drop DCTELEM typedefDiego Biurrun2013-01-22
| | | | | | | | | | | | It does not help as an abstraction and adds dsputil dependencies. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | Merge commit 'df9b9567518f2840d79a4a96b447ebe1aa326408'Michael Niedermayer2012-12-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'df9b9567518f2840d79a4a96b447ebe1aa326408': lavc: fix decode_frame() third parameter semantics for video decoders Conflicts: libavcodec/cscd.c libavcodec/eamad.c libavcodec/ffv1dec.c libavcodec/gifdec.c libavcodec/h264.c libavcodec/iff.c libavcodec/mjpegdec.c libavcodec/pcx.c libavcodec/vp56.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: fix decode_frame() third parameter semantics for video decodersAnton Khirnov2012-12-04
| | | | | | | | It's got_frame, not data size
* | cosmetics: minor libavcodec spelling errorsLou Logan2012-06-29
| | | | | | | | | | | | Also update some common misspelled words in patcheck Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Support decoding of some unusual jpeg samples.Carl Eugen Hoyos2012-01-06
| | | | | | | | | | | | Avoid unsupported pix_fmts by upscaling chroma. Fixes ticket #878.
* | Support decoding yuv442 and yuv421 jpeg images.Carl Eugen Hoyos2011-12-27
| | | | | | | | Fixes ticket #787.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-09-01
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (31 commits) libx264: set default thread count to 0 (auto) lavc: cosmetics, group deprecated codec flags mpeg12: add 'scan_offset' private option. h263/p encoder: add 'structured_slices' private option. h263/p encoder: add 'obmc' private option. h263p encoder: add 'aiv' private option. h263p encoder: add 'umv' private option. mpeg12enc/mpeg4videoenc: add 'alternate_scan' private option. mjpegdec: add 'extern_huff' private option. mpeg4enc: add 'data_partitioning' private option. snow: add 'memc_only' private option. libx264: add 'mbtree' private option. libx264: add 'psy' private option. libmp3lame: add 'reservoir' private option. mpeg2enc: add 'non_linear_quant' private option mpeg12enc: add drop_frame_timecode private option. mpeg12enc: add intra_vlc private option. VC1: Support dynamic dimension changes mjpeg: treat external huffman table setup failure as codec init failure if external huffman table use requested lavc: deprecate CODEC_FLAG2_BRDO ... Conflicts: avconv.c libavcodec/libmp3lame.c libavcodec/libx264.c libavcodec/mjpegdec.c libavcodec/mpeg12enc.c libavcodec/mpegvideo.h libavcodec/vc1.c libavcodec/vc1dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mjpegdec: add 'extern_huff' private option.Anton Khirnov2011-08-31
| | | | | | | | Deprecate CODEC_FLAG_EXTERN_HUFF
| * Add support for picture_ptr field in MJpegDecodeContextanatoly2011-03-30
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * Move MJPEG's input buffer preprocessing in separate public functionanatoly2011-03-30
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * Support reference picture defined by bitmask in MJPEG's SOS decoderanatoly2011-03-30
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Add support for picture_ptr field in MJpegDecodeContextanatoly2011-04-26
| | | | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Move MJPEG's input buffer preprocessing in separate public functionanatoly2011-04-26
| | | | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Support reference picture defined by bitmask in MJPEG's SOS decoderanatoly2011-04-26
|/ | | | | | | With cleanup & simplification by me Signed-off-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Add a seperate VLC table for progressive jpeg so we dont have to subtract 16 ↵Michael Niedermayer2010-10-21
| | | | | | in the inner loop. Originally committed as revision 25545 to svn://svn.ffmpeg.org/ffmpeg/trunk