From: Wenbin Chen <wenbin.chen-at-intel.com@ffmpeg.org> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 3/6] libavcodec/qsvenc: Add "slice" intra refresh type to qsvenc Date: Thu, 18 Aug 2022 14:59:09 +0800 Message-ID: <20220818065912.158693-3-wenbin.chen@intel.com> (raw) In-Reply-To: <20220818065912.158693-1-wenbin.chen@intel.com> Add "slice" intra refresh type to h264_qsv and hevc_qsv. This type means horizontal refresh by slices without overlapping. Also update the doc. Signed-off-by: Wenbin Chen <wenbin.chen@intel.com> --- doc/encoders.texi | 12 ++++++++---- libavcodec/qsvenc_h264.c | 1 + libavcodec/qsvenc_hevc.c | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/encoders.texi b/doc/encoders.texi index 9fb63856b1..48fe73fd33 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -3454,8 +3454,10 @@ Specifies intra refresh type. The major goal of intra refresh is improvement of error resilience without significant impact on encoded bitstream size caused by I frames. The SDK encoder achieves this by encoding part of each frame in refresh cycle using intra MBs. @var{none} means no refresh. @var{vertical} means -vertical refresh, by column of MBs. To enable intra refresh, B frame should be -set to 0. +vertical refresh, by column of MBs. @var{horizontal} means horizontal refresh, +by rows of MBs. @var{slice} means horizontal refresh by slices without +overlapping. In case of @var{slice}, in_ref_cycle_size is ignored. To enable +intra refresh, B frame should be set to 0. @item @var{int_ref_cycle_size} Specifies number of pictures within refresh cycle starting from 2. 0 and 1 are @@ -3619,8 +3621,10 @@ Specifies intra refresh type. The major goal of intra refresh is improvement of error resilience without significant impact on encoded bitstream size caused by I frames. The SDK encoder achieves this by encoding part of each frame in refresh cycle using intra MBs. @var{none} means no refresh. @var{vertical} means -vertical refresh, by column of MBs. To enable intra refresh, B frame should be -set to 0. +vertical refresh, by column of MBs. @var{horizontal} means horizontal refresh, +by rows of MBs. @var{slice} means horizontal refresh by slices without +overlapping. In case of @var{slice}, in_ref_cycle_size is ignored. To enable +intra refresh, B frame should be set to 0. @item @var{int_ref_cycle_size} Specifies number of pictures within refresh cycle starting from 2. 0 and 1 are diff --git a/libavcodec/qsvenc_h264.c b/libavcodec/qsvenc_h264.c index ad9cf629df..b589fccc89 100644 --- a/libavcodec/qsvenc_h264.c +++ b/libavcodec/qsvenc_h264.c @@ -138,6 +138,7 @@ static const AVOption options[] = { { "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, .flags = VE, "int_ref_type" }, { "vertical", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, .flags = VE, "int_ref_type" }, { "horizontal", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2 }, .flags = VE, "int_ref_type" }, + { "slice" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 3 }, .flags = VE, "int_ref_type" }, { "int_ref_cycle_size", "Number of frames in the intra refresh cycle", OFFSET(qsv.int_ref_cycle_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, UINT16_MAX, VE }, { "int_ref_qp_delta", "QP difference for the refresh MBs", OFFSET(qsv.int_ref_qp_delta), AV_OPT_TYPE_INT, { .i64 = INT16_MIN }, INT16_MIN, INT16_MAX, VE }, { "recovery_point_sei", "Insert recovery point SEI messages", OFFSET(qsv.recovery_point_sei), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c index e11f5dec4a..8fcf8b2cef 100644 --- a/libavcodec/qsvenc_hevc.c +++ b/libavcodec/qsvenc_hevc.c @@ -267,6 +267,7 @@ static const AVOption options[] = { { "none", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, .flags = VE, "int_ref_type" }, { "vertical", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, .flags = VE, "int_ref_type" }, { "horizontal", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2 }, .flags = VE, "int_ref_type" }, + { "slice" , NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 3 }, .flags = VE, "int_ref_type" }, { "int_ref_cycle_size", "Number of frames in the intra refresh cycle", OFFSET(qsv.int_ref_cycle_size), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, UINT16_MAX, VE }, { "int_ref_qp_delta", "QP difference for the refresh MBs", OFFSET(qsv.int_ref_qp_delta), AV_OPT_TYPE_INT, { .i64 = INT16_MIN }, INT16_MIN, INT16_MAX, VE }, { "int_ref_cycle_dist", "Distance between the beginnings of the intra-refresh cycles in frames", OFFSET(qsv.int_ref_cycle_dist), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT16_MAX, VE }, -- 2.32.0 _______________________________________________ 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".
next prev parent reply other threads:[~2022-08-18 7:01 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-18 6:59 [FFmpeg-devel] [PATCH 1/6] libavcodec/qsvenc: Add max_frame_size reset support to qsv Wenbin Chen 2022-08-18 6:59 ` [FFmpeg-devel] [PATCH 2/6] libavcodec/qsvenc: Add gop_size reset support to qsvenc Wenbin Chen 2022-09-06 1:53 ` Xiang, Haihao 2022-09-06 8:44 ` Chen, Wenbin 2022-08-18 6:59 ` Wenbin Chen [this message] 2022-08-18 6:59 ` [FFmpeg-devel] [PATCH 4/6] libavcodec/qsvenc: Add intra refresh " Wenbin Chen 2022-08-18 6:59 ` [FFmpeg-devel] [PATCH 5/6] libavcodec/qsvenc: Add max/min qp reset support in qsvenc Wenbin Chen 2022-08-18 6:59 ` [FFmpeg-devel] [PATCH 6/6] libavcodec/qsvenc: Add low_delay_brc reset support to qsvenc Wenbin Chen
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220818065912.158693-3-wenbin.chen@intel.com \ --to=wenbin.chen-at-intel.com@ffmpeg.org \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git