platform/upstream/libav.git
12 years agoswscale: K&R formatting cosmetics for Blackfin code
Diego Biurrun [Wed, 18 Jan 2012 22:56:49 +0000 (23:56 +0100)]
swscale: K&R formatting cosmetics for Blackfin code

Also prettyprint some comments in Assembly code.

12 years agofrwu: lowercase the FRWU codec name
Piotr Bandurski [Wed, 1 Feb 2012 20:23:33 +0000 (20:23 +0000)]
frwu: lowercase the FRWU codec name

This is more consistent with all the other codec names.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agomovdec: fix dts generation in fragmented files
Janne Grunau [Thu, 2 Feb 2012 15:30:27 +0000 (16:30 +0100)]
movdec: fix dts generation in fragmented files

Do not use AVStream's duration for dts generation since it contains in
some cases the duration of the whole file instead of duration of the
samples in the moov. This happens if the mdhd holds the duration of the
whole file but has no entries or a zero duration in its stts.

12 years agofate: make acodec-ac3_fixed test output raw AC3
Mans Rullgard [Thu, 2 Feb 2012 01:46:05 +0000 (01:46 +0000)]
fate: make acodec-ac3_fixed test output raw AC3

There is no point in this test using the RM format.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoAPIchanges: add missing commit hashes
Janne Grunau [Wed, 1 Feb 2012 18:22:54 +0000 (19:22 +0100)]
APIchanges: add missing commit hashes

12 years agoswscale: implement MMX, SSE2 and AVX functions for RGB32 input.
Ronald S. Bultje [Thu, 2 Feb 2012 05:55:32 +0000 (21:55 -0800)]
swscale: implement MMX, SSE2 and AVX functions for RGB32 input.

12 years agora144enc: drop pointless "encoder" from .long_name
Paul B Mahol [Thu, 2 Feb 2012 01:10:19 +0000 (01:10 +0000)]
ra144enc: drop pointless "encoder" from .long_name

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agobethsoftvideo: fix palette reading.
Justin Ruggles [Wed, 18 Jan 2012 18:09:43 +0000 (13:09 -0500)]
bethsoftvideo: fix palette reading.

Return the correct number of consumed bytes and set *data_size = 0.
Returned size is 1 too small, leading to that 1 byte being read as the next
frame, which results in an extra blank frame at the beginning of the stream.

12 years agompc7: use av_fast_padded_malloc()
Justin Ruggles [Tue, 31 Jan 2012 16:17:04 +0000 (11:17 -0500)]
mpc7: use av_fast_padded_malloc()

Avoids doing malloc/free for each frame.
Also fixes valgrind errors due to use of uninitialized padding bytes.

Based on a patch by Reimar Döffinger <Reimar.Doeffinger@gmx.de>

12 years agompc7: simplify handling of packet sizes that are not a multiple of 4 bytes
Justin Ruggles [Wed, 1 Feb 2012 20:19:50 +0000 (15:19 -0500)]
mpc7: simplify handling of packet sizes that are not a multiple of 4 bytes

12 years agodoc: decoding Forward Uncompressed is supported
Paul B Mahol [Wed, 1 Feb 2012 20:30:33 +0000 (20:30 +0000)]
doc: decoding Forward Uncompressed is supported

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agoFix a typo in the x86 asm version of ff_vector_clip_int32()
Justin Ruggles [Thu, 2 Feb 2012 00:02:32 +0000 (19:02 -0500)]
Fix a typo in the x86 asm version of ff_vector_clip_int32()

Specifies the correct number of xmm registers used so that they can be saved
and restored on Win64 if necessary.

12 years agopcmenc: Do not set avpkt->size.
Justin Ruggles [Wed, 1 Feb 2012 21:26:37 +0000 (16:26 -0500)]
pcmenc: Do not set avpkt->size.

It is already the correct size as set by ff_alloc_packet().

12 years agoff_alloc_packet: modify the size of the packet to match the requested size
Justin Ruggles [Wed, 1 Feb 2012 21:23:19 +0000 (16:23 -0500)]
ff_alloc_packet: modify the size of the packet to match the requested size

This will simplify encoders which use this function to request the exact
packet size rather than the maximum size.

12 years agofrwu: Employ more meaningful return values.
Paul B Mahol [Wed, 1 Feb 2012 21:05:16 +0000 (21:05 +0000)]
frwu: Employ more meaningful return values.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agofraps: Use av_fast_padded_malloc() instead of av_realloc()
Reimar Döffinger [Tue, 31 Jan 2012 16:30:34 +0000 (11:30 -0500)]
fraps: Use av_fast_padded_malloc() instead of av_realloc()

Ensures alignment and avoids using uninitialized data.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agomjpegdec: use av_fast_padded_malloc()
Reimar Döffinger [Mon, 30 Jan 2012 23:35:35 +0000 (18:35 -0500)]
mjpegdec: use av_fast_padded_malloc()

also check for allocation failure

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agoeatqi: use av_fast_padded_malloc()
Reimar Döffinger [Mon, 30 Jan 2012 23:34:10 +0000 (18:34 -0500)]
eatqi: use av_fast_padded_malloc()

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agoasv1: use av_fast_padded_malloc()
Reimar Döffinger [Mon, 30 Jan 2012 23:33:32 +0000 (18:33 -0500)]
asv1: use av_fast_padded_malloc()

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agoavcodec: Add av_fast_padded_malloc().
Janne Grunau [Tue, 31 Jan 2012 15:40:11 +0000 (15:40 +0000)]
avcodec: Add av_fast_padded_malloc().

Wrapper around av_fast_malloc() that keeps FF_INPUT_BUFFER_PADDING_SIZE
zero-padded bytes at the end of the used buffer.

Based on a patch by Reimar Döffinger <Reimar.Doeffinger@gmx.de>.

12 years agoswscale: enable dithering in MMX functions.
Ronald S. Bultje [Wed, 1 Feb 2012 15:38:57 +0000 (07:38 -0800)]
swscale: enable dithering in MMX functions.

This was accidently disabled.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agoswscale: make rgb24 function macros slightly smaller.
Ronald S. Bultje [Wed, 1 Feb 2012 15:38:54 +0000 (07:38 -0800)]
swscale: make rgb24 function macros slightly smaller.

12 years agoavcodec.h: Remove some disabled cruft.
Diego Biurrun [Wed, 1 Feb 2012 13:58:10 +0000 (14:58 +0100)]
avcodec.h: Remove some disabled cruft.

12 years agoswscale: remove obsolete comment.
Ronald S. Bultje [Wed, 1 Feb 2012 04:35:58 +0000 (20:35 -0800)]
swscale: remove obsolete comment.

12 years agoswscale-test: Drop unused argc and argv arguments from main().
Diego Biurrun [Fri, 13 Jan 2012 16:01:18 +0000 (17:01 +0100)]
swscale-test: Drop unused argc and argv arguments from main().

12 years agozmbv: Employ more meaningful return values.
Paul B Mahol [Wed, 1 Feb 2012 00:35:29 +0000 (00:35 +0000)]
zmbv: Employ more meaningful return values.

Also use av_log_ask_for_sample() where it makes sense.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agozmbvenc: Employ more meaningful return values.
Paul B Mahol [Tue, 31 Jan 2012 23:59:10 +0000 (23:59 +0000)]
zmbvenc: Employ more meaningful return values.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agovc1: prevent null pointer dereference on broken files
Janne Grunau [Wed, 25 Jan 2012 14:49:54 +0000 (15:49 +0100)]
vc1: prevent null pointer dereference on broken files

CC: libav-stable@libav.org
12 years agozmbv: check av_realloc() return values and avoid memleaks on ENOMEM
Janne Grunau [Wed, 1 Feb 2012 00:00:17 +0000 (01:00 +0100)]
zmbv: check av_realloc() return values and avoid memleaks on ENOMEM

12 years agotruespeech: align buffer
Paul B Mahol [Wed, 1 Feb 2012 05:30:18 +0000 (05:30 +0000)]
truespeech: align buffer

DSPContext.bswap_buf() requires aligned output

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agoac3: Do not read past the end of ff_ac3_band_start_tab.
Mans Rullgard [Tue, 31 Jan 2012 18:20:33 +0000 (10:20 -0800)]
ac3: Do not read past the end of ff_ac3_band_start_tab.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Alex Converse <alex.converse@gmail.com>
12 years agodv: Fix small stack overread related to CVE-2011-3929 and CVE-2011-3936.
Alex Converse [Thu, 26 Jan 2012 23:08:26 +0000 (15:08 -0800)]
dv: Fix small stack overread related to CVE-2011-3929 and CVE-2011-3936.

Found with asan.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Alex Converse <alex.converse@gmail.com>
12 years agodv: Fix null pointer dereference due to ach=0
Michael Niedermayer [Tue, 24 Jan 2012 16:51:40 +0000 (17:51 +0100)]
dv: Fix null pointer dereference due to ach=0

dv: Fix null pointer dereference due to ach=0

Fixes part2 of CVE-2011-3929

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Roman Shaposhnik <roman@shaposhnik.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Alex Converse <alex.converse@gmail.com>
12 years agodv: check stype
Michael Niedermayer [Tue, 24 Jan 2012 16:48:23 +0000 (17:48 +0100)]
dv: check stype

dv: check stype

Fixes part1 of CVE-2011-3929
Possibly fixes part of CVE-2011-3936

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Reviewed-by: Roman Shaposhnik <roman@shaposhnik.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Alex Converse <alex.converse@gmail.com>
12 years agofate-golomb: extend golomb-test to get_ue_golomb_long()
Janne Grunau [Tue, 31 Jan 2012 20:39:48 +0000 (21:39 +0100)]
fate-golomb: extend golomb-test to get_ue_golomb_long()

get_ue_golomb_long() is only tested for values up to 2^15 - 2 since
we can not write larger values.
Silence the test on success and return a non-zero value on error.
Use an heap scratch buffer instead of large stack buffer.
Remove unneeded includes.

12 years agoswfdec: Simplify sample rate calculation.
Alex Converse [Tue, 31 Jan 2012 17:55:06 +0000 (09:55 -0800)]
swfdec: Simplify sample rate calculation.

12 years agofate: add golomb-test
Diego Biurrun [Mon, 30 Jan 2012 11:58:20 +0000 (12:58 +0100)]
fate: add golomb-test

12 years agogolomb-test: K&R formatting cosmetics
Diego Biurrun [Mon, 30 Jan 2012 10:30:13 +0000 (11:30 +0100)]
golomb-test: K&R formatting cosmetics

12 years agoh264: Split h264-test off into a separate file - golomb-test.c.
Diego Biurrun [Mon, 30 Jan 2012 11:50:16 +0000 (12:50 +0100)]
h264: Split h264-test off into a separate file - golomb-test.c.

The new name is more appropriate as only golomb functions are tested.

12 years agoh264-test: cleanup: drop timer invocations, commented out code and other cruft
Diego Biurrun [Mon, 30 Jan 2012 10:16:20 +0000 (11:16 +0100)]
h264-test: cleanup: drop timer invocations, commented out code and other cruft

12 years agoh264-test: Remove unused DSP and AVCodec contexts and related init calls.
Diego Biurrun [Mon, 30 Jan 2012 10:10:27 +0000 (11:10 +0100)]
h264-test: Remove unused DSP and AVCodec contexts and related init calls.

This also avoids a segfault on startup.

12 years agoadpcm: Add missing stdint.h #include to fix standalone header compilation.
Diego Biurrun [Tue, 31 Jan 2012 17:41:52 +0000 (18:41 +0100)]
adpcm: Add missing stdint.h #include to fix standalone header compilation.

12 years agolavf: add functions for accessing the fourcc<->CodecID mapping tables.
Anton Khirnov [Fri, 27 Jan 2012 12:33:09 +0000 (13:33 +0100)]
lavf: add functions for accessing the fourcc<->CodecID mapping tables.

Fixes bug 212.

12 years agolavc: set AVCodecContext.codec in avcodec_get_context_defaults3().
Anton Khirnov [Sat, 28 Jan 2012 18:15:15 +0000 (19:15 +0100)]
lavc: set AVCodecContext.codec in avcodec_get_context_defaults3().

This way, if the AVCodecContext is allocated for a specific codec, the
caller doesn't need to store this codec separately and then pass it
again to avcodec_open2().

It also allows to set codec private options using av_opt_set_* before
opening the codec.

12 years agolavc: make avcodec_close() work properly on unopened codecs.
Anton Khirnov [Sun, 29 Jan 2012 11:17:30 +0000 (12:17 +0100)]
lavc: make avcodec_close() work properly on unopened codecs.

I.e. free the priv_data and other stuff allocated in
avcodec_alloc_context3() and not segfault.

12 years agolavc: add avcodec_is_open().
Anton Khirnov [Thu, 8 Dec 2011 05:57:44 +0000 (06:57 +0100)]
lavc: add avcodec_is_open().

It allows to check whether an AVCodecContext is open in a documented
way. Right now the undocumented way this check is done in lavf/lavc is
by checking whether AVCodecContext.codec is NULL. However it's desirable
to be able to set AVCodecContext.codec before avcodec_open2().

12 years agolavf: rename AVInputFormat.value to raw_codec_id.
Anton Khirnov [Tue, 31 Jan 2012 06:50:31 +0000 (07:50 +0100)]
lavf: rename AVInputFormat.value to raw_codec_id.

It's only used by raw demuxers for storing the codec id.

12 years agolavf: remove the pointless value field from flv and iv8
Anton Khirnov [Tue, 31 Jan 2012 06:46:18 +0000 (07:46 +0100)]
lavf: remove the pointless value field from flv and iv8

The demuxers don't use it in any way.

12 years agolavc/lavf: remove unnecessary symbols from the symbol version script.
Anton Khirnov [Sun, 29 Jan 2012 11:22:49 +0000 (12:22 +0100)]
lavc/lavf: remove unnecessary symbols from the symbol version script.

12 years agolavc: reorder AVCodec fields.
Anton Khirnov [Fri, 27 Jan 2012 11:29:37 +0000 (12:29 +0100)]
lavc: reorder AVCodec fields.

Put all private fields at the end and mark them as such so they can be
easily changed/removed.

This breaks ABI.

12 years agolavf: reorder AVInput/OutputFormat fields.
Anton Khirnov [Fri, 27 Jan 2012 11:29:37 +0000 (12:29 +0100)]
lavf: reorder AVInput/OutputFormat fields.

Put all private fields at the end and mark them as such so they can be
easily changed/removed.

This breaks ABI.

12 years agomp3dec: Fix a heap-buffer-overflow
Alex Converse [Wed, 25 Jan 2012 23:46:14 +0000 (15:46 -0800)]
mp3dec: Fix a heap-buffer-overflow

In some cases, what is left to read from ptr is smaller than EXTRABYTES.

Based on a patch by Thierry Foucu <tfoucu@gmail.com>.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
12 years agoadpcmenc: remove some unneeded casts
Justin Ruggles [Mon, 30 Jan 2012 18:34:43 +0000 (13:34 -0500)]
adpcmenc: remove some unneeded casts

12 years agoadpcmenc: use int16_t and uint8_t instead of short and unsigned char.
Justin Ruggles [Mon, 30 Jan 2012 18:33:05 +0000 (13:33 -0500)]
adpcmenc: use int16_t and uint8_t instead of short and unsigned char.

12 years agoadpcmenc: fix adpcm_ms extradata allocation
Justin Ruggles [Mon, 30 Jan 2012 18:15:18 +0000 (13:15 -0500)]
adpcmenc: fix adpcm_ms extradata allocation

Add FF_INPUT_BUFFER_PADDING_SIZE.
If allocation fails, also free memory which was allocated previously in
adpcm_encode_init().

12 years agoadpcmenc: return proper AVERROR codes instead of -1
Justin Ruggles [Mon, 30 Jan 2012 18:06:57 +0000 (13:06 -0500)]
adpcmenc: return proper AVERROR codes instead of -1

12 years agoadpcmenc: check for coded_frame allocation failure
Justin Ruggles [Mon, 30 Jan 2012 18:03:01 +0000 (13:03 -0500)]
adpcmenc: check for coded_frame allocation failure

12 years agoadpcmenc: Do not set coded_frame->key_frame.
Justin Ruggles [Mon, 30 Jan 2012 17:57:34 +0000 (12:57 -0500)]
adpcmenc: Do not set coded_frame->key_frame.

It is already set in avcodec_alloc_frame().

12 years agompc7: check for allocation failure
Justin Ruggles [Mon, 30 Jan 2012 19:33:01 +0000 (14:33 -0500)]
mpc7: check for allocation failure

12 years agompc7: align local temp buffer
Justin Ruggles [Mon, 30 Jan 2012 19:29:05 +0000 (14:29 -0500)]
mpc7: align local temp buffer

DSPContext.bswap_buf() requires aligned output

12 years agorv40: x86 SIMD for biweight
Christophe Gisquet [Wed, 11 Jan 2012 23:11:15 +0000 (00:11 +0100)]
rv40: x86 SIMD for biweight

Provide MMX, SSE2 and SSSE3 versions, with a fast-path when the weights are
multiples of 512 (which is often the case when the values round up nicely).

*_TIMER report for the 16x16 and 8x8 cases:
C:
9015 decicycles in 16, 524257 runs, 31 skips
2656 decicycles in 8, 524271 runs, 17 skips
MMX:
4156 decicycles in 16, 262090 runs, 54 skips
1206 decicycles in 8, 262131 runs, 13 skips
MMX on fast-path:
2760 decicycles in 16, 524222 runs, 66 skips
995 decicycles in 8, 524252 runs, 36 skips
SSE2:
2163 decicycles in 16, 262131 runs, 13 skips
832 decicycles in 8, 262137 runs, 7 skips
SSE2 with fast path:
1783 decicycles in 16, 524276 runs, 12 skips
711 decicycles in 8, 524283 runs, 5 skips
SSSE3:
2117 decicycles in 16, 262136 runs, 8 skips
814 decicycles in 8, 262143 runs, 1 skips
SSSE3 with fast path:
1315 decicycles in 16, 524285 runs, 3 skips
578 decicycles in 8, 524286 runs, 2 skips

This means around a 4% speedup for some sequences.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agox86: Give RV40 init file a more suitable name.
Diego Biurrun [Mon, 30 Jan 2012 08:56:28 +0000 (09:56 +0100)]
x86: Give RV40 init file a more suitable name.

12 years agox86: Place mm_flags variable declaration below the appropriate #ifdef.
Diego Biurrun [Mon, 30 Jan 2012 08:39:16 +0000 (09:39 +0100)]
x86: Place mm_flags variable declaration below the appropriate #ifdef.

This fixes some unused variable warnings with YASM disabled.

12 years agomovdec: Ignore sample_degradation_priority bits when checking first_sample_flags
Martin Storsjö [Wed, 18 Jan 2012 13:12:10 +0000 (15:12 +0200)]
movdec: Ignore sample_degradation_priority bits when checking first_sample_flags

