How to extract motion vectors and info on frame partition in HEVC HM 16.15

∥☆過路亽.° 提交于 2019-12-11 08:05:47

问题


I am using the HEVC reference software, HM Encoder Version [16.15] (including RExt) on a [Mac OS X][GCC 4.2.1][64 bit] and would like to extract at encoder side: 1) the motion vectors for each block 2) the frame partition information, i.e. the size and location of each block in the frame to which a motion vector refers.

Does anybody have hints on what are the variables where this info is stored for each coding unit? Thanks!


回答1:


All you need is available in the TComDataCU class.

1) For motion information, there is the function getCUMvField() which returns the motion vector. It's not easy to work with it though.

Basically, to access almost any of the PU/CU level syntax elements, you need to be able to work with the absolute index of that PU/CU. This unique index tells you where exactly your PU/CU is located in the CTU by pointing to the up-left 4x4 block of that part. I rememberthat that most of the times this index is stored in the variable uiAbsPartIdx.

If you get to know how to work with this index, then you will be able to get the block partitioning information in the CTU level. so for 2) my suggestion is that you go to the slice level when you have a loop over CUTs (I think this is done in the compressSlice() function). And after the compressCtu() function is called for each CTU (which means that all RDO decisions have been made and the CTU partitioning is decided), you put a loop over all uiAbsPartIdxs of the CTU and get their width and height. For example if your CTU size is 128, then you will have 32*32=1024 unique 4x4 blocks in your CTU. The function for getting width/height of the CU corresponding to a certain uiAbsPartIdx is pCtu->getWidth(uiAbsPartIdx).

I hope it was clear.



来源:https://stackoverflow.com/questions/43519979/how-to-extract-motion-vectors-and-info-on-frame-partition-in-hevc-hm-16-15

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!