diff options
author | jm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800> | 2006-04-19 17:56:55 +0400 |
---|---|---|
committer | jm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800> | 2006-04-19 17:56:55 +0400 |
commit | 37a913092e14c69ac16d272db30f4824ae834bc3 (patch) | |
tree | 6200b19b5669fe25fdca154e29f5de221ce0750c /libspeex/nb_celp.c | |
parent | baf4f22be4d013190230554a329dac86ff2d0c88 (diff) |
Added some EXTEND32 for 16-bit machines
git-svn-id: http://svn.xiph.org/trunk/speex@11165 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'libspeex/nb_celp.c')
-rw-r--r-- | libspeex/nb_celp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libspeex/nb_celp.c b/libspeex/nb_celp.c index bd86967..5354c2a 100644 --- a/libspeex/nb_celp.c +++ b/libspeex/nb_celp.c @@ -774,12 +774,12 @@ int nb_encode(void *state, void *vin, SpeexBits *bits) if (sub==0) { for (i=0;i<st->subframeSize;i++) - real_exc[i] = SHL32(st->winBuf[i],SIG_SHIFT); + real_exc[i] = SHL32(EXTEND32(st->winBuf[i]),SIG_SHIFT); for (i=0;i<st->subframeSize;i++) sw[i] = st->winBuf[i]; } else { for (i=0;i<st->subframeSize;i++) - real_exc[i] = SHL32(in[i+((sub-1)*st->subframeSize)],SIG_SHIFT); + real_exc[i] = SHL32(EXTEND32(in[i+((sub-1)*st->subframeSize)]),SIG_SHIFT); for (i=0;i<st->subframeSize;i++) sw[i] = in[i+((sub-1)*st->subframeSize)]; } @@ -822,7 +822,7 @@ int nb_encode(void *state, void *vin, SpeexBits *bits) /* Compute target signal */ for (i=0;i<st->subframeSize;i++) - target[i]=SHL32(sw[i]-PSHR32(ringing[i],1),SIG_SHIFT); + target[i]=SHL32(EXTEND32(SUB16(sw[i],PSHR32(ringing[i],1))),SIG_SHIFT); /* Reset excitation */ for (i=0;i<st->subframeSize;i++) |