platform/upstream/libav.git
12 years agolavc: add width and height fields to AVFrame
Stefano Sabatini [Sun, 1 May 2011 12:02:08 +0000 (14:02 +0200)]
lavc: add width and height fields to AVFrame

width and height are per-frame properties, setting these values in
AVFrame simplify the operation of extraction of that information,
since avoids the need to check the codec/stream context.

12 years agolavc: add a sample_aspect_ratio field to AVFrame
Stefano Sabatini [Fri, 29 Apr 2011 11:04:47 +0000 (13:04 +0200)]
lavc: add a sample_aspect_ratio field to AVFrame

The sample aspect ratio is a per-frame property, so it makes sense to
define it in AVFrame rather than in the codec/stream context.
Simplify application-level sample aspect ratio information extraction,
and allow further simplifications.

12 years agodoxy: add website-alike style to the html output
Gautam Gupta [Sun, 11 Dec 2011 18:02:17 +0000 (19:02 +0100)]
doxy: add website-alike style to the html output

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agoFAQ: add an entry for common error when using -profile
Anton Khirnov [Sun, 25 Dec 2011 12:48:06 +0000 (13:48 +0100)]
FAQ: add an entry for common error when using -profile

12 years agovp3dec: Check coefficient index in vp3_dequant()
Reinhard Tartler [Sun, 4 Dec 2011 09:10:33 +0000 (10:10 +0100)]
vp3dec: Check coefficient index in vp3_dequant()

Based on a patch by Michael Niedermayer <michaelni@gmx.at>

Fixes NGS00145, CVE-2011-4352

Found-by: Phillip Langlois
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
12 years agosvq1dec: call avcodec_set_dimensions() after dimensions changed.
Michael Niedermayer [Fri, 18 Nov 2011 18:10:21 +0000 (19:10 +0100)]
svq1dec: call avcodec_set_dimensions() after dimensions changed.

Fixes NGS00148, CVE-2011-4579

Found-by: Phillip Langlois
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agoPrepare for 0.8_beta1 snapshot release
Reinhard Tartler [Sun, 6 Nov 2011 10:12:04 +0000 (11:12 +0100)]
Prepare for 0.8_beta1 snapshot release

12 years agothreads: check defines before using them in automatic thread detection
Janne Grunau [Fri, 23 Dec 2011 10:10:37 +0000 (11:10 +0100)]
threads: check defines before using them in automatic thread detection

12 years agopthread: include sys/types.h before sys/sysctl.h
Janne Grunau [Fri, 23 Dec 2011 09:14:15 +0000 (10:14 +0100)]
pthread: include sys/types.h before sys/sysctl.h

Fixes compilation on FreeBSD with clang 3.

12 years ago4xm: remove unused variables.
Anton Khirnov [Thu, 22 Dec 2011 14:40:26 +0000 (15:40 +0100)]
4xm: remove unused variables.

12 years agoh264: Fix a possible overread in decode_nal_units()
Alexander Strange [Mon, 12 Dec 2011 23:13:39 +0000 (18:13 -0500)]
h264: Fix a possible overread in decode_nal_units()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agoallfilters: fix type of avfilter_vsrc_buffer.
Anton Khirnov [Thu, 22 Dec 2011 16:32:29 +0000 (17:32 +0100)]
allfilters: fix type of avfilter_vsrc_buffer.

12 years agow32thread: call ResetEvent() in pthread_cond_broadcast().
Sergey Radionov [Fri, 23 Dec 2011 03:37:48 +0000 (10:37 +0700)]
w32thread: call ResetEvent() in pthread_cond_broadcast().

Also add "volatile" to broadcast flag (since it is used from
multiple threads).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agobuild: fix standalone compilation of OMA muxer
Diego Biurrun [Thu, 22 Dec 2011 20:10:38 +0000 (21:10 +0100)]
build: fix standalone compilation of OMA muxer

The muxer depends on the id3v2 writing code, so link against it.

12 years agobuild: fix standalone compilation of Microsoft XMV demuxer
Diego Biurrun [Thu, 22 Dec 2011 20:09:23 +0000 (21:09 +0100)]
build: fix standalone compilation of Microsoft XMV demuxer

The demuxer depends on the RIFF codec tags code, so link against it.

