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
Michael Niedermayer
969e75eb80
mjpegdec: Fix out of array read in unescaping code
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4c80184cf5
mjpegdec: allow 2 components in ljpeg_decode_yuv_scan()
...
Fixes assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
d885cc41e5
Fix "knwon" typo and add a check in tools/patcheck
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
69db85c30c
mjpegdec: Support 16bit DQT
...
Fixes Ticket2072
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b61097fe0d
mjpegdec: reset restart_count on progressive scans
...
Fixes Ticket2068
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
011169cd41
mjpegdec: handle the occurance of rstn emulation
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
5ff8ca1f04
mjpegdec: Handle RSTn in progressive jpegs
...
Fixes Ticket2003
Reviewed-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
47e7f57a4b
mjpegdec: factor handle_rstn() out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Piotr Bandurski
e5550c0d09
mjpegdec: support more pix_fmt_ids for grayscale
...
samples created with
"cjpeg -grayscale -sample 1x3 / 1x4 / 3x1 / 3x3 / 4x1 / 4x3 / 4x4"
http://www.datafilehost.com/download-d828329d.html
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Janne Grunau
6a1aa5cb26
mjpeg: initialize input padding after unescaped buffer to zero
...
Fixes valgrind --undef-value-errors=yes warnings caused by valid
overreads in the fate vsynth jpegls, cover-art-ape and cover-art-wv
tests.
12 years ago