Recently Paul B. Mahol asked me to take a look at LSVX codec (aka Lightning Strike Video Codec from Espre). Since the guy is working on Bink2 decoder for all of us, he deserves some respect. So here’s what I found.
Previously I took a glance on it, found that it’s based on tmndec 3.0
, kinda the reference decoder for H.263 and concluded it is an ordinary H.263 rip-off and hadn’t looked further. It turned out to be more interesting though.
LSVX frames start with 5-byte header where the second byte tells the frame type (0x01
, 0x08
and 0x09
are for normal frames, 0x05
is from skip frames; additionally if the first two bytes of the header are 0x78 0x01
then the header is followed by another eight bytes, usually with “lsvxv2.0” in them). Then almost normal H.263 stream follows—at least on a prolonged glance it seems to be the standard H.263 stream without any modifications of the headers (except maybe in motion vectors decoding). But there’s a catch! Key frames may have picture type 7 (reserved code in the standard) and then they’re coded with wavelets.
The wavelet coding is rather straightforward: you have a picture split into many bands, each of them is quantised and coded with a semi-adaptive binary coder. By that I mean that it uses models with fixed probabilities but it selects different context for different bits depending on previously decoded bits and in some cases the entier sets of probabilities may be switched mid-decoding. Beside that there are no special tricks like zero tree coding or fancy coefficient prediction.
Maybe I’ll write a decoder for it after all.
How many hybrid codecs there are (mixing wavelets with other coding)?
What wavelet is used in LSVX, some already known one?
IIRC there was/are some monster codec that combines many other codecs in “silly” way like mode for zip compression coding mixed with DCT standard kind of coding.
You’re thinking about Go2Meeting which combined JPEG coding of some tiles with lossless coding of another tiles (deflate or ePIC depending on version). Though this approach is rather effective, so there are many codecs combining DCT-based compression with some other form of lossy or lossless image coding, from Bink to MS Screen Video 2 to H.EVC (with SCC).
It’s hard to tell how many codecs in late 1990s-early 2000s had various methods thrown to the mix but it was surely a crazy time. Remember ClearVideo (DCT+fractals)? Nowadays it’s mostly just combining all possible coding approaches in one codec (so it’s a fine mix instead of standalone methods barely glued together) and hoping somebody smart will write an encoder that can take advantage of that.
As for LSVX, I think it uses some widespread wavelet, I’ll check it later.