Below are two segments of code from the FFMPEG library, specifically located here: libavcodec/h263data.h (http://ffmpeg.org/doxygen/0.6/h263data_8h-source.html).
I would like to know more about how these two segments operate in the larger context of the codec library. Below, after these examples, I describe my understanding thus far and provide two clearer questions that I would like answers on.
Thank you for any help!
EXAMPLE 1
00035 /* intra MCBPC, mb_type = (intra), then (intraq) */
00036 const uint8_t ff_h263_intra_MCBPC_code[9] = { 1, 1, 2, 3, 1, 1, 2, 3, 1 };
00037 const uint8_t ff_h263_intra_MCBPC_bits[9] = { 1, 3, 3, 3, 4, 6, 6, 6, 9 };
AND EXAMPLE 2
00039 /* inter MCBPC, mb_type = (inter), (intra), (interq), (intraq), (inter4v) */
00040 /* Changed the tables for interq and inter4v+q, following the standard ** Juanjo ** */
00041 const uint8_t ff_h263_inter_MCBPC_code[28] = {
00042 1, 3, 2, 5,
00043 3, 4, 3, 3,
00044 3, 7, 6, 5,
00045 4, 4, 3, 2,
00046 2, 5, 4, 5,
00047 1, 0, 0, 0, /* Stuffing */
00048 2, 12, 14, 15,
00049 };
I understand that we're looking at a small part of the larger library of compression algorithms that affect orthogonal schemes, which predict the “correct,” or more aptly put, "original" inter- or intra-motion vectors, which are represented here in the names "ff_h263_inter_MCBPC_code," "ff_h263_intra_MCBPC_code," and "ff_h263_intra_MCBPC_bits."
I know that the names in these two blocks of code demarcate the following:
const refers to the declaration of a read only variable that can still be used outside of its scope like any other variable. The difference, stated in another way, is that the values in this array cannot be changed by any methods called outside of itself.
uint8_t is an unsigned integer with a length of 8 bits that is part of a C99 standard, which is called "fixed width integer types." This particular type, an “exact width integer,” computes a range of signed or unsigned bits with a minimum value of 0 and a maximum value of 8, (i.e., the 8x8 macroblocks), which guarantees this number of bits across platforms, whether, let's say, 32-bit or 64-bit operating systems. (I researched this bit here: “Fixed width integer types” http://en.wikipedia.org/wiki/Stdint.h#stdint.h)
MCBPC refers to Macroblock Type & Coded Block Pattern for Chrominance, but I don't fully understand the exact role of these particular arrays are in the scheme of the file and libavcodec. I understand more conceptually, than I do the details/number values defined in these examples.
So, considering this, here's what I would like to know more about:
Is my understanding, thus far, off in any way?
Can someone help breakdown what each code segment does? more specifically, what do these number values signify/do in each case?
What does "Stuffing" mean?
Thank you, again, for any help in this matter!