Clarification of specification

"Chris Brien" <[email protected]>
Newsgroups gmane.comp.multimedia.ogg.theora.devel
Organization Codian
Message-ID <[email protected]>
Hi

I'm trying to make sense of the macroblock coding modes in section 7.4 of  
the Theora spec.

The text in the specification is:

(d) For each consecutive macro block in coded order (cf. Section 2.4)
     indexed by mbi:
     i. If a block bi in the luma plane of macro block mbi exists such
        that BCODED[bi ] is 1:
        A. If MSCHEME is not 7, read one bit at a time until one of
           the Huffman codes in Table 7.19 is recognized, and assign
           MBMODES[mbi] the value MALPHABET[mi], where mi
           is the index of the Huffman code decoded.
        B. Otherwise, if no luma-plane blocks in the macro block are
           coded, read a 3-bit unsigned integer as MBMODES[mbi].
    ii. Otherwise, assign MBMODE[mbi] the value 0 (INTER_NOMV).


The problem is that, as written, step d/i/B will never be executed. The  
logic is

let x be the phrase "there is a coded luma plane block in this macroblock".
if (x)
{
	if (y)
	{
	}
	else if (!x)
	{
		/* Can't get here! */
	}
}
else
{
}

I assume that the text
B. Otherwise, if no luma-plane blocks in the macro block are
coded, read a 3-bit unsigned integer as MBMODES[mbi].
should simply read
B. Otherwise, read a 3-bit unsigned integer as MBMODES[mbi].
which simplifies the logic to:
if (x)
{
	if (y)
	{
	}
	else
	{
	}
}
else
{
}


Is this correct?

Oh, and theres a typo in step d/ii - MBMODE should be MBMODES.

Chris Brien
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.