RV6: a blast from the past

So while various terrorist states try to prove they have better industry than russia, here’s yet another fun distraction.

It turned out that Peter Ross for some unfathomable reason decided to take a look at RealVideo 6. RealPlayer™ has RV11 support (which is FFmpeg with wrappers for calling their proprietary encoder and decoder for RV11), he played a bit with it. And since there’s one opensource decoder for RV6 (should be obvious which one), he contacted me with a list of changes to make it work fine not just on the only sample I had. Many thanks for that!

Beside various small mistakes there are several things that are rather curious:

  • RMVB container version 2 supports 64-bit offsets. Now all is left is to find a person willing to create RMVB files over 4GB in size;
  • chroma motion compensation case (¾,¾) is the same as (¾,½);
  • loop filtering formula was changed from |p0-q0|*lim1 < 512 to ((|p0-q0|*lim1) & ~0x7F) <= 384. They should be equivalent (even if I can't bother to prove it) but the change is still baffling;
  • and it turns out that delta quantisers are once per CU instead once per one row. More about it below.

So what's the deal with delta quantisers? When I REd the code, the binary specification had all debug information left inside. So when you see a function named Decoder::parseBitStream_CUOneCULine() that calls decodeCUQPOffset() once before calling decodeAndReconstructCBTree() in a loop you'd presume it reads DQP once per one row of CUs yet it turned out to be one DQP per CU (also reasonable but not what you expect from the function name). The thread management code that sets various parameters for slice decoding and calls the function is too messy to figure out parameters from it (I tried and got a number of 4 CUs per call unless it's at the end of row—which is obviously wrong).

It's nice to see that RealVideo 6 keeps up the traditions of previous RealVideo versions.

Comments are closed.