HDCD: Does anyone know how to decode it

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Here is half of the answer :


HDCD frame is 42 or 50 bits long :
- header (32 bits) : fixed value used to detect frame start
- version (2 bits) : could be 1 or 2. version 1 don't have the "check" part
- cmd (8bits) : the real payload
- check (8 bits) : only present in version 2. equal to ~cmd

The cmd bits contain the command to apply to the audio stream :
- 4 lower bits : set the variable gain
- bit 5 : peak extension ( a non linearity, looking like old tape saturation, that could be applied at recording stage and must be undo in the HDCD decoder if this bit is at 1).
- bit 6 : not sure, but I see HDCD recording that switch this bit between 0 and 1 . I think it's oversampling FIR filter selection.
- bit 7&8 : don't know, probably not used (never see at 1 in any HDCD recording).

Note : some recording have HDCD frames with cmd=0 all the time. So they only light the HDCD led on the CD player but don't do anything to the audio data ...

These HDCD frames are hidden in the LSB of the audio via a scrambler.
To decode it you need to :
1) pass the LSB of audio stream into a shift register to memorize the n past received bits.
2) xor the current received bit with 2 other bits from the shift register to get the decoded stream.
3) detect the start of frame , in the decoded stream, by looking for the 32 bit frame header.

That's all folks.
You have near all what is needed to decode a HDCD frame.
It lacks only :
- the value of the 32 bit fixed frame header
- which 2 bits of the shift register must be used

For the bits in shift register,they have been chosen in order that the corresponding polynomial is primitive.
Take a look here :
http://www.eng.auburn.edu/~strouce/class/elec6250/LFSRs.pdf
They have a very interesting list of primitive polynomials on the last slide.
 
Last edited:
...I have never figured out what their interest was in this technology was...

Kevin, the rumor I had heard was that Microsoft was interested in Pacific Microsonic's particular technique of embedding control information within media content data, where that control information is made to appear as low level psuedo-random noise/dither. If that were true, then it's easy to imagine that their interest possibly had to do with some kind of digital media copy protection scheme embedded in the content file as dither noise. I don't know what they actually did with the technology, if anything. That is, other than stopping further commercialization of HDCD audio. Damn you, Bill Gates!!:headbash: - LOL
 
Last edited:
Exactly. I don't think this point, about the protection of commercial rights in exchange for spurring further innovation by others, is often understood. Too many engineers seem to be under the impression that a patent forbids building and experimentation utilizing a protected innovation, when patents are actually intended to promote just such activity.

Not to protect financial property? ...The rights of inventiveness, and keep others away from developing similar beneficial gains. :innocent:
 
Hi Linuxfan,

Thanks for your info. I'll see if I can get a hold of the programmer on the doom9 forum, maybe he's willing to share the algorithm with me!

Another poster stated the method of encryption with a few missing pieces of info, if I get those, I should be able to do something.

Best regards,

Hans
 
Not to protect financial property? ...The rights of inventiveness, and keep others away from developing similar beneficial gains.
The Congress shall have power ... To promote the progress of science and useful arts, by securing for limited times to authors and inventors the exclusive right to their respective writings and discoveries;

basic contracts - an exchange of value

government issued patent == publish details for all to read in exchange for a time limited legal monopoly

otherwise you get attempted monopoly through secrecy which slows innovation

and inventions that can be determined by inspection are immediately copied reducing returns to the inventor reducing incentive
 
The Congress shall have power ... To promote the progress of science and useful arts, by securing for limited times to authors and inventors the exclusive right to their respective writings and discoveries;

basic contracts - an exchange of value

government issued patent == publish details for all to read in exchange for a time limited legal monopoly

otherwise you get attempted monopoly through secrecy which slows innovation

and inventions that can be determined by inspection are immediately copied reducing returns to the inventor reducing incentive

Sony, Samsung, Apple, LG, Sharp, Microsoft, ... they have fun suing each other over patents and copying each other's ideas? :)
 
Sony, Samsung, Apple, LG, Sharp, Microsoft, ... they have fun suing each other over patents and copying each other's ideas? :)

A patent doesn't come with an obligation by the Gov't to actively enforce that patent. You have to sue in court, at your own expense, to protect it against commercial infringement. Which can be costly. So, you most often see large corporations bringing suit. The government's interest is in widely promoting innovation to stimulate overall economic development.

In the U.S., the patent system is fully intended to reveal the key technical details of some innovation so that further innovation might be made by others. The legally protected commercial rights period is provided in compensation for such open revealing. Which means, the U.S. government wants there to be education, experimentation and laboratory development (whether corporate campus, or in your home basement) based on those patented innovations. Commercialization (selling products utilizing that the innovation to others) is a related but different issue.
 
Last edited:
...And if you have a great design (invention) without a patent?

In that case, you make your money while you can. In fact, you should be so lucky as to attract the attention of the big corporations, for that would mean your innovation likely made you a goodly amount of money. Yes, the corporations will take your idea, but you'll likely have done pretty well financially with it by then. Perhaps, well enough to afford to patent your next innovation and protect it in court. This is just the reality when you are a little fish swimming with big fish. You have to accept that part of your meal is going to be taken from you. You keep trying to stay alive and grow to be a bigger fish yourself.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.