diff options
author | JonCookCubic <jon.cook@cubicmotion.com> | 2020-01-21 16:06:43 +0300 |
---|---|---|
committer | Zhong Li <zhongli_dev@126.com> | 2020-02-18 05:21:02 +0300 |
commit | 566de255992a0727aa0cbafb08b366e36ea2adc9 (patch) | |
tree | 0c7a1e99d7e0d5e03cb469532e4cb5362950f045 /libavcodec/qsvenc.c | |
parent | 601d5744404990db92a0d6e13274a158cb13b157 (diff) |
libavcodec/qsvenc.c: Set mjpeg height and width alignment
Currently width_align and height_align are zero when encoding with mjpeg_qsv,
which causes "Error submitting the frame for encoding". This patch sets the alignments.
There is a little bit more about the problem here http://ffmpeg.org/pipermail/ffmpeg-user/2019-November/046143.html
Signed-off-by: JonCookCubic <jon.cook@cubicmotion.com>
Signed-off-by: Zhong Li <zhongli_dev@126.com>
Diffstat (limited to 'libavcodec/qsvenc.c')
-rw-r--r-- | libavcodec/qsvenc.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |