Statistics
| Branch: | Revision:

ffmpeg / libavcodec / ac3enc.c @ 98f6ee44

History | View | Annotate | Download (46.7 KB)

# Date Author Comment
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

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

cosmetics: rename variable 'n' to 'pad_bytes'

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

1971ab6e 12/14/2010 02:52 PM Justin Ruggles

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

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

cosmetics: pretty-printing

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

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

cosmetics: rename some iterator variables to match what they represent

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

77773275 12/14/2010 02:51 PM Justin Ruggles

cosmetics: rename a variable for consistency

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

aab45ca3 12/14/2010 02:51 PM Justin Ruggles

cosmetics: rename exp_samples and global_exp to exp_shift.

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

23c5b361 12/14/2010 02:51 PM Justin Ruggles

cosmetics: rename 2 functions

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

47ae6e79 12/14/2010 02:51 PM Justin Ruggles

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

0454b558 12/14/2010 02:51 PM Justin Ruggles

Use sizeof(array value) instead of sizeof(int16_t).

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

a0a9204e 12/14/2010 02:51 PM Justin Ruggles

cosmetics: use lowercase letters for function names

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

c36ce0f8 12/14/2010 02:51 PM Justin Ruggles

cosmetics: add new function documentation and clean up existing documentation

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

2f8ae522 12/14/2010 02:51 PM Justin Ruggles

cosmetics: add more space between functions

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

e77fd066 12/14/2010 02:51 PM Justin Ruggles

cosmetics: rearrange some functions/typedefs/macros

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

02877def 12/14/2010 02:51 PM Justin Ruggles

Simplify group size calculation in 2 places.

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

98161553 12/14/2010 02:51 PM Justin Ruggles

cosmetics: make a switch/case more compact

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

b84a211b 12/14/2010 02:51 PM Justin Ruggles

Clean up fft_init() and mdct_init()

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

6a988808 12/14/2010 02:51 PM Justin Ruggles

cosmetics: pretty-printing, alignment, etc...

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

a913b5cf 12/14/2010 02:51 PM Justin Ruggles

Remove unneeded #include

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

918cd225 12/14/2010 02:51 PM Justin Ruggles

Simplify fix15().
Turn it into 2 macros, and use av_clip_int16() and lrintf().
This matches the int16 to float sample conversion in audioconvert.c.
The regression test output is different due to lrintf() rounding.

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

228315bb 12/14/2010 02:50 PM Justin Ruggles

Fix the fixed-point MDCT and FFT tests so that they actually compile and work.

Also, use LFG from libavutil instead of random().

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

a8d2b06b 12/14/2010 02:50 PM Justin Ruggles

Split out initialization of MDCT tables into a separate function.

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

07965463 12/14/2010 02:50 PM Justin Ruggles

cosmetics: Document AC3EncodeContext fields.

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

22c0b03c 12/14/2010 02:50 PM Justin Ruggles

Remove unneeded debugging messages.

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

1fda2c10 12/14/2010 02:50 PM Justin Ruggles

cosmetics: Define AC3_WINDOW_SIZE and use it instead of AC3_BLOCK_SIZE*2.

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

7066cc8f 12/14/2010 02:50 PM Justin Ruggles

cosmetics: use better (and shared) macro names for some constant values

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

a657899c 12/14/2010 02:50 PM Justin Ruggles

Remove duplicate AC3EncodeContext fields, sr_shift and sr_code.

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

2d2692eb 12/14/2010 02:50 PM Justin Ruggles

cosmetics: rename some fields in AC3EncodeContext

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

9cb59032 12/14/2010 02:50 PM Justin Ruggles

cosmetics: change all short to int16_t

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

2be209b2 12/14/2010 02:50 PM Justin Ruggles

Change some unsigned types to signed types in AC3EncodeContext

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

7e5a4bf8 12/14/2010 02:50 PM Justin Ruggles

cosmetics: rearrange AC3EncodeContext fields

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

63e8d976 11/21/2010 08:06 PM Stefano Sabatini

Use the new libavcore audio channel API.

This also allows to remove a linking dependency of libavfilter on
libavcodec.

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

5d6e4c16 11/12/2010 11:04 AM Stefano Sabatini

Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enum
SampleFormat with AVSampleFormat.

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

edac49da 07/24/2010 01:59 PM Reimar Döffinger

Use "const" qualifier for pointers that point to input data of
audio encoders.
This is purely for clarity/documentation purposes.

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

8fc0162a 07/10/2010 10:12 PM Måns Rullgård

Add av_ prefix to bswap macros

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

ba87f080 04/20/2010 02:45 PM Diego Biurrun

Remove explicit filename from Doxygen @file commands.

Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

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

72415b2a 03/30/2010 11:30 PM Stefano Sabatini

Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.

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

91cc5d37 11/09/2009 09:11 AM Francesco Lavra

Move ff_reverse in libavcodec to av_reverse in libavutil.

Patch by Francesco Lavra, francescolavra interfree it

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

b5f09d31 09/06/2009 09:15 AM Reimar Döffinger

Make sample_fmts and channel_layouts compound literals const to reduce size of
.data section.

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

8b44de14 07/30/2009 09:00 PM Diego Biurrun

Change av_log() calls surrounded by '#ifdef DEBUG' into dprintf macros.

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

be1efe59 04/20/2009 12:34 AM Justin Ruggles

ac3enc: log a warning message if the channel layout is not specified at
the time of codec initialization.

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

120b4557 04/19/2009 03:06 PM Justin Ruggles

Add channel layout support to the AC-3 encoder.

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

a7c6e117 04/17/2009 08:39 AM Justin Ruggles

ac3enc: reorder input channels to AC-3 channel order

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

fb53b4a0 04/13/2009 04:59 PM Stefano Sabatini

Rename pbBufPtr() to put_bits_ptr().
The new name is more readable and consistent with the FFmpeg naming
style.

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

9106a698 04/13/2009 04:20 PM Stefano Sabatini

Rename bitstream.h to get_bits.h.

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

b2755007 04/12/2009 08:35 AM Stefano Sabatini

Split bitstream.h, put the bitstream writer stuff in the new file
put_bits.h.

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

27127202 03/05/2009 10:17 PM Diego Biurrun

Remove duplicated MUL16 macro definition, fixes the warning:
libavcodec/ac3enc.c:119:1: warning: "MUL16" redefined

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

5ef251e5 02/22/2009 01:48 PM Daniel Verkamp

Add missing av_cold in static init/close functions.

Patch by Daniel Verkamp daniel at drv dot nu.

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

bad5537e 02/01/2009 02:00 AM Diego Biurrun

Use full internal pathname in doxygen @file directives.
Otherwise doxygen complains about ambiguous filenames when files exist
under the same name in different subdirectories.

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

406792e7 01/19/2009 03:46 PM Diego Biurrun

cosmetics: Remove pointless period after copyright statement non-sentences.

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

2988c93d 09/01/2008 02:33 PM Justin Ruggles

create a separate codec_id for E-AC-3

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

bf09b550 08/20/2008 12:32 AM Justin Ruggles

commit the OKed parts of the E-AC-3 decoder

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

14b70628 08/03/2008 04:42 PM Justin Ruggles

cosmetics: make all references to AC-3 capitalized and hyphenated

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

fd76c37f 07/31/2008 10:47 AM Peter Ross

Modify all codecs to report their supported input and output sample format(s).

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

cf2baeb3 06/24/2008 08:01 PM Stefan Gehrer

mark read-only data as const

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

fe4bf374 06/12/2008 09:50 PM Stefano Sabatini

Make AVCodec long_names definition conditional depending on CONFIG_SMALL.

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

687671f0 06/07/2008 10:29 PM Justin Ruggles

pass bap table to ff_ac3_bit_alloc_calc_bap()

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

245976da 05/09/2008 11:56 AM Diego Biurrun

Use full path for #includes from another directory.

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

162d4fc9 04/27/2008 10:39 PM Stefano Sabatini

Add long names to AVCodec declarations.
patch by Stefano Sabatini, stefano.sabatini-lala poste it

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

98a6fff9 03/21/2008 03:11 AM Zuxy Meng

Apply 'cold' attribute to init/uninit functions in libavcodec

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

77ab59eb 03/20/2008 07:36 PM Diego Biurrun

two more typos spotted by Mike

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

c2f178da 03/20/2008 07:08 PM Diego Biurrun

british_english--;

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

3f5d7bb3 01/21/2008 12:29 AM Diego Biurrun

