Commit Graph

27057 Commits

Author SHA1 Message Date
Anatoly Nenashev ba68d9d3e1 Fix -lowres with ffplay.
Patch by Anatoly Nenashev, anatoly d nenashev a ovsoft d ru

Originally committed as revision 26057 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-19 12:17:40 +00:00
Nicolas George 0bc55f5d32 Add AVERROR_*_NOT_FOUND codes.
Originally committed as revision 26056 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-19 09:01:02 +00:00
Reimar Döffinger eb066a4ce9 Discard partial packet of last frame for fate-wmv8-drm to avoid test fails
due to VC-1 decoder overreads resulting in different output.

Originally committed as revision 26055 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-18 23:11:31 +00:00
Reimar Döffinger 853395b913 Add test for ASF -cryptokey that tests only demuxing, but both audio and video
to complement the existing video-only decode test.

Originally committed as revision 26054 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-18 16:06:56 +00:00
Reimar Döffinger bf09a01981 Change ASF demuxer to return incomplete last packets.
Whether the behaviour for streams using scrambling makes sense
is unclear.

Originally committed as revision 26053 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-18 13:18:52 +00:00
Ramiro Polla d09b5a869f bump lavcodec minor version for amr-wb decoder in r26051
Originally committed as revision 26052 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-18 05:15:32 +00:00
Ronald S. Bultje 2b2a597ec0 AMR-WB decoder, written as part of Google Summer of Code 2010 by Marcelo
Galvão Póvoa <marspeoplester gmail com>, mentored by Robert Swain <robert
dot swain gmail com>.

Originally committed as revision 26051 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-18 03:03:18 +00:00
Justin Ruggles 386268dfff Add some simple fallbacks for normal bit allocation failure.
This allows encoding with lower bitrates by decreasing exponent bits first,
then decreasing bandwidth if the user did not specify a specific cutoff
frequency.

Originally committed as revision 26050 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 23:42:56 +00:00
Justin Ruggles e62ef8f2db Check user-specified cutoff frequency in validate_options().
Originally committed as revision 26049 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 23:42:52 +00:00
Justin Ruggles 78646ac206 10l: fix encoding for LFE channel
Originally committed as revision 26048 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 22:06:00 +00:00
Zhentan Feng c4e93eeecd Increase buffer size because the header itself can be larger than 8192
(largest size according to spec: 64k). Fixes playback of
mmsh://a1635.v24937.c2493.g.vm.akamaistream.net/7/1635/2493/v0001/premrad.download.akamai.com/2493/premiere_rock_report/Country_Report.wma

Patch by Zhentan Feng <spyfeng gmail com>.

Originally committed as revision 26047 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 21:17:40 +00:00
Justin Ruggles 86c9673bab Add support for fixed-point MDCT sizes other than 512.
Originally committed as revision 26046 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 20:52:27 +00:00
Justin Ruggles 234b70d346 cosmetics: reindent after last commit
Originally committed as revision 26045 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 15:02:15 +00:00
Justin Ruggles 98e34e71c0 Simplify bit allocation search by using a loop for the SNR offset increment.
Originally committed as revision 26044 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 15:02:12 +00:00
Stefano Sabatini 1653027ac4 Improve layout and clarify / complete documentation for the yadif
filter.

Originally committed as revision 26043 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 14:57:29 +00:00
Justin Ruggles cf7c961b19 Do not calculate psd and masking curve if exponents are being reused.
Approx. 20% faster in function bit_alloc_masking().

Originally committed as revision 26042 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-17 14:16:13 +00:00
Justin Ruggles 68e6b0990d cosmetics: reindent after last commit
Originally committed as revision 26041 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 22:47:11 +00:00
Justin Ruggles 795063db3b Copy bap from previous block when exponent strategy is EXP_REUSE.
We can do this because exponents are the only bit allocation parameters which
change from block-to-block currently.
Approx. 57% faster in function bit_alloc().
Approx. 25% faster overall encoding.

Originally committed as revision 26040 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 22:47:07 +00:00
Justin Ruggles 126a29b871 Count grouped mantissas for each block all at once at the end of bit
allocation for each block.
24% faster in function bit_alloc(). Approx. 10% faster overall encoding.

Originally committed as revision 26039 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 22:47:04 +00:00
Justin Ruggles e7536ac567 Count bits for fixed parameters at start of encoding rather than in every
frame.

Originally committed as revision 26038 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 22:47:00 +00:00
Justin Ruggles e86ea34dad Use a LUT for number of exponent groups. This avoids recalculating it for
every block and channel for every frame.

Originally committed as revision 26037 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 21:09:22 +00:00
Justin Ruggles 834550ea0d Speed up group minimum and group output calculations for EXP_D25 and EXP_D45
in encode_exponents_blk_ch() by removing the inner loops. This is about 30-40%
faster for the modified sections.

Originally committed as revision 26036 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 21:09:16 +00:00
Justin Ruggles cdedf7e625 Convert a for() loop into a while() loop for the downward part of the exponent
delta limiting.

Originally committed as revision 26035 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 21:09:08 +00:00
Justin Ruggles 27af78cf0e Redesign encode_exponents_blk_ch() so that duplicate exponent sets are no
longer required. This gets rid of the temp buffer as well as encoded_exp in
AC3EncodeContext. It also allows for skipping the exponent grouping for
EXP_D15. 56% faster in encode_exponents_blk_ch().

