Michael Niedermayer
131fac1c12
vc1dec: fix block_off
...
Fixes corruption of motion_val
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
52acd79165
x86: hpel: Move {avg,put}_pixels16_sse2 to hpeldsp
12 years ago
Martin Storsjö
a65f965c04
mpegvideo: Do REBASE_PICTURE with byte pointers
...
REBASE_PICTURE (more specifically, this half of it) takes a Picture
pointer that points into one larger struct, finds the offset of
that Picture within the struct and finds the corresponding field
within another instance of a similar struct.
The pointer difference "pic - (Picture*)old_ctx" is a value given
in sizeof(Picture) units, and when applied back on
(Picture*)new_ctx gets multiplied back with sizeof(Picture). Many
compilers seem to optimize out this division/multiplication, but
not all do.
GCC 4.2 on OS X doesn't seem to remove the division/multiplication,
therefore the new pointer didn't turn out to point to exactly
the right place in the new struct since it only had sizeof(Picture)
granularity (and the Picture is not aligned on a sizeof(Picture)
boundary within the encompassing struct). This bug has been present
before 47318953d
as well - with H264, pointers to h->ref_list[0][0]
pointed to 88 bytes before h->ref_list[0][0] after the rebase. After
shrinking Picture, the difference ended up even larger, making
writes via such a Picture pointer overwrite other fields at random
in H264Context, ending up in crashes later.
This fixes H264 multithreaded decoding on OS X with GCC 4.2.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
cdf0877bc3
h264/cabac: check loop index
...
fix out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mirjana Vulin
2b6a8187a6
mips: optimization for float aac decoder (core module)
...
Signed-off-by: Mirjana Vulin <mvulin@mips.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
9df9420dea
interplayvideo: Free previous frames on resolution changes.
...
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Piotr Bandurski
9c50e69385
loco: fix rgba on big-endian
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a084884b62
flashsv: clear blocks array on reallocation
...
Fixes use of uninitialized data
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
984add64a4
wma: check byte_offset_bits
...
Fixes assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4a2da83a78
dnxhddec: fix integer overflow / index check
...
Fixes out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b926cc7834
mss3: prevent AC state from becoming invalid in rac_normalise()
...
Fixes division by zero
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d2e0a276d5
msrledec: merge switches
...
More speedup and fixes 'may be used uninitialized in this function' warnings
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
dbaae33c2c
msrledec: move loop into switch
...
speeds up code and allows more simplifications
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
c2992b7053
msrledec: move output pointer test up
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d8a7c4958e
mpegvideo_enc: factor expression out
...
Fixes "warning: dc[0..5] may be used uninitialized in this function"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Ronald S. Bultje
a5ba798c16
dsputil: remove unused functions copy_block{2, 4, 8, 16}.
12 years ago
Michael Niedermayer
71f8d70456
dirac/x86: fix compile without yasm
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4d3d362549
dirac/x86: fix compile without inline asm
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Carl Eugen Hoyos
3c3d68a976
Fix 1bpp palettized png with width not a multiple of 8.
...
Fixes ticket #2204 .
12 years ago
Michael Niedermayer
dc8dd2f6e9
sanm: Check MV before using them.
...
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0dfc01c2bb
huffyuvdec: Skip len==0 cases
...
Fixes vlc decoding for hypothetical files that would contain such cases.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4420b41442
huffyuvdec: check for and propagate failures from inside generate_joint_tables()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f67a0d1152
huffyuvdec: Check init_vlc() return codes.
...
Prevents out of array writes
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ebe368d5d8
ac3enc: fix 'warning: block0 may be used uninitialized in this function'
...
The pointer is also initialized to NULL for safety.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Luca Barbato
4e0bc996d9
bfin: unbreak compilation
...
Added a missing header file.
12 years ago
Paul B Mahol
8a6ae87b99
lavc: move deprecated audio_resample* bellow
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
76e74e4831
h264: remove obsolete comment.
12 years ago
Anton Khirnov
47318953dd
mpegvideo: remove some unused variables from Picture.
12 years ago
Anton Khirnov
231fd1ed39
utvideoenc/v410enc: do not set AVFrame.reference.
...
That field will be deprecated.
12 years ago
Anton Khirnov
e6b1c3bbe7
pthread: make ff_thread_release_buffer idempotent.
...
I.e. don't do anything on already released frames.
12 years ago
Anton Khirnov
aec50f79e7
rawdec: use AVPALETTE_SIZE instead of magic constants.
12 years ago
Anton Khirnov
e6da5d215b
mimic: remove a pointless cast.
12 years ago
Anton Khirnov
30d62507cd
mdec: return meaningful error codes.
12 years ago
Anton Khirnov
f713411d4c
mdec: cosmetics, reformat
12 years ago
Anton Khirnov
098eed95bc
mdec: merge mdec_common_init() into decode_init().
...
There is no point in keeping those two functions separate.
12 years ago
Anton Khirnov
f1c395944c
eatgv: use fixed-width types where appropriate.
12 years ago
Michael Niedermayer
11c99c78ba
h264: check the pixel format directly and force a reinit on mismatches.
...
The existing checks are insufficient to detect a pixel format
changes in case of some damaged streams.
Fixes inconsistency and later out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Piotr Bandurski
f9a8eeb08c
iff/deep: fix rle32 on big-endian
...
Fixes ticket #2197 .
Signed-off-by: Peter Ross <pross@xvid.org>
12 years ago
Diego Biurrun
c59211b437
x86: Simplify some arch conditionals
12 years ago
Paul B Mahol
9efceaf1f7
takdec: switch to init_get_bits8()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
3939b790f2
wmavoicedec: use the checked bitstream, reader
...
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
14c8ee00ff
vp3dec: move threads check out of header packet type check
...
Prevents reconfiguration with threads which is unsupported
and would bring the contexts into an inconsistent state.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
438ea561ad
bfin: Separate VP3 initialization code
12 years ago
Luca Barbato
f550583c00
bfin: update VP3 idct
...
The block must be set to 0.
12 years ago
Michael Niedermayer
94ef1667bb
dirac/x86: Fix handling blocksizes that are not a multiple of 4
...
Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
5c9cae7447
dirac: Only use MMX if MMX is available.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8c4aebb58d
qdm2: increase noise_table size
...
This prevents out of array reads. An alternative solution would be
to check the index but this would require several checks in the
inner loops
Yet another alternative would be to change the index reset logic
but this likely would introduce a difference to the binary decoder
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4484c722f6
alsdec/read_specific_config: check for init_get_bits failure
...
This also fixes a potential integer overflow
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Thilo Borgmann <thilo.borgmann@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Piotr Bandurski
51e9d2dbc8
aasc: fix 16bpp on big-endian
12 years ago
Michael Niedermayer
834e9fb056
x86: hpeldsp: Fix a typo, use the right register
...
This makes the code actually work.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago