summaryrefslogtreecommitdiffstats
path: root/libavcodec/mjpegdec.c
Commit message (Collapse)AuthorAgeFilesLines
* lavc/mjpegdec: use ptrdiff_t instead of ssize_tMatthieu Bouron2016-01-281-2/+2
| | | | Fixes build on msvc.
* lavc/mjpegdec: speed up scan data copyMatthieu Bouron2016-01-271-10/+40
|
* avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPATDerek Buitenhuis2016-01-271-8/+8
| | | | | | | | | | Libav, for some reason, merged this as a public API function. This will aid in future merges. A define is left for backwards compat, just in case some person used it, since it is in a public header. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* lavc/mjpegdec: Set SAR even if no resolution is available.Carl Eugen Hoyos2016-01-271-1/+5
| | | | Fixes ticket #4479.
* avcodec/mjpegdec: Check for end for both bytes in unescapingMichael Niedermayer2016-01-211-1/+1
| | | | | | | | Fixes assertion failure Fixes: c40c779601b77dc6e19aaea0b04b9751/signal_sigabrt_7ffff6ae7cb7_5769_b94f6ec70caecb2d3d76b4771b109ac1.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegdec: Fix negative shiftMichael Niedermayer2016-01-101-1/+1
| | | | | | | Fixes: mjpeg_left_shift.avi Found-by: Piotr Bandurski <ami_stuff@o2.pl> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mjpegdec: extend check for incompatible values of s->rgb and s->lsAndreas Cadhalpun2015-12-311-1/+2
| | | | | | | | | | | | | | This can happen if s->ls changes from 0 to 1, but picture allocation is skipped due to s->interlaced. In that case ff_jpegls_decode_picture could be called even though the s->picture_ptr frame has the wrong pixel format and thus a wrong linesize, which results in a too small zero buffer being allocated. This fixes an out-of-bounds read in ls_decode_line. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* mjpegdec: consider chroma subsampling in size checkAndreas Cadhalpun2015-12-061-3/+8
| | | | | | | | | | | | If the chroma components are subsampled, smaller buffers are allocated for them. In that case the maximal block_offset for the chroma components is not as large as for the luma component. This fixes out of bounds writes causing segmentation faults or memory corruption. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* avcodec: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-041-1/+1
|
* avcodec/mjpegdec: fix typo on a warningJames Almer2015-11-251-1/+1
|
* lavc/mjpegdec: set FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM capabilityMatthieu Bouron2015-11-151-1/+2
|
* avcodec/mjpegdec: Reinitialize IDCT on BPP changesMichael Niedermayer2015-11-041-4/+15
| | | | | | | | Fixes misaligned access Fixes: dc9262a469f6f315f74c087a7b3a7f35/signal_sigsegv_2e95bcd_9_9c0f9f4a9ba82aa9b3ab2b91ce4d5277.jpg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegdec: Check index in ljpeg_decode_yuv_scan() before using itMichael Niedermayer2015-11-041-2/+8
| | | | | | | | Fixes: 04715144ba237443010554be0d05343f/asan_heap-oob_1eafc76_1737_c685b48041a563461839e4e7ab97abb8.jpg Fixes out of array access Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/mjpegdec: honor skip_frame optionMatthieu Bouron2015-10-291-0/+25
|
* avcodec/mjpegdec: Fix decoding RGBA RCT LJPEGMichael Niedermayer2015-09-111-1/+8
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Replace all remaining occurances of step/depth_minus1 and offset_plus1Hendrik Leppkes2015-09-081-1/+1
|
* avcodec/mjpegdec: Remove message asking for a non mod 16 AMV sampleMichael Niedermayer2015-08-241-3/+0
| | | | | | Ticket4770 contains such a sample and it decodes fine Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/mjpegdec: Detect more CMYK images.Carl Eugen Hoyos2015-08-171-0/+6
| | | | Fixes ticket #4772.
* lavc: Remove newline from avpriv_request_sample() calls.Carl Eugen Hoyos2015-08-111-1/+1
|
* Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-271-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-271-2/+2
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-271-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-271-2/+2
| | | | | | | | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | lavc: Add properties field to AVCodecContext.Carl Eugen Hoyos2015-07-161-0/+2
| | | | | | | | The new field can hold information about losslessness and closed captions for now.
* | avcodec/mjpegdec: Fix DC overflow in decode_block()Michael Niedermayer2015-07-151-0/+1
| | | | | | | | | | | | Fixes Ticket4683 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/mjpegdec: Reorder operations to avoid undefined behaviorMichael Niedermayer2015-07-021-4/+4
| | | | | | | | | | | | | | Fixes: asan_heap-oob_1dd60fd_267_cov_2954683513_5baad44ca4702949724234e35c5bb341.jpg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mjpegdec: Fix small picture upscaleMichael Niedermayer2015-06-301-4/+6
| | | | | | | | | | | | | | | | | | Fixes out of array access Fixes: asan_heap-oob_1dd60fd_267_cov_2954683513_5baad44ca4702949724234e35c5bb341.jpg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mjpegdec: dont try to combine fields for decimated multiscope 2 materialMichael Niedermayer2015-06-211-0/+3
| | | | | | | | | | | | Fixes Ticket4535 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mjpegdec: fix len computation in ff_mjpeg_decode_dqt()Michael Niedermayer2015-05-131-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mjpegdec: Check len in ff_mjpeg_decode_dht()Michael Niedermayer2015-05-131-0/+5
| | | | | | | | | | | | Fixes CID1239167 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mjpegdec: Check len in ff_mjpeg_decode_dqt()Michael Niedermayer2015-05-131-0/+5
| | | | | | | | | | | | Fixes CID1239060 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'Michael Niedermayer2015-04-201-4/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25': lavc: Replace av_dlog and tprintf with internal macros Conflicts: libavcodec/aacdec.c libavcodec/audio_frame_queue.c libavcodec/bitstream.c libavcodec/dcadec.c libavcodec/dnxhddec.c libavcodec/dvbsubdec.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/get_bits.h libavcodec/gifdec.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_loopfilter.c libavcodec/h264_refs.c libavcodec/imc.c libavcodec/interplayvideo.c libavcodec/jpeglsdec.c libavcodec/libopencore-amr.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_parser.c libavcodec/pngdec.c libavcodec/ratecontrol.c libavcodec/rv10.c libavcodec/svq1dec.c libavcodec/vqavideo.c libavcodec/wmadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-191-5/+5
| |
* | Merge commit '4978850ca2cb1ec6908f5bc79cc592ca454d11e8'Michael Niedermayer2015-03-311-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '4978850ca2cb1ec6908f5bc79cc592ca454d11e8': build: Split JPEG-related tables off into a separate component Conflicts: configure Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * build: Split JPEG-related tables off into a separate componentDiego Biurrun2015-03-301-0/+1
| |
* | Merge commit 'e6e3dcba0c6f11bd7022e2d3b9bcb7b6a09d6c80'Michael Niedermayer2015-03-301-0/+1
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'e6e3dcba0c6f11bd7022e2d3b9bcb7b6a09d6c80': mjpeg: Move code only used in the encoder(s) to the appropriate header Conflicts: libavcodec/mjpegdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mjpeg: Move code only used in the encoder(s) to the appropriate headerDiego Biurrun2015-03-301-0/+1
| |
* | avcodec/mjpegdec: Support 31111100 samplingMichael Niedermayer2015-03-181-7/+27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mjpegdec: Change upscale_* to an array instead of a bitmaskMichael Niedermayer2015-03-181-20/+23
| | | | | | | | | | | | This allows storing integer factors instead of just 0 and 1 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '5a0e953c2465be9d449d5f523c3d3e2b886910b2'Michael Niedermayer2015-03-131-0/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit '5a0e953c2465be9d449d5f523c3d3e2b886910b2': mjpeg: Mark decoder family as thread safe Conflicts: libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mxpegdec.c libavcodec/sp5xdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mjpeg: Mark decoder family as thread safeVittorio Giovara2015-03-131-0/+2
| | | | | | | | | | | | No global variables are used and the VLC tables are allocated without static elements. This will allow using a JPEG decoding context within other decoders.
* | avcodec/mjpegdec: Skip blocks which are outside the visible areaMichael Niedermayer2015-02-111-8/+15
| | | | | | | | | | | | | | | | Fixes out of array accesses Fixes: ffmpeg_mjpeg_crash.avi Found-by: Thomas Lindroth <thomas.lindroth@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mjpegdec: Check number of components for JPEG-LSMichael Niedermayer2015-02-041-2/+5
| | | | | | | | | | | | | | | | Fixes out of array accesses Fixes: asan_heap-oob_1c1a4ea_1242_cov_2274415971_TESTcmyk.jpg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mjpegdec: Check escape sequence validityMichael Niedermayer2015-02-041-0/+4
| | | | | | | | | | | | | | | | Fixes assertion failure Fixes: asan_heap-oob_1c1a4ea_1242_cov_2274415971_TESTcmyk.jpg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '809c3023b699c54c90511913d3b6140dd2436550'Michael Niedermayer2014-12-191-9/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit '809c3023b699c54c90511913d3b6140dd2436550': mjpegdec: check for pixel format changes Conflicts: libavcodec/mjpegdec.c See: 5c378d6a6df8243f06c87962b873bd563e58cd39 See: a2f680c7bc7642c687aeb4e14d00ac74833c7a09 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mjpegdec: check for pixel format changesAnton Khirnov2014-12-191-17/+23
| | | | | | | | | | | | | | | | | | | | Fixes possible invalid memory access. Based on code by Michael Niedermayer <michaelni@gmx.at> CC: libav-stable@libav.org Bug-ID: CVE-2014-8541 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
* | avcodec/mjpegdec: Fix integer overflow in shiftMichael Niedermayer2014-11-271-2/+3
| | | | | | | | | | | | Fixes: signal_sigabrt_7ffff6ac7bb9_2683_cov_4120310995_m_ijpg.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mjpegdec: Fix context fields becoming inconsistentMichael Niedermayer2014-11-251-4/+16
| | | | | | | | | | | | | | Fixes out of array access Fixes: asan_heap-oob_1ca4f85_2760_cov_144449187_miss_congeniality_pegasus_ljpg.avi Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mjpegdec: Add YUVA420 formats to *scale assertsMichael Niedermayer2014-11-251-0/+4
| | | | | | | | | | | | | | Fixes assertion failure Fixes: signal_sigabrt_7ffff6ac7bb9_2042_cov_2593130068_ef1f8a057bb6056674fad92f6b8c0acd.jpg Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/mjpegdec: Print the number of bits in the unsupported pixel format errorMichael Niedermayer2014-11-251-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud