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

Rostislav Pehlivanov atomnuker at gmail.com
Tue Jun 30 06:42:57 CEST 2015


>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 why ms_mask is even
considered is only because the decoder uses it in that way and because the
specifications mention that IS and M/S are exclusive yet related. Maybe
there might be something wrong with how the search_for_ms flags bands so it
inverts the phase of IS incorrectly. Or maybe the code to determine the
phase of the spectral coefficients might be wrong in search_for_is. I'll
play around with how the phase is set and maybe in case nothing works out
I'll unflag ms_mask[].

On 30 June 2015 at 02:35, Claudio Freire <klaussfreire at gmail.com> wrote:

> On Fri, Jun 26, 2015 at 5:16 PM, Rostislav Pehlivanov
> <atomnuker at gmail.com> 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;
> > +                    if (s_coef0*s_coef1 >= 0.0f)
> > +                        cpe->ch[1].band_type[w*16+g] = INTENSITY_BT;
> > +                    else
> > +                        cpe->ch[1].band_type[w*16+g] = INTENSITY_BT2;
> > +                    count++;
> > +                }
>
>
> If you don't add an:
>
> cpe->ms_mask[w*16+g] = 0;
>
> In there, you get horrible artifacts. Tested it quite a bit already.
>


More information about the ffmpeg-devel mailing list