lavc/qsvenc: dump parameters for mjpeg encoding in verbose mode

Signed-off-by: Zhong Li <zhongli_dev@126.com>
This commit is contained in:
Haihao Xiang 2021-12-13 14:50:38 +08:00 committed by Zhong Li
parent 45801af11f
commit bbe9faa01c
1 changed files with 14 additions and 0 deletions

View File

@ -421,6 +421,18 @@ static void dump_video_vp9_param(AVCodecContext *avctx, QSVEncContext *q,
#endif #endif
} }
static void dump_video_mjpeg_param(AVCodecContext *avctx, QSVEncContext *q)
{
mfxInfoMFX *info = &q->param.mfx;
av_log(avctx, AV_LOG_VERBOSE, "Interleaved: %"PRIu16" \n", info->Interleaved);
av_log(avctx, AV_LOG_VERBOSE, "Quality: %"PRIu16" \n", info->Quality);
av_log(avctx, AV_LOG_VERBOSE, "RestartInterval: %"PRIu16" \n", info->RestartInterval);
av_log(avctx, AV_LOG_VERBOSE, "FrameRateExtD: %"PRIu32"; FrameRateExtN: %"PRIu32" \n",
info->FrameInfo.FrameRateExtD, info->FrameInfo.FrameRateExtN);
}
static int select_rc_mode(AVCodecContext *avctx, QSVEncContext *q) static int select_rc_mode(AVCodecContext *avctx, QSVEncContext *q)
{ {
const char *rc_desc; const char *rc_desc;
@ -970,6 +982,8 @@ static int qsv_retrieve_enc_jpeg_params(AVCodecContext *avctx, QSVEncContext *q)
if (q->packet_size == 0) if (q->packet_size == 0)
q->packet_size = q->param.mfx.FrameInfo.Height * q->param.mfx.FrameInfo.Width * 4; q->packet_size = q->param.mfx.FrameInfo.Height * q->param.mfx.FrameInfo.Width * 4;
dump_video_mjpeg_param(avctx, q);
return 0; return 0;
} }