]> git.sesse.net Git - ffmpeg/log
ffmpeg
13 years agoAdd a missing dependency for the WebM muxer
Martin Storsjö [Tue, 21 Dec 2010 09:23:35 +0000 (09:23 +0000)]
Add a missing dependency for the WebM muxer

This fixes one of the issues found if building with
--disable-everything --enable-muxer=webm

Originally committed as revision 26066 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agog722: Move the low_inv_quant6 table up to the common tables
Martin Storsjö [Tue, 21 Dec 2010 09:03:57 +0000 (09:03 +0000)]
g722: Move the low_inv_quant6 table up to the common tables

Since SVN rev 25866, this table is used by the trellis encoder, too,
not only by the decoder.

Originally committed as revision 26065 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoIncrease STDDEV tolerance for the fate-amrwb-14k25 test so it pass in
Vitor Sessak [Mon, 20 Dec 2010 22:01:48 +0000 (22:01 +0000)]
Increase STDDEV tolerance for the fate-amrwb-14k25 test so it pass in
x86_64 boxes.

Originally committed as revision 26064 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoAdd AMR-WB FATE tests
Vitor Sessak [Mon, 20 Dec 2010 21:35:18 +0000 (21:35 +0000)]
Add AMR-WB FATE tests

Originally committed as revision 26063 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agosdp: Add a framesize attribute to H.263 SDP descriptions
Martin Storsjö [Mon, 20 Dec 2010 20:46:40 +0000 (20:46 +0000)]
sdp: Add a framesize attribute to H.263 SDP descriptions

While not mentioned in RFC 4629, this is required for H.263 in
3GPP TS 26.234. It is in practice required for playback with
Android stagefright and on Samsung bada phones.

Originally committed as revision 26062 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoFix crash if invalid bit-rate was read from file.
David Czech [Mon, 20 Dec 2010 09:58:27 +0000 (09:58 +0000)]
Fix crash if invalid bit-rate was read from file.
Fixes issue 2426.

Patch by David Czech, davidczech510 gmail

Originally committed as revision 26061 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoFix avfilter_draw_slice() copy code with alpha planes.
Stefano Sabatini [Sun, 19 Dec 2010 19:08:30 +0000 (19:08 +0000)]
Fix avfilter_draw_slice() copy code with alpha planes.

Originally committed as revision 26060 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoRevert commit r22596.
Stefano Sabatini [Sun, 19 Dec 2010 18:17:11 +0000 (18:17 +0000)]
Revert commit r22596.

  commit ab8610aa176c13b5e25a2d8770df28a14665e169
  Author: koorogi <koorogi@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
  Date:   Thu Mar 18 23:13:04 2010 +0000

    The vflip filter does not need to keep ownership of a picture reference.
    Avoid creating and releasing useless extra picture references in the
    start_frame and end_frame callbacks.

    Originally committed as revision 22596 to svn://svn.ffmpeg.org/ffmpeg/trunk

The new reference creation is required when the linesizes are used by the
previous filters in the filterchain, for example as in "pad=W:H:X:Y,vflip".

Originally committed as revision 26059 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoFix crash in gradfun:end_frame() when inpic == outpic, so it has to be
Stefano Sabatini [Sun, 19 Dec 2010 13:02:05 +0000 (13:02 +0000)]
Fix crash in gradfun:end_frame() when inpic == outpic, so it has to be
freed just once.

Originally committed as revision 26058 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoFix -lowres with ffplay.
Anatoly Nenashev [Sun, 19 Dec 2010 12:17:40 +0000 (12:17 +0000)]
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

13 years agoAdd AVERROR_*_NOT_FOUND codes.
Nicolas George [Sun, 19 Dec 2010 09:01:02 +0000 (09:01 +0000)]
Add AVERROR_*_NOT_FOUND codes.

Originally committed as revision 26056 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoDiscard partial packet of last frame for fate-wmv8-drm to avoid test fails
Reimar Döffinger [Sat, 18 Dec 2010 23:11:31 +0000 (23:11 +0000)]
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

13 years agoAdd test for ASF -cryptokey that tests only demuxing, but both audio and video
Reimar Döffinger [Sat, 18 Dec 2010 16:06:56 +0000 (16:06 +0000)]
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

13 years agoChange ASF demuxer to return incomplete last packets.
Reimar Döffinger [Sat, 18 Dec 2010 13:18:52 +0000 (13:18 +0000)]
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

13 years agobump lavcodec minor version for amr-wb decoder in r26051
Ramiro Polla [Sat, 18 Dec 2010 05:15:32 +0000 (05:15 +0000)]
bump lavcodec minor version for amr-wb decoder in r26051

Originally committed as revision 26052 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoAMR-WB decoder, written as part of Google Summer of Code 2010 by Marcelo
Ronald S. Bultje [Sat, 18 Dec 2010 03:03:18 +0000 (03:03 +0000)]
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

13 years agoAdd some simple fallbacks for normal bit allocation failure.
Justin Ruggles [Fri, 17 Dec 2010 23:42:56 +0000 (23:42 +0000)]
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

13 years agoCheck user-specified cutoff frequency in validate_options().
Justin Ruggles [Fri, 17 Dec 2010 23:42:52 +0000 (23:42 +0000)]
Check user-specified cutoff frequency in validate_options().

Originally committed as revision 26049 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years ago10l: fix encoding for LFE channel
Justin Ruggles [Fri, 17 Dec 2010 22:06:00 +0000 (22:06 +0000)]
10l: fix encoding for LFE channel

Originally committed as revision 26048 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoIncrease buffer size because the header itself can be larger than 8192
Zhentan Feng [Fri, 17 Dec 2010 21:17:40 +0000 (21:17 +0000)]
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

13 years agoAdd support for fixed-point MDCT sizes other than 512.
Justin Ruggles [Fri, 17 Dec 2010 20:52:27 +0000 (20:52 +0000)]
Add support for fixed-point MDCT sizes other than 512.

Originally committed as revision 26046 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: reindent after last commit
Justin Ruggles [Fri, 17 Dec 2010 15:02:15 +0000 (15:02 +0000)]
cosmetics: reindent after last commit

Originally committed as revision 26045 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoSimplify bit allocation search by using a loop for the SNR offset increment.
Justin Ruggles [Fri, 17 Dec 2010 15:02:12 +0000 (15:02 +0000)]
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

13 years agoImprove layout and clarify / complete documentation for the yadif
Stefano Sabatini [Fri, 17 Dec 2010 14:57:29 +0000 (14:57 +0000)]
Improve layout and clarify / complete documentation for the yadif
filter.

Originally committed as revision 26043 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoDo not calculate psd and masking curve if exponents are being reused.
Justin Ruggles [Fri, 17 Dec 2010 14:16:13 +0000 (14:16 +0000)]
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

13 years agocosmetics: reindent after last commit
Justin Ruggles [Thu, 16 Dec 2010 22:47:11 +0000 (22:47 +0000)]
cosmetics: reindent after last commit

Originally committed as revision 26041 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoCopy bap from previous block when exponent strategy is EXP_REUSE.
Justin Ruggles [Thu, 16 Dec 2010 22:47:07 +0000 (22:47 +0000)]
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

13 years agoCount grouped mantissas for each block all at once at the end of bit
Justin Ruggles [Thu, 16 Dec 2010 22:47:04 +0000 (22:47 +0000)]
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

13 years agoCount bits for fixed parameters at start of encoding rather than in every
Justin Ruggles [Thu, 16 Dec 2010 22:47:00 +0000 (22:47 +0000)]
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

13 years agoUse a LUT for number of exponent groups. This avoids recalculating it for
Justin Ruggles [Thu, 16 Dec 2010 21:09:22 +0000 (21:09 +0000)]
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

13 years agoSpeed up group minimum and group output calculations for EXP_D25 and EXP_D45
Justin Ruggles [Thu, 16 Dec 2010 21:09:16 +0000 (21:09 +0000)]
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

13 years agoConvert a for() loop into a while() loop for the downward part of the exponent
Justin Ruggles [Thu, 16 Dec 2010 21:09:08 +0000 (21:09 +0000)]
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

