PDA

View Full Version : HeadAC3he v0.18pre released


DarkAvenger
17th January 2002, 23:13
=-0.18pre-=

- fixed and enhanced block size management
(I must have been completely stoned when I coded it first... ;-)
Use PTB to find out optimal values for block sizes.
Optimal values could speed up HD I/O by 40% (in my case)!
- you can now directly enter values for start/end frame
- various fixes and enhancemnts (esp. cosmetically)

This release it mainly to get out the max from current buffering using buffered i/o. The next release will have unbuffered i/o, which will be a lot faster, but horrible to implement, so this will take a while.

I already made a test routine for HeadAC3he to find the optimal block size using unbuffered i/o (in about 2min). In the meanwhile you need to use PTB, which probably needs a lot more time to finish...

This is a hardcopy of the log on my system. :D

Searching optimal Block Size...

Starting Write Tests...
Block Size of 1KB: 3.64 MB/s
Block Size of 2KB: 8.00 MB/s
Block Size of 4KB: 15.63 MB/s
Block Size of 8KB: 26.20 MB/s
Block Size of 16KB: 39.56 MB/s
Block Size of 32KB: 51.30 MB/s
Block Size of 64KB: 56.56 MB/s
Block Size of 128KB: 56.50 MB/s
Block Size of 256KB: 59.25 MB/s
Block Size of 512KB: 59.67 MB/s
Block Size of 1024KB: 59.67 MB/s
Block Size of 2048KB: 60.00 MB/s
Block Size of 4096KB: 60.00 MB/s
Block Size of 8192KB: 61.33 MB/s
Preparing TestFile...done
Starting Read Tests...
Block Size of 1KB: 8.36 MB/s
Block Size of 2KB: 15.13 MB/s
Block Size of 4KB: 22.61 MB/s
Block Size of 8KB: 31.57 MB/s
Block Size of 16KB: 39.17 MB/s
Block Size of 32KB: 66.35 MB/s
Block Size of 64KB: 72.58 MB/s
Block Size of 128KB: 73.96 MB/s
Block Size of 256KB: 71.92 MB/s
Block Size of 512KB: 72.83 MB/s
Block Size of 1024KB: 71.67 MB/s
Block Size of 2048KB: 72.00 MB/s
Block Size of 4096KB: 68.00 MB/s
Block Size of 8192KB: 66.67 MB/s

kxy
18th January 2002, 02:05
DA, good thinking with Primitive Transfer Benchmark. And I see that my request for directly enter values for start/end frame has being done.

Nice WORK!! Keep it up.

DarkAvenger
18th January 2002, 11:22
:)

One should note, that if you have a *lot* of RAM, you cannot trust the results of buffered read tests from ptb (if they are faster than unbuffered, then they are wrong). That's why I deacv. the test routine in HeadAC3he for the meanwhile.

user
26th January 2002, 00:38
Would it be possible for you to implement in HeadAC3he the feature:

ac3 in 44,1 kHZ instead of 48, with wav header ?!

Do you have a freeware ?! encoder 6 waves to ac3 that you could use for it ??

DarkAvenger
26th January 2002, 12:21
uhh, could you explain first idea? I didn't get it

second: see future.txt

user
26th January 2002, 13:11
If I remember correctly, then HeadAc3he adds to an AC3 a wav header.
To play it through normal CD-players out of dig out into amp/decoder to get 5.1 sound.
Because most AC3's are 48 kHz sampling and amps/decoders think: "ahh, there a wav comes in, so it is CDDA 44,1 kHZ..." these ac3's are played with a little wrong speed.

Solution:

3 steps until now, a lot of work to do to start all programs:

1. ac3/48kHz decode to 6 waves/48kHz by azid/freeware.

2. 6 waves/48kHz downsample to waves/44,1 kHZ by ssrc / freeware

3. encoding 6 waves/44,1kHz to one 5.1 AC3/44,1kHz by Softencode (unfortunately not freeware)

I hope, I described step3 correctly, dunno if softencode is correct. Perhaps there exists a free solution for step 3 ?

Then that problem would be nearly solved.

I suggest that for HeadAc3he there is only missing a solution/freeware program, that encodes 6 waves to 5.1 AC3.

Can you do it ?!

Edit:

"future.txt: NEVER BE DONE:

- encode to AC3 or DTS

If you find info or freeware or alike to do above tasks, pass them to me, and
then I may try to include that featur."

mmm, perhaps it is possible to create an ac3 encoder by some other persons, groupwork ?

DarkAvenger
26th January 2002, 13:35
Can you do it ?!

Nope. No Docs and I don't have an idea for this. DSPGuru wold be the right man, but he needs docs as well. So only way would be reverse engineering - illegal.

LotionBoy
26th January 2002, 18:24
isn't reverse engineering legal?

LotionBoy

DarkAvenger
26th January 2002, 20:06
Usually not, just take a look into the soft's license. Even more, you'd probably feel the wrath of Dolby Labs...

LotionBoy
27th January 2002, 07:40
Excellent site here on reverse engineering.
http://www.sims.berkeley.edu/~pam/papers/l&e%20reveng3.pdf

I guess what it comes down to is if AC3 is patented. If it is merely a copyright thing, then reverse engineering is completely legal for the purpose of knowledge and source code would probably be legal to post. probably. If it is patented (which I assume it is), then it is unclear legally whether it is legal to reverse engineer the process, but mostly likely the courts would rule in favor of the patent holder, as no fair use exists for patented things. AC3 is not an encrypted format so the facist DCMA does not apply. That's how I understand things. So most likely, this is not going to be something that exists.

LotionBoy


EDIT: I don't think that a software program's license is necessarily binding. It cannot make you give up your constitutionally protected rights, including the right to fairuse, which covers copyrighted reverse engineering (see Sega vs. Acclaim and recently Sony vs. Connectix).

DarkAvenger
27th January 2002, 08:20
Well, I guess it depends on each country. Nevertheless, 1) it ain't easy, 2) you will run into trouble with Dolby. The even wanted to bann ac3dec.

user
30th January 2002, 15:55
Hi,

how is it possible to get the (original ?!) ac3 file back, after you have converted an ac3 to an ac3.wav ?

Is there a program or a new idea for something new ?!




With ESS DVDplayers like raiteclones, Yamakawa, TYT&clones you will be able to play original ac3 files on ISO, UDF, UDF/ISI CDs. I have tries by myself.

Unfortunately you cannot fast forward/rewind or play these Cds on any other player, but you would have correct length (48kHz vs. 44,1 kHZ)

The other solution to archive ac3 files would be as ac3 with wav header, ádvantage:
playable on every CDplayer
disadvintage:
music plays slower....

Would it be possible to extract at one day the ac3 part out of ac3.wav ?





Another idea:

Would it be possible to add a 48 kHz wav header to our usual ac3 48 kHz files ?

Then perhaps those ac3.wav files could be played correctly by ac3 decoder/usual 5-channel amps/receivers.
Perhaps this possibility could be tried out, if we are lucky, normal CDplayers play these wav's/audio Cds with 48 kHz waves, too and give that signals at dig. out.

DarkAvenger
30th January 2002, 16:11
Would it be possible to extract at one day the ac3 part out of ac3.wav ?

This is *very* simple. I just didn't implemented it as I didn't see any use.

Would it be possible to add a 48 kHz wav header to our usual ac3 48 kHz files ?

Yes, but why?

Then perhaps those ac3.wav files could be played correctly by ac3 decoder/usual 5-channel amps/receivers.

Unless your CD player spins faster and plays the files/"wavs" as 48kHz stream, no go.

user
30th January 2002, 17:37
1.

quote:
--------------------------------------------------------------------------------
Would it be possible to extract at one day the ac3 part out of ac3.wav ?
--------------------------------------------------------------------------------



DA: "This is *very* simple. I just didn't implemented it as I didn't see any use. "

Let me explain again:

at the moment playing ac3 via ac.wav files is quite good, better than nothing, but not perfect (44.1 vs. 48 KHz).

But later FW of DVD/CDplayer could be improved, so that playing original ac3 files is more comfortable.
Then extracting ac3 out of ac3.wav could be interesting.
If it is very simple for you, please implement it in your program.



2.

quote:
--------------------------------------------------------------------------------
Would it be possible to add a 48 kHz wav header to our usual ac3 48 kHz files ?
--------------------------------------------------------------------------------



DA : Yes, but why?


quote:
--------------------------------------------------------------------------------
Then perhaps those ac3.wav files could be played correctly by ac3 decoder/usual 5-channel amps/receivers.
--------------------------------------------------------------------------------



DA: Unless your CD player spins faster and plays the files/"wavs" as 48kHz stream, no go.

Perhaps we found a solution for a lot of DVD/CDplayers.
My grundig130/all TYTclones/Yamakawas/Raite-clones and so on *can* spin faster than single 44.1kHz audio-CD speed.
So if the user would be able to add a 48 KHz wav-header to his ac3, then he could play his CD-R with ac3.wav in correct speed on his DVDplayer through dig out into those usual receivers.

If you implement this second solution, I will test it.




If it is possible for you, please implement in a beta version both options, both are interesting to play with.




As I have tried today, ac3 files on ISO Cd (on UDF, UDF/ISO, too), are played even at the moment with my DVDplayer, but not so comfortable. But FW is in progress...

DarkAvenger
31st January 2002, 00:23
Then extracting ac3 out of ac3.wav could be interesting.
If it is very simple for you, please implement it in your program.

As I don't want to waste my time for unnecessary things, I won't do it until the option is really needed.


My grundig130/all TYTclones/Yamakawas/Raite-clones and so on *can* spin faster than single 44.1kHz audio-CD speed.

Perhaps I wasn't precise enough. Your player's firmware must my taught to play an audio cd in 48kHz instead of 44.1kHz. As I am pretty sure no drive on the earth can do this (just because of software side), no go, unless you can patch the fw.

user
31st January 2002, 00:45
Then extracting ac3 out of ac3.wav could be interesting.
If it is very simple for you, please implement it in your program.
--------------------------------------------------------------------------------


DA: "As I don't want to waste my time for unnecessary things, I won't do it until the option is really needed. "

1.
Sorry, perhaps for you it is unnecessary, but for users, who play with ac3 and waves, it is interesting.

2.
Purpose:
At the moment archiving and playing ac3 as ac3.wav. Later extracting pure ac3, to burn it as ac3 to CD, even now players play pure ac3 files.

3.
It would complete your program HeadAc3he regarding functionality of ac3, ac3.wav.

DarkAvenger
31st January 2002, 02:55
At the moment there is no need to get the ac3 back from ac3 wav, so I won't do it at the moment. I am busy with more important stuff. period.

user
31st January 2002, 09:12
Hi,

of course you don't need to hurry, who told you ?!. I never said: "IMMEDIATELY !" !
Hey, all we do is in spare time and should enjoy us. (So I understand my engagement for MP3, ac3, DVD, SVCD, music, movies.)


48 kHz waves
Another possibility:

DA: "Perhaps I wasn't precise enough. Your player's firmware must my taught to play an audio cd in 48kHz instead of 44.1kHz. As I am pretty sure no drive on the earth can do this (just because of software side), no go, unless you can patch the fw."

Yes, even when I had the idea adding a 48kHz wav header to ac3, with the aim to play it with CD/DVD-players via dig out, I knew that there could be following big problems:

1. it would have been possible, that there are no 48kHz-wav-headers, headers would be the same for 48 and 44,1 kHz waves.
Luckily you told me above, that my idea is not complete rubbish, because 48 and 44,1 kHZ wav headers exist.

So this leads to a possible trial:

2. adding a 48 kHz wav header to an usual ac3 (48 kHz). (best would be with your headac3he)

new problems can follow:

3. which player plays a 48 kHz wav ?

3.1 I knew it from beginning, that normal, old CDplayers can have problems, they were designed for 44,1-waves. But who knows, a trial won't cause damage.

3.2 DAT-players and PC can play 48-waves, I have a DAT, PC, too.
I could record digitally a 48-wav from my PC to my DAT. Perhaps in a few weeks I will get the M-audiophile soundcard with separate coax2opto//opto2coax converter including removal of copybit.
Then I can output digitally 48kHz-wav either from my PC to my receiver (included ac3-decoder) or from my DAT to amp.

3.3 DVDplayer. For them it could be possible to give out 48kHz waves digitally.
Yeeees, as you know, patching, even officially modifying the FW is possible.




4. I could try 3.3 even now.
I would only need to produce a test-wav with 48.
Do you know, if I can upsample a 44,1-wav to 48 with SSRC ?

Or do you know an address, where I can download a 48-test-wav ?

Then I would have a 48-wav and could try to burn it as CDDA with Nero or cdrao. And trying to play...

DarkAvenger
31st January 2002, 10:25
3.2 will work.

To change the header *don't* upsample the final file. Just use CE to change the header "adjust samplerate".

user
31st January 2002, 11:38
DA: 3.2 will work.

aaa, I forgot the easiest way of getting 48-wav. Of course decoding 48-ac3-5.1 to 48-wav with azid, downmixed to stereo, of course. Do you mean this with "3.2 will work." ?


DA: To change the header *don't* upsample the final file. Just use CE to change the header "adjust samplerate".

I understand following: If I get wav (48) by decoding ac3 by azid, then I don't need to upsample, of course.
But, what is CE ?
Why and how changing header "adjust samplerate" ?

DarkAvenger
31st January 2002, 12:46
I think you're confusing things: We are not talking about decoding the ac3, but nesting it, ie. leaving it in its original state. So, just make an AC3-WAV (a "nested" ac3) and change its header in CE to 48kHz (CoolEdit). Probably the next version of HeadAC3he allows you to select the wav header for AC3-WAV.

Using a soundcard with digital out, connected to a recevier an ac3-wav with 48kHz WAV header should work, unless the soundcard as such f#s things up (the volume control could cause problems...).

user
31st January 2002, 13:26
ah, yes, you spoke of the ac3 side.

I have just tried wav side.
I took a 48-wav (out of 5.1ac3 to wav by azid) and burned it to CD-RW by Nero 5.5.7.2 (latest) as Cd-audio.

Yeaa, it was played in correct length by Cd- and DVD-player as audio-CD, but unfortunately Nero has downsampled my wav-48-source to 44-wav just before burning.
This was to expect, otherwise it would have been no audio-CD.

Do you know a burning program, that does not downsample automatically from 48 to 44, during/before burning a 48-wav as audio-CD ?
Perhaps this is impossible because of definition of CDDA (only 44,1 allowed ?).

Unfortunately I don't have CE. Does a trial version work for these matters ?

I would be very glad, if you implement the possibilty to select either 44 or 48 kHz wav header in HeadAC3he. Hopefully you don't get a headache over that !

Yes, because of crappy Soundblaster (output only 48 kHz at dig out, everything is "overworked" in that soundcard, even digital signals, which should not), I want to buy M-audiophile.
Meanwhile a lot people have got better soundcards like Terratec EWX 24/96 or M-audiophile, which do not disturb original digital signals.
So it makes sense to make Headac3he even more perfect by adding possibility to select 44 or 48 wav header.

Because HeadAC3he is a very good tool for AC3 audio (it can decode ac3 to wav using azid, it can cut pure ac3 files, it can add wav header to ac3), the few possibilities (selecting which wav-header should be added, reverse: ac3.wav back to .ac3) that you can do else with ac3/ac3.wav files should be implemented, please.

LotionBoy
1st February 2002, 06:59
I don't think there is a way to burn CDDA at 48. it completely breaks the spec.

LotionBoy