summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* Add some simple fallbacks for normal bit allocation failure.Justin Ruggles2010-12-17
| | | | | | | | 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
* Check user-specified cutoff frequency in validate_options().Justin Ruggles2010-12-17
| | | | Originally committed as revision 26049 to svn://svn.ffmpeg.org/ffmpeg/trunk
* 10l: fix encoding for LFE channelJustin Ruggles2010-12-17
| | | | Originally committed as revision 26048 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add support for fixed-point MDCT sizes other than 512.Justin Ruggles2010-12-17
| | | | Originally committed as revision 26046 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: reindent after last commitJustin Ruggles2010-12-17
| | | | Originally committed as revision 26045 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Simplify bit allocation search by using a loop for the SNR offset increment.Justin Ruggles2010-12-17
| | | | Originally committed as revision 26044 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Do not calculate psd and masking curve if exponents are being reused.Justin Ruggles2010-12-17
| | | | | | Approx. 20% faster in function bit_alloc_masking(). Originally committed as revision 26042 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: reindent after last commitJustin Ruggles2010-12-16
| | | | Originally committed as revision 26041 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Copy bap from previous block when exponent strategy is EXP_REUSE.Justin Ruggles2010-12-16
| | | | | | | | | 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
* Count grouped mantissas for each block all at once at the end of bitJustin Ruggles2010-12-16
| | | | | | | 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
* Count bits for fixed parameters at start of encoding rather than in everyJustin Ruggles2010-12-16
| | | | | | frame. Originally committed as revision 26038 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use a LUT for number of exponent groups. This avoids recalculating it forJustin Ruggles2010-12-16
| | | | | | every block and channel for every frame. Originally committed as revision 26037 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Speed up group minimum and group output calculations for EXP_D25 and EXP_D45Justin Ruggles2010-12-16
| | | | | | | 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
* Convert a for() loop into a while() loop for the downward part of the exponentJustin Ruggles2010-12-16
| | | | | | delta limiting. Originally committed as revision 26035 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Redesign encode_exponents_blk_ch() so that duplicate exponent sets are noJustin Ruggles2010-12-16
| | | | | | | | 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
* Use optimized function DSPContext.sad[0]() instead of calc_exp_diff().Justin Ruggles2010-12-16
| | | | | | 90% faster compute_exp_strategy(). Originally committed as revision 26033 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: pretty-printing after last commitJustin Ruggles2010-12-16
| | | | 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().Justin Ruggles2010-12-16
| | | | Originally committed as revision 26030 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use pre-allocated temp buffers in mdct512().Justin Ruggles2010-12-16
| | | | | | 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.Justin Ruggles2010-12-16
| | | | | | 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().Justin Ruggles2010-12-16
| | | | | | 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().Justin Ruggles2010-12-16
| | | | | | 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.Justin Ruggles2010-12-16
| | | | | | 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().Justin Ruggles2010-12-16
| | | | | | 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().Justin Ruggles2010-12-15
| | | | | | | | | 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
* Remove last_samples[] and copy directly from planar_samples[].Justin Ruggles2010-12-15
| | | | | | | | 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
* Remove unneeded line. key_frame is already set to 1 in avcodec_alloc_frame().Justin Ruggles2010-12-15
| | | | Originally committed as revision 26020 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: comment clean-up and misc cosmeticsJustin Ruggles2010-12-15
| | | | 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.Justin Ruggles2010-12-15
| | | | Originally committed as revision 26018 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Split bit allocation search into a separate function.Justin Ruggles2010-12-15
| | | | Originally committed as revision 26017 to svn://svn.ffmpeg.org/ffmpeg/trunk
* SVQ3: Allow decoding if thread_count is > 1Alexander Strange2010-12-15
| | | | | | | 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
* 10l: fix typo in compute_exp_strategy()Justin Ruggles2010-12-14
| | | | Originally committed as revision 26013 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move large arrays to AC3EncodeContext rather than passing them around.Justin Ruggles2010-12-14
| | | | Originally committed as revision 26012 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: line wrap and spacingJustin Ruggles2010-12-14
| | | | 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 thanJustin Ruggles2010-12-14
| | | | | | the 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.Justin Ruggles2010-12-14
| | | | Originally committed as revision 26009 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: alignment and line wrap after last commitJustin Ruggles2010-12-14
| | | | Originally committed as revision 26008 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move bit counts to AC3EncodeContext.Justin Ruggles2010-12-14
| | | | Originally committed as revision 26007 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Split out setting of bit allocation parameters to a separate function.Justin Ruggles2010-12-14
| | | | | | | 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
* Split out counting of frame bits into a separate function.Justin Ruggles2010-12-14
| | | | Originally committed as revision 26002 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: vertical alignmentJustin Ruggles2010-12-14
| | | | Originally committed as revision 26001 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Only calculate num_exp_groups once.Justin Ruggles2010-12-14
| | | | Originally committed as revision 26000 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Check for bit allocation error in ac3_encode_frame().Justin Ruggles2010-12-14
| | | | | | 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.Justin Ruggles2010-12-14
| | | | Originally committed as revision 25998 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Split out mantissa quantization into separate functions.Justin Ruggles2010-12-14
| | | | Originally committed as revision 25997 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: rearrange some functionsJustin Ruggles2010-12-14
| | | | Originally committed as revision 25996 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Reverse the exponent & exponent strategy array arrangement to simplify theJustin Ruggles2010-12-14
| | | | | | | 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
* Move writing of frame to the output bitstream to a separate function.Justin Ruggles2010-12-14
| | | | Originally committed as revision 25994 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: remove a comment and just spacingJustin Ruggles2010-12-14
| | | | Originally committed as revision 25993 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Split frame size adjustment into a separate function.Justin Ruggles2010-12-14
| | | | Originally committed as revision 25992 to svn://svn.ffmpeg.org/ffmpeg/trunk