codec question: All-I vs. Long GOP

Gene Sung

Veteran
I noticed that with the new GH3 and the 5D3 they are using an All-I codec verses a Long GOP codec used in Sony FS cameras. What is the difference? Does it treat motion differently? Is the All-I considered a more advanced codec?

Plus I noticed the bit rates are considerably higher on the GH3 and the 5D3, does this make a big difference in image quality?
 
All-I is the simpler of the two. It means that every frame is encoded independent of the other frames, like a series of jpeg images. GOP stands for "Group Of Pictures." With a long-GOP codec, only certain frames are encoded individually (these are called the intra-frames, or I-frames). To get the rest of the frames between the I-frames, the codec only records the changes in the image from one frame to the next, rather than the whole image. This allows the codec to squeeze the video into a much smaller bitrate than an All-I codec could, without much degradation in quality. The downside to long-GOP is that it is much more processor intensive than all-I, generally, making it harder to edit with. Additionally, there may be subtle motion artifacts in a long-GOP codec that you wouldn't get with all-I. All-I, however really needs a significantly higher bitrate to retain a quality image than long-GOP.
 
Last edited:
All-I (All Intra-Frame) is considerably LESS advanced than long GOP.

In All-I, each frame is compressed as an individual picture, like creating a sequence of JPEG images. The technology is pretty similar to that, in fact, although it (generally) uses a different algorithm. Since image compression is a pretty mature technology, the degree of compression you get this way for a given quality is fairly consistent.

Long GOP (Group Of Pictures) codecs, like H.262 (used in MPEG-2) or H.264 (used in MP4, AVCHD, etc), compress occasional frames (I-frames) the same way, but then compress a bunch of frames between the I-frames as differences to the I-frames. This results in a very significant ADDITIONAL compression factor, as in many cases the pixels don't change much between frames, and so the diffs can be represented as smaller numbers, which in turn get coded into fewer bits (entropy coding). Thus you use fewer bits FOR A GIVEN QUALITY. Of course it's very hard to judge precisely, because quality is subjective, and the flaws in long GOP codecs tend to be different to those in all-I codecs.

There's a lot of development going on in long GOP codecs. H.264 is about twice as good as H.262 (MPEG-2) (somewhere around half the bitrate for a given quality), because it takes the concept very far indeed, with features like sub-pixel motion compensation used to keep the differences very small even when parts of the picture are moving. H.265 is claiming to be twice as good AGAIN.

So the benefit of long GOP is a lower (much lower) bitrate for a given quality -- BUT only if you do the work to encode it well. H.264 got a bad name because lots of cameras just don't have the CPU power to do it well; Sony's FS cameras have proven that done right, it can be awesome. The downside is a more expensive camera, because that's a lot of electronics. The upside is cheaper media (SD cards).

Lots of folks have compared 24 Mbit/second AVCHD on the FS cameras against 220Mbit/sec ProRes (an all-I codec), and concluded that they are pretty close in terms of quality -- despite the ProRes using 9x as much data.

All-I codecs can be easier for some NLE's to ingest and edit (less seeking and processing to get to a given frame). Personally I don't see much or a problem using AVCHD in Adobe.

So for my money, I personally would take a camera with superbly-well implemented H.264 against an all-I codec, just to save cash on media and ease the workflow. Of course in both cases more bits is generally going to be better; but with H.264, the processing horsepower available matters a LOT.


(Edit: Wesley says it great... with fewer words.... :))
 
I'm a tad concerned about the All-I, just based on the numbers. Intraframe, with proper encoding, at adequate bitrate, is the ideal, and why ProRes and AVC-Intra and AVC-Ultra are intraframe, and they can make for a better playback and editing experience too. However, at a given bandwidth, you can squeeze more out of long-GoP than you can out of intraframe, simply because it gives you one more tool in the toolbox.

Long-GoP can be done well (220mbps long-GoP on the NanoFlash is nigh unto perfect), or it can be done hideously awfully. An example of hideously awful is the HDV format, or, even worse, the original GH1 codec. HDV was bad, but the GH1's codec was even worse. It was nominally ... what, was it 17mbps? But it was a primitive 17mbps. They didn't have much processing going on, they didn't take advantage of advanced codec techniques, and as such it was terrible. TER-RI-BLE. The hack brought it up to a usable state by vastly increasing the bandwidth -- which is the same trick that Canon's DSLRs use, they have a pretty weak codec but they run it at 40 to 50 megabits to overcome how limited it is.

On the other hand, Panasonic's AVCCAM and Sony's NXCAM use a very sophisticated toolset and turn out video at 24mbps that is vastly superior, more robust, and better encoded than what a Canon DSLR's 50mbps long-GoP codec could do.

So now we get to All-I. All Intraframes would be nice if there was enough bandwidth, and the codec was sophisticated enough. JPG isn't all that sophisticated for movies, and MJPG at 72mbps would look pretty mediocre. AVC-Intra, at 24fps, runs at 80mbps and it's superb. So it depends on how sophisticated the codec is and what toolsets it uses, as the AVC family includes lots of technologies that are, frankly, optional (hence why the GH1 could call itself AVCHD, even though it didn't use the most important long-GoP tool, B-frames).

So why would I be concerned about 72mbps All-I? Only because it's not much of a jump in bitrate from the 50mbps Long-GoP that they offer. If the 50mbps long-GoP is coded well, it should (I would think) be really superior to 72mbps All-I. You'd probably have to go to 100mbps All-I to match the efficiency and quality of 50bmps of well-done Long-GoP. So the question is -- how well implemented is the codec family in the GH3? It's possible that All-I uses more sophisticated processing than the long-GoP 50mbps, but frankly I would think that would be quite unlikely. Possible, but unlikely -- I mean, I guess they could take the time savings from not implementing GoP and use that processor power to more efficiently encode the I-Frames, but I'm not expecting it.

But this is all speculation. We don't know until we work with it and test it. With a gun to my head, I'd have to say that I would expect the 50mbps long-GoP to outperform the 72mbps All-I, all other things being equal. But are they all equal? That's what we don't know!
 
I've got my fingers crossed that the GH3's 24 Mbps AVCHD is equivalent in quality to AVCCAM in Panasonic's camcorders. If they took that same codec...and then more than doubled the bitrate to 50mbps, the result should be very robust indeed. (At least as far as 8-bit 4:2:0 goes, anyway.)

72 mbps for all-I does seem low, but it's not very far removed from AVC-Intra's bitrate. The GH3 is also not doing 4:2:2 and 10-bit, so it probably doesn't need quite as many bits. It's possible that there might be some corner cases involving heavy movement throughout the scene where all-I might have an advantage. I'm not 100% sure, but I think I remember Philip Bloom saying that they used all-I for "Genesis," and that it was pretty capable.

But..yeah. We'll see.
 
Back
Top