HydrogenAudio

Lossy Audio Compression => Other Lossy Codecs => Topic started by: timcupery on 2010-02-19 02:59:45

Title: do we really know how good/bad is AC3 encoding?
Post by: timcupery on 2010-02-19 02:59:45
So I've been trying to learn about how good can the AC3 format be. Mp3 is excluded from the MPEG-2 spec (presumably b/c timing - AC3 was more mature at the time). But more interesting is that mp3 is also excluded from the Blue-ray spec, while AC3 is included. This doesn't mean that the standard-makers thought AC3 offers better audio reproduction than mp3, it could just be that lots of blue-ray discs will include better picture but the original already-encoded AC3 audio. And AAC audio has a higher ceiling and was there included over mp3.

But this has gotten me wondering, how good, actually, is AC3 lossy encoding?
It hasn't shown up in listening tests, either because people don't take it seriously, or because the only optimized encoders are dolby-licensed and very expensive to purchase.

So I'm wondering - do we (by which I mean, "knowledgeable people here at HA) have a good sense of where AC3 encoding quality ranks?
It's quite possible there are test results that I simply haven't seen and couldn't find when searching thread subject-lines.
Title: do we really know how good/bad is AC3 encoding?
Post by: timcupery on 2010-02-19 14:48:13
wow - 81 views and no responses. so does that mean we really don't know anything about ranking AC3 audio quality?
Title: do we really know how good/bad is AC3 encoding?
Post by: viktor on 2010-02-19 15:05:39
wow - 81 views and no responses. so does that mean we really don't know anything about ranking AC3 audio quality?

that means whoever has read this topic doesn't know the answer or is not willing to answer.

this is a forum, not a chat, so be patient.
Title: do we really know how good/bad is AC3 encoding?
Post by: benski on 2010-02-19 15:12:41
Mp3 is excluded from the MPEG-2 spec (presumably b/c timing - AC3 was more mature at the time).

It is not excluded from MPEG-2.  In fact, the MPEG-2 standard expands on MP3 adding the additional sampling rates now referred to as MPEG-2 layer 3.  It is, however, excluded from the DVD spec.  DVD is a subset of MPEG-2 and excludes a number of other things as well.

Quote
But more interesting is that mp3 is also excluded from the Blue-ray spec, while AC3 is included.

MP3 is excluded from Blu-Ray for the same reason it's excluded from DVD.  Layer 3 is not capable of surround sound.
Title: do we really know how good/bad is AC3 encoding?
Post by: Notat on 2010-02-19 15:34:08
MP3 was developed first, then AC3 (Dolby Digital) then AAC. MP3 is definitely the inferior codec in terms of quality/bitrate. Due to Dolby's involvement in AAC, many of the AC3 coding techniques are incorporated in AAC.
Title: do we really know how good/bad is AC3 encoding?
Post by: lvqcl on 2010-02-19 15:36:49
EBU evaluations of multichannel audio codecs: http://tech.ebu.ch/docs/tech/tech3324.pdf (http://tech.ebu.ch/docs/tech/tech3324.pdf)

I found this link on http://forum.doom9.org/ (http://forum.doom9.org/)
Title: do we really know how good/bad is AC3 encoding?
Post by: timcupery on 2010-02-19 15:59:22
@victor - I understand this ain't a chat. just figured that 81 views and no posts was a rather high ratio, indicating that not many people know info about AC3, which fits with the fact that I couldn't find anything with search.

@benski - thanks for the clarification. MP3 being excluded from DVD and Blue-ray spec on the basis of multichannel.

