如何在HEVC HM 16.15中提取运动矢量和帧分割信息 [英] How to extract motion vectors and info on frame partition in HEVC HM 16.15

查看:305
本文介绍了如何在HEVC HM 16.15中提取运动矢量和帧分割信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在[Mac OS X] [GCC 4.2.1] [64位]上使用HEVC参考软件,HM编码器版本[16.15](包括RExt),并且想在编码器端提取: 1)每个块的运动矢量 2)帧分割信息,即运动矢量所引用的帧中每个块的大小和位置.

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!

推荐答案

TComDataCU类中提供了所有您需要的内容.

All you need is available in the TComDataCU class.

1)对于运动信息,有一个函数getCUMvField()返回运动矢量.但是,使用它并不容易.

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

基本上,要访问几乎任何PU/CU级别的语法元素,您都需要能够使用该PU/CU的绝对索引.通过指向该部件的左上4x4块,此唯一索引可以告诉您PU/CU在CTU中的确切位置. 我记得大多数时候此索引存储在变量uiAbsPartIdx中.

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.

如果您知道如何使用此索引,那么您将能够获得CTU级别的块分区信息.因此对于2),我的建议是,当您在CUT上循环时,您将进入切片级别(我认为这是在compressSlice()函数中完成的).在为每个CTU调用compressCtu()函数之后(这意味着已经做出了所有RDO决定并且已经确定了CTU分区),您在CTU的所有uiAbsPartIdx上放置了一个循环,并获取了它们的宽度和高度.例如,如果您的CTU大小为128,则您的CTU中将有32 * 32 = 1024个唯一的4x4块.获取对应于特定uiAbsPartIdx的CU的宽度/高度的功能是pCtu->getWidth(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).

我希望这很清楚.

这篇关于如何在HEVC HM 16.15中提取运动矢量和帧分割信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