From: Kieran Kunhya via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Lynne <code@ffmpeg.org>, Kieran Kunhya <kieran618@googlemail.com> Subject: [FFmpeg-devel] Re: [PATCH] Miscellaneous aacdec_usac cleanups (PR #20627) Date: Mon, 29 Sep 2025 23:53:14 +0100 Message-ID: <CABGuwEmXUstAkNXJZ0pPajNmevX8H1YQ9PA6PkcqZZ2tVY29Ng@mail.gmail.com> (raw) In-Reply-To: <175915826520.25.4263526844597699342@bf249f23a2c8> On Mon, 29 Sept 2025, 16:04 Lynne via ffmpeg-devel, <ffmpeg-devel@ffmpeg.org> wrote: > PR #20627 opened by Lynne > URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20627 > Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20627.patch > > Nothing major. > > > >From 485939f5ba2051d3091bb130f0879d3b1ed83e6a Mon Sep 17 00:00:00 2001 > From: Lynne <dev@lynne.ee> > Date: Tue, 30 Sep 2025 00:02:19 +0900 > Subject: [PATCH 1/2] aacdec_usac: memset uncoded coeffs instead of > iterating > > Microoptimization. > --- > libavcodec/aac/aacdec_usac.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c > index c4b821bbba..38d5328029 100644 > --- a/libavcodec/aac/aacdec_usac.c > +++ b/libavcodec/aac/aacdec_usac.c > @@ -670,10 +670,8 @@ static int decode_spectrum_ac(AACDecContext *s, float > coef[1024], > > ff_aac_ac_finish(state, i, N); > > - for (; i < N/2; i++) { > - coef[2*i + 0] = 0; > - coef[2*i + 1] = 0; > - } > + /* Zero out uncoded coeffs */ > + memset(coef + 2*i, 0, N*sizeof(*coef))); > This looks wrong. It is only correct if i is guaranteed to be zero before the for loop. The number of elements to zero is not N*sizeof(...) otherwise. Kieran > _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
prev parent reply other threads:[~2025-09-29 22:53 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-09-29 15:04 [FFmpeg-devel] " Lynne via ffmpeg-devel 2025-09-29 22:53 ` Kieran Kunhya via ffmpeg-devel [this message]
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=CABGuwEmXUstAkNXJZ0pPajNmevX8H1YQ9PA6PkcqZZ2tVY29Ng@mail.gmail.com \ --to=ffmpeg-devel@ffmpeg.org \ --cc=code@ffmpeg.org \ --cc=kieran618@googlemail.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 http://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/ http://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