48 #ifndef AVUTIL_FIXED_DSP_H
49 #define AVUTIL_FIXED_DSP_H
117 int retval, bit_mask, guess,
square, i;
122 if (shift1 > 0) retval =
ff_sqrt(x << shift1);
123 else retval =
ff_sqrt(x >> -shift1);
126 retval = retval <<
shift2;
127 bit_mask = (1 << (shift2 - 1));
130 guess = retval + bit_mask;
131 accu = (int64_t)guess * guess;
132 square = (int)((accu + bit_mask) >>
bits);
139 else retval >>= (-
shift2);