AC3Filter ver 0.53b

Russian version
Download.


    AC3Filter - it is DirectShow filter for AC3 decoding. Playing .AVI with AC3 audio tracks and MPEG2 (DVD). Distributed absolutely for free (FREEWARE). Sorry if my English is bad, but I think it is better to have something than nothing.

Main features:



Contents



Download.

New versions can be found at site:
http://xvalex.hotbox.ru/download/ac3filter

ac3filter ver 0.53b
http://xvalex.hotbox.ru/download/ac3filter_0_53b.zip - binary
http://xvalex.hotbox.ru/download/ac3filter_0_53b_debug.zip  - debug version
http://xvalex.hotbox.ru/download/ac3filter_0_53b_src.zip  - sources

ac3filter ver 0.52b

http://xvalex.hotbox.ru/download/ac3filter_0_52b.zip

ac3filter ver 0.51b
http://xvalex.hotbox.ru/download/ac3filter_0_51b.zip

ac3filter ver 0.5b
http://xvalex.hotbox.ru/download/ac3filter_0_5b.zip

ac3filter ver 0.3a
http://xvalex.hotbox.ru/download/ac3filter_0_3a.zip



Install.

    Nothing is required, just register it. From command line:
x:\somedir\> regsvr32 ac3filter.ax

    Ñommand file - install.bat. It will copy filter to System32 catalog (System for Win9x) and register it.



Uninstall.

    If registred from command line unregister it from command line too:
x:\somedir\> regsvr32 ac3filter.ax /u

    Ñommand file - uninstall.bat. It will unregister and delete filter from System32 catalog (System for Win9x).

    Filter save its settings in registry at [HKEY_CURRENT_USER\Software\AC3Filter], to delete it import uninstall.reg file.



Usage.

    Filter decode ac3 streams from .avi and mpeg2 files. If everything is good then when file is open filter must be in application filter list. For Windows Media Player 6.4 filter list is at File->Properties->Advanced:

 

First in this example is ac3filter itself. If we open properties we'll see:

   

Main settings

* Bitstream information.

    Top left it is bitstream information (BSI):

* Speaker configuration switch.

    Left bottom it is an output speaker configuration switch. It define the real speaker configuration to wich ac3 channels will be mixed. Checkbox Subwoofer define presence of independent subwoofer (.1 channel). When present LFE is routed there, else LFE is routed to all other channels. (In future I plan to route low frequeces from all channels to subwoofer).

* Gain levels.

    Buttom middle it is gain level controls.     Master and Gain controls are responsible for global gain level. Master sets desired gain level. If current sound level is too high and overflow occurs then real gain level will decrease. Current gain level shown at Gain control.

* Dynamic range compression.

    By its nature ac3 is a logarithmic format. Samples are stored in form of exponents and mantissas. In terms of bits one sample can be up to 40bits long (only theoretically) or up to 24bits (normal). It provide huge dynamic range (but, as said by great Einstein all good things in this word are relative :-). This means that quiet sound with low level when played on 16-bit sound card will be not audible at all or will have very low absolute level (=> high distortions). To solve this problem it is dynamic range comression. Main idea is to raise level when sound is quiet (and vice versa when loud) before converting to 16-bit form. There are special markers in ac3 stream for current level change. This markers are set by producer at a mastering stage, so it guarantees high quality. DRC level indicates this level. With 'Use DRC' chekbox  you can enabe/disable using DRC. (of course this is only rough problem description).

    DRC Power control adjusts how much DRC level changes sound level. When DRC Power is increased all quiet sounds will be more stressed and loud sound will be more shaded. When decrease DRC Power dynamic range compression will have less influence at output. Zero DRC Power level means that dynamic range compression applied at normal.

* CPU load.

    Indicates CPU load by sound decoding and processing. All sound processing (if exists) before reproduction included here.

* Input/output levels.

    Right part - levels indication. Note that levels here are in logarithmic scale. Input levels shows real channels configuration. Often happens that when BSI shows 5.1 in real LFE channel is absent.


Mixer settings

    Second page is mixer settings.

 

    Main control here is mixing matrix. It is in form of matrix multiplication: S' = M S, where S = { L, C, R, SL, SR, LFE } - input sample, S' = { L', C', R', SL', SR', LFE' } - output sample.

    For convenience some controls from Main page are placed here. For its description look at Main settings.

    Settings description:
    Combo-box allows to save and load saved matrices.



Setup.


Speaker configuration.


    When started filter checks for current speaker configuration for downmix. It uses settings from Control Panel->Sounds and Multimedia->Audio->Sound Playback->Advanced->Speaker Setup. (For SB Live! users. When change speaker configuration from Surround Mixer it is not always change in Control Panel. So it is always good to check there.). For Win9x/WinNT use 2-channel mode.

    Change speaker configuration  'in place' possible only in certain cases. First, file playing must be stopped (not paused!). Second, all intermediate audio filters must support dynamic reconfiguring (format change without full graph rebuild). So if you cannot set output configuration here you need to set it in Control Panel.

    In most cases problems are because of mmswitch filter (filter that support .avi (and DVDs too) with several audio tracks and allow to switch between, especially for multi-language films). If you mainly watch DVDs it is better to uninstall this filter and use MPEG2 parser wich support stream switching directly (standart MPEG2 Splitter for example). In this case you'll also get lower CPU usage. If MPEG2 parser does not support stream switching (Elecard for example) then many audio rendering chains created, all of them are working together when only one really reproducing.

    If mmswitch is really needed then it is several possibilities:

