0df5e869cb
mpegaudio: do not use init_static_data() for initializing tables.
...
It is called once for each mpegaudio codec that is registered, which adds
significant overhead.
2011-11-27 13:59:34 -05:00
d9ba767d61
musepack: fix signed shift overflow in mpc_read_packet()
...
Using an unsigned variable avoids problems with overflows.
There is further no need for a 64-bit intermediate here.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-27 10:30:16 +00:00
028a2375e2
mov: Make format string match variable type.
2011-11-26 19:41:54 -08:00
f11b0e9543
wmavoice: Make format string match variable type.
2011-11-26 19:40:34 -08:00
498605b4ad
vc1: select interlaced scan table by FCM element
...
Interlaced videos can contain progressive frames too and now wrong scantable
is selected for them.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-11-26 18:14:07 -08:00
12bc20502a
Generalize RIFF INFO tag support; support reading INFO tag in wav
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-11-26 17:14:13 -08:00
3f5aa7dfa6
pthread: track thread existence in a separate variable.
...
This fixes a compile error on mingw32 when using p->thread
directly (as if it were a pointer) to track thread existence,
because the type is opaque and may be a non-pointer.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-11-26 17:14:13 -08:00
7c5ce99bd9
swscale: fix signed overflow in yuv2mono_X_c_template
...
As old bits are shifted out of the accumulator, they cause signed
overflows when they reach the end. Making the variable unsigned fixes
this.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 22:53:47 +00:00
8540dcfd7a
snow: fix integer overflows
...
The way these values are used, they should have an unsigned type.
A similar change was made for mpegvideo in cb66847.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 22:53:47 +00:00
0e55edcb57
svq1enc: remove stale altivec-related hack
...
altivec.h is no longer (indirectly) included, so this hack is not
needed.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 22:53:47 +00:00
ff6d9cc558
snow: fix signed overflow in byte to 32-bit replication
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 22:53:46 +00:00
9d2dd356c2
adx: rename ff_adx_decode_header() to avpriv_adx_decode_header()
...
It is used by the ADX decoder, and therefore needs to be exported in order to
work with shared libs.
2011-11-26 17:00:00 -05:00
a17c3c7d15
avformat: add CRI ADX format demuxer
2011-11-26 16:25:07 -05:00
27360ccc5e
adx: add an ADX parser.
...
This simplifies the decoder so it doesn't have to process an in-packet header
or handle arbitrary-sized packets. It also fixes decoding of files with large
headers.
2011-11-26 16:25:07 -05:00
d8cec2d7fc
adx: move header decoding to ADX common code
2011-11-26 16:25:07 -05:00
7ff55d9bdb
adx: calculate the number of blocks in a packet
2011-11-26 16:25:07 -05:00
05c1f11b56
adx: define and use 2 new macro constants BLOCK_SIZE and BLOCK_SAMPLES
2011-11-26 16:25:07 -05:00
d1745619db
adx: check for unsupported ADX formats
2011-11-26 16:25:07 -05:00
994238536a
adx: simplify encoding by using put_sbits()
2011-11-26 16:25:07 -05:00
b237248e29
adx: calculate correct LPC coeffs
...
Instead of using fixed coefficients, the correct way is to calculate the
coefficients using the highpass cutoff frequency from the ADX stream header
and the sample rate.
2011-11-26 16:25:06 -05:00
954d94dd5e
adx: use 12-bit coefficients instead of 14-bit to avoid integer overflow
2011-11-26 16:25:06 -05:00
c52ddc6024
adx: simplify adx_decode() by using get_sbits() to read residual samples
2011-11-26 16:25:06 -05:00
ca9e4727ba
adx: fix the data offset parsing in adx_decode_header()
...
first 2 bytes are 0x80, 0x00. offset is only 16-bit.
this is according to format descriptions on multimedia wiki and wikipedia.
2011-11-26 16:25:06 -05:00
837bbd19eb
adx: remove unneeded post-decode channel interleaving
...
instead interleave channels while decoding
2011-11-26 16:25:06 -05:00
e2d1eace00
adx: validate header values
2011-11-26 16:25:06 -05:00
8db67610c0
adx: cosmetics: general pretty-printing and comment clean-up
2011-11-26 16:25:06 -05:00
fbc79a9101
adx: remove useless comments
2011-11-26 16:25:06 -05:00
e0722d7fb7
adx: change short to int16_t
2011-11-26 16:25:06 -05:00
dd1b9f7cd9
adx: rename struct PREV to ADXChannelState
2011-11-26 16:25:06 -05:00
3a83b2461e
dnxhdenc: fix signed overflows
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 20:52:10 +00:00
b6ae086682
dv: simplify bitstream splicing in dv_decode_ac()
...
This is simpler and fixes some overflow checker warnings.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 20:52:09 +00:00
b02aa3a8ea
s3tc: fix shift overflow by using unsigned constant
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 18:50:42 +00:00
f7f892e4d5
svq1enc: fix signed multiplication overflow
...
This multiplication can overflow the signed range but not the
unsigned. After right-shifting it will thus fit in the signed
range again.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 18:50:27 +00:00
e4faa31a0a
svq1dec: use sign_extend()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 18:50:02 +00:00
171ec81223
rv34: fix signed multiplication overflow
...
Multiply by unsigned 0x01010101 to replicate bytes into 32-bit
word.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 18:49:51 +00:00
e524eadbf8
[PATCH] Fix crash when initializing multi-threaded decoding for corrupted file.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-11-26 10:46:08 -08:00
3d1af11df4
sol: use AV_RL32 instead of raw pointer cast
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 11:38:41 +00:00
b7581b5c83
cook: use a table for xor key rotation
...
This is simpler and avoids an invalid shift by 32 in the
aligned case.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 11:38:41 +00:00
644bff6c9b
apedec: fix signed integer overflows
...
This bit manipulation is equivalent but avoids undefined
shifts and overflows.
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 11:38:41 +00:00
93c286e54f
qtrle: simplify 32-bit decode using intreadwrite macros
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 11:38:41 +00:00
3bd1162a52
gif: fix invalid signed shifts
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 11:38:40 +00:00
7fb55e0b02
rtjpeg: simplify get_block() by using get_bits_left.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:40:51 +01:00
7a62ddb689
rtjpeg: check get_block return value for error.
...
This avoids crashes due to reading out-of-bounds.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:39:58 +01:00
f6afacdb3b
nuv: check per-frame header for validity.
...
Since it contains dimensions parsing an invalid one has rather
annoying effects.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:38:59 +01:00
785baa738a
nuv: use FFALIGN.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:38:14 +01:00
1484b5dec5
flicvideo: check extradata_size before accessing extradata.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:36:16 +01:00
5ace144fe0
fraps: check for overread.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:35:57 +01:00
51f316a997
cook: fix apparent typo in extradata parsing
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:33:31 +01:00
488eec1044
lavc: update doxy to use nondeprecated API.
2011-11-26 08:26:24 +01:00
f32dfad9dc
swscale: Readd #define _SVID_SOURCE
...
This was removed erroneously in
046f081b46c8479820409cf8f530b988221bd15b. This define still is
necessary for getting MAP_ANONYMOUS defined on linux/glibc,
despite the define reshuffling done in that commit.
Without MAP_ANONYMOUS defined, the mprotect calls for setting the
generated mmx2 scaler code pages executable are left out, causing
crashes if that codepath is chosen.
This patch fixes scaling from 192x144 to 320x240 with
-sws_flags fast_bilinear, which crashes on linux at the
moment.
Signed-off-by: Martin Storsjö <martin@martin.st>
2011-11-25 19:59:15 +02:00