|
|
|
@ -553,7 +553,7 @@ static int init_video_param_jpeg(AVCodecContext *avctx, QSVEncContext *q) |
|
|
|
|
if (!desc) |
|
|
|
|
return AVERROR_BUG; |
|
|
|
|
|
|
|
|
|
ret = ff_qsv_map_pixfmt(sw_format, &q->param.mfx.FrameInfo.FourCC); |
|
|
|
|
ret = ff_qsv_map_pixfmt(sw_format, &q->param.mfx.FrameInfo.FourCC, &q->param.mfx.FrameInfo.Shift); |
|
|
|
|
if (ret < 0) |
|
|
|
|
return AVERROR_BUG; |
|
|
|
|
|
|
|
|
@ -567,7 +567,6 @@ static int init_video_param_jpeg(AVCodecContext *avctx, QSVEncContext *q) |
|
|
|
|
!desc->log2_chroma_w + !desc->log2_chroma_h; |
|
|
|
|
q->param.mfx.FrameInfo.BitDepthLuma = desc->comp[0].depth; |
|
|
|
|
q->param.mfx.FrameInfo.BitDepthChroma = desc->comp[0].depth; |
|
|
|
|
q->param.mfx.FrameInfo.Shift = desc->comp[0].depth > 8; |
|
|
|
|
|
|
|
|
|
q->param.mfx.FrameInfo.Width = FFALIGN(avctx->width, 16); |
|
|
|
|
q->param.mfx.FrameInfo.Height = FFALIGN(avctx->height, 16); |
|
|
|
@ -653,7 +652,7 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) |
|
|
|
|
if (!desc) |
|
|
|
|
return AVERROR_BUG; |
|
|
|
|
|
|
|
|
|
ret = ff_qsv_map_pixfmt(sw_format, &q->param.mfx.FrameInfo.FourCC); |
|
|
|
|
ret = ff_qsv_map_pixfmt(sw_format, &q->param.mfx.FrameInfo.FourCC, &q->param.mfx.FrameInfo.Shift); |
|
|
|
|
if (ret < 0) |
|
|
|
|
return AVERROR_BUG; |
|
|
|
|
|
|
|
|
@ -667,7 +666,6 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q) |
|
|
|
|
!desc->log2_chroma_w + !desc->log2_chroma_h; |
|
|
|
|
q->param.mfx.FrameInfo.BitDepthLuma = desc->comp[0].depth; |
|
|
|
|
q->param.mfx.FrameInfo.BitDepthChroma = desc->comp[0].depth; |
|
|
|
|
q->param.mfx.FrameInfo.Shift = desc->comp[0].depth > 8; |
|
|
|
|
|
|
|
|
|
// If the minor version is greater than or equal to 19,
|
|
|
|
|
// then can use the same alignment settings as H.264 for HEVC
|
|
|
|
|