platform/upstream/libav.git
12 years agoriffenc: use av_get_audio_frame_duration()
Justin Ruggles [Mon, 27 Feb 2012 07:34:14 +0000 (02:34 -0500)]
riffenc: use av_get_audio_frame_duration()

For encoding, frame_size is not a reliable indicator of packet duration.
Also, we don't want to have to force the demuxer to find frame_size for
stream copy to work.

12 years agoavcodec: add av_get_audio_frame_duration() function.
Justin Ruggles [Fri, 27 Jan 2012 01:08:23 +0000 (20:08 -0500)]
avcodec: add av_get_audio_frame_duration() function.

This is a utility function for the user to get the frame duration based on
the codec id, frame size in bytes, and various AVCodecContext parameters.

12 years agoavcodec: add av_get_exact_bits_per_sample() function
Justin Ruggles [Thu, 19 Jan 2012 23:36:40 +0000 (18:36 -0500)]
avcodec: add av_get_exact_bits_per_sample() function

This only returns bits per sample when it is exactly correct. That is, the
codec contains only raw samples with no frame headers or padding. This applies
to basically all PCM codecs and a small subset of ADPCM codecs.

12 years agolavf: deobfuscate read_frame_internal().
Anton Khirnov [Sun, 4 Mar 2012 14:49:26 +0000 (15:49 +0100)]
lavf: deobfuscate read_frame_internal().

Split off packet parsing into a separate function. Parse full packets at
once and store them in a queue, eliminating the need for tracking
parsing state in AVStream.

The horrible unreadable loop in read_frame_internal() now isn't weirdly
ordered and doesn't contain evil gotos, so it should be much easier to
understand.

compute_pkt_fields() now invents slightly different timestamps for two
raw vc1 tests, due to has_b_frames being set a bit later. They shouldn't
be more wrong (or right) than previous ones.

12 years agolavf: make read_from_packet_buffer() more flexible.
Anton Khirnov [Sat, 3 Mar 2012 15:28:32 +0000 (16:28 +0100)]
lavf: make read_from_packet_buffer() more flexible.

Make packet buffer a parameter, don't hardcode it to be
AVFormatContext.packet_buffer.

Also move the function higher in the file, since it will be called from
read_frame_internal().

12 years agolavf: factorize freeing a packet buffer.
Anton Khirnov [Sat, 3 Mar 2012 08:43:14 +0000 (09:43 +0100)]
lavf: factorize freeing a packet buffer.

12 years agoFix format string vulnerability detected by -Wformat-security.
Fabian Greffrath [Mon, 5 Mar 2012 15:06:01 +0000 (16:06 +0100)]
Fix format string vulnerability detected by -Wformat-security.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agodv: Do not redundantly initialize struct members to zero.
Diego Biurrun [Mon, 5 Mar 2012 12:57:14 +0000 (13:57 +0100)]
dv: Do not redundantly initialize struct members to zero.

12 years agox86: clean up ff_dsputil_init_mmx()
Mans Rullgard [Thu, 1 Mar 2012 12:48:00 +0000 (12:48 +0000)]
x86: clean up ff_dsputil_init_mmx()

This splits ff_dsputil_init_mmx() into multiple functions, one for
each MMX/SSE level, somewhat simplifying the nested conditions.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agocmdutils: use new avcodec_is_decoder/encoder() functions.
Anton Khirnov [Fri, 2 Mar 2012 16:05:01 +0000 (17:05 +0100)]
cmdutils: use new avcodec_is_decoder/encoder() functions.

Fixes listing encoders.

12 years agolavc: make codec_is_decoder/encoder() public.
Anton Khirnov [Fri, 2 Mar 2012 16:00:53 +0000 (17:00 +0100)]
lavc: make codec_is_decoder/encoder() public.

12 years agolavc: deprecate AVCodecContext.sub_id.
Anton Khirnov [Mon, 27 Feb 2012 17:52:13 +0000 (18:52 +0100)]
lavc: deprecate AVCodecContext.sub_id.

In most places where it's used, it's as a pointless write-only field.

Only rv10 decoder actually reads from it, but it stores some internal
version info in it. There is no reason for it to be in a public field.

12 years agolibcdio: add a forgotten AVClass to the private context.
Anton Khirnov [Sat, 3 Mar 2012 05:26:39 +0000 (06:26 +0100)]
libcdio: add a forgotten AVClass to the private context.

12 years agoswscale: remove "cpu flags" from -sws_flags description.
Ronald S. Bultje [Sun, 4 Mar 2012 05:38:03 +0000 (21:38 -0800)]
swscale: remove "cpu flags" from -sws_flags description.

12 years agoproresenc: give user a possibility to alter some encoding parameters
Kostya Shishkov [Sat, 3 Mar 2012 18:14:35 +0000 (19:14 +0100)]
proresenc: give user a possibility to alter some encoding parameters

This allows user to select quantisation matrix from different profile,
stamp frames with custom vendor string and change target bitrate.

12 years agovorbisenc: add output buffer overwrite protection
Justin Ruggles [Wed, 29 Feb 2012 07:56:01 +0000 (02:56 -0500)]
vorbisenc: add output buffer overwrite protection

12 years agolibopencore-amrnbenc: fix end-of-stream handling
Justin Ruggles [Sun, 4 Mar 2012 05:25:45 +0000 (00:25 -0500)]
libopencore-amrnbenc: fix end-of-stream handling

Use CODEC_CAP_DELAY and CODEC_CAP_SMALL_LAST_FRAME to properly pad and flush
the encoder at the end of encoding. This is needed in order to have all input
samples decoded.

12 years agora144enc: fix end-of-stream handling
Justin Ruggles [Tue, 28 Feb 2012 06:02:28 +0000 (01:02 -0500)]
ra144enc: fix end-of-stream handling

Use CODEC_CAP_DELAY and CODEC_CAP_SMALL_LAST_FRAME to properly pad and flush
the encoder at the end of encoding. This is needed in order to have all input
samples decoded.

12 years agonellymoserenc: zero any leftover packet bytes
Justin Ruggles [Tue, 28 Feb 2012 04:39:50 +0000 (23:39 -0500)]
nellymoserenc: zero any leftover packet bytes

fixes writing of uninitialized packet data

12 years agonellymoserenc: use proper MDCT overlap delay
Justin Ruggles [Tue, 28 Feb 2012 04:32:23 +0000 (23:32 -0500)]
nellymoserenc: use proper MDCT overlap delay

12 years agoqpeg: Use bytestream2 functions to prevent buffer overreads.
Aneesh Dogra [Sun, 4 Mar 2012 04:29:43 +0000 (09:59 +0530)]
qpeg: Use bytestream2 functions to prevent buffer overreads.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agoswscale: make %rep unconditional.
Ronald S. Bultje [Sat, 3 Mar 2012 22:15:32 +0000 (14:15 -0800)]
swscale: make %rep unconditional.

Fixes pre-processing with latest versions of nasm.

12 years agovp8: convert simple loopfilter x86 assembly to use named arguments.
Ronald S. Bultje [Sat, 3 Mar 2012 20:55:34 +0000 (12:55 -0800)]
vp8: convert simple loopfilter x86 assembly to use named arguments.

12 years agovp8: convert idct x86 assembly to use named arguments.
Ronald S. Bultje [Sat, 3 Mar 2012 16:04:40 +0000 (08:04 -0800)]
vp8: convert idct x86 assembly to use named arguments.

12 years agovp8: convert mc x86 assembly to use named arguments.
Ronald S. Bultje [Sat, 3 Mar 2012 14:46:29 +0000 (06:46 -0800)]
vp8: convert mc x86 assembly to use named arguments.

12 years agovp8: convert loopfilter x86 assembly to use cpuflags().
Ronald S. Bultje [Sat, 3 Mar 2012 04:38:02 +0000 (20:38 -0800)]
vp8: convert loopfilter x86 assembly to use cpuflags().

12 years agovp8: convert idct/mc x86 assembly to use cpuflags().
Ronald S. Bultje [Fri, 2 Mar 2012 05:35:22 +0000 (21:35 -0800)]
vp8: convert idct/mc x86 assembly to use cpuflags().

12 years agoswscale: remove now unnecessary hack.
Ronald S. Bultje [Fri, 2 Mar 2012 04:24:58 +0000 (20:24 -0800)]
swscale: remove now unnecessary hack.

12 years agox86inc: don't "bake" stack_offset in named arguments.
Loren Merritt [Sun, 26 Feb 2012 17:05:29 +0000 (09:05 -0800)]
x86inc: don't "bake" stack_offset in named arguments.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agofate: Add sunrast regression test
Derek Buitenhuis [Fri, 2 Mar 2012 00:48:26 +0000 (19:48 -0500)]
fate: Add sunrast regression test

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agowmaenc: fix m/s stereo encoding for the first frame
Justin Ruggles [Fri, 2 Mar 2012 22:11:25 +0000 (17:11 -0500)]
wmaenc: fix m/s stereo encoding for the first frame

We need to set ms_stereo in encode_init() in order to avoid incorrectly
encoding the first frame as non-m/s while flagging it as m/s. Fixes an
uncomfortable pop in the left channel at the start of playback.

CC:libav-stable@libav.org

12 years agowmaenc: return s->block_align instead of recalculating it
Justin Ruggles [Fri, 2 Mar 2012 21:55:45 +0000 (16:55 -0500)]
wmaenc: return s->block_align instead of recalculating it

12 years agowmaenc: check final frame size against output packet size
Justin Ruggles [Fri, 2 Mar 2012 21:42:21 +0000 (16:42 -0500)]
wmaenc: check final frame size against output packet size

Currently we have an assert() that prevents the frame from being too large,
but it is more user-friendly to give an error message instead of aborting on
assert(). This condition is quite unlikely due to the minimum bit rate check
in encode_init(), but it is still worth having.

12 years agowmaenc: require a large enough output buffer to prevent overwrites
Justin Ruggles [Fri, 2 Mar 2012 21:33:33 +0000 (16:33 -0500)]
wmaenc: require a large enough output buffer to prevent overwrites

The maximum theoretical frame size is around 17000 bytes. Although in
practice it will generally be much smaller, we require a larger buffer
just to be safe.

CC: libav-stable@libav.org
12 years agowmaenc: limit allowed sample rate to 48kHz
Justin Ruggles [Fri, 2 Mar 2012 21:27:57 +0000 (16:27 -0500)]
wmaenc: limit allowed sample rate to 48kHz

ff_wma_init() allows up to 50kHz, but this generates an exponent band
size table that requires 65 bands. The code assumes 25 bands in many
places, and using sample rates higher than 48kHz will lead to buffer
overwrites.

CC:libav-stable@libav.org

12 years agowmaenc: limit block_align to MAX_CODED_SUPERFRAME_SIZE
Justin Ruggles [Fri, 2 Mar 2012 21:10:00 +0000 (16:10 -0500)]
wmaenc: limit block_align to MAX_CODED_SUPERFRAME_SIZE

This is near the theoretical limit for wma frame size and is the most that
our decoder can handle. Allowing higher bit rates will just end up padding
each frame with empty bytes.

Fixes invalid writes for avconv when using very high bit rates.

CC:libav-stable@libav.org

12 years agotiertexseq: set correct block_align for audio
Justin Ruggles [Fri, 20 Jan 2012 04:03:08 +0000 (23:03 -0500)]
tiertexseq: set correct block_align for audio

12 years agotiertexseq: set audio stream start time to 0
Justin Ruggles [Fri, 20 Jan 2012 04:01:53 +0000 (23:01 -0500)]
tiertexseq: set audio stream start time to 0

Update FATE test to reflect delayed video due to the file having audio-only
frames prior to the first frame with video.

12 years agovoc/avs: Do not change the sample rate mid-stream.
Justin Ruggles [Thu, 12 Jan 2012 02:10:35 +0000 (21:10 -0500)]
voc/avs: Do not change the sample rate mid-stream.

Also, set the time base based on the sample rate.
lavf-voc seek test updated to reflect slightly different seek points.

12 years agosegafilm: use the sample rate as the time base for audio streams
Justin Ruggles [Wed, 11 Jan 2012 16:07:40 +0000 (11:07 -0500)]
segafilm: use the sample rate as the time base for audio streams

12 years agoea: fix audio pts
Justin Ruggles [Wed, 11 Jan 2012 15:22:47 +0000 (10:22 -0500)]
ea: fix audio pts

The time base is 1 / sample_rate, not 90000.
Several more codecs encode the sample count in the first 4 bytes of the
chunk, so we set the durations accordingly. Also, we can set start_time and
packet duration instead of keeping track of the sample count in the demuxer.

12 years agopsx-str: fix audio pts
Justin Ruggles [Wed, 11 Jan 2012 14:41:06 +0000 (09:41 -0500)]
psx-str: fix audio pts

Each packet has 18 sectors with 224/channels samples in each sector.

12 years agovqf: set packet duration
Justin Ruggles [Fri, 13 Jan 2012 19:04:11 +0000 (14:04 -0500)]
vqf: set packet duration

Fixes timestamp calculation.
The FATE reference is updated because timestamp calculations are now more
accurate. Previous timestamps were based on average bit rate.

12 years agotta demuxer: set packet duration
Justin Ruggles [Fri, 13 Jan 2012 18:35:06 +0000 (13:35 -0500)]
tta demuxer: set packet duration

12 years agompegaudio_parser: do not ignore information from the first parsed frame
Justin Ruggles [Mon, 16 Jan 2012 16:49:51 +0000 (11:49 -0500)]
mpegaudio_parser: do not ignore information from the first parsed frame

Update some demuxing and seeking fate tests.

12 years agompegaudio_parser: be less picky about the start position
Michael Niedermayer [Tue, 21 Jun 2011 00:49:20 +0000 (02:49 +0200)]
mpegaudio_parser: be less picky about the start position

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
12 years agothp: set audio packet durations
Justin Ruggles [Wed, 29 Feb 2012 23:08:46 +0000 (18:08 -0500)]
thp: set audio packet durations

12 years agoavcodec: add a Vorbis parser to get packet duration
Justin Ruggles [Sun, 15 Jan 2012 18:38:03 +0000 (13:38 -0500)]
avcodec: add a Vorbis parser to get packet duration

This also allows for removing some of the Vorbis-related hacks.

12 years agovorbisdec: read the previous window flag for long windows
Justin Ruggles [Fri, 24 Feb 2012 23:04:05 +0000 (18:04 -0500)]
vorbisdec: read the previous window flag for long windows

When reading sequentially, we are using the actual flag from the previous
frame, but when seeking we do not know what the previous window flag was, so
we need to read it from the bitstream.

12 years agolavc: free the output packet when encoding failed or produced no output.
Anton Khirnov [Fri, 24 Feb 2012 12:14:02 +0000 (13:14 +0100)]
lavc: free the output packet when encoding failed or produced no output.

12 years agolavc: preserve avpkt->destruct in ff_alloc_packet().
Anton Khirnov [Fri, 24 Feb 2012 21:39:19 +0000 (22:39 +0100)]
lavc: preserve avpkt->destruct in ff_alloc_packet().

Also, don't bother with saving/restoring data, av_init_packet doesn't
touch it.

12 years agolavc: clarify the meaning of AVCodecContext.frame_number.
Anton Khirnov [Thu, 1 Mar 2012 11:25:50 +0000 (12:25 +0100)]
lavc: clarify the meaning of AVCodecContext.frame_number.

12 years agompegts: Pad the packet buffer in handle_packet().
Alex Converse [Fri, 2 Mar 2012 18:13:07 +0000 (10:13 -0800)]
mpegts: Pad the packet buffer in handle_packet().

This allows it to be used with get_bits without the thread of overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agompegts: Do not call read_sl_header() when no bytes remain in the buffer.
Alex Converse [Fri, 2 Mar 2012 18:12:11 +0000 (10:12 -0800)]
mpegts: Do not call read_sl_header() when no bytes remain in the buffer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agoamrwb: remove duplicate arguments from extrapolate_isf().
Ronald S. Bultje [Thu, 1 Mar 2012 23:44:25 +0000 (15:44 -0800)]
amrwb: remove duplicate arguments from extrapolate_isf().

Prevents warnings because the dst and src overlap (are the same) in the
memcpy() inside the function.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agoamrwb: error out early if mode is invalid.
Ronald S. Bultje [Thu, 1 Mar 2012 21:51:21 +0000 (13:51 -0800)]
amrwb: error out early if mode is invalid.

