Commit Graph

28339 Commits

Author SHA1 Message Date
Justin Ruggles
688b09fa59 If AVCodecContext.channels is 0 and AVCodecContext.channel_layout is
non-zero, set channels based on channel_layout.

This allows the user to set only channel_layout and not channels.
2011-04-27 12:57:43 -04:00
Justin Ruggles
168f9e8c40 If AVCodecContext.channel_layout and AVCodecContext.channels are both
non-zero, check to make sure they do not contradict eachother.
2011-04-27 12:57:43 -04:00
Justin Ruggles
3dfc3e70c0 cosmetics: indentation 2011-04-27 12:57:43 -04:00
Justin Ruggles
8b00ab0113 Check AVCodec.supported_samplerates and AVCodec.channel_layouts in
avcodec_open().

If the encoder has a channel_layouts list and AVCodecContext.channel_layout
is 0, then only print a warning and let the encoder decide how to handle it.
2011-04-27 12:57:42 -04:00
Alex Converse
767848d761 aacdec: remove sf_scale and sf_offset.
Instead, scalefactors are adjusted by the offset amount, removing the need
for sf_scale, and the MDCT scales are adjusted to compensate for the higher
scalefactors. Floating-point output will be handled by modifying the MDCT
scales.
2011-04-27 12:39:37 -04:00
Justin Ruggles
6271794041 aacdec: use a scale of 2 in the LTP MDCT rather than doubling the coefficient
table values from the spec.
2011-04-27 12:39:37 -04:00
Alex Converse
d70fa4c423 Define POW_SF2_ZERO in aac.h and use for ff_aac_pow2sf_tabp[] offsets instead
of hardcoding 200 everywhere.
2011-04-27 12:39:37 -04:00
Alex Converse
e4744b59aa Large intensity stereo and PNS indices are legal. Clip them instead of
erroring out. A magnitude of 100 corresponds to 2^25 so the will most
likely result in clipped output anyway.

None of the conformance streams fall in the range that need to be clipped.
2011-04-27 12:39:37 -04:00
Stefano Sabatini
f4e043ff63 qpeg: use reget_buffer() in decode_frame()
Decoder relies on previous frame data, so use reget_buffer().

This also set frame->reference to 3, as the frame will be requested
unmodified later so it shouldn't be modified by the application.

Fix playback of file Clock.avi.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-27 07:44:40 -07:00
Stefano Sabatini
4f0b80599a ultimotion: use reget_buffer() in ulti_decode_frame()
Decoder relies on previous frame data, so use reget_buffer().

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-27 07:42:42 -07:00
Stefano Sabatini
4f2954e232 smacker: remove unnecessary call to avctx->release_buffer in decode_frame()
The release_buffer was cleaning the provided frame, thus causing the
successive call to avctx->reget_buffer() to allocate a new frame.  In
case the returned frame was not the same one previously returned but a
new one with different data, it resulted in artifacts.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-27 07:41:59 -07:00
Ronald S. Bultje
5eef4afb9a avparser: don't av_malloc(0).
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-26 22:07:17 -07:00
Justin Ruggles
79ee8977c2 ac3enc: correct the flipped sign in the ac3_fixed encoder 2011-04-26 17:19:37 -04:00
Diego Biurrun
e6ff064845 Eliminate pointless '#if 1' statements without matching '#else'. 2011-04-26 20:18:27 +02:00
Vitor Sessak
9d35fa520e Add AVX FFT implementation.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-04-26 18:25:24 +02:00
Vitor Sessak
13dfce3d44 Increase alignment of av_malloc() as needed by AVX ASM.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-04-26 18:18:22 +02:00
Vitor Sessak
33cbfa6fa3 Update x86inc.asm from x264 to allow AVX emulation using SSE and MMX.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-04-26 18:18:22 +02:00
Michael Niedermayer
76cd98b445 mjpeg: Detect overreads in mjpeg_decode_scan() and error out.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rbultje@google.com>
2011-04-26 09:29:08 +02:00
Stefano Sabatini
4bc282322b documentation: extend documentation for ffmpeg -aspect option
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 09:08:27 +02:00
Anton Khirnov
893722ceeb APIChanges: update commit hashes for recent additions. 2011-04-26 08:51:54 +02:00
Stefano Sabatini
bebe72f4a0 lavc: deprecate FF_*_TYPE macros in favor of AV_PICTURE_TYPE_* enums
Also deprecate av_get_pict_type_char() in favor of
av_get_picture_type_char().

The new enum and av_get_picture_type_char() are defined in libavutil.
This allows the use in libavfilter without the need to link against
libavcodec.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 08:38:57 +02:00
Michael Niedermayer
30fe971934 aac: add headers needed for log2f()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 08:33:21 +02:00
Anton Khirnov
6deae83e55 lavc: remove FF_API_MB_Q cruft 2011-04-26 08:16:06 +02:00
Anton Khirnov
694c142434 lavc: remove FF_API_RATE_EMU cruft 2011-04-26 08:16:05 +02:00
Anton Khirnov
e7021c0ed5 lavc: remove FF_API_HURRY_UP cruft 2011-04-26 08:16:05 +02:00
Stefano Sabatini
73a4f7c21b pad: make the filter parametric
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:43:34 +02:00
royger
0bbb28c75b vsrc_movie: add key_frame and pict_type.
Signed-off-by: Roger Pau Monné <roger.pau@entel.upc.edu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:43:16 +02:00
Stefano Sabatini
5eb901cfec vsrc_movie: fix leak in request_frame()
Also set movie->picref to NULL, in order to avoid a crash in uninit()
when movie->picref is unreffed again and it was already freed.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:42:56 +02:00
Roger Pau Monné
10d39405fa lavfi: add key_frame and pict_type to AVFilterBufferRefVideo.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:42:13 +02:00
Michael Niedermayer
7a11c82fb7 vsrc_buffer: add sample_aspect_ratio fields to arguments.
This fixes aspect handling in ffmpeg.

This is based on a patch by Baptiste.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:38:24 +02:00
Mark Himsley
2f84bb4236 lavfi: add fieldorder filter
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:37:41 +02:00
Stefano Sabatini
68e23c083a scale: make the filter parametric
Make the filter accept parametric expressions for the output video
size.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:29:29 +02:00
James Darnley
b137bf7df3 yadif: support 16-bit
Fixes by Michael Niedermayer <michaelni@gmx.at>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:21:40 +02:00
James Darnley
88312a4de3 yadif: support more than yuv420p.
and correctly support grey8

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:15:54 +02:00
Michael Niedermayer
d85e18e6e3 yadif: Fix assert() failure
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:15:10 +02:00
Stefano Sabatini
f80b381bfd graphparser: add a NULL check on the argument passed to strstr
Fix crash in create_filter() which occurrs if a scale filter with no
args is provided.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-25 22:45:44 +02:00
Stefano Sabatini
c61bfc113a setdar: prefer "sar" over "par" in log info message
This is more consistent with the terminology adopted by the aspect
filter names.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-25 22:45:44 +02:00
Mark Himsley
b04d1abb40 fade: fix draw_slice() check on fade->factor value
draw_slice() checks that the fade factor is < 65536 and only
calculates the fade if so. But the fade factor is clipped in
end_frame() by av_clip_uint16() to 65535, so the fade is calculated
for every frame.  This patch alters the check so that it compares with
< 65535 (UINT16_MAX).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-25 22:45:44 +02:00
Mark Himsley
9026b27e84 fade: make draw_slice() chroma check against planes 1 and 2
draw_slice() checks that planes 0 and 1 of AVFilterBufferRef's data
are not NULL before manipulating planes 1 and 2. This patch makes the
check against planes 1 and 2. More senseful and possibly more robust.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-25 22:45:44 +02:00
Luca Barbato
ba9327ea65 win32: include the correct header in cmdutils.c
CommandLineToArgvW requires windows.h, include it directly
2011-04-25 21:57:30 +02:00
Janne Grunau
6ad2bafcfd ac3: fix memleak in fixed-point encoder
caused by typo in mdct_end
2011-04-25 20:27:05 +02:00
Diego Biurrun
a14c08247d flashsv: Return more meaningful error values. 2011-04-25 16:01:58 +02:00
Diego Biurrun
46cb2da1f0 flashsv: Employ explicit AVCodec struct initializers. 2011-04-25 15:41:10 +02:00
Kostya Shishkov
23f40a0788 read AVI palette from the end of extradata
Official AVI specification says that stream header in case of video contains
BITMAPINFO, which is equal to BITMAPINFOHEADER and optional palette. Currently
lavf AVI demuxer thinks otherwise which produces garbage on codecs that have
both palette and extradata (luckily, there are not so many such codecs).

An example of such file is:
http://samples.multimedia.cx/V-codecs/KMVC/baseball1.avi
(IIRC, MSS1 or MSS2 also had such situation but they are still not supported
by lavc).

As a side note, passing palette in extradata as it's been done previously is
not quite correct since proper _extra_ data is surplus bytes in
BITMAPINFOHEADER, not including palette.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-24 23:26:45 -07:00
Diego Biurrun
293fe6da01 cosmetics: K&R coding style and more whitespace for Flash Screen Video 2011-04-25 01:50:07 +02:00
Diego Biurrun
2441003d3f vorbisdec: Employ proper printf format specifiers for uint_fast32_t.
libavcodec/vorbisdec.c:543: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘uint_fast32_t’
libavcodec/vorbisdec.c:543: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘uint_fast32_t’
2011-04-25 01:39:55 +02:00
Martin Storsjö
5f85d49b68 applehttp: Don't export variant_bitrate if it isn't known
If there are no variants, the total bitrate of the single
stream isn't known, and exporting variant_bitrate = 0 does
look weird, since there really aren't any variants.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-24 21:30:03 +03:00
Martin Storsjö
ac9cf2e5c4 crypto: Use av_freep instead of av_free
Using av_freep is generally good practice.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-24 21:30:03 +03:00
Reinhard Tartler
50f7c29646 configure: Add missing libm library dependencies to .pc files.
This unbreaks static compilation using pkg-config on systems in need of -lm.
Based on an mplayer2 patch by Uoti Urpala <uau@mplayer2.org>

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-04-24 17:24:24 +02:00
Clément Bœsch
dc713546d4 oggdec: reindent after 8f3eebd6
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-04-24 16:45:45 +02:00