Re: [FFmpeg-devel] [PATCH 10/11] aaccoder: implement intensity stereo

2015-06-30 Thread Rostislav Pehlivanov
The problem was that ms_mask altered the phase during distortion calculations but did not alter it again during codebook selection (e.g. INTENSITY_BT or INTENSITY_BT2), so the phases got swapped around and the artifacts appeared. M/S is off by default so the artifacts were only present if -stereo_m

Re: [FFmpeg-devel] [PATCH 10/11] aaccoder: implement intensity stereo

2015-06-29 Thread Rostislav Pehlivanov
>cpe->ms_mask[w*16+g] = 0; This defeats the purpose of changing the phase of the spectral coefficients if ms_mask has been set by search_for_ms. If is_mask[idx] is 1 then ms_mask is only used to alter the phase of the spectral coefficients, so probably the phase gets altered incorrectly. The reason

Re: [FFmpeg-devel] [PATCH 10/11] aaccoder: implement intensity stereo

2015-06-29 Thread Claudio Freire
On Fri, Jun 26, 2015 at 5:16 PM, Rostislav Pehlivanov wrote: > +if (dist2 <= dist1) { > +cpe->is_mask[w*16+g] = 1; > +cpe->ch[0].is_ener[w*16+g] = ener1/ener01; > +cpe->ch[1].is_ener[w*16+g] = ener0/ener1; > +