Re: [FFmpeg-devel] [PATCH 3/3] aaccoder: Improve IS phase rejection

2015-07-20 Thread Rostislav Pehlivanov
>An alternative technique that may be better in that regard, then, >would be to measure distortion with both phases, and pick the phase >that yields the lowest distortion? That's a very good suggestion. Since the main problem with M/S and IS was phasing this might be a way to solve that too. I'll g

Re: [FFmpeg-devel] [PATCH 3/3] aaccoder: Improve IS phase rejection

2015-07-20 Thread Claudio Freire
On Fri, Jul 17, 2015 at 11:19 PM, Rostislav Pehlivanov wrote: >>But even if not used for avoding I/S, it can be used to pick whether >>to invert the phases, where it was clearly more stable. > In case the phase is very clearly wrong then there will be an increase in > the distortion which should c

Re: [FFmpeg-devel] [PATCH 3/3] aaccoder: Improve IS phase rejection

2015-07-17 Thread Rostislav Pehlivanov
>From my earlier testing, it's a bit too conservative, and if you make >it even more conservative, it may end up reducing the effectiveness of >I/S. Yes, that's what I remember too from testing it too. >But even if not used for avoding I/S, it can be used to pick whether >to invert the phases, whe

Re: [FFmpeg-devel] [PATCH 3/3] aaccoder: Improve IS phase rejection

2015-07-17 Thread Claudio Freire
On Fri, Jul 17, 2015 at 10:32 PM, Rostislav Pehlivanov wrote: > That previous idea discriminated way too many bands for it to be actually > useful. And it would require special cases for coefficients which 'blow up' > and have an insane value. ... >> What happened to the idea of comparing the ener

Re: [FFmpeg-devel] [PATCH 3/3] aaccoder: Improve IS phase rejection

2015-07-17 Thread Rostislav Pehlivanov
That previous idea discriminated way too many bands for it to be actually useful. And it would require special cases for coefficients which 'blow up' and have an insane value. This method is naive but it handles spikes better since a single spike in one channel will only cause a single phase to sw

Re: [FFmpeg-devel] [PATCH 3/3] aaccoder: Improve IS phase rejection

2015-07-17 Thread Claudio Freire
On Fri, Jul 17, 2015 at 6:20 PM, Rostislav Pehlivanov wrote: > This commit adds a slightly more robust way of determining whether the phases > match or are too different for IS to be used. > --- > libavcodec/aaccoder.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git

[FFmpeg-devel] [PATCH 3/3] aaccoder: Improve IS phase rejection

2015-07-17 Thread Rostislav Pehlivanov
This commit adds a slightly more robust way of determining whether the phases match or are too different for IS to be used. --- libavcodec/aaccoder.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index 17b14d6..bd232f6 1006