Lines Matching defs:shift

47 /** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */
137 #define SHR16(a, shift) SHR16_(a, shift, __FILE__, __LINE__)
138 static OPUS_INLINE short SHR16_(int a, int shift, char *file, int line)
141 if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
143 fprintf (stderr, "SHR16: inputs are not short: %d >> %d in %s: line %d\n", a, shift, file, line);
148 res = a>>shift;
159 #define SHL16(a, shift) SHL16_(a, shift, __FILE__, __LINE__)
160 static OPUS_INLINE short SHL16_(int a, int shift, char *file, int line)
163 if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
165 fprintf (stderr, "SHL16: inputs are not short: %d %d in %s: line %d\n", a, shift, file, line);
170 res = a<<shift;
182 static OPUS_INLINE int SHR32(opus_int64 a, int shift)
185 if (!VERIFY_INT(a) || !VERIFY_SHORT(shift))
187 fprintf (stderr, "SHR32: inputs are not int: %d %d\n", (int)a, shift);
192 res = a>>shift;
203 #define SHL32(a, shift) SHL32_(a, shift, __FILE__, __LINE__)
204 static OPUS_INLINE int SHL32_(opus_int64 a, int shift, char *file, int line)
207 if (!VERIFY_INT(a) || !VERIFY_SHORT(shift))
209 fprintf (stderr, "SHL32: inputs are not int: %lld %d in %s: line %d\n", a, shift, file, line);
214 res = a<<shift;
217 fprintf (stderr, "SHL32: output is not int: %lld<<%d = %lld in %s: line %d\n", a, shift, res, file, line);
226 #define PSHR32(a,shift) (celt_mips--,SHR32(ADD32((a),(((opus_val32)(1)<<((shift))>>1))),shift))
227 #define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift)))
233 //#define SHR(a,shift) ((a) >> (shift))
234 //#define SHL(a,shift) ((a) << (shift))