History | View | Annotate | Download (56.8 KB)
Speed up group minimum and group output calculations for EXP_D25 and EXP_D45in 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
Convert a for() loop into a while() loop for the downward part of the exponentdelta limiting.
Originally committed as revision 26035 to svn://svn.ffmpeg.org/ffmpeg/trunk
Redesign encode_exponents_blk_ch() so that duplicate exponent sets are nolonger required. This gets rid of the temp buffer as well as encoded_exp inAC3EncodeContext. It also allows for skipping the exponent grouping forEXP_D15. 56% faster in encode_exponents_blk_ch()....
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
cosmetics: pretty-printing after last commit
Originally committed as revision 26031 to svn://svn.ffmpeg.org/ffmpeg/trunk
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
Use pre-allocated temp buffers in mdct512().5% faster in function.
Originally committed as revision 26029 to svn://svn.ffmpeg.org/ffmpeg/trunk
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
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
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
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
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
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 useper-block pointers for bap. This is slightly faster (0.3%) in function...
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 memoryusage by 3kB.
Originally committed as revision 26021 to svn://svn.ffmpeg.org/ffmpeg/trunk
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
cosmetics: comment clean-up and misc cosmetics
Originally committed as revision 26019 to svn://svn.ffmpeg.org/ffmpeg/trunk
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
Split bit allocation search into a separate function.
Originally committed as revision 26017 to svn://svn.ffmpeg.org/ffmpeg/trunk
10l: fix typo in compute_exp_strategy()
Originally committed as revision 26013 to svn://svn.ffmpeg.org/ffmpeg/trunk
Move large arrays to AC3EncodeContext rather than passing them around.
Originally committed as revision 26012 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: line wrap and spacing
Originally committed as revision 26011 to svn://svn.ffmpeg.org/ffmpeg/trunk
Use a single value for SNR offset in the bit allocation search rather thanthe separate coarse and fine values.
Originally committed as revision 26010 to svn://svn.ffmpeg.org/ffmpeg/trunk
Change bit_alloc() to return the mantissa bit count.
Originally committed as revision 26009 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: alignment and line wrap after last commit
Originally committed as revision 26008 to svn://svn.ffmpeg.org/ffmpeg/trunk
Move bit counts to AC3EncodeContext.
Originally committed as revision 26007 to svn://svn.ffmpeg.org/ffmpeg/trunk
Split out setting of bit allocation parameters to a separate function.Th new function only needs to be called at initialization because bitallocation parameters currently do not change during encoding.
Originally committed as revision 26003 to svn://svn.ffmpeg.org/ffmpeg/trunk
Split out counting of frame bits into a separate function.
Originally committed as revision 26002 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: vertical alignment
Originally committed as revision 26001 to svn://svn.ffmpeg.org/ffmpeg/trunk
Only calculate num_exp_groups once.
Originally committed as revision 26000 to svn://svn.ffmpeg.org/ffmpeg/trunk
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
Split out grouping of exponents into a separate function.
Originally committed as revision 25998 to svn://svn.ffmpeg.org/ffmpeg/trunk
Split out mantissa quantization into separate functions.
Originally committed as revision 25997 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: rearrange some functions
Originally committed as revision 25996 to svn://svn.ffmpeg.org/ffmpeg/trunk
Reverse the exponent & exponent strategy array arrangement to simplify theper-channel exponent strategy decision. This will also make it easier toplug-in other exponent strategy algorithms.
Originally committed as revision 25995 to svn://svn.ffmpeg.org/ffmpeg/trunk
Move writing of frame to the output bitstream to a separate function.
Originally committed as revision 25994 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: remove a comment and just spacing
Originally committed as revision 25993 to svn://svn.ffmpeg.org/ffmpeg/trunk
Split frame size adjustment into a separate function.
Originally committed as revision 25992 to svn://svn.ffmpeg.org/ffmpeg/trunk
Split exponent processing into separate functions.
Originally committed as revision 25991 to svn://svn.ffmpeg.org/ffmpeg/trunk
Split applying of MDCT into several separate functions.
Originally committed as revision 25990 to svn://svn.ffmpeg.org/ffmpeg/trunk
Split input sample deinterleaving into a separate function.
Originally committed as revision 25989 to svn://svn.ffmpeg.org/ffmpeg/trunk
Separate functionally different calculations in ac3_encode_frame().
Originally committed as revision 25988 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: rename 2 variables
Originally committed as revision 25987 to svn://svn.ffmpeg.org/ffmpeg/trunk
Deinterleave whole frame at once instead of per-block.This reduces the amount of memcpy() by using pointers to overlap samples forsuccessive blocks rather than copying.
Originally committed as revision 25986 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: add & alter some comments
Originally committed as revision 25985 to svn://svn.ffmpeg.org/ffmpeg/trunk
Split setting of bandwidth into a separate function.
Originally committed as revision 25984 to svn://svn.ffmpeg.org/ffmpeg/trunk
Move setting of bitstream_id and bitstream_mode to ac3_encode_init().
Originally committed as revision 25983 to svn://svn.ffmpeg.org/ffmpeg/trunk
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
cosmetics: indent after last commit
Originally committed as revision 25981 to svn://svn.ffmpeg.org/ffmpeg/trunk
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
Remove some duplicate local copies of avctx fields.This is an av_cold function, and we don't need to duplicate variables just tosave a few characters.
Originally committed as revision 25979 to svn://svn.ffmpeg.org/ffmpeg/trunk
Split validation of initial user options into a separate function.
Originally committed as revision 25978 to svn://svn.ffmpeg.org/ffmpeg/trunk
Use bytes instead of 16-bit words for frame size.
Originally committed as revision 25977 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: rename variable 'n' to 'pad_bytes'
Originally committed as revision 25976 to svn://svn.ffmpeg.org/ffmpeg/trunk
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
cosmetics: pretty-printing
Originally committed as revision 25974 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: rename some iterator variables to match what they represent
Originally committed as revision 25973 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: rename a variable for consistency
Originally committed as revision 25972 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: rename exp_samples and global_exp to exp_shift.
Originally committed as revision 25971 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: rename 2 functions
Originally committed as revision 25970 to svn://svn.ffmpeg.org/ffmpeg/trunk
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
Use sizeof(array value) instead of sizeof(int16_t).
Originally committed as revision 25966 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: use lowercase letters for function names
Originally committed as revision 25965 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: add new function documentation and clean up existing documentation
Originally committed as revision 25964 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: add more space between functions
Originally committed as revision 25963 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: rearrange some functions/typedefs/macros
Originally committed as revision 25962 to svn://svn.ffmpeg.org/ffmpeg/trunk
Simplify group size calculation in 2 places.
Originally committed as revision 25961 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: make a switch/case more compact
Originally committed as revision 25960 to svn://svn.ffmpeg.org/ffmpeg/trunk
Clean up fft_init() and mdct_init()
Originally committed as revision 25959 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: pretty-printing, alignment, etc...
Originally committed as revision 25958 to svn://svn.ffmpeg.org/ffmpeg/trunk
Remove unneeded #include
Originally committed as revision 25957 to svn://svn.ffmpeg.org/ffmpeg/trunk
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
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
Split out initialization of MDCT tables into a separate function.
Originally committed as revision 25954 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: Document AC3EncodeContext fields.
Originally committed as revision 25953 to svn://svn.ffmpeg.org/ffmpeg/trunk
Remove unneeded debugging messages.
Originally committed as revision 25952 to svn://svn.ffmpeg.org/ffmpeg/trunk
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
cosmetics: use better (and shared) macro names for some constant values
Originally committed as revision 25950 to svn://svn.ffmpeg.org/ffmpeg/trunk
Remove duplicate AC3EncodeContext fields, sr_shift and sr_code.
Originally committed as revision 25949 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: rename some fields in AC3EncodeContext
Originally committed as revision 25948 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: change all short to int16_t
Originally committed as revision 25947 to svn://svn.ffmpeg.org/ffmpeg/trunk
Change some unsigned types to signed types in AC3EncodeContext
Originally committed as revision 25946 to svn://svn.ffmpeg.org/ffmpeg/trunk
cosmetics: rearrange AC3EncodeContext fields
Originally committed as revision 25945 to svn://svn.ffmpeg.org/ffmpeg/trunk
Use the new libavcore audio channel API.
This also allows to remove a linking dependency of libavfilter onlibavcodec.
Originally committed as revision 25789 to svn://svn.ffmpeg.org/ffmpeg/trunk
Replace deprecated symbols SAMPLE_FMT_* with AV_SAMPLE_FMT_*, and enumSampleFormat with AVSampleFormat.
Originally committed as revision 25730 to svn://svn.ffmpeg.org/ffmpeg/trunk
Use "const" qualifier for pointers that point to input data ofaudio encoders.This is purely for clarity/documentation purposes.
Originally committed as revision 24481 to svn://svn.ffmpeg.org/ffmpeg/trunk
Add av_ prefix to bswap macros
Originally committed as revision 24170 to svn://svn.ffmpeg.org/ffmpeg/trunk
Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if thedocumentation in the @file block refers to a file different from theone the block resides in.
Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
Define AVMediaType enum, and use it instead of enum CodecType, whichis deprecated and will be dropped at the next major bump.
Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
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
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
Change av_log() calls surrounded by '#ifdef DEBUG' into dprintf macros.
Originally committed as revision 19550 to svn://svn.ffmpeg.org/ffmpeg/trunk
ac3enc: log a warning message if the channel layout is not specified atthe time of codec initialization.
Originally committed as revision 18631 to svn://svn.ffmpeg.org/ffmpeg/trunk
Add channel layout support to the AC-3 encoder.
Originally committed as revision 18623 to svn://svn.ffmpeg.org/ffmpeg/trunk
ac3enc: reorder input channels to AC-3 channel order
Originally committed as revision 18540 to svn://svn.ffmpeg.org/ffmpeg/trunk
Rename pbBufPtr() to put_bits_ptr().The new name is more readable and consistent with the FFmpeg namingstyle.
Originally committed as revision 18497 to svn://svn.ffmpeg.org/ffmpeg/trunk
Rename bitstream.h to get_bits.h.
Originally committed as revision 18494 to svn://svn.ffmpeg.org/ffmpeg/trunk
Split bitstream.h, put the bitstream writer stuff in the new fileput_bits.h.
Originally committed as revision 18461 to svn://svn.ffmpeg.org/ffmpeg/trunk
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
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
Use full internal pathname in doxygen @file directives.Otherwise doxygen complains about ambiguous filenames when files existunder the same name in different subdirectories.
Originally committed as revision 16912 to svn://svn.ffmpeg.org/ffmpeg/trunk