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
Michael Niedermayer
6d6eabd399
mjpeg_decode_dc: check code before using it in get_xbits()
...
Fixes undefined behavior
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b60a65ee2d
mjpegdec: fix AV_PIX_FMT_YUVJ411P handling
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
cfbd98abe8
mjpegdec: validate parameters in mjpeg_decode_scan_progressive_ac
...
Prevent out of buffer write when decoding broken samples.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
a030279a67
ljpeg: use the correct number of components in yuv
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Luca Barbato
8aa3500905
mjpeg: Validate sampling factors
...
They must be non-zero.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years ago
Michael Niedermayer
73b9f31c74
mjpeg_decode_com: remove redundant len checks
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Piotr Bandurski
2f75dcdc1c
mjpegdec: Fix field orderforinterlacedAVDJand AVRN in ntsc mode
...
Fixes ticket1656
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
b25e49b187
mjpegdec: properly report unsupported disabled features
...
When JPEG-LS support is disabled the decoder would feed the
data to the JPEG Lossless decode_*_scan function resulting in
faulty decoding.
CC: libav-stable@libav.org
12 years ago
Clément Bœsch
570d63eef3
lavu: add FF_CEIL_RSHIFT and use it in various places.
12 years ago
Piotr Bandurski
f4596e8bb6
mjpegdec: Add support for 4:1:1 YUV
...
Fixes part of ticket 2004
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Ronald S. Bultje
28bc406c84
mjpeg: Use hpeldsp instead of dsputil for half-pel functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
bec402b502
mjpegdec: fix overlapping memcpy with upscale_v
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
aa28c42534
mjpegdec: check buffer before using it
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
a9b424879f
lavc & lavf: replace deprecated av_log* functions
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
ff9adf5725
mjpegdec: export qp table
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
870e625108
mjpegdec: fix indention
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3c24fbbf65
jpegdec: be less picky on padding
...
Fixes Ticket2353
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
63d744e2be
av_log_missing_feature() ---> avpriv_report_missing_feature()
12 years ago
Clément Bœsch
1ec94b0f06
lavc: factorize ff_{thread_,re,}get_buffer error messages.
...
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
12 years ago
Ronald S. Bultje
e0a8f31591
mjpeg: use hpeldsp instead of dsputil for half-pel functions.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Michael Niedermayer
03bc7a004e
mjpegdec: fix endiansoup
...
Fixes Ticket2175
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
c242bbd8b6
Remove unnecessary dsputil.h #includes
12 years ago
Michael Niedermayer
47e92153b6
mjpegdec: check for packed rgb mjpeg.
...
Fixes null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b2e57eb5a3
mjpegdec: pass nb_components into ljpeg_decode_yuv_scan
...
Fixes null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
ed62e6e3c3
mjpegdec: use put_pixels instead of copy_block8
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Michael Niedermayer
4ade824e1f
mjpegdec: rgb mode is specific for ljpeg, disable it for others.
...
Fixes null pointer dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8888c72fcf
mjpegdec: fix memcmp size for *_count
...
Fixes assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
7bcaeb408e
mjpegdec: fix indentation
12 years ago
Diego Biurrun
88bd7fdc82
Drop DCTELEM typedef
...
It does not help as an abstraction and adds dsputil dependencies.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years ago