Prevents using the invalid mode as an index in a static array, which
would generate invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agoh264: change underread for 10bit QPEL to overread.
Ronald S. Bultje [Sun, 26 Feb 2012 01:24:56 +0000 (17:24 -0800)]
h264: change underread for 10bit QPEL to overread.

This prevents us from reading before the start of the buffer, and thus
prevents crashes resulting from this behaviour. Fixes bug 237.

12 years agomatroska: check buffer size for RM-style byte reordering.
Ronald S. Bultje [Fri, 2 Mar 2012 01:01:22 +0000 (17:01 -0800)]
matroska: check buffer size for RM-style byte reordering.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agovp8: disable mmx functions with sse/sse2 counterparts on x86-64.
Ronald S. Bultje [Fri, 2 Mar 2012 04:39:49 +0000 (20:39 -0800)]
vp8: disable mmx functions with sse/sse2 counterparts on x86-64.

x86-64 is guaranteed to have at least SSE2, therefore the MMX/MMX2
functions will never be used in practice.

12 years agovp8: change int stride to ptrdiff_t stride.
Ronald S. Bultje [Fri, 2 Mar 2012 05:17:03 +0000 (21:17 -0800)]
vp8: change int stride to ptrdiff_t stride.

On 64bit platforms with 32bit int, this means we won't have to sign-
extend the integer anymore.

12 years agowma: fix invalid buffer size assumptions causing random overreads.
Ronald S. Bultje [Fri, 2 Mar 2012 00:19:51 +0000 (16:19 -0800)]
wma: fix invalid buffer size assumptions causing random overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agoWindows Media Audio Lossless decoder
Mashiat Sarker Shakkhar [Thu, 1 Mar 2012 12:43:00 +0000 (12:43 +0000)]
Windows Media Audio Lossless decoder

Decodes 16-bit WMA Lossless encoded files. 24-bit is not supported yet.

Bitstream parser written by Andreas Öman with contributions from
Baptiste Coudurier and Ulion.

Includes a number of bug-fixes from Benjamin Larsson, Michael Niedermayer and
Konstantin Shishkov, shine and polish by Diego Biurrun.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years agorv10/20: Fix slice overflow with checked bitstream reader.
Alex Converse [Thu, 1 Mar 2012 21:24:55 +0000 (13:24 -0800)]
rv10/20: Fix slice overflow with checked bitstream reader.

12 years agoh263dec: Disallow width/height changing with frame threads.
Michael Niedermayer [Fri, 17 Feb 2012 21:35:10 +0000 (13:35 -0800)]
h263dec: Disallow width/height changing with frame threads.

Fixes CVE-2011-3937

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years agorv10/20: Fix a buffer overread caused by losing track of the remaining buffer size.
Alex Converse [Thu, 1 Mar 2012 22:07:22 +0000 (14:07 -0800)]
rv10/20: Fix a buffer overread caused by losing track of the remaining buffer size.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agormdec: Honor .RMF tag size rather than assuming 18.
Alex Converse [Fri, 2 Mar 2012 00:47:54 +0000 (16:47 -0800)]
rmdec: Honor .RMF tag size rather than assuming 18.

12 years agog722: Fix the QMF scaling
Martin Storsjö [Fri, 2 Mar 2012 15:03:06 +0000 (17:03 +0200)]
g722: Fix the QMF scaling

This fixes clipping if the encoder input used the full 16 bit
input range (samples with a magnitude below 16383 worked fine).
The filtered subband samples should be 15 bit maximum, while
the code earlier produced them scaled to 16 bit.

This makes the decoder output have double the magnitude
compared to before.

The spec reference samples doesn't test the QMF at all, which
was why this part slipped past initially.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agor3d: don't set codec timebase.
Anton Khirnov [Fri, 2 Mar 2012 13:08:11 +0000 (14:08 +0100)]
r3d: don't set codec timebase.

It's not supposed to be set by demuxers.

Set avg_frame_rate and r_frame_rate instead.

12 years agoelectronicarts: set timebase for tgv video.
Anton Khirnov [Thu, 1 Mar 2012 20:24:16 +0000 (21:24 +0100)]
electronicarts: set timebase for tgv video.