13 years agoRedesign encode_exponents_blk_ch() so that duplicate exponent sets are no
Justin Ruggles [Thu, 16 Dec 2010 21:09:02 +0000 (21:09 +0000)]
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

13 years agoUse optimized function DSPContext.sad[0]() instead of calc_exp_diff().
Justin Ruggles [Thu, 16 Dec 2010 15:06:28 +0000 (15:06 +0000)]
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

13 years agoconfigure: Avoid warnings if av_always_inline is disabled
Martin Storsjö [Thu, 16 Dec 2010 08:41:17 +0000 (08:41 +0000)]
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

13 years agocosmetics: pretty-printing after last commit
Justin Ruggles [Thu, 16 Dec 2010 03:44:35 +0000 (03:44 +0000)]
cosmetics: pretty-printing after last commit

Originally committed as revision 26031 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoAdd a goto for init failure instead of duplicate calls to ac3_encode_close().
Justin Ruggles [Thu, 16 Dec 2010 03:44:32 +0000 (03:44 +0000)]
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

13 years agoUse pre-allocated temp buffers in mdct512().
Justin Ruggles [Thu, 16 Dec 2010 03:44:29 +0000 (03:44 +0000)]
Use pre-allocated temp buffers in mdct512().
5% faster in function.

Originally committed as revision 26029 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoWrite results of post-rotation complex multiply directly to output.
Justin Ruggles [Thu, 16 Dec 2010 03:13:45 +0000 (03:13 +0000)]
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

13 years agoUse memcpy() instead of a for loop in mdct512().
Justin Ruggles [Thu, 16 Dec 2010 03:13:41 +0000 (03:13 +0000)]
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

13 years agoAllocate all large per-channel arrays using av_malloc().
Justin Ruggles [Thu, 16 Dec 2010 02:33:02 +0000 (02:33 +0000)]
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

13 years agoMake windowed_samples 16-byte aligned.
Justin Ruggles [Thu, 16 Dec 2010 02:32:59 +0000 (02:32 +0000)]
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

13 years agoAllocate planar_samples using av_mallocz().
Justin Ruggles [Thu, 16 Dec 2010 02:32:55 +0000 (02:32 +0000)]
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

13 years agoAllocate bap and bap1 buffers using av_malloc().
Justin Ruggles [Wed, 15 Dec 2010 21:12:28 +0000 (21:12 +0000)]
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

13 years agortsp: Don't set the RTP time base from the sample rate if no sample rate is set
Martin Storsjö [Wed, 15 Dec 2010 21:06:25 +0000 (21:06 +0000)]
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

13 years agoRemove last_samples[] and copy directly from planar_samples[].
Justin Ruggles [Wed, 15 Dec 2010 17:28:52 +0000 (17:28 +0000)]
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

13 years agoRemove unneeded line. key_frame is already set to 1 in avcodec_alloc_frame().
Justin Ruggles [Wed, 15 Dec 2010 17:28:49 +0000 (17:28 +0000)]
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

13 years agocosmetics: comment clean-up and misc cosmetics
Justin Ruggles [Wed, 15 Dec 2010 17:28:44 +0000 (17:28 +0000)]
cosmetics: comment clean-up and misc cosmetics

Originally committed as revision 26019 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoSeparate most of the per-block arrays into a separate per-block struct.
Justin Ruggles [Wed, 15 Dec 2010 17:28:41 +0000 (17:28 +0000)]
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

13 years agoSplit bit allocation search into a separate function.
Justin Ruggles [Wed, 15 Dec 2010 17:28:38 +0000 (17:28 +0000)]
Split bit allocation search into a separate function.

Originally committed as revision 26017 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoReinstate default time_base for rtp streams
Luca Barbato [Wed, 15 Dec 2010 17:16:37 +0000 (17:16 +0000)]
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

13 years agoSVQ3: Allow decoding if thread_count is > 1
Alexander Strange [Wed, 15 Dec 2010 00:22:47 +0000 (00:22 +0000)]
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