Configuration advices

* General

* Maximum standart compatibility

    Recommended in all cases.

* One-pass normalization.

    To play at maximum loudness.

Registry.

    Filter saves its state in registry key: [HKEY_CURRENT_USER\Software\AC3Filter]. 'preset' key contain different keys for each set of settings (preset). When filter is loading '_deafult' preset is always loaded, when filter is unloading all settings are saved there. Registry values:
    Mixing matrices are stored in 'matrix' key. Each sub-key contains only one matrix. When filter is loading '_default' matrix is always loaded, when filter is unloading current matrix is saved there. Matrix values called next way: [from_channel]_[to_channel], where from_channel is mixed to to_channel with factor given in value.

    All levels are stored in factor form (not dB).

    To reset all settings to default import reset.reg file. This will delete '_default' preset and '_default' matrix.



Misc.

    I want to say thanks to Marcello Mota for support and big help in hard work of debugging and testing.

    Filter was primarily based on Open Source LibA/52 library (http://liba52.sourceforge.net) and mainly inherits its characteristics. Much was rewritten but I tried to keep its merits. I want to note high quality of this lib and high compliance with standart (http://www.atsc.org/standards/a_52a.pdf).

    For multichannel format reproduction according to Microsoft recomendations (http://www.microsoft.com/hwdev/tech/audio/multichaudP.asp) WAVE_FORMAT_EXTENSIBLE is used. In theory it may work in any Winodws version. But I didn't make it work with Win98/SB Live! with more than stereo. You can try, especially if you have other sound card. If anybody know how to play multichannel audio under W9x/NT please let me know how.



Distribution.

    This program distributed under GNU General Public Licence v2, placed in GNU_eng.txt at english language and GNU_rus.txt at russian language. Russain language version is only for information purpose only and english version have priority with all variant reading.

    This application may solely be used for demonstration and educational purposes. Any other use may be prohibited by law in some coutries. The author has no liability regarding this application whatsoever. This application may be distributed freely unless prohibited by law.

    This product distributed in hope it may be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose and compliance with any standarts. I do not guarantee 24-hour (and any) support, bug correction, repair of lost data, I am not responsible for broken hardware and lost working time. I am not responsible for legality of reproducted with this program multimedia production.



Contact author.

    With all questions about this program please, email to this address.  Please, respond about all errors in porgram. If something wrong with this program and you want to help with debug download debug version: http://xvalex.hotbox.ru/download/ac3filter_0_53b_debug.zip. It is debug.reg file you need to import. Then open file that causes the problem. It is c:\ac3filter.log file will  be created. Please, send it with following information:
    This will help me a much in fixing this bug.


Changelog.

0.53b - 14.09.2002
  ! Filter is distributed under GPL lisence now.
  + save settings to registy.
  + mixer control page with mixer matrix added.
  * LFE channel is now mixed only to front speakers.
  * 'Normalize' checkbox on main page means now one-pass normalization.

0.52b - 01.09.2002

  + Bug fixed - hang on corrupted PES streams.
  + Sound volume increased.
  + Overflow control and automatic gain control added.
  + Master gain control added.
  + DRC power control added.

0.51b - 18.07.2002

  + Bug fixed (crash on some ac3 formats)

0.5a - 07.07.2002

  * AC3 decoder code was fully rewritten
  + PES support added.
  + Levels for LFE, Surround and Voice locked to BSI by default.
  + CPU usage indicator
  + Input and output levels inidicators.
  + DRC level indicator.
  + Some information about stream added.
  + Some bug fixes.


0.4a
- 23.06.2002

  + LFE support and LFE gain added.
  + Added buttons for reset all gains to BSI values.
  + Stereo now transmitted in standart format, so now filter can work
    with sustems with no multi-channel support (Win9x/WinNT).
  + DVD decoding added.
  + Syncronization problem fixed.
  + Option to enable/disable dynamic range compression added.

0.3a - 03.04.2002

  + Volume gain for central (voice) and surround channels.
  + Speaker configuration change support added. Only works when
    all intermediate filters support dynamic reconfiguring and only
    in stopped (not paused!) state.

0.2a - 01.04.2002

  * LibA52 code was rewritten for multitasing, so now possible to
    create many instances of the filter in a filtergraph. It is primary
    used for multi-language films.
  + Information panel added (but settings are not working now).

0.1a - first working alfa



Useful links


AC3Filter site (rus+eng): (http://xvalex.hotbox.ru/download/ac3filter)

A/52a standart (AC3) (eng): (http://www.atsc.org/standards/a_52a.pdf).
LibA52 library (was ac3dec) (eng):  (http://liba52.sourceforge.net).
Multichannel audio reproduction at Windows (eng): (http://www.microsoft.com/hwdev/tech/audio/multichaudP.asp).
Just useful video-related site (eng): (http://www.doom9.org).
And one more (rus): (http://freetime.sinor.ru/observatory/digitalvideo).



Copyright (c) 2002 by Vigovsky Alexander.
Last updated 14.09.2002