The container has no timestamps and the framerate isn't stored in the
data either.
The decoder sets codec timebase to experimentally found value 1/15. Do
the same for the demuxer too, it should at least be better than the
default 1/90000.

12 years agoelectronicarts: parse the framerate for cmv video.
Anton Khirnov [Thu, 1 Mar 2012 12:16:49 +0000 (13:16 +0100)]
electronicarts: parse the framerate for cmv video.

12 years agoogg: don't set codec timebase
Anton Khirnov [Thu, 24 Nov 2011 19:58:22 +0000 (20:58 +0100)]
ogg: don't set codec timebase

Demuxers are not supposed to set it.

12 years agoelectronicarts: don't set codec timebase
Anton Khirnov [Thu, 24 Nov 2011 19:58:22 +0000 (20:58 +0100)]
electronicarts: don't set codec timebase

Demuxers are not supposed to set it.
Set stream timebase and framerates instead (this is a cfr container with
no timestamps).

12 years agoavs: don't set codec timebase
Anton Khirnov [Thu, 24 Nov 2011 19:58:22 +0000 (20:58 +0100)]
avs: don't set codec timebase

Demuxers are not supposed to set it.
Set r_frame_rate and avg_frame_rate instead.

12 years agowavpack: Fix an integer overflow
Derek Buitenhuis [Thu, 1 Mar 2012 21:34:57 +0000 (16:34 -0500)]
wavpack: Fix an integer overflow

Integer Overflow Checker detected an integer
overflow while FATE was running.

See: http://fate.libav.org/x86_64-linux-ioc/

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
12 years agoswscale: K&R formatting cosmetics for PowerPC code (part II/II)
Diego Biurrun [Tue, 21 Feb 2012 18:59:38 +0000 (19:59 +0100)]
swscale: K&R formatting cosmetics for PowerPC code (part II/II)

12 years agomp3dec: Fix reading file size and frames in VBRI headers
Ingo Brückl [Fri, 16 Sep 2011 22:00:19 +0000 (15:00 -0700)]
mp3dec: Fix reading file size and frames in VBRI headers

The fields "Number of Bytes" and "Number of Frames" are mixed up. "Bytes"
come first, "Frames" behind.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Alex Converse <alex.converse@gmail.com>
12 years agomjpegdec: use correct variable in av_log invocation
Diego Biurrun [Wed, 29 Feb 2012 18:47:49 +0000 (19:47 +0100)]
mjpegdec: use correct variable in av_log invocation

libavcodec/mjpegdec.c:1463: warning: format ‘%x’ expects type ‘unsigned int’, but argument 5 has type ‘const uint8_t *’

12 years agormdec: adjust printf format string specifier to fix warning
Diego Biurrun [Sun, 26 Feb 2012 22:42:37 +0000 (23:42 +0100)]
rmdec: adjust printf format string specifier to fix warning

libavformat/rmdec.c:383: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘int64_t’

12 years agoReplace AVFrame pointer type punning by proper struct member assignments.
Diego Biurrun [Mon, 27 Feb 2012 21:08:41 +0000 (22:08 +0100)]
Replace AVFrame pointer type punning by proper struct member assignments.

12 years agoReplace AVFrame pointer casts by proper struct member accesses.
Diego Biurrun [Mon, 27 Feb 2012 21:02:45 +0000 (22:02 +0100)]
Replace AVFrame pointer casts by proper struct member accesses.

12 years agoRemove unnecessary AVFrame pointer casts.
Diego Biurrun [Mon, 27 Feb 2012 07:51:20 +0000 (08:51 +0100)]
Remove unnecessary AVFrame pointer casts.

12 years agomsmpeg4: Split encoding backend code off from general backend code.
Diego Biurrun [Sat, 18 Feb 2012 13:28:43 +0000 (14:28 +0100)]
msmpeg4: Split encoding backend code off from general backend code.

12 years agolavc: shrink encoded video packet size after encoding.
Anton Khirnov [Thu, 1 Mar 2012 11:15:45 +0000 (12:15 +0100)]
lavc: shrink encoded video packet size after encoding.

Based on a patch by Nicolas George <nicolas.george <at> normalesup.org>

