~ft/faad2

2783bdac5d524a0574b7eca273e8ca6b9a6b8014 — Andrew Wesie a month ago fd7a5f8
Fix PNS decoding when only right channel is noise.

Fixes #53.
1 files changed, 11 insertions(+), 9 deletions(-)

M libfaad/pns.c
M libfaad/pns.c => libfaad/pns.c +11 -9
@@ 236,7 236,17 @@ void pns_decode(ic_stream *ics_left, ic_stream *ics_right,
                if ((ics_right != NULL)
                    && is_noise(ics_right, g, sfb))
                {
                    if (channel_pair &&
#ifdef LTP_DEC
                    /* See comment above. */
                    ics_right->ltp.long_used[sfb] = 0;
                    ics_right->ltp2.long_used[sfb] = 0;
#endif
#ifdef MAIN_DEC
                    /* See comment above. */
                    ics_right->pred.prediction_used[sfb] = 0;
#endif

                    if (channel_pair && is_noise(ics_left, g, sfb) &&
                        (((ics_left->ms_mask_present == 1) &&
                        (ics_left->ms_used[g][sfb])) ||
                        (ics_left->ms_mask_present == 2)))


@@ 252,14 262,6 @@ void pns_decode(ic_stream *ics_left, ic_stream *ics_right,

                    } else /*if (ics_left->ms_mask_present == 0)*/ {

#ifdef LTP_DEC
                        ics_right->ltp.long_used[sfb] = 0;
                        ics_right->ltp2.long_used[sfb] = 0;
#endif
#ifdef MAIN_DEC
                        ics_right->pred.prediction_used[sfb] = 0;
#endif

                        offs = ics_right->swb_offset[sfb];
                        size = min(ics_right->swb_offset[sfb+1], ics_right->swb_offset_max) - offs;