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

Haihao Xiang git at videolan.org
Sun Dec 19 16:27:18 EET 2021


ffmpeg | branch: master | Haihao Xiang <haihao.xiang at intel.com> | Mon Dec 13 14:50:38 2021 +0800| [bbe9faa01cb1a60ddcfb35c79907bdba4bf24a5c] | committer: Zhong Li

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

Signed-off-by: Zhong Li <zhongli_dev at 126.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bbe9faa01cb1a60ddcfb35c79907bdba4bf24a5c
---

 libavcodec/qsvenc.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

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;
 }
 



More information about the ffmpeg-cvslog mailing list