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
Michael Niedermayer
96747e6cbe
mjpegdec: parse app-xfrm
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7afa68d37d
mjpegdec: parse app-colr
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
15cee5e562
mjpegdec: Fix used quant index for gbr
...
Fixes Ticket1651
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
94e86ae15a
mjpegdec: initialize source variables before gbr remap
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
233177a4ec
jpegdec: clear EOBRUN on restarts
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
1c032e94d0
jpegdec: give handle_rstn() a return code that indicates if restart did happen
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
776155ca29
mjpeg_decode_scan: reset restart state
...
Fixes Ticket2082
Fixes progressive/refinement + restart jpegs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
6765ee7b9c
mjpeg: Check the unescaped size for overflows
...
And contextually check init_get_bits success and fix the reporting
message.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
7520d9779c
mjpeg: Move code out of else branch
...
Simplify the control flow and spare some vertical space.
12 years ago