From: Michael Fabian 'Xaymar' Dirks <michael.dirks@xaymar.com> To: ffmpeg-devel@ffmpeg.org Cc: Michael Fabian 'Xaymar' Dirks <michael.dirks@xaymar.com> Subject: [FFmpeg-devel] [PATCH 4/5] avcodec/amfenc: Add "High Motion Quality Boost" option Date: Wed, 12 Jan 2022 23:49:23 +0100 Message-ID: <4c5c5017d96a602ad4d6ead5bd1122d0a7b7ac33.1642027745.git.michael.dirks@xaymar.com> (raw) In-Reply-To: <96117e46dbb4032a02d92c178ea4cc979203a0d3.1642027745.git.michael.dirks@xaymar.com> This option was missing from amfenc, and is now available. --- libavcodec/amfenc.h | 3 +++ libavcodec/amfenc_h264.c | 2 ++ libavcodec/amfenc_hevc.c | 3 ++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libavcodec/amfenc.h b/libavcodec/amfenc.h index 951e529362..f47e6a1200 100644 --- a/libavcodec/amfenc.h +++ b/libavcodec/amfenc.h @@ -108,6 +108,9 @@ typedef struct AmfContext { int me_quarter_pel; int aud; + // Unclear options, have different behavior based on codec. + int hmqb; + // HEVC - specific options int gops_per_idr; diff --git a/libavcodec/amfenc_h264.c b/libavcodec/amfenc_h264.c index afac97a968..87a3bb6a73 100644 --- a/libavcodec/amfenc_h264.c +++ b/libavcodec/amfenc_h264.c @@ -86,6 +86,7 @@ static const AVOption options[] = { { "filler_data", "Filler Data Enable", OFFSET(filler_data), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "vbaq", "Enable VBAQ", OFFSET(enable_vbaq), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "frame_skipping", "Rate Control Based Frame Skip", OFFSET(skip_frame), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, + { "hmqb", "High Motion Quality Boost", OFFSET(hmqb), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, /// QP Values { "qp_i", "Quantization Parameter for I-Frame", OFFSET(qp_i), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 51, VE }, @@ -331,6 +332,7 @@ static av_cold int amf_encode_init_h264(AVCodecContext *avctx) AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, AMF_VIDEO_ENCODER_ENFORCE_HRD, !!ctx->enforce_hrd); AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, AMF_VIDEO_ENCODER_FILLER_DATA_ENABLE, !!ctx->filler_data); AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, AMF_VIDEO_ENCODER_RATE_CONTROL_SKIP_FRAME_ENABLE, !!ctx->skip_frame); + AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, AMF_VIDEO_ENCODER_HIGH_MOTION_QUALITY_BOOST_ENABLE, !!ctx->hmqb); if (ctx->rate_control_mode == AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP) { AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, AMF_VIDEO_ENCODER_ENABLE_VBAQ, 0); if (ctx->enable_vbaq) diff --git a/libavcodec/amfenc_hevc.c b/libavcodec/amfenc_hevc.c index b7fee950f6..565be9bad9 100644 --- a/libavcodec/amfenc_hevc.c +++ b/libavcodec/amfenc_hevc.c @@ -74,6 +74,7 @@ static const AVOption options[] = { { "gops_per_idr", "GOPs per IDR 0-no IDR will be inserted", OFFSET(gops_per_idr), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, INT_MAX, VE }, { "preanalysis", "Enable preanalysis", OFFSET(preanalysis), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE}, { "vbaq", "Enable VBAQ", OFFSET(enable_vbaq), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE}, + { "hmqb", "High Motion Quality Boost", OFFSET(hmqb), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "enforce_hrd", "Enforce HRD", OFFSET(enforce_hrd), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE}, { "filler_data", "Filler Data Enable", OFFSET(filler_data), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE}, { "max_au_size", "Maximum Access Unit Size for rate control (in bits)", OFFSET(max_au_size), AV_OPT_TYPE_INT,{ .i64 = 0 }, 0, INT_MAX, VE}, @@ -231,7 +232,6 @@ static av_cold int amf_encode_init_hevc(AVCodecContext *avctx) } } - AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD, ctx->rate_control_mode); if (avctx->rc_buffer_size) { AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_VBV_BUFFER_SIZE, avctx->rc_buffer_size); @@ -253,6 +253,7 @@ static av_cold int amf_encode_init_hevc(AVCodecContext *avctx) } else { AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_ENABLE_VBAQ, !!ctx->enable_vbaq); } + AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_HIGH_MOTION_QUALITY_BOOST_ENABLE, !!ctx->hmqb); AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_MOTION_HALF_PIXEL, ctx->me_half_pel); AMF_ASSIGN_PROPERTY_BOOL(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_MOTION_QUARTERPIXEL, ctx->me_quarter_pel); -- 2.34.1.windows.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".
next prev parent reply other threads:[~2022-01-12 22:50 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-12 22:49 [FFmpeg-devel] [PATCH 1/5] avcodec: Require AMF SDK v1.4.23 or newer Michael Fabian 'Xaymar' Dirks 2022-01-12 22:49 ` [FFmpeg-devel] [PATCH 2/5] avcodec/amfenc: Set all color metadata for AMF Michael Fabian 'Xaymar' Dirks 2022-01-12 22:49 ` [FFmpeg-devel] [PATCH 3/5] avcodec/amfenc: Add the new usage presets Michael Fabian 'Xaymar' Dirks 2022-01-12 22:49 ` Michael Fabian 'Xaymar' Dirks [this message] 2022-01-12 22:49 ` [FFmpeg-devel] [PATCH 5/5] avcodec/amfenc: Add missing profiles Michael Fabian 'Xaymar' Dirks 2022-01-12 23:17 [FFmpeg-devel] [PATCH 1/5] avcodec: Require AMF SDK v1.4.23 or newer Michael Fabian 'Xaymar' Dirks 2022-01-12 23:17 ` [FFmpeg-devel] [PATCH 4/5] avcodec/amfenc: Add "High Motion Quality Boost" option Michael Fabian 'Xaymar' Dirks
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=4c5c5017d96a602ad4d6ead5bd1122d0a7b7ac33.1642027745.git.michael.dirks@xaymar.com \ --to=michael.dirks@xaymar.com \ --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