diff mbox series

[FFmpeg-devel] libavcodec/qsvenc.c: Set height and width alignment when using mjpeg_qsv

Message ID 20200121121351.4369680-1-jon.cook@cubicmotion.com
State Withdrawn
Headers show
Series [FFmpeg-devel] libavcodec/qsvenc.c: Set height and width alignment when using mjpeg_qsv | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Jon Cook Jan. 21, 2020, 12:13 p.m. UTC
From: JonCookCubic <jon.cook@cubicmotion.com>

Setting FrameInfo.Width and Height as per review comments

Signed-off-by: JonCookCubic <jon.cook@cubicmotion.com>
---
 libavcodec/qsvenc.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

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;
 }