[Mp4-tech] Deblocking, extra horizontal edge
Erik Olsson
eoolsson gmail.com
Thu Aug 10 12:27:56 EDT 2006
Hi all,
In the JM decoder, as well as in the standard, an extra horizonal edge
is filtered between (top MB of) a frame macroblock pair and a field
above it. I am trying to figure out this part but have encountered
some problems. My understanding of the matter is:
In JM, the first pass is done using the top mb of the above neighbour
(which is in field mode). The second pass uses the above neighbours
bottom mb.
According to table 6-4 in the standard (neighbouring locations in
MBAFF frames), the upper neighbour of a frame coded top MB is always
mbaddrB + 1, i.e. the bottom MB of the MB pair. But JM has a special
case for deblocking, to get the upper MB instead. Where in the
standard can I find some information about this "special" neighbour
relationship during deblocking?
The current MB (in frame mode) uses a vertical increment of 2 (incQ)
in order to only process those lines that correspond to the current
upper neighbour (which of course uses an increment of 1).
First pass (yQ=0):
Upper neighbour: bottom lines of top MB
Current MB: even numbered top lines (0,2,4,6)
Second pass (yQ=1):
Upper neighbour: bottom lines of bottom MB
Current MB: odd numbered top lines (1,3,5,7)
In the standard, when this case happens (field MB pair above frame MB
pair), the process in subclause 8.7.1 is invoked 2 times (first yEk=0,
then yEk=1) with fieldModeFilteringFlag = 1, which in turn means that
dy is set equal to 2. dy is then used both when indexing the upper
neighbour and the current mb, unlike JM which in this case will have a
different increment for the Q and P blocks.
First pass (yEk=0):
Upper neighbour: every 2nd bottom line of bottom MB
Current MB: every 2nd top line
Second pass (yEk=1):
Upper neighbour: every 2nd bottom line of bottom MB, offset by 1
Current MB: every 2nd top line, offset by 1
Have I misinterpreted the standard and/or JM? How come there is such a
difference?
Both in the standard and JM, since the boundary strength in this case
will not be 4, there will be 2 samples filtered on each side of the
edge. After both passes, in total 4 samples have been filtered on each
side, e.g. lines 0,1,2,3 in the current MB. This is unlike the case
where there is a frame mb pair above a frame mb pair, where only 2
samples would have been filtered. Why is the range of filtering
different between these 2 cases?
Very thankful for any help in clarifying these things,
Erik
More information about the Mp4-tech
mailing list