Janne Grunau
9a2e79116d
golomb: use unsigned arithmetics in svq3_get_ue_golomb()
This prevents undefined behaviour of signed left shift if the coded
value is larger than 2^31. Large values are most likely invalid and
caused errors or by feeding random.
Validate every use of svq3_get_ue_golomb() and changed the place there
the return value was compared with negative numbers. dirac.c was clean,
fixed rv30 and svq3.
12 years ago
Nicolas George
e6701d51e1
lavc/mlpdec: reset layout when channels change.
Triggered by the sample for trac ticket #1726 .
12 years ago
Paul B Mahol
3fd60d8049
gifdec: port to bytestream2 API
While here remove ff_lzw_cur_ptr() as it become obsolete.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Josh Allmann
b3deec3253
takdec: fix initialisation of LOCAL_ALIGNED array
When LOCAL_ALIGNED uses manual alignment initialisation is not
possible.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
12 years ago
Mans Rullgard
cd71af90a9
takdec: fix initialisation of LOCAL_ALIGNED array
When LOCAL_ALIGNED uses manual alignment initialisation is not
possible.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Michael Niedermayer
419ade4b61
lavc: check dimensions for video encoders
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
57231e4d5b
tak: demuxer, parser, and decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years ago
Michael Niedermayer
096abfa150
parser: fix large overreads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years ago
Michael Niedermayer
41540b36a1
bitstream: add get_bits64() to support reading more than 32 bits at once
Also remove a duplicate function in the MPEG-TS demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years ago
Mans Rullgard
b326755989
arm: rename ARMVFP config symbol to VFP
This is consistent with usual ARM nomenclature as well as with the
VFPV3 and NEON symbols which both lack the ARM prefix.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Mans Rullgard
a7831d509f
arm: use HAVE*_INLINE/EXTERNAL macros for conditional compilation
These macros reflect the actual capabilities required here.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Mans Rullgard
c29d49c1b3
dct-test: arm: indicate required cpu features for optimised funcs
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Anton Khirnov
380232fac3
snow: fix build after 594d4d5df3
12 years ago
Paul B Mahol
6777aa6387
lavc/takdec: s/get_b/get_bits_esc4
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Martin Storsjö
4ed0c35c40
avcodec: Fix a typo in an option description
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Clément Bœsch <ubitux@gmail.com>
12 years ago
Paul B Mahol
1c779854b5
lavc/takdec: simplify code
Merge get_scale/get_shift into set_sample_rate_params().
Rename tak_set_bps to set_bps_params and remove 2nd argument.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Mans Rullgard
92dad6687f
arm: fix use of uninitialised value in ff_fft_fixed_init_arm()
When initialising an FFTContext for a plain FFT, mdct_bits is not set
and can contain a garbage value. Since nbits is always valid and for
MDCT operation is mdct_bits - 2 checking this instead avoids using an
uninitialised value while having the same effect.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
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