[FFmpeg-devel] [PATCH] avfilter: add Audio Video Sync Test filter

Nicolas George george at nsup.org
Wed Mar 16 22:08:52 EET 2022


Paul B Mahol (12022-03-09):
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  libavfilter/Makefile         |   1 +
>  libavfilter/allfilters.c     |   1 +
>  libavfilter/src_avsynctest.c | 399 +++++++++++++++++++++++++++++++++++
>  3 files changed, 401 insertions(+)
>  create mode 100644 libavfilter/src_avsynctest.c

I opposed to this patch the first time, on the basis that our existing
sources (testsrc and sine) would do the job just as well, and you never
bothered to explain what this particular version would bring. I have
found out on my own and therefore withdraw my objection.
> 
> +static int32_t sin32(int32_t x, int shift)
> +{
> +    const double pi = M_PI;
> +    const int32_t a = ((2.0 * pi) * (1 << 24));
> +    const int32_t b = (1 << 7) * (12.0 / pi - 1.0 - pi) * (1 << 24);
> +    const int32_t c = (1 << 9) * 3.0 * (2.0 + pi - 16.0 / pi) * (1 << 24);
> +    int64_t x2, result;
> +    int32_t t1, t2;

Can you consider reuse the code from asrc_sine to generate a bit-exact
sin table?

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20220316/20d477b1/attachment.sig>


More information about the ffmpeg-devel mailing list