13 years agotcp: Check url_interrupt_cb if connect was interrupted by a signal
Thomas Guillem [Tue, 14 Dec 2010 23:03:05 +0000 (23:03 +0000)]
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

13 years ago10l: fix typo in compute_exp_strategy()
Justin Ruggles [Tue, 14 Dec 2010 22:45:35 +0000 (22:45 +0000)]
10l: fix typo in compute_exp_strategy()

Originally committed as revision 26013 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoMove large arrays to AC3EncodeContext rather than passing them around.
Justin Ruggles [Tue, 14 Dec 2010 22:45:31 +0000 (22:45 +0000)]
Move large arrays to AC3EncodeContext rather than passing them around.

Originally committed as revision 26012 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: line wrap and spacing
Justin Ruggles [Tue, 14 Dec 2010 22:45:28 +0000 (22:45 +0000)]
cosmetics: line wrap and spacing

Originally committed as revision 26011 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoUse a single value for SNR offset in the bit allocation search rather than
Justin Ruggles [Tue, 14 Dec 2010 22:45:22 +0000 (22:45 +0000)]
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

13 years agoChange bit_alloc() to return the mantissa bit count.
Justin Ruggles [Tue, 14 Dec 2010 22:45:19 +0000 (22:45 +0000)]
Change bit_alloc() to return the mantissa bit count.

Originally committed as revision 26009 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: alignment and line wrap after last commit
Justin Ruggles [Tue, 14 Dec 2010 22:45:15 +0000 (22:45 +0000)]
cosmetics: alignment and line wrap after last commit

Originally committed as revision 26008 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoMove bit counts to AC3EncodeContext.
Justin Ruggles [Tue, 14 Dec 2010 22:45:12 +0000 (22:45 +0000)]
Move bit counts to AC3EncodeContext.

Originally committed as revision 26007 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoSimplify texi files naming: ff*-doc.texi -> ff*.texi.
Stefano Sabatini [Tue, 14 Dec 2010 18:38:37 +0000 (18:38 +0000)]
Simplify texi files naming: ff*-doc.texi -> ff*.texi.

Originally committed as revision 26006 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoAdd missing dependency for matroska muxer.
Justin Ruggles [Tue, 14 Dec 2010 17:14:40 +0000 (17:14 +0000)]
Add missing dependency for matroska muxer.

Originally committed as revision 26005 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoUpdate the test references for lavf-rm and seek-ac3_rm.
Justin Ruggles [Tue, 14 Dec 2010 16:14:52 +0000 (16:14 +0000)]
Update the test references for lavf-rm and seek-ac3_rm.
The references changed due to r25956.

Originally committed as revision 26004 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoSplit out setting of bit allocation parameters to a separate function.
Justin Ruggles [Tue, 14 Dec 2010 14:53:43 +0000 (14:53 +0000)]
Split out setting of bit allocation parameters to a separate function.
Th new function only needs to be called at initialization because bit
allocation parameters currently do not change during encoding.

Originally committed as revision 26003 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoSplit out counting of frame bits into a separate function.
Justin Ruggles [Tue, 14 Dec 2010 14:53:40 +0000 (14:53 +0000)]
Split out counting of frame bits into a separate function.

Originally committed as revision 26002 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: vertical alignment
Justin Ruggles [Tue, 14 Dec 2010 14:53:36 +0000 (14:53 +0000)]
cosmetics: vertical alignment

Originally committed as revision 26001 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoOnly calculate num_exp_groups once.
Justin Ruggles [Tue, 14 Dec 2010 14:53:33 +0000 (14:53 +0000)]
Only calculate num_exp_groups once.

Originally committed as revision 26000 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoCheck for bit allocation error in ac3_encode_frame().
Justin Ruggles [Tue, 14 Dec 2010 14:53:30 +0000 (14:53 +0000)]
Check for bit allocation error in ac3_encode_frame().
Move error log printout to ac3_encode_frame().

Originally committed as revision 25999 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoSplit out grouping of exponents into a separate function.
Justin Ruggles [Tue, 14 Dec 2010 14:53:26 +0000 (14:53 +0000)]
Split out grouping of exponents into a separate function.

Originally committed as revision 25998 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoSplit out mantissa quantization into separate functions.
Justin Ruggles [Tue, 14 Dec 2010 14:53:23 +0000 (14:53 +0000)]
Split out mantissa quantization into separate functions.

Originally committed as revision 25997 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: rearrange some functions
Justin Ruggles [Tue, 14 Dec 2010 14:53:20 +0000 (14:53 +0000)]
cosmetics: rearrange some functions

Originally committed as revision 25996 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoReverse the exponent & exponent strategy array arrangement to simplify the
Justin Ruggles [Tue, 14 Dec 2010 14:53:17 +0000 (14:53 +0000)]
Reverse the exponent & exponent strategy array arrangement to simplify the
per-channel exponent strategy decision.  This will also make it easier to
plug-in other exponent strategy algorithms.

Originally committed as revision 25995 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoMove writing of frame to the output bitstream to a separate function.
Justin Ruggles [Tue, 14 Dec 2010 14:53:13 +0000 (14:53 +0000)]
Move writing of frame to the output bitstream to a separate function.

Originally committed as revision 25994 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: remove a comment and just spacing
Justin Ruggles [Tue, 14 Dec 2010 14:53:10 +0000 (14:53 +0000)]
cosmetics: remove a comment and just spacing

Originally committed as revision 25993 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoSplit frame size adjustment into a separate function.
Justin Ruggles [Tue, 14 Dec 2010 14:53:06 +0000 (14:53 +0000)]
Split frame size adjustment into a separate function.

Originally committed as revision 25992 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoSplit exponent processing into separate functions.
Justin Ruggles [Tue, 14 Dec 2010 14:53:02 +0000 (14:53 +0000)]
Split exponent processing into separate functions.

Originally committed as revision 25991 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoSplit applying of MDCT into several separate functions.
Justin Ruggles [Tue, 14 Dec 2010 14:52:59 +0000 (14:52 +0000)]
Split applying of MDCT into several separate functions.

Originally committed as revision 25990 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoSplit input sample deinterleaving into a separate function.
Justin Ruggles [Tue, 14 Dec 2010 14:52:56 +0000 (14:52 +0000)]
Split input sample deinterleaving into a separate function.

Originally committed as revision 25989 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoSeparate functionally different calculations in ac3_encode_frame().
Justin Ruggles [Tue, 14 Dec 2010 14:52:53 +0000 (14:52 +0000)]
Separate functionally different calculations in ac3_encode_frame().

Originally committed as revision 25988 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: rename 2 variables
Justin Ruggles [Tue, 14 Dec 2010 14:52:49 +0000 (14:52 +0000)]
cosmetics: rename 2 variables

Originally committed as revision 25987 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoDeinterleave whole frame at once instead of per-block.
Justin Ruggles [Tue, 14 Dec 2010 14:52:46 +0000 (14:52 +0000)]
Deinterleave whole frame at once instead of per-block.
This reduces the amount of memcpy() by using pointers to overlap samples for
successive blocks rather than copying.

Originally committed as revision 25986 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: add & alter some comments
Justin Ruggles [Tue, 14 Dec 2010 14:52:43 +0000 (14:52 +0000)]
cosmetics: add & alter some comments

Originally committed as revision 25985 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoSplit setting of bandwidth into a separate function.
Justin Ruggles [Tue, 14 Dec 2010 14:52:40 +0000 (14:52 +0000)]
Split setting of bandwidth into a separate function.

Originally committed as revision 25984 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoMove setting of bitstream_id and bitstream_mode to ac3_encode_init().
Justin Ruggles [Tue, 14 Dec 2010 14:52:37 +0000 (14:52 +0000)]
Move setting of bitstream_id and bitstream_mode to ac3_encode_init().

Originally committed as revision 25983 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoImprove ac3_encode_init() error reporting.
Justin Ruggles [Tue, 14 Dec 2010 14:52:34 +0000 (14:52 +0000)]
Improve ac3_encode_init() error reporting.
Return AVERROR(EINVAL) instead of -1. Propogate errors from called functions.
Add some error log printouts.

