Michael Niedermayer
e161c1bbfc
avcodec/mjpegdec: support adob transform 2
...
Fixes Ticket3426
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a05635ee01
avcodec/mjpegdec: convert CMYK to GBRAP
...
Fixes Ticket2799
This should be moved into swscale once we have a CMYK pixel format
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
501beae6f9
avcodec/mjpegdec: fix decoding 4th plane
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6904168c79
avcodec/mjpegdec: Print error in case of CMYK
...
Also fail if AV_EF_EXPLODE is set.
We do not fail by default, but rather return some image as it may be usefull to the
end user to see what is on the image, for example text could be read quite fine and
objects recognized.
Possibly fixes Ticket3424
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
681e72a668
avcodec/mjpegdec: parse adobe_transform
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7e8be7081f
avcodec/mjpegdec: Print human readable string for APPx
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
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>
11 years ago
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>
11 years ago
Michael Niedermayer
b80073c05f
avcodec/mjpegdec: use av_freep() instead of av_free()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
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>
11 years ago
Kirill Gavrilov
e9e7e68516
mjpegdec: parse JPS extension and save relevant stereo3d information
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ad8d063f23
avcodec/mjpegdec: Dont skip picture allocation if theres no picture allocated
...
Fixes Ticket 3245
11 years ago
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>
11 years ago
Michael Niedermayer
361e27a3d8
avcodec/mjpegdec: only run EOI emulation code when there was a scan
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
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>
11 years ago
Michael Niedermayer
ebfa1264aa
avcodec/mjpegdec: allow lowres with amv
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
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>
11 years ago
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>
11 years ago
Anton Khirnov
d48132b7de
mjpegdec: apply flipping after decoding, not before
...
This is simpler and removes a silly restriction on edges being present.
11 years ago
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>
11 years ago
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>
11 years ago
Anton Khirnov
e2274aa555
mjpegdec: use the AVFrame API properly.
11 years ago
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>
11 years ago
Anton Khirnov
2cd94ad5bf
mjpegdec: stop using deprecated avcodec_set_dimensions
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Michael Niedermayer
7129935ed2
avcodec/mjpegdec: Fix ljpeg RCT
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7fb2622456
avcodec/mjpegdec: rgba64 ljpeg support
...
Fixes Ticket2965
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
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>
11 years ago
Michael Niedermayer
b4a5fcb998
avcodec/mjpegdec: Fix rgb48 ljpeg
...
Fixes Ticket894
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
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>
11 years ago
Michael Niedermayer
64b6279d14
avcodec/mjpegdec: Support >8bpc color mjpeg
...
Fixes Ticket2939
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ce22820627
avcodec/mjpegdec: fix shift_output() with lowres
...
Fixes Ticket2940
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
bcd1c20612
avcodec/mjpegdec: support >8bit in mjpeg_decode_scan_progressive_ac()
...
Fixes Ticket2812
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b155fb08b8
avcodec/mjpegdec: move shift_output() to its own function
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
c407c73457
avcodec/mjpegdec: 12bit Grayscale support
...
Fixes part of Ticket2812
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
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>
11 years ago
Michael Niedermayer
15071ed4fc
avcodec/mjpegdec fix last_dc for bits != 8
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b042712a87
avcodec/mjpegdec: Simplify masking in ljpeg_decode_yuv_scan()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
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>
11 years ago
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>
11 years ago
Michael Niedermayer
cb026ac303
avcodec/mjpegdec: make "unknown colorspace" error more informative
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
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>
11 years ago
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>
11 years ago
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>
11 years ago
Diego Biurrun
2a61592573
avcodec: Remove some commented-out debug cruft
11 years ago
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>
11 years ago
Thilo Borgmann
bb4e1b4cf9
avcodec/mjpegdec: Read EXIF metadata in JPEG input.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
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.
11 years ago
Michael Niedermayer
6db57fa8bc
avcodec/mjpegdec: Support RGBA lpegs
...
Fixes Ticket896
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
0ef40446a8
mjpegdec: print length too in APPx debug code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago