Skip to content

Commit c06e465

Browse files
committed
vp9d: accept MFX_FRAMETYPE_IDR and MFX_FRAMETYPE_REF
MFX_FRAMETYPE_IDR or MFX_FRAMETYPE_REF can be ORed to mfxEncodeCtrl::FrameType for other codecs(e.g AV1) when calling MFXVideoENCODE_EncodeFrameAsync(), let's do the same for VP9. This makes the below command work fine. ffmpeg -hwaccel qsv -hwaccel_output_format qsv -i input.h264 -force_key_frames:v source \ -forced_idr 1 -c:v vp9_qsv -f null - Signed-off-by: Haihao Xiang <[email protected]>
1 parent 4ad0d7b commit c06e465

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

_studio/mfx_lib/encode_hw/vp9/src/mfx_vp9_encode_hw_par.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,9 +1850,14 @@ mfxStatus CheckAndFixCtrl(
18501850
checkSts = MFX_WRN_INCOMPATIBLE_VIDEO_PARAM;
18511851
}
18521852

1853-
if (ctrl.FrameType > MFX_FRAMETYPE_P)
1853+
if (ctrl.FrameType & 0xFF00) {
1854+
ctrl.FrameType = (ctrl.FrameType & 0xFF);
1855+
checkSts = MFX_WRN_INCOMPATIBLE_VIDEO_PARAM;
1856+
}
1857+
1858+
if ((ctrl.FrameType & 0xF) > MFX_FRAMETYPE_P)
18541859
{
1855-
ctrl.FrameType = MFX_FRAMETYPE_P;
1860+
ctrl.FrameType = (MFX_FRAMETYPE_P | (ctrl.FrameType & 0xF0));
18561861
checkSts = MFX_WRN_INCOMPATIBLE_VIDEO_PARAM;
18571862
}
18581863

0 commit comments

Comments
 (0)