[FFmpeg-devel] Error in ATRAC1 decoder?
Michael Niedermayer
michaelni at gmx.at
Sat Nov 21 03:24:47 CET 2015
On Sat, Nov 21, 2015 at 01:24:35AM +0300, Даниил Чередник wrote:
> I rechecked it.
> The issue with test is the test uses decoded from aea sample pcm file. And
> it looks like this file is not correctly decoded (it is easy to see at
> 0.7221 sec, https://yadi.sk/i/8WBO701XkcHUv). Same place decoded by fixed
> version is https://yadi.sk/i/efG3lkEGkcHYE.
>
> Also I made test with newly encoded ATRAC1 file. I included source pcm and
> encoded aea in to the fate test. These files are here
> https://yadi.sk/d/DA-xxzM_kcJ5t
>
>
>
> On Wed, Nov 18, 2015 at 10:19 PM, Michael Niedermayer <michaelni at gmx.at>
> wrote:
>
> > On Tue, Nov 17, 2015 at 04:08:29AM +0300, Даниил Чередник wrote:
> > > Thank you for answer.
> > >
> > > If I understood available ATRAC1 docs, the purpose of this delay line is
> > > just to compensate delay of 1st QMF because for 1st and 2nd band we have
> > > two QMF but for 3rd band just one.
> > >
> > > About test, yes for some reason this patch brakes it. I will try to find
> > > out. Sorry, I should have done it before.
> >
> > np
> > if the changed / new version is more correct then please also provide
> > a new reference file for the fate samples with a new filename and
> > update the fate test so it uses the new file
> >
> > thanks
> >
> > >
> > > I tried to decode "The Four Seasons, Concerto Alla Rustica in G - Winter-
> > > Largo.aea" sample, the results are:
> > > without patch: https://yadi.sk/i/PCFplrafkWEFC
> > > with patch: https://yadi.sk/i/iLUR188gkWEFn
> > > On zoomed spectrogram it is possible to find aliasing if decode without
> > > patch. I can share decoded wav file if needed.
> > >
> > >
> > >
> > > On Mon, Nov 16, 2015 at 3:45 AM, Michael Niedermayer
> > <michael at niedermayer.cc
> > > > wrote:
> > >
> > > > On Sat, Nov 14, 2015 at 02:59:30AM +0300, Даниил Чередник wrote:
> > > > > Hello!
> > > > >
> > > > > I have noticed if decode
> > > > >
> > > >
> > https://samples.ffmpeg.org/A-codecs/ATRAC1/Test%20tones%20disc%20-%20Chirp.aea
> > > > > file by ffmpeg we got aliasing near 11025Hz. Screenshots:
> > > > > https://yadi.sk/i/r-95jZkKkSnbu https://yadi.sk/i/PV92LNESkSnby
> > > > >
> > > > > I was tried to solve it:
> > > > >
> > > > > ATRAC1 - hybrid codec, has two stacked QMF and splits the signal
> > into 3
> > > > > band before MDCT. Thereby we need to compensate delay of one QMF to
> > > > > achieve reconstruction.
> > > > > There is a delay line but it looks like delay for 23 sample is not
> > > > correct.
> > > > > I have done some experiments and got 39 should be right delay.
> > Results of
> > > > > decoding with patch: https://yadi.sk/i/yooaIQrmkSncB
> > > > > https://yadi.sk/i/CUXsH7-CkSncK
> > > > >
> > > >
> > > > > To be honest I am not a prof in math and it would be great if someone
> > > > > recheck it from math perspective.
> > > >
> > > > i dont think math can help here
> > > > whatever a format requires that has to be done, this could even be
> > > > wrong from a math point of view of a ideal transform
> > > >
> > > >
> > > > >
> > > > > There is a patch in attach.
> > > >
> > > > the patch also affects the atrac1 fate test
> > > > have you checked if the new output for that test is better than the
> > > > old ?
> > > >
> > > > make V=2 fate-atrac1
> > > >
> > > > also have you looked at other files, is this improving all files ?
> > > > any that get worse ?
> > > >
> > > >
> > > > [...]
> > > >
> > > > --
> > > > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> > > >
> > > > Many that live deserve death. And some that die deserve life. Can you
> > give
> > > > it to them? Then do not be too eager to deal out death in judgement.
> > For
> > > > even the very wise cannot see all ends. -- Gandalf
> > > >
> > > > _______________________________________________
> > > > ffmpeg-devel mailing list
> > > > ffmpeg-devel at ffmpeg.org
> > > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > > >
> > > >
> > >
> > >
> > > --
> > > Daniil Cherednik
> > > _______________________________________________
> > > ffmpeg-devel mailing list
> > > ffmpeg-devel at ffmpeg.org
> > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > --
> > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> >
> > The greatest way to live with honor in this world is to be what we pretend
> > to be. -- Socrates
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> >
>
>
> --
> Daniil Cherednik
> libavcodec/atrac1.c | 8 ++++----
> tests/fate/atrac.mak | 13 ++++++++++---
> 2 files changed, 14 insertions(+), 7 deletions(-)
> dd5fc1eb5d68026fa06b90f6c20cad643c0280a0 0001-fix-atrac1-decoder-QMF-delay-compensation-should-be-.patch
> From 00d07b0c655cd6171e77b6a2b9140cb7a80c0ade Mon Sep 17 00:00:00 2001
> From: Daniil Cherednik <dan.cherednik at gmail.com>
> Date: Sat, 14 Nov 2015 01:57:25 +0300
> Subject: [PATCH] fix atrac1 decoder: QMF delay compensation should be 39
> samples
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151121/d91f9ad5/attachment.sig>
More information about the ffmpeg-devel
mailing list