* [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add low latency P-pyramid support to qsv
2022-01-12 5:28 [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add DisableDeblockingIdc support to qsv Wenbin Chen
@ 2022-01-12 5:28 ` Wenbin Chen
2022-01-12 5:28 ` [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add max_frame_size support to hevc_qsv Wenbin Chen
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Wenbin Chen @ 2022-01-12 5:28 UTC (permalink / raw)
To: ffmpeg-devel
Add low latency P-pyramid support to qsv. This feature relates to
command line option "-p_strategy". To enable this flag, user also
need to set "-bf" to 0. P-strategy has two modes "1-simple" and
"2-pyramid". The details of the two models refer to
https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#preftype
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
---
doc/encoders.texi | 6 ++++++
libavcodec/qsvenc.c | 36 ++++++++++++++++++++++++++++++++++++
libavcodec/qsvenc.h | 3 +++
3 files changed, 45 insertions(+)
diff --git a/doc/encoders.texi b/doc/encoders.texi
index 6fc94daa11..3d7c944fba 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -3296,6 +3296,9 @@ to allow changing of frame type from P and B to I.
@item @var{adaptive_b}
This flag controls changing of frame type from B to P.
+@item @var{p_strategy}
+Enable P-pyramid: 0-default 1-simple 2-pyramid(bf need to be set to 0).
+
@item @var{b_strategy}
This option controls usage of B frames as reference.
@@ -3394,6 +3397,9 @@ Enable rate distortion optimization.
@item @var{max_frame_size}
Maximum encoded frame size in bytes.
+@item @var{p_strategy}
+Enable P-pyramid: 0-default 1-simple 2-pyramid(bf need to be set to 0).
+
@item @var{dblk_idc}
This option disable deblocking. It has value in range 0~2.
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 3a51d00ca9..5f405c3d3a 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -315,6 +315,14 @@ static void dump_video_param(AVCodecContext *avctx, QSVEncContext *q,
case MFX_B_REF_PYRAMID: av_log(avctx, AV_LOG_VERBOSE, "pyramid"); break;
default: av_log(avctx, AV_LOG_VERBOSE, "auto"); break;
}
+
+ av_log(avctx, AV_LOG_VERBOSE, "; PRefType: ");
+ switch (co3->PRefType) {
+ case MFX_P_REF_DEFAULT: av_log(avctx, AV_LOG_VERBOSE, "default"); break;
+ case MFX_P_REF_SIMPLE: av_log(avctx, AV_LOG_VERBOSE, "simple"); break;
+ case MFX_P_REF_PYRAMID: av_log(avctx, AV_LOG_VERBOSE, "pyramid"); break;
+ default: av_log(avctx, AV_LOG_VERBOSE, "unknown"); break;
+ }
av_log(avctx, AV_LOG_VERBOSE, "\n");
#endif
@@ -930,6 +938,34 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
#if QSV_HAVE_CO3
q->extco3.Header.BufferId = MFX_EXTBUFF_CODING_OPTION3;
q->extco3.Header.BufferSz = sizeof(q->extco3);
+
+ if (avctx->codec_id == AV_CODEC_ID_HEVC ||
+ avctx->codec_id == AV_CODEC_ID_H264) {
+#if QSV_HAVE_PREF
+ switch (q->p_strategy) {
+ case 0:
+ q->extco3.PRefType = MFX_P_REF_DEFAULT;
+ break;
+ case 1:
+ q->extco3.PRefType = MFX_P_REF_SIMPLE;
+ break;
+ case 2:
+ q->extco3.PRefType = MFX_P_REF_PYRAMID;
+ break;
+ default:
+ q->extco3.PRefType = MFX_P_REF_DEFAULT;
+ av_log(avctx, AV_LOG_WARNING,
+ "invalid p_strategy, set to default\n");
+ break;
+ }
+ if (q->extco3.PRefType == MFX_P_REF_PYRAMID &&
+ avctx->max_b_frames != 0) {
+ av_log(avctx, AV_LOG_WARNING,
+ "Please set max_b_frames(-bf) to 0 to enable P-pyramid\n");
+ }
+#endif
+ }
+
#if QSV_HAVE_GPB
if (avctx->codec_id == AV_CODEC_ID_HEVC)
q->extco3.GPB = q->gpb ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
index aa49b35f07..960604cb9a 100644
--- a/libavcodec/qsvenc.h
+++ b/libavcodec/qsvenc.h
@@ -51,6 +51,7 @@
#define QSV_HAVE_LA_DS QSV_VERSION_ATLEAST(1, 8)
#define QSV_HAVE_LA_HRD QSV_VERSION_ATLEAST(1, 11)
#define QSV_HAVE_VDENC QSV_VERSION_ATLEAST(1, 15)
+#define QSV_HAVE_PREF QSV_VERSION_ATLEAST(1, 16)
#define QSV_HAVE_GPB QSV_VERSION_ATLEAST(1, 18)
@@ -95,6 +96,7 @@
{ "extbrc", "Extended bitrate control", OFFSET(qsv.extbrc), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \
{ "adaptive_i", "Adaptive I-frame placement", OFFSET(qsv.adaptive_i), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \
{ "adaptive_b", "Adaptive B-frame placement", OFFSET(qsv.adaptive_b), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, \
+{ "p_strategy", "Enable P-pyramid: 0-default 1-simple 2-pyramid(bf need to be set to 0).", OFFSET(qsv.p_strategy), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 2, VE }, \
{ "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 = -1}, -1, 1, VE},\
@@ -187,6 +189,7 @@ typedef struct QSVEncContext {
int adaptive_i;
int adaptive_b;
int b_strategy;
+ int p_strategy;
int cavlc;
int int_ref_type;
--
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-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
* [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add max_frame_size support to hevc_qsv
2022-01-12 5:28 [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add DisableDeblockingIdc support to qsv Wenbin Chen
2022-01-12 5:28 ` [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add low latency P-pyramid " Wenbin Chen
@ 2022-01-12 5:28 ` Wenbin Chen
2022-01-12 5:28 ` [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add transform skip " Wenbin Chen
2022-01-13 4:08 ` [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add DisableDeblockingIdc support to qsv Xiang, Haihao
3 siblings, 0 replies; 6+ messages in thread
From: Wenbin Chen @ 2022-01-12 5:28 UTC (permalink / raw)
To: ffmpeg-devel
Add max_frame_size support to hevc_qsv as well.
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
---
doc/encoders.texi | 3 +++
libavcodec/qsvenc.c | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/doc/encoders.texi b/doc/encoders.texi
index 7cc8be1209..68921fbd40 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -3388,6 +3388,9 @@ intra refresh cycle.
@item @var{rdo}
Enable rate distortion optimization.
+@item @var{max_frame_size}
+Maximum encoded frame size in bytes.
+
@item @var{idr_interval}
Distance (in I-frames) between IDR frames.
@table @samp
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 602436da63..a13718652e 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -855,8 +855,6 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
if (q->mbbrc >= 0)
q->extco2.MBBRC = q->mbbrc ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
- if (q->max_frame_size >= 0)
- q->extco2.MaxFrameSize = q->max_frame_size;
#if QSV_HAVE_MAX_SLICE_SIZE
if (q->max_slice_size >= 0)
q->extco2.MaxSliceSize = q->max_slice_size;
@@ -885,6 +883,8 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
if (avctx->codec_id == AV_CODEC_ID_H264 || avctx->codec_id == AV_CODEC_ID_HEVC) {
if (q->extbrc >= 0)
q->extco2.ExtBRC = q->extbrc ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
+ if (q->max_frame_size >= 0)
+ q->extco2.MaxFrameSize = q->max_frame_size;
#if QSV_VERSION_ATLEAST(1, 9)
if (avctx->qmin >= 0 && avctx->qmax >= 0 && avctx->qmin > avctx->qmax) {
--
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-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
* [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add transform skip to hevc_qsv
2022-01-12 5:28 [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add DisableDeblockingIdc support to qsv Wenbin Chen
2022-01-12 5:28 ` [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add low latency P-pyramid " Wenbin Chen
2022-01-12 5:28 ` [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add max_frame_size support to hevc_qsv Wenbin Chen
@ 2022-01-12 5:28 ` Wenbin Chen
2022-01-13 4:08 ` [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add DisableDeblockingIdc support to qsv Xiang, Haihao
3 siblings, 0 replies; 6+ messages in thread
From: Wenbin Chen @ 2022-01-12 5:28 UTC (permalink / raw)
To: ffmpeg-devel
Add transform_skip option to hevc_qsv. By enabling this option,
the transform_skip_enabled_flag in PPS will be set to 1.
This option is only supported in the platform newer than ICL.
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
---
doc/encoders.texi | 3 +++
libavcodec/qsvenc.c | 10 +++++++++-
libavcodec/qsvenc.h | 1 +
libavcodec/qsvenc_hevc.c | 3 +++
4 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/doc/encoders.texi b/doc/encoders.texi
index 3d7c944fba..96e088f6ac 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -3447,6 +3447,9 @@ Number of rows for tiled encoding.
@item @var{aud}
Insert the Access Unit Delimiter NAL.
+
+@item @var{transform_skip}
+Turn this option ON to enable transformskip.
@end table
@subsection MPEG2 Options
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 5f405c3d3a..2d0e13c91a 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -358,6 +358,9 @@ static void dump_video_param(AVCodecContext *avctx, QSVEncContext *q,
av_log(avctx, AV_LOG_VERBOSE, "DisableDeblockingIdc: %"PRIu32" \n", co2->DisableDeblockingIdc);
#endif
+#if QSV_VERSION_ATLEAST(1, 26)
+ av_log(avctx, AV_LOG_VERBOSE, "TransformSkip: %s \n", print_threestate(co3->TransformSkip));
+#endif
}
static void dump_video_vp9_param(AVCodecContext *avctx, QSVEncContext *q,
@@ -966,10 +969,15 @@ static int init_video_param(AVCodecContext *avctx, QSVEncContext *q)
#endif
}
+ if (avctx->codec_id == AV_CODEC_ID_HEVC) {
+#if QSV_VERSION_ATLEAST(1, 26)
+ q->extco3.TransformSkip = q->transform_skip ? MFX_CODINGOPTION_ON :
+ MFX_CODINGOPTION_OFF;
+#endif
#if QSV_HAVE_GPB
- if (avctx->codec_id == AV_CODEC_ID_HEVC)
q->extco3.GPB = q->gpb ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
#endif
+ }
q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extco3;
#endif
}
diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
index 960604cb9a..5a574ada30 100644
--- a/libavcodec/qsvenc.h
+++ b/libavcodec/qsvenc.h
@@ -200,6 +200,7 @@ typedef struct QSVEncContext {
int repeat_pps;
int low_power;
int gpb;
+ int transform_skip;
int a53_cc;
diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c
index 08aba3011d..679c09c858 100644
--- a/libavcodec/qsvenc_hevc.c
+++ b/libavcodec/qsvenc_hevc.c
@@ -251,6 +251,9 @@ static const AVOption options[] = {
{ "tile_rows", "Number of rows for tiled encoding", OFFSET(qsv.tile_rows), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, UINT16_MAX, VE },
{ "recovery_point_sei", "Insert recovery point SEI messages", OFFSET(qsv.recovery_point_sei), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE },
{ "aud", "Insert the Access Unit Delimiter NAL", OFFSET(qsv.aud), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE},
+#if QSV_VERSION_ATLEAST(1, 26)
+ { "transform_skip", "Turn this option ON to enable transformskip", OFFSET(qsv.transform_skip), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 1, VE},
+#endif
{ NULL },
};
--
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-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add DisableDeblockingIdc support to qsv
2022-01-12 5:28 [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add DisableDeblockingIdc support to qsv Wenbin Chen
` (2 preceding siblings ...)
2022-01-12 5:28 ` [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add transform skip " Wenbin Chen
@ 2022-01-13 4:08 ` Xiang, Haihao
2022-01-13 5:11 ` Chen, Wenbin
3 siblings, 1 reply; 6+ messages in thread
From: Xiang, Haihao @ 2022-01-13 4:08 UTC (permalink / raw)
To: ffmpeg-devel
On Wed, 2022-01-12 at 13:28 +0800, Wenbin Chen wrote:
> Add dblk_idc option to 264_qsv and hevc_qsv. Turining on this opion can
> disable deblocking.
>
> Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
> ---
> doc/encoders.texi | 6 ++++++
> libavcodec/qsvenc.c | 8 ++++++++
> libavcodec/qsvenc.h | 3 +++
> 3 files changed, 17 insertions(+)
>
> diff --git a/doc/encoders.texi b/doc/encoders.texi
> index 68921fbd40..6fc94daa11 100644
> --- a/doc/encoders.texi
> +++ b/doc/encoders.texi
> @@ -3299,6 +3299,9 @@ This flag controls changing of frame type from B to P.
> @item @var{b_strategy}
> This option controls usage of B frames as reference.
>
> +@item @var{dblk_idc}
> +This option disable deblocking. It has value in range 0~2.
> +
> @item @var{cavlc}
> If set, CAVLC is used; if unset, CABAC is used for encoding.
>
> @@ -3391,6 +3394,9 @@ Enable rate distortion optimization.
> @item @var{max_frame_size}
> Maximum encoded frame size in bytes.
>
> +@item @var{dblk_idc}
> +This option disable deblocking. It has value in range 0~2.
> +
> @item @var{idr_interval}
> Distance (in I-frames) between IDR frames.
> @table @samp
> diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
> index a13718652e..3a51d00ca9 100644
> --- a/libavcodec/qsvenc.c
> +++ b/libavcodec/qsvenc.c
> @@ -346,6 +346,10 @@ 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);
>
> +#if QSV_HAVE_DISABLEDEBLOCKIDC
> + av_log(avctx, AV_LOG_VERBOSE, "DisableDeblockingIdc: %"PRIu32" \n", co2-
> >DisableDeblockingIdc);
> +#endif
> +
> }
>
> static void dump_video_vp9_param(AVCodecContext *avctx, QSVEncContext *q,
> @@ -885,6 +889,10 @@ static int init_video_param(AVCodecContext *avctx,
> QSVEncContext *q)
> q->extco2.ExtBRC = q->extbrc ? MFX_CODINGOPTION_ON :
> MFX_CODINGOPTION_OFF;
> if (q->max_frame_size >= 0)
> q->extco2.MaxFrameSize = q->max_frame_size;
> +#if QSV_HAVE_DISABLEDEBLOCKIDC
> + if(q->dblk_idc >= 0)
> + q->extco2.DisableDeblockingIdc = q->dblk_idc;
> +#endif
>
> #if QSV_VERSION_ATLEAST(1, 9)
> if (avctx->qmin >= 0 && avctx->qmax >= 0 && avctx->qmin > avctx-
> >qmax) {
> diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
> index 31516b8e55..aa49b35f07 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 =
> -1}, -1, 1, VE},\
> +{ "dblk_idc", "This option disable deblocking. It has value in range
> 0~2.", OFFSET(qsv.dblk_idc), AV_OPT_TYPE_INT, { .i64 = -1 }, -
> 1, 2, VE}, \
>
> extern const AVCodecHWConfigInternal *const ff_qsv_enc_hw_configs[];
>
> @@ -169,6 +171,7 @@ typedef struct QSVEncContext {
> int rdo;
> int max_frame_size;
> int max_slice_size;
> + int dblk_idc;
>
> int tile_cols;
> int tile_rows;
patchwork failed to apply this patch, see
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20220112052850.1147160-1-wenbin.chen@intel.com/
Thanks
Haihao
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add DisableDeblockingIdc support to qsv
2022-01-13 4:08 ` [FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add DisableDeblockingIdc support to qsv Xiang, Haihao
@ 2022-01-13 5:11 ` Chen, Wenbin
0 siblings, 0 replies; 6+ messages in thread
From: Chen, Wenbin @ 2022-01-13 5:11 UTC (permalink / raw)
To: FFmpeg development discussions and patches
> On Wed, 2022-01-12 at 13:28 +0800, Wenbin Chen wrote:
> > Add dblk_idc option to 264_qsv and hevc_qsv. Turining on this opion can
> > disable deblocking.
> >
> > Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
> > ---
> > doc/encoders.texi | 6 ++++++
> > libavcodec/qsvenc.c | 8 ++++++++
> > libavcodec/qsvenc.h | 3 +++
> > 3 files changed, 17 insertions(+)
> >
> > diff --git a/doc/encoders.texi b/doc/encoders.texi
> > index 68921fbd40..6fc94daa11 100644
> > --- a/doc/encoders.texi
> > +++ b/doc/encoders.texi
> > @@ -3299,6 +3299,9 @@ This flag controls changing of frame type from B
> to P.
> > @item @var{b_strategy}
> > This option controls usage of B frames as reference.
> >
> > +@item @var{dblk_idc}
> > +This option disable deblocking. It has value in range 0~2.
> > +
> > @item @var{cavlc}
> > If set, CAVLC is used; if unset, CABAC is used for encoding.
> >
> > @@ -3391,6 +3394,9 @@ Enable rate distortion optimization.
> > @item @var{max_frame_size}
> > Maximum encoded frame size in bytes.
> >
> > +@item @var{dblk_idc}
> > +This option disable deblocking. It has value in range 0~2.
> > +
> > @item @var{idr_interval}
> > Distance (in I-frames) between IDR frames.
> > @table @samp
> > diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
> > index a13718652e..3a51d00ca9 100644
> > --- a/libavcodec/qsvenc.c
> > +++ b/libavcodec/qsvenc.c
> > @@ -346,6 +346,10 @@ 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);
> >
> > +#if QSV_HAVE_DISABLEDEBLOCKIDC
> > + av_log(avctx, AV_LOG_VERBOSE, "DisableDeblockingIdc: %"PRIu32" \n",
> co2-
> > >DisableDeblockingIdc);
> > +#endif
> > +
> > }
> >
> > static void dump_video_vp9_param(AVCodecContext *avctx,
> QSVEncContext *q,
> > @@ -885,6 +889,10 @@ static int init_video_param(AVCodecContext
> *avctx,
> > QSVEncContext *q)
> > q->extco2.ExtBRC = q->extbrc ? MFX_CODINGOPTION_ON :
> > MFX_CODINGOPTION_OFF;
> > if (q->max_frame_size >= 0)
> > q->extco2.MaxFrameSize = q->max_frame_size;
> > +#if QSV_HAVE_DISABLEDEBLOCKIDC
> > + if(q->dblk_idc >= 0)
> > + q->extco2.DisableDeblockingIdc = q->dblk_idc;
> > +#endif
> >
> > #if QSV_VERSION_ATLEAST(1, 9)
> > if (avctx->qmin >= 0 && avctx->qmax >= 0 && avctx->qmin > avctx-
> > >qmax) {
> > diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
> > index 31516b8e55..aa49b35f07 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 =
> > -1}, -1, 1, VE},\
> > +{ "dblk_idc", "This option disable deblocking. It has value in range
> > 0~2.", OFFSET(qsv.dblk_idc), AV_OPT_TYPE_INT, { .i64 = -1 }, -
> > 1, 2, VE}, \
> >
> > extern const AVCodecHWConfigInternal *const ff_qsv_enc_hw_configs[];
> >
> > @@ -169,6 +171,7 @@ typedef struct QSVEncContext {
> > int rdo;
> > int max_frame_size;
> > int max_slice_size;
> > + int dblk_idc;
> >
> > int tile_cols;
> > int tile_rows;
>
>
> patchwork failed to apply this patch, see
> https://patchwork.ffmpeg.org/project/ffmpeg/patch/20220112052850.1147
> 160-1-wenbin.chen@intel.com/
>
> Thanks
> Haihao
I see. I should submit patches in one patchset. I will resubmit them.
Thanks
Wenbin
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 6+ messages in thread