From: "Ronald S. Bultje" <rsbultje@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Stone Chen <chen.stonechen@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH v4 1/2][GSoC 2024] libavcodec/x86/vvc: Add AVX2 DMVR SAD functions for VVC Date: Mon, 20 May 2024 07:23:14 -0400 Message-ID: <CAEEMt2muzicqRDj-MFkYOLpw+q47+571YZ21ybKziatYxpFHUg@mail.gmail.com> (raw) In-Reply-To: <20240520004210.11489-2-chen.stonechen@gmail.com> Hi, This is mostly good, the following is tiny nitpicks. On Sun, May 19, 2024 at 8:46 PM Stone Chen <chen.stonechen@gmail.com> wrote: > +%macro INIT_OFFSET 6 ; src1, src2, dxq, dyq, off1, off2 > The macro is only used once, so you could inline it in the calling function. > > + imul %5, 128 > + imul %6, 128 > I believe shl is typically preferred over imul for powers of two. > + add %5, 2 > + add %6, 2 > And these can be integrated as a constant offset in the lea below (lea %1, [%1 + %5 * 2 + 2 * 2], same for %2). > + add %5, %3 > + sub %6, %3 > + > + lea %1, [%1 + %5 * 2] > + lea %2, [%2 + %6 * 2] [..] > +cglobal vvc_sad, 6, 11, 5, src1, src2, dx, dy, block_w, block_h, off1, > off2, row_idx, dx2, dy2 > + movsxd dx2q, dxd > + movsxd dy2q, dyd > If you change the argument type from int to intptr_t, this is not necessary anymore. > + vvc_sad_16_128: > + .loop_height: > + mov off1q, src1q > + mov off2q, src2q > + mov row_idxd, block_wd > + sar row_idxd, 4 > You could right-shift block_wd by 4 outside the loop (before .loop_height). Ronald _______________________________________________ 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:[~2024-05-20 11:23 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-20 0:42 Stone Chen 2024-05-20 0:42 ` [FFmpeg-devel] [PATCH v4 2/2][GSoC 2024] tests/checkasm: Add check_vvc_sad to vvc_mc.c Stone Chen 2024-05-21 5:12 ` Rémi Denis-Courmont 2024-05-21 6:37 ` Martin Storsjö 2024-05-21 8:47 ` Rémi Denis-Courmont 2024-05-21 10:12 ` Martin Storsjö 2024-05-21 14:35 ` Ronald S. Bultje 2024-05-20 11:23 ` Ronald S. Bultje [this message] 2024-05-20 15:52 ` [FFmpeg-devel] [PATCH v4 1/2][GSoC 2024] libavcodec/x86/vvc: Add AVX2 DMVR SAD functions for VVC Ronald S. Bultje 2024-05-22 0:05 ` Stone Chen -- strict thread matches above, loose matches on Subject: below -- 2024-05-20 0:37 Stone 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=CAEEMt2muzicqRDj-MFkYOLpw+q47+571YZ21ybKziatYxpFHUg@mail.gmail.com \ --to=rsbultje@gmail.com \ --cc=chen.stonechen@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