• Home
  • Raw
  • Download

Lines Matching refs:shift

547 static OPUS_INLINE opus_int8 silk_LSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){  in silk_LSHIFT8_()  argument
550 ret = a << shift; in silk_LSHIFT8_()
551 fail |= shift < 0; in silk_LSHIFT8_()
552 fail |= shift >= 8; in silk_LSHIFT8_()
553 fail |= (opus_int64)ret != ((opus_int64)a) << shift; in silk_LSHIFT8_()
556 fprintf (stderr, "silk_LSHIFT8(%d, %d) in %s: line %d\n", a, shift, file, line); in silk_LSHIFT8_()
566 static OPUS_INLINE opus_int16 silk_LSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){ in silk_LSHIFT16_() argument
569 ret = a << shift; in silk_LSHIFT16_()
570 fail |= shift < 0; in silk_LSHIFT16_()
571 fail |= shift >= 16; in silk_LSHIFT16_()
572 fail |= (opus_int64)ret != ((opus_int64)a) << shift; in silk_LSHIFT16_()
575 fprintf (stderr, "silk_LSHIFT16(%d, %d) in %s: line %d\n", a, shift, file, line); in silk_LSHIFT16_()
585 static OPUS_INLINE opus_int32 silk_LSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){ in silk_LSHIFT32_() argument
588 ret = a << shift; in silk_LSHIFT32_()
589 fail |= shift < 0; in silk_LSHIFT32_()
590 fail |= shift >= 32; in silk_LSHIFT32_()
591 fail |= (opus_int64)ret != ((opus_int64)a) << shift; in silk_LSHIFT32_()
594 fprintf (stderr, "silk_LSHIFT32(%d, %d) in %s: line %d\n", a, shift, file, line); in silk_LSHIFT32_()
604 static OPUS_INLINE opus_int64 silk_LSHIFT64_(opus_int64 a, opus_int shift, char *file, int line){ in silk_LSHIFT64_() argument
607 ret = a << shift; in silk_LSHIFT64_()
608 fail |= shift < 0; in silk_LSHIFT64_()
609 fail |= shift >= 64; in silk_LSHIFT64_()
610 fail |= (ret>>shift) != ((opus_int64)a); in silk_LSHIFT64_()
613 … fprintf (stderr, "silk_LSHIFT64(%lld, %d) in %s: line %d\n", (long long)a, shift, file, line); in silk_LSHIFT64_()
623 static OPUS_INLINE opus_int32 silk_LSHIFT_ovflw_(opus_int32 a, opus_int32 shift, char *file, int li… in silk_LSHIFT_ovflw_() argument
624 if ( (shift < 0) || (shift >= 32) ) /* no check for overflow */ in silk_LSHIFT_ovflw_()
626 fprintf (stderr, "silk_LSHIFT_ovflw(%d, %d) in %s: line %d\n", a, shift, file, line); in silk_LSHIFT_ovflw_()
631 return a << shift; in silk_LSHIFT_ovflw_()
636 static OPUS_INLINE opus_uint32 silk_LSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int l… in silk_LSHIFT_uint_() argument
638 ret = a << shift; in silk_LSHIFT_uint_()
639 if ( (shift < 0) || ((opus_int64)ret != ((opus_int64)a) << shift)) in silk_LSHIFT_uint_()
641 fprintf (stderr, "silk_LSHIFT_uint(%u, %d) in %s: line %d\n", a, shift, file, line); in silk_LSHIFT_uint_()
651 static OPUS_INLINE opus_int8 silk_RSHIFT8_(opus_int8 a, opus_int32 shift, char *file, int line){ in silk_RSHIFT8_() argument
652 if ( (shift < 0) || (shift>=8) ) in silk_RSHIFT8_()
654 fprintf (stderr, "silk_RSHITF8(%d, %d) in %s: line %d\n", a, shift, file, line); in silk_RSHIFT8_()
659 return a >> shift; in silk_RSHIFT8_()
664 static OPUS_INLINE opus_int16 silk_RSHIFT16_(opus_int16 a, opus_int32 shift, char *file, int line){ in silk_RSHIFT16_() argument
665 if ( (shift < 0) || (shift>=16) ) in silk_RSHIFT16_()
667 fprintf (stderr, "silk_RSHITF16(%d, %d) in %s: line %d\n", a, shift, file, line); in silk_RSHIFT16_()
672 return a >> shift; in silk_RSHIFT16_()
677 static OPUS_INLINE opus_int32 silk_RSHIFT32_(opus_int32 a, opus_int32 shift, char *file, int line){ in silk_RSHIFT32_() argument
678 if ( (shift < 0) || (shift>=32) ) in silk_RSHIFT32_()
680 fprintf (stderr, "silk_RSHITF32(%d, %d) in %s: line %d\n", a, shift, file, line); in silk_RSHIFT32_()
685 return a >> shift; in silk_RSHIFT32_()
690 static OPUS_INLINE opus_int64 silk_RSHIFT64_(opus_int64 a, opus_int64 shift, char *file, int line){ in silk_RSHIFT64_() argument
691 if ( (shift < 0) || (shift>=64) ) in silk_RSHIFT64_()
693 …(stderr, "silk_RSHITF64(%lld, %lld) in %s: line %d\n", (long long)a, (long long)shift, file, line); in silk_RSHIFT64_()
698 return a >> shift; in silk_RSHIFT64_()
703 static OPUS_INLINE opus_uint32 silk_RSHIFT_uint_(opus_uint32 a, opus_int32 shift, char *file, int l… in silk_RSHIFT_uint_() argument
704 if ( (shift < 0) || (shift>32) ) in silk_RSHIFT_uint_()
706 fprintf (stderr, "silk_RSHIFT_uint(%u, %d) in %s: line %d\n", a, shift, file, line); in silk_RSHIFT_uint_()
711 return a >> shift; in silk_RSHIFT_uint_()
716 static OPUS_INLINE int silk_ADD_LSHIFT_(int a, int b, int shift, char *file, int line){ in silk_ADD_LSHIFT_() argument
718 ret = a + (b << shift); in silk_ADD_LSHIFT_()
719 …if ( (shift < 0) || (shift>15) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) ) in silk_ADD_LSHIFT_()
721 fprintf (stderr, "silk_ADD_LSHIFT(%d, %d, %d) in %s: line %d\n", a, b, shift, file, line); in silk_ADD_LSHIFT_()
731 static OPUS_INLINE opus_int32 silk_ADD_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char… in silk_ADD_LSHIFT32_() argument
733 ret = a + (b << shift); in silk_ADD_LSHIFT32_()
734 …if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) ) in silk_ADD_LSHIFT32_()
736 fprintf (stderr, "silk_ADD_LSHIFT32(%d, %d, %d) in %s: line %d\n", a, b, shift, file, line); in silk_ADD_LSHIFT32_()
746 static OPUS_INLINE opus_uint32 silk_ADD_LSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift in silk_ADD_LSHIFT_uint_() argument
748 ret = a + (b << shift); in silk_ADD_LSHIFT_uint_()
749 …if ( (shift < 0) || (shift>32) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) << shift)) ) in silk_ADD_LSHIFT_uint_()
751 … fprintf (stderr, "silk_ADD_LSHIFT_uint(%u, %u, %d) in %s: line %d\n", a, b, shift, file, line); in silk_ADD_LSHIFT_uint_()
761 static OPUS_INLINE int silk_ADD_RSHIFT_(int a, int b, int shift, char *file, int line){ in silk_ADD_RSHIFT_() argument
763 ret = a + (b >> shift); in silk_ADD_RSHIFT_()
764 …if ( (shift < 0) || (shift>15) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) ) in silk_ADD_RSHIFT_()
766 fprintf (stderr, "silk_ADD_RSHIFT(%d, %d, %d) in %s: line %d\n", a, b, shift, file, line); in silk_ADD_RSHIFT_()
776 static OPUS_INLINE opus_int32 silk_ADD_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char… in silk_ADD_RSHIFT32_() argument
778 ret = a + (b >> shift); in silk_ADD_RSHIFT32_()
779 …if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) ) in silk_ADD_RSHIFT32_()
781 fprintf (stderr, "silk_ADD_RSHIFT32(%d, %d, %d) in %s: line %d\n", a, b, shift, file, line); in silk_ADD_RSHIFT32_()
791 static OPUS_INLINE opus_uint32 silk_ADD_RSHIFT_uint_(opus_uint32 a, opus_uint32 b, opus_int32 shift in silk_ADD_RSHIFT_uint_() argument
793 ret = a + (b >> shift); in silk_ADD_RSHIFT_uint_()
794 …if ( (shift < 0) || (shift>32) || ((opus_int64)ret != (opus_int64)a + (((opus_int64)b) >> shift)) ) in silk_ADD_RSHIFT_uint_()
796 … fprintf (stderr, "silk_ADD_RSHIFT_uint(%u, %u, %d) in %s: line %d\n", a, b, shift, file, line); in silk_ADD_RSHIFT_uint_()
806 static OPUS_INLINE opus_int32 silk_SUB_LSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char… in silk_SUB_LSHIFT32_() argument
808 ret = a - (b << shift); in silk_SUB_LSHIFT32_()
809 …if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a - (((opus_int64)b) << shift)) ) in silk_SUB_LSHIFT32_()
811 fprintf (stderr, "silk_SUB_LSHIFT32(%d, %d, %d) in %s: line %d\n", a, b, shift, file, line); in silk_SUB_LSHIFT32_()
821 static OPUS_INLINE opus_int32 silk_SUB_RSHIFT32_(opus_int32 a, opus_int32 b, opus_int32 shift, char… in silk_SUB_RSHIFT32_() argument
823 ret = a - (b >> shift); in silk_SUB_RSHIFT32_()
824 …if ( (shift < 0) || (shift>31) || ((opus_int64)ret != (opus_int64)a - (((opus_int64)b) >> shift)) ) in silk_SUB_RSHIFT32_()
826 fprintf (stderr, "silk_SUB_RSHIFT32(%d, %d, %d) in %s: line %d\n", a, b, shift, file, line); in silk_SUB_RSHIFT32_()
836 static OPUS_INLINE opus_int32 silk_RSHIFT_ROUND_(opus_int32 a, opus_int32 shift, char *file, int li… in silk_RSHIFT_ROUND_() argument
838 ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1; in silk_RSHIFT_ROUND_()
840 …if ( (shift <= 0) || (shift>31) || ((opus_int64)ret != ((opus_int64)a + ((opus_int64)1 << (shift -… in silk_RSHIFT_ROUND_()
842 fprintf (stderr, "silk_RSHIFT_ROUND(%d, %d) in %s: line %d\n", a, shift, file, line); in silk_RSHIFT_ROUND_()
852 static OPUS_INLINE opus_int64 silk_RSHIFT_ROUND64_(opus_int64 a, opus_int32 shift, char *file, int … in silk_RSHIFT_ROUND64_() argument
855 if ( (shift <= 0) || (shift>=64) ) in silk_RSHIFT_ROUND64_()
857 …fprintf (stderr, "silk_RSHIFT_ROUND64(%lld, %d) in %s: line %d\n", (long long)a, shift, file, line… in silk_RSHIFT_ROUND64_()
862 ret = shift == 1 ? (a >> 1) + (a & 1) : ((a >> (shift - 1)) + 1) >> 1; in silk_RSHIFT_ROUND64_()