[Speex-dev] Shift count warning messages

Jim Crichton
Tue, 22 Jan 2008 08:28:55 -0000

Mike,

I played briefly with the echo canceller on the C5509A back in May 2006.  I got
the same compiler warnings, and sent a message to the list which included this:

"I got several compiler warnings for "shift out of range" in
mdf.c, which I
fixed by adding EXTEND32 to all of the SHL32s with 16 bit operands
(st->frame_size in 6 places, st->wtmp2 in 1 place)."

I sent a patch with some fixes later that month, but I have not built the echo
canceller since then (no room for it).  It is very likely that you are seeing
the same issue, and the fix should be the same also.  The trickier problems are
the ones that the compiler does not find.  EXTEND32 is usually the cure there
also.

Now that I look at mdf.c, though, W is declares as spx_word32_t, so there should
not be a problem, unless spx_word32_t is being mapped to 16-bits.  That should
not happen if you compile with CONFIG_TI_C54X defined.  This is odd.

- Jim


  ----- Original Message -----
  From: Michael Jacobson
  To: Jean-Marc Valin
  Cc: speex-dev@xiph.org
  Sent: Tuesday, January 22, 2008 9:54 AM
  Subject: Re: [Speex-dev] Shift count warning messages


  yes, our DSP is 16 bit based, and if those bits of code aren't using 32
bit variables then yes that is what the warnings would be.  Does this mean that
the preprocessor and echo canceller won't work as well because of this?

  -Mike

  >>> Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> 01/18/08
8:42 PM >>>

  I think these warnings are due to your DSP being 16-bit and that bit of
  code not being 16-bit safe (unlike the encoder and decoder). Can you
  confirm?

      Jean-Marc

  Michael Jacobson a ?crit :
  > Hi, I'm using 1.2beta3 on a 5416 DSP
  >
  > I have been getting warning messages that say:
  > "kiss_fft.c", line 142: warning: shift count is too large
  >
  >
  > I've noticed this on the echo canceller and the preprocessor.  all
  > pretty much related to these two lines of code:
  >
  > kiss_fft
  > C_MUL4(scratch[0],Fout[m] , *tw1 );
  >
  > mdf.c
  > st->wtmp2[i] =
EXTRACT16(PSHR32(st->W[j*N+i],NORMALIZE_SCALEDOWN+16));
  >
  > Is there some kind of switch I was supposed to throw to not get these
  > messages? if not-are they hurting anything?
  >
  > -Mike
  >
  >
  >
  > ------------------------------------------------------------------------
  >
  > _______________________________________________
  > Speex-dev mailing list
  > Speex-dev@xiph.org
  > http://lists.xiph.org/mailman/listinfo/speex-dev



  __________ Information from ESET NOD32 Antivirus, version of virus signature
database 2815 (20080122) __________

  The message was checked by ESET NOD32 Antivirus.

  http://www.eset.com



------------------------------------------------------------------------------


  _______________________________________________
  Speex-dev mailing list
  Speex-dev@xiph.org
  http://lists.xiph.org/mailman/listinfo/speex-dev



  __________ Information from ESET NOD32 Antivirus, version of virus signature
database 2815 (20080122) __________

  The message was checked by ESET NOD32 Antivirus.

  http://www.eset.com
-------------- next part --------------
An HTML attachment was scrubbed...