Log in

View Full Version : Aften 0.0.8 is out


Pages : 1 [2] 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

tebasuna51
20th July 2006, 11:18
AFAIK, there are three places to enable the DRC : DD encoding time, DD decoding time and decoded PCM DRC solutions(AC3filter..)
I am not sure how much these DD encoding/decoding time DRC(film, music, speech...) are related : actual range alteration in encoding time or just setting the desired DRC option tag info. I hope somebody put some clarification on this...
DRC at encoding time
For each block (256 audio samples, 5.33 ms. if 48 KHz) in ac3 stream there are:
(from ATSC Standard: Digital Audio Compression (AC-3), Revision A (http://www.dolby.com.cn/gb/assets/pdf/tech_library/a_52a.pdf))
5.4.3.3 dynrnge:-Dynamic range gain word exists, 1 bit
If this bit is a 1, the dynamic range gain word follows in the bit stream.

5.4.3.4 dynrng: Dynamic range gain word, 8 bits
This encoder-generated gain word is applied to scale the reproduced audio as described in Section 7.7.1.
The solution for free encoders is set always dynrnge = 0 (DRC = None). Commercial encoders can calculate the appropriate value for dynrng byte for each block, in function of selected DRC (film, music, ...)

DRC at decoding time
A decoder can offer to the user:
a) Ignore the DRC info in ac3 stream and apply, or not, a new DRC analyzing the signal (Ac3Filter).
b) Accept the DRC info in ac3 stream and:
b1) Apply the full dynamic range (Azid-none, NicAc3Source(), PowerDVD-Quiet)
b2) Apply the DRC encoder-calculated (ffdshow, Azid-normal, NicAc3Source(DRC), PowerDVD-Normal)
b3) Modify the DRC encoder-calculated (Azid-Light, Azid-Heavy, PowerDVD-Noisy)

If an ac3 don't have DRC info (DRC=none, free encoders), b1) = b2) and the ac3 is always reproduced at full dynamic range in players without specifics DRC algorithms.

jruggle
20th July 2006, 14:40
Aften 0.03 has been released.

I forgot to mention that I changed the VBR and auto-bandwidth settings as well. Default quality is now 220 instead of 200. Also, bandwidth is not reduced quite as much as it was before.

-Justin

Rockaria
20th July 2006, 17:10
@tebasuna, that seems to be the (almost) complete explanation on the existing DRC solutions, and thanks for the link.:goodpost:
The DD encoding time dynrnge/dynrng values do not seem to be the actual range alteration but the desired/calculated level appliable and adjustable in decoding time. In the '7.7 Dynamic Range Compression' section of the same document :
...While this satisfies the needs of much of the audience, it removes the ability of some in the audience to experience the original sound program in its intended form. The AC-3 audio coding technology solves this conflict by allowing dynamic range control values to be placed into the AC-3 bit stream.
The dynamic range control values, dynrng, indicate a gain change to be applied in the decoder in order to implement dynamic range compression. Each dynrng value can indicate a gain change of ±24 dB. The sequence of dynrng values are a compression control signal. An AC-3 encoder (or a bit stream processor) will generate the sequence of dynrng values. Each value is used by the AC-3 decoder to alter the gain of one or more audio blocks....One of my h/w receivers has the DRC option (0.0/1.0/0.5 : I guess none/full/light) manually adjustable. The other has no control, maybe FULL.

So this original DD DRC option seems not as flexible as that of the AC3Filter but still must be a necessary option for those who have the H/W receivers(no s/w ac3filter) and not so quite listening environment but wish not to miss the details at the cost of the reduction of the scale(range)...
Like DPL II, this FULLY considered DRC is regarded as a must option to some while none of the interest to others(like DD EX to me atm).;)

tebasuna51
20th July 2006, 18:31
Hello,
Aften 0.03 has been released.

Aften now supports 8/16/24/32/float/double for wav input.
Also, I added a more complete channel remapping.

I think this can improve WAVE_FORMAT_EXTENSIBLE, at wav.c line 101:
...
wf->bit_width = read2le(fp);
wf->filepos += 2;
if(wf->bit_width == 0) return -1;
chunksize -= 16;
// WAVE_FORMAT_EXTENSIBLE data
int chmask = 7;
if(wf->format == WAVE_FORMAT_EXTENSIBLE && chunksize > 0) {
// chmask isn't after bit_width, before there are CbSize and ValidBitsPerSample (4 bytes)
read4le(fp);
wf->filepos += 4;
// Now ChMask
chmask = read4le(fp);
wf->filepos += 4;
// And now we can read the SubFormat valid if WAVE_FORMAT_PCM or WAVE_FORMAT_IEEEFLOAT
wf->format = read2le(fp);
wf->filepos += 2;
chunksize -= 10;
}
// determine channel mode
if(wf->channels == 1) {
wf->ch_mode = CH_MODE_1_0;
} else if(wf->channels == 2) {
wf->ch_mode = CH_MODE_2_0;
} else if(wf->channels == 3) {
if(chmask & 0x7) wf->ch_mode = CH_MODE_3_0;
else wf->ch_mode = CH_MODE_2_1;
} else if(wf->channels == 4) {
if(chmask & 0x7) wf->ch_mode = CH_MODE_3_1;
else wf->ch_mode = CH_MODE_2_2;
} else if(wf->channels == 5) {
wf->ch_mode = CH_MODE_3_2;
} else if(wf->channels == 6) {
wf->ch_mode = CH_MODE_3_2_1;
} else {
wf->ch_mode = CH_MODE_OTHER;
}

jruggle
20th July 2006, 20:21
Thank you! It seems I read through the specs a little too quickly. Your changes have been applied to the current development version.

-Justin

NorthPole
21st July 2006, 03:57
Aften 0.03 has been released.
Aften now supports 8/16/24/32/float/double for wav input.
Also, I added a more complete channel remapping.


Thanks Justin for your work! Works good so far.

Mug Funky
21st July 2006, 04:02
i'm trying out this version:
http://forum.doom9.org/showthread.php?p=853847#post853847

CBR appears broken? i type in -b 224 and it says "error initialising encoder". that might be my fault though.

also, it seems that when a very high -q is selected (400), it'll refuse give this error a lot:

Error encoding frame xxxx
bitrate: 640 kbps too small

it seems this would be simple to fix?

i'm watching this encoder :) thanks for developing it.

[edit]

oh, i forgot: P4 with hyperthreading

jruggle
21st July 2006, 04:28
i'm trying out this version:
http://forum.doom9.org/showthread.php?p=853847#post853847

CBR appears broken? i type in -b 224 and it says "error initialising encoder". that might be my fault though.
The bitrate needs to be specified in bps, not kbps. So you need to use "-b 224000".


also, it seems that when a very high -q is selected (400), it'll refuse give this error a lot:

Error encoding frame xxxx
bitrate: 640 kbps too small

it seems this would be simple to fix?
I fixed this earlier today, so the current development version should work. Now it will continue lowering the quality for each frame to values below the selected quality until the data fits in a 640kbps frame. Before it was returning an error instead of going below the requested quality setting.

-Justin

Mug Funky
21st July 2006, 05:57
haha! sweet. i read the bitrate thing earlier in the thread, but it didn't occur to me :(

thanks for the quick reply.

guada2
21st July 2006, 17:28
Great job Kurtnoise13 :)

Just 2 questions:
* nero show time 2 information: 2.1 (Why?)
* Media player classic: 6.1 (Right)

Vlc doesn't play your file ac3, your opinion ?

Bye.

SeeMoreDigital
21st July 2006, 18:34
Great job Kurtnoise13 :)

Vlc doesn't play your file ac3, your opinion ?Personally speaking I've never been able to set-up VLC player to correctly output AC3 sources to my external DSS amplifier :eek:

guada2
21st July 2006, 22:30
Hey SMD,

It is just a report, only that....
I suppose that you understand...

Thanks.

Kurtnoise
22nd July 2006, 00:38
Just 2 questions:
* nero show time 2 information: 2.1 (Why?)
In Options Settings --> Audio --> Use 6 speakers.

Vlc doesn't play your file ac3, your opinion ?
It does...During the playback, you are able to change the device (switch stereo to 5.1).

Chainmax
22nd July 2006, 01:21
This one keeps looking better and better, Scenarist's and Vegas's AC3 encoders had better watch their backs :).

jruggle: do you think sometime in the future Dibrom and Aoyumi could help implement some of LAME's and aoTuV's features if such a thing is feasible at all?

tebasuna51
22nd July 2006, 03:03
@jruggle
Tested aften v0.03 and work for 8/16/24/32 bits int and float, only float WAVE_FORMAT_EXTENSIBLE wait for a new version (corrected in current sources).

Only one more thing: the test to select CH_MODE_3_0 or CH_MODE_3_1 (center channel present) must be (chmask & 0x4) instead (chmask & 0x7).

Thanks.

jruggle
22nd July 2006, 03:50
This one keeps looking better and better, Scenarist's and Vegas's AC3 encoders had better watch their backs :).
I wasn't really aware of either of these. I googled them to find they are commercial software. I probably have quite far to go before catching up. And now with E-AC3/DDP on the horizon I'll have to work double-fast. ;) I really need to do more extensive studies of commercially-generated AC3 files so I can better optimize Aften. My first attempt at channel coupling about 6 months ago was not successful, but I hope the 2nd attempt will work.

jruggle: do you think sometime in the future Dibrom and Aoyumi could help implement some of LAME's and aoTuV's features if such a thing is feasible at all?
Well...as far as aoTuV...I don't think it applies. I might be wrong though. AC3 has a very specific psycho-acoustic model which uses an algorithm which is pretty tightly tied to the format. There may be some overlap in the concepts though. Right now I am just using the basic settings recommended by the spec.

The one feature which LAME has that I hope to understand better once I get into it is ABR encoding. I know the concepts, but not the nitty-gritty of it. I'll just have to do some research. I want to do several other things before I dive into that though.

Only one more thing: the test to select CH_MODE_3_0 or CH_MODE_3_1 (center channel present) must be (chmask & 0x4) instead (chmask & 0x7).
Doing (chmask & 0x7) checks for the presence of left, right, and center all at once...either way works though. I'm going to be changing this to a more robust solution which checks to make sure the channel configuration is even supported in AC3 instead of assuming which channels are there.

I do have a related question. I'm fairly new to surround encoding...so I'm not 100% sure about which mask values correspond to surround, left-surround, and right-surround. I know someone here will have a definite answer. :) Here is the list of channels for reference.


#define SPEAKER_FRONT_LEFT 0x1
#define SPEAKER_FRONT_RIGHT 0x2
#define SPEAKER_FRONT_CENTER 0x4
#define SPEAKER_LOW_FREQUENCY 0x8
#define SPEAKER_BACK_LEFT 0x10
#define SPEAKER_BACK_RIGHT 0x20
#define SPEAKER_FRONT_LEFT_OF_CENTER 0x40
#define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
#define SPEAKER_BACK_CENTER 0x100
#define SPEAKER_SIDE_LEFT 0x200
#define SPEAKER_SIDE_RIGHT 0x400
#define SPEAKER_TOP_CENTER 0x800
#define SPEAKER_TOP_FRONT_LEFT 0x1000
#define SPEAKER_TOP_FRONT_CENTER 0x2000
#define SPEAKER_TOP_FRONT_RIGHT 0x4000
#define SPEAKER_TOP_BACK_LEFT 0x8000
#define SPEAKER_TOP_BACK_CENTER 0x10000
#define SPEAKER_TOP_BACK_RIGHT 0x20000
#define SPEAKER_RESERVED 0x80000000


Thanks,
-Justin

jruggle
22nd July 2006, 04:43
I'm adding stuff to Aften so quickly I feel like I need a development blog so I can stop posting here so often. ;) On the road to implementing DRC, I have made a little utility which calculates RMS. It also does something very similar to replaygain (but not exactly identical) to make a better dialog normalization guess than average RMS. It needs much more testing, but seems to work well so far.

The file is wavrms.c, and it is in the aften/util source directory of the lastest development version.

tebasuna51
22nd July 2006, 12:52
I do have a related question. I'm fairly new to surround encoding...so I'm not 100% sure about which mask values correspond to surround, left-surround, and right-surround. I know someone here will have a definite answer. :) Here is the list of channels for reference.
100% sure about:
#define SPEAKER_BACK_LEFT 0x10 = Left-surround = SL = BL
#define SPEAKER_BACK_RIGHT 0x20 = Right-surround = SR = BR

I never see a sample WAVE_FORMAT_EXTENSIBLE with Surround channel, maybe:
#define SPEAKER_BACK_CENTER 0x100 = Surround = S = BC

Then:
CH_MODE_3_0 (L,R,C) -> chmask = 0x0007
CH_MODE_2_1 (L,R,S) -> chmask = 0x0103

CH_MODE_3_1 (L,R,C,S) -> chmask = 0x0107
CH_MODE_2_2 (L,R,SL,SR) -> chmask = 0x0033

(chmask & 0x7) is always True with the four chmask, maybe you need ((chmask & 0x7) == 7) or (chmask & 0x4) to select the appropriate acmod.

jruggle
22nd July 2006, 16:33
100% sure about:
#define SPEAKER_BACK_LEFT 0x10 = Left-surround = SL = BL
#define SPEAKER_BACK_RIGHT 0x20 = Right-surround = SR = BR

I never see a sample WAVE_FORMAT_EXTENSIBLE with Surround channel, maybe:
#define SPEAKER_BACK_CENTER 0x100 = Surround = S = BC

Thanks tebasuna51. I have updated Aften to do a more thorough check of chmask to make sure the channel layout is AC3-compatible. I also separated the AC3-specific code from the WAV parser.

-Justin

Rockaria
22nd July 2006, 20:49
which mask values correspond to surround, left-surround, and right-surround.
wavinfo : http://www.soundslogical.com/support/mpacks/documentation/english/documentparts/wavinfo.html
chnmsk2spkrlist : http://www.soundslogical.com/support/mpacks/documentation/english/documentparts/chnmsk2spkrlist.html
...
"5.1 Surround Sound Format":
Channel order:Front Left, Front Right, Front Center, Low Frequency, Side Left, Side Right
ChannelMask (binary):'11000001111'
(hexadecimal):'60F'
(decimal):1551
...

Other wiki external links : http://en.wikipedia.org/wiki/Wav

tebasuna51
23rd July 2006, 13:11
"5.1 Surround Sound Format":
Channel order:Front Left, Front Right, Front Center, Low Frequency, Side Left, Side Right
ChannelMask:'60F'
...
Maybe there are differents opinions.
The only decoder I know with output WAVE_FORMAT_EXTENSIBLE is faad and use ChannelMask 0x3F with this info:
---------------------
| Config: 5.1 Ch | WARNING: channels are reordered according to
--------------------- MS defaults defined in WAVE_FORMAT_EXTENSIBLE
| Ch | Position |
---------------------
| 00 | Center front |
| 01 | Left front |
| 02 | Right front |
| 03 | Left back |
| 04 | Right back |
| 05 | LFE |
---------------------
Maybe to avoid problems not related with ac3 encoding we may use this more simple:
// Determine acmod and lfe from WAVE_FORMAT_EXTENSIBLE channel mask
static void wav_mask_to_acmod(int ch, int chmask, int *acmod, int *lfe)
{
*lfe = !!(chmask & 0x08);
if(*lfe) {
ch--;
}
*acmod = 7;
if(ch == 1) {
*acmod = 1;
} else if(ch == 2) {
*acmod = 2;
} else if(ch == 3) {
*acmod = 4;
if(chmask & 0x4) *acmod = 3;
} else if(ch == 4) {
*acmod = 6;
if(chmask & 0x4) *acmod = 5;
}
}
Now default is acmod = 7 (open for future ch > 6), and the ambiguous ch 3 or 4 are selected only with the test over the center channel.

Ebobtron
23rd July 2006, 13:53
---------------------
| Config: 5.1 Ch | WARNING: channels are reordered according to
--------------------- MS defaults defined in WAVE_FORMAT_EXTENSIBLE
| Ch | Position |
---------------------
| 00 | Center front |
| 01 | Left front |
| 02 | Right front |
| 03 | Left back |
| 04 | Right back |
| 05 | LFE |
---------------------

I found this recently, MS still offers this link in the PSDK concerning WAVE_FORMAT_EXTENSIBLE
http://www.microsoft.com/whdc/device/audio/multichaud.mspx
To quote the link from Microsoft listed above.
Default Channel Ordering
The way to deterministically link channel numbers to speaker locations, thus providing consistency among multiple channel audio files, is to define the order in which the channels are laid out in the audio file. Several external standards define parts of the following master channel layout:

1. Front Left - FL
2. Front Right - FR
3. Front Center - FC
4. Low Frequency - LF
5. Back Left - BL
6. Back Right - BR
7. Front Left of Center - FLC
8. Front Right of Center - FRC
9. Back Center - BC
10. Side Left - SL
11. Side Right - SR
12. Top Center - TC
13. Top Front Left - TFL
14. Top Front Center - TFC
15. Top Front Right - TFR
16. Top Back Left - TBL
17. Top Back Center - TBC
18. Top Back Right - TBR

So far all of the research that I have done seems to support the above list for all wave formats.

tebasuna51
23rd July 2006, 17:26
So far all of the research that I have done seems to support the above list for all wave formats.
Yes, of course, the faad wav output have the correct order:
1. Front Left - FL
2. Front Right - FR
3. Front Center - FC
4. Low Frequency - LF
5. Back Left - BL
6. Back Right - BR

The discussion is:
a) soundslogical proposal:
5.1 Surround Sound Format:
Channel order:FL, FR, FC, LF, Side Left, Side Right
ChannelMask:'60F'
b) faad proposal:
5.1 Ch:
Channel order:FL, FR, FC, LF, Back Left, Back Right
ChannelMask:'3F'

