Commit Graph

31043 Commits

Author SHA1 Message Date
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>
2011-11-26 18:50:27 +00:00
Mans Rullgard
e4faa31a0a svq1dec: use sign_extend()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 18:50:02 +00:00
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>
2011-11-26 18:49:51 +00:00
Cheng Sun
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
Mans Rullgard
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
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>
2011-11-26 11:38:41 +00:00
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>
2011-11-26 11:38:41 +00:00
Mans Rullgard
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
Mans Rullgard
3bd1162a52 gif: fix invalid signed shifts
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 11:38:40 +00:00
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>
2011-11-26 08:40:51 +01:00
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>
2011-11-26 08:39:58 +01:00
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>
2011-11-26 08:38:59 +01:00
Reimar Döffinger
785baa738a nuv: use FFALIGN.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:38:14 +01:00
Carl Eugen Hoyos
1484b5dec5 flicvideo: check extradata_size before accessing extradata.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:36:16 +01:00
Michael Niedermayer
5ace144fe0 fraps: check for overread.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:35:57 +01:00
K.Y.H
51f316a997 cook: fix apparent typo in extradata parsing
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-26 08:33:31 +01:00
Anton Khirnov
488eec1044 lavc: update doxy to use nondeprecated API. 2011-11-26 08:26:24 +01:00
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>
2011-11-25 19:59:15 +02:00
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>
2011-11-25 15:19:55 +00:00
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>
2011-11-25 15:52:55 +02:00
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>
2011-11-25 13:19:54 +00:00
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>
2011-11-25 13:19:53 +00:00
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.
2011-11-25 13:16:01 +01:00
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.
2011-11-25 08:25:12 +01:00
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.
2011-11-25 08:25:12 +01:00
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>
2011-11-25 00:20:03 +00:00
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)
2011-11-24 21:35:47 +01:00
Anton Khirnov
8b7412fe4e tiffenc: deprecate using compression_level 2011-11-24 21:31:36 +01:00
Ronald S. Bultje
f7f1835258 swscale: fix failing fate tests.
isGray() is left as a FIXME for later.
2011-11-24 12:21:03 -08:00
Ronald S. Bultje
185655c601 swscale: add support for planar RGB input. 2011-11-24 10:40:05 -08:00
Ronald S. Bultje
db431f7efe h264: add support for decoding planar RGB images. 2011-11-24 08:25:36 -08:00
Ronald S. Bultje
6b0768e202 Clean up swscale pixfmt macros using av_pix_fmt_descriptors[]. 2011-11-24 08:24:55 -08:00
Ronald S. Bultje
bd97b2e1ce pixfmt: add planar RGB formats. 2011-11-24 08:13:50 -08:00
Justin Ruggles
bbb46f3ec7 libavutil: add utility functions to simplify allocation of audio buffers.
Based on code by Stefano Sabatini.
2011-11-23 18:39:28 -05:00
Justin Ruggles
8889cc4f5b libavutil: add planar sample formats and av_sample_fmt_is_planar() 2011-11-23 18:39:28 -05:00
Janne Grunau
aa38cff2c6 avconv: fix segfault at EOF with delayed pictures
At EOF it makes no sense to modify avpkt.{data,size} in output_packet
since no data is consumed. Frame threading with more than 1 threads
hits the segfault.
2011-11-24 00:33:02 +01:00
Justin Ruggles
c1848c4b26 pcmdec: remove unneeded resetting of samples pointer 2011-11-23 16:26:15 -05:00
Anton Khirnov
06d4e2fa5a avconv: remove a now unused parameter from output_packet(). 2011-11-23 22:03:32 +01:00
Anton Khirnov
8b0268a853 avconv: formatting fixes in output_packet() 2011-11-23 22:02:59 +01:00
Anton Khirnov
ffa0674e5a avconv: declare some variables in blocks where they are used 2011-11-23 22:01:32 +01:00
Anton Khirnov
af8ad892bf avconv: use the same behavior when decoding audio/video/subs
I.e. if the packet was only partially consumed, pass the rest of it into
the decoder again.

Also simplify the code so it's the same for video/audio/subs.
2011-11-23 21:58:53 +01:00
Anton Khirnov
3eedd29bd7 bethsoftvideo: return proper consumed size for palette packets.
Also check for sufficient packet size.
2011-11-23 21:58:30 +01:00
Justin Ruggles
5872c78122 cdg: skip packets that don't contain a cdg command.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-23 21:58:10 +01:00
Anton Khirnov
0844b57c11 crcenc: add flags
AVFMT_NOTIMESTAMPS for crc, as it ignores the timestamps.
AVFMT_VARIABLE_FPS for framecrc, as it prints dts.

Many FATE changes, because avconv is no longer duplicating frames in
those tests.
Also added -vsync 0 for some tests to prevent avconv from dropping
frames until it can be fixed more properly.
2011-11-23 21:43:46 +01:00
Anton Khirnov
e1edfbcb24 avconv: use vsync 0 for AVFMT_NOTIMESTAMPS formats.
Prevent avconv from duplicating or dropping frames for formats where it
makes even less sense than usual, e.g. image2.
2011-11-23 21:38:17 +01:00
Anton Khirnov
a94c769dad tiffenc: add a private option for selecting compression algorithm 2011-11-23 20:29:25 +01:00
Anton Khirnov
50efd3cad8 md5enc: add flags
AVFMT_NOTIMESTAMPS for md5, as it ignores the timestamps.
AVFMT_VARIABLE_FPS for framemd5, as it prints dts.

-vsync 0 for the vp8 test is needed because with vsync 2 the timestamp
guessing code gets confused by an altref frame that is never displayed
and drops a frame later.
2011-11-23 20:19:26 +01:00
Mans Rullgard
3a0b72dee0 ARM: remove needless .text/.align directives
The 'function' macro already includes the appropriate
directives.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-23 15:06:50 +00:00
Alex Converse
963f685535 aacdec: Fix PS in ADTS.
Fixes File1.aac and Bug 80.
2011-11-22 14:33:11 -08:00
Alex Converse
105ab61c5f avconv: Consistently use PIX_FMT_NONE.
Use PIX_FMT_NONE instead of -1 when dealing with PixelFormat variables.
2011-11-22 14:33:11 -08:00