A Audio, hi-fi and car audio  forum. Audio Banter

Go Back   Home » Audio Banter forum » UK Audio Newsgroups » uk.rec.audio (General Audio and Hi-Fi)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

uk.rec.audio (General Audio and Hi-Fi) (uk.rec.audio) Discussion and exchange of hi-fi audio equipment.

HDCD



 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old June 18th 12, 02:30 PM posted to uk.rec.audio
Arny Krueger[_2_]
external usenet poster
 
Posts: 200
Default HDCD

I seem to recall that there is a freebie HDCD decoder kicking around. What
does it do?

"Jim Lesurf" wrote in message
...
On 15 Jun, wrote:
In article ,
wrote:
Email address here?


http://dvdid.cjkey.org.uk/

Paul


Thanks! :-) I'll send him an email.


I've not had - as yet - any reply to the email. But in the interim I've
been doing some experiments trying to de-spread the LSB coding on three
discs with HDCD logos.

The Patent says the LSB control uses a maximum length sequence spreader
and gives as an example the (5.3) example. It also says the sequences are
39bit inc. a check. Which is consistent with (5.3) as that gives a 31 bit
pattern, so 39 could be the pattern plus a check byte.

To test that I wrote both an MLS encoder and matching decoder. These work
when I use one to feed the other, as per the textbooks.

One of the documents I've found about an HDCD ADC/recorder says that
recordings should start with about 100 ms of 'hdcd silence'. i.e. no audio
and a place to put a control pattern which the player/dac can then
unambiguously detect.

So I've tried the decoder on some discs. But this doesn't seem to give an
identifiable result. On one disc there is no such 'silence'. On others
quiet part seems to use the lowest *three* bits of samples. Not just the
LSB.

So I'm coming to the conclusion that this may be another example of how
the
patents and public documents simply obfuscate and don't actually tell
anyone what hdcd does (or doesn't!) or how.

I'll experiment when I get a chance with other MLS encoder/decoder pairs,
and perhaps do some correlations to see if I can pull patterns out of the
LSBs. But the more I examine HDCD the more dubious I get about both
regarding them as 'audio CDs' and the validity/reliability of the Patents,
etc. Increasingly looks like hype with the occasional use of a peak soft
limiter!

Slainte,

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics
http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html



  #2 (permalink)  
Old June 18th 12, 03:23 PM posted to uk.rec.audio
Jim Lesurf[_2_]
external usenet poster
 
Posts: 2,668
Default HDCD

In article , Arny
Krueger
wrote:
I seem to recall that there is a freebie HDCD decoder kicking around.
What does it do?


Good question. :-)

The only one I know of is the 'hdcd.exe' file that 'cjk32' released for
Windows some years ago. (Hence my looking for C J Key.) No source code was
released. Nor any specific explanation of the algorithm used, or what parts
of what the HDCD patent *claims* to do it decodes.

I *think* he also let someone working on BSD have a copy of the source. But
as yet I've not tracked that down if true.

I have a copy of hdcd.exe as it is still on the web. But it isn't much use
to me without a clear specification of what it does, and how. Without that
I can't tell if it works 'correctly' in terms of whatever any 'official'
HDCD dac/decoder is supposed to do.

AIUI MicroSoft took his code and say they put it into their software
players. But they bought the HDCD Patents. I have my doubts they actually
know or care about the details beyond it being another 'feature' they can
offer.

If you know of something else, please let me know.

If you read the HDCD Patent, etc, it makes a whole series of general
claims. And says the control codes are 'dithered' into the LSB stream every
now and then. It gives the example of a maximal length sequence as seems to
say that is how the control is made to mimic 'noise'. But no real details
of what the control codes *actually* are, nor the *actual* 'spreading'
process. Nor the details of any of the claimed applied effects.

An AES paper by Johnson shows the curve said to be representing the 'soft
limiting' HDCD can optionally apply to squeeze up the waveforms by 6dB. But
again, no real detail of how this is actually flagged, etc, etc.

I can easily apply a reverse gain correction for the soft clipping. If I do
that *assuming* it is present, then some recordings sound much better (less
compressed). But I still have no idea if the result is genuinely
'corrected' or just less nasty as the waveforms aren't so badly mangled. I
may just be making 'less bad' some of the compression applied by 'clever'
remastering gurus. Not really undoing that part of HDCD.

For all I know, that is all 'hdcd.exe' does... or it may do something
totally different. The Patents and blurbs claim HDCD lets you mimic wider
frequency bandwidth as well by furtling about with the digital filtering
and giving output upsampled to 88.2k. But zero details...

If I had an HDCD player I'd try seeing what that does to the discs. But at
present I don't have one. And it seems a bit mad to buy one just for a few
tests on a tiny number of discs. Particularly if it confirms my growing
feeling that HDCD is a combination of some (reversable) soft peak limiting
and much smoke and mirrors...

All an interesting example of how a Patent - which is supposed to tell
'skilled practitioners in the field' how to duplicate something - fails to
provide the real details required for the actual system in use.

I don't know if CJK reverse engineered the spreading and managed to assign
the codes for different purposes, etc. At present I doubt it. e.g. How
would you work out from the discs what the different replay FIR taps of the
reconstruction filter were meant to be? But I am keeping my fingers crossed
that he will eventually reply and give me some useful info.

Slainte,

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html

  #3 (permalink)  
Old June 19th 12, 04:05 PM posted to uk.rec.audio
froggy
external usenet poster
 
Posts: 22
Default HDCD

Le 18/06/12 17:23, Jim Lesurf a écrit :
(snip)


Not much of an engineer unfortunately, but does this help?

http://www.foobar2000.org/components/view/foo_hdcd

--
Froggy

Baldrick: I've got this big growth in the middle of my face.
Blackadder: That's your nose, Baldrick.

(Blackadder the Third)


  #4 (permalink)  
Old June 19th 12, 04:42 PM posted to uk.rec.audio
Jim Lesurf[_2_]
external usenet poster
 
Posts: 2,668
Default HDCD

In article ,
froggy wrote:
Le 18/06/12 17:23, Jim Lesurf a écrit :
(snip)


Not much of an engineer unfortunately, but does this help?


http://www.foobar2000.org/components/view/foo_hdcd


Thanks for that! :-)

The item on the page you pointed to is a Windows dll. So in itself not much
use to me. *But* it did also let me find the source code (in C and C++)
from the main foobar site. That may be very useful. :-)) The discussion is
also interesting as it seems to confirm some of my doubts about some
aspects of HDCD.

Thanks again,

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html

  #5 (permalink)  
Old June 30th 12, 07:01 AM posted to uk.rec.audio
Evelyn Carnate
external usenet poster
 
Posts: 1
Default HDCD

On 18/06/2012 16:23, Jim Lesurf wrote:

AIUI MicroSoft took his code and say they put it into their software
players. But they bought the HDCD Patents. I have my doubts they actually
know or care about the details beyond it being another 'feature' they can
offer.


It's a while since I looked at it but I thought Windows Media Player
would decode HDCD if you have a 24-bit sound card.
WMP11 on my laptop shows 'HDCD' in the bottom left corner when playing
an HDCD.

And I thought there were programs available that could intercept data
going to a soundcard and copy it to a file,
though whether these work in 24-bit I don't know.

--
Eiron.
  #6 (permalink)  
Old June 30th 12, 08:23 AM posted to uk.rec.audio
Jim Lesurf[_2_]
external usenet poster
 
Posts: 2,668
Default HDCD

In article , Evelyn Carnate
wrote:
On 18/06/2012 16:23, Jim Lesurf wrote:


AIUI MicroSoft took his code and say they put it into their software
players. But they bought the HDCD Patents. I have my doubts they
actually know or care about the details beyond it being another
'feature' they can offer.