guada2
23rd July 2006, 17:37
@Kurtnoise,
Nero OK, But for VLC ?????

I use the latest VLC (0.85), and i didn't found nothing about in your explanation in this version.
It does...During the playback, you are able to change the device (switch stereo to 5.1).

It is not important, but i'm curious.
Could you precise more please.
:thanks:

Kurtnoise
23rd July 2006, 18:04
http://img100.imageshack.us/img100/5476/vlcaudiodevicexc2.png

SeeMoreDigital
23rd July 2006, 18:46
http://img100.imageshack.us/img100/5476/vlcaudiodevicexc2.pngSadly for me though, VLC's "A/52 over S/PDIF" option outputs corrupted bit-streams that my DSS amp can't decode :(

But don't panic.... because this happens with all my AC3 sources, regardless of the encoder used to generate them...


Cheers

Rockaria
23rd July 2006, 19:28
VLC's "A/52 over S/PDIF" option outputs corrupted bit-streams that my DSS amp can't decode
That's very true for me too who also completly forgot playing(decoding) through the the analog 5.1ch speaker.;)
But iirc when I feed the 48khz-16~24bit sources(anyhow), it satisfies the codec(spdif-out) to sync with the external decoder.


Several external standards have been compiled by Microsoft into the following default channel ordering list:
And now we see different examples(suggestions, opinions, proposals) on the rear surround 2 channels from 5.x ch formats.
. ms, faad : BL, BR which are also used in quad
. soundlogic : seems starting to reflect the actual/effective speaker locations

Upto 5.1, there would be no problem in extracting the two rears whether they have more resonable names or not, by the physical channels imbeded orders : FL,FR,C,LFE, (BL, BR) | (SL, SR)

But in soundlogic's examples from 6.1ch, the listed channel orders start to differ from the actual imbeded channel orders. Maybe we need some optional remappings to extract correct channels practically:
6.1ch : ,,,, Side Left, Side Right, Back Center -> ,,,, BC, SL, SR
7.1ch : ,,,, Side Left, Side Right, Back Left, Back Right -> ,,,, BL, BR, SL, SR

In my opinion, because the WAVE_FORMAT_EXTENSIBLE is defined so clear about the orders of the extra (surround) channels, it can replace the WAVE_FORMAT_PCM to be used for the decoded PCM channel orders, but may require the remappings like above practically for the differently imbeded WAVE_FORMAT_EXTENSIBLE over 5.1ch by the ChannelMask and possibly with some other info.

vlada
23rd July 2006, 23:12
I have one simple question: does the encoder support pipes? I want to use Aften in foobar2000 where it would be very useful. From what I tried it doesen't work. The problem is, that sometimes you can't create an intermediate WAV file, because it would exceed a 4 GB WAV limit.

Also it would be useful to implement SSRC sample rate conversion and force a 48 kHz resampling if needed. foobar2000 can force output to 16 bit but not 48 kHz AFAIK.

Edit: Resampling can be done using foobar's DSP processing.

jruggle
24th July 2006, 00:31
b) faad proposal:
5.1 Ch:
Channel order:FL, FR, FC, LF, Back Left, Back Right
ChannelMask:'3F'
a52dec (liba52) also uses 0x3F as the channel mask for 6-channel wav output.

Maybe to avoid problems not related with ac3 encoding we may use this more simple:

// Determine acmod and lfe from WAVE_FORMAT_EXTENSIBLE channel mask
static void wav_mask_to_acmod(int ch, int chmask, int *acmod, int *lfe)
{
*lfe = !!(chmask & 0x08);
if(*lfe) {
ch--;
}
*acmod = 7;
if(ch == 1) {
*acmod = 1;
} else if(ch == 2) {
*acmod = 2;
} else if(ch == 3) {
*acmod = 4;
if(chmask & 0x4) *acmod = 3;
} else if(ch == 4) {
*acmod = 6;
if(chmask & 0x4) *acmod = 5;
}
}


Normally I tend to favor solutions which don't cater to incorrect ways of doing things, as it only perptuates the problem. In this case, I think it is better to check all the mask values instead of assuming that the correct channel-to-speaker mapping exists. Are there other sources besides soundlogic which produce 5.1 wavs with a channel mask other than 0x3F? If not I'm leaning toward a more strict solution. Or maybe explicitly checking for either of the 2 ways, back or side. I'd rather not leave it open for any configuration with X number of channels. Comments?

-Justin

jruggle
24th July 2006, 00:41
I have one simple question: does the encoder support pipes? I want to use Aften in foobar2000 where it would be very useful. From what I tried it doesen't work. The problem is, that sometimes you can't create an intermediate WAV file, because it would exceed a 4 GB WAV limit.
Aften should support pipes... What problems are you having? It definitely works in Linux, and the Windows piping support was based on someone else's (presumably working) patch.

Also it would be useful to implement SSRC sample rate conversion and force a 48 kHz resampling if needed. foobar2000 can force output to 16 bit but not 48 kHz AFAIK.

Edit: Resampling can be done using foobar's DSP processing.
Inline resampling is on my TODO list. Also, optionally downmixing or upmixing the number of channels is on the TODO list. :) The list just keeps growing!

-Justin

Kurtnoise
24th July 2006, 01:07
@vlada : no problem with pipeline here with fb2k...

@all : my Aften builds for win32 OS are located here (http://kurtnoise.free.fr/index.php?dir=Aften/) now. The last current version corresponds to the 0.03-dev. :)

tebasuna51
24th July 2006, 01:21
I have one simple question: does the encoder support pipes?
I want to use Aften in foobar2000 where it would be very useful. From what I tried it doesen't work. The problem is, that sometimes you can't create an intermediate WAV file, because it would exceed a 4 GB WAV limit.
Yes, work with Bepipe/BeHappy and foobar, also with wav > 4GB

tebasuna51
24th July 2006, 01:32
Normally I tend to favor solutions which don't cater to incorrect ways of doing things, as it only perptuates the problem. In this case, I think it is better to check all the mask values instead of assuming that the correct channel-to-speaker mapping exists. Are there other sources besides soundlogic which produce 5.1 wavs with a channel mask other than 0x3F? If not I'm leaning toward a more strict solution. Or maybe explicitly checking for either of the 2 ways, back or side. I'd rather not leave it open for any configuration with X number of channels. Comments?
Ok, not problem for me.

Edit:
@Kurtnoise
Thanks for your last aften.exe, now work WAVE_FORMAT_EXTENSIBLE float wav.

jruggle
24th July 2006, 02:54
Ok, not problem for me.
Done. Also, I have created a place for a more detailed Changelog of sorts.
http://aftenblog.blogspot.com/

-Justin

vlada
24th July 2006, 12:27
@vlada : no problem with pipeline here with fb2k...


It doesen't work for me. I just tried it on another machine with your latest build. I get this error message:
Error writing to file (Encoder has terminated prematurely with code 1;
please re-check parameters) : file://C:\sample.ac3

It works with parameters -b 256000 %s %d, but if I remove the %s switch (which creates an intermediate WAV file) I get the error mentioned above.

What parameters have you used in foobar2000?

tebasuna51
24th July 2006, 12:36
With: -b 448000 - %d
Replace '%s' with '-'

vlada
24th July 2006, 14:15
@tebasuna51> Thanks, now it works fine.

SeeMoreDigital
24th July 2006, 15:14
Hi Kurtnoise13,

Will it be your intension to add this new AC3 encoder to BeLight at some point?


Cheers

Kurtnoise
24th July 2006, 18:09
Yes, it's planned but for the moment it doesn't work properly. Maybe an issue with bsn.dll...

danpos
25th July 2006, 05:13
@kurtnoise

I did use AftenGUI 1.1 with Aften 0.3-dev. I did use the drag'n'drop feature and it worked great. I did encode a batchlist with 5 waves files to AC3, using the same settings than I use with SoftEncode and the resulting AC3 files working great (and the time for total batch encode was very quick compared with SoftEncode).

Thank you for the W32 build/GUI and Justin Ruggles for this great encoder.

JFYI. :)

Regards,

Kurtnoise
25th July 2006, 14:54
@Danpos : great...:)

@Justin : about library integration. Why not submit a patch for libsndfile ?

raquete
26th July 2006, 04:42
After the test I think Aften is the best free ac3 encoder.

I want compare the options with the old reference encoder Sonic Foundry SoftEncode (in speed Aften is clearly the winner, Softencode need hours to encode a 6 chan 130 min long)

this sounds exciting...

I did encode a batchlist with 5 waves files to AC3, using the same settings than I use with SoftEncode and the resulting AC3 files working great (and the time for total batch encode was very quick compared with SoftEncode).

good posts! :cool:

i confirm.
Aften is faster,the sound have more "punch" and is more clever than from softencode(that i removed from my system).
another detail is that softencode use "low pass filter"(20 ~ 120Hz) to encode LFE and Aften encode my .wavs 6 channels without change my parameters.

AftenGui is now my "emperor" AC-3 encoder.

Kurtnoise13 & jruggle (tebasuna51 and all that help)
congratulations!
;)

Rockaria
26th July 2006, 07:58
I kinda feel the seniority or maturity on everything in this project. C not c++ nor net and ,, java (itself is a perfect language in the server level computing), by gathering lots of interests and satisfactions already with the v0.03, and having the clear objectives and open approaches, not necessarily driven by the NEW technology.

Although I cannot make you guys happier with the cheerleading and nominating, I admit I have almost nothing to add to the development but just wait and evaluate the outputs( including the clearly organized sources). I just wanted the discussions a tad bit more based(with formal references) and considered in easy words.
Myself being a music lover than a movie manicac, I am more focused on the player/mixer level DD/DPL II link to the receivers than encoding clips(I might still prefer AAC though).
But doing things correctly in a fully considered open approaches is certainly the wonderful thing to be appreciated. It looks like genuine.

raquete
26th July 2006, 20:00
i'm using AftenGui to encode AC-3 5.1 in musics extracted from cds following the ursamtl's a.audition guide.
i have doubts about possibles values(metadata).

for audio(audio-dvds) i have to adjust Aften to -31, -27 or -15 in dialog normalization?
i want to know about "stereo rematrixing","Dolby Prologic Mode","block switching" and "bandwidth" adjusts too.

can anyone help me please?

thanks.

jruggle
27th July 2006, 03:02
i want to know about "stereo rematrixing","Dolby Prologic Mode","block switching" and "bandwidth" adjusts too.
Stereo rematrixing is the AC-3 version of mid/side or channel decorrelation. It is done in the frequency domain and only in a selected frequency range. This generally increases quality (CBR) or decreases bitrate (VBR). It is also important for use with Dolby Prologic. The spec explains how, but I have not given sufficient mind time to really figuring out the in-phase/out-of-phase stuff.

Dolby Prologic (Surround) Mode is just a flag that indicates the input audio has been Dolby Prologic encoded. Aften doesn't do anything to the audio.

Block switching is the use of both the standard 512-point MDCT transform and the short-block 256-point MDCT. The short block transform is better for transient signals. The spec details exactly how an encoder should make the block switching decision. There are other methods out there which claim to do a better job, but for now Aften just does what the spec says. Using block switching is slower since it involves a high-pass filter before analysis (the filtered audio is not encoded, just used for the block switching decision).

The bandwidth setting determines the cutoff frequency. This ranges from 0 to 60. Note that even at the highest setting, only 253 of the 256 coefficients are encoded, so the full bandwidth is never used. Aften's variable bandwidth mode selects a bandwidth for each frame based on the quality (snr offset) for that frame. The formula for figuring cutoff frequency from the bandwidth code is:
cutoff = (samplerate/2) * (((bw * 3) + 73) / 256)
to reverse it:
bw = (((cutoff / (samplerate/2)) * 256) - 73) / 3

If you want to cutoff around 16kHz, you can set a constant bandwidth of 33 for 48kHz audio or 38 for 44kHz audio.

Hope this helps.
-Justin

P.S. Thanks everyone for all the compliments and encouragement! :)

guada2
27th July 2006, 07:07
* Sorry and thank you very much Kurtnoise13.

* Very :goodpost:

Bye.
Mario.

raquete
27th July 2006, 14:17
Hope this helps.
-Justin

:)
:goodpost: :helpful:
help too much. :D

thank you.

Rockaria
27th July 2006, 22:05
My research could have been more specific on the ProLogic issue...

DP569 Dolby Digital Encoder http://dolby.com/assets/pdf/tech_library/133_m.ch.0002.DP569Guide_Chart.QuickStart.pdf
DP563 Dolby Surround and Pro Logic II Encoder http://dolby.com/assets/pdf/tech_library/148_563_2.Manual.pdf
DP564 Multichannel Audio Decoder http://dolby.com/assets/pdf/tech_library/134_DP564QuickStartGuide.pdf

ATSC Standard: Digital Audio Compression (AC-3), Revision A http://www.dolby.com.cn/gb/assets/pdf/tech_library/a_52a.pdf

Beside having bsi->5.4.2.6 dsurmod for the decoder(DP564 ) auto mode to determine the proper DPL(II) decoding for the 2.0 streams encoded from DPL II encoder(DP563), the annex c->2.3.1.2 dmixmod for the auto downmixing is designed to help the DP564 to determine the proper mode if presents.
As is explained in the DP563 manual->2.4 Metadata, the default Lt/Rt mode is preferred if the surround is ready to (invert) downmix(i.e. 90deg rear phase shifted with DP569 option).

However, the decoding time Lt/Rt downmix mode will have very rare opportunities to be used as is than the original DPL II, stereo downmix or as the input for dolby virtual speaker/dolby headphone dsp :
- if connected from a player, the receiver(DPL II decoder) will mostly also have the DD decoding for 6ch speaker set
- if 2ch play is the constraint, the virtual speaker or dolby headphone DSPs would be better for more spatial effect.

<my understanding of the Dolby devices' scope>
DP570 Multichannel Audio Tool | EX-EU4 Dolby EX Surround Encoder | DP563 Dolby Surround and Pro Logic II Encoder,,, : preprocessing or mixing
DP569 Dolby Digital Encoder | DP571 Dolby E Encoder | DD Live | Dolby Media Producer ...: encoding
DP562 Dolby Digital Decoder | DP572 Dolby E Decoders | DP564 Multichannel Audio Decoder ...| EX-DU4 Dolby EX Surround Decoder : decoding & post procesing
... Aften is located somewhere intended to cover some area(mostly DP569) of the functionalities of current devices.. (hopefully) to be progressively evolving...

http://dolby.com/assets/pdf/tech_library/DPlus_TrueHD_whitepaper.pdf
The conventional rematrixing(a different approcah than the decoder-downmixing) on lossy codecs to reconstruct the 5.1 or 7.1 channels with the 'downmix + extention' mechanism is known to have the 'coder unmasking' side effect(page 4), but I guess AC3's (section 7.5) rematrixing will be useful to effectively reduce the bit rate especially when VBR is used, in addition to the channel coupling maybe.
[edit] rematrixing : it seems related but differs a lot from the AC3 spec rev. A->7.5 rematrixing. I wonder if this type of rematrixing has ever been used with Dolby.
Dolby Digital was not bound to any prior channel extension methodology, and could therefore benefit from the subsequent developments of other multichannel codecs..Dolby ac3 is using the decoder-downmixing for the 2ch compatibility and the above extention methodology is totally different from the ac3's rematrixing.

jruggle
28th July 2006, 03:52
Beside having bsi->5.4.2.6 dsurmod for the decoder(DP564 ) auto mode to determine the proper DPL(II) decoding for the 2.0 streams encoded from DPL II encoder(DP563), the annex c->2.3.1.2 dmixmod for the auto downmixing is designed to help the DP564 to determine the proper mode if presents.
As is explained in the DP563 manual->2.4 Metadata, the default Lt/Rt mode is preferred if the surround is ready to (invert) downmix(i.e. 90deg rear phase shifted with DP569 option).

However, the decoding time Lt/Rt downmix mode will have very rare opportunities to be used as is than the original DPL II, stereo downmix or as the input for dolby virtual speaker/dolby headphone dsp :
- if connected from a player, the receiver(DPL II decoder) will mostly also have the DD decoding for 6ch speaker set
- if 2ch play is the constraint, the virtual speaker or dolby headphone DSPs would be better for more spatial effect.

Since it will be pretty simple to do, I'll go ahead and add the alternate bitstream syntax. Since Aften does not use timecodes, it will be the same as it is now unless the user specifies a setting for one of the options in the alternate syntax.

-Justin

raquete
28th July 2006, 05:20
trying to help the thread after got great gratifications:

Pro Logic II ... Left .. Right Center Rear Left Rear Right
Left Total .... 1.000 0.000 0.707 .. j0.8165 .. j0.5774
Right Total ... 0.000 1.000 0.707 . k0.5774 .. k0.8165

j = + 90º phase-shift , k = - 90º phase-shift

http://en.wikipedia.org/wiki/Matrix_decoder#Dolby_Pro_Logic_II__Matrix_.282:5.29

from ATSC: A/52B (Digital Audio Compression (AC-3, E-AC3) Standard, Rev. B)
Digital Audio Compression (AC-3, E-AC3) Standard, Rev. B
"Revision B added a new annex, “Enhanced AC-3 Bit Stream Syntax” which specifies an additional syntax that offers additional coding tools and features."
http://www.atsc.org/standards/a52.html
http://www.atsc.org/standards/a_52b.pdf

and some more "standards"
http://www.atsc.org/standards.html



i'm still searching answer for this question(for more than i read i can't find:
for audio(audio-dvds) i have to adjust Aften to -31, -27 or -15 in dialog normalization?

thanks.