January 11th, 2009 by
Multimedia Mike
I processed some more unknown samples today, the ones that came from last month’s big Picsearch score. I found some interesting QuickTime specimens. One of them was filed under video codec FourCC ‘fire’. The sample only contained one frame of type fire and that frame was very small (238 bytes) and looked to contain a number of small sub-atoms. Since the sample had a .mov extension, I decided to check it out in Apple’s QuickTime Player. It played fine, and you can see the result on the new fire page I made in the MultimediaWiki. Apparently, it’s built into QuickTime. The file also features a single frame of RPZA video data. My guess is that the logo on display is encoded with RPZA while the fire block defines parameters for a fire animation.
Moving right along, I got to another set of QuickTime samples that were filed under ‘gain’ video codec. This appears to be another meta-codec and this is what it looks like in action:

I decided to post this pretty screenshot here since I didn’t feel like creating another Wiki page for what I perceive to be not a “real” video codec. The foregoing CumulusQuickTimeSlideshow.mov sample comes from here and actually contains 5 separate trak atoms: 2 define ‘jpeg’ data, 1 is ‘gain’, 1 is ‘dslv’ and the last is ‘text’, which defines ASCII strings containing the filenames on the bottom of the slideshow. I have no idea what the dslv atom is for, but something, somewhere in the file defines whether this so-called alpha gain effect will use a cross fade (as seen with the Cumulus shapes) or if it will use an Iris transitional effect (as seen in the sample na_visit03.mov here).
So much about the QuickTime format remains a mystery.
Posted in Video Codecs |
3 Comments »
November 15th, 2007 by
Multimedia Mike
If you have any experience in programming computer graphics, you probably know all about red/green/blue (RGB) video modes and pixel formats. Guess what? It is all useless now that you are working on video codec technology!
No, that’s not entirely true. Some video codecs operate on RGB video natively. A majority of modern codecs use some kind of YUV colorspace. We will get to that. Since many programmers are familiar with RGB pixel formats, let’s use that as a starting point.
RGB Colors
To review, computers generally display RGB pixels. These pixels have red (R), green (G), and blue (B) components to them. Here are the various combinations of R, G, and B components at their minimum (0) and maximum (255/0xFF) values:
| R |
G |
B |
color |
notes: |
| 0×00 |
0×00 |
0×00 |
|
absence of R, G, and B = full black |
| 0×00 |
0×00 |
0xFF |
|
full blue |
| 0×00 |
0xFF |
0×00 |
|
full green |
| 0×00 |
0xFF |
0xFF |
|
| 0xFF |
0×00 |
0×00 |
|
full red |
| 0xFF |
0×00 |
0xFF |
|
| 0xFF |
0xFF |
0×00 |
|
| 0xFF |
0xFF |
0xFF |
|
full R, G, and B combine to make full white |
YUV Colors
If you are used to dealing with RGB colors, YUV will seem a bit unintuitive at first. What does YUV stand for? Nothing you would guess. It turns out Y stands for intensity. U stands for blue and V stands for red. U is also denoted as Cb and V is also denoted as Cr. So YUV is sometimes written as YCbCr.
Here are the various combinations of Y, U, and V components at their minimum (0) and maximum (255/0xFF) values:
| Y |
U/ Cb |
V/ Cr |
color |
notes |
| 0×00 |
0×00 |
0×00 |
 |
| 0×00 |
0×00 |
0xFF |
 |
| 0×00 |
0xFF |
0×00 |
 |
| 0×00 |
0xFF |
0xFF |
 |
| 0xFF |
0×00 |
0×00 |
 |
full green |
| 0xFF |
0×00 |
0xFF |
 |
| 0xFF |
0xFF |
0×00 |
 |
| 0xFF |
0xFF |
0xFF |
 |
| 0×00 |
0×80 |
0×80 |
 |
full black |
| 0×80 |
0×80 |
0×80 |
 |
| 0xFF |
0×80 |
0×80 |
 |
