Michael Niedermayer
19b41f8645
avcodec/mjpegdec: use the correct linesize in the flipping code
...
Fixes out of array access
No releases should be affected
Depends on 7c3700cd1d
, do not backport without this one
Fixes: asan_heap-oob_14a37fe_9111_cov_1692584941_test4.amv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 21:47:44 +01:00
Michael Niedermayer
2884688bd5
avcodec/mjpegdec: pass into ff_mjpeg_decode_sos() and check bitmask size
...
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>
2014-01-31 18:34:08 +01:00
Michael Niedermayer
b80073c05f
avcodec/mjpegdec: use av_freep() instead of av_free()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-30 00:50:43 +01:00
Michael Niedermayer
ed56c021e7
avcodec/mjpegdec Fix potential memleak of stereo3D at the end in case of decoding failure
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-30 00:25:04 +01:00
Kirill Gavrilov
e9e7e68516
mjpegdec: parse JPS extension and save relevant stereo3d information
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-30 00:17:02 +01:00
Michael Niedermayer
ad8d063f23
avcodec/mjpegdec: Dont skip picture allocation if theres no picture allocated
...
Fixes Ticket 3245
2014-01-19 17:30:22 +01:00
Michael Niedermayer
31e703e899
avcodec/mjpegdec: Dont treat the lack of a startcode differently from end of the bitstream
...
Fixes Ticket3303
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-19 05:03:16 +01:00
Michael Niedermayer
361e27a3d8
avcodec/mjpegdec: only run EOI emulation code when there was a scan
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-19 04:57:03 +01:00
Michael Niedermayer
8893f31e20
avcodec/mjpegdec: update cur_scan also for non-LS jpeg
...
This should make no difference but the variable will be used in a subsequent commit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-19 04:57:03 +01:00
Michael Niedermayer
ebfa1264aa
avcodec/mjpegdec: allow lowres with amv
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-09 21:40:13 +01:00
Michael Niedermayer
7c3700cd1d
avcodec/mjpegdec: use the AVFrame width/height for flipping
...
This makes it possible to use the code with lowres
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-09 21:40:13 +01:00
Michael Niedermayer
af15c17daa
avcodec/mjpegdec: remove new flipping code
...
It stored images wrong in the user provided buffers (that is you would
end up with a wrongly flipped image if you used direct rendering).
Also it used wrong dimensions as noticed by ubitux
Enable the old code unconditionally so flipping works correctly
again.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-09 21:36:21 +01:00
Michael Niedermayer
cab5315519
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
mjpegdec: apply flipping after decoding, not before
Conflicts:
libavcodec/mjpegdec.c
libavcodec/mjpegdec.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-09 15:46:31 +01:00
Anton Khirnov
d48132b7de
mjpegdec: apply flipping after decoding, not before
...
This is simpler and removes a silly restriction on edges being present.
2014-01-09 09:56:51 +01:00
Michael Niedermayer
0c23ee1312
avcodec/mjpegdec: use mallocz for progressive blocks
...
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f849c599487_6828_mjpeg.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-13 20:26:38 +01:00
Michael Niedermayer
6393038676
Merge commit 'e2274aa555f023e4f4e4819bf29b2d7e0adec7d5'
...
* commit 'e2274aa555f023e4f4e4819bf29b2d7e0adec7d5':
mjpegdec: use the AVFrame API properly.
Conflicts:
libavcodec/mjpegdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 12:42:10 +01:00
anatoly
2fade10cb0
Add support for picture_ptr field in MJpegDecodeContext
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit e0e3b8b297
)
Conflicts:
libavcodec/jpeglsdec.c
libavcodec/mjpegbdec.c
libavcodec/mjpegdec.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-09 12:24:50 +01:00
Anton Khirnov
e2274aa555
mjpegdec: use the AVFrame API properly.
2013-12-09 08:40:29 +01:00
Michael Niedermayer
6060234d43
avcodec/mjpegdec: check len in mjpeg_decode_app() more completely
...
Avoids len from becoming negative and causing assertion failure
Fixes: signal_sigabrt_7ffff7126425_5140_fd44dc63fa7bdd12ee34fc602231ef02.jpg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-22 17:02:00 +01:00
Michael Niedermayer
64a0ed190e
Merge commit '13207484bba8a8b78b40d5a22da8c9c555429089'
...
* commit '13207484bba8a8b78b40d5a22da8c9c555429089':
mpeg4video_parser: stop using deprecated avcodec_set_dimensions
mpeg12dec: stop using deprecated avcodec_set_dimensions
mjpegdec: stop using deprecated avcodec_set_dimensions
libvpxdec: stop using deprecated avcodec_set_dimensions
Conflicts:
libavcodec/mjpegdec.c
libavcodec/mpeg12dec.c
libavcodec/mpeg4video_parser.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-11-01 15:14:52 +01:00
Anton Khirnov
2cd94ad5bf
mjpegdec: stop using deprecated avcodec_set_dimensions
2013-10-31 20:14:15 +01:00
Michael Niedermayer
ee77140afa
Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'
...
* commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2':
cosmetics: Group .name and .long_name together in codec/format declarations
Conflicts:
libavcodec/8svx.c
libavcodec/alac.c
libavcodec/cljr.c
libavcodec/dnxhddec.c
libavcodec/dnxhdenc.c
libavcodec/dpxenc.c
libavcodec/dvdec.c
libavcodec/dvdsubdec.c
libavcodec/dvdsubenc.c
libavcodec/ffv1dec.c
libavcodec/flacdec.c
libavcodec/flvdec.c
libavcodec/fraps.c
libavcodec/frwu.c
libavcodec/g726.c
libavcodec/gif.c
libavcodec/gifdec.c
libavcodec/h261dec.c
libavcodec/h263dec.c
libavcodec/iff.c
libavcodec/imc.c
libavcodec/libopencore-amr.c
libavcodec/libopenjpegdec.c
libavcodec/libopenjpegenc.c
libavcodec/libspeexenc.c
libavcodec/libvo-amrwbenc.c
libavcodec/libvorbisenc.c
libavcodec/libvpxenc.c
libavcodec/libx264.c
libavcodec/libxavs.c
libavcodec/libxvid.c
libavcodec/ljpegenc.c
libavcodec/mjpegbdec.c
libavcodec/mjpegdec.c
libavcodec/mpeg12dec.c
libavcodec/mpeg4videodec.c
libavcodec/msmpeg4dec.c
libavcodec/pgssubdec.c
libavcodec/pngdec.c
libavcodec/pngenc.c
libavcodec/proresdec_lgpl.c
libavcodec/proresenc_kostya.c
libavcodec/ra144enc.c
libavcodec/rawdec.c
libavcodec/rv10.c
libavcodec/sp5xdec.c
libavcodec/takdec.c
libavcodec/tta.c
libavcodec/v210dec.c
libavcodec/vp6.c
libavcodec/wavpack.c
libavcodec/xbmenc.c
libavcodec/yop.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 12:34:23 +02:00
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
2013-10-03 23:32:01 +02:00
Michael Niedermayer
7129935ed2
avcodec/mjpegdec: Fix ljpeg RCT
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 02:00:15 +02:00
Michael Niedermayer
7fb2622456
avcodec/mjpegdec: rgba64 ljpeg support
...
Fixes Ticket2965
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 03:00:54 +02:00
Michael Niedermayer
1e4e0bd907
avcodec/mjpegdec: change error return value to be outside the 16bit range
...
Fixes part of Ticket2965
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 02:59:33 +02:00
Michael Niedermayer
b4a5fcb998
avcodec/mjpegdec: Fix rgb48 ljpeg
...
Fixes Ticket894
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-15 23:36:11 +02:00
Michael Niedermayer
6c07e41f43
avcodec/mjpegdec: check for malloc failure of blocks[] and last_nnz[]
...
Fixes null pointer dereference
Fixes Ticket2947
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-13 23:25:16 +02:00
Michael Niedermayer
64b6279d14
avcodec/mjpegdec: Support >8bpc color mjpeg
...
Fixes Ticket2939
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 02:45:17 +02:00
Michael Niedermayer
ce22820627
avcodec/mjpegdec: fix shift_output() with lowres
...
Fixes Ticket2940
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-09 01:46:14 +02:00
Michael Niedermayer
bcd1c20612
avcodec/mjpegdec: support >8bit in mjpeg_decode_scan_progressive_ac()
...
Fixes Ticket2812
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-06 02:33:10 +02:00
Michael Niedermayer
b155fb08b8
avcodec/mjpegdec: move shift_output() to its own function
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-06 02:31:32 +02:00
Michael Niedermayer
c407c73457
avcodec/mjpegdec: 12bit Grayscale support
...
Fixes part of Ticket2812
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-06 01:19:37 +02:00
Michael Niedermayer
1deeb9437c
avcodec/mjpegdec: Fix normal jpeg with bits < 8
...
Untested due to lack of testcase
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-06 01:19:37 +02:00
Michael Niedermayer
15071ed4fc
avcodec/mjpegdec fix last_dc for bits != 8
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-06 01:19:37 +02:00
Michael Niedermayer
b042712a87
avcodec/mjpegdec: Simplify masking in ljpeg_decode_yuv_scan()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-05 01:39:20 +02:00
Michael Niedermayer
b394ccfe47
avcodec/mjpegdec: fix rgb ljpeg prediction 5/6/7 with point_transform
...
untested due to lack of sample
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-05 01:39:20 +02:00
Michael Niedermayer
38f8640df8
avcodec/mjpegdec: fix yuv ljpeg prediction 5/6/7 with point transforms
...
Fixes Ticket2826
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-05 01:39:20 +02:00
Michael Niedermayer
cb026ac303
avcodec/mjpegdec: make "unknown colorspace" error more informative
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-05 01:39:20 +02:00
Michael Niedermayer
61c68000ed
avcodec/mjpegdec: Add some sanity checks to ljpeg_decode_rgb_scan()
...
These prevent the rgb ljpeg code from being run on parameters that it doesnt
support. No testcase available but it seems possible to trigger these.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-05 01:39:20 +02:00
Michael Niedermayer
49f5519345
Merge commit 'af11fa5409cc72fc45ca7f3527400beca10967b9'
...
* commit 'af11fa5409cc72fc45ca7f3527400beca10967b9':
mjpegb: Detect changing number of planes in interlaced video
Conflicts:
libavcodec/mjpegdec.c
See: ecc31630f9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-04 13:06:24 +02:00
Michael Niedermayer
af11fa5409
mjpegb: Detect changing number of planes in interlaced video
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-03 22:58:24 +03:00
Michael Niedermayer
16a0d75c76
avcodec/mjpegdec: fix overread in find_marker()
...
Found-by: Laurent Butti <laurentb@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-23 04:44:55 +02:00
Diego Biurrun
2a61592573
avcodec: Remove some commented-out debug cruft
2013-08-20 19:59:50 +02:00
Michael Niedermayer
dabfa80ce2
avcodec/mjpegdec: print a message when there was just a single field and no frame
...
Fixes ticket1915
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-14 19:16:38 +02:00
Thilo Borgmann
bb4e1b4cf9
avcodec/mjpegdec: Read EXIF metadata in JPEG input.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-13 00:30:34 +02:00
Carl Eugen Hoyos
ae4dc0b37a
Set bits_per_raw_sample when decoding mjpeg / ljpeg.
...
The ljpeg decoder also supports gray images with
8 - 15 bits per component.
2013-07-28 17:13:01 +02:00
Michael Niedermayer
6db57fa8bc
avcodec/mjpegdec: Support RGBA lpegs
...
Fixes Ticket896
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-25 00:32:44 +02:00
Michael Niedermayer
0ef40446a8
mjpegdec: print length too in APPx debug code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-11 16:28:55 +02:00
Michael Niedermayer
96747e6cbe
mjpegdec: parse app-xfrm
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-11 16:08:49 +02:00