static void init_scan_tables(H264Context *h)

{

    int i;

    for (i = 0; i < 16; i++) {

#define TRANSPOSE(x) (x >> 2) | ((x << 2) & 0xF)

        h->zigzag_scan[i] = TRANSPOSE(ff_zigzag_scan[i]);

        h->field_scan[i]  = TRANSPOSE(field_scan[i]);

#undef TRANSPOSE

    }

    for (i = 0; i < 64; i++) {

#define TRANSPOSE(x) (x >> 3) | ((x & 7) << 3)

        h->zigzag_scan8x8[i]       = TRANSPOSE(ff_zigzag_direct[i]);

        h->zigzag_scan8x8_cavlc[i] = TRANSPOSE(zigzag_scan8x8_cavlc[i]);

        h->field_scan8x8[i]        = TRANSPOSE(field_scan8x8[i]);

        h->field_scan8x8_cavlc[i]  = TRANSPOSE(field_scan8x8_cavlc[i]);

#undef TRANSPOSE

    }

    if (h->sps.transform_bypass) { // FIXME same ugly

        h->zigzag_scan_q0          = ff_zigzag_scan;

        h->zigzag_scan8x8_q0       = ff_zigzag_direct;

        h->zigzag_scan8x8_cavlc_q0 = zigzag_scan8x8_cavlc;

        h->field_scan_q0           = field_scan;

        h->field_scan8x8_q0        = field_scan8x8;

        h->field_scan8x8_cavlc_q0  = field_scan8x8_cavlc;

    } else {

        h->zigzag_scan_q0          = h->zigzag_scan;

        h->zigzag_scan8x8_q0       = h->zigzag_scan8x8;

        h->zigzag_scan8x8_cavlc_q0 = h->zigzag_scan8x8_cavlc;

        h->field_scan_q0           = h->field_scan;

        h->field_scan8x8_q0        = h->field_scan8x8;

        h->field_scan8x8_cavlc_q0  = h->field_scan8x8_cavlc;

    }

}

static void init_scan_tables(H264Context *h)

{

    int i;

    for (i = 0; i < 16; i++) {

#define TRANSPOSE(x) (x >> 2) | ((x << 2) & 0xF)

        h->zigzag_scan[i] = TRANSPOSE(ff_zigzag_scan[i]);

        h->field_scan[i]  = TRANSPOSE(field_scan[i]);

#undef TRANSPOSE

    }

    for (i = 0; i < 64; i++) {

#define TRANSPOSE(x) (x >> 3) | ((x & 7) << 3)

        h->zigzag_scan8x8[i]       = TRANSPOSE(ff_zigzag_direct[i]);

        h->zigzag_scan8x8_cavlc[i] = TRANSPOSE(zigzag_scan8x8_cavlc[i]);

        h->field_scan8x8[i]        = TRANSPOSE(field_scan8x8[i]);

        h->field_scan8x8_cavlc[i]  = TRANSPOSE(field_scan8x8_cavlc[i]);

#undef TRANSPOSE

    }

    if (h->sps.transform_bypass) { 

        h->zigzag_scan_q0          = ff_zigzag_scan;

        h->zigzag_scan8x8_q0       = ff_zigzag_direct;

        h->zigzag_scan8x8_cavlc_q0 = zigzag_scan8x8_cavlc;

        h->field_scan_q0           = field_scan;

        h->field_scan8x8_q0        = field_scan8x8;

        h->field_scan8x8_cavlc_q0  = field_scan8x8_cavlc;

    } else {

        h->zigzag_scan_q0          = h->zigzag_scan;

        h->zigzag_scan8x8_q0       = h->zigzag_scan8x8;

        h->zigzag_scan8x8_cavlc_q0 = h->zigzag_scan8x8_cavlc;

        h->field_scan_q0           = h->field_scan;

        h->field_scan8x8_q0        = h->field_scan8x8;

        h->field_scan8x8_cavlc_q0  = h->field_scan8x8_cavlc;

    }

}

static void FUNC_0(H264Context *VAR_0)

{

    int VAR_1;

    for (VAR_1 = 0; VAR_1 < 16; VAR_1++) {

#define TRANSPOSE(x) (x >> 2) | ((x << 2) & 0xF)

        VAR_0->zigzag_scan[VAR_1] = TRANSPOSE(ff_zigzag_scan[VAR_1]);

        VAR_0->field_scan[VAR_1]  = TRANSPOSE(field_scan[VAR_1]);

#undef TRANSPOSE

    }

    for (VAR_1 = 0; VAR_1 < 64; VAR_1++) {

#define TRANSPOSE(x) (x >> 3) | ((x & 7) << 3)

        VAR_0->zigzag_scan8x8[VAR_1]       = TRANSPOSE(ff_zigzag_direct[VAR_1]);

        VAR_0->zigzag_scan8x8_cavlc[VAR_1] = TRANSPOSE(zigzag_scan8x8_cavlc[VAR_1]);

        VAR_0->field_scan8x8[VAR_1]        = TRANSPOSE(field_scan8x8[VAR_1]);

        VAR_0->field_scan8x8_cavlc[VAR_1]  = TRANSPOSE(field_scan8x8_cavlc[VAR_1]);

#undef TRANSPOSE

    }

    if (VAR_0->sps.transform_bypass) { 

        VAR_0->zigzag_scan_q0          = ff_zigzag_scan;

        VAR_0->zigzag_scan8x8_q0       = ff_zigzag_direct;

        VAR_0->zigzag_scan8x8_cavlc_q0 = zigzag_scan8x8_cavlc;

        VAR_0->field_scan_q0           = field_scan;

        VAR_0->field_scan8x8_q0        = field_scan8x8;

        VAR_0->field_scan8x8_cavlc_q0  = field_scan8x8_cavlc;

    } else {

        VAR_0->zigzag_scan_q0          = VAR_0->zigzag_scan;

        VAR_0->zigzag_scan8x8_q0       = VAR_0->zigzag_scan8x8;

        VAR_0->zigzag_scan8x8_cavlc_q0 = VAR_0->zigzag_scan8x8_cavlc;

        VAR_0->field_scan_q0           = VAR_0->field_scan;

        VAR_0->field_scan8x8_q0        = VAR_0->field_scan8x8;

        VAR_0->field_scan8x8_cavlc_q0  = VAR_0->field_scan8x8_cavlc;

    }

}

static void FUNC_0(H264Context *VAR_0)
{ int VAR_1; for (VAR_1 = 0; VAR_1 < 16; VAR_1++) { #define TRANSPOSE(x) (x >> 2) | ((x << 2) & 0xF)
VAR_0->zigzag_scan[VAR_1] = TRANSPOSE(ff_zigzag_scan[VAR_1]); VAR_0->field_scan[VAR_1]  = TRANSPOSE(field_scan[VAR_1]); #undef TRANSPOSE
} for (VAR_1 = 0; VAR_1 < 64; VAR_1++) { #define TRANSPOSE(x) (x >> 3) | ((x & 7) << 3)
VAR_0->zigzag_scan8x8[VAR_1]       = TRANSPOSE(ff_zigzag_direct[VAR_1]); VAR_0->zigzag_scan8x8_cavlc[VAR_1] = TRANSPOSE(zigzag_scan8x8_cavlc[VAR_1]); VAR_0->field_scan8x8[VAR_1]        = TRANSPOSE(field_scan8x8[VAR_1]); VAR_0->field_scan8x8_cavlc[VAR_1]  = TRANSPOSE(field_scan8x8_cavlc[VAR_1]); #undef TRANSPOSE
} if (VAR_0->sps.transform_bypass) { VAR_0->zigzag_scan_q0          = ff_zigzag_scan; VAR_0->zigzag_scan8x8_q0       = ff_zigzag_direct; VAR_0->zigzag_scan8x8_cavlc_q0 = zigzag_scan8x8_cavlc; VAR_0->field_scan_q0           = field_scan; VAR_0->field_scan8x8_q0        = field_scan8x8; VAR_0->field_scan8x8_cavlc_q0  = field_scan8x8_cavlc; } else { VAR_0->zigzag_scan_q0          = VAR_0->zigzag_scan; VAR_0->zigzag_scan8x8_q0       = VAR_0->zigzag_scan8x8; VAR_0->zigzag_scan8x8_cavlc_q0 = VAR_0->zigzag_scan8x8_cavlc; VAR_0->field_scan_q0           = VAR_0->field_scan; VAR_0->field_scan8x8_q0        = VAR_0->field_scan8x8; VAR_0->field_scan8x8_cavlc_q0  = VAR_0->field_scan8x8_cavlc; } }