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
Anton Khirnov
df9b956751
lavc: fix decode_frame() third parameter semantics for video decoders
...
It's got_frame, not data size
12 years ago
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Michael Niedermayer
bc16031a41
mjpegdec: print error message when quant_index is invalid
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a2f680c7bc
mjpegdec: check h/v_count, fix context becoming inconsistent and causing out of array accesses.
...
This also fixes a long standing comment in the code.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2cfa6fd025
mjpegdec: dont set got_picture to 0 per frame.
...
Fixes Ticket1915
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
541efe4120
mjpegdec: reset got_picture on errors, successful return, init and flush.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
1c16483cc0
mjpegdec: replace returns by goto fail in frame decode.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
de9fc0e9d6
mjpegdec: make sure ret is set before its used.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
dab19048a1
mjpegdec: reset h/v_count, fix assertion failure.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a9456c7c5c
mjpegdec: tighten unescaped_buf_size size check, prevent null ptr deref
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
1f41cffe1e
mjpegdec: check SE.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
f75f4194d1
Restructure av_log_missing_feature message
...
Some invocations include a verb in the log message, others do not. Yet
av_log_missing_feature expects callers to provide a verb. Change the
function to include a verb instead and update the callers accordingly.
The result is a more natural function API and correct English in the
function invocations.
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Diego Biurrun
1218777ffd
avcodec: Convert some commented-out printf/av_log instances to av_dlog
12 years ago
Diego Biurrun
9c6cf7f2c9
avcodec: Drop silly and/or broken printf debug output
12 years ago
Samuel Pitoiset
a0845bae49
mjpeg: Rename some symbols to avpriv_* instead of ff_*
...
These symbols will be used from the RTP/JPEG depacketizer.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Martin Storsjö
e6153f173a
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
1fa4018e29
jpegdec: try to fix different flipping behavior of inteljpegs.
...
This may need some trial and error to find exactly how to identify them
so please report any intel jpegs that get fliped wrong.
Fixes Ticket511
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
168ddcd331
mjpeg: fix fliping with emu edges.
...
Fixes Ticket121
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ac33016158
mjpegdec: support AVRn interlaced
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Luca Barbato
0f64cd1e81
mjpegdec: more meaningful return values
12 years ago
Michael Niedermayer
d9d0c1ccc3
mjpegdec: support AVRn interlaced
...
Fixes Ticket1527
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Michael Niedermayer
4eae08b438
mjpegdec: use av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
137e80817d
lavc: build some codecs only if they are actually enabled
...
Saves few bytes if only some of them in same file are enabled.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
225489f19b
mjpegdec: remove superfluous "mjpeg "
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Michael Niedermayer
5e50a5724b
Revert "removing lowres support"
...
There have been multiple user complaints about loosing this feature
while its not clear the 3% speedloss claims where real or fabricated.
My own testing indicates no statistically significant speed difference
both with mpeg2 and mpeg4, and if at all the code with lowres support
is a tiny bit faster than without.
This reverts commit 92ef4be4ab
, reversing
changes made to 2e07f42957
.
Conflicts:
cmdutils.c
libavcodec/arm/vp8dsp_init_arm.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo.h
libavutil/arm/Makefile
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
5eec5a79da
jpeg: handle progressive in second field of interlaced.
...
Progressive data is allocated later in decode_sof(), not allocating
that data leads to NULL dereferences.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Michael Niedermayer
70d54392f5
lowres2 support.
...
The new lowres support is limited to decoders where lowres decoding
is possible in high quality.
I was not able to measure any speed difference, but if one is found
the 2-3 lines that might affect speed can be made compile time conditional
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
9a4f5b7616
mjpegbdec: check SOS/SOF ordering.
...
Fixes null ptr dereference
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mans Rullgard
2bcbd98459
Remove lowres video decoding
...
This feature is complex, of questionable utility, and slows down
normal decoding.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Michael Niedermayer
0cd17a6291
mjpeg: fix crash with lowres and flipped images
...
Fixes Ticket1155
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
8307025467
mjpegdec: Fix "assignment from incompatible pointer type" warnings
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
282ec7289d
Do not try to use lowres for unusual jpg subsampling.
...
Fixes ticket #1144 .
13 years ago
Diego Biurrun
a92be9b856
Replace memset(0) by zero initializations.
...
Also remove one pointless zero initialization in rangecoder.c.
13 years ago
Michael Niedermayer
08c37a10e9
mjpegdec: check h/v_count.
...
Fixes FPE
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
7594ee2e6e
jpg: fix colors for sequential RGB
...
Fixes Ticket850
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
ecc31630f9
mjpegb: Detect changing nb of planes in interlaced video.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Alex Converse
3574a85ce5
Replace computations of remaining bits with calls to get_bits_left().
13 years ago
Michael Niedermayer
a3f5ee297a
mjpeg: Check for interlaced progressive frames
...
Fixes null pointer dereference.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago