diff mbox series

[FFmpeg-devel,5/5] lavc/qsvenc: dump parameters for mjpeg encoding in verbose mode

Message ID 20211213065038.26898-5-haihao.xiang@intel.com
State Accepted
Commit bbe9faa01cb1a60ddcfb35c79907bdba4bf24a5c
Headers show
Series [FFmpeg-devel,1/5] lavc/qsvenc: remove VC1 profiles | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Xiang, Haihao Dec. 13, 2021, 6:50 a.m. UTC
---
 libavcodec/qsvenc.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff mbox series

Patch

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 106438f227..92a8b49fe3 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -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;
@@ -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;
 }