From: Wenbinc-Bin <wenbin.c...@intel.com> MediaSDK already has a flag to control deblocking (DisableDeblockingIdc). Add dblk_idc parameter in ffmpeg to expose this flag to user.
Sigend-off-by: Wenbin Chen <wenbin.c...@intel.com> --- libavcodec/qsvenc.c | 6 ++++++ libavcodec/qsvenc.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 0bca4f30e3..2434feb660 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -295,6 +295,8 @@ static void dump_video_param(AVCodecContext *avctx, QSVEncContext *q, av_log(avctx, AV_LOG_VERBOSE, "FrameRateExtD: %"PRIu32"; FrameRateExtN: %"PRIu32" \n", info->FrameInfo.FrameRateExtD, info->FrameInfo.FrameRateExtN); + av_log(avctx, AV_LOG_VERBOSE, "DisableDeblockingIdc: %"PRIu32" \n", co2->DisableDeblockingIdc); + } static int select_rc_mode(AVCodecContext *avctx, QSVEncContext *q) @@ -710,6 +712,10 @@ FF_ENABLE_DEPRECATION_WARNINGS if (q->max_slice_size >= 0) q->extco2.MaxSliceSize = q->max_slice_size; #endif +#if QSV_HAVE_DISABLEDEBLOCKIDC + if(q->dblk_idc >= 0) + q->extco2.DisableDeblockingIdc = q->dblk_idc; +#endif #if QSV_HAVE_TRELLIS if (avctx->trellis >= 0) diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h index 6d305f87dd..3720320789 100644 --- a/libavcodec/qsvenc.h +++ b/libavcodec/qsvenc.h @@ -44,6 +44,7 @@ #define QSV_HAVE_TRELLIS QSV_VERSION_ATLEAST(1, 8) #define QSV_HAVE_MAX_SLICE_SIZE QSV_VERSION_ATLEAST(1, 9) +#define QSV_HAVE_DISABLEDEBLOCKIDC QSV_VERSION_ATLEAST(1, 9) #define QSV_HAVE_BREF_TYPE QSV_VERSION_ATLEAST(1, 8) #define QSV_HAVE_LA QSV_VERSION_ATLEAST(1, 7) @@ -97,6 +98,7 @@ { "b_strategy", "Strategy to choose between I/P/B-frames", OFFSET(qsv.b_strategy), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \ { "forced_idr", "Forcing I frames as IDR frames", OFFSET(qsv.forced_idr), AV_OPT_TYPE_BOOL,{ .i64 = 0 }, 0, 1, VE }, \ { "low_power", "enable low power mode(experimental: many limitations by mfx version, BRC modes, etc.)", OFFSET(qsv.low_power), AV_OPT_TYPE_BOOL, { .i64 = 0}, 0, 1, VE},\ +{ "dblk_idc", "value of DisableDeblockingIdc (default is 0), in range [0,2]", OFFSET(qsv.dblk_idc), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, VE}, \ extern const AVCodecHWConfigInternal *const ff_qsv_enc_hw_configs[]; @@ -167,6 +169,7 @@ typedef struct QSVEncContext { int rdo; int max_frame_size; int max_slice_size; + int dblk_idc; int tile_cols; int tile_rows; -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".