On 08/07/2011 07:37 PM, Justin Ruggles wrote:

> +    if (energy_cpl <= COEF_MAX) {
> +        return 1048576;
> +    } else {
> +        uint64_t coord = energy_ch / (energy_cpl >> 24);
> +        coord = FFMIN(coord, 1073741824);
> +        return FFMIN(isqrt64(coord) << 9, COEF_MAX);
> +    }
>  }


heh. I just realized that this final version doesn't need the 64-bit
sqrt after all. Other versions I was working on did need it, but then I
figured out I could clip to 64.0 in 24-bit fixed-point, which is still
within 32-bit range, and multiply after the sqrt. I'll send an updated
patch shortly.

-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to