omion
15th October 2008, 22:25
This is a fairly technical question about the internals of AVC/H.264.
I'm currently writing a AVC decoder (sort of), but I need to know if motion vectors can be predicted from direct macroblocks.
Here's the problem: in CABAC mode, each partition's motion vectors use a ctxIdx based on the motion vectors of the partitions around it. But what if the partition next to the current one is part of a B-direct macroblock? Is that macroblock not used in the calculation, or are the derived motion vectors used?
The reason I'm worried about this is that in temporal mode, direct motion vectors are based off of different slices. If those motion vectors are used to decode other elements, that means that the CABAC decoding process of one slice requires information from other slices, a dependency I did not think existed.
[edit]Now that I look at the specs closer, it looks like this is probably not the case. Each motion vector only uses the macroblocks that also use the same reference list, and the wording implies that direct macroblocks do not, at least for that calculation. So it looks like the disaster is averted, for now. :)
I'm currently writing a AVC decoder (sort of), but I need to know if motion vectors can be predicted from direct macroblocks.
Here's the problem: in CABAC mode, each partition's motion vectors use a ctxIdx based on the motion vectors of the partitions around it. But what if the partition next to the current one is part of a B-direct macroblock? Is that macroblock not used in the calculation, or are the derived motion vectors used?
The reason I'm worried about this is that in temporal mode, direct motion vectors are based off of different slices. If those motion vectors are used to decode other elements, that means that the CABAC decoding process of one slice requires information from other slices, a dependency I did not think existed.
[edit]Now that I look at the specs closer, it looks like this is probably not the case. Each motion vector only uses the macroblocks that also use the same reference list, and the wording implies that direct macroblocks do not, at least for that calculation. So it looks like the disaster is averted, for now. :)