Skip to content

Commit

Permalink
lavc video: do not set interlaced DCT for libx265
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MartinPulec committed Oct 6, 2023
1 parent 31af513 commit cb269cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/video_compress/libavcodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit cb269cf

Please sign in to comment.