Remove two unused variables.

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

a4b375c6 01/21/2008 12:28 AM Diego Biurrun

Remove unnecessary forward declaration.

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

99fac080 01/13/2008 08:33 AM Reimar Döffinger

Get rid of fft_rev table, use ff_reverse and a shift.
Reduces maximum allowed value for MDCT_NBITS to 10 (current value is 9)

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

f952b30c 01/12/2008 05:37 PM Reimar Döffinger

Use FFSWAP instead of "manual" swap

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

3abe5fbd 01/04/2008 11:09 PM Aurelien Jacobs

improve CRC API
- don't export any global var
- provide either generated or hardcoded tables

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

02c164c1 12/28/2007 06:13 AM Justin Ruggles

use cutoff frequency to adjust bandwidth in ac3 encoder

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

08ac1e78 12/28/2007 05:32 AM Justin Ruggles

use bps instead of kbps for bitrate

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

c135b520 12/28/2007 03:12 AM Justin Ruggles

Do not give advice for which bitrate to choose.

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

678a7179 12/28/2007 03:05 AM Justin Ruggles

fix typo

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

e59cc205 12/09/2007 03:27 AM Justin Ruggles

cosmetics: rename common ac3 variables

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

5ce21342 12/09/2007 03:23 AM Justin Ruggles

cosmetics: rename ac3 bit allocation variables

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

66ecf18e 12/09/2007 03:21 AM Justin Ruggles

cosmetics: rename ac3 tables

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

de39d62c 11/27/2007 05:32 AM D Richard Felker III

sync message with modern ffmpeg bitrate option syntax.
note: this message should probably be tweaked; i'm not sure that it's
a good idea for lavc to be recommending ffmpeg command line options
as it's a general-purpose library.

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

d04d5bcd 07/19/2007 08:47 AM Panagiotis Issaris

Fix the self tests which are contained in some codecs and are using random().

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

cc2a8443 07/15/2007 01:31 AM Justin Ruggles

move some common values to ac3.h and utilize them

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

2c124cb6 06/02/2007 01:41 AM Ramiro Polla

Use AV_xx throughout libavcodec

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

d971a5fa 03/22/2007 05:39 AM Justin Ruggles

cosmetics. align and condense.

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

319708da 03/22/2007 05:38 AM Justin Ruggles

simplify

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

bbd16dea 03/22/2007 05:34 AM Justin Ruggles

utilize multi-stage AC-3 bit allocation. speeds up encoding by 25-30%

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

4140a523 03/18/2007 11:18 PM Bill O'Shaughnessy

AC-3 encoded volume is too high. Revert revision 7160:
bring AC3 encoder output up to input volume level
patch by Bill O'Shaughnessy % bill P oshaughnessy A gmail.com %
+ reg tests update gruntwork by me
Original thread:
date: Nov 21, 2006 11:36PM
subject: [Ffmpeg-devel] Simpler Patch to bring AC3 encoder output up to input level...

050aa8b9 03/11/2007 02:13 AM Justin Ruggles

remove redundancy in AC-3 parser by using common tables from ac3tab.h

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

4258a0a3 03/09/2007 01:57 PM Justin Ruggles

Remove common code from AC-3 encoder and utilize ac3.c.

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

abfe5a4a 03/09/2007 03:17 AM Justin Ruggles

simplify AC-3 bit allocation

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

3a8bf529 03/08/2007 11:38 PM Justin Ruggles

cosmetics. remove space before semi-colon.

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

3e954443 11/23/2006 10:21 PM Bill O'Shaughnessy

bring AC3 encoder output up to input volume level
patch by Bill O'Shaughnessy % bill P oshaughnessy A gmail.com %
+ reg tests update gruntwork by me
Original thread:
date: Nov 21, 2006 11:36 PM
subject: [Ffmpeg-devel] Simpler Patch to bring AC3 encoder output up to input level...

486497e0 11/14/2006 03:18 AM Måns Rullgård

revert bad checkin

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

be6ed6ff 11/14/2006 03:12 AM Måns Rullgård

move some CFLAGS settings away from config.* writing section

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

b78e7197 10/07/2006 03:30 PM Diego Biurrun

Change license headers to say 'FFmpeg' instead of 'this program/this library'
and fix GPL/LGPL version mismatches.

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