This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 1e1dde8798 avcodec/libx265: map ffmpeg log level to x265 log level
1e1dde8798 is described below
commit 1e1dde87986de78ce493534e6389f549cbb54d17
Author: Zhao Zhili <[email protected]>
AuthorDate: Wed Jan 14 21:28:00 2026 +0800
Commit: Zhao Zhili <[email protected]>
CommitDate: Sun Jan 25 13:09:30 2026 +0800
avcodec/libx265: map ffmpeg log level to x265 log level
Previously x265 encoder used its default log level regardless of
FFmpeg's log level setting. Note the log level can be overwritten
by x265-params.
Fix #21462
Signed-off-by: Zhao Zhili <[email protected]>
---
libavcodec/libx265.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 89cd7d5dbe..7d488c0f4b 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -251,6 +251,24 @@ static int handle_side_data(AVCodecContext *avctx, const
x265_api *api,
return 0;
}
+static int get_x265_log_level(AVCodecContext *avctx)
+{
+ int level = av_log_get_level() + avctx->log_level_offset;
+
+ if (level <= AV_LOG_QUIET)
+ return X265_LOG_NONE;
+ if (level <= AV_LOG_ERROR)
+ return X265_LOG_ERROR;
+ if (level <= AV_LOG_WARNING)
+ return X265_LOG_WARNING;
+ if (level <= AV_LOG_INFO)
+ return X265_LOG_INFO;
+ if (level <= AV_LOG_DEBUG)
+ return X265_LOG_DEBUG;
+
+ return X265_LOG_FULL;
+}
+
static av_cold int libx265_encode_init(AVCodecContext *avctx)
{
libx265Context *ctx = avctx->priv_data;
@@ -286,6 +304,7 @@ static av_cold int libx265_encode_init(AVCodecContext
*avctx)
return AVERROR(EINVAL);
}
+ ctx->params->logLevel = get_x265_log_level(avctx);
ctx->params->frameNumThreads = avctx->thread_count;
if (avctx->framerate.num > 0 && avctx->framerate.den > 0) {
ctx->params->fpsNum = avctx->framerate.num;
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]