msdkenc: Support image formats in low power mode for sink caps

There are some special image formats in low power mode, these
image formats should be supported in sink caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4177>
This commit is contained in:
Yinhang Liu 2023-02-22 10:41:40 +08:00 committed by GStreamer Marge Bot
parent 3cb9c34030
commit da4b6f17cf

View file

@ -648,8 +648,14 @@ _enc_is_format_supported (mfxSession * session,
if (!_fill_mfxframeinfo (format, &in->mfx.FrameInfo)) if (!_fill_mfxframeinfo (format, &in->mfx.FrameInfo))
return FALSE; return FALSE;
in->mfx.LowPower = MFX_CODINGOPTION_UNKNOWN;
if (!_enc_is_param_supported (session, in, out)) {
in->mfx.LowPower = (out->mfx.LowPower == MFX_CODINGOPTION_ON) ?
MFX_CODINGOPTION_OFF : MFX_CODINGOPTION_ON;
if (!_enc_is_param_supported (session, in, out)) if (!_enc_is_param_supported (session, in, out))
return FALSE; return FALSE;
}
return TRUE; return TRUE;
} }