12 years agobuild: fix standalone compilation of Core Audio Format demuxer
Diego Biurrun [Thu, 22 Dec 2011 20:05:26 +0000 (21:05 +0100)]
build: fix standalone compilation of Core Audio Format demuxer

The demuxer depends on code from mov.c, which in turn depends on
code from mov_chan.c, so link against it.

12 years agokvmc: fix invalid reads
Gaurav Narula [Mon, 12 Dec 2011 14:54:54 +0000 (20:24 +0530)]
kvmc: fix invalid reads

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
12 years ago4xm: Add a check in decode_i_frame to prevent buffer overreads
Shitiz Garg [Wed, 14 Dec 2011 12:59:21 +0000 (18:29 +0530)]
4xm: Add a check in decode_i_frame to prevent buffer overreads

Fixes bugzilla #135

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
12 years agoadpcm: fix IMA SMJPEG decoding
Paul B Mahol [Wed, 21 Dec 2011 19:27:53 +0000 (19:27 +0000)]
adpcm: fix IMA SMJPEG decoding

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
12 years agooptions: set minimum for "threads" to zero
Janne Grunau [Wed, 21 Dec 2011 00:37:44 +0000 (01:37 +0100)]
options: set minimum for "threads" to zero

A negative number of threads does not make sense and 0 is used for
autodetection. Adds a symbolic name for autodetection.

12 years agobsd: use number of logical CPUs as automatic thread count
Janne Grunau [Thu, 22 Dec 2011 20:10:07 +0000 (21:10 +0100)]
bsd: use number of logical CPUs as automatic thread count

12 years agowindows: use number of CPUs as automatic thread count
Janne Grunau [Wed, 21 Dec 2011 00:26:19 +0000 (01:26 +0100)]
windows: use number of CPUs as automatic thread count

12 years agolinux: use number of CPUs as automatic thread count
Janne Grunau [Wed, 21 Dec 2011 00:18:01 +0000 (01:18 +0100)]
linux: use number of CPUs as automatic thread count

Use sched_getaffinity to determine the number of logical CPUs.
Limits the number of threads to 16 since slice threading of H.264
seems to be buggy with more than 16 threads.

12 years agopthreads: reset active_thread_type when slice thread_init returrns early
Janne Grunau [Wed, 21 Dec 2011 12:07:54 +0000 (13:07 +0100)]
pthreads: reset active_thread_type when slice thread_init returrns early

12 years agov410dec: include correct headers
Paul B. Mahol [Wed, 21 Dec 2011 00:19:12 +0000 (00:19 +0000)]
v410dec: include correct headers

This file does not use anything from get_bits.h but needs
intreadwrite.h.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
12 years agoDrop ALT_ prefix from BITSTREAM_READER_LE name.
Diego Biurrun [Thu, 22 Dec 2011 15:33:31 +0000 (16:33 +0100)]
Drop ALT_ prefix from BITSTREAM_READER_LE name.

The prefix is a historic remnant that probably meant "alternative".
Now that the A32 bitstream reader has been dropped it makes no sense anymore.

12 years agolavfi: always build vsrc_buffer.
Anton Khirnov [Wed, 21 Dec 2011 19:47:52 +0000 (20:47 +0100)]
lavfi: always build vsrc_buffer.

It's a part of public API.

12 years agora144enc: zero the reflection coeffs if the filter is unstable
Justin Ruggles [Wed, 21 Dec 2011 21:09:11 +0000 (16:09 -0500)]
ra144enc: zero the reflection coeffs if the filter is unstable

fixes use of uninitialized values if the filter is still unstable after using
the previous frame lpc coefficients.

12 years agosws: readd PAL8 to isPacked()
Anton Khirnov [Wed, 21 Dec 2011 05:41:57 +0000 (06:41 +0100)]
sws: readd PAL8 to isPacked()

Fixes PAL8 to YUV conversion.

12 years agomov: Don't stick the QuickTime field ordering atom in extradata.
Alex Converse [Wed, 14 Dec 2011 02:49:06 +0000 (18:49 -0800)]
mov: Don't stick the QuickTime field ordering atom in extradata.

The 'fiel' atoms can be found in H.264 tracks clobbering the extradata.
MJPEG supports non field based extradata, and this data should be
preserved when copying.

12 years agotruespeech: fix invalid reads in truespeech_apply_twopoint_filter()
Justin Ruggles [Wed, 21 Dec 2011 23:13:06 +0000 (18:13 -0500)]
truespeech: fix invalid reads in truespeech_apply_twopoint_filter()

fixes Bug 171

12 years agoasfdec: add side data to ASFStream packet instead of output packet.
Justin Ruggles [Tue, 20 Dec 2011 04:16:51 +0000 (23:16 -0500)]
asfdec: add side data to ASFStream packet instead of output packet.

fixes memleak of side data

12 years agoidroqdec: set AVFMTCTX_NOHEADER and create streams as they occur.
Justin Ruggles [Tue, 20 Dec 2011 04:53:04 +0000 (23:53 -0500)]
idroqdec: set AVFMTCTX_NOHEADER and create streams as they occur.

This fixes demuxing of file where the first packet is not audio. Such files
are generated by our idroq muxer. It also fixes demuxing of audio only
idroq files.

12 years agonellymoserdec: Indicate that the decoder can handle changed parameters
Martin Storsjö [Fri, 16 Dec 2011 14:10:02 +0000 (16:10 +0200)]
nellymoserdec: Indicate that the decoder can handle changed parameters

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agolibavcodec: Apply parameter change side data when decoding audio
Martin Storsjö [Fri, 16 Dec 2011 10:59:26 +0000 (12:59 +0200)]
libavcodec: Apply parameter change side data when decoding audio

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoflvdec: Add param change side data if the sample rate or channels have changed
Martin Storsjö [Fri, 16 Dec 2011 10:48:24 +0000 (12:48 +0200)]
flvdec: Add param change side data if the sample rate or channels have changed

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agolibavformat: Add a utility function for adding parameter change side data
Martin Storsjö [Fri, 16 Dec 2011 10:48:09 +0000 (12:48 +0200)]
libavformat: Add a utility function for adding parameter change side data

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agolibavcodec: Define a side data type for parameter changes
Martin Storsjö [Thu, 15 Dec 2011 16:30:03 +0000 (18:30 +0200)]
libavcodec: Define a side data type for parameter changes

Also define a codec capability for codecs that can handle
parameters changed externally between decoded packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoaacdec: Handle new extradata passed as side data
Martin Storsjö [Thu, 15 Dec 2011 14:53:19 +0000 (16:53 +0200)]
aacdec: Handle new extradata passed as side data

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoflvdec: Export new AAC/H.264 extradata as side data on the next packet
Martin Storsjö [Thu, 15 Dec 2011 14:29:55 +0000 (16:29 +0200)]
flvdec: Export new AAC/H.264 extradata as side data on the next packet

Compared to just overwriting the old extradata, this has the
advantage of letting the decoder know exactly when the
extradata changed (otherwise it is changed immediately when the
new extradata packet is demuxed, even if there's old queued packets
awaiting to be decoded). This makes it easier for decoders to
actually react to the change, so they won't have to inspect
the extradata for each packet to see if it might have changed.

This works when sequentially playing a file with sample rate
changes, but if seeking past a new extradata packet in the
file, it obviously doesn't work properly. That case doesn't
work in flash player either, so it's probably ok not to handle
it.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agolibavcodec: Define a side data type for new extradata
Martin Storsjö [Thu, 15 Dec 2011 14:11:49 +0000 (16:11 +0200)]
libavcodec: Define a side data type for new extradata

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoflacdec: skip all track indices at once instead of looping.
Paul B Mahol [Sat, 10 Dec 2011 19:42:46 +0000 (14:42 -0500)]
flacdec: skip all track indices at once instead of looping.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agomxf: Add PictureEssenceCoding UL for V210.
Tomas Härdin [Mon, 26 Sep 2011 09:24:11 +0000 (11:24 +0200)]
mxf: Add PictureEssenceCoding UL for V210.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
12 years agomxfdec: consider QuantizationBits between 17 and 24 to be pcm_s24*
Tomas Härdin [Tue, 27 Sep 2011 09:14:59 +0000 (11:14 +0200)]
mxfdec: consider QuantizationBits between 17 and 24 to be pcm_s24*

This fixes playback of BRD38772509.mxf.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
12 years agomxfenc: Add support for MPEG-2 MP@HL-14 in mxf container.
Daniel Kristjansson [Fri, 16 Sep 2011 16:16:30 +0000 (18:16 +0200)]
mxfenc: Add support for MPEG-2 MP@HL-14 in mxf container.

Support Main Profile at High 1440 Level in MXF container,
using essence coding label from SMPTE RDD 9, table 6.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
12 years agomxf: H.264/MPEG-4 AVC Intra support
Baptiste Coudurier [Sun, 14 Aug 2011 22:40:54 +0000 (00:40 +0200)]
mxf: H.264/MPEG-4 AVC Intra support

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
12 years agoconfigure: Show whether the safe bitstream reader is enabled
Martin Storsjö [Wed, 21 Dec 2011 13:32:39 +0000 (15:32 +0200)]
configure: Show whether the safe bitstream reader is enabled

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agox86: Tighten register constraints for decode_significance*_x86.
Diego Biurrun [Wed, 21 Dec 2011 10:39:39 +0000 (11:39 +0100)]
x86: Tighten register constraints for decode_significance*_x86.

On 32-bit OS X with gcc 4.0/4.2 and shared libraries enabled, the ebx register
is not available, but required to assemble the functions.

This reverts commit 8742a4f to a simplified version of the original constraints.

12 years agoReplace Subversion revisions in comments by Git hashes.
Diego Biurrun [Tue, 20 Dec 2011 22:51:55 +0000 (23:51 +0100)]
Replace Subversion revisions in comments by Git hashes.

12 years agoh264_cabac: synchronize decode_significance_*_x86 conditionals
Diego Biurrun [Tue, 20 Dec 2011 17:57:30 +0000 (18:57 +0100)]
h264_cabac: synchronize decode_significance_*_x86 conditionals

The definition and the call site where under different #ifdefs.

12 years agow32threads: wait for the waked thread in pthread_cond_signal.
Sergey Radionov [Wed, 21 Dec 2011 02:08:56 +0000 (09:08 +0700)]
w32threads: wait for the waked thread in pthread_cond_signal.

This fixes a deadlock VLC triggered with multithreaded decoding. The
wait forces one of the current waiters to wake and not the thread
which calls pthread_cond_signal() itself.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agoaacdec: Cleanup decode_ics_info.
Alex Converse [Tue, 20 Dec 2011 18:36:27 +0000 (10:36 -0800)]
aacdec: Cleanup decode_ics_info.

Remove unused function argument.
Return an AVERROR.
Don't zero out ICS on failure.

12 years agonetwork: properly declare WSADATA in windows
Sergey Radionov [Wed, 21 Dec 2011 02:19:10 +0000 (09:19 +0700)]
network: properly declare WSADATA in windows

Fixed "ISO C90 forbids mixed declarations and code" in ff_network_init

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agofate: account for NUT 10bit support
Luca Barbato [Wed, 21 Dec 2011 01:50:57 +0000 (02:50 +0100)]
fate: account for NUT 10bit support

Some libavifilter tests use NUT as output even if the produced
files were not decodable. The support for 10bit introduced in
432f0e5b7d and 91b1e6f0c changed the hashes.

12 years agobuild: error on mixed declarations and code
Mans Rullgard [Tue, 20 Dec 2011 16:32:06 +0000 (16:32 +0000)]
build: error on mixed declarations and code

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agopostproc: altivec: fix remaining mixed declarations and code
Mans Rullgard [Tue, 20 Dec 2011 19:07:49 +0000 (19:07 +0000)]
postproc: altivec: fix remaining mixed declarations and code

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agopostproc: altivec: untemplate some variable names
Mans Rullgard [Tue, 20 Dec 2011 19:03:25 +0000 (19:03 +0000)]
postproc: altivec: untemplate some variable names

These variables are now in separate scopes and thus do not
need unique names.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agopostproc: altivec: fix trivial cases of mixed declarations and code
Mans Rullgard [Tue, 20 Dec 2011 18:31:43 +0000 (18:31 +0000)]
postproc: altivec: fix trivial cases of mixed declarations and code

This moves declarations without initialisers or with constant
initialisers to the start of a block, and adds do {} while(0)
around some macros, thus allowing declarations within them.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agolavc: always align height by 32 pixel
Rafaël Carré [Tue, 13 Dec 2011 14:32:34 +0000 (15:32 +0100)]
lavc: always align height by 32 pixel

Interlaced content for most codec requires it.
This patch is a stop-gap pending a serious rework to support
codecs with non 16 pixel macroblocks.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agoraw: add 10bit YUV definitions
Luca Barbato [Sun, 4 Dec 2011 14:56:40 +0000 (15:56 +0100)]
raw: add 10bit YUV definitions

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agonut: support 10bit YUV
Luca Barbato [Sun, 4 Dec 2011 14:56:39 +0000 (15:56 +0100)]
nut: support 10bit YUV

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years agompegvideo_enc: separate declarations and statements
Diego Biurrun [Tue, 20 Dec 2011 09:06:49 +0000 (10:06 +0100)]
mpegvideo_enc: separate declarations and statements

libavcodec/mpegvideo_enc.c:1209: warning: ISO C90 forbids mixed declarations and code

12 years agooma: make header compile standalone
Diego Biurrun [Tue, 20 Dec 2011 14:38:18 +0000 (15:38 +0100)]
oma: make header compile standalone

12 years agovp3: Reorder some functions to fix VP3 build with Theora disabled.
Diego Biurrun [Tue, 20 Dec 2011 13:42:54 +0000 (14:42 +0100)]
vp3: Reorder some functions to fix VP3 build with Theora disabled.

12 years agobuild: fix standalone compilation of ADX encoder
Diego Biurrun [Tue, 20 Dec 2011 17:26:54 +0000 (18:26 +0100)]
build: fix standalone compilation of ADX encoder

The encoder depends on the common code, so link against it.

12 years agobuild: fix standalone compilation of ADPCM decoders
Diego Biurrun [Tue, 20 Dec 2011 10:37:56 +0000 (11:37 +0100)]
build: fix standalone compilation of ADPCM decoders

The generic ADPCM codes depends on the ADPCM data tables.

12 years agobuild: fix standalone compilation of mpc7/mpc8 decoders
Diego Biurrun [Tue, 20 Dec 2011 10:34:05 +0000 (11:34 +0100)]
build: fix standalone compilation of mpc7/mpc8 decoders

These decoders depend on the mpegaudio DSP code.

12 years ago4xm: Use bytestream2 functions to prevent overreads
Aneesh Dogra [Mon, 19 Dec 2011 22:24:50 +0000 (03:54 +0530)]
4xm: Use bytestream2 functions to prevent overreads

Fixes Bug 110.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agobytestream: add a new set of bytestream functions with overread checking
Aneesh Dogra [Mon, 19 Dec 2011 22:24:50 +0000 (03:54 +0530)]
bytestream: add a new set of bytestream functions with overread checking

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agompegts: Suppress invalid timebase warnings on DMB streams.
Alex Converse [Mon, 19 Dec 2011 18:48:57 +0000 (10:48 -0800)]
mpegts: Suppress invalid timebase warnings on DMB streams.

timestamp_len and timestamp_res intialize to zero.

12 years agompegts: Fix typo in handling sections in the PMT.
Alex Converse [Mon, 19 Dec 2011 18:41:22 +0000 (10:41 -0800)]
mpegts: Fix typo in handling sections in the PMT.

This was an error rebasing 4682a1dc3aa2554ad7077f5db32d0f2d598d018e for
commit. The "pes" variable guaranteed to be NULL in that block.

12 years agovc1dec: Use the right pointer type for the tmp pointer
Martin Storsjö [Tue, 20 Dec 2011 08:53:18 +0000 (10:53 +0200)]
vc1dec: Use the right pointer type for the tmp pointer

This fixes warnings about assignment from incompatible
pointer type.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoh264: clear trailing bits in partially parsed NAL units
Janne Grunau [Mon, 19 Dec 2011 17:11:44 +0000 (18:11 +0100)]
h264: clear trailing bits in partially parsed NAL units

Trailing bits are likely to be non-zero if the NAL unit is truncated.
Clearing the bits make overreads of the bitstream less likely in this
case. Fixes playback of
http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4 which
has a forbidden byte sequence of 0x00 0x00 0x00 in it SPS.

