A trade secret that can be reverse engineered by a tinkerer with an oscilloscope in an afternoon.
This is more or less the type of situation patents were invented for: a simple invention anyone can copy once it's invented, but difficult (I assume) to invent in the first place.
It's why I don't like most software patents, but why I think codecs, especially the modern ones, should be patentable. They're complicated engineering challenges requiring you to make numerous tradeoffs and I feel that just because the result is an algorithm doesn't mean that it shouldn't be patentable.
Other software patents I'm more dubious of, but I feel comfortable saying H.264 should be patentable.
Totally agree. However in many cases, the main technology is invented at universities with public funding. Also, codecs are a means of communication, and I don't think it should be patentable because it can cause problems once everybody settles on a single standard. See the MPEG nightmare, where professional cameras have a license attached to any movie shot with them.
Secrecy and patents are mutually exclusive. The deal you get with the patent is you disclose you invention so secrecy doesn't hinder progress too much and in exchange you get exclusivity.