Log in

View Full Version : Meaning of yCol and yM in H.264 standard (8.4.1.2.1)


ArnoF
26th July 2007, 18:14
Hi!

As I am advancing on my task of implementing PAFF support into an H.264 decoder (no, not x264 unfortunately) as my Master's thesis, I ran across the table 8-8 in the standard, section 8.4.1.2.1. There, the values "yCol" and "yM" are mentioned, but are not explained. I reckon yCol means the y part of the mbAddrCol, but I am not sure (would that be "mbAddrCol / pic_width_in_mbs"?). yM seems to be a certain value according to table 8-8.

Also, I am not sure about the description below that table: "The partition in the macroblock mbAddrCol inside the picture colPic covering the sample (xCol, yM) is assigned to mbPartIdxCol and the sub-macroblock partition inside the partition mbPartIdxCol covering the sample (xCol, yM) in the macroblock mbAddrCol inside the picture colPic is assigned to subMbPartIdx."

For frame-only streams, yM is always = yCol and mbAddrCol = CurrMbAddr. Does that mean that the sub macroblock partition index of the co-located picture is the same as of the current picture?

As you can see, I am quite confused. Any help would be highly appreciated!

ArnoF
2nd August 2007, 08:55
Since apparently nobody is able to answer this question here - do you have an idea where or who I could ask it with a better chance of a response? Again, really _any_ help would be highly appreciated!

Sergey A. Sablin
2nd August 2007, 10:38
Since apparently nobody is able to answer this question here - do you have an idea where or who I could ask it with a better chance of a response? Again, really _any_ help would be highly appreciated!

since specification isn't helpful for you - try to ask developers of this spec here:
JVT maillist - http://mailman.rwth-aachen.de/mailman/listinfo/jvt-experts
BTW if you're familiar with C - check out JM source code to understand the logic.

ArnoF
2nd August 2007, 14:06
Thank you, Sergey. I have by now gotten an answer from the person who implemented the interlacing support into the JM reference decoder, so I will post the translation of the answer here in case somebody else has the same question:

CurrMbAddr is the address of the currently decoded macroblock. Without MBAFF, this is increasing from top left to bottom right, with MBAFF accordingly with Macroblock Pairs. mbAddrCol is the address in the Co-Located picture (so the reference). The goal of the process is to find out from where to read the reference data.

yCol is the sample position within the current macroblock
(according to the currently decoded macroblock partition)

For yM: If the structure of the current picture and the co-located picture are the same (both frame or both field), the data can be read from the same position, so yM = yCol. In the case Frame->Field or vice versa, the factor 2 in image size has to be taken into account (mapping to the same picture region), so that one has to try to find data that roughly fits the field parity.

In the JM reference decoder, the rules from the table 8-8 are more or less used for generating new reference pictures (a reference frame from a complementary field pair or two reference fields from a frame). This method is rather slow and takes lots of memory so that it cannot be recommended for "real-life" decoders.

Hope that helps... somebody! ;)