Statistics
| Branch: | Revision:

ffmpeg / libavcodec / ac3enc.c @ c3beafa0

History | View | Annotate | Download (58.3 KB)

# Date Author Comment
c3beafa0 02/02/2011 08:00 PM Justin Ruggles

ac3enc: Change EXP_DIFF_THRESHOLD to 500.

This patch changes the exponent difference threshold in the exponent
strategy decision function of the AC-3 encoder. I tested lowering in
increments of 100. From 1000 down to 500 generally increased in quality
with each step, but 400 was generally much worse....

4c57cde9 01/26/2011 03:35 PM Justin Ruggles

Add ff_ prefix to ac3_common_init().

Signed-off-by: Mans Rullgard <>

3b924294 01/22/2011 05:53 PM Justin Ruggles

ac3enc: use dsputil functions in apply_window()

Signed-off-by: Mans Rullgard <>

0db5d2b0 01/15/2011 01:59 AM Justin Ruggles

cosmetics: spacing, line wrap, and remove unneeded braces

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

964f2cf2 01/15/2011 01:59 AM Justin Ruggles

Process all EXP_REUSE blocks at once in exponent_min().
43% faster in function encode_exponents().

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

7d87d56f 01/15/2011 01:59 AM Justin Ruggles

Take advantage of per-channel exponent and exponent strategy layout to
simplify and speed up encode_exponents().
8% faster in function.

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

5bff8590 01/15/2011 01:59 AM Justin Ruggles

Simplify compute_exp_strategy() by passing a pointer to all exponents and
exponent strategies for a single channel to compute_exp_strategy_ch().
This allows for removal of the temporary pointer arrays.

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

4b90c35d 01/15/2011 01:59 AM Justin Ruggles

Use a local variable in the inner loop of group_exponents() to simplify the
code.

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

a281c650 01/15/2011 01:58 AM Justin Ruggles

cosmetics: remove unneeded braces

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

5fc2e007 01/15/2011 01:58 AM Justin Ruggles

cosmetics: rename block_num to blk for variable name consistency

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

0429e4a6 01/15/2011 01:58 AM Justin Ruggles

Move exp_strategy from AC3Block to AC3EncodeContext in order to arrange by
channel first, then by block.

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

7cc4be58 01/15/2011 01:58 AM Justin Ruggles

Rearrange exponent buffer to group all blocks for a single channel together.
This will allow for faster and simpler processing of all blocks at once.

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

dc7e07ac 01/08/2011 11:21 PM Justin Ruggles

Add stereo rematrixing support to the AC-3 encoders.
This improves the audio quality significantly for stereo source with both the
fixed-point and floating-point AC-3 encoders.
Update acodec-ac3_fixed and seek-ac3_rm test references.

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

ac05f903 01/05/2011 08:35 PM Justin Ruggles

Convert floating-point MDCT coefficients to 24-bit fixed-point all at once
instead of doing it separately in 2 different functions.
This makes float AC-3 encoding approx. 3-7% faster overall.
Also, the coefficient conversion can now be easily SIMD-optimized....

9be52d48 01/05/2011 04:02 PM Justin Ruggles

Use local variables outside the inner loop in extract_exponents() to reduce
accessing of structs and arrays inside the loop.
Approx. 30% faster in function extract_exponents().

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

f1cbbb79 01/04/2011 12:08 PM Justin Ruggles

cosmetics: fix typo in previous commit

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

6fd96d1a 01/04/2011 11:53 AM Justin Ruggles

Change the AC-3 encoder to use floating-point.
Fixed-point AC-3 encoder renamed to ac3_fixed.
Regression test acodec-ac3 renamed to acodec-ac3_fixed.
Regression test lavf-rm changed to use ac3_fixed encoder.

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

ad6b2c1f 01/03/2011 04:08 PM Justin Ruggles

Move fixed-point parts of the AC-3 encoder to separate files.

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

9c84a72a 12/31/2010 11:22 PM Justin Ruggles

Skip the bit allocation search if previous and current SNR offsets are the
maximum value of 1023.
This speeds up overall encoding depending on the content and bitrate.
The most improvement is with high bitrates and/or low complexity content.

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

5128842e 12/31/2010 10:59 PM Justin Ruggles

10l: Fix mistake in r26044. Check increment bounds using actual increment
instead of 64. This will change output in some cases, but it happens to not
affect the AC-3 regression tests.

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

c05ffcd9 12/31/2010 08:01 PM Justin Ruggles

Change planar_samples from int16_t to SampleType.
This one was missed in r26174.

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

0cbd5ff7 12/30/2010 10:30 PM Justin Ruggles

Add typedefs and a macro that will allow sharing of functions between the
fixed-point and floating-point AC-3 encoders.

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

b33dae5e 12/30/2010 10:13 PM Justin Ruggles

Move the list of supported channel layouts to a separate table.

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

34d5074e 12/30/2010 10:13 PM Justin Ruggles

Add a window field to AC3MDCTContext and use it as an input to apply_window()
instead of using the ff_ac3_window[] table directly.

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

b5293036 12/30/2010 10:13 PM Justin Ruggles

cosmetics: alignment, line wrap, and spacing

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

14166a6d 12/30/2010 10:13 PM Justin Ruggles

Remove avctx from AC3MDCTContext and just pass it to mdct_init() instead.

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

e0698e4b 12/30/2010 10:13 PM Justin Ruggles

Make exponent_group_tab[] static.

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

ec44dd5f 12/29/2010 07:17 PM Justin Ruggles

Change the default dB-per-bit code from 2 to 3.
This gives slightly better quality in PEAQ tests.
Code 3 gives a dBpb value of 2816 = -132dB (128 psd units = -6dB), which
corresponds to 22 bits. Since the exponents have an offset applied, the
16-bit source looks like 24-bit source to the bit allocation routine....

b51c740e 12/23/2010 06:01 PM Justin Ruggles

cosmetics: line wrap and vertical alignment

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

e96dc767 12/23/2010 06:01 PM Justin Ruggles

Make sure that the 2nd CRC value does not match the AC-3 sync word.
This is optional for encoders, but it's a good idea and has minimal impact
on performance.
This will change the output for some files, but it happens not to affect the
regression tests.

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

a897423b 12/23/2010 06:01 PM Justin Ruggles

Store CRC context locally to reduce number of calls to av_crc_get_table().

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

0e9b0643 12/23/2010 06:01 PM Justin Ruggles

Remove unneeded local variable, frame_size, in output_frame_end().

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

1ce9d6b8 12/22/2010 12:28 PM Justin Ruggles

cosmetics: fix comment after change in clipping range

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

295ab2af 12/21/2010 09:18 PM Justin Ruggles

Change FIX15 back to clipping to -32767..32767.
This avoids a 16-bit overflow in mdct512() due to a -32768 value in costab.
References updated for acodec-ac3, lavf-rm, and seek-ac3_rm tests.
Thanks to Måns Rullgård for finding the bug.

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

f9f69028 12/21/2010 08:56 PM Justin Ruggles

Add emms_c() after exp_diff calculations.
Fixes AC-3 encoding on OpenBSD 4.8 x86_32 and hopefully other similar
configurations.

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

a81d7c6a 12/21/2010 06:26 PM Justin Ruggles

Pre-calculate crc_inv at codec init.
20% faster output_frame_end().

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

386268df 12/17/2010 11:42 PM Justin Ruggles

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

e62ef8f2 12/17/2010 11:42 PM Justin Ruggles

Check user-specified cutoff frequency in validate_options().

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

78646ac2 12/17/2010 10:06 PM Justin Ruggles

10l: fix encoding for LFE channel

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

86c9673b 12/17/2010 08:52 PM Justin Ruggles

Add support for fixed-point MDCT sizes other than 512.

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

234b70d3 12/17/2010 03:02 PM Justin Ruggles

cosmetics: reindent after last commit

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

98e34e71 12/17/2010 03:02 PM Justin Ruggles

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

cf7c961b 12/17/2010 02:16 PM Justin Ruggles

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

68e6b099 12/16/2010 10:47 PM Justin Ruggles

cosmetics: reindent after last commit

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

795063db 12/16/2010 10:47 PM Justin Ruggles

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....

126a29b8 12/16/2010 10:47 PM Justin Ruggles

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

e7536ac5 12/16/2010 10:47 PM Justin Ruggles

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

e86ea34d 12/16/2010 09:09 PM Justin Ruggles

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

834550ea 12/16/2010 09:09 PM Justin Ruggles

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

cdedf7e6 12/16/2010 09:09 PM Justin Ruggles

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

27af78cf 12/16/2010 09:09 PM Justin Ruggles

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()....

8846ee54 12/16/2010 03:06 PM Justin Ruggles

Use optimized function DSPContext.sad0() instead of calc_exp_diff().
90% faster compute_exp_strategy().

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

7786c384 12/16/2010 03:44 AM Justin Ruggles

cosmetics: pretty-printing after last commit

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

89bedc4d 12/16/2010 03:44 AM Justin Ruggles

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

c41ac4f8 12/16/2010 03:44 AM Justin Ruggles

Use pre-allocated temp buffers in mdct512().
5% faster in function.

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

e29065f7 12/16/2010 03:13 AM Justin Ruggles

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

9d853336 12/16/2010 03:13 AM Justin Ruggles

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

b6f6204d 12/16/2010 02:33 AM Justin Ruggles

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

aa645b98 12/16/2010 02:32 AM Justin Ruggles

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

e8d21fba 12/16/2010 02:32 AM Justin Ruggles

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

171bc51c 12/15/2010 09:12 PM Justin Ruggles

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...

1c3e117e 12/15/2010 05:28 PM Justin Ruggles

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

7eeca961 12/15/2010 05:28 PM Justin Ruggles

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

2d82d9b1 12/15/2010 05:28 PM Justin Ruggles

cosmetics: comment clean-up and misc cosmetics

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

5901cebe 12/15/2010 05:28 PM Justin Ruggles

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

cb6247cb 12/15/2010 05:28 PM Justin Ruggles

Split bit allocation search into a separate function.

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

06f6f785 12/14/2010 10:45 PM Justin Ruggles

10l: fix typo in compute_exp_strategy()

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

266d24be 12/14/2010 10:45 PM Justin Ruggles

Move large arrays to AC3EncodeContext rather than passing them around.

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

7da4dc17 12/14/2010 10:45 PM Justin Ruggles

cosmetics: line wrap and spacing

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

a0d763fc 12/14/2010 10:45 PM Justin Ruggles

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

70fcd7ea 12/14/2010 10:45 PM Justin Ruggles

Change bit_alloc() to return the mantissa bit count.

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

937cd146 12/14/2010 10:45 PM Justin Ruggles

cosmetics: alignment and line wrap after last commit

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

359c1d19 12/14/2010 10:45 PM Justin Ruggles

Move bit counts to AC3EncodeContext.

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

793bbf95 12/14/2010 02:53 PM Justin Ruggles

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

8999944e 12/14/2010 02:53 PM Justin Ruggles

Split out counting of frame bits into a separate function.

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

33a7d549 12/14/2010 02:53 PM Justin Ruggles

cosmetics: vertical alignment

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

d3325d55 12/14/2010 02:53 PM Justin Ruggles

Only calculate num_exp_groups once.

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

dc0bc0f8 12/14/2010 02:53 PM Justin Ruggles

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

f94bacc5 12/14/2010 02:53 PM Justin Ruggles

Split out grouping of exponents into a separate function.

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

b6a1e523 12/14/2010 02:53 PM Justin Ruggles

Split out mantissa quantization into separate functions.

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

5b44ede0 12/14/2010 02:53 PM Justin Ruggles

cosmetics: rearrange some functions

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

d7da8080 12/14/2010 02:53 PM Justin Ruggles

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

67d979fe 12/14/2010 02:53 PM Justin Ruggles

Move writing of frame to the output bitstream to a separate function.

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

084f5c5a 12/14/2010 02:53 PM Justin Ruggles

cosmetics: remove a comment and just spacing

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

160d85f5 12/14/2010 02:53 PM Justin Ruggles

Split frame size adjustment into a separate function.

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

dfdf73eb 12/14/2010 02:53 PM Justin Ruggles

Split exponent processing into separate functions.

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

0a0a8500 12/14/2010 02:52 PM Justin Ruggles

Split applying of MDCT into several separate functions.

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

4acc790f 12/14/2010 02:52 PM Justin Ruggles

Split input sample deinterleaving into a separate function.

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

152cc528 12/14/2010 02:52 PM Justin Ruggles

Separate functionally different calculations in ac3_encode_frame().

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

98f6ee44 12/14/2010 02:52 PM Justin Ruggles

cosmetics: rename 2 variables

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

12ed6226 12/14/2010 02:52 PM Justin Ruggles

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

e0685bc9 12/14/2010 02:52 PM Justin Ruggles

cosmetics: add & alter some comments

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

282255bb 12/14/2010 02:52 PM Justin Ruggles

Split setting of bandwidth into a separate function.

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

e35c984a 12/14/2010 02:52 PM Justin Ruggles

Move setting of bitstream_id and bitstream_mode to ac3_encode_init().

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

ddf63d37 12/14/2010 02:52 PM Justin Ruggles

Improve ac3_encode_init() error reporting.
Return AVERROR 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

b64d842c 12/14/2010 02:52 PM Justin Ruggles

cosmetics: indent after last commit

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

99ca4f73 12/14/2010 02:52 PM Justin Ruggles

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

1607db0a 12/14/2010 02:52 PM Justin Ruggles

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

8f60f70d 12/14/2010 02:52 PM Justin Ruggles

Split validation of initial user options into a separate function.

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

427e2293 12/14/2010 02:52 PM Justin Ruggles

Use bytes instead of 16-bit words for frame size.

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