12 years agovc1: Handle WVC1 interlaced stream
Aneesh Dogra [Mon, 19 Dec 2011 20:08:19 +0000 (01:38 +0530)]
vc1: Handle WVC1 interlaced stream

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoxl: Fix overreads
Aneesh Dogra [Mon, 19 Dec 2011 18:30:30 +0000 (00:00 +0530)]
xl: Fix overreads

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agompegts: rename payload_index to payload_size
Luca Barbato [Sat, 17 Dec 2011 13:08:11 +0000 (14:08 +0100)]
mpegts: rename payload_index to payload_size

It holds the size of the current payload.

12 years agosegment: introduce segmented chain muxer
Luca Barbato [Sun, 2 Oct 2011 21:05:29 +0000 (23:05 +0200)]
segment: introduce segmented chain muxer

It behaves similarly to image2 muxer

12 years agolavu: add AVERROR_BUG error value
Luca Barbato [Wed, 14 Dec 2011 19:27:11 +0000 (20:27 +0100)]
lavu: add AVERROR_BUG error value

It should be used to mark codepath that can be reached only through
programming error.

12 years agoavplay: clear pkt_temp when pkt is freed.
Michael Niedermayer [Tue, 13 Dec 2011 23:38:23 +0000 (00:38 +0100)]
avplay: clear pkt_temp when pkt is freed.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agoqcelpdec: K&R formatting cosmetics
Asen Lekov [Sun, 18 Dec 2011 23:32:54 +0000 (01:32 +0200)]
qcelpdec: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agoqcelpdec: cosmetics: drop some pointless parentheses
Diego Biurrun [Mon, 19 Dec 2011 13:54:58 +0000 (14:54 +0100)]
qcelpdec: cosmetics: drop some pointless parentheses

12 years agox86: conditionally compile dnxhd encoder optimizations
Diego Biurrun [Sun, 18 Dec 2011 12:13:02 +0000 (13:13 +0100)]
x86: conditionally compile dnxhd encoder optimizations

12 years agoRevert "h264: skip start code search if the size of the nal unit is known"
Janne Grunau [Mon, 19 Dec 2011 02:00:36 +0000 (03:00 +0100)]
Revert "h264: skip start code search if the size of the nal unit is known"

This reverts commit 87eebb3454ff0cd6af6ebf9e1d31bdfd1c3b601b.

12 years agoswscale: fix formatting and indentation of unscaled conversion routines.
Nathan Adil Maxson [Sun, 18 Dec 2011 16:11:27 +0000 (08:11 -0800)]
swscale: fix formatting and indentation of unscaled conversion routines.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agoh264: skip start code search if the size of the nal unit is known
Janne Grunau [Sun, 18 Dec 2011 21:42:36 +0000 (22:42 +0100)]
h264: skip start code search if the size of the nal unit is known

Start code emulation prevention is only required in Annex B bytestream
packed NAL units. For other coding formats the size is already known.
Looking for a start code prefix can result in false positives like in
http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4
which has a false positive in the SPS.

12 years agocljr: fix buf_size sanity check
Paul B. Mahol [Sat, 17 Dec 2011 17:58:06 +0000 (17:58 +0000)]
cljr: fix buf_size sanity check

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
12 years agocljr: Check if width and height are positive integers
Shitiz Garg [Thu, 15 Dec 2011 22:20:21 +0000 (22:20 +0000)]
cljr: Check if width and height are positive integers

Width and height might get passed as 0 and would cause floating point
exceptions in decode_frame.
Fixes bugzilla #149

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
12 years agoAPIchanges: fill in revision for AVFrame.age deprecation
Mans Rullgard [Sun, 18 Dec 2011 22:15:04 +0000 (22:15 +0000)]
APIchanges: fill in revision for AVFrame.age deprecation

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoavcodec: deprecate AVFrame.age
Mans Rullgard [Sun, 18 Dec 2011 20:41:42 +0000 (20:41 +0000)]
avcodec: deprecate AVFrame.age

