Jon Cook <jon.c...@cubicmotion.com> 于2020年1月20日周一 下午5:58写道:
>
> From: JonCookCubic <jon.c...@cubicmotion.com>
>
> Currently width_align and height_align are zero which cases "Error submitting 
> the frame for encoding". This change sets the alignments.

Could you help to provide detail steps (CLI and input video) to
reproduce the issue?

>
> Signed-off-by: Jon Cook <jon.c...@cubicmotion.com>
> ---
>  libavcodec/qsvenc.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
> index 9e416500e9..b18393532f 100644
> --- a/libavcodec/qsvenc.c
> +++ b/libavcodec/qsvenc.c
> @@ -470,6 +470,9 @@ 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;
> +

IMHO If you set the aligned value, FrameInfo.Width/Height shoule be
changed to be:

    q->param.mfx.FrameInfo.Width  = FFALIGN(avctx->width, q->width_align);
    q->param.mfx.FrameInfo.Height = FFALIGN(avctx->height, q->height_align);

>      return 0;
>  }
>
> --
> 2.20.1.windows.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to