I thought I would take a minute to discuss some of the improvements I'm currently working on.
First, I have completed a basic implementation of channel coupling. The AC-3 format has the capability to merge all or selected channels in certain frequency ranges. Only a small amount of side information is transmitted for individual channel differences in those ranges. The format allows for very detailed control of this coupling on a per-block and per-channel level. The implementation I've done at this point is only a very simple starting point using a couple of fixed strategies based on samples from commercial DVD's. The plan is to eventually have Aften dynamically adjust the strategy based on the required compression needed for each frame.
Second, most of the work has been completed on a psychoacoustic model. AC-3 actually has its own simple psychoacoustic model built-in to the specification, but also provides the capability to adjust the results of the built-in model. This allows a more sophisticated model to be run in parallel in order to generate more accurate bit allocation results. At this point, I have simply adapted the MPEG Psychoacoustic Model I, as implemented in the twolame mp2 encoder, to the integer log-power measurement and critical band structure used in the AC-3 bit allocation process. The information generated by this model is used to select the fast gain codes which are used in the AC-3 bit allocation. I am now working on trying to utilize the results for delta bit allocation (adjustments to the masking threshold) as well.
The inclusion of these features will probably not be done for at least a month or two, but I will post patches of works-in-progress against the upcoming version 0.06 to Aften-devel for testing purposes.
Monday, January 08, 2007
I've implemented and committed a new algorithm for the selection of exponent strategies. The old method was from FFmpeg. It compared the difference between exponents from one block to the next and selected exponent strategy for each block using a threshold. The new method selects between 5 predefined sets of strategies for the whole frame. All 5 use the same number of exponent bits. The selection is done by comparing the original exponents to each set of encoded exponents and choosing the set with the smallest deviation from the original.