From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 4BDED4249A for ; Wed, 16 Mar 2022 21:44:34 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A744768B0A4; Wed, 16 Mar 2022 23:44:32 +0200 (EET) Received: from mail-yw1-f180.google.com (mail-yw1-f180.google.com [209.85.128.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BBAD468AF71 for ; Wed, 16 Mar 2022 23:44:25 +0200 (EET) Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-2e59939b862so38448827b3.10 for ; Wed, 16 Mar 2022 14:44:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=srNptfQpZb9r7ZiEvwBjECL5MY7QufMn69Ni4UB+do4=; b=PNm6dZjESNaKfYvsV2l2AvdlG8inY2wOpBD8aeWwpJTwKHv9kryrHqa228XTbx3LHM psrethiii+q0v5was9gNYowHZnnNvqPfKtvvIfdXapcnL6lk0d3aV6YQ/mEz8vPyFqSV s6pzover+gY7tXfWDPuZI21OnHjjklqgzs4mzJSiIbIhJG2OMhL+xnRF/sD9wmalhGxd nALIbg17VDxbdSWfee22OiINe5EzhQLVv3aJqxho/SgARv68VIo7qnHh0qRxvbk4aUiI Vpccrh3kt1G4nWL3+A9ret9/SpS3YIhp2xJI3I08hcl/Fs5Dr8BSK0YUHJXbgKAXR0z+ AbHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=srNptfQpZb9r7ZiEvwBjECL5MY7QufMn69Ni4UB+do4=; b=1gEUOCQvVneIYMPjd+/hGQ7EDHmKDRZp5klH798BSWjNdFatg4T5J0PUkaWlz+AEl0 LsvvEYnXQfmOrn/Dvbq12BEPKGYNd1w4roKwzfx2ibMVTm4OcgP8coT7rdAvOVipKwO4 isWqbpuT4026nEYCgOD1PgV4iXFbrWQtfhMI1div4+hpQplIla6+Iecu+ZFhPsuNLWb0 SsaBG7t4qXL/QVPNu5oCmG8lf8jEOUannqhQFk93tMawFK69vOxfuutvJqZOanFO2sGs 3c7+Ch+J3V6GTD2A46ijF0FKK+zB0dW+1jLCuItDiVo+WBTjA4ybIm+IRjUFFRHPzb0U 4bfA== X-Gm-Message-State: AOAM532TKyRHgeWvS7uK44YFYLhxEPGEIBjoR+1xCiSuROAVLdvf4WzD 8oQi21OAbmUYsHYvcWDDl0seF4J0q2HqgGM8ZWCdfXAY X-Google-Smtp-Source: ABdhPJyH2R4dekd6H19zXaBIWozJ0KRURUkTjDf833MKRfBhS2LQtt9QK4w2+ZbBOteBMCZZ34avAGwsDXYy7eqPgRo= X-Received: by 2002:a81:5c03:0:b0:2dc:e44:41ca with SMTP id q3-20020a815c03000000b002dc0e4441camr2597590ywb.302.1647467064159; Wed, 16 Mar 2022 14:44:24 -0700 (PDT) MIME-Version: 1.0 References: <20220309172200.858111-1-onemda@gmail.com> In-Reply-To: From: Paul B Mahol Date: Wed, 16 Mar 2022 22:46:19 +0100 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] avfilter: add Audio Video Sync Test filter X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Wed, Mar 16, 2022 at 9:08 PM Nicolas George wrote: > Paul B Mahol (12022-03-09): > > Signed-off-by: Paul B Mahol > > --- > > 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? > This one uses s32 instead of s16. and should be already bitexact, no? (That constants should always be same fixed precision number...) I think that using limited size table will make sine less precise when viewed in spectrum analyser, it will have side lobes, extra sinusoids but with small gain. Also sine filter does not allow volume adjustment at all (unless one use volume filter, but that have drawbacks). This one allow at least some limited signal amplitude adjustments in power of 2 and is very compact. > > Regards, > > -- > Nicolas George > _______________________________________________ > 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". > _______________________________________________ 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".