Is there a sample doing interlaced hevc encoding? I've seen the whitepaper.
链接已复制
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);
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
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
Hi Bruno,
It means and QP decision is done by C++ code inside MediaSDK :
not by code executed by GPU (as it works for regular BRC mode).
Regards,
Dmitry