From: ffmpegagent <ffmpegagent@gmail.com> To: ffmpeg-devel@ffmpeg.org Cc: softworkz <softworkz@hotmail.com>, "Xiang, Haihao" <haihao.xiang-at-intel.com@ffmpeg.org>, Gyan Doshi <ffmpeg@gyani.pro> Subject: [FFmpeg-devel] [PATCH v2 00/11] Fixes and Enhancements for VAAPI Overlay Date: Mon, 31 Oct 2022 06:19:56 +0000 Message-ID: <pull.42.v2.ffstaging.FFmpeg.1667197207.ffmpegagent@gmail.com> (raw) In-Reply-To: <pull.42.ffstaging.FFmpeg.1665399281.ffmpegagent@gmail.com> This patchset resolves a number of issues in the current code: * Bogus doubles framesync initialization * Executing build_parameters on each input frame * Segfault when there's no secondary input (yet) and adds a number of enhancements to bring this on-par with the other overlay filters: * Enable pixel alpha blending * Expose framesync parameters * Add support for expressions in overlay parameters (x, y, w, h) v2 Changes: * Changed var names to all-caps * Added note about defaults for w/h to filters.texi softworkz (11): avfilter/overlay_vaapi: use FILTER_SINGLE_PIXFMT avfilter/overlay_vaapi: build filter params just once avfilter/overlay_vaapi: remove double framesync init avfilter/overlay_vaapi: handle secondary null input avfilter/overlay_vaapi: reformat options avfilter/overlay_vaapi: remove redundant .get_buffer assignments avfilter/overlay_vaapi: add framesync options avfilter/overlay_vaapi: precalculate blend_state, enable pixel alpha avfilter/overlay_vaapi: enable expressions for overlay parameters doc/filters.texi: remove incorrect statement doc/filters.texi: update overlay_vaapi documentation doc/filters.texi | 52 ++++-- libavfilter/vf_overlay_vaapi.c | 328 ++++++++++++++++++++++----------- 2 files changed, 259 insertions(+), 121 deletions(-) base-commit: f3b5277057ad84071721f01419fe4badeceaff08 Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-42%2Fsoftworkz%2Fsubmit_vaapi_overlay-v2 Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-42/softworkz/submit_vaapi_overlay-v2 Pull-Request: https://github.com/ffstaging/FFmpeg/pull/42 Range-diff vs v1: 1: 6ec5e9960b = 1: 6ec5e9960b avfilter/overlay_vaapi: use FILTER_SINGLE_PIXFMT 2: 3c1629de97 = 2: 3c1629de97 avfilter/overlay_vaapi: build filter params just once 3: 2bd535abb5 = 3: 2bd535abb5 avfilter/overlay_vaapi: remove double framesync init 4: fb365de036 = 4: fb365de036 avfilter/overlay_vaapi: handle secondary null input 5: 6624c66688 = 5: 6624c66688 avfilter/overlay_vaapi: reformat options 6: 989f16597e = 6: 989f16597e avfilter/overlay_vaapi: remove redundant .get_buffer assignments 7: 5ff8f82002 = 7: 5ff8f82002 avfilter/overlay_vaapi: add framesync options 8: 4fba07d9f9 = 8: 4fba07d9f9 avfilter/overlay_vaapi: precalculate blend_state, enable pixel alpha 9: 36ed7b96eb ! 9: 20b9e9c992 avfilter/overlay_vaapi: enable expressions for overlay parameters @@ libavfilter/vf_overlay_vaapi.c +#include "libavutil/eval.h" + +enum var_name { -+ VAR_MAIN_iW, VAR_MW, -+ VAR_MAIN_iH, VAR_MH, -+ VAR_OVERLAY_iW, -+ VAR_OVERLAY_iH, ++ VAR_MAIN_IW, VAR_MW, ++ VAR_MAIN_IH, VAR_MH, ++ VAR_OVERLAY_IW, ++ VAR_OVERLAY_IH, + VAR_OVERLAY_X, VAR_OX, + VAR_OVERLAY_Y, VAR_OY, + VAR_OVERLAY_W, VAR_OW, @@ libavfilter/vf_overlay_vaapi.c: static int have_alpha_planar(AVFilterLink *link) + AVFilterContext *avctx = inlink->dst; + OverlayVAAPIContext *ctx = avctx->priv; + -+ ctx->var_values[VAR_MAIN_iW] = ++ ctx->var_values[VAR_MAIN_IW] = + ctx->var_values[VAR_MW] = inlink->w; -+ ctx->var_values[VAR_MAIN_iH] = ++ ctx->var_values[VAR_MAIN_IH] = + ctx->var_values[VAR_MH] = inlink->h; + + return ff_vaapi_vpp_config_input(inlink); @@ libavfilter/vf_overlay_vaapi.c: static int have_alpha_planar(AVFilterLink *link) OverlayVAAPIContext *ctx = avctx->priv; + int ret; + -+ ctx->var_values[VAR_OVERLAY_iW] = inlink->w; -+ ctx->var_values[VAR_OVERLAY_iH] = inlink->h; ++ ctx->var_values[VAR_OVERLAY_IW] = inlink->w; ++ ctx->var_values[VAR_OVERLAY_IH] = inlink->h; + + ret = eval_expr(avctx); + if (ret < 0) 10: 3618b3e941 = 10: be57f70a9d doc/filters.texi: remove incorrect statement 11: 675b5279c3 ! 11: b3ea03e037 doc/filters.texi: update overlay_vaapi documentation @@ doc/filters.texi: It takes two inputs and has one output. The first input is the +Set expressions for the width and height the overlaid video +on the main video. + ++Default values are 'overlay_iw' for 'w' and 'overlay_ih*w/overlay_iw' for 'h'. ++ +The expressions can contain the following parameters: + +@table @option -- ffmpeg-codebot _______________________________________________ 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-10-31 6:20 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-10 10:54 [FFmpeg-devel] [PATCH " ffmpegagent 2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 01/11] avfilter/overlay_vaapi: use FILTER_SINGLE_PIXFMT softworkz 2022-10-31 5:55 ` Xiang, Haihao 2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 02/11] avfilter/overlay_vaapi: build filter params just once softworkz 2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 03/11] avfilter/overlay_vaapi: remove double framesync init softworkz 2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 04/11] avfilter/overlay_vaapi: handle secondary null input softworkz 2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 05/11] avfilter/overlay_vaapi: reformat options softworkz 2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 06/11] avfilter/overlay_vaapi: remove redundant .get_buffer assignments softworkz 2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 07/11] avfilter/overlay_vaapi: add framesync options softworkz 2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 08/11] avfilter/overlay_vaapi: precalculate blend_state, enable pixel alpha softworkz 2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 09/11] avfilter/overlay_vaapi: enable expressions for overlay parameters softworkz 2022-10-31 5:43 ` Xiang, Haihao 2022-10-31 5:56 ` Soft Works 2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 10/11] doc/filters.texi: remove incorrect statement softworkz 2022-10-10 10:54 ` [FFmpeg-devel] [PATCH 11/11] doc/filters.texi: update overlay_vaapi documentation softworkz 2022-10-10 11:08 ` Gyan Doshi 2022-10-10 11:25 ` Soft Works 2022-10-31 6:19 ` ffmpegagent [this message] 2022-10-31 6:19 ` [FFmpeg-devel] [PATCH v2 01/11] avfilter/overlay_vaapi: use FILTER_SINGLE_PIXFMT softworkz 2022-11-04 2:07 ` Xiang, Haihao 2022-11-07 3:10 ` Xiang, Haihao 2022-10-31 6:19 ` [FFmpeg-devel] [PATCH v2 02/11] avfilter/overlay_vaapi: build filter params just once softworkz 2022-10-31 6:19 ` [FFmpeg-devel] [PATCH v2 03/11] avfilter/overlay_vaapi: remove double framesync init softworkz 2022-10-31 6:20 ` [FFmpeg-devel] [PATCH v2 04/11] avfilter/overlay_vaapi: handle secondary null input softworkz 2022-10-31 6:20 ` [FFmpeg-devel] [PATCH v2 05/11] avfilter/overlay_vaapi: reformat options softworkz 2022-10-31 6:20 ` [FFmpeg-devel] [PATCH v2 06/11] avfilter/overlay_vaapi: remove redundant .get_buffer assignments softworkz 2022-10-31 6:20 ` [FFmpeg-devel] [PATCH v2 07/11] avfilter/overlay_vaapi: add framesync options softworkz 2022-10-31 6:20 ` [FFmpeg-devel] [PATCH v2 08/11] avfilter/overlay_vaapi: precalculate blend_state, enable pixel alpha softworkz 2022-10-31 6:20 ` [FFmpeg-devel] [PATCH v2 09/11] avfilter/overlay_vaapi: enable expressions for overlay parameters softworkz 2022-10-31 6:20 ` [FFmpeg-devel] [PATCH v2 10/11] doc/filters.texi: remove incorrect statement softworkz 2022-10-31 6:20 ` [FFmpeg-devel] [PATCH v2 11/11] doc/filters.texi: update overlay_vaapi documentation softworkz
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=pull.42.v2.ffstaging.FFmpeg.1667197207.ffmpegagent@gmail.com \ --to=ffmpegagent@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=ffmpeg@gyani.pro \ --cc=haihao.xiang-at-intel.com@ffmpeg.org \ --cc=softworkz@hotmail.com \ /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