It's a while since I looked at it but I thought Windows Media Player
would decode HDCD if you have a 24-bit sound card. WMP11 on my laptop
shows 'HDCD' in the bottom left corner when playing an HDCD.


AIUI both WMP and foobar will 'decode' HDCD. However I'm far for certain
that they do this correctly. I've been looking at the foobar code and it is
rather odd. And it says it is based on the C J Key code, which is also IIUC
what ended up in WMP.

And I thought there were programs available that could intercept data
going to a soundcard and copy it to a file, though whether these work in
24-bit I don't know.


I don't have any problem with recording digital output from a computer.
However:

1) I have no windows machines.

2) I have no idea if foobar or WMP actually do the job correctly.

3) I want to actually detect and examine the embedded codes and their
effects to see how HDCD *actually* works. The Patents, etc, are very vague
about that. I'm far from sure it works exactly as described. And I'd need
that to decide on (2).

4) There is also the issue of being able to develop 'open' decoders and
players and maybe even improve on HDCD once the patents lapse. That won't
be long now, I think. However we need the actual details - not just vague
descriptions and complied code that *might* work - to do that.

TBH so far my impression is that most HDCDs on the market simply use the
'solf limiting' to get LOUDNESS. Albeit in a way that a minority can
'correct'. This aspect is actually easy to correct *if* you can identify
affected material. So the CJK and foobar (and WMP) may get that right, but
I'm less sure of the other aspects.

I suspect there is a divide here. 'Classical Music' HDCDs may *not* use the
soft limiting much. But pop/rock probably use that and none of the other
claimed 'features' of HDCD. And for pop/rock the soft limiting decoding
will have a fairly obviously audible effect making HDCDs sound 'better'
when decoded. So promoting a myth that HDCD is better than CD when in
reality a CD simply recorded carefully at a lower level might sound as
good.

Slainte,

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html

  #7 (permalink)  
Old July 1st 12, 09:07 AM posted to uk.rec.audio
Jim Lesurf[_2_]
external usenet poster
 
Posts: 2,668
Default HDCD

Update for anyone interested...

On 30 Jun, wrote:
In article , Evelyn Carnate
wrote:
On 18/06/2012 16:23, Jim Lesurf wrote:


It's a while since I looked at it but I thought Windows Media Player
would decode HDCD if you have a 24-bit sound card. WMP11 on my laptop
shows 'HDCD' in the bottom left corner when playing an HDCD.


AIUI both WMP and foobar will 'decode' HDCD. However I'm far for certain
that they do this correctly. I've been looking at the foobar code and it
is rather odd. And it says it is based on the C J Key code, which is
also IIUC what ended up in WMP.


The more I look at the foobar 'source code' the more it looks like it isn't
all real useable code but a sort of 'pseudo-C' outlining the general
behaviour. For those who know 'C' the following comments are examples of
what is odd...

The .c file has no 'main()' nor is one referenced or somewhere else like in
the .h file. It is just some blocks of data and some proceedures.

Many variables have no starting value given before being used.

Many variables have no defined type.

In various places one variable is set equal to another with no casting.

It also does things like use 'samples' as an array name and 'sample' for
individual values, which makes reading a PITA as the container and the
contained have almost the same name. Oh, and in neither case is the type
clear. Nor is it clear if there are two sets (left and right) or one, with
a specific arrangement for left and right in one block.

And the control code detection process in the program seems to have no
relationship to what is described in the Patent, etc.

So - as with the Patent and AES paper - it seems to be a sort of 'hunt the
clues' set of writings rather than normal computer code. I'm wondering if
the 'C' version is just a set of notes. But I'm not sure if the C++ is any
better!

This in turn makes me wonder if WMP and Foobar actually do correctly and
fully 'decode' HDCD.

However I've started writing up an explanation of how HDCD *says* it works
and how it *says* it does this, along with some practical results and
comparisons to probe the claims. The lack of a reliable decoder doesn't
help. But I realised that it is useful that some discs are hybrids with an
SACD layer to compare with the HDCD-replayed-as-CD. :-) And for rock/pop
HDCDs it is of interest to simply expand out the peak soft limiting and
compare that with the as-a-CD results.

Anyone know what makers currently sell HDCD players? I know of the Oppo
(and it CA version) but that is a play-all BD player. Is anyone like Denon
or Marantz or other mid-market audio maker producing HDCD players? I'm
wondering what people are expected to play these discs on. (Apart from Linn
who, I imagine, assume you have to buy a Linn. Any other player is clearly
no good ahem as the results may show. ;- )

Slainte,

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics
http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html

  #8 (permalink)  
Old July 2nd 12, 11:59 AM posted to uk.rec.audio
Nick Gorham
external usenet poster
 
Posts: 851
Default HDCD

On 01/07/12 10:07, Jim Lesurf wrote:

However I've started writing up an explanation of how HDCD *says* it works
and how it *says* it does this, along with some practical results and
comparisons to probe the claims. The lack of a reliable decoder doesn't
help. But I realised that it is useful that some discs are hybrids with an
SACD layer to compare with the HDCD-replayed-as-CD. :-) And for rock/pop
HDCDs it is of interest to simply expand out the peak soft limiting and
compare that with the as-a-CD results.


Hi Jim,

I know you said that you have a coder looking at the source, but if you
need another set of eye's, throw the source at me and I will see if I
can work out what the code is doing without looking at any patients,
then you can compare that with what you think it should be doing.

Having been writing C for over thirty years (where did they go) I have
seen all you describe and more, and some of the things you describe may
be perfectly valid C

"The .c file has no 'main()' nor is one referenced"

It may be code that produces a library that is designed to be loaded at
run time, so the entry point will be something other than main().

"Many variables have no starting value given before being used."

Common in C, if static they will start as 0 by the loader, if automatic
then whatever is on the stack at that time. perfectly valid, and any C
coder would initialize before use if not at declaration.

"Many variables have no defined type."

Well, all variables will have a type, but in common with its origins, C
assumes the coder is competent, and will do as he/she says. So for
example void * is a perfectly valid type, its a pointer to something

"In various places one variable is set equal to another with no casting."

Again, perfectly valid, C has defined rules for those conversions, and
assumes the coder knows what will happen.

--
Nick
  #9 (permalink)  
Old July 2nd 12, 12:30 PM posted to uk.rec.audio
Jim Lesurf[_2_]
external usenet poster
 
Posts: 2,668
Default HDCD

In article om, Nick
Gorham wrote:

Hi Jim,


I know you said that you have a coder looking at the source, but if you
need another set of eye's, throw the source at me and I will see if I
can work out what the code is doing without looking at any patients,
then you can compare that with what you think it should be doing.


Hi Nick,

I'd *welcome* you having a look! I'm quite happy to accept that the problem
may be my lack of real understanding of both 'C' and 'C++'. I really would
love to find out how the program can be made to work. This would mean I (or
we.. or you! 8-] ) could produce both an analysis program and an example
that will 'decode' HDCD for test purposes, etc, so people can judge for
themselves on what HDCD does.

The code I've been looking at is available via a zip linked to

http://kode54.foobar2000.org/

where it is in 'foo_hdcd_source'.

The C++ is too much for me, and if I just look at the .c and .h for what
seems to me to be the 'C' alternative (hdcd_decode) I am baffled in the
ways I described! So I can make sense of some parts - like the peak lookup
table for correcting the peak limiting - but can't work out how to detect
the control codes (said to be) in the LSB stream.

Can you please contact me by email? e.g. replace the 'noise' in the name I
post under with 'web' as suggested by my website. I can then explain more
about what the HDCD is claimed to do, and how it is claimed to do it. If
you wish I can also let you have a draft of what I've written up so far.
inc some test results on some HDCDs.

Slainte,

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.SEO by vBSEO 3.0.0
Copyright ©2004-2025 Audio Banter.
The comments are property of their posters.