From: Suraj Shirvankar <surajshirvankar@gmail.com> To: ffmpeg-devel@ffmpeg.org Cc: Suraj Shirvankar <surajshirvankar@gmail.com> Subject: [FFmpeg-devel] [PATCH] vfilter: Speed up vf_mutiply with inlining Date: Fri, 14 Apr 2023 23:08:10 +0200 Message-ID: <20230414210810.47688-1-surajshirvankar@gmail.com> (raw) Add inline to provide a slight speed up fo vf_multiply Signed-off-by: Suraj Shirvankar <surajshirvankar@gmail.com> --- libavfilter/vf_multiply.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libavfilter/vf_multiply.c b/libavfilter/vf_multiply.c index 979b885eb1..b9ff92d8e1 100644 --- a/libavfilter/vf_multiply.c +++ b/libavfilter/vf_multiply.c @@ -72,9 +72,8 @@ static int config_input(AVFilterLink *inlink) return 0; } -static void multiply(const uint8_t *ssrc, const uint8_t *rref, uint8_t *ddst, - float scale, float offset, int w) -{ +static inline void multiply(const uint8_t *ssrc, const uint8_t *rref, + uint8_t *ddst, float scale, float offset, int w) { const float *src = (const float *)ssrc; const float *ref = (const float *)rref; float *dst = (float *)ddst; @@ -86,8 +85,8 @@ static void multiply(const uint8_t *ssrc, const uint8_t *rref, uint8_t *ddst, } } -static int multiply_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) -{ +static inline int multiply_slice(AVFilterContext *ctx, void *arg, int jobnr, + int nb_jobs) { MultiplyContext *s = ctx->priv; const float offset = s->offset; const float scale = s->scale; -- 2.40.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 reply other threads:[~2023-04-14 21:08 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-14 21:08 Suraj Shirvankar [this message] 2023-04-14 23:32 ` Ronald S. Bultje 2023-04-15 6:22 ` Suraj Shirvankar
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=20230414210810.47688-1-surajshirvankar@gmail.com \ --to=surajshirvankar@gmail.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