12 years agoh264: error out on invalid bitdepth.
Ronald S. Bultje [Thu, 1 Mar 2012 19:56:05 +0000 (11:56 -0800)]
h264: error out on invalid bitdepth.

Fixes invalid reads while initializing the dequant tables, which uses
the bit depth to determine the QP table size.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agoaacsbr: use a swap index for the Y matrix rather than copy buffers.
Christophe Gisquet [Thu, 23 Feb 2012 22:25:44 +0000 (22:25 +0000)]
aacsbr: use a swap index for the Y matrix rather than copy buffers.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
12 years agohuffyuv: do not abort on unknown pix_fmt; instead, return an error.
Ronald S. Bultje [Thu, 1 Mar 2012 17:41:22 +0000 (09:41 -0800)]
huffyuv: do not abort on unknown pix_fmt; instead, return an error.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agolcl: return negative error codes on decode_init() errors.
Ronald S. Bultje [Thu, 1 Mar 2012 01:50:28 +0000 (17:50 -0800)]
lcl: return negative error codes on decode_init() errors.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agortpenc: Use MB info side data for splitting H263 packets for RFC 2190
Martin Storsjö [Fri, 10 Feb 2012 08:31:19 +0000 (10:31 +0200)]
rtpenc: Use MB info side data for splitting H263 packets for RFC 2190

This makes the packetization spec compliant for cases where one single
GOB doesn't fit into an RTP packet.

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoh263enc: Add an option for outputting info about MBs as side data
Martin Storsjö [Mon, 27 Feb 2012 21:23:45 +0000 (23:23 +0200)]
h263enc: Add an option for outputting info about MBs as side data

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agoavpacket: Add a function for shrinking already allocated side data
Martin Storsjö [Mon, 27 Feb 2012 23:08:31 +0000 (01:08 +0200)]
avpacket: Add a function for shrinking already allocated side data

Signed-off-by: Martin Storsjö <martin@martin.st>
12 years agonellymoserdec: Saner and faster IMDCT windowing
Vitor Sessak [Wed, 29 Feb 2012 18:39:16 +0000 (19:39 +0100)]
nellymoserdec: Saner and faster IMDCT windowing

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agoamrnbdec: check frame size before decoding.
Vitor Sessak [Wed, 29 Feb 2012 21:09:10 +0000 (22:09 +0100)]
amrnbdec: check frame size before decoding.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years agocscd: use negative error values to indicate decode_init() failures.
Ronald S. Bultje [Wed, 29 Feb 2012 21:55:09 +0000 (13:55 -0800)]
cscd: use negative error values to indicate decode_init() failures.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agoh264: prevent overreads in intra PCM decoding.
Ronald S. Bultje [Wed, 29 Feb 2012 02:48:27 +0000 (18:48 -0800)]
h264: prevent overreads in intra PCM decoding.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
12 years agoFATE: do not decode audio in the nuv test.
Justin Ruggles [Fri, 20 Jan 2012 04:47:48 +0000 (23:47 -0500)]
FATE: do not decode audio in the nuv test.

We already have sufficient coverage for 16-bit pcm.

12 years agodxa: set audio stream time base using the sample rate
Justin Ruggles [Thu, 19 Jan 2012 20:55:18 +0000 (15:55 -0500)]
dxa: set audio stream time base using the sample rate

12 years agopsx-str: do not allow seeking by bytes
Justin Ruggles [Tue, 17 Jan 2012 15:16:34 +0000 (10:16 -0500)]
psx-str: do not allow seeking by bytes

12 years agoasfdec: Do not set AVCodecContext.frame_size
Justin Ruggles [Fri, 13 Jan 2012 23:20:18 +0000 (18:20 -0500)]
asfdec: Do not set AVCodecContext.frame_size

12 years agovqf: set packet parameters after av_new_packet()
Justin Ruggles [Thu, 19 Jan 2012 20:48:11 +0000 (15:48 -0500)]
vqf: set packet parameters after av_new_packet()

Otherwise the values are overwritten.

12 years agompegaudiodec: use DSPUtil.butterflies_float().
Vitor Sessak [Wed, 29 Feb 2012 20:06:13 +0000 (21:06 +0100)]
mpegaudiodec: use DSPUtil.butterflies_float().

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>