Message ID | 20200121130643.4520116-1-jon.cook@cubicmotion.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] libavcodec/qsvenc.c: Set height and width alignment when encoding with mjpeg_qsv | expand |
Context | Check | Description |
---|---|---|
andriy/ffmpeg-patchwork | success | Make fate finished |
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 9e416500e9..40904af388 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -470,6 +470,12 @@ static int init_video_param_jpeg(AVCodecContext *avctx, QSVEncContext *q) q->param.mfx.Quality = av_clip(avctx->global_quality, 1, 100); q->param.mfx.RestartInterval = 0; + q->width_align = 16; + q->height_align = 16; + + q->param.mfx.FrameInfo.Width = FFALIGN(avctx->width, q->width_align); + q->param.mfx.FrameInfo.Height = FFALIGN(avctx->height, q->height_align); + return 0; }