@Notat - development order is but one predictor of audio quality of a codec. (although it's good to know the order - I was wrong on that part). My real question in this thread is precisely about how AC3 would perform in blind listening tests. Your statement of "mp3 is definitely the inferior codec in terms of quality/bitrate" implies that AC3 would be better or at least the equal of any highly-developed more recent codecs (e.g., AAC) which do not have much of a leg up on mp3 yet although it's generally agreed that they have a higher ceiling.
Obviously mp3 audio quality could only be tested against AC3 in 2-channel music.


As to why AC3 made it into Blue-Ray: perhaps this was about quality. But these standards are HUGE business decisions with lots of money at stake, and committees aren't simply making decisions on the basis of functional quality.
I ran across this link
http://tech.mit.edu/V122/N54/54hdtv.54n.html (http://tech.mit.edu/V122/N54/54hdtv.54n.html)
which highlights a conflict-of-interest in an MIT prof and audio expert casting the deciding vote to get AC3 into the U.S. HDTV spec. MIT apparently stands to make loads of money b/c a partnership with Dolby (who owns AC3) whereas Phillips got their standard (under the MPEG's patents) approved for Europe's HDTV spec. The prof apparently cast his vote not b/c the money that stood to be made by MIT, but rather b/c he wanted to support an American codec. Either way, it's an example of politics and business and money in such decisions.
Title: do we really know how good/bad is AC3 encoding?
Post by: sauvage78 on 2010-02-19 16:38:54
Not only AC3 is a bad codec but it is an awfull codec.

I made some tests on the castanest sample long ago, the results were that is was a terrible codec, & in fact one of the worst codec around. I don't have them anymore but I think the ABX logs are lost somewhere deep in the forums.

I still have a summary of my personnal result in a .txt that I keep if ever I encode a video:

Code: [Select]
Sonic Foundry Soft Encode  (Dolby V6.6.2) Soft Encode V1.0:
Castanet 2.0 Wav>AC3, 100% instantly ABXable up to 224Kbps. ABXable at 256Kbps, but not instantly.
aften V0.0.8:
Castanet 2.0 Wav>AC3, 100% instantly ABXable up to 320Kbps. Most likely ABXable at 384Kbps but not instantly.
ac3enc (Used by BeSweet) (from ffmpeg)  V1.20 (18-02-04):
Castanet 2.0 Wav>AC3, 100% instantly ABXable even at 256Kbps. Couldn't test higher.


I recall that Aften was one of the worst encoder I ever tested.

My conclusion was:
1: One must be deaf to encode to AC3 as a final codec.
(Specially re-encoding AC3 to AC3 is one of the biggest misstake you can do: it's pure massacre)
2: AC3 as a source is already so bad that it isn't worth encoding it.

The ironic thing with AC3 is that some people keep the AC3 stream untouched thinking it's "lossless".
It's exactly the opposite, you'd better leave it untouched because if you encode it once more it may fall in pieces.

IMHO it's a shame that disks with a "high-resolution" sticker on it are sold using this obsolete codec.
AC3 is one of the reason why I don't do video encoding at all, even blu-ray.

I hope the quad-hd successor to blu-ray will stop using it.

Edit: ... and if you wonder why there isn't more ABX test of AC3 & DTS, my answer is that it's because setting a AC3/DTS test is a real nighmare due to the limit of the available encoders:
most killer samples are 2.0 when most AC3/DTS encoders only supports 5.1. (Specially true for DTS encoders, most AC3 encoders supports 2.0)
Furthermore most AC3/DTS encoders prices make this test cost's increadibly high unless you're willing to broke your setup with the hundred of malwares that you will found bundle with the "free" (read "cracked") version of these encoders.
Title: do we really know how good/bad is AC3 encoding?
Post by: saratoga on 2010-02-19 17:57:48
Not only AC3 is a bad codec but it is an awfull codec.

I made some tests on the castanest sample long ago, the results were that is was a terrible codec, & in fact one of the worst codec around. I don't have them anymore but I think the ABX logs are lost somewhere deep in the forums.


Although AC3 is a pure MDCT codec like AAC, it screws up like MP3 by having strange block sizes.  Long blocks are just 512 time domain samples, 256 samples for short blocks.  And short blocks must come in pairs.

One of the new AC3 flavors (E-AC3?) apparently works around this by adding additional block sizes, but I don't know how well supported it really is or if its any good.  I haven't seen a decoder source for it.

Anyway, the reason to include AC3 is that every multichannel receiver on earth supports it.  If they'd made AAC mandatory and forced everyone buying bluray to buy a new receiver, people would have bought HD-DVD players instead.  The fact that AC3 isn't a very good format on technical grounds isn't so important.  You can use relatively high bitrates on Bluray since you're not hurting for space.
Title: do we really know how good/bad is AC3 encoding?
Post by: rpp3po on 2010-02-19 18:03:40
Thanks for the insightful information. AC3's potential quality has always been kind of a blind spot for me.
Title: do we really know how good/bad is AC3 encoding?
Post by: sauvage78 on 2010-02-19 19:16:29
Quote
You can use relatively high bitrates on Bluray since you're not hurting for space.


The bitrate I have given are for 2.0, so AC3 is instantly 100% ABXable at bitrates that are considered high/to overkill for any other modern lossy codec.

The idea that high bitrate would help the quality of AC3 to be better is IMHO a myth.

Castanet is not the worst sample around anymore, Harlem & Autechre are worst, but AC3 Soft Encode which, back when I tested it, was supposed to be one one the best AC3 encoder around (maybe SurCode or Sonic Foundry are better but I got a nasty virus before I could try those... I had to re-install XP despite antivir), is already not transparent at 256Kbps on castanets.

If you consider that a killer sample is only 20 sec, but that a movie lenght is 1h30 to 2hours, this leads to the simple conclusion that the AC3 stream from blu-ray is likely not transparent, & it's worst for DVD as the bitrate is lower. AC3 is not robust enough to stand the shock, it's like encoding a CD at 128kbps MP3 & hoping that it will be 100% transparent. It might be only if you don't listen carefully.

One conclusion that you can draw for almost certain is that any movie soundtrack with applauds in AC3 (which means any live music) is not transparent no matter the bitrate. The sellers are not idiot, that's the reason why most live music DVD comes with a 1536Kbps DTS stream.

Here is an equivalency table between AC3/DTS 5.1 bitrate used in physical media & 2.0 bitrate used for music: (with my non-100%-scientific opinion next to it, but the extrapolation is still based on some ABXing)

Code: [Select]
DTS ------ 5.1 1536Kbps /5x2= 2.0 614Kbps Good, most likely near transparent.
DTS ------ 5.1 0768Kbps /5x2= 2.0 307Kbps Not Good, not transparent, most likely easyly ABXable.
AC3 BD --- 5.1 0640Kbps /5x2= 2.0 256Kbps Not Good, not transparent, most likely easyly ABXable.
AC3 HD-DVD 5.1 0504Kbps /5x2= 2.0 201Kbps Bad, not transparent, instantly ABXable.
AC3 DVD -- 5.1 0448Kbps /5x2= 2.0 180Kbps Bad, not transparent, instantly ABXable.


It gives you a better idea of how to compare 5.1 bitrate to 2.0 bitrate & will help you realize that high bitrate doesn't help AC3 much.

The fact that AC3 is already used at high bitrate by default is an hint of how awfull it must be at low bitrate. Overall AC3 doesn't even compete with a bad mp3 encoder.

... but there is one hope, I heard on doom9 that professionnal AC3 encoder were better than those available to mortal users like us ... (I also heard that hope is what dies last ...)
Title: do we really know how good/bad is AC3 encoding?
Post by: andy o on 2010-02-19 19:22:19
bluray audio is not much of a problem. Most blurays come with lossless audio now, and AC3 is mostly used for backwards compatibility (as it's the main reason why it was included in the first place) as a secondary track or embedded in the TrueHD track. I do wonder about the quality of E-AC3 (DD Plus) though.

If E-AC3 which was used in most HD-DVDs (though many also came with lossless audio) turns out to be "bad" as well, then maybe the audiophile paranoia that helped the higher-capacity bluray discs win probably had a good side-effect.
Title: do we really know how good/bad is AC3 encoding?
Post by: sauvage78 on 2010-02-19 19:32:48
I haven't ripped a blu-ray since ages ... but the problem I had with blu-ray was that usually the lossless stream was only the main english stream ... there wasn't a lossless stream for each langages & I am not a native english. (Worst secondary langages were often 2.0.)

You can hardly rip a blu-ray with a mono-core barton sempron 3000+  so I gave up anyway.
Title: do we really know how good/bad is AC3 encoding?
Post by: andy o on 2010-02-19 19:36:14
Heretic! Are you watching dubbed movies? 

Actually many movies now come with multiple lossless tracks. If not, the original track often comes in lossless anyway. There are several awful discs out there though (Jackie Chan's Legend of Drunken Master is a relatively new one), but I think there are fewer and fewer nowadays.
Title: do we really know how good/bad is AC3 encoding?
Post by: andy o on 2010-02-19 19:39:04
You can hardly rip a blu-ray with a mono-core barton sempron 3000+  so I gave up anyway.

You don't need a powerful computer, just a big hard drive and the tools (which I think would violate TOS if I mentioned). There's no transcoding necessary, and there are now many (though mostly unreliable due to bugs) HDMI solutions that will bitstream the bluray codecs even from individual files.
Title: do we really know how good/bad is AC3 encoding?
Post by: DVDdoug on 2010-02-19 22:12:13
I've never done any A/B or ABX tests and I can't comment on it's transparency,  but to me, Dolby AC3 can sound fantastic!  Most DVDs have AC3 and they certainly sound better than VHS tapes...

I have several concert DVDs and some of the best sound I've heard from my home theater system is from 5.1 channel AC3!!!   Although it's an apples-to-oranges comparison, the AC3 surround from DVDs usually sounds better to me than stereo CDs.  (I don't have a Blu-Ray player or a DVD-Audio player, so I can't play non-lossy surround sound.)

I've never heard any artifacts or anything "wrong" with commercially produced movies/concerts (unless it was something  like a very old movie with a low-quality original soundtrack).  I've ripped a couple of stereo AC3 tracks, resampled (from 48 to 44.1kHz), and burned CDs.  I don't hear anything wrong with these CDs either.

When there's a choice between stereo LPCM and AC3 surround sound, I'll always select the surround sound.  If there's a DTS track, I'll usually select it because I "know" it has a higher bitrate.  The DTS usually sounds different (maybe a different mix, or different levels), but I won't say it always sounds "better".
Title: do we really know how good/bad is AC3 encoding?
Post by: timcupery on 2010-02-19 22:27:29
@DVDdoug - it seems possible that both your experience and sauvage78's testing could be true. It's possible that AC3 could be a poor-performing codec in listening tests (where you're comparing to an original lossless source) AND that AC3 doesn't detract from the enjoyment of listening to 5.1-channel audio. In your case, you're not comparing to any source where you'd have the ability to notice huge differences. So as long as AC3 doesn't produce obvious artifacts (i.e., obvious without even comparing to the original, like the "smearing" sound in many crappy mp3 encoders) then it doesn't hurt your experience listening. But this doesn't rule out the possibility that if you could do blind tests on your 5.1 audio system, it may still be very easy to tell the difference between AC3 encode and the original lossless source.
Title: do we really know how good/bad is AC3 encoding?
Post by: sauvage78 on 2010-02-19 22:48:04
Well, I am convinced AC3 is an awfull codec but I have never experienced any trouble with any DVD or Blu-ray (but I don't test them all day long either), ... it's happy that they sound OK for casual listening when you see the prices ... the problem is not that it sounds awfull, on most movies it doesn't, I mean it's like the average Joe that thinks mp3 128Kbps is good enough for him ... my criticisms is beyond that point. If you're happy with AC3 & don't bother bringing the codec to its knees. Great.
The problem is more that it is definitly not as good as it could be ... what is the logic of using AVC for video & AC3 for audio when AAC 5.1 is around ? AC3 is definitly not of the same effiency in the audio encoding world as AVC is in the video encoding world. (Indeed I do understand that AC3 is like mp3 on dap, a codec that never dies due to its huge compatibilty.) IMHO, it's good to point out that AC3 is a very weak codec now, because if people don't realize it, in ten years from now we will have quad-hd holographic disk using H265/HVC for video ... and AC3 for audio which would be a shame.

Now I agree that the probability that you can detect an audio artefact while watching a movie is low, even for trained ears. I often listen to radio, but I rarely complain that it sounds bad ... what I mean is that, on a daily basis, if you don't have an original to compare, you just don't realize what you lose. No matter if you have gold ears or not ... or if you have a super home theater or not. I did my 2.0 AC3 listening tests with cheap headphones.
Title: do we really know how good/bad is AC3 encoding?
Post by: andy o on 2010-02-20 02:15:30
Bluray can now take DD, DTS, LPCM, DTS-HD HR, DTS-HD MA, Dolby TrueHD and DD Plus (though no discs that I know except for a Dolby demo disc come with DD Plus). There has been problems fully supporting all formats in players (even on the highest-profile bluray one, the PS3), and there still are after years. Even the 7.1 variants can cause trouble sometimes. There is no way another format would have been well received, and DD and DTS are essential for backward compatibility. If you wanted to play a bluray with an older digital receiver via SPDIF, you couldn't if they didn't include them, except for 2-channel LPCM. HDMI with the HDCP and general handshake crap are tough enough to swallow already.
Title: do we really know how good/bad is AC3 encoding?
Post by: probedb on 2010-02-20 21:10:57
As others have said, pretty much all new BR discs use either Dolby TrueHD or DTS MA-HD which are both lossless. AC3 is just backwards compatible and occasionally offered by idiots like Warner Brothers on some discs like Fringe S1....what were they thinking!?

Andy, I'm not sure what you mean by problems? My PS3 plays everything back fine.

Also I believe DD+ was popular on HD-DVD but I've never seen a BR title that uses it.

In summary, I wouldn't worry about AC3. It's served it's purpose and is very good for movie-soundtracks which is it's primary purpose. People don't sit down to watch a movie thinking about whether they can hear pre-echo etc
Title: do we really know how good/bad is AC3 encoding?
Post by: andy o on 2010-02-20 21:24:40
As far as I can remember, the PS3 initially didn't decode DTS-HD. It had to get an update for that. Only the new Slim can bitstream the "HD" codecs. In the PC software domain, the situation is pretty bad still. PowerDVD 8 supported at one point 7.1 DTS-HD MA, but some builds later it all got screwed up, and on PowerDVD 9 they stopped supporting it at all. People say it's come back but meh, I don't care anymore. WinDVD 2010 can't decode any 7.1 audio at all, though I solve that by bitstreaming with the ATI 5770.

In short, the bluray spec is an unfinished mess. HD-DVD was better in almost everything except for capacity (which as an "advantage" was overblown and now makes for pretty bloated discs). Even if it supported the same audio codecs, it seems codec usage was more organized.
Title: do we really know how good/bad is AC3 encoding?
Post by: starcy on 2010-02-20 23:17:57
DD + is not popular Blu-Rays, because is lossy and offer less bitrates than his competitor DTS-HI Res, and needs core which is aslo lossles. While DD+ should produce better quality at given bitrate (around 1.7mbps) than DTS-HI res (~2-6mbps).

AC3 generaly is afwull comparing to the AAC, DD+, MP3 (in stereo), and other losssy encoders, but not DTS! even at 1.5mbps. My ears clearly prefer AC3 at 640kbp at any DTS lossy (not DTS HI-Res)
Title: do we really know how good/bad is AC3 encoding?
Post by: saratoga on 2010-02-21 01:46:47
AC3 generaly is afwull comparing to the AAC, DD+, MP3 (in stereo), and other losssy encoders, but not DTS! even at 1.5mbps. My ears clearly prefer AC3 at 640kbp at any DTS lossy (not DTS HI-Res)


Isn't DTS Hi-res just the same as DTS except with more channels and higher bitrate?  IIRC its backwards compatible, so I think its still the same old subband codee.
Title: do we really know how good/bad is AC3 encoding?
Post by: starcy on 2010-02-21 11:09:10
Quote
Isn't DTS Hi-res just the same as DTS except with more channels and higher bitrate? IIRC its backwards compatible
No, DTS HI-Res aslo need core to be backward compatible.
Title: do we really know how good/bad is AC3 encoding?
Post by: probedb on 2010-02-21 12:31:55
As far as I can remember, the PS3 initially didn't decode DTS-HD. It had to get an update for that. Only the new Slim can bitstream the "HD" codecs. In the PC software domain, the situation is pretty bad still. PowerDVD 8 supported at one point 7.1 DTS-HD MA, but some builds later it all got screwed up, and on PowerDVD 9 they stopped supporting it at all. People say it's come back but meh, I don't care anymore. WinDVD 2010 can't decode any 7.1 audio at all, though I solve that by bitstreaming with the ATI 5770.

In short, the bluray spec is an unfinished mess. HD-DVD was better in almost everything except for capacity (which as an "advantage" was overblown and now makes for pretty bloated discs). Even if it supported the same audio codecs, it seems codec usage was more organized.


To be fair DVD was like this originally. I still have my first DVD player and it doesn't support DTS at all  MPEG Multichannel and DD only.
Title: do we really know how good/bad is AC3 encoding?
Post by: andy o on 2010-02-21 15:15:12
Isn't DTS Hi-res just the same as DTS except with more channels and higher bitrate?  IIRC its backwards compatible, so I think its still the same old subband codee.

As said above, the DTS-HD formats have a "core" of legacy DTS. Similar to AAC-HD and MP3-HD as far as I understand. Maybe you're confusing it with "DTS 96/24"?

To be fair DVD was like this originally. I still have my first DVD player and it doesn't support DTS at all  MPEG Multichannel and DD only.

Yeah but at that time there was no "better" format to choose. I think a very good case can be made that HD-DVD was the better format for consumers (and the DVD people learned from their past mistakes), with bluray, I don't think one can make much of a case for consumers. HD-DVD was very much all finalized and even menus had similar interfaces. With bluray is like you're running a different program every time you run a different disc, on the whims of the idiotic studio.
Title: do we really know how good/bad is AC3 encoding?
Post by: saratoga on 2010-02-21 17:25:58
Isn't DTS Hi-res just the same as DTS except with more channels and higher bitrate?  IIRC its backwards compatible, so I think its still the same old subband codee.

As said above, the DTS-HD formats have a "core" of legacy DTS. Similar to AAC-HD and MP3-HD as far as I understand. Maybe you're confusing it with "DTS 96/24"?



Err if it has a backwards compatible core, then it very clearly is still a subband codec.  Its not like you can take an MDCT backwards compatible with a QMF
Title: do we really know how good/bad is AC3 encoding?
Post by: andy o on 2010-02-21 18:29:53
well maybe you're right. I'm not sure how technically correct is "just the same as DTS except with more channels and higher bitrate", though.
Title: do we really know how good/bad is AC3 encoding?
Post by: probedb on 2010-02-21 19:17:42
Isn't DTS Hi-res just the same as DTS except with more channels and higher bitrate?  IIRC its backwards compatible, so I think its still the same old subband codee.

As said above, the DTS-HD formats have a "core" of legacy DTS. Similar to AAC-HD and MP3-HD as far as I understand. Maybe you're confusing it with "DTS 96/24"?



Err if it has a backwards compatible core, then it very clearly is still a subband codec.  Its not like you can take an MDCT backwards compatible with a QMF


I think it just has a core, it maybe an entirely separate track within the DTS-HD MA track rather than it being used as part of the main track.

Andy with regards the menus etc it's because of the silly Java thing, basically you can run what you want inside it, that's why there's no standardised way of returning where you left off as well. Most annoying!!
Title: do we really know how good/bad is AC3 encoding?
Post by: andy o on 2010-02-21 19:59:52
yeah that's what I meant. BD-J is annoying as hell, and what's up with the loading times and screens.

AFAIK DTS-HD is an extension and the DTS track is a true "core". Dolby TrueHD is the one that includes an embedded DD track.
Title: do we really know how good/bad is AC3 encoding?
Post by: LigH on 2010-03-27 14:51:29
A codec is what the specific implementation makes of it. The specifications (Dolby A-52) are as much only a frame for AC3 encoders like Aften, as ITU H.264 is a frame for MPEG-4 AVC video encoders like x264. Calling the whole AC3 format "the worst ever seen" is quite generalistic, nicely said...

As far as I read on the Aften home page, it does not yet implement a very complex psycho-acoustic model, and no good channel coupling either (based on version 0.0.8); but it is already very fast and very convenient to use (e.g. via WAVtoAC3encoder). And it is freeware. And being developed actively.

Commercial encoders (as used by Steinberg and Sony - who bought Sonic Foundry years ago) may probably have their advantages, quality-wise. I'll stay curious and watch this topic...
Title: do we really know how good/bad is AC3 encoding?
Post by: krabapple on 2010-03-28 00:16:50
Not only AC3 is a bad codec but it is an awfull codec.

I made some tests on the castanest sample long ago, the results were that is was a terrible codec, & in fact one of the worst codec around. I don't have them anymore but I think the ABX logs are lost somewhere deep in the forums.

I still have a summary of my personnal result in a .txt that I keep if ever I encode a video:

Code: [Select]
Sonic Foundry Soft Encode  (Dolby V6.6.2) Soft Encode V1.0:
Castanet 2.0 Wav>AC3, 100% instantly ABXable up to 224Kbps. ABXable at 256Kbps, but not instantly.
aften V0.0.8:
Castanet 2.0 Wav>AC3, 100% instantly ABXable up to 320Kbps. Most likely ABXable at 384Kbps but not instantly.
ac3enc (Used by BeSweet) (from ffmpeg)  V1.20 (18-02-04):
Castanet 2.0 Wav>AC3, 100% instantly ABXable even at 256Kbps. Couldn't test higher.


I recall that Aften was one of the worst encoder I ever tested.

My conclusion was:
1: One must be deaf to encode to AC3 as a final codec.
(Specially re-encoding AC3 to AC3 is one of the biggest misstake you can do: it's pure massacre)
2: AC3 as a source is already so bad that it isn't worth encoding it.



So, now being easily (or 'not instantly' or even 'most likely') ABX-able with a notorious killer sample, tested at less than maximum possible bitrate for the codec, with encoders that may be somewhat less than 'industry standard',  is now the standard for condemning a codec generally?

Please.  This is just overwrought, as well as a possible TOS violation.

And that leaves out the multichannel factor...some audio artifacts that are apparent in careful 2.0 listening become far less detectable in surround, according to Floyd Toole in his recent book.  (I don't recall if he was necessarily talking about lossy codecs, but still.)
Title: do we really know how good/bad is AC3 encoding?
Post by: sauvage78 on 2010-03-28 13:15:06
krabapple:
Quote
tested at less than maximum possible bitrate for the codec


The bitrate given are for 2.0 so IIRC I tested the codecs at the maximum available bitrate for 2.0. So higher bitrates means 5.1. As I said the ABX logs are lost somewhere deep in the forums, but they are here. Anyway, I repeat AC3 is a terrible codec, I am 100% sure I can prove it again & not only with castanet.

I have read several times about people telling that the quality of aften AC3 encoder is "great", I can tell you one thing: those people don't have a clue of what they are speaking about ... now I don't care what you think about my results ... I have easyly published around a hundred of ABX log on HA at various bitrates, on various codecs & with various samples. You are free to follow the opinion of newbies that have never done any serious listening test ... more sometimes serious users disagree with me, that doesn't matter, test for yourself & do your own opinion ... only then you might realize how awfull AC3 is. If you're happy with it, great. Like ignorance, deafness is a bless sometimes ... 

"with encoders that may be somewhat less than 'industry standard'" ==> This is pure speculation, there is no evidence that professionnal hardware encoders are better than those publicy available.
Without any independant test, this is only a rumor.
Furthermore, an end-user like me has no way to test those supposed "better" professionnal encoders. I tested the best encoders that I could easily found at that time. One of the reason why there is so few data about AC3 quality is the price of encoders (& their awfull interface).

You might think that my test is crap, but I broke my system with virus to get those encoders (I am not even afraid of malwares as I am an advanced user, I just low level formatted as a basic format wasn't enought ...), so I doubt any average/newbie users will be willing/able to run a better test, knowing how hard it is to collect the necessary encoders ... it's either he will broke is system ten time (Despite antivir/kapersky/avast) or will get very poor before he can even run the test ...
My very bad opinion about AC3 is also due to the amount of time wasted just to realize how bad it was ... I don't like re-intalling my system, nowadays that it is rock stable I never re-install unless I buy a new HDD ... so this test was a special moment for me ... I wouldn't have re-install my whole system just to run a cheap & crap test ... I have high trust that my result are good for myself, I don't care if others disagree as long as they cannot scientifically prove me wrong.

I tried to get my hands on every other non-free AC3 encoders but I didn't succeed (or I succeeded but the interface didn't accept 2.0, I honestly don't recall), but based on comments from doom9 users (which are very not scientific on this particular matter), Soft Encode is not particulary better or worst than other non-free encoders which were all at that time based on Dolby V6.6.2 ... so one thing that is true about "professionnal" encoders is that non-free AC3 encoders are slightly better than freely available AC3 encoders ... this might lead to think that maybe non-free professionnal hardware encoders could "maybe" be better than non-free professionnal software encoders. First, this is pure extrapolation IMHO. Second, what you call "better" might be a very slight "better" IMHO.

"become far less detectable in surround" ... my intuition tells me that this has a lot of chance to be bullshits ... maybe in some rare case a light artefact might be masked but heavy artefacts have very low chance to be masked. ... if it was the case you couldn't ABX 2.0 ... because it often happens that the artefact is only on the right or left channel ... & the non-affected channel doesn't mask the artefact much ... unless it is a very light one.

About my comments:
Quote
aften V0.0.8:
Castanet 2.0 Wav>AC3, 100% instantly ABXable up to 320Kbps. Most likely ABXable at 384Kbps but not instantly.


Do you know what this means to be instantly ABXable up to 320Kbps in my mouth ??? It means that I can ABX it in 2 seconds ... which means that I can reach 20/20 100% probability of not guessing in 40 seconds which is less than 1 minute ... if you think that this is a "good" result you seriously needs to do some ABXing by yourself ... I am not even sure that I can reach this result with Blade mp3 or VQF ... I am sorry if it wasn't clear for you but "Most likely ABXable at 384Kbps but not instantly." means that it was already the worst codec I ever tested at 320Kbps so I give up & didn't tested at 384Kbps because it was not worth it ... it was simply competiting for the crown of the worst codec on earth ... (even an experimental codec like CELT might beat it ... )

Anyway fell free to disagree, I am waiting for your ABXing logs.
Title: do we really know how good/bad is AC3 encoding?
Post by: timcupery on 2010-03-28 14:43:31
A codec is what the specific implementation makes of it. The specifications (Dolby A-52) are as much only a frame for AC3 encoders like Aften, as ITU H.264 is a frame for MPEG-4 AVC video encoders like x264. Calling the whole AC3 format "the worst ever seen" is quite generalistic, nicely said...

Sure, codecs can vary within a given format. But some formats are more limited than others, as well.

"with encoders that may be somewhat less than 'industry standard'" ==> This is pure speculation, there is no evidence that professionnal hardware encoders are better than those publicy available.
Without any independant test, this is only a rumor.

Without testing, saying that the professional hardware encoders are better, is only a rumor. But assuming they're comparable to more easily-available encoders is also unverified.

Although it's true that if the companies wanted to produce encoded samples for use in blind tests, they could.
Title: do we really know how good/bad is AC3 encoding?
Post by: LigH on 2010-03-28 16:28:11
@ sauvage78:

You cannot compare "more or less no psychoacoustic model" implemented into the specific Aften encoder against tweaked psychoacoustic models implemented into the specific LAME MP3 encoder or into the aoTuV Vorbis encoder, and call it a fair comparison. Psychoacoustic models are specific to encoder implementations, not to the file format specifications. As well as channel coupling, blocksize switch strategy, bit reservoir allocation, ...

AC3 is a format, a specification - but no implementation. What do you call "the codec" exactly?

If you want to prove that the AC3 format is worse than others, then compare only the ATSC A/52 specs against the ISO/IEC 11172-3, ISO/IEC 13818-3, ISO/IEC 14496-3, Xiph Vorbis, Sony ATRAC3 and similar specs. Without even mentioning "Aften", "ac3enc" or "Soft Encode". Compare block sizes, spectral subband separation, bit allocation ... all that technical stuff which must be common for all AC3 encoders, regardless of additional tweaks.

And if that was not your intention: A more or less "fair" competitor against the Aften AC3 encoder would at most be the BladeEnc MP3 encoder, if you are looking for specific implementations instead, because what Aften still lacks about channel coupling and psychoacoustic model, BladeEnc lacks as well (being only able to encode Separate Stereo, but no Joint Stereo, for example).

But whatever you do: Compare apples with apples, not apples with oranges. Or bicycles with racing bikes.
Title: do we really know how good/bad is AC3 encoding?
Post by: sauvage78 on 2010-03-28 17:33:55
Every AC3 encoders I tested is very bad to awfull, so, so far, every implementations I tested is bad, that's why I concluded that AC3 as a codec is overall bad. Indeed you can still think that, maybe, with the existing specification, you could code a decent AC3 encoder if you were very skilled, but honestly with the preliminary bad results of 3 available implementations, it's like believing in in miracle ... Why would you be so clever that the implementation of all others developers would sound crap but not yours ? Anyway even if I know that the AC3 specifications are weak due to the age of the codec, I am not a technical guy so I am not discussing specifications here.

I am discussing about efficiency, which mean for me ABXable results at a specific bitrate with defined samples, I really don't see why in this context I couldn't compare AC3 to whatever codec I want to compare it to.

I don't see why comparing AC3 with more recent codecs with more advanced specifications would be being unfair with AC3. The evolution of codecs is relentless, I don't see why I should be nicer with AC3 than with any other codec.

Sorry, but I compared rotten apples with rotten apples (AC3 implementation X vs AC3 implementation Y) & rotten apples with fresh oranges (any AC3 implementation Vs. aotuv or nero AAC) ... it doesn't change anything: AC3 is awfull by itself ... I don't need to compare AC3 to anything except the original to know that it is bad ... no AC3 implementation I tested is transparent at 224Kbps for 2.0 (worst at such a high bitrate it is usually far from being transparent) ... I don't see how such a bad ABXing result could be read as being a good result ...

My test was not meant to be a reference, there is plenty of point where you can criticize it, I mean how could I seriously make a definitive judgement on a codec with only a single sample ? I can't, & I don't even pretend that I can. Also, there are several existing non-free implementations that weren't tested at all. But all I say is that within the context of my test 3 AC3 encoders results were bad when other codecs can shine in the same conditions. (Nero AAC & aotuv) ... now if you think that aften is a good codec well prove it.

A fair comparison is a comparison made to the best of your knowledge with the most scientific aprroach possible ... which in the end means that you & every honest people can re-produce the results ... I can re-produce my result if I want (& for exemple I know that /mnt is an honest ABXer because I was able to re-produce his results, so I hope anyone can re-produce mine) & I could even produce a  larger test (more samples) if I would think it would be of any interest. Sadly, my preliminary results just killed all my interest in AC3. I have better things to do than testing an obviously obsolete technology. I'd rather test the next aotuv version than waste my time with plenty of non-free & patented codec that sounds crap & can only be aquired freely illegally bundle with nasty malwares (free AC3 encoders seems weaker).

I admit my test is too short & specific to draw any serious conclusions (scientific), but at the same time I cannot do as if I didn't spend a few hours testing AC3 ... because many people that obviously never spent a few hours testing AC3 are trying to teach me what to think about AC3.

The truth lies somewhere between the lines, on the one hand there are serious hints (ABX logs on castanet, old technology) that might lead you to think that AC3 is a bad codec, but jumping directly on this conclusion is a shortcut, on the other end ignoring them is honestly leading nowhere, it's lying to yourself by omission.

I challenge anyone to prove that any AC3 implementation can rivalize with a modern codec, because I am sure that I can prove (providing that I grab the encoder) that none can achieve this. This is not being unfair, this is just being honest.
I can understand that people use AC3 due to compatibility with the device they own, but I cannot let people say that AC3 rivalize with modern codecs.

It gives to newbies the feeling that encoding a lossless blu-ray stream to aften AC3 5.1 is a better option than transcoding it to Nero AAC 5.1 ... unless you own a AC3 device for your living room, this is just not true. ... and nowaday with the flourishing H55 mini-itx motherboards even if you own an AC3 device in your living room I tend to think that it is also not true.

In the end, except for the force of habbit, there is no real reason to use AC3 in 2010.
The only good reason to use AC3 in 2010 is to keep an original AC3 stream untouched ... because it could fall to dust if you re-encode it ...
Title: do we really know how good/bad is AC3 encoding?
Post by: LigH on 2010-03-28 19:31:17
Well, of course AC3 has its limits. Mind you, it had to be decodable quickly with the semiconductor integration level of the early 1990s.

And only because currently available home encoders do not yet implement all possible features doesn't mean that there will never be more complete and complex implementations. Let's wait for "fresh apples" ... (like Aften 0.1.x?) - it may never be as good as LAME, but surely better than now. And then it will also support E-AC3, according to their To-Do list.

Furthermore, the AC3 format is widely supported and compatible. How many A/V receivers do you know which are able to decode multi-channel AAC correctly, already?
Title: do we really know how good/bad is AC3 encoding?
Post by: probedb on 2010-03-28 20:38:26
In the end, except for the force of habbit, there is no real reason to use AC3 in 2010.


Yes there is, it's called compatibility. Can you imagine what would have happened if both Blu-Ray and HD-DVD just said, nope we're not supporting any old codecs any more? No-one would have adopted either format.
Title: do we really know how good/bad is AC3 encoding?
Post by: clintb on 2010-03-28 20:55:37
In the end, except for the force of habbit, there is no real reason to use AC3 in 2010.


Yes there is, it's called compatibility. Can you imagine what would have happened if both Blu-Ray and HD-DVD just said, nope we're not supporting any old codecs any more? No-one would have adopted either format.
Considering the average purchaser of HD-DVD and Blu-Ray had to purchase a new player for those discs, would the vast majority have even cared if AC-3 wasn't supported? Not likely. All Joe Public wants to know is: how do I hook it up, does it look better, which disc/format do I need to purchase for my player. That's about it. Outside of those basic questions, it becomes bithead territory. The player itself could be backwards compatible, but the discs didn't need to be.
Title: do we really know how good/bad is AC3 encoding?
Post by: sauvage78 on 2010-03-28 20:57:20
Quoting myself:
Quote
It gives to newbies the feeling that encoding a lossless blu-ray stream to aften AC3 5.1 is a better option than transcoding it to Nero AAC 5.1 ... unless you own a AC3 device for your living room, this is just not true. ... and nowaday with the flourishing H55 mini-itx motherboards even if you own an AC3 device in your living room I tend to think that it is also not true.


Using ac3 for compatibility in 2010 is a dying false-good reason ... with a Zotac H55-ITX WiFi (6 sata for 9+ tera octet video storage) & a Lian Li PC-Q08 you can decode whatever codec you want, almost wherever you want ... it is not as if AC3 compatible device would be DAP, I understand that mp3 doesn't die due to compatibility with all existing DAP. A mini-itx solution is not nearly as portable as a mp3 DAP (specially with 6 HDD inside...). But IMHO things are different for AC3.

AC3 compatible devices are not DAP, a mini-itx computer will easyly replace your divX (or whatever video codec)+AC3 decoding device in your living room ... nowadays a mini-itx solution with few HDD will not take more space in your leaving room than your old Divx/AC3 decoding device & will have the huge advantage to virtually decode every codecs (even not yet existing one+games) ... so in 2010 if you hang on to AC3 it's because you hang on to an old device that you already own... a 2010 newcomer has no reason to use an AC3 encoder, he only needs a AC3 decoder for backward decoding compatibility.

Encoding to AC3 in 2010 is a waste of time & audio quality & HDD space.
Title: do we really know how good/bad is AC3 encoding?
Post by: Arnold B. Krueger on 2010-03-28 21:58:17
Quoting myself:
Quote
It gives to newbies the feeling that encoding a lossless blu-ray stream to aften AC3 5.1 is a better option than transcoding it to Nero AAC 5.1 ... unless you own a AC3 device for your living room, this is just not true. ... and nowaday with the flourishing H55 mini-itx motherboards even if you own an AC3 device in your living room I tend to think that it is also not true.


Using ac3 for compatibility in 2010 is a dying false-good reason ... with a Zotac H55-ITX WiFi (6 sata for 9+ tera octet video storage) & a Lian Li PC-Q08 you can decode whatever codec you want, almost wherever you want ... it is not as if AC3 compatible device would be DAP, I understand that mp3 doesn't die due to compatibility with all existing DAP. A mini-itx solution is not nearly as portable as a mp3 DAP (specially with 6 HDD inside...). But IMHO things are different for AC3.

AC3 compatible devices are not DAP, a mini-itx computer will easyly replace your divX (or whatever video codec)+AC3 decoding device in your living room ... nowadays a mini-itx solution with few HDD will not take more space in your leaving room than your old Divx/AC3 decoding device & will have the huge advantage to virtually decode every codecs (even not yet existing one+games) ... so in 2010 if you hang on to AC3 it's because you hang on to an old device that you already own... a 2010 newcomer has no reason to use an AC3 encoder, he only needs a AC3 decoder for backward decoding compatibility.

Encoding to AC3 in 2010 is a waste of time & audio quality & HDD space.


So compatibiliy with mainstream surround sound equipment is a waste of time?
Title: do we really know how good/bad is AC3 encoding?
Post by: sauvage78 on 2010-03-28 22:20:12
As I already explained twice IMHO yes, with recent hardware you can easyly achieve surround sound more efficiently. Encoding to AC3 can only have some meaning if you already own an AC3 based surround solution & don't intend to upgrade.

People are still acting as if backward compatibility with AC3 in the video device world was as important as the backward compatibility with mp3 in audio device world (specially DAP) ... IMHO nowaday due to mini-itx solutions this is not true anymore. Maybe you just didn't realized yet that starting with the H55 chipset there are plenty of mini-itx motherboards & cases that are suddenly out to invade your living room. I could name you almost 10 motherboards/case like those. This is a recent hardware fashion but this is potentially a bulldozer for old living room divx devices that are now almost good for the delete bin.

You could defend your position in say 2000 (not sure of the exact timing) when no LCD TV had HDMI & when no mini-itx motherboard could replace your divX/AC3 device for the decoding ... in 2010 your argument about the importance of the backward compatibility with AC3 falls flat IMHO. You're just no up to date from an hardware point of view.

Encoding to AC3 in 2010 is inertia. I know that all the warez scene is going AC3 & that there are plenty of mkv (hd or sd) with AC3 around ... that doesn't mean that AC3 is a good codec as a final target. It only mean that keeping the original AC3 stream is the least worst option.

There is a big difference between keeping the original AC3 stream because you have no choice (which is clever) & encoding a lossless stream to AC3 (which is definitly not wise IMHO). The problem is that newbies don't understand this big difference. They don't understand that many people use AC3 as if it was lossless because it IS the original stream despite being lossy, they think that the AC3 stream they get is, like a mp3, a second hand encoding ... so they think that AC3 is a good codec because everyone use it which is a miss-understanding of what an AC3 stream is & from where it comes from.

What I am fighting against is not people playing back original AC3 streams, but people thinking that because AC3 is widely accepted AC3 would de facto be a good codec & that it would be a clever choice to encode a lossless stream to AC3 in 2010 ... IMHO, this is a shortcut & a lie simply.
Title: do we really know how good/bad is AC3 encoding?
Post by: krabapple on 2010-03-29 03:39:56
Is encoding 2.0 sources to AC3 really all that widespread?

Most peoples' encounters with AC3 will be via 5.1 'Dolby Digital' mixes on their DVDs.
Title: do we really know how good/bad is AC3 encoding?
Post by: probedb on 2010-03-29 09:14:57
Quote
So compatibiliy with mainstream surround sound equipment is a waste of time?

As I already explained twice IMHO yes, with recent hardware you can easyly achieve surround sound more efficiently. Encoding to AC3 can only have some meaning if you already own an AC3 based surround solution & don't intend to upgrade.


It's lucky you don't work for any major consumer electronics company then
Title: do we really know how good/bad is AC3 encoding?
Post by: probedb on 2010-03-29 09:18:18
Considering the average purchaser of HD-DVD and Blu-Ray had to purchase a new player for those discs, would the vast majority have even cared if AC-3 wasn't supported? Not likely. All Joe Public wants to know is: how do I hook it up, does it look better, which disc/format do I need to purchase for my player. That's about it. Outside of those basic questions, it becomes bithead territory. The player itself could be backwards compatible, but the discs didn't need to be.


I guess that's true but I think what sauvage78 is saying that you shouldn't be encoding to DD at all anywhere.

Most BR/HD-DVD players will reencode tracks into full bitrate DTS for compatibility so I agree with you on that  I do remember the amount of  going around when I got my HD-DVD player and they were outputing DTS when selecting the DD+ soundtracks.
Title: do we really know how good/bad is AC3 encoding?
Post by: Arnold B. Krueger on 2010-03-29 17:38:39
So I've been trying to learn about how good can the AC3 format be. Mp3 is excluded from the MPEG-2 spec (presumably b/c timing - AC3 was more mature at the time). But more interesting is that mp3 is also excluded from the Blue-ray spec, while AC3 is included. This doesn't mean that the standard-makers thought AC3 offers better audio reproduction than mp3, it could just be that lots of blue-ray discs will include better picture but the original already-encoded AC3 audio. And AAC audio has a higher ceiling and was there included over mp3.


I'm under the impression that like MP3, AC3 is a coding format that can be improved by improving the encoder. I'm further under the impression that people who license the latest-greatest AC3 coder from Dolby Labs have been getting something that has gone thorugh a number of generations of improvement.

It remains for someone to compare productions  that have been encoded using the latest-greatest AC3 encoder, and the source material to that encoder.
Title: do we really know how good/bad is AC3 encoding?
Post by: googlebot on 2010-03-29 17:47:07
The spec's bad choice of the very long minimum block size of 256 samples makes it pretty hard to improve things as transient handling above a certain point. Even if you employ the best programmers on earth.
Title: do we really know how good/bad is AC3 encoding?
Post by: Arnold B. Krueger on 2010-03-30 12:16:24
The spec's bad choice of the very long minimum block size of 256 samples makes it pretty hard to improve things as transient handling above a certain point. Even if you employ the best programmers on earth.


That would be one of those assertions that needs to be supported by some real world data. Where's the AC3 listening test performed with the latest-greatest encoders from Dolby?

Otherwise, you're basically messing with TOS 8.
Title: do we really know how good/bad is AC3 encoding?
Post by: googlebot on 2010-03-30 12:56:14
That would be one of those assertions that needs to be supported by some real world data. Where's the AC3 listening test performed with the latest-greatest encoders from Dolby?

Otherwise, you're basically messing with TOS 8.


At 48 kHz, a block size of 256 samples means that you have one frequency domain representation every 5.3 ms. But research, for example about the 'precedence effect', has shown that the auditory system can discern arrival times of wave fronts up to a difference of 2 ms.* AC3 is unable to satisfy such a capability with 5.3 ms long samples. As said, no programmer or "latest-greatest encoder" from Dolby can go beyond that.

In contrast, at the same sample rate, AAC can switch to blocks of 2.6 ms length.

* "Spatial hearing - the psychophysics of human sound localization" by J. Blauert, MIT Press
Title: do we really know how good/bad is AC3 encoding?
Post by: SebastianG on 2010-03-30 13:52:03
At 48 kHz, a block size of 256 samples means that you have one frequency domain representation every 5.3 ms.

Unless you switch to 2x128 which is also possible.

But research, for example about the 'precedence effect', has shown that the auditory system can discern arrival times of wave fronts up to a difference of 2 ms.

Ok.

AC3 is unable to satisfy such a capability with 5.3 ms long samples. As said, no programmer or "latest-greatest encoder" from Dolby can go beyond that.

This is nonsense. You're implying that a codec using a filterbank with 256 banks isn't able to represent arbitrarily small time shifts. This is wrong for the same reason why this is wrong: people claiming -- just because PCM is sampled -- it's not able to represent sub-sample time shifts. Yes it is. And so is AC3. Sampling just limits the signal bandwidth, nothing else.

The only thing noteworthy is that this time/frequency partition affects the way how quantization noise is distributed (i.e. "pre-echo"). You can fight pre-echo in three ways (or a combination of them) in AC3:
(1) switch to short blocks (2x128 instead of 1x256)
(2) use noise shaping in the encoder
(3) higher bit rates

Cheers,
SG
Title: do we really know how good/bad is AC3 encoding?
Post by: googlebot on 2010-03-30 14:27:35
Isn't the auditory system's receptivity to pre-echo directly related to its capability to discern closely followed events? So not its temporal resolution regarding the discrimination of stationary signals but its ability to discriminate transients or complex short signals. Once your partition length is above that, the distribution of quantization noise is not just a complex, but solvable, technical problem anymore, but impossible, as I understand it.

Do you have any reference for 2x128 blocks? I could not find anything.
Title: do we really know how good/bad is AC3 encoding?
Post by: timcupery on 2010-03-30 14:36:41
The spec's bad choice of the very long minimum block size of 256 samples makes it pretty hard to improve things as transient handling above a certain point. Even if you employ the best programmers on earth.


That would be one of those assertions that needs to be supported by some real world data. Where's the AC3 listening test performed with the latest-greatest encoders from Dolby?

Otherwise, you're basically messing with TOS 8.

Well Arnold, we've got to make do with the data we have here. The reason that I started this thread was precisely because there seems to be so little information about audio quality of the top AC3 implementations. And if the companies won't offer their encoders for ABX tests, the next best thing we can do is reason through the limits of the format.
Of course we can't make definitive statements about quality based on general understanding of format limitations, but such reasoning based on general understanding is better than nothing.
(note that I'm not saying the particular reasoning you questioned is right or wrong, just saying that this is a valid place for discussion to go in the absence of available data)
Title: do we really know how good/bad is AC3 encoding?
Post by: SebastianG on 2010-03-30 20:30:45
Once your partition length is above that, the distribution of quantization noise is not just a complex, but solvable, technical problem anymore, but impossible, as I understand it.

No, it's not. You have 6 blocks per frame and AC3 allows you to allocate more bits to a block that "needs" it (i.e. a block that contains an attack or something like that). These bits can be borrowed from the other blocks. Also, encoders may use noise shaping to temporally shape the quantization noise within a block. Also, encoders may switch to a 2x128 spectral coefficient block. Don't make me repeat myself for a third time. :-)

Do you have any reference for 2x128 blocks? I could not find anything.

Right here: http://multimedia.cx/mirror/a_52b.pdf (http://multimedia.cx/mirror/a_52b.pdf)
Look for "block switch"
Note, this specification tends to deal with window lengths. It often says something like "block length of 512 or 256" but that's just the window size. The number of spectral coefficients is 256 or 128 for the first half and 128 for the second half.

Cheers,
SG
Title: do we really know how good/bad is AC3 encoding?
Post by: googlebot on 2010-03-30 21:33:00
Sorry for being a PITA, your comments are very insightful, as always.

The spec says:

Quote
In the AC-3 transform block switching procedure, a block length of either 512 or 256 samples (time resolution of 10.7 or 5.3 ms for sampling frequency of 48 kHz) can be employed.

So you can't switch from a 256 sample to a 2x128 sample resolution, but only from 512 to 256*. For the stationary blocks of 512 samples 256 spectral coefficients are computed, for the short blocks of 256 samples (which I was talking about) 2x128 coefficients. So there isn't any additional possible step to increase temporal resolution beyond anything better than 5.3 ms. That should be half the maximum temporal resolution of AAC at the same sample rate or does AAC use blocks of 128 spectral coefficients for blocks of 128 samples?

For the record:

Quote
Normal blocks are of length 512 samples. When a normal windowed block is transformed, the result is 256 unique frequency domain transform coefficients. Shorter blocks are constructed by taking the usual 512 sample windowed audio segment and splitting it into two segments containing 256 samples each. The first half of an MDCT block is transformed separately but identically to the second half of that block. Each half of the block produces 128 unique non-zero transform coefficients representing frequencies from 0 to fs/2, for a total of 256. This is identical to the number of coefficients produced by a single 512 sample block, but with two times improved temporal resolution. Transform coefficients from the two half-blocks are interleaved together on a coefficient-by-coefficient basis to form a single block of 256 values.


* Not, that you would have said anything else. But you were talking about the number of coefficients, I was talking about the corresponding number of time domain samples.
Title: do we really know how good/bad is AC3 encoding?
Post by: krabapple on 2010-03-30 21:41:19
Well Arnold, we've got to make do with the data we have here. The reason that I started this thread was precisely because there seems to be so little information about audio quality of the top AC3 implementations. And if the companies won't offer their encoders for ABX tests, the next best thing we can do is reason through the limits of the format.



The DTS Pro Packer/Encoder/Encrypter software package (with no malware attached) is certainly floating out there in the interweb ether for, um, evaluation.  Don't know about pro level AC3 encoders but I would not be surprised if it's the same story.

I think the problem withlistening test  comparison would still makins sure it was apples to apples.  For awhile, both companies were putting out battling white papers touting themselves over the other, and matching the test conditions for both codecs was always a point of contention even in those.  What would be an equivalent settings for DTS vs AC3 in a comparison test.  Clearly just using the same bitrate is not correct.
Title: do we really know how good/bad is AC3 encoding?
Post by: SebastianG on 2010-03-31 08:25:16
[...] That should be half the maximum temporal resolution of AAC at the same sample rate

No it's not. If you define "time resolution" the way the AC3 spec does, then AAC also has a "time resolution" of only 5 ms. I put "time resolution" in quotes because I think that's just really a bad way of putting it and causing people to get the wrong idea. These time/frequency partitions don't inherently limit what signals you can represent.

or does AAC use blocks of 128 spectral coefficients for blocks of 128 samples?

In "AC3 spec speak" (the spec kind of uses "block" interchangably with the analysis/synthesis windows): One AAC mode has "256 sample blocks" that overlap 50% and produce 128 spectral coefficients each.

Possible AAC time/frequency partitions:
- 1x1024 coefficients per frame (1024 frequency bands)
- 8x128 coeffiicients per frame (128 frequency bands)

Possible AC3 time/frequency partitions:
- 1x256 coefficients per block (256 frequency bands)
- 2x128 coefficients per block (128 frequency bands)
- A frame divides the time into 6 consecutive blocks
Title: do we really know how good/bad is AC3 encoding?
Post by: googlebot on 2010-03-31 08:42:19
Thank you!
Title: do we really know how good/bad is AC3 encoding?
Post by: chrizoo on 2010-04-22 12:26:48
You can hardly rip a blu-ray with a mono-core barton sempron 3000+  so I gave up anyway.

You don't need a powerful computer, just a big hard drive and the tools (which I think would violate TOS if I mentioned). There's no transcoding necessary, and there are now many (though mostly unreliable due to bugs) HDMI solutions that will bitstream the bluray codecs even from individual files.

Why would it violate the TOS? After all the software is not illegal, is it?
Title: do we really know how good/bad is AC3 encoding?
Post by: Arnold B. Krueger on 2010-04-22 12:42:45
AC3 is unable to satisfy such a capability with 5.3 ms long samples. As said, no programmer or "latest-greatest encoder" from Dolby can go beyond that.

This is nonsense. You're implying that a codec using a filterbank with 256 banks isn't able to represent arbitrarily small time shifts. This is wrong for the same reason why this is wrong: people claiming -- just because PCM is sampled -- it's not able to represent sub-sample time shifts. Yes it is. And so is AC3. Sampling just limits the signal bandwidth, nothing else.


+1.


Title: do we really know how good/bad is AC3 encoding?
Post by: googlebot on 2010-04-22 13:28:06
+1.


-1