關於用g_auiRasterToZscan將HEVC上的輸出信息打印出來

本文的前面參考的基礎是http://blog.csdn.net/hevc_cjl/article/details/8183144,博主將光柵掃描轉爲Z掃描的技術原理講的很清楚,看到有人問博主怎麼將這些信息打印出來的,在此我稍微講述一下:

本人是在TComRom.cpp里加了幾行代碼,具體代碼爲:

在Void initRasterToZscan ( UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxDepth )函數改爲:

Void initRasterToZscan ( UInt uiMaxCUWidth, UInt uiMaxCUHeight, UInt uiMaxDepth )
{
  UInt  uiMinCUWidth  = uiMaxCUWidth  >> ( uiMaxDepth - 1 );
  UInt  uiMinCUHeight = uiMaxCUHeight >> ( uiMaxDepth - 1 );


  UInt  uiNumPartInWidth  = (UInt)uiMaxCUWidth  / uiMinCUWidth;
  UInt  uiNumPartInHeight = (UInt)uiMaxCUHeight / uiMinCUHeight;


  for ( UInt i = 0; i < uiNumPartInWidth*uiNumPartInHeight; i++ )
  {
    g_auiRasterToZscan[ g_auiZscanToRaster[i] ] = i;
num++;
if(num==16)
{
cout<<g_auiZscanToRaster[i]<<endl;
num=0;
}
else
  cout<<g_auiZscanToRaster[i]<<" ";
  }
}

num爲自己定義的全局變量,編譯運行程序即可。

注意要把解碼器設爲啓動項目,且裏面的調試參數要改。

結果如下:



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章