intel/vpl-gpu-rt

[Bug]: change resolution, m_pmfxENC->Reset return MFX_ERR_INVALID_VIDEO_PARAM

okfujian opened this issue · 2 comments

Which component impacted?

Encode

Is it regression? Good in old configuration?

None

What happened?

when use oneVPL GPU Runtime 2023Q1 Release - 23.1.5

I need modify resolution during encoding,m_pmfxENC->Reset return MFX_ERR_INVALID_VIDEO_PARAM,
when I use intel media sdk ,m_pmfxENC->Reset would not return MFX_ERR_INVALID_VIDEO_PARAM.

		sts = m_pmfxENC->GetVideoParam(&m_mfxEncParams);
		if (m_mfxEncParams.mfx.FrameInfo.Width != MSDK_ALIGN16(m_nWidth) || m_mfxEncParams.mfx.FrameInfo.Height != CurHeight)
		{
			m_mfxEncParams.mfx.FrameInfo.Width = MSDK_ALIGN16(m_nWidth);
			m_mfxEncParams.mfx.FrameInfo.Height = CurHeight; // have aligned to 16
			m_mfxEncParams.mfx.FrameInfo.CropX = 0;
			m_mfxEncParams.mfx.FrameInfo.CropY = 0;
			m_mfxEncParams.mfx.FrameInfo.CropW = m_nWidth;
			m_mfxEncParams.mfx.FrameInfo.CropH = vppHeight;
		}
		m_mfxEncParams.mfx.TargetKbps = (std::min)((mfxU16)m_nBitRate, (mfxU16)0xFFFF);
		m_mfxEncParams.mfx.MaxKbps = m_mfxEncParams.mfx.TargetKbps;
		
		sts = m_pmfxENC->Reset(&m_mfxEncParams);
		if (sts != MFX_ERR_NONE)
		{		
		}

cpu info:
12th Gen Intel(R) Core(TM) i7-1255U

os info:
Linux version 5.15.0-56-generic (root@tpack) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1 SMP Thu Dec 8 13:31:18 UTC 2022

What's the usage scenario when you are seeing the problem?

Others

What impacted?

No response

Debug Information

No response

Do you want to contribute a patch to fix the issue?

None

Auto Created VSMGWL-72300 for further analysis.

//     auto encHEVCParam = m_mfxEncParams.AddExtBuffer<mfxExtHEVCParam>();
//     encHEVCParam->PicWidthInLumaSamples = m_mfxEncParams.mfx.FrameInfo.CropW;
//     encHEVCParam->PicHeightInLumaSamples = m_mfxEncParams.mfx.FrameInfo.CropH;      this param cause this issue