Originally committed as revision 25982 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: indent after last commit
Justin Ruggles [Tue, 14 Dec 2010 14:52:30 +0000 (14:52 +0000)]
cosmetics: indent after last commit

Originally committed as revision 25981 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoDon't use nested loops to iterate valid sample rates.
Justin Ruggles [Tue, 14 Dec 2010 14:52:25 +0000 (14:52 +0000)]
Don't use nested loops to iterate valid sample rates.
Eliminates a goto and mirrors the bitrate validation.

Originally committed as revision 25980 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoRemove some duplicate local copies of avctx fields.
Justin Ruggles [Tue, 14 Dec 2010 14:52:21 +0000 (14:52 +0000)]
Remove some duplicate local copies of avctx fields.
This is an av_cold function, and we don't need to duplicate variables just to
save a few characters.

Originally committed as revision 25979 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoSplit validation of initial user options into a separate function.
Justin Ruggles [Tue, 14 Dec 2010 14:52:18 +0000 (14:52 +0000)]
Split validation of initial user options into a separate function.

Originally committed as revision 25978 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoUse bytes instead of 16-bit words for frame size.
Justin Ruggles [Tue, 14 Dec 2010 14:52:14 +0000 (14:52 +0000)]
Use bytes instead of 16-bit words for frame size.

Originally committed as revision 25977 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: rename variable 'n' to 'pad_bytes'
Justin Ruggles [Tue, 14 Dec 2010 14:52:12 +0000 (14:52 +0000)]
cosmetics: rename variable 'n' to 'pad_bytes'

Originally committed as revision 25976 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoChange output_frame_end() to return void. The frame size is already known.
Justin Ruggles [Tue, 14 Dec 2010 14:52:08 +0000 (14:52 +0000)]
Change output_frame_end() to return void. The frame size is already known.

Originally committed as revision 25975 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: pretty-printing
Justin Ruggles [Tue, 14 Dec 2010 14:52:04 +0000 (14:52 +0000)]
cosmetics: pretty-printing

Originally committed as revision 25974 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: rename some iterator variables to match what they represent
Justin Ruggles [Tue, 14 Dec 2010 14:52:00 +0000 (14:52 +0000)]
cosmetics: rename some iterator variables to match what they represent

Originally committed as revision 25973 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: rename a variable for consistency
Justin Ruggles [Tue, 14 Dec 2010 14:51:56 +0000 (14:51 +0000)]
cosmetics: rename a variable for consistency

Originally committed as revision 25972 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: rename exp_samples and global_exp to exp_shift.
Justin Ruggles [Tue, 14 Dec 2010 14:51:53 +0000 (14:51 +0000)]
cosmetics: rename exp_samples and global_exp to exp_shift.

Originally committed as revision 25971 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: rename 2 functions
Justin Ruggles [Tue, 14 Dec 2010 14:51:50 +0000 (14:51 +0000)]
cosmetics: rename 2 functions

Originally committed as revision 25970 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agocosmetics: use some size macros in ac3tab.c/h
Justin Ruggles [Tue, 14 Dec 2010 14:51:47 +0000 (14:51 +0000)]
cosmetics: use some size macros in ac3tab.c/h

Originally committed as revision 25969 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agoUse AC3_MAX_COEFS instead of 256 in a couple places in ac3.c
Justin Ruggles [Tue, 14 Dec 2010 14:51:43 +0000 (14:51 +0000)]
Use AC3_MAX_COEFS instead of 256 in a couple places in ac3.c

Originally committed as revision 25968 to svn://svn.ffmpeg.org/ffmpeg/trunk

13 years agodefine AC3_CRITICAL_BANDS and use it in the AC-3 encoder and decoder.
Justin Ruggles [Tue, 14 Dec 2010 14:51:40 +0000 (14:51 +0000)]
define AC3_CRITICAL_BANDS and use it in the AC-3 encoder and decoder.

Originally committed as revision 25967 to svn://svn.ffmpeg.org/ffmpeg/trunk