static void init_uni_dc_tab(void)
{
    int level, uni_code, uni_len;
    for(level=-256; level<256; level++){
        int size, v, l;
        size = 0;
        v = abs(level);
        while (v) {
            v >>= 1;
            size++;
        }
        if (level < 0)
            l= (-level) ^ ((1 << size) - 1);
        else
            l= level;
        uni_code= DCtab_lum[size][0];
        uni_len = DCtab_lum[size][1];
        if (size > 0) {
            uni_code<<=size; uni_code|=l;
            uni_len+=size;
            if (size > 8){
                uni_code<<=1; uni_code|=1;
                uni_len++;
            }
        }
        uni_DCtab_lum_bits[level+256]= uni_code;
        uni_DCtab_lum_len [level+256]= uni_len;
        uni_code= DCtab_chrom[size][0];
        uni_len = DCtab_chrom[size][1];
        if (size > 0) {
            uni_code<<=size; uni_code|=l;
            uni_len+=size;
            if (size > 8){
                uni_code<<=1; uni_code|=1;
                uni_len++;
            }
        }
        uni_DCtab_chrom_bits[level+256]= uni_code;
        uni_DCtab_chrom_len [level+256]= uni_len;
    }
}
['static void init_uni_dc_tab(void)\n{\n    int level, uni_code, uni_len;\n    for(level=-256; level<256; level++){\n        int size, v, l;\n        size = 0;\n        v = abs(level);\n        while (v) {\n            v >>= 1;\n            size++;\n        }\n        if (level < 0)\n            l= (-level) ^ ((1 << size) - 1);\n        else\n            l= level;\n        uni_code= DCtab_lum[size][0];\n        uni_len = DCtab_lum[size][1];\n        if (size > 0) {\n            uni_code<<=size; uni_code|=l;\n            uni_len+=size;\n            if (size > 8){\n                uni_code<<=1; uni_code|=1;\n                uni_len++;\n            }\n        }\n        uni_DCtab_lum_bits[level+256]= uni_code;\n        uni_DCtab_lum_len [level+256]= uni_len;\n        uni_code= DCtab_chrom[size][0];\n        uni_len = DCtab_chrom[size][1];\n        if (size > 0) {\n            uni_code<<=size; uni_code|=l;\n            uni_len+=size;\n            if (size > 8){\n                uni_code<<=1; uni_code|=1;\n                uni_len++;\n            }\n        }\n        uni_DCtab_chrom_bits[level+256]= uni_code;\n        uni_DCtab_chrom_len [level+256]= uni_len;\n    }\n}']