Revision 5a78bfbd

View differences:

libavcodec/h264.c
1584 1584
 * gets the chroma qp.
1585 1585
 */
1586 1586
static inline int get_chroma_qp(H264Context *h, int t, int qscale){
1587
    return h->pps.chroma_qp_table[t][qscale & 0xff];
1587
    return h->pps.chroma_qp_table[t][qscale];
1588 1588
}
1589 1589

  
1590 1590
//FIXME need to check that this does not overflow signed 32 bit for low qp, I am not sure, it's very close
......
7337 7337
build_qp_table(PPS *pps, int t, int index)
7338 7338
{
7339 7339
    int i;
7340
    for(i = 0; i < 255; i++)
7341
        pps->chroma_qp_table[t][i & 0xff] = chroma_qp[av_clip(i + index, 0, 51)];
7340
    for(i = 0; i < 52; i++)
7341
        pps->chroma_qp_table[t][i] = chroma_qp[av_clip(i + index, 0, 51)];
7342 7342
}
7343 7343

  
7344 7344
static inline int decode_picture_parameter_set(H264Context *h, int bit_length){
libavcodec/h264.h
138 138
    int transform_8x8_mode;     ///< transform_8x8_mode_flag
139 139
    uint8_t scaling_matrix4[6][16];
140 140
    uint8_t scaling_matrix8[2][64];
141
    uint8_t chroma_qp_table[2][256];  ///< pre-scaled (with chroma_qp_index_offset) version of qp_table
141
    uint8_t chroma_qp_table[2][64];  ///< pre-scaled (with chroma_qp_index_offset) version of qp_table
142 142
    int chroma_qp_diff;
143 143
}PPS;
144 144

  

Also available in: Unified diff