johnslion
23rd May 2005, 04:20
Hi, all:
I am reading H.264 source codes, I found that the motion estimation part in both x264 and JM project are working in marcoblock level, detecting a marcoblock's motion vector and type just before encoding the marcoblock and then do next macroblock"s ME..., not like some mpeg4 projects, such as xvid, working in frame level, doing whole frame MB motion estimation and store the MVs and macroblocks' type, then do marcoblock encoding one by one with these data.
In my opinion, do frame level motion estimation procedure will decrease the cache read miss, because the reference frames will be always in cache lines, but if the motion estimation procedure in marcroblock level, the reference frame data will be kicked out the cache because there are lot of memory access in marcoblock encode process.Less cache read miss will benefit performance.
And I also think about multi-frames reference, if the marcoblocks can seldom found their reference in nearest reference frame, then the frame level me and MB level ME might got same cache miss.But this happens little.
So, what do you think about motion estimation whole frame or motion estimation MB -> MB encode -> ME MB -> MB encode .....?
I am reading H.264 source codes, I found that the motion estimation part in both x264 and JM project are working in marcoblock level, detecting a marcoblock's motion vector and type just before encoding the marcoblock and then do next macroblock"s ME..., not like some mpeg4 projects, such as xvid, working in frame level, doing whole frame MB motion estimation and store the MVs and macroblocks' type, then do marcoblock encoding one by one with these data.
In my opinion, do frame level motion estimation procedure will decrease the cache read miss, because the reference frames will be always in cache lines, but if the motion estimation procedure in marcroblock level, the reference frame data will be kicked out the cache because there are lot of memory access in marcoblock encode process.Less cache read miss will benefit performance.
And I also think about multi-frames reference, if the marcoblocks can seldom found their reference in nearest reference frame, then the frame level me and MB level ME might got same cache miss.But this happens little.
So, what do you think about motion estimation whole frame or motion estimation MB -> MB encode -> ME MB -> MB encode .....?