Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
公告
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Interlaced HEVC sample

BMart1
新分销商 II
2,397 次查看

Is there a sample doing interlaced hevc encoding? I've seen the whitepaper.

0 项奖励
7 回复数
BMart1
新分销商 II
2,397 次查看

I'm trying to make hevc interlaced encoding work based on mediasdk_hevc_interlace_whitepaper.pdf and I think I found a bug. MFXVideoENCODE_Query turns MFX_PICSTRUCT_FIELD_SINGLE into MFX_PICSTRUCT_PROGRESSIVE:

mfxVersion ver = { { 0, 1 } };
MFXVideoSession session;
if (session.Init(MFX_IMPL_HARDWARE_ANY, &ver) != MFX_ERR_NONE)
    abort();

if (MFXVideoUSER_Load(session, &MFX_PLUGINID_HEVCE_HW, 1) != MFX_ERR_NONE)
    abort();

MFXVideoENCODE mfxENC(session);

mfxVideoParam encParams{};
encParams.mfx.CodecId = MFX_CODEC_HEVC;
encParams.mfx.TargetKbps = 8000;
encParams.mfx.RateControlMethod = MFX_RATECONTROL_CBR;
encParams.mfx.FrameInfo.FrameRateExtN = 60;
encParams.mfx.FrameInfo.FrameRateExtD = 1;
encParams.mfx.FrameInfo.AspectRatioW = 1;
encParams.mfx.FrameInfo.AspectRatioH = 1;
encParams.mfx.FrameInfo.FourCC = MFX_FOURCC_NV12;
encParams.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV420;
encParams.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_FIELD_SINGLE;
encParams.mfx.FrameInfo.Width = 1920;
encParams.mfx.FrameInfo.Height = 1088;
encParams.IOPattern = MFX_IOPATTERN_IN_SYSTEM_MEMORY;

printf("%d\n", encParams.mfx.FrameInfo.PicStruct);
if (mfxENC.Query(&encParams, &encParams) != MFX_WRN_INCOMPATIBLE_VIDEO_PARAM)
    abort();
printf("%d\n", encParams.mfx.FrameInfo.PicStruct);

 

0 项奖励
Greg_R_Intel
员工
2,397 次查看

I wanted to let you know Intel now has an SVT-HEVC website for developers. This page also contains a new SVT white paper and links to the Trello board to track development of the SVT-HEVC encoder core. You can see the page here. https://01.org/svt Thanks! Greg Rose

0 项奖励
Dmitry_E_Intel
2,397 次查看

Hi Bruno,

 

In case of bitrate control (not CQP) mode, HEVC interlace encode can only with SW BRC. From the whitepaper:

Only three bitrate control algorithms are supported MFX_RATECONTROL_CQP, MFX_RATECONTROL_VBR
and MFX_RATECONTROL_CBR. MFX_RATECONTROL_VBR and MFX_RATECONTROL_CBR are software
based bit-rate controls. To enable them use mfxExtCodingOption2::ExtBRC=MFX_CODINGOPTION_ON flag
without mfxExtBRC extended buffer.

 

Regards,

Dmitry

0 项奖励
BMart1
新分销商 II
2,397 次查看

Hi Dmitry,

What does it mean that CBR is software based? What's the downside?

Bruno

0 项奖励
Dmitry_E_Intel
2,397 次查看

Hi Bruno,

 

It means and QP decision is done by C++ code inside MediaSDK :

https://github.com/Intel-Media-SDK/MediaSDK/blob/master/_studio/mfx_lib/shared/src/mfx_brc_common.cpp

not by code executed by GPU (as it works for regular BRC mode).

 

Regards,

Dmitry

0 项奖励
BMart1
新分销商 II
2,397 次查看

Will it limit the performance?

0 项奖励
Dmitry_E_Intel
2,397 次查看

No, it doesn't affect performance. 

0 项奖励
回复