Justin Ruggles
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.
13 years ago
Justin Ruggles
d8cec2d7fc
adx: move header decoding to ADX common code
13 years ago
Justin Ruggles
7ff55d9bdb
adx: calculate the number of blocks in a packet
13 years ago
Justin Ruggles
05c1f11b56
adx: define and use 2 new macro constants BLOCK_SIZE and BLOCK_SAMPLES
13 years ago
Justin Ruggles
d1745619db
adx: check for unsupported ADX formats
13 years ago
Justin Ruggles
994238536a
adx: simplify encoding by using put_sbits()
13 years ago
Justin Ruggles
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.
13 years ago
Justin Ruggles
954d94dd5e
adx: use 12-bit coefficients instead of 14-bit to avoid integer overflow
13 years ago
Justin Ruggles
c52ddc6024
adx: simplify adx_decode() by using get_sbits() to read residual samples
13 years ago
Justin Ruggles
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.
13 years ago
Justin Ruggles
837bbd19eb
adx: remove unneeded post-decode channel interleaving
...
instead interleave channels while decoding
13 years ago
Justin Ruggles
e2d1eace00
adx: validate header values
13 years ago
Justin Ruggles
8db67610c0
adx: cosmetics: general pretty-printing and comment clean-up
13 years ago
Justin Ruggles
fbc79a9101
adx: remove useless comments
13 years ago
Justin Ruggles
e0722d7fb7
adx: change short to int16_t
13 years ago
Justin Ruggles
dd1b9f7cd9
adx: rename struct PREV to ADXChannelState
13 years ago
Mans Rullgard
3a83b2461e
dnxhdenc: fix signed overflows
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
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>
13 years ago
Mans Rullgard
b02aa3a8ea
s3tc: fix shift overflow by using unsigned constant
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
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>
13 years ago
Mans Rullgard
e4faa31a0a
svq1dec: use sign_extend()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
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>
13 years ago
Cheng Sun
e524eadbf8
[PATCH] Fix crash when initializing multi-threaded decoding for corrupted file.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Mans Rullgard
3d1af11df4
sol: use AV_RL32 instead of raw pointer cast
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
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>
13 years ago
Mans Rullgard
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>
13 years ago
Mans Rullgard
93c286e54f
qtrle: simplify 32-bit decode using intreadwrite macros
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
3bd1162a52
gif: fix invalid signed shifts
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Reimar Döffinger
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>
13 years ago
Reimar Döffinger
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>
13 years ago
Reimar Döffinger
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>
13 years ago
Reimar Döffinger
785baa738a
nuv: use FFALIGN.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Carl Eugen Hoyos
1484b5dec5
flicvideo: check extradata_size before accessing extradata.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Michael Niedermayer
5ace144fe0
fraps: check for overread.
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
K.Y.H
51f316a997
cook: fix apparent typo in extradata parsing
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Anton Khirnov
488eec1044
lavc: update doxy to use nondeprecated API.
13 years ago
Martin Storsjö
f32dfad9dc
swscale: Readd #define _SVID_SOURCE
...
This was removed erroneously in
046f081b46
. 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>
13 years ago
Mans Rullgard
019dd23657
Fix av_get_channel_layout_string() for positions >31
...
A value shifted left by >31 needs to have a 64-bit type.
As there are no defined channels in this range, the fix
is purely theoretical at this point, although it does
avoid some invalid shifts triggering the overflow
checker.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Rafaël Carré
be1e872582
configure: Store vda lib flags in extralibs instead of ldflags
...
This way the needed linking flags end up in libavcodec.pc.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Mans Rullgard
cc276c85d1
Make channel layout masks unsigned
...
It makes more sense for a bit mask to use an unsigned type.
The change should be source and binary compatible on all
supported systems, hence micro version bump.
Fixes a few invalid shifts.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
00a856e3f9
dca: ARMv6 optimised decode_blockcode()
...
This is a hand-tuned version of the code with impossible parts of
the FASTDIV function ommitted.
2-5% faster overall on Cortex-A8.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Luca Barbato
035af998ad
nullenc: drop AVFMT_RAWPICTURE from the flags
...
This makes the two pass encoding with x264 working with -f null - as
first pass.
13 years ago
Janne Grunau
117e2a30f2
frame-mt: return consumed packet size in ff_thread_decode_frame
...
This is required to fulfill avcodec_decode_video2() promise to return
the number of consumed bytes on success.
13 years ago
Janne Grunau
d14d4d982c
aacdec: add more fate tests covering SBR and PS
...
Add all seven test bitstreams of Coding Technologies "aacPlus Decoder
Check Package". The streams cover different ways to signal SBR and PS
in different formats.
13 years ago
Mans Rullgard
6b34fbba9b
MK(BE)TAG: avoid undefined shifts
...
Casting the left-most byte to unsigned avoids an undefined
result of the shift by 24 if bit 7 is set. This affects
the rm demuxer.
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Luca Barbato
7f1b427018
snow: split snow in snowdec and snowenc
...
The common non inlined code goes in snow.c, the common inlined code in
snow.h, tables move in snowdata.h (included only by snow.c)
13 years ago
Anton Khirnov
8b7412fe4e
tiffenc: deprecate using compression_level
13 years ago
Ronald S. Bultje
f7f1835258
swscale: fix failing fate tests.
...
isGray() is left as a FIXME for later.
13 years ago
Ronald S. Bultje
185655c601
swscale: add support for planar RGB input.
13 years ago
Ronald S. Bultje
db431f7efe
h264: add support for decoding planar RGB images.
13 years ago