Commit Graph

32708 Commits

Author SHA1 Message Date
Anton Khirnov
87392b1fd5 libcdio: add a forgotten AVClass to the private context. 2012-03-04 21:01:41 +01:00
Ronald S. Bultje
1c97b5c4a3 swscale: remove "cpu flags" from -sws_flags description. 2012-03-04 06:52:06 -08:00
Kostya Shishkov
4db4b53dc8 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.
2012-03-04 07:35:00 +01:00
Justin Ruggles
1ba08c94f5 vorbisenc: add output buffer overwrite protection 2012-03-04 01:16:54 -05:00
Justin Ruggles
fe78470a8b 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.
2012-03-04 01:14:53 -05:00
Justin Ruggles
b0350c1c30 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.
2012-03-04 01:14:53 -05:00
Justin Ruggles
29e2c85310 nellymoserenc: zero any leftover packet bytes
fixes writing of uninitialized packet data
2012-03-04 01:14:52 -05:00
Justin Ruggles
6c7a01621c nellymoserenc: use proper MDCT overlap delay 2012-03-04 01:14:52 -05:00
Aneesh Dogra
3e9cd8b4b0 qpeg: Use bytestream2 functions to prevent buffer overreads.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-03 20:40:00 -08:00
Ronald S. Bultje
dccb2cd3f9 swscale: make %rep unconditional.
Fixes pre-processing with latest versions of nasm.
2012-03-03 20:40:00 -08:00
Ronald S. Bultje
b4188f0d46 vp8: convert simple loopfilter x86 assembly to use named arguments. 2012-03-03 20:40:00 -08:00
Ronald S. Bultje
8476ca3b4e vp8: convert idct x86 assembly to use named arguments. 2012-03-03 20:40:00 -08:00
Ronald S. Bultje
21ffc78fd7 vp8: convert mc x86 assembly to use named arguments. 2012-03-03 20:40:00 -08:00
Ronald S. Bultje
28170f1a39 vp8: convert loopfilter x86 assembly to use cpuflags(). 2012-03-03 20:40:00 -08:00
Ronald S. Bultje
e25be47154 vp8: convert idct/mc x86 assembly to use cpuflags(). 2012-03-03 20:39:59 -08:00
Ronald S. Bultje
8249a23fc1 swscale: remove now unnecessary hack. 2012-03-03 20:39:59 -08:00
Loren Merritt
0f53d0cf4b x86inc: don't "bake" stack_offset in named arguments.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-03 20:39:59 -08:00
Derek Buitenhuis
6aa6e3e814 fate: Add sunrast regression test
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-03 20:57:03 -05:00
Justin Ruggles
51ddf35c90 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
2012-03-03 18:20:10 -05:00
Justin Ruggles
8ed7488ea3 wmaenc: return s->block_align instead of recalculating it 2012-03-03 18:20:10 -05:00
Justin Ruggles
5d652e063b 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.
2012-03-03 18:20:10 -05:00
Justin Ruggles
dfc4fdedf8 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
2012-03-03 18:20:10 -05:00
Justin Ruggles
1ec075cfec 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
2012-03-03 18:20:10 -05:00
Justin Ruggles
c2b8dea182 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
2012-03-03 18:20:09 -05:00
Justin Ruggles
b7beabab4b tiertexseq: set correct block_align for audio 2012-03-03 17:03:27 -05:00
Justin Ruggles
f9cf91d822 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.
2012-03-03 17:03:27 -05:00
Justin Ruggles
0883109b27 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.
2012-03-03 17:03:27 -05:00
Justin Ruggles
4da374f8a9 segafilm: use the sample rate as the time base for audio streams 2012-03-03 17:03:27 -05:00
Justin Ruggles
ea289186f0 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.
2012-03-03 17:03:27 -05:00
Justin Ruggles
01be6fa926 psx-str: fix audio pts
Each packet has 18 sectors with 224/channels samples in each sector.
2012-03-03 17:03:27 -05:00
Justin Ruggles
d0ab585074 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.
2012-03-03 17:03:26 -05:00
Justin Ruggles
101c369b7c tta demuxer: set packet duration 2012-03-03 17:03:26 -05:00
Justin Ruggles
0b8b7db01b mpegaudio_parser: do not ignore information from the first parsed frame
Update some demuxing and seeking fate tests.
2012-03-03 17:03:26 -05:00
Michael Niedermayer
6776a8f189 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>
2012-03-03 17:03:26 -05:00
Justin Ruggles
5a9b952201 thp: set audio packet durations 2012-03-03 16:58:45 -05:00
Justin Ruggles
5602a464c9 avcodec: add a Vorbis parser to get packet duration
This also allows for removing some of the Vorbis-related hacks.
2012-03-03 16:43:11 -05:00
Justin Ruggles
737ca4482b 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.
2012-03-03 16:43:11 -05:00
Anton Khirnov
7fb6c9225c lavc: free the output packet when encoding failed or produced no output. 2012-03-03 06:31:41 +01:00
Anton Khirnov
e42e9b0e4d lavc: preserve avpkt->destruct in ff_alloc_packet().
Also, don't bother with saving/restoring data, av_init_packet doesn't
touch it.
2012-03-03 06:31:41 +01:00
Anton Khirnov
c179c9e19d lavc: clarify the meaning of AVCodecContext.frame_number. 2012-03-03 06:31:41 +01:00
Alex Converse
1aa708988a 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
2012-03-02 15:44:42 -08:00
Alex Converse
4df369692e 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
2012-03-02 15:44:42 -08:00
Ronald S. Bultje
9d87374ec0 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
2012-03-02 12:50:00 -08:00
Ronald S. Bultje
154b8bb800 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
2012-03-02 10:34:50 -08:00
Ronald S. Bultje
291c9b6285 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.
2012-03-02 10:33:05 -08:00
Ronald S. Bultje
9c239f6026 matroska: check buffer size for RM-style byte reordering.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-02 10:32:22 -08:00
Ronald S. Bultje
45549339bc 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.
2012-03-02 10:32:05 -08:00
Ronald S. Bultje
bd66f073fe 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.
2012-03-02 10:31:50 -08:00
Ronald S. Bultje
349b7977e4 wma: fix invalid buffer size assumptions causing random overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-02 10:31:28 -08:00
Mashiat Sarker Shakkhar
9d25f1f619 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>
2012-03-02 19:10:29 +01:00