full white |
So, all minimum and all maximum components do not generate intuitive (read: similar to RGB) results. In fact, all 0s in the YUV colorspace result in a dull green rather than black. That last point is useful to understand when a video is displaying a lot of green block errors– that probably means that the decoder is skipping blocks of data completely and leaving the underlying YUV data as all 0.
Further Reading:
Posted in Codec Technology, Video Codecs |
4 Comments »
April 27th, 2007 by
Multimedia Mike
Per my understanding, a lot of 3D hardware operates by allowing the programmer to specify a set of vertices between which the graphics chip draws lines. Then, the programmer can specify that a bitmap needs to be plotted between some of those lines. In 3D graphics parlance, those bitmaps are called textures. More textures make a game prettier, but a graphics card only has so much memory for storing these textures. In order to stretch the video RAM budget, some graphics cards allow for compressing textures using vector quantization.
A specific example of VQ in 3D graphics hardware is the Sega Dreamcast with its PowerVR2 graphics hardware. Textures can be specified in a number of pixel formats including, but not limited to, RGB555, RGB565, and VQ. In the VQ mode, a 256-entry vector codebook is initialized somewhere in video RAM. Each vector is 8 bytes large and specifies a 2×2 block of pixels in either RGB555 or RGB565 (can’t remember which, or it might be configurable). For the texture in video RAM that is specified as VQ, each byte is actually an index into the codebook. Instant 8:1 compression, notwithstanding the 2048-byte codebook overhead which can be negligible depending on how many textures leverage the codebook and how large those textures are.
Posted in Codec Technology, Vector Quantization, Video Codecs |
No Comments »
April 26th, 2007 by
Multimedia Mike
RoQ was first developed for the FMV-based adventure game The 11th hour and was later adopted by Id for the Quake III engine and derivative games.
RoQ operates in a YUV 4:2:0 space. However, it was developed for a game released in the late 1994/early 1995 timeframe. Back then, cutting edge video was 640×480 at 256 colors or maybe 64K colors. and it was not feasible to take a large video frame and convert the entire thing from YUV -> RGB 30, 24, or even 15 times per second. However, RoQ’s design solved some of these problems.
Read the rest of this entry »
Posted in Codec Technology, Vector Quantization, Video Codecs |
No Comments »
April 25th, 2007 by
Multimedia Mike
Sorenson Video 1 (SVQ1) makes me sentimental. It had a lot to do with why I started multimedia hacking. Strange that it all seems so simple now.
SVQ1 is a stark contrast to our last subject, Cinepak. SVQ1 does not store its codebooks in the encoded video bitstream. Rather, the codebooks are a hardwired characteristic of the coding scheme. That’s actually a really good thing considering that the algorithm is a hierarchical multistage vector quantizer.
Read the rest of this entry »
Posted in Codec Technology, Vector Quantization, Video Codecs |
No Comments »
April 24th, 2007 by
Multimedia Mike
Cinepak is a true classic among video codecs. It saw considerable use in the early days of FMV as it was easily encapsulated in both AVI and QuickTime files, the prevailing container formats in the early days of PC multimedia. It was also the standard FMV format on early CD-based consoles such as the Sega Saturn and Atari Jaguar.
Read the rest of this entry »
Posted in Codec Technology, Vector Quantization, Video Codecs |
No Comments »
April 23rd, 2007 by
Multimedia Mike
Someone was asking me about vector quantizer codecs recently. Sure, Wikipedia has the obligatory article. To its credit, the article is actually halfway useful these days (I seem to recall that it used to be a lot more impenetrable). It doesn’t help that the concept is identified by 2 terms that, by themselves, sound somewhat intimidating: ‘vector’ and ‘quantization’.
Anyway, he asked the right person about VQ codecs because I happen to love VQ codecs and can go on for days about them. In fact, I might do just that. I’ll start with a post about the theory and then describe specific examples in separate posts.
Read the rest of this entry »
Posted in Codec Technology, Vector Quantization, Video Codecs |
9 Comments »
November 4th, 2005 by
Multimedia Mike
This article is maintained in Wiki format at http://wiki.multimedia.cx/index.php?title=Frame_Types.
Ultimately, encoded video data needs to be decoded to 2-dimensional arrays of pixel values and presented to the user (or perhaps transcoded to a different format). All of these frames look complete to the user. But the frames often can not stand by themselves. They usually need information from other frames in order to make their presentation complete.
Let’s talk basic video frame terminology. First, there is the intraframe. This is also known as a keyframe. An intraframe is one that can stand on its own. It requires no other frames. It carries with it all the information needed to be decoded.
Read the rest of this entry »
Posted in Codec Technology, Video Codecs |
No Comments »
April 14th, 2005 by
Multimedia Mike
This article is now maintained as a Wiki page at http://wiki.multimedia.cx/index.php?title=Quantization.
I have never quite understood what is so hard about quantization. Maybe I am missing something but it seems to be primarily a matter of division (for quantization) and multiplication (for dequantization, a.k.a. requantization).
Read the rest of this entry »
Posted in Codec Technology, Video Codecs |
1 Comment »
March 23rd, 2005 by
Multimedia Mike
This article is now maintained as a Wiki page at http://wiki.multimedia.cx/index.php?title=Mean_Removal.
Mean removal is another one of those concepts– like differential coding– that sounds like it would be difficult to understand. It’s not.
Read the rest of this entry »
Posted in Codec Technology, Video Codecs |
No Comments »