[Mp4-tech] [H.264] A question about the mbAddrCol calculation
JK Kim
kjk mcubeworks.com
Mon Aug 7 12:41:30 EDT 2006
Sorry for the former reply, which was sent by mistake :-).
As you know, all are coming from the fact
that a reference and a current have different geometric scale.
Current 1 MB is mapped to Reference 2 MB.
So, upper 8 rows are mapped to upper MB in reference,
and lower 8 rows are mapped to lower MB in reference.
That is,
(yCol/8) is used for getting corresponding MB, mbAddrCol,
and (yCol%8) is used for getting position, yM.
Reference Current
|--------| = = = => |--------|
| | | |
| | * *> | |
| | * | |
|--------| * #> |--------|
| |
| | #
| | #
|--------| #
Upper mb_num MbX = CurrMbAddr %
PicWidthInMbs
= PicWidthInMbs*2*MbY + MbX MbY = CurrMbAddr / PicWidthInMbs
Lower mb_num
= PicWidthInMbs*(2*MbY+1) + MbX
("Lower" means yCol>=8)
= PicWidthInMbs*(2*MbY+yCol/8)+MbX
yM (scale is twice, so two times) yCol
= 2*yCol - (y of corresponding MB)
= (2*yCol) % 16
I wish this will help you.
Regards,
JK
________________________________________
From: mp4-tech-bounces lists.mpegif.org
[mailto:mp4-tech-bounces lists.mpegif.org] On Behalf Of Tan Rui -- Huawei
Sent: Friday, August 04, 2023 7:25 PM
To: mp4-tech lists.mpegif.org
Subject: [Mp4-tech] [H.264] A question about the mbAddrCol calculation
Hi, All experts,
When I read the section 8.4.1.2.1 in the H.264 protocol, I find that the
calculation about the mbAddrCol is very difficult to understand.
For example, the mbAddrCol1 is calculated as the following:
mbAddrCol1 = 2 * PicWidthInMbs * (CurrMbAddr/PicWidthInMbs) + (CurrMbAddr %
PicWidthInMbs) + PicWidthInMbs * (yCol / 8)
I know the above calculation will occur at the Frm-to-Fld condition. I think
the first item [ 2 * PicWidthInMbs * (CurrMbAddr/PicWidthInMbs) ]
will get the co-located row number in the co-located frame and the second
item [ (CurrMbAddr % PicWidthInMbs) ] will get the column
number. But how about the third item? Why yCol need divide by 8 ? I can not
figure it out. Can some one make it clear to me? Thanks.
Tan Rui
2023/08/04
More information about the Mp4-tech
mailing list