/* Initializes a given lookup table using a given delta  */
static void bgmc_lut_fillp(uint8_t *lut, unsigned int *lut_status, unsigned int delta)
/* Initializes a given lookup table using a given delta  */
static void bgmc_lut_fillp(uint8_t *lut, unsigned int *lut_status, unsigned int delta)
{
    unsigned int sx, i;
    for (sx = 0; sx < 16; sx++)
        for (i = 0; i < LUT_SIZE; i++) {
            unsigned int target = (i + 1) << (FREQ_BITS - LUT_BITS);
            unsigned int symbol = 1 << delta;
            while (cf_table[sx][symbol] > target)
                symbol += 1 << delta;
            *lut++ = symbol >> delta;
        }
    *lut_status = delta;
}