Michael Niedermayer
ea6da80cb4
diracdec: check dimensions against chroma format.
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Martin Storsjö
2c96392277
avpicture: Don't assume a valid pix fmt in avpicture_get_size
When called from the v4l2 input device, pix_fmt can be
AV_PIX_FMT_NONE (for jpeg formats). Before 50ba57e0, this wasn't
an issue for avpicture_get_size, but after that commit, this
lead to crashes.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Janne Grunau
a394959bbe
h264: add a pointer for weighted prediction temporary buffer
Reusing MpegEncContext's obmc_scratchpad for this becomes a mess with
adaptive frame-mt.
12 years ago
Janne Grunau
d7d6efe42b
h264: check sps.log2_max_frame_num for validity
Fixes infinite or long taking loop in frame num gap code in
the fuzzed sample bipbop234.ts_s223302.
CC: libav-stable@libav.org
12 years ago
Janne Grunau
480be07a96
flac: change minimum and default of lpc_passes option to 1
Avoid use of uninitialized and uncomputed linear least square models
during ff_lpc_calc_coefs() for FF_LPC_TYPE_CHOLESKY. Fixes running
make fate-flac-16-lpc-cholesk with valgrind --undef-value-errors=yes.
12 years ago
Christophe Gisquet
2aef3d66c9
SBR DSP x86: implement SSE sbr_hf_gen
Start and end index are multiple of 2, therefore guaranteeing aligned access.
Also, this allows to generate 4 floats per loop, keeping the alignment all
along.
Timing:
- 32 bits: 326c -> 172c
- 64 bits: 323c -> 156c
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Christophe Gisquet
9a16359c38
AAC SBR: use AVFloatDSPContext's vector_fmul
Around 5% speedup on the code block using 'vector_fmul_add's.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years ago
Michael Niedermayer
f5d6b0c9c2
diracdec: fix typo in mctmp allocation
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2f6ec9fdd7
diracdec: Test mctmp and mcscratch for malloc failure.
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
b84d1bf193
diracdec: fix emulated_edge condition, fix out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
f8d68822c0
takdec: use samplefmt.h from libavutil
Instead of having own code for calculating decoded buffer size
just use already provided functions from libavutil.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
6a7fed193c
add missing dependency for tak demuxer
12 years ago
Paul B Mahol
4e4a95b18e
takdec: remove get_code() and use get_sbits() directly
As found by Justin, this is probably bug in reference decoder.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
4b6869d6e0
bitstream: make vlc init of static tables thread safe.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
586c2528a0
dxa: port to bytestream2 API
Protects against overreads in input buffer.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
4d1912ff4d
huffyuv: return meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
4a722a5cab
huffyuv: check for malloc failures
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
7f261ac850
huffyuv: make use of av_fast_padded_malloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Janne Grunau
3ab5f7dc13
h264: slice-mt: check master context for valid current_picture_ptr
Fixes errors in slice based multithreading introduced in 0b300daad2
.
12 years ago
Janne Grunau
24c62ea7a5
h264: slice-mt: get last_pic_dropable from master context
Fixes fate-h264-conformance-cvnlfi2_sony_h and smllwebdl.mkv from
https://github.com/OpenELEC/OpenELEC.tv/issues/1557 .
12 years ago
Michael Niedermayer
7885fa7685
ff_lock_avcodec: make the lock state be consistent in case of failure.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2dec950f49
avcodec_open: if obtaining a lock fails, dont attempt to unlock it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0393cf15db
Revert "Acquire lock when initializing parsers."
This reverts commit 7feef7dbca
.
This commit causes assertion failures due to use of parser_init from multiple
threads, for example indirectly by ffmpeg.c and more directly from the
packet read functions.
I dont know how to fix this quickly, and fixing ffmpeg.c leaves
the possibility of other applications being affected.
Crashing the applications until this is resolved is clearly no good
thus this revert, so we have time to think about the problem.
Crashes can be reproduced by using multiple input files in ffmpeg.
12 years ago
Michael Niedermayer
eed865540a
Revert "Add assert that the avcodec lock is held when initializing static VLC tables."
This reverts commit dd154198b1
.
12 years ago
Michael Niedermayer
d7169280a6
frame_thread_encoder: fix locking while locks are held
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
bde6f6eadc
vc1dec: prevent v_edge_pos from becoming negative.
Fixes assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b6a7f66f93
resample: remove disabled debug code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Janne Grunau
5945c7b35d
h264: slice-mt: check master context for valid current_picture_ptr
Fixes errors in slice based multithreading introduced in 0b300daad2
.
CC: libav-stable@libav.org
12 years ago
Janne Grunau
a8cb1746c5
h264: slice-mt: get last_pic_dropable from master context
Fixes fate-h264-conformance-cvnlfi2_sony_h and smllwebdl.mkv from
https://github.com/OpenELEC/OpenELEC.tv/issues/1557 .
CC: libav-stable@libav.org
12 years ago
Justin Ruggles
5e1bbb8c7e
alacenc: add support for multi-channel encoding
12 years ago
Paul B Mahol
9f66531d46
lavc/dxa: return meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Reimar Döffinger
dd154198b1
Add assert that the avcodec lock is held when initializing static VLC tables.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Reimar Döffinger
7feef7dbca
Acquire lock when initializing parsers.
This is necessary since they might be initializing or
even using static VLC tables.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Reimar Döffinger
25fec8595d
avcodec: add ff_lock/unlock_avcodec functions.
Will be used in future patches, together with the
variable that allows checking whether the lock is held.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
12 years ago
Piotr Bandurski
5381960501
wmaenc: add new line to some error messages
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Wolfram Gloger
928346091a
mpegvideo_parser: fix buffer access beyond end
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
6d7effa9bd
mpegvideo_enc: use av_log() in debug code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
911c00e60f
motion_est: use av_log() in debug code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7c2481f2d7
j2kenc: remove duplicate debug functions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
9bb188da96
j2k: avoid printf() useage in debug code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b023392f34
mpegvideo: remove #if/define PARANOID code
This code never did anything as far as i can remember
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
4012cd6c4f
lavc: fix decode_frame() third parameter semantics for rest of video decoders
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
d2a3f08daf
lavc: move ff_init_buffer_info() down to ff_get_buffer()
and remove redundant code from ff_get_buffer()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
09de0ffeab
vc1dec: Fix null pointer dereference in vc1_decode_skip_blocks()
This handles the last frame being unavailable like all the other
code in vc1dec.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Nicolas George
217b10de3f
lavc/dvdsubdec: accept palette from options.
On DVDs, the palette is part of the IFO file and therefore
not available when reading from a dumped VOB file.
12 years ago
Michael Niedermayer
599ae9995f
ff_emulated_edge_mc: fix handling of w/h being 0
Fixes assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8bf16e677f
ffv1enc: allow encoding with 1 slice for CIF and smaller in version 3
the default is still 4 slices for any resolution, this just allows the user
to force 1 slice.
This in my quick test improves compression by 1% for a 320x240 sample
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Janne Grunau
c15fea7933
mimic: initialize padding of swap_buf through av_fast_padded_malloc
12 years ago
Janne Grunau
42060c7030
eamad: initialize padding of bitstream_buf through av_fast_padded_malloc()
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