This makes the first packet of a track fragment run to get
the keyframe flag set properly if sample_degradation_priority
is nonzero.

This makes the keyframes flag be set properly for ismv files
created by Microsoft.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoflvdec: Interpret a toplevel 'object' type metadata item as normal metadata, too
Martin Storsjö [Mon, 30 Jan 2012 20:47:40 +0000 (22:47 +0200)]
flvdec: Interpret a toplevel 'object' type metadata item as normal metadata, too

Previously, we've only passed the key string on to the recursive
amf_parse_object for the mixedarray type, not for 'object'. By
passing the key string on, the recursive amf_parse_object can
store the amf objects as metadata.

This kind of data was seen in data from XSplit Broadcaster, received
over RTMP via Wowza. This patch allows reading this metadata.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoavconv: deprecate the -deinterlace option
Anton Khirnov [Mon, 30 Jan 2012 15:05:28 +0000 (16:05 +0100)]
avconv: deprecate the -deinterlace option

Its quality is horrible, yadif should always be used instead.

12 years agodoc: Fix the name of the new function
Martin Storsjö [Mon, 30 Jan 2012 19:11:33 +0000 (21:11 +0200)]
doc: Fix the name of the new function

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoaacenc: make sure to encode enough frames to cover all input samples.
Justin Ruggles [Sat, 28 Jan 2012 22:51:22 +0000 (17:51 -0500)]
aacenc: make sure to encode enough frames to cover all input samples.

Currently, any samples in the final frame are not decoded because they are
only represented by one frame instead of two. So we encode two final frames to
cover both the analysis delay and the MDCT delay.

12 years agoaacenc: only use the number of input samples provided by the user.
Justin Ruggles [Sat, 28 Jan 2012 22:18:18 +0000 (17:18 -0500)]
aacenc: only use the number of input samples provided by the user.

Fixes handling of CODEC_CAP_SMALL_LAST_FRAME.

12 years agowmadec: Verify bitstream size makes sense before calling init_get_bits.
Alex Converse [Fri, 27 Jan 2012 22:24:07 +0000 (14:24 -0800)]
wmadec: Verify bitstream size makes sense before calling init_get_bits.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12 years agokmvc: Log into a context at a log level constant.
Alex Converse [Mon, 30 Jan 2012 18:27:50 +0000 (10:27 -0800)]
kmvc: Log into a context at a log level constant.

12 years agompeg12: Pad framerate tab to 16 entries.
Alex Converse [Fri, 27 Jan 2012 23:50:24 +0000 (15:50 -0800)]
mpeg12: Pad framerate tab to 16 entries.

There are many places where we read an unchecked 4-bit index into it.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12 years agokgv1dec: Increase offsets array size so it is large enough.
Michael Niedermayer [Wed, 25 Jan 2012 22:23:35 +0000 (23:23 +0100)]
kgv1dec: Increase offsets array size so it is large enough.

Fixes CVE-2011-3945

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 807a045ab7f51993a2c1b3116016cbbd4f3d20d6)

Signed-off-by: Alex Converse <alex.converse@gmail.com>
12 years agokmvc: Check palsize.
Alex Converse [Thu, 26 Jan 2012 16:30:49 +0000 (17:30 +0100)]
kmvc: Check palsize.

Fixes: CVE-2011-3952

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Based on fix by Michael Niedermayer

12 years agonsvdec: Propagate errors
Alex Converse [Fri, 27 Jan 2012 01:23:09 +0000 (17:23 -0800)]
nsvdec: Propagate errors

Related to CVE-2011-3940.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12 years agonsvdec: Be more careful with av_malloc().
Alex Converse [Fri, 27 Jan 2012 01:21:46 +0000 (17:21 -0800)]
nsvdec: Be more careful with av_malloc().

Check results for av_malloc() and fix an overflow in one call.

Related to CVE-2011-3940.

Based in part on work from Michael Niedermayer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12 years agonsvdec: Fix use of uninitialized streams.
Michael Niedermayer [Tue, 24 Jan 2012 21:20:26 +0000 (22:20 +0100)]
nsvdec: Fix use of uninitialized streams.

Fixes CVE-2011-3940 (Out of bounds read resulting in out of bounds write)

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5c011706bc752d34bc6ada31d7df2ca0c9af7c6b)

Signed-off-by: Alex Converse <alex.converse@gmail.com>
12 years agomovenc: cosmetics: Get rid of camelCase identifiers
Martin Storsjö [Mon, 30 Jan 2012 14:19:15 +0000 (16:19 +0200)]
movenc: cosmetics: Get rid of camelCase identifiers

Also add spacing around operators on touched lines, and split
one line to match the common style.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoswscale: more generic check for planar destination formats with alpha
Paul B Mahol [Mon, 30 Jan 2012 13:58:50 +0000 (13:58 +0000)]
swscale: more generic check for planar destination formats with alpha

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agodoc: Document mov/mp4 fragmentation options
Martin Storsjö [Fri, 20 Jan 2012 18:33:13 +0000 (20:33 +0200)]
doc: Document mov/mp4 fragmentation options

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agobuild: Use order-only prerequisites for creating FATE reference file dirs.
Diego Biurrun [Sun, 29 Jan 2012 21:08:58 +0000 (22:08 +0100)]
build: Use order-only prerequisites for creating FATE reference file dirs.

12 years agox86 dsputil: provide SSE2/SSSE3 versions of bswap_buf
Christophe Gisquet [Thu, 19 Jan 2012 20:48:39 +0000 (21:48 +0100)]
x86 dsputil: provide SSE2/SSSE3 versions of bswap_buf

While pshufb allows emulating bswap on XMM registers for SSSE3, more
shuffling is needed for SSE2. Alignment is critical, so specific codepaths
are provided for this case.

For the huffyuv sequence "angels_480-huffyuvcompress.avi":
C (using bswap instruction): ~ 55k cycles
SSE2:                        ~ 40k cycles
SSSE3 using unaligned loads: ~ 35k cycles
SSSE3 using aligned loads:   ~ 30k cycles

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agortsp: Remove some unused variables from ff_rtsp_connect().
Diego Biurrun [Mon, 30 Jan 2012 08:38:41 +0000 (09:38 +0100)]
rtsp: Remove some unused variables from ff_rtsp_connect().

12 years agoavutil: make intfloat api public
Paul B Mahol [Sun, 29 Jan 2012 20:09:22 +0000 (20:09 +0000)]
avutil: make intfloat api public

The functions are already av_ prefixed and intfloat header is already provided.
Install libavutil/intfloat.h

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agoavformat_write_header(): detail error message
Rafaël Carré [Sun, 29 Jan 2012 04:29:26 +0000 (23:29 -0500)]
avformat_write_header(): detail error message

Give the exact aspect ratios when there is a mismatch between encoder
and muxer.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agos/vbsf/bsf/
Mike Melanson [Mon, 30 Jan 2012 05:29:25 +0000 (21:29 -0800)]
s/vbsf/bsf/

-vbsf doesn't exist anymore. It got renamed to -bsf somewhere along the
line. Update print statement accordingly.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agoyuv4mpeg: allow YUV4MPEG2 demuxer to recognize 'C420' colorspace.
Mike Melanson [Mon, 30 Jan 2012 05:24:41 +0000 (21:24 -0800)]
yuv4mpeg: allow YUV4MPEG2 demuxer to recognize 'C420' colorspace.

Current demuxer recognizes several colorspace formats that begin with 'C420'
but does not yet recognize plain 'C420'. GStreamer's y4menc component
generates .y4m files with a 'C420' colorspace. This new comparison is
placed after the other 'C420' checks so that it doesn't interfere with
them.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agopng: add support for bpp>4 to paeth x86 SIMD code.
Ronald S. Bultje [Fri, 27 Jan 2012 15:28:28 +0000 (23:28 +0800)]
png: add support for bpp>4 to paeth x86 SIMD code.

This fixes playback of e.g. RGB48 (bpp=6) content on x86 CPUs. Fixes
bug 214.

12 years agopng: add SSE2 version for add_bytes_l2.
Ronald S. Bultje [Fri, 27 Jan 2012 15:23:05 +0000 (23:23 +0800)]
png: add SSE2 version for add_bytes_l2.

12 years agopng: convert DSP functions to yasm.
Ronald S. Bultje [Fri, 27 Jan 2012 15:21:55 +0000 (23:21 +0800)]
png: convert DSP functions to yasm.

12 years agoFix non-C89 declarations in for loops
Mans Rullgard [Sun, 29 Jan 2012 20:55:10 +0000 (20:55 +0000)]
Fix non-C89 declarations in for loops

Some compilers still do not support this syntax.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agopng: add missing #if HAVE_SSSE3 around function pointer assignment.
Ronald S. Bultje [Sun, 29 Jan 2012 20:31:59 +0000 (12:31 -0800)]
png: add missing #if HAVE_SSSE3 around function pointer assignment.

12 years agoimdct36: mark SSE functions as using all 16 XMM registers.
Ronald S. Bultje [Sun, 29 Jan 2012 16:14:05 +0000 (08:14 -0800)]
imdct36: mark SSE functions as using all 16 XMM registers.

On x86-64, it indeed uses all 16 registers (and on x86-32, this gets
clipped to 8). Not marking it properly causes callers of this function
to fail randomly because of XMM register clobbering.

12 years agopng: move DSP functions to their own DSP context.
Ronald S. Bultje [Fri, 27 Jan 2012 15:00:36 +0000 (23:00 +0800)]
png: move DSP functions to their own DSP context.

12 years agosunrast: Add a sample request for TIFF, IFF, and Experimental Rastfile formats.
Aneesh Dogra [Sat, 28 Jan 2012 13:04:15 +0000 (18:34 +0530)]
sunrast: Add a sample request for TIFF, IFF, and Experimental Rastfile formats.

Signed-off-by: Aneesh Dogra <lionaneesh@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agosunrast: Cosmetics
Aneesh Dogra [Sat, 28 Jan 2012 13:04:14 +0000 (18:34 +0530)]
sunrast: Cosmetics

Signed-off-by: Aneesh Dogra <lionaneesh@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agosunrast: Remove if (unsigned int < 0) check.
Aneesh Dogra [Sun, 29 Jan 2012 05:25:32 +0000 (10:55 +0530)]
sunrast: Remove if (unsigned int < 0) check.

Note: This fixes the following GCC warning :-
libavcodec/sunrast.c:94: warning: comparison of unsigned expression < 0 is always false.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agosunrast: Replace magic number by a macro.
Aneesh Dogra [Sat, 28 Jan 2012 13:04:12 +0000 (18:34 +0530)]
sunrast: Replace magic number by a macro.

Signed-off-by: Aneesh Dogra <lionaneesh@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agoaacenc: Fix LONG_START windowing.
Nathan Caldwell [Sat, 28 Jan 2012 05:23:41 +0000 (22:23 -0700)]
aacenc: Fix LONG_START windowing.

Forgot to add the equivalent amount to the incoming sample pointer as the output pointer.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agoaacenc: Fix a bug where deinterleaved samples were stored in the wrong place.
Nathan Caldwell [Sat, 28 Jan 2012 05:23:40 +0000 (22:23 -0700)]
aacenc: Fix a bug where deinterleaved samples were stored in the wrong place.

10l: Forgot to adjust deinterleave for new location of incoming samples in 7946a5a.

This produced incorrect, but surprisingly listenable results.

Thanks to Justin Ruggles for the report.

Signed-off-by: Anton Khirnov <anton@khirnov.net>