msdkvp9enc: fix width and height
The frame width and height is rounded up to 128 and 32 since commit 8daac1c, so the width, height for initialization should be rounded up to 128 and 32 too because the MSDK VP9 encoder will do some check on width and height. Sample pipeline: gst-launch-1.0 videotestsrc ! \ video/x-raw,width=320,height=240,format=NV12 ! msdkvp9enc ! fakesink
This commit is contained in:
parent
d6fbec5a44
commit
da22ff3846
@ -125,6 +125,15 @@ gst_msdkvp9enc_configure (GstMsdkEnc * encoder)
|
||||
encoder->param.mfx.CodecId = MFX_CODEC_VP9;
|
||||
encoder->param.mfx.CodecLevel = 0;
|
||||
encoder->param.mfx.CodecProfile = thiz->profile;
|
||||
/* As the frame width and height is rounded up to 128 and 32 since commit 8daac1c,
|
||||
* so the width, height for initialization should be rounded up to 128 and 32
|
||||
* too because VP9 encoder in MSDK will do some check on width and height.
|
||||
*/
|
||||
encoder->param.mfx.FrameInfo.Width =
|
||||
GST_ROUND_UP_128 (encoder->param.mfx.FrameInfo.CropW);
|
||||
encoder->param.mfx.FrameInfo.Height =
|
||||
GST_ROUND_UP_32 (encoder->param.mfx.FrameInfo.CropH);
|
||||
|
||||
/* Always turn on this flag for VP9 */
|
||||
encoder->param.mfx.LowPower = MFX_CODINGOPTION_ON;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user