RV8 or RV30 is close to earlier H.264 drafts and Sorenson Video 3, because they both use one variable-length code (Golomb codes in case of SVQ3, something special in RV30/RV40) to represent macroblock information (type, intra prediction modes). RV40 uses this code only to represent motion vectors and number of macroblocks to skip, macroblock type and intra prediction modes are coded with variable-length codes chosen from the set of them depending on context.
Here are the main differences from H.264:
- Different bitstream. Special codes for elements and own substitution of Golomb code.
- Intra prediction types are specified only for luma subblocks, chroma subblocks use some of them for prediction too.
- Intra prediction modes are slightly different and some of them require additional context (down left neighbour).
- Bidirectionally predicted blocks in B-frames do not use motion vectors from the previous/next frame in motion vector prediction while using them in motion compensation.
- Intra prediction for intra blocks in interframes is performed even when neighbouring blocks are not intra blocks.
Main differences between RV30 and RV40:
- Bitstream syntax and different codes (RV30 is easier in this matter).
- RV30 does not have 8×16 and 16×8 motion compensation modes (while 8×8 mode exists).
- Different motion vector prediction algorithm.
- B-frames in RV30 do not contain some variant of bidirectionally predicted blocks which RV40 has.
And now here is the list of things I didn’t like in RV30/40:
- Slice header does not contain number of macroblocks coded in this title. While it saves whopping 6-13 bits per slice (and frames usually have less than a dozen of slices, usually two or three), it gives unnecessary pain to implementor.
- Vertical left intra prediction method uses down left neighbour pixels in calculation for one insignificant pixel (it’s insignificant because it does not affect further intra prediction).
- Motion vector prediction is a bit complicated too.
- And, of course, the lack of good documentation
Excellent summary. This might make a good Wiki entry as well.
I’m also writing an article about format and decoding process for both RV30 and RV40
I can’t pretend to have read up enough on video codecs to understand a lot of that, but I want to say thank you. Your work on RV30/40 is a great asset for the free software and open source communities. Integrated into a plugin that supports the right streaming protocols (Mplayer?), maybe the day when I can watch more currently inaccessible content (BBC, I’m looking at you) isn’t *too* far off…
I can dream. Good work.
Hi Kostya,
So hows ya progress on the mentioned article 😀
Good luck!
Does rv40 perform the loop filter of chroma pixels??