Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Mon, Mar 16, 2015 at 12:41 AM, Michael Niedermayer wrote: > On Fri, Mar 13, 2015 at 03:53:56PM -0300, Claudio Freire wrote: >> On Fri, Mar 13, 2015 at 3:06 PM, Michael Niedermayer >> wrote: >> > On Fri, Mar 13, 2015 at 02:34:08PM -0300, Claudio Freire wrote: >> >> On Fri, Mar 13, 2015 at 12:39 PM, Nedeljko Babic >> >> wrote: >> >> >> btw, i use the qemu from https://github.com/ssvb/QEMU.git >> >> >> for mips as it at least years ago supported more extensions, i >> >> >> would have guessed these where merged into main qemu but as you list >> >> >> all the disables in the wiki, maybe i was guessing wrong >> >> > >> >> > I can confirm that main qemu supports both fpu and dspr1/dspr2 >> >> > extension. >> >> > Appropriate cpu model needs to be selected in order for the extension >> >> > to be available. >> >> > 74Kf supports all extensions, so adding "-cpu 74Kf" in "--target-exec" >> >> > should enable fpu, dspr1 and dspr2 extensions. >> >> >> >> As I was building on a more complete reply, the problem I have is with >> >> the glibc, which is built with the soft float ABI. >> >> >> > >> >> As soon as I finish all the tests (they take a while) I'll post more >> > >> > they really shouldnt take much time >> > >> > a build (with ccache) should be quite fast and you only need to test >> > make -j fate-aac-s7350-encode >> > >> > can it be that theres some float rounding somewhere that leads to a >> > different decission that causes this ? >> >> Soft float is slow, add emulation and it's worse. The build is fast >> enough, it's the tests the ones that are slow. >> >> I'm going to try adding a hard-float version of the glibc in >> opensuse's build service. >> >> But first I want to get the patch that fixes mips tests verified. > > btw, if you cant reproduce this issue, maybe it would be best to > just leave this one fate test out and continue, maybe one of the > subsequent bug fixes will fix this too I managed to reproduce it with a hardfloat build, so indeed it seems like a float rounding issue. Now it only needs solving. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 13, 2015 at 03:53:56PM -0300, Claudio Freire wrote: > On Fri, Mar 13, 2015 at 3:06 PM, Michael Niedermayer wrote: > > On Fri, Mar 13, 2015 at 02:34:08PM -0300, Claudio Freire wrote: > >> On Fri, Mar 13, 2015 at 12:39 PM, Nedeljko Babic > >> wrote: > >> >> btw, i use the qemu from https://github.com/ssvb/QEMU.git > >> >> for mips as it at least years ago supported more extensions, i > >> >> would have guessed these where merged into main qemu but as you list > >> >> all the disables in the wiki, maybe i was guessing wrong > >> > > >> > I can confirm that main qemu supports both fpu and dspr1/dspr2 extension. > >> > Appropriate cpu model needs to be selected in order for the extension to > >> > be available. > >> > 74Kf supports all extensions, so adding "-cpu 74Kf" in "--target-exec" > >> > should enable fpu, dspr1 and dspr2 extensions. > >> > >> As I was building on a more complete reply, the problem I have is with > >> the glibc, which is built with the soft float ABI. > >> > > > >> As soon as I finish all the tests (they take a while) I'll post more > > > > they really shouldnt take much time > > > > a build (with ccache) should be quite fast and you only need to test > > make -j fate-aac-s7350-encode > > > > can it be that theres some float rounding somewhere that leads to a > > different decission that causes this ? > > Soft float is slow, add emulation and it's worse. The build is fast > enough, it's the tests the ones that are slow. > > I'm going to try adding a hard-float version of the glibc in > opensuse's build service. > > But first I want to get the patch that fixes mips tests verified. btw, if you cant reproduce this issue, maybe it would be best to just leave this one fate test out and continue, maybe one of the subsequent bug fixes will fix this too [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB What does censorship reveal? It reveals fear. -- Julian Assange signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 13, 2015 at 3:06 PM, Michael Niedermayer wrote: > On Fri, Mar 13, 2015 at 02:34:08PM -0300, Claudio Freire wrote: >> On Fri, Mar 13, 2015 at 12:39 PM, Nedeljko Babic >> wrote: >> >> btw, i use the qemu from https://github.com/ssvb/QEMU.git >> >> for mips as it at least years ago supported more extensions, i >> >> would have guessed these where merged into main qemu but as you list >> >> all the disables in the wiki, maybe i was guessing wrong >> > >> > I can confirm that main qemu supports both fpu and dspr1/dspr2 extension. >> > Appropriate cpu model needs to be selected in order for the extension to >> > be available. >> > 74Kf supports all extensions, so adding "-cpu 74Kf" in "--target-exec" >> > should enable fpu, dspr1 and dspr2 extensions. >> >> As I was building on a more complete reply, the problem I have is with >> the glibc, which is built with the soft float ABI. >> > >> As soon as I finish all the tests (they take a while) I'll post more > > they really shouldnt take much time > > a build (with ccache) should be quite fast and you only need to test > make -j fate-aac-s7350-encode > > can it be that theres some float rounding somewhere that leads to a > different decission that causes this ? Soft float is slow, add emulation and it's worse. The build is fast enough, it's the tests the ones that are slow. I'm going to try adding a hard-float version of the glibc in opensuse's build service. But first I want to get the patch that fixes mips tests verified. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 13, 2015 at 02:34:08PM -0300, Claudio Freire wrote: > On Fri, Mar 13, 2015 at 12:39 PM, Nedeljko Babic > wrote: > >> btw, i use the qemu from https://github.com/ssvb/QEMU.git > >> for mips as it at least years ago supported more extensions, i > >> would have guessed these where merged into main qemu but as you list > >> all the disables in the wiki, maybe i was guessing wrong > > > > I can confirm that main qemu supports both fpu and dspr1/dspr2 extension. > > Appropriate cpu model needs to be selected in order for the extension to be > > available. > > 74Kf supports all extensions, so adding "-cpu 74Kf" in "--target-exec" > > should enable fpu, dspr1 and dspr2 extensions. > > As I was building on a more complete reply, the problem I have is with > the glibc, which is built with the soft float ABI. > > As soon as I finish all the tests (they take a while) I'll post more they really shouldnt take much time a build (with ccache) should be quite fast and you only need to test make -j fate-aac-s7350-encode can it be that theres some float rounding somewhere that leads to a different decission that causes this ? > details. But I've run the thing several times built in different ways, > and when it runs at all, it runs fine (the tests are fixed), so I > don't know why they're not fixed fo r > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Concerning the gods, I have no means of knowing whether they exist or not or of what sort they may be, because of the obscurity of the subject, and the brevity of human life -- Protagoras signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 13, 2015 at 12:39 PM, Nedeljko Babic wrote: >> btw, i use the qemu from https://github.com/ssvb/QEMU.git >> for mips as it at least years ago supported more extensions, i >> would have guessed these where merged into main qemu but as you list >> all the disables in the wiki, maybe i was guessing wrong > > I can confirm that main qemu supports both fpu and dspr1/dspr2 extension. > Appropriate cpu model needs to be selected in order for the extension to be > available. > 74Kf supports all extensions, so adding "-cpu 74Kf" in "--target-exec" should > enable fpu, dspr1 and dspr2 extensions. As I was building on a more complete reply, the problem I have is with the glibc, which is built with the soft float ABI. As soon as I finish all the tests (they take a while) I'll post more details. But I've run the thing several times built in different ways, and when it runs at all, it runs fine (the tests are fixed), so I don't know why they're not fixed fo r ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 13, 2015 at 2:34 PM, Claudio Freire wrote: > On Fri, Mar 13, 2015 at 12:39 PM, Nedeljko Babic > wrote: >>> btw, i use the qemu from https://github.com/ssvb/QEMU.git >>> for mips as it at least years ago supported more extensions, i >>> would have guessed these where merged into main qemu but as you list >>> all the disables in the wiki, maybe i was guessing wrong >> >> I can confirm that main qemu supports both fpu and dspr1/dspr2 extension. >> Appropriate cpu model needs to be selected in order for the extension to be >> available. >> 74Kf supports all extensions, so adding "-cpu 74Kf" in "--target-exec" >> should enable fpu, dspr1 and dspr2 extensions. > > As I was building on a more complete reply, the problem I have is with > the glibc, which is built with the soft float ABI. > > As soon as I finish all the tests (they take a while) I'll post more > details. But I've run the thing several times built in different ways, > and when it runs at all, it runs fine (the tests are fixed), so I > don't know why they're not fixed fo r ..for you. Sorry, hand slipped and sent the email prematurely. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
> btw, i use the qemu from https://github.com/ssvb/QEMU.git > for mips as it at least years ago supported more extensions, i > would have guessed these where merged into main qemu but as you list > all the disables in the wiki, maybe i was guessing wrong I can confirm that main qemu supports both fpu and dspr1/dspr2 extension. Appropriate cpu model needs to be selected in order for the extension to be available. 74Kf supports all extensions, so adding "-cpu 74Kf" in "--target-exec" should enable fpu, dspr1 and dspr2 extensions. -Nedeljko ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 13, 2015 at 12:36:58PM +0100, Michael Niedermayer wrote: > On Fri, Mar 13, 2015 at 12:30:30PM +0100, Michael Niedermayer wrote: > > On Fri, Mar 13, 2015 at 04:42:36AM -0300, Claudio Freire wrote: > > > On Tue, Mar 10, 2015 at 10:08 AM, Claudio Freire > > > wrote: > > > > On Tue, Mar 10, 2015 at 8:05 AM, Michael Niedermayer > > > > wrote: > > > >>> I cannot test myself yet (cannot build against mips, it will > > > >>> probably take me a long while before I can set up qemu for that), but > > > >>> the patch should bring both implementations in sync, at least enough > > > >>> for the test to pass without the -b:a 88k > > > >> > > > >> if you use a debian based distro then the packages from > > > >> http://www.emdebian.org/ > > > >> can probably be used to cross compile to mips > > > >> (you might need to force some versions manually during install, at > > > >> least in the past the binary packages referred to many non existing > > > >> package versions so only some versions of the packages had all > > > >> dependancies available) > > > > > > > > I don't have any debian or its derivatives at hand sadly. I may > > > > unearth an old laptop that had some form of ubuntu at some point, it's > > > > old and slow but that shouldn't be a problem for this sort of thing, > > > > but that will have to wait until next week. > > > > > > > > In the meantime I'm trying to make cross-mips-linux-gcc work on > > > > openSuse without much luck yet. > > > > > > > > > I got lucky and was able to cross-build in openSUSE. > > > > > > Just in case others also use openSUSE, I put the instructions on the > > > wiki (I hadn't found any, if there are, I'll welcome pointers and I'll > > > merge them): http://trac.ffmpeg.org/wiki/CompilationGuide/MIPS > > > > > > > > I confirmed that the previous patch does fix the test on mips. > > > > i tried again: > > > > 43a1cc5 Add AAC tests for 7350hz sampling rates and M/S > > tests/fate/aac.mak | 29 + > > 1 file changed, 29 insertions(+) > > c5e02b1 AAC: [PATCH] AAC: Add support for 7350Hz sampling rates > > libavcodec/mips/aaccoder_mips.c | 26 +- > > 1 file changed, 13 insertions(+), 13 deletions(-) > > > > i tried 2 qemu versions, i tried with and without > > --disable-mipsdspr1 --disable-mipsdspr2 --disable-mipsfpu > > > > but i still get this > > > > stddev: 443.22 PSNR: 43.40 MAXDIFF: 5038 bytes: 176400/ 180224 > > stddev: |443.22 - 414| >= 5 > > Test aac-s7350-encode failed. Look at tests/data/fate/aac-s7350-encode.err > > for details. > > > > mips-linux-gnu-gcc-4.4 (Debian 4.4.5-8) 4.4.5 > > > > btw, i use the qemu from https://github.com/ssvb/QEMU.git > > for mips as it at least years ago supported more extensions, i > > would have guessed these where merged into main qemu but as you list > > all the disables in the wiki, maybe i was guessing wrong > > > > can you repost the patchset that works for you ? > > so to make double sure we use the same code > > tried with --disable-optimizations and --arch=generic > so that define ARCH_MIPS 0 > it still fails the same way with mips-linux-gnu-gcc-4.4 with sh4-linux-gnu-gcc-4.7 (Debian 4.7.2-5) 4.7.2 it fails like this: stddev: 440.58 PSNR: 43.45 MAXDIFF: 5794 bytes: 176400/ 180224 stddev: |440.58 - 414| >= 5 so this is not mips or big endian specific [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No human being will ever know the Truth, for even if they happen to say it by chance, they would not even known they had done so. -- Xenophanes signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 13, 2015 at 12:30:30PM +0100, Michael Niedermayer wrote: > On Fri, Mar 13, 2015 at 04:42:36AM -0300, Claudio Freire wrote: > > On Tue, Mar 10, 2015 at 10:08 AM, Claudio Freire > > wrote: > > > On Tue, Mar 10, 2015 at 8:05 AM, Michael Niedermayer > > > wrote: > > >>> I cannot test myself yet (cannot build against mips, it will > > >>> probably take me a long while before I can set up qemu for that), but > > >>> the patch should bring both implementations in sync, at least enough > > >>> for the test to pass without the -b:a 88k > > >> > > >> if you use a debian based distro then the packages from > > >> http://www.emdebian.org/ > > >> can probably be used to cross compile to mips > > >> (you might need to force some versions manually during install, at > > >> least in the past the binary packages referred to many non existing > > >> package versions so only some versions of the packages had all > > >> dependancies available) > > > > > > I don't have any debian or its derivatives at hand sadly. I may > > > unearth an old laptop that had some form of ubuntu at some point, it's > > > old and slow but that shouldn't be a problem for this sort of thing, > > > but that will have to wait until next week. > > > > > > In the meantime I'm trying to make cross-mips-linux-gcc work on > > > openSuse without much luck yet. > > > > > > I got lucky and was able to cross-build in openSUSE. > > > > Just in case others also use openSUSE, I put the instructions on the > > wiki (I hadn't found any, if there are, I'll welcome pointers and I'll > > merge them): http://trac.ffmpeg.org/wiki/CompilationGuide/MIPS > > > > > I confirmed that the previous patch does fix the test on mips. > > i tried again: > > 43a1cc5 Add AAC tests for 7350hz sampling rates and M/S > tests/fate/aac.mak | 29 + > 1 file changed, 29 insertions(+) > c5e02b1 AAC: [PATCH] AAC: Add support for 7350Hz sampling rates > libavcodec/mips/aaccoder_mips.c | 26 +- > 1 file changed, 13 insertions(+), 13 deletions(-) > > i tried 2 qemu versions, i tried with and without > --disable-mipsdspr1 --disable-mipsdspr2 --disable-mipsfpu > > but i still get this > > stddev: 443.22 PSNR: 43.40 MAXDIFF: 5038 bytes: 176400/ 180224 > stddev: |443.22 - 414| >= 5 > Test aac-s7350-encode failed. Look at tests/data/fate/aac-s7350-encode.err > for details. > > mips-linux-gnu-gcc-4.4 (Debian 4.4.5-8) 4.4.5 > > btw, i use the qemu from https://github.com/ssvb/QEMU.git > for mips as it at least years ago supported more extensions, i > would have guessed these where merged into main qemu but as you list > all the disables in the wiki, maybe i was guessing wrong > > can you repost the patchset that works for you ? > so to make double sure we use the same code tried with --disable-optimizations and --arch=generic so that define ARCH_MIPS 0 it still fails the same way with mips-linux-gnu-gcc-4.4 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Dictatorship naturally arises out of democracy, and the most aggravated form of tyranny and slavery out of the most extreme liberty. -- Plato signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 13, 2015 at 04:42:36AM -0300, Claudio Freire wrote: > On Tue, Mar 10, 2015 at 10:08 AM, Claudio Freire > wrote: > > On Tue, Mar 10, 2015 at 8:05 AM, Michael Niedermayer > > wrote: > >>> I cannot test myself yet (cannot build against mips, it will > >>> probably take me a long while before I can set up qemu for that), but > >>> the patch should bring both implementations in sync, at least enough > >>> for the test to pass without the -b:a 88k > >> > >> if you use a debian based distro then the packages from > >> http://www.emdebian.org/ > >> can probably be used to cross compile to mips > >> (you might need to force some versions manually during install, at > >> least in the past the binary packages referred to many non existing > >> package versions so only some versions of the packages had all > >> dependancies available) > > > > I don't have any debian or its derivatives at hand sadly. I may > > unearth an old laptop that had some form of ubuntu at some point, it's > > old and slow but that shouldn't be a problem for this sort of thing, > > but that will have to wait until next week. > > > > In the meantime I'm trying to make cross-mips-linux-gcc work on > > openSuse without much luck yet. > > > I got lucky and was able to cross-build in openSUSE. > > Just in case others also use openSUSE, I put the instructions on the > wiki (I hadn't found any, if there are, I'll welcome pointers and I'll > merge them): http://trac.ffmpeg.org/wiki/CompilationGuide/MIPS > > I confirmed that the previous patch does fix the test on mips. i tried again: 43a1cc5 Add AAC tests for 7350hz sampling rates and M/S tests/fate/aac.mak | 29 + 1 file changed, 29 insertions(+) c5e02b1 AAC: [PATCH] AAC: Add support for 7350Hz sampling rates libavcodec/mips/aaccoder_mips.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) i tried 2 qemu versions, i tried with and without --disable-mipsdspr1 --disable-mipsdspr2 --disable-mipsfpu but i still get this stddev: 443.22 PSNR: 43.40 MAXDIFF: 5038 bytes: 176400/ 180224 stddev: |443.22 - 414| >= 5 Test aac-s7350-encode failed. Look at tests/data/fate/aac-s7350-encode.err for details. mips-linux-gnu-gcc-4.4 (Debian 4.4.5-8) 4.4.5 btw, i use the qemu from https://github.com/ssvb/QEMU.git for mips as it at least years ago supported more extensions, i would have guessed these where merged into main qemu but as you list all the disables in the wiki, maybe i was guessing wrong can you repost the patchset that works for you ? so to make double sure we use the same code [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have never wished to cater to the crowd; for what I know they do not approve, and what they approve I do not know. -- Epicurus signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Tue, Mar 10, 2015 at 10:08 AM, Claudio Freire wrote: > On Tue, Mar 10, 2015 at 8:05 AM, Michael Niedermayer wrote: >>> I cannot test myself yet (cannot build against mips, it will >>> probably take me a long while before I can set up qemu for that), but >>> the patch should bring both implementations in sync, at least enough >>> for the test to pass without the -b:a 88k >> >> if you use a debian based distro then the packages from >> http://www.emdebian.org/ >> can probably be used to cross compile to mips >> (you might need to force some versions manually during install, at >> least in the past the binary packages referred to many non existing >> package versions so only some versions of the packages had all >> dependancies available) > > I don't have any debian or its derivatives at hand sadly. I may > unearth an old laptop that had some form of ubuntu at some point, it's > old and slow but that shouldn't be a problem for this sort of thing, > but that will have to wait until next week. > > In the meantime I'm trying to make cross-mips-linux-gcc work on > openSuse without much luck yet. I got lucky and was able to cross-build in openSUSE. Just in case others also use openSUSE, I put the instructions on the wiki (I hadn't found any, if there are, I'll welcome pointers and I'll merge them): http://trac.ffmpeg.org/wiki/CompilationGuide/MIPS I confirmed that the previous patch does fix the test on mips. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Tue, Mar 10, 2015 at 8:05 AM, Michael Niedermayer wrote: >> I cannot test myself yet (cannot build against mips, it will >> probably take me a long while before I can set up qemu for that), but >> the patch should bring both implementations in sync, at least enough >> for the test to pass without the -b:a 88k > > if you use a debian based distro then the packages from > http://www.emdebian.org/ > can probably be used to cross compile to mips > (you might need to force some versions manually during install, at > least in the past the binary packages referred to many non existing > package versions so only some versions of the packages had all > dependancies available) I don't have any debian or its derivatives at hand sadly. I may unearth an old laptop that had some form of ubuntu at some point, it's old and slow but that shouldn't be a problem for this sort of thing, but that will have to wait until next week. In the meantime I'm trying to make cross-mips-linux-gcc work on openSuse without much luck yet. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Tue, Mar 10, 2015 at 12:37:34AM -0300, Claudio Freire wrote: > On Mon, Mar 9, 2015 at 3:31 PM, Claudio Freire wrote: > > On Mon, Mar 9, 2015 at 1:38 PM, Michael Niedermayer > > wrote: > >> On Mon, Mar 09, 2015 at 01:31:26PM -0300, Claudio Freire wrote: > >>> On Mon, Mar 9, 2015 at 1:26 PM, Michael Niedermayer > >>> wrote: > >>> > doesnt help > >>> > but > >>> > this does: > >>> > -fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict > >>> > -2 -c:a aac -b:a 256k > >>> > +fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict > >>> > -2 -c:a aac -b:a 88k > >>> > > >>> > this seems to fix it, didnt ivestigate why ... > >>> > >>> 88k is the maximum allowed bitrate at 7350hz, but it shouldn't make > >>> any difference given that lavc/aacenc.c:775 already clamps the bitrate > >>> to that number. > >> > >> i think it clamps to 88200 while 88k sets 88000 > >> i can reproduce the difference with -b:a 88200 > > > > Oh... I see. > > > > There's a specific implementation for mips, I had completely > > overlooked it on all patchesets. > > > > I'll have to look into it more thoroughly, most earlier patches should > > be applied to that implementation as well when applicable. > > Ok, try the attached patch on top of the previous ones, see what it > does. stddev: 443.22 PSNR: 43.40 MAXDIFF: 5038 bytes: 176400/ 180224 stddev: |443.22 - 414| >= 5 Duration: 00:00:06.89, bitrate: 57 kb/s Stream #0:0: Audio: aac (LC), 7350 Hz, stereo, fltp, 57 kb/s > I cannot test myself yet (cannot build against mips, it will > probably take me a long while before I can set up qemu for that), but > the patch should bring both implementations in sync, at least enough > for the test to pass without the -b:a 88k if you use a debian based distro then the packages from http://www.emdebian.org/ can probably be used to cross compile to mips (you might need to force some versions manually during install, at least in the past the binary packages referred to many non existing package versions so only some versions of the packages had all dependancies available) [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is what and why we do it that matters, not just one of them. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Mon, Mar 9, 2015 at 3:31 PM, Claudio Freire wrote: > On Mon, Mar 9, 2015 at 1:38 PM, Michael Niedermayer wrote: >> On Mon, Mar 09, 2015 at 01:31:26PM -0300, Claudio Freire wrote: >>> On Mon, Mar 9, 2015 at 1:26 PM, Michael Niedermayer >>> wrote: >>> > doesnt help >>> > but >>> > this does: >>> > -fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict >>> > -2 -c:a aac -b:a 256k >>> > +fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict >>> > -2 -c:a aac -b:a 88k >>> > >>> > this seems to fix it, didnt ivestigate why ... >>> >>> 88k is the maximum allowed bitrate at 7350hz, but it shouldn't make >>> any difference given that lavc/aacenc.c:775 already clamps the bitrate >>> to that number. >> >> i think it clamps to 88200 while 88k sets 88000 >> i can reproduce the difference with -b:a 88200 > > Oh... I see. > > There's a specific implementation for mips, I had completely > overlooked it on all patchesets. > > I'll have to look into it more thoroughly, most earlier patches should > be applied to that implementation as well when applicable. Ok, try the attached patch on top of the previous ones, see what it does. I cannot test myself yet (cannot build against mips, it will probably take me a long while before I can set up qemu for that), but the patch should bring both implementations in sync, at least enough for the test to pass without the -b:a 88k diff --git a/libavcodec/mips/aaccoder_mips.c b/libavcodec/mips/aaccoder_mips.c index ea0bf31..dfbbd04 100644 --- a/libavcodec/mips/aaccoder_mips.c +++ b/libavcodec/mips/aaccoder_mips.c @@ -2139,7 +2139,7 @@ static void search_for_quantizers_twoloop_mips(AVCodecContext *avctx, const float lambda) { int start = 0, i, w, w2, g; -int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / avctx->channels; +int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / avctx->channels * (lambda / 120.f); float dists[128] = { 0 }, uplims[128]; float maxvals[128]; int fflag, minscaler; @@ -2329,23 +2329,23 @@ static void search_for_ms_mips(AACEncContext *s, ChannelElement *cpe, float minthr = FFMIN(band0->threshold, band1->threshold); float maxthr = FFMAX(band0->threshold, band1->threshold); for (i = 0; i < sce0->ics.swb_sizes[g]; i+=4) { -M[i ] = (sce0->coeffs[start+w2*128+i ] -+ sce1->coeffs[start+w2*128+i ]) * 0.5; -M[i+1] = (sce0->coeffs[start+w2*128+i+1] -+ sce1->coeffs[start+w2*128+i+1]) * 0.5; -M[i+2] = (sce0->coeffs[start+w2*128+i+2] -+ sce1->coeffs[start+w2*128+i+2]) * 0.5; -M[i+3] = (sce0->coeffs[start+w2*128+i+3] -+ sce1->coeffs[start+w2*128+i+3]) * 0.5; +M[i ] = (sce0->pcoeffs[start+w2*128+i ] ++ sce1->pcoeffs[start+w2*128+i ]) * 0.5; +M[i+1] = (sce0->pcoeffs[start+w2*128+i+1] ++ sce1->pcoeffs[start+w2*128+i+1]) * 0.5; +M[i+2] = (sce0->pcoeffs[start+w2*128+i+2] ++ sce1->pcoeffs[start+w2*128+i+2]) * 0.5; +M[i+3] = (sce0->pcoeffs[start+w2*128+i+3] ++ sce1->pcoeffs[start+w2*128+i+3]) * 0.5; S[i ] = M[i ] -- sce1->coeffs[start+w2*128+i ]; +- sce1->pcoeffs[start+w2*128+i ]; S[i+1] = M[i+1] -- sce1->coeffs[start+w2*128+i+1]; +- sce1->pcoeffs[start+w2*128+i+1]; S[i+2] = M[i+2] -- sce1->coeffs[start+w2*128+i+2]; +- sce1->pcoeffs[start+w2*128+i+2]; S[i+3] = M[i+3] -- sce1->coeffs[start+w2*128+i+3]; +- sce1->pcoeffs[start+w2*128+i+3]; } abs_pow34_v(L34, sce0->coeffs+start+w2*128, sce0->ics.swb_sizes[g]); abs_pow34_v(R34, sce1->coeffs+start+w2*128, sce0->ics.swb_sizes[g]); ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Mon, Mar 9, 2015 at 1:38 PM, Michael Niedermayer wrote: > On Mon, Mar 09, 2015 at 01:31:26PM -0300, Claudio Freire wrote: >> On Mon, Mar 9, 2015 at 1:26 PM, Michael Niedermayer wrote: >> > doesnt help >> > but >> > this does: >> > -fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 >> > -c:a aac -b:a 256k >> > +fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 >> > -c:a aac -b:a 88k >> > >> > this seems to fix it, didnt ivestigate why ... >> >> 88k is the maximum allowed bitrate at 7350hz, but it shouldn't make >> any difference given that lavc/aacenc.c:775 already clamps the bitrate >> to that number. > > i think it clamps to 88200 while 88k sets 88000 > i can reproduce the difference with -b:a 88200 Oh... I see. There's a specific implementation for mips, I had completely overlooked it on all patchesets. I'll have to look into it more thoroughly, most earlier patches should be applied to that implementation as well when applicable. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Mon, Mar 09, 2015 at 01:31:26PM -0300, Claudio Freire wrote: > On Mon, Mar 9, 2015 at 1:26 PM, Michael Niedermayer wrote: > > doesnt help > > but > > this does: > > -fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 > > -c:a aac -b:a 256k > > +fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 > > -c:a aac -b:a 88k > > > > this seems to fix it, didnt ivestigate why ... > > 88k is the maximum allowed bitrate at 7350hz, but it shouldn't make > any difference given that lavc/aacenc.c:775 already clamps the bitrate > to that number. i think it clamps to 88200 while 88k sets 88000 i can reproduce the difference with -b:a 88200 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Into a blind darkness they enter who follow after the Ignorance, they as if into a greater darkness enter who devote themselves to the Knowledge alone. -- Isha Upanishad signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Mon, Mar 9, 2015 at 1:26 PM, Michael Niedermayer wrote: > doesnt help > but > this does: > -fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 > -c:a aac -b:a 256k > +fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 > -c:a aac -b:a 88k > > this seems to fix it, didnt ivestigate why ... 88k is the maximum allowed bitrate at 7350hz, but it shouldn't make any difference given that lavc/aacenc.c:775 already clamps the bitrate to that number. Unless some parts of the code aren't getting the message sent by aacenc, which would be a bug on its own right. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Mon, Mar 09, 2015 at 01:16:56PM -0300, Claudio Freire wrote: > On Mon, Mar 9, 2015 at 1:05 PM, Michael Niedermayer wrote: > >> Head is still using a butterworth filter for the lowpass IIRC. That > >> could very well be both platform and sample rate specific. > >> > >> Sadly, I cannot test mips, but commenting the lowpass could yield > >> useful results. > > > > what exact change should i make / can you provide a diff? > > what exact should i test / can you provide a command line ? > > It should be enough to add -cutoff 7350 to the command line doesnt help but this does: -fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 -c:a aac -b:a 256k +fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 -c:a aac -b:a 88k this seems to fix it, didnt ivestigate why ... [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who are best at talking, realize last or never when they are wrong. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Mon, Mar 9, 2015 at 1:05 PM, Michael Niedermayer wrote: >> Head is still using a butterworth filter for the lowpass IIRC. That >> could very well be both platform and sample rate specific. >> >> Sadly, I cannot test mips, but commenting the lowpass could yield >> useful results. > > what exact change should i make / can you provide a diff? > what exact should i test / can you provide a command line ? It should be enough to add -cutoff 7350 to the command line ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Mon, Mar 09, 2015 at 12:55:43PM -0300, Claudio Freire wrote: > On Mon, Mar 9, 2015 at 12:41 PM, Michael Niedermayer wrote: > > On Sun, Mar 08, 2015 at 11:07:33PM -0300, Claudio Freire wrote: > >> On Sun, Mar 8, 2015 at 11:06 PM, Claudio Freire > >> wrote: > >> > On Sun, Mar 8, 2015 at 8:23 AM, Michael Niedermayer > >> > wrote: > >> >> i think its better to leave fuzz at a small value otherwise we > >> >> would forget to update the target when it improves and then > >> >> subsequent worsenings could be missed > >> > > >> > An updated version with that fixed. > >> > > >> > It's a bit tricky to squash commits with git format-patch, so if > >> > there's an issue with the patch just apply it with patch -p1, works > >> > that way (tried) > >> > >> > >> Dang, forgot to attach the patch. > >> > >> Now truly attached. > > > > works on x86 but fails on mips: > > > > stddev: 443.22 PSNR: 43.40 MAXDIFF: 5038 bytes: 176400/ 180224 > > stddev: |443.22 - 414| >= 5 > > Test aac-s7350-encode failed. Look at tests/data/fate/aac-s7350-encode.err > > for details. > > That's weird. I didn't expect this code to be platform-specific. > > Head is still using a butterworth filter for the lowpass IIRC. That > could very well be both platform and sample rate specific. > > Sadly, I cannot test mips, but commenting the lowpass could yield > useful results. what exact change should i make / can you provide a diff? what exact should i test / can you provide a command line ? > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is what and why we do it that matters, not just one of them. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Mon, Mar 09, 2015 at 04:53:52PM +0100, Michael Niedermayer wrote: > On Mon, Mar 09, 2015 at 04:41:05PM +0100, Michael Niedermayer wrote: > > On Sun, Mar 08, 2015 at 11:07:33PM -0300, Claudio Freire wrote: > > > On Sun, Mar 8, 2015 at 11:06 PM, Claudio Freire > > > wrote: > > > > On Sun, Mar 8, 2015 at 8:23 AM, Michael Niedermayer > > > > wrote: > > > >> i think its better to leave fuzz at a small value otherwise we > > > >> would forget to update the target when it improves and then > > > >> subsequent worsenings could be missed > > > > > > > > An updated version with that fixed. > > > > > > > > It's a bit tricky to squash commits with git format-patch, so if > > > > there's an issue with the patch just apply it with patch -p1, works > > > > that way (tried) > > > > > > > > > Dang, forgot to attach the patch. > > > > > > Now truly attached. > > > > works on x86 but fails on mips: > > cpuflag 0 doesnt help, seems passing on ppc-qemu could try on actual > ppc if needed the files look like this: mips: Duration: 00:00:06.89, bitrate: 57 kb/s Stream #0:0: Audio: aac (LC), 7350 Hz, stereo, fltp, 57 kb/s x86: Duration: 00:00:06.94, bitrate: 54 kb/s Stream #0:0: Audio: aac (LC), 7350 Hz, stereo, fltp, 54 kb/s ive attached the file genrated on mips-qemu [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The worst form of inequality is to try to make unequal things equal. -- Aristotle aac-s7350-encode.adts Description: Binary data signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Mon, Mar 9, 2015 at 12:41 PM, Michael Niedermayer wrote: > On Sun, Mar 08, 2015 at 11:07:33PM -0300, Claudio Freire wrote: >> On Sun, Mar 8, 2015 at 11:06 PM, Claudio Freire >> wrote: >> > On Sun, Mar 8, 2015 at 8:23 AM, Michael Niedermayer >> > wrote: >> >> i think its better to leave fuzz at a small value otherwise we >> >> would forget to update the target when it improves and then >> >> subsequent worsenings could be missed >> > >> > An updated version with that fixed. >> > >> > It's a bit tricky to squash commits with git format-patch, so if >> > there's an issue with the patch just apply it with patch -p1, works >> > that way (tried) >> >> >> Dang, forgot to attach the patch. >> >> Now truly attached. > > works on x86 but fails on mips: > > stddev: 443.22 PSNR: 43.40 MAXDIFF: 5038 bytes: 176400/ 180224 > stddev: |443.22 - 414| >= 5 > Test aac-s7350-encode failed. Look at tests/data/fate/aac-s7350-encode.err > for details. That's weird. I didn't expect this code to be platform-specific. Head is still using a butterworth filter for the lowpass IIRC. That could very well be both platform and sample rate specific. Sadly, I cannot test mips, but commenting the lowpass could yield useful results. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Mon, Mar 09, 2015 at 04:41:05PM +0100, Michael Niedermayer wrote: > On Sun, Mar 08, 2015 at 11:07:33PM -0300, Claudio Freire wrote: > > On Sun, Mar 8, 2015 at 11:06 PM, Claudio Freire > > wrote: > > > On Sun, Mar 8, 2015 at 8:23 AM, Michael Niedermayer > > > wrote: > > >> i think its better to leave fuzz at a small value otherwise we > > >> would forget to update the target when it improves and then > > >> subsequent worsenings could be missed > > > > > > An updated version with that fixed. > > > > > > It's a bit tricky to squash commits with git format-patch, so if > > > there's an issue with the patch just apply it with patch -p1, works > > > that way (tried) > > > > > > Dang, forgot to attach the patch. > > > > Now truly attached. > > works on x86 but fails on mips: cpuflag 0 doesnt help, seems passing on ppc-qemu could try on actual ppc if needed [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Everything should be made as simple as possible, but not simpler. -- Albert Einstein signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Sun, Mar 08, 2015 at 11:07:33PM -0300, Claudio Freire wrote: > On Sun, Mar 8, 2015 at 11:06 PM, Claudio Freire > wrote: > > On Sun, Mar 8, 2015 at 8:23 AM, Michael Niedermayer > > wrote: > >> i think its better to leave fuzz at a small value otherwise we > >> would forget to update the target when it improves and then > >> subsequent worsenings could be missed > > > > An updated version with that fixed. > > > > It's a bit tricky to squash commits with git format-patch, so if > > there's an issue with the patch just apply it with patch -p1, works > > that way (tried) > > > Dang, forgot to attach the patch. > > Now truly attached. > fate-run.sh |6 ++ > fate/aac.mak | 29 + > 2 files changed, 35 insertions(+) > 94ffe372679351a8d3ec19bcebaf77349f2ef46d s7350test.patch > From 9ebb5b6d0085a547938afb32c7d203686f7fcf11 Mon Sep 17 00:00:00 2001 > From: Claudio Freire > Date: Sun, 8 Mar 2015 03:53:22 -0300 > Subject: [PATCH] Add AAC tests for 7350hz sampling rates and M/S > > Also tweak fuzz factor to not error out on too little distortion (ie: codec > improvement) > --- > tests/fate-run.sh | 6 ++ > tests/fate/aac.mak | 33 +++-- > 2 files changed, 37 insertions(+), 2 deletions(-) > > diff --git a/tests/fate-run.sh b/tests/fate-run.sh > index 824d5f4..feac731 100755 > --- a/tests/fate-run.sh > +++ b/tests/fate-run.sh > @@ -50,6 +50,12 @@ do_tiny_psnr(){ > size_cmp=$(compare $size1 $size2 $size_tolerance) > if [ "$val_cmp" != 0 ] || [ "$size_cmp" != 0 ]; then > echo "$psnr" > +if [ "$val_cmp" != 0 ]; then > +echo "$3: |$val - $cmp_target| >= $fuzz" > +fi > +if [ "$size_cmp" != 0 ]; then > +echo "size: |$size1 - $size2| >= $size_tolerance" > +fi > return 1 > fi > } applied above hunk [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 2 "100% positive feedback" - "All either got their money back or didnt complain" "Best seller ever, very honest" - "Seller refunded buyer after failed scam" signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Sun, Mar 08, 2015 at 11:07:33PM -0300, Claudio Freire wrote: > On Sun, Mar 8, 2015 at 11:06 PM, Claudio Freire > wrote: > > On Sun, Mar 8, 2015 at 8:23 AM, Michael Niedermayer > > wrote: > >> i think its better to leave fuzz at a small value otherwise we > >> would forget to update the target when it improves and then > >> subsequent worsenings could be missed > > > > An updated version with that fixed. > > > > It's a bit tricky to squash commits with git format-patch, so if > > there's an issue with the patch just apply it with patch -p1, works > > that way (tried) > > > Dang, forgot to attach the patch. > > Now truly attached. works on x86 but fails on mips: stddev: 443.22 PSNR: 43.40 MAXDIFF: 5038 bytes: 176400/ 180224 stddev: |443.22 - 414| >= 5 Test aac-s7350-encode failed. Look at tests/data/fate/aac-s7350-encode.err for details. [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is dangerous to be right in matters on which the established authorities are wrong. -- Voltaire signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Sun, Mar 8, 2015 at 11:06 PM, Claudio Freire wrote: > On Sun, Mar 8, 2015 at 8:23 AM, Michael Niedermayer wrote: >> i think its better to leave fuzz at a small value otherwise we >> would forget to update the target when it improves and then >> subsequent worsenings could be missed > > An updated version with that fixed. > > It's a bit tricky to squash commits with git format-patch, so if > there's an issue with the patch just apply it with patch -p1, works > that way (tried) Dang, forgot to attach the patch. Now truly attached. From 9ebb5b6d0085a547938afb32c7d203686f7fcf11 Mon Sep 17 00:00:00 2001 From: Claudio Freire Date: Sun, 8 Mar 2015 03:53:22 -0300 Subject: [PATCH] Add AAC tests for 7350hz sampling rates and M/S Also tweak fuzz factor to not error out on too little distortion (ie: codec improvement) --- tests/fate-run.sh | 6 ++ tests/fate/aac.mak | 33 +++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 824d5f4..feac731 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -50,6 +50,12 @@ do_tiny_psnr(){ size_cmp=$(compare $size1 $size2 $size_tolerance) if [ "$val_cmp" != 0 ] || [ "$size_cmp" != 0 ]; then echo "$psnr" +if [ "$val_cmp" != 0 ]; then +echo "$3: |$val - $cmp_target| >= $fuzz" +fi +if [ "$size_cmp" != 0 ]; then +echo "size: |$size1 - $size2| >= $size_tolerance" +fi return 1 fi } diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak index 34823be..bab1e5f 100644 --- a/tests/fate/aac.mak +++ b/tests/fate/aac.mak @@ -95,6 +95,26 @@ fate-aac-aref-encode: CMP_TARGET = 434 fate-aac-aref-encode: SIZE_TOLERANCE = 2464 fate-aac-aref-encode: FUZZ = 5 +FATE_AAC_ENCODE += fate-aac-s7350-encode +fate-aac-s7350-encode: ./tests/data/asynth-7350-2.wav +fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 -c:a aac -b:a 256k +fate-aac-s7350-encode: CMP = stddev +fate-aac-s7350-encode: REF = ./tests/data/asynth-7350-2.wav +fate-aac-s7350-encode: CMP_SHIFT = -4096 +fate-aac-s7350-encode: CMP_TARGET = 414 +fate-aac-s7350-encode: SIZE_TOLERANCE = 4096 +fate-aac-s7350-encode: FUZZ = 5 + +FATE_AAC_ENCODE += fate-aac-arefms-encode +fate-aac-arefms-encode: ./tests/data/asynth-44100-2.wav +fate-aac-arefms-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 -c:a aac -stereo_mode auto -b:a 512k +fate-aac-arefms-encode: CMP = stddev +fate-aac-arefms-encode: REF = ./tests/data/asynth-44100-2.wav +fate-aac-arefms-encode: CMP_SHIFT = -4096 +fate-aac-arefms-encode: CMP_TARGET = 451 +fate-aac-arefms-encode: SIZE_TOLERANCE = 2464 +fate-aac-arefms-encode: FUZZ = 5 + FATE_AAC_ENCODE += fate-aac-ln-encode fate-aac-ln-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -strict -2 -c:a aac -b:a 512k fate-aac-ln-encode: CMP = stddev @@ -103,6 +123,15 @@ fate-aac-ln-encode: CMP_SHIFT = -4096 fate-aac-ln-encode: CMP_TARGET = 65 fate-aac-ln-encode: SIZE_TOLERANCE = 3560 +FATE_AAC_ENCODE += fate-aac-lnms-encode +fate-aac-lnms-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -strict -2 -stereo_mode auto -c:a aac -b:a 512k +fate-aac-lnms-encode: CMP = stddev +fate-aac-lnms-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav +fate-aac-lnms-encode: CMP_SHIFT = -4096 +fate-aac-lnms-encode: CMP_TARGET = 65 +fate-aac-lnms-encode: SIZE_TOLERANCE = 3560 +fate-aac-lnms-encode: FUZZ = 5 + FATE_AAC_LATM += fate-aac-latm_1180bc60 fate-aac-latm_1180bc60: CMD = pcm -i $(TARGET_SAMPLES)/aac/latm_1180bc60.mpg fate-aac-latm_1180bc60: REF = $(SAMPLES)/aac/latm_1180bc60.s16 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Sun, Mar 8, 2015 at 8:23 AM, Michael Niedermayer wrote: > i think its better to leave fuzz at a small value otherwise we > would forget to update the target when it improves and then > subsequent worsenings could be missed An updated version with that fixed. It's a bit tricky to squash commits with git format-patch, so if there's an issue with the patch just apply it with patch -p1, works that way (tried) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Sun, Mar 08, 2015 at 03:55:09AM -0300, Claudio Freire wrote: > On Fri, Mar 6, 2015 at 2:19 PM, Michael Niedermayer wrote: > >> So it seems the test doesn't set up the LD_LIBRARY_PATH correctly. > >> That's fixable, I'll see about getting a patch for that when I > >> understand the makefile layout. > >> > >> In the meantime, I'm *guessing* a test would look like the patch > >> attached, but I still cannot run it. It says it won't, because: > >> warning: only a subset of the fate tests will be run because SAMPLES > >> is not specified > >> > >> Any idea where to get the samples? It's not just any samples, it wants > >> a specific set of samples. > > > > configure with --samples= to point to some directory and run > > make fate-rsync > > (this will need about 900mb space) > > > Yeah, that works. > > Attached another patch that adds the tests. Goes on top of the initial > patch (with the fixes themselves) > fate-run.sh |6 ++ > fate/aac.mak | 33 +++-- > 2 files changed, 37 insertions(+), 2 deletions(-) > 7ee0079156ce01622cf6f4658db9d8e452513aee s7350test.patch > From 9ebb5b6d0085a547938afb32c7d203686f7fcf11 Mon Sep 17 00:00:00 2001 > From: Claudio Freire > Date: Sun, 8 Mar 2015 03:53:22 -0300 > Subject: [PATCH] Add AAC tests for 7350hz sampling rates and M/S > > Also tweak fuzz factor to not error out on too little distortion (ie: codec > improvement) > --- > tests/fate-run.sh | 6 ++ > tests/fate/aac.mak | 33 +++-- > 2 files changed, 37 insertions(+), 2 deletions(-) > > diff --git a/tests/fate-run.sh b/tests/fate-run.sh > index 824d5f4..feac731 100755 > --- a/tests/fate-run.sh > +++ b/tests/fate-run.sh > @@ -50,6 +50,12 @@ do_tiny_psnr(){ > size_cmp=$(compare $size1 $size2 $size_tolerance) > if [ "$val_cmp" != 0 ] || [ "$size_cmp" != 0 ]; then > echo "$psnr" > +if [ "$val_cmp" != 0 ]; then > +echo "$3: |$val - $cmp_target| >= $fuzz" > +fi > +if [ "$size_cmp" != 0 ]; then > +echo "size: |$size1 - $size2| >= $size_tolerance" > +fi > return 1 > fi > } > diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak > index 34823be..cda80a4 100644 > --- a/tests/fate/aac.mak > +++ b/tests/fate/aac.mak > @@ -91,9 +91,29 @@ fate-aac-aref-encode: CMD = enc_dec_pcm adts wav s16le > $(REF) -strict -2 -c:a aa > fate-aac-aref-encode: CMP = stddev > fate-aac-aref-encode: REF = ./tests/data/asynth-44100-2.wav > fate-aac-aref-encode: CMP_SHIFT = -4096 > -fate-aac-aref-encode: CMP_TARGET = 434 > +fate-aac-aref-encode: CMP_TARGET = 225 > fate-aac-aref-encode: SIZE_TOLERANCE = 2464 > -fate-aac-aref-encode: FUZZ = 5 > +fate-aac-aref-encode: FUZZ = 225 i think its better to leave fuzz at a small value otherwise we would forget to update the target when it improves and then subsequent worsenings could be missed [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Opposition brings concord. Out of discord comes the fairest harmony. -- Heraclitus signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 6, 2015 at 2:19 PM, Michael Niedermayer wrote: >> So it seems the test doesn't set up the LD_LIBRARY_PATH correctly. >> That's fixable, I'll see about getting a patch for that when I >> understand the makefile layout. >> >> In the meantime, I'm *guessing* a test would look like the patch >> attached, but I still cannot run it. It says it won't, because: >> warning: only a subset of the fate tests will be run because SAMPLES >> is not specified >> >> Any idea where to get the samples? It's not just any samples, it wants >> a specific set of samples. > > configure with --samples= to point to some directory and run > make fate-rsync > (this will need about 900mb space) Yeah, that works. Attached another patch that adds the tests. Goes on top of the initial patch (with the fixes themselves) From 9ebb5b6d0085a547938afb32c7d203686f7fcf11 Mon Sep 17 00:00:00 2001 From: Claudio Freire Date: Sun, 8 Mar 2015 03:53:22 -0300 Subject: [PATCH] Add AAC tests for 7350hz sampling rates and M/S Also tweak fuzz factor to not error out on too little distortion (ie: codec improvement) --- tests/fate-run.sh | 6 ++ tests/fate/aac.mak | 33 +++-- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 824d5f4..feac731 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -50,6 +50,12 @@ do_tiny_psnr(){ size_cmp=$(compare $size1 $size2 $size_tolerance) if [ "$val_cmp" != 0 ] || [ "$size_cmp" != 0 ]; then echo "$psnr" +if [ "$val_cmp" != 0 ]; then +echo "$3: |$val - $cmp_target| >= $fuzz" +fi +if [ "$size_cmp" != 0 ]; then +echo "size: |$size1 - $size2| >= $size_tolerance" +fi return 1 fi } diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak index 34823be..cda80a4 100644 --- a/tests/fate/aac.mak +++ b/tests/fate/aac.mak @@ -91,9 +91,29 @@ fate-aac-aref-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 -c:a aa fate-aac-aref-encode: CMP = stddev fate-aac-aref-encode: REF = ./tests/data/asynth-44100-2.wav fate-aac-aref-encode: CMP_SHIFT = -4096 -fate-aac-aref-encode: CMP_TARGET = 434 +fate-aac-aref-encode: CMP_TARGET = 225 fate-aac-aref-encode: SIZE_TOLERANCE = 2464 -fate-aac-aref-encode: FUZZ = 5 +fate-aac-aref-encode: FUZZ = 225 + +FATE_AAC_ENCODE += fate-aac-s7350-encode +fate-aac-s7350-encode: ./tests/data/asynth-7350-2.wav +fate-aac-s7350-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 -c:a aac -b:a 256k +fate-aac-s7350-encode: CMP = stddev +fate-aac-s7350-encode: REF = ./tests/data/asynth-7350-2.wav +fate-aac-s7350-encode: CMP_SHIFT = -4096 +fate-aac-s7350-encode: CMP_TARGET = 225 +fate-aac-s7350-encode: SIZE_TOLERANCE = 4096 +fate-aac-s7350-encode: FUZZ = 225 + +FATE_AAC_ENCODE += fate-aac-arefms-encode +fate-aac-arefms-encode: ./tests/data/asynth-44100-2.wav +fate-aac-arefms-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 -c:a aac -stereo_mode auto -b:a 512k +fate-aac-arefms-encode: CMP = stddev +fate-aac-arefms-encode: REF = ./tests/data/asynth-44100-2.wav +fate-aac-arefms-encode: CMP_SHIFT = -4096 +fate-aac-arefms-encode: CMP_TARGET = 230 +fate-aac-arefms-encode: SIZE_TOLERANCE = 2464 +fate-aac-arefms-encode: FUZZ = 230 FATE_AAC_ENCODE += fate-aac-ln-encode fate-aac-ln-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -strict -2 -c:a aac -b:a 512k @@ -103,6 +123,15 @@ fate-aac-ln-encode: CMP_SHIFT = -4096 fate-aac-ln-encode: CMP_TARGET = 65 fate-aac-ln-encode: SIZE_TOLERANCE = 3560 +FATE_AAC_ENCODE += fate-aac-lnms-encode +fate-aac-lnms-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -strict -2 -stereo_mode auto -c:a aac -b:a 512k +fate-aac-lnms-encode: CMP = stddev +fate-aac-lnms-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav +fate-aac-lnms-encode: CMP_SHIFT = -4096 +fate-aac-lnms-encode: CMP_TARGET = 35 +fate-aac-lnms-encode: SIZE_TOLERANCE = 3560 +fate-aac-lnms-encode: FUZZ = 35 + FATE_AAC_LATM += fate-aac-latm_1180bc60 fate-aac-latm_1180bc60: CMD = pcm -i $(TARGET_SAMPLES)/aac/latm_1180bc60.mpg fate-aac-latm_1180bc60: REF = $(SAMPLES)/aac/latm_1180bc60.s16 -- 1.8.4.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 06, 2015 at 01:06:53PM -0300, Claudio Freire wrote: > On Fri, Mar 6, 2015 at 11:47 AM, Michael Niedermayer wrote: > >> 2- How to run that, make check dies at dct1d-4 > > > > make check should pass, if it does not please try without local > > changes, with make distclean or if (unlikely) these still fail a > > fresh git checkout > > I did use a clean checkout. > > Just in case, > > $ make disclean > $ ./confiigure & ./configure --enable-gpl --enable-version3 > --enable-shared --disable-static --enable-x11grab > --extra-cflags='-mtune=native -march=native' --enable-libmp3lame > --enable-libvorbis --enable-libtheora --enable-libspeex > --enable-libxvid --enable-libx264 --enable-libschroedinger > --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb > --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfaac > --enable-nonfree --enable-libfreetype --enable-pthreads --enable-debug > && make -j3 && make -j3 testprogs > ... > $ make check > warning: only a subset of the fate tests will be run because SAMPLES > is not specified > HOSTCC tests/base64.o > HOSTLD tests/base64 > HOSTCC tests/tiny_psnr.o > HOSTLD tests/tiny_psnr > HOSTCC tests/tiny_ssim.o > HOSTLD tests/tiny_ssim > TESTdct1d-4 > Test dct1d-4 failed. Look at tests/data/fate/dct1d-4.err for details. > $ cat tests/data/fate/dct1d-4.err > /home/claudiofreire/src/ffmpeg.aacupstreamref.git/libavcodec/fft-test: > error while loading shared libraries: libavutil.so.54: cannot open > shared object file: No such file or directory you can build without --enable-shared --disable-static or install the libs in a place where they will be used or as you suggest below make the tests handle this case better ... > > So it seems the test doesn't set up the LD_LIBRARY_PATH correctly. > That's fixable, I'll see about getting a patch for that when I > understand the makefile layout. > > In the meantime, I'm *guessing* a test would look like the patch > attached, but I still cannot run it. It says it won't, because: > warning: only a subset of the fate tests will be run because SAMPLES > is not specified > > Any idea where to get the samples? It's not just any samples, it wants > a specific set of samples. configure with --samples= to point to some directory and run make fate-rsync (this will need about 900mb space) [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you think the mosad wants you dead since a long time then you are either wrong or dead since a long time. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 6, 2015 at 11:47 AM, Michael Niedermayer wrote: >> 2- How to run that, make check dies at dct1d-4 > > make check should pass, if it does not please try without local > changes, with make distclean or if (unlikely) these still fail a > fresh git checkout I did use a clean checkout. Just in case, $ make disclean $ ./confiigure & ./configure --enable-gpl --enable-version3 --enable-shared --disable-static --enable-x11grab --extra-cflags='-mtune=native -march=native' --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfaac --enable-nonfree --enable-libfreetype --enable-pthreads --enable-debug && make -j3 && make -j3 testprogs ... $ make check warning: only a subset of the fate tests will be run because SAMPLES is not specified HOSTCC tests/base64.o HOSTLD tests/base64 HOSTCC tests/tiny_psnr.o HOSTLD tests/tiny_psnr HOSTCC tests/tiny_ssim.o HOSTLD tests/tiny_ssim TESTdct1d-4 Test dct1d-4 failed. Look at tests/data/fate/dct1d-4.err for details. $ cat tests/data/fate/dct1d-4.err /home/claudiofreire/src/ffmpeg.aacupstreamref.git/libavcodec/fft-test: error while loading shared libraries: libavutil.so.54: cannot open shared object file: No such file or directory So it seems the test doesn't set up the LD_LIBRARY_PATH correctly. That's fixable, I'll see about getting a patch for that when I understand the makefile layout. In the meantime, I'm *guessing* a test would look like the patch attached, but I still cannot run it. It says it won't, because: warning: only a subset of the fate tests will be run because SAMPLES is not specified Any idea where to get the samples? It's not just any samples, it wants a specific set of samples. diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak index 34823be..8ca513d 100644 --- a/tests/fate/aac.mak +++ b/tests/fate/aac.mak @@ -95,6 +95,16 @@ fate-aac-aref-encode: CMP_TARGET = 434 fate-aac-aref-encode: SIZE_TOLERANCE = 2464 fate-aac-aref-encode: FUZZ = 5 +FATE_AAC_ENCODE += fate-aac-s7350-encode +fate-aac-aref-encode: ./tests/data/asynth-7350-2.wav +fate-aac-aref-encode: CMD = enc_dec_pcm adts wav s16le $(REF) -strict -2 -c:a aac -b:a 256k +fate-aac-aref-encode: CMP = stddev +fate-aac-aref-encode: REF = ./tests/data/asynth-7350-2.wav +fate-aac-aref-encode: CMP_SHIFT = -4096 +fate-aac-aref-encode: CMP_TARGET = 434 +fate-aac-aref-encode: SIZE_TOLERANCE = 2464 +fate-aac-aref-encode: FUZZ = 5 + FATE_AAC_ENCODE += fate-aac-ln-encode fate-aac-ln-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -strict -2 -c:a aac -b:a 512k fate-aac-ln-encode: CMP = stddev ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 06, 2015 at 10:54:33AM -0300, Claudio Freire wrote: > On Fri, Mar 6, 2015 at 9:59 AM, Michael Niedermayer wrote: > > On Fri, Mar 06, 2015 at 04:28:38AM -0300, Claudio Freire wrote: > >> AAC: Add support for 7350Hz sampling rates, no error on too hight bitrate. > >> > >> Instead, warn that bitrate will be clamped down to the maximum allowed. > >> > >> Patch is mostly work of Kamendo2 in issue #2686, quite tested within that > >> issue. > >> > >> Tested with abtest.sh and confirmed it does work as intended. > > > >> aacenc.c | 23 ++- > >> 1 file changed, 18 insertions(+), 5 deletions(-) > >> 030cd61fb3e5180d38e3d7b70c9cdce46cf17b3b aac-bugfixes-3.patch > >> From df43314a67ad625775795561d960c30408fcf892 Mon Sep 17 00:00:00 2001 > >> From: Claudio Freire > >> Date: Fri, 6 Mar 2015 04:05:32 -0300 > >> Subject: [PATCH] AAC: Add support for 7350Hz sampling rates, no error on > >> too > >> hight bitrate. > >> > >> Instead, warn that bitrate will be clamped down to the maximum allowed. > >> > >> Patch is mostly work of Kamendo2 in issue #2686, quite tested within that > >> issue. > > > > applied > > > > does it make sense to add a fate test for 7350Hz ? > > > > thanks > > > It does, but I'm not sure how that works. > > I see that there's tests/fate/aac.mak with lots of tests, but > > 1- I'm not sure where the samples are, an extra sample at 7350hz would be > needed the samples are created by audiogen, you only need to add a dependancy in your test to the appropriate asynth-* file and the file will be generated by make before your test > 2- How to run that, make check dies at dct1d-4 make check should pass, if it does not please try without local changes, with make distclean or if (unlikely) these still fail a fresh git checkout [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Opposition brings concord. Out of discord comes the fairest harmony. -- Heraclitus signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 6, 2015 at 9:59 AM, Michael Niedermayer wrote: > On Fri, Mar 06, 2015 at 04:28:38AM -0300, Claudio Freire wrote: >> AAC: Add support for 7350Hz sampling rates, no error on too hight bitrate. >> >> Instead, warn that bitrate will be clamped down to the maximum allowed. >> >> Patch is mostly work of Kamendo2 in issue #2686, quite tested within that >> issue. >> >> Tested with abtest.sh and confirmed it does work as intended. > >> aacenc.c | 23 ++- >> 1 file changed, 18 insertions(+), 5 deletions(-) >> 030cd61fb3e5180d38e3d7b70c9cdce46cf17b3b aac-bugfixes-3.patch >> From df43314a67ad625775795561d960c30408fcf892 Mon Sep 17 00:00:00 2001 >> From: Claudio Freire >> Date: Fri, 6 Mar 2015 04:05:32 -0300 >> Subject: [PATCH] AAC: Add support for 7350Hz sampling rates, no error on too >> hight bitrate. >> >> Instead, warn that bitrate will be clamped down to the maximum allowed. >> >> Patch is mostly work of Kamendo2 in issue #2686, quite tested within that >> issue. > > applied > > does it make sense to add a fate test for 7350Hz ? > > thanks It does, but I'm not sure how that works. I see that there's tests/fate/aac.mak with lots of tests, but 1- I'm not sure where the samples are, an extra sample at 7350hz would be needed 2- How to run that, make check dies at dct1d-4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 06, 2015 at 04:28:38AM -0300, Claudio Freire wrote: > AAC: Add support for 7350Hz sampling rates, no error on too hight bitrate. > > Instead, warn that bitrate will be clamped down to the maximum allowed. > > Patch is mostly work of Kamendo2 in issue #2686, quite tested within that > issue. > > Tested with abtest.sh and confirmed it does work as intended. > aacenc.c | 23 ++- > 1 file changed, 18 insertions(+), 5 deletions(-) > 030cd61fb3e5180d38e3d7b70c9cdce46cf17b3b aac-bugfixes-3.patch > From df43314a67ad625775795561d960c30408fcf892 Mon Sep 17 00:00:00 2001 > From: Claudio Freire > Date: Fri, 6 Mar 2015 04:05:32 -0300 > Subject: [PATCH] AAC: Add support for 7350Hz sampling rates, no error on too > hight bitrate. > > Instead, warn that bitrate will be clamped down to the maximum allowed. > > Patch is mostly work of Kamendo2 in issue #2686, quite tested within that > issue. applied does it make sense to add a fate test for 7350Hz ? thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
AAC: Add support for 7350Hz sampling rates, no error on too hight bitrate. Instead, warn that bitrate will be clamped down to the maximum allowed. Patch is mostly work of Kamendo2 in issue #2686, quite tested within that issue. Tested with abtest.sh and confirmed it does work as intended. From df43314a67ad625775795561d960c30408fcf892 Mon Sep 17 00:00:00 2001 From: Claudio Freire Date: Fri, 6 Mar 2015 04:05:32 -0300 Subject: [PATCH] AAC: Add support for 7350Hz sampling rates, no error on too hight bitrate. Instead, warn that bitrate will be clamped down to the maximum allowed. Patch is mostly work of Kamendo2 in issue #2686, quite tested within that issue. --- libavcodec/aacenc.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 7c286aa..7015a27 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -53,6 +53,11 @@ return AVERROR(EINVAL); \ } +#define WARN_IF(cond, ...) \ +if (cond) { \ +av_log(avctx, AV_LOG_WARNING, __VA_ARGS__); \ +} + float ff_aac_pow34sf_tab[428]; static const uint8_t swb_size_1024_96[] = { @@ -102,7 +107,8 @@ static const uint8_t *swb_size_1024[] = { swb_size_1024_96, swb_size_1024_96, swb_size_1024_64, swb_size_1024_48, swb_size_1024_48, swb_size_1024_32, swb_size_1024_24, swb_size_1024_24, swb_size_1024_16, -swb_size_1024_16, swb_size_1024_16, swb_size_1024_8 +swb_size_1024_16, swb_size_1024_16, swb_size_1024_8, +swb_size_1024_8 }; static const uint8_t swb_size_128_96[] = { @@ -131,7 +137,8 @@ static const uint8_t *swb_size_128[] = { swb_size_128_96, swb_size_128_96, swb_size_128_96, swb_size_128_48, swb_size_128_48, swb_size_128_48, swb_size_128_24, swb_size_128_24, swb_size_128_16, -swb_size_128_16, swb_size_128_16, swb_size_128_8 +swb_size_128_16, swb_size_128_16, swb_size_128_8, +swb_size_128_8 }; /** default channel configurations */ @@ -754,14 +761,20 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) s->channels = avctx->channels; -ERROR_IF(i >= 12, +ERROR_IF(i == 16 +|| i >= (sizeof(swb_size_1024) / sizeof(*swb_size_1024)) +|| i >= (sizeof(swb_size_128) / sizeof(*swb_size_128)), "Unsupported sample rate %d\n", avctx->sample_rate); ERROR_IF(s->channels > AAC_MAX_CHANNELS, "Unsupported number of channels: %d\n", s->channels); ERROR_IF(avctx->profile != FF_PROFILE_UNKNOWN && avctx->profile != FF_PROFILE_AAC_LOW, "Unsupported profile %d\n", avctx->profile); -ERROR_IF(1024.0 * avctx->bit_rate / avctx->sample_rate > 6144 * s->channels, - "Too many bits per frame requested\n"); +WARN_IF(1024.0 * avctx->bit_rate / avctx->sample_rate > 6144 * s->channels, + "Too many bits per frame requested, clamping to max\n"); + +avctx->bit_rate = (int)FFMIN( +6144 * s->channels / 1024.0 * avctx->sample_rate, +avctx->bit_rate); s->samplerate_index = i; -- 1.8.4.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel