Commit e678cee4 authored by Haihao Xiang's avatar Haihao Xiang

msdk: libva: Don't set the hint if MFX_VERSION is lower than 1025

MFX_MEMTYPE_VIDEO_MEMORY_ENCODER_TARGET is defined since MFX_VERSION
1025.
parent fbe7917a
Pipeline #110866 passed with stages
in 45 minutes
......@@ -106,6 +106,7 @@ gst_msdk_frame_alloc (mfxHDL pthis, mfxFrameAllocRequest * req,
num_attribs = 1;
/* set VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER flag for encoding */
#if (MFX_VERSION >= 1025)
if ((req->Type & MFX_MEMTYPE_VIDEO_MEMORY_ENCODER_TARGET) &&
(req->Type & MFX_MEMTYPE_FROM_ENCODE)) {
attribs[1].type = VASurfaceAttribUsageHint;
......@@ -114,6 +115,7 @@ gst_msdk_frame_alloc (mfxHDL pthis, mfxFrameAllocRequest * req,
attribs[1].value.value.i = VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER;
num_attribs = 2;
}
#endif
format =
gst_msdk_get_va_rt_format_from_mfx_rt_format (req->Info.ChromaFormat);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment