put_bits(p, 8, s->intra_matrix[i]);
j = zigzag_direct[i]; put_bits(p, 8, s->intra_matrix[j]);
static void jpeg_table_header(MpegEncContext *s){    PutBitContext *p = &s->pb;    int i, size;    UINT8 *ptr;    /* quant matrixes */    put_marker(p, DQT);    put_bits(p, 16, 2 + 1 * (1 + 64));    put_bits(p, 4, 0); /* 8 bit precision */    put_bits(p, 4, 0); /* table 0 */    for(i=0;i<64;i++) {        put_bits(p, 8, s->intra_matrix[i]);    }#if 0    put_bits(p, 4, 0); /* 8 bit precision */    put_bits(p, 4, 1); /* table 1 */    for(i=0;i<64;i++) {        put_bits(p, 8, s->chroma_intra_matrix[i]);    }#endif    /* huffman table */    put_marker(p, DHT);    flush_put_bits(p);    ptr = p->buf_ptr;    put_bits(p, 16, 0); /* patched later */    size = 2;    size += put_huffman_table(s, 0, 0, bits_dc_luminance, val_dc_luminance);    size += put_huffman_table(s, 0, 1, bits_dc_chrominance, val_dc_chrominance);        size += put_huffman_table(s, 1, 0, bits_ac_luminance, val_ac_luminance);    size += put_huffman_table(s, 1, 1, bits_ac_chrominance, val_ac_chrominance);    ptr[0] = size >> 8;    ptr[1] = size;}