/* Evaluate sqrt(x << 24). x must fit in 20 bits. This value is evaluated in an odd way to make the output identical to the binary decoder.  */
static int t_sqrt(unsigned int x)
/* Evaluate sqrt(x << 24). x must fit in 20 bits. This value is evaluated in an odd way to make the output identical to the binary decoder.  */
static int t_sqrt(unsigned int x)
{
    int s = 2;
    while (x > 0xfff) {
        s++;
        x >>= 2;
    }
    return ff_sqrt(x << 20) << s;
}