Skip to content

Commit

Permalink
lavc/qsvenc: dump parameters for mjpeg encoding in verbose mode
Browse files Browse the repository at this point in the history
Signed-off-by: Zhong Li <[email protected]>
  • Loading branch information
xhaihao authored and lizhong1008 committed Dec 19, 2021
1 parent 45801af commit bbe9faa
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libavcodec/qsvenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,18 @@ static void dump_video_vp9_param(AVCodecContext *avctx, QSVEncContext *q,
#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)
{
const char *rc_desc;
Expand Down Expand Up @@ -970,6 +982,8 @@ static int qsv_retrieve_enc_jpeg_params(AVCodecContext *avctx, QSVEncContext *q)
if (q->packet_size == 0)
q->packet_size = q->param.mfx.FrameInfo.Height * q->param.mfx.FrameInfo.Width * 4;

dump_video_mjpeg_param(avctx, q);

return 0;
}

Expand Down

0 comments on commit bbe9faa

Please sign in to comment.