This was intended as an optimisation for skipped blocks in MPEG2
P-frames and never used elsewhere.  Removing this "optimisation"
speeds up MPEG2 decoding by 1-2% (ARM Cortex-A9).

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago4xm: remove unneeded check for remaining unused data.
Justin Ruggles [Sun, 18 Dec 2011 18:21:27 +0000 (13:21 -0500)]
4xm: remove unneeded check for remaining unused data.

This is unnecessary complication that only prints a message and does not
affect decoding.

12 years agolavf: force threads to 1 in avformat_find_stream_info()
Anton Khirnov [Tue, 6 Dec 2011 06:51:54 +0000 (07:51 +0100)]
lavf: force threads to 1 in avformat_find_stream_info()

Fixes avformat_find_stream_info() on streams with number of frames <
thread count.

12 years agoswscale: fix overflows in vertical scaling at top/bottom edges.
Ronald S. Bultje [Sun, 18 Dec 2011 16:27:43 +0000 (08:27 -0800)]
swscale: fix overflows in vertical scaling at top/bottom edges.

This fixes integer multiplication overflows in RGB48 output
(vertical) scaling as detected by IOC. What happens is that for
certain types of filters (lanczos, spline, bicubic), the
intermediate sum of coefficients in the middle of a filter can
be larger than the fixed-point equivalent of 1.0, even if the
final sum is 1.0. This is fine and we support that.

However, at frame edges, initFilter() will merge the coefficients
for the off-screen pixels into the top or bottom pixel, such as
to emulate edge extension. This means that suddenly, a single
coefficient can be larger than the fixed-point equivalent of
1.0, which the vertical scaling routines do not support.

Therefore, remove the merging of coefficients for edges for
the vertical scaling filter, and instead add edge detection
to the scaler itself so that it copies the pointers (not data)
for the edges (i.e. it uses line[0] for line[-1] as well), so
that a single coefficient is never larger than the fixed-point
equivalent of 1.0.

12 years agolavf: add OpenMG audio muxer.
Michael Karcher [Fri, 21 Oct 2011 21:32:33 +0000 (23:32 +0200)]
lavf: add OpenMG audio muxer.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years agoomadec: split data that will be used in the muxer to a separate file.
Anton Khirnov [Sat, 17 Dec 2011 14:23:13 +0000 (15:23 +0100)]
omadec: split data that will be used in the muxer to a separate file.

12 years agolavf: rename oma.c -> omadec.c
Anton Khirnov [Sat, 17 Dec 2011 14:00:04 +0000 (15:00 +0100)]
lavf: rename oma.c -> omadec.c

12 years agotmv decoder: set correct pix_fmt
Uoti Urpala [Sun, 18 Dec 2011 14:17:07 +0000 (16:17 +0200)]
tmv decoder: set correct pix_fmt

Previously the decoder only worked if the user had set avctx->pix_fmt
manually. For some reason the libavformat tmv demuxer sets this, so
the problem was not visible in avplay etc.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agobuild: link test programs with static libraries
Mans Rullgard [Sat, 17 Dec 2011 15:05:24 +0000 (15:05 +0000)]
build: link test programs with static libraries

Many of the test programs directly access internal symbols not
exported from the shared libraries.  This allows tests to run
when configured with shared libraries.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agodct-test: remove unused variable cropTbl
Mans Rullgard [Sat, 17 Dec 2011 21:35:50 +0000 (21:35 +0000)]
dct-test: remove unused variable cropTbl

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoswscale: fix overflow in gray16 vertical scaling.
Ronald S. Bultje [Sat, 17 Dec 2011 19:56:40 +0000 (19:56 +0000)]
swscale: fix overflow in gray16 vertical scaling.

This fixes the same overflow as in the RGB48/16-bit YUV scaling;
some filters can overflow both negatively and positively (e.g.
spline/lanczos), so we bias a signed integer so it's "half signed"
and "half unsigned", and can cover overflows in both directions
while maintaining full 31-bit depth.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoget_bits: remove LAST_SKIP_CACHE macro
Mans Rullgard [Sat, 17 Dec 2011 19:40:16 +0000 (19:40 +0000)]
get_bits: remove LAST_SKIP_CACHE macro

This macro is empty since the removal of the A32 bitstream reader.

Signed-off-by: Mans Rullgard <mans@mansr.com>