[soc]: r1699 - eac3/eac3dec.c
Author: jbr Date: Sun Dec 30 03:18:11 2007 New Revision: 1699 Log: correctly use bap or hebap depending on whether aht is used or not Modified: eac3/eac3dec.c Modified: eac3/eac3dec.c ============================================================================== --- eac3/eac3dec.c (original) +++ eac3/eac3dec.c Sun Dec 30 03:18:11 2007 @@ -282,23 +282,29 @@ static void remove_dithering(EAC3Context int end=0; float *coeffs; uint8_t *bap; + uint8_t *hebap; + int aht; for(ch=1; ch<=s->fbw_channels; ch++) { if(!s->dither_flag[ch]) { coeffs = s->transform_coeffs[ch]; bap = s->bap[ch]; + hebap = s->hebap[ch]; + aht = s->channel_uses_aht[ch]; if(s->channel_in_cpl[ch]) end = s->start_freq[CPL_CH]; else end = s->end_freq[ch]; for(i=0; i<end; i++) { - if(bap[i] == 0) + if((aht && !bap[i]) && (!aht && !hebap[i])) coeffs[i] = 0.0f; } if(s->channel_in_cpl[ch]) { bap = s->bap[CPL_CH]; + hebap = s->hebap[CPL_CH]; + aht = s->channel_uses_aht[CPL_CH]; for(; i<s->end_freq[CPL_CH]; i++) { - if(bap[i] == 0) + if((aht && !bap[i]) && (!aht && !hebap[i])) coeffs[i] = 0.0f; } }
On Sun, Dec 30, 2007 at 03:18:11AM +0100, jbr wrote:
Author: jbr Date: Sun Dec 30 03:18:11 2007 New Revision: 1699
Log: correctly use bap or hebap depending on whether aht is used or not
[...]
- if(bap[i] == 0) + if((aht && !bap[i]) && (!aht && !hebap[i]))
this is equivalent of if(0), you didnt maybe mean || or?
coeffs[i] = 0.0f; } if(s->channel_in_cpl[ch]) { bap = s->bap[CPL_CH]; + hebap = s->hebap[CPL_CH]; + aht = s->channel_uses_aht[CPL_CH]; for(; i<s->end_freq[CPL_CH]; i++) { - if(bap[i] == 0) + if((aht && !bap[i]) && (!aht && !hebap[i]))
same issue [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. -- Plato
On Sun, Dec 30, 2007 at 10:19:41AM +0100, Michael Niedermayer wrote:
On Sun, Dec 30, 2007 at 03:18:11AM +0100, jbr wrote:
Author: jbr Date: Sun Dec 30 03:18:11 2007 New Revision: 1699
Log: correctly use bap or hebap depending on whether aht is used or not
[...]
- if(bap[i] == 0) + if((aht && !bap[i]) && (!aht && !hebap[i]))
this is equivalent of if(0), you didnt maybe mean || or?
also if you meant || then the following is simpler: if(aht ? !bap[i] : !hebap[i]) [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB There will always be a question for which you do not know the correct awnser.
Michael Niedermayer wrote:
On Sun, Dec 30, 2007 at 10:19:41AM +0100, Michael Niedermayer wrote:
On Sun, Dec 30, 2007 at 03:18:11AM +0100, jbr wrote:
Author: jbr Date: Sun Dec 30 03:18:11 2007 New Revision: 1699
Log: correctly use bap or hebap depending on whether aht is used or not
- if(bap[i] == 0) + if((aht && !bap[i]) && (!aht && !hebap[i]))
[...] this is equivalent of if(0), you didnt maybe mean || or?
also if you meant || then the following is simpler:
if(aht ? !bap[i] : !hebap[i])
Thanks. fixed. ...I had it backwards too.
participants (3)
-
jbr -
Justin Ruggles -
Michael Niedermayer