[FFmpeg-devel] [PATCH] checkasm/ac3dsp: add float_to_fixed24 test
flow gg
hlefthleft at gmail.com
Fri Nov 24 00:44:36 EET 2023
> You should probably add the test case to tests/fate/checkasm.mak
> This one is not necessary. You can reuse dst or dst2 for the bench() as
it's write only.
> Changed BUF_SIZE instead of 10.
Okay, changed.
James Almer <jamrial at gmail.com> 于2023年11月24日周五 01:11写道:
> On 11/23/2023 4:08 AM, flow gg wrote:
> > +static void check_float_to_fixed24(AC3DSPContext *c) {
> > +#define BUF_SIZE 1024
> > + LOCAL_ALIGNED_32(int32_t, v1, [BUF_SIZE]);
>
> This one is not necessary. You can reuse dst or dst2 for the bench() as
> it's write only.
>
> > + LOCAL_ALIGNED_32(float, v2, [BUF_SIZE]);
> > +
> > + declare_func(void, int32_t *, const float *, unsigned int);
> > +
> > + randomize_float(v2, BUF_SIZE);
> > +
> > + if (check_func(c->float_to_fixed24, "float_to_fixed24")) {
> > + LOCAL_ALIGNED_32(int32_t, dst, [BUF_SIZE]);
> > + LOCAL_ALIGNED_32(int32_t, dst2, [BUF_SIZE]);
> > +
> > + call_ref(dst, v2, BUF_SIZE);
> > + call_new(dst2, v2, BUF_SIZE);
> > +
> > + if (memcmp(dst, dst2, sizeof(*dst) * 10) != 0)
>
> BUF_SIZE instead of 10.
>
> > + fail();
> > +
> > + bench_new(v1, v2, BUF_SIZE);
> > + }
> > +
> > +
> > + report("float_to_fixed24");
> > +}
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: checkasm-ac3dsp-add-float_to_fixed24-test.patch
Type: text/x-patch
Size: 4799 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20231124/dfee79f0/attachment.bin>
More information about the ffmpeg-devel
mailing list