Originally committed as revision 26034 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 21:09:02 +00:00
Justin Ruggles 8846ee54ad Use optimized function DSPContext.sad[0]() instead of calc_exp_diff().
90% faster compute_exp_strategy().

Originally committed as revision 26033 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 15:06:28 +00:00
Martin Storsjö 4f7d2fe2e3 configure: Avoid warnings if av_always_inline is disabled
This macro is disabled if --enable-small or --disable-optimizations are set.
Currently, this leads to warnings about functions being defined but not used,
for functions in header files.

By defining av_always_inline as inline or as av_unused, we avoid these
warnings.

This doesn't make a normal build with --enable-small any larger,
since the compiler probably chooses not to inline these functions even
if they're marked as inline.

Originally committed as revision 26032 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 08:41:17 +00:00
Justin Ruggles 7786c384f6 cosmetics: pretty-printing after last commit
Originally committed as revision 26031 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:44:35 +00:00
Justin Ruggles 89bedc4d2e Add a goto for init failure instead of duplicate calls to ac3_encode_close().
Originally committed as revision 26030 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:44:32 +00:00
Justin Ruggles c41ac4f82e Use pre-allocated temp buffers in mdct512().
5% faster in function.

Originally committed as revision 26029 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:44:29 +00:00
Justin Ruggles e29065f7bf Write results of post-rotation complex multiply directly to output.
2% faster in function mdct512().

Originally committed as revision 26028 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:13:45 +00:00
Justin Ruggles 9d8533368f Use memcpy() instead of a for loop in mdct512().
8% faster in function.

Originally committed as revision 26027 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 03:13:41 +00:00
Justin Ruggles b6f6204db9 Allocate all large per-channel arrays using av_malloc().
Decreases memory usage for less than 6 channels.

Originally committed as revision 26026 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 02:33:02 +00:00
Justin Ruggles aa645b9888 Make windowed_samples 16-byte aligned.
This will allow future SIMD optimization of the window function.

Originally committed as revision 26025 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 02:32:59 +00:00
Justin Ruggles e8d21fba3f Allocate planar_samples using av_mallocz().
Lowers memory usage when encoding less than 6 channels.

Originally committed as revision 26024 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-16 02:32:55 +00:00
Justin Ruggles 171bc51c9b Allocate bap and bap1 buffers using av_malloc().
This reduces the memory footprint when using less than 6 channels.
Modify bit allocation to swap the 2 buffers instead of using memcpy() and use
per-block pointers for bap. This is slightly faster (0.3%) in function
cbr_bit_allocation().

Originally committed as revision 26023 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 21:12:28 +00:00
Martin Storsjö bbd8f5477d rtsp: Don't set the RTP time base from the sample rate if no sample rate is set
This also reverts SVN rev 26016, which incorrectly overwrote the time base
with 90 kHz for all streams, regardless of what was set by the SDP parsing.

The stream that triggered the fix in 26016 still works after this commit.

Originally committed as revision 26022 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 21:06:25 +00:00
Justin Ruggles 1c3e117e0b Remove last_samples[] and copy directly from planar_samples[].
Avoids memcpy that was used to store last samples for next frame.
Approx. 3% faster in function deinterleave_input_samples() and reduces memory
usage by 3kB.

Originally committed as revision 26021 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:52 +00:00
Justin Ruggles 7eeca961e3 Remove unneeded line. key_frame is already set to 1 in avcodec_alloc_frame().
Originally committed as revision 26020 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:49 +00:00
Justin Ruggles 2d82d9b1df cosmetics: comment clean-up and misc cosmetics
Originally committed as revision 26019 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:44 +00:00
Justin Ruggles 5901cebecd Separate most of the per-block arrays into a separate per-block struct.
Originally committed as revision 26018 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:41 +00:00
Justin Ruggles cb6247cb30 Split bit allocation search into a separate function.
Originally committed as revision 26017 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:28:38 +00:00
Luca Barbato a4a3bade0a Reinstate default time_base for rtp streams
The generic default is 0/0 and that obviously triggers once the value is used.

Originally committed as revision 26016 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 17:16:37 +00:00
Alexander Strange 0f01602362 SVQ3: Allow decoding if thread_count is > 1
svq3 still doesn't support multithreading, but it's simpler for clients if
they can enable threading for all codecs by default.

Originally committed as revision 26015 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 00:22:47 +00:00
Thomas Guillem 1aa58c6405 tcp: Check url_interrupt_cb if connect was interrupted by a signal
This makes it possible to abort a blocking connect call.

Patch by Thomas Guillem, thomas dot guillem at gmail

Originally committed as revision 26014 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 23:03:05 +00:00
Justin Ruggles 06f6f78578 10l: fix typo in compute_exp_strategy()
Originally committed as revision 26013 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:35 +00:00
Justin Ruggles 266d24be4a Move large arrays to AC3EncodeContext rather than passing them around.
Originally committed as revision 26012 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:31 +00:00
Justin Ruggles 7da4dc17d9 cosmetics: line wrap and spacing
Originally committed as revision 26011 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:28 +00:00
Justin Ruggles a0d763fc88 Use a single value for SNR offset in the bit allocation search rather than
the separate coarse and fine values.

Originally committed as revision 26010 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:22 +00:00
Justin Ruggles 70fcd7ea80 Change bit_alloc() to return the mantissa bit count.
Originally committed as revision 26009 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:19 +00:00
Justin Ruggles 937cd1467c cosmetics: alignment and line wrap after last commit
Originally committed as revision 26008 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-14 22:45:15 +00:00