From cb269cf99210d4ed8d07902f5320b6052a4e0732 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Fri, 6 Oct 2023 16:02:12 +0200 Subject: [PATCH] lavc video: do not set interlaced DCT for libx265 Interlacing is not honored by libx265, anyways, and this saves the eventual HWacc warning. It is still passed to QSV even for HEVC, anyways. Not sure how the API handles that but FFmpeg seems to pass it. --- src/video_compress/libavcodec.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video_compress/libavcodec.cpp b/src/video_compress/libavcodec.cpp index 017c183f6..ccb905dc2 100644 --- a/src/video_compress/libavcodec.cpp +++ b/src/video_compress/libavcodec.cpp @@ -1648,7 +1648,9 @@ configure_x264_x265(AVCodecContext *codec_ctx, struct setparam_param *param) //codec_ctx->rc_qsquish = 0; //codec_ctx->scenechange_threshold = 100; - if (param->desc.interlacing == INTERLACED_MERGED && param->interlaced_dct != 0) { + if (param->desc.interlacing == INTERLACED_MERGED && + param->interlaced_dct != 0 && + codec_ctx->codec_id == AV_CODEC_ID_H264) { incomp_feature_warn(INCOMP_INTERLACED_DCT, param->interlaced_dct); codec_ctx->flags |= AV_CODEC_FLAG_INTERLACED_DCT; }