diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-07-22 13:01:10 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-07-22 13:01:10 +0000 |
commit | 5a78bfbde74620137ccbd8c223300ac639107f60 (patch) | |
tree | 691fa8c1bbfb9daf74284d8d0af34dfd9286c085 /libavcodec/h264.c | |
parent | a82688b0031c2bc76636ef4b7fba8326453f7d53 (diff) | |
download | ffmpeg-5a78bfbde74620137ccbd8c223300ac639107f60.tar.gz |
qscale has a range of 0..51 we thus do not need a 256 entry table and neither need
to and it with 0xFF.
Originally committed as revision 14336 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index ee29f1b81f..213e03b087 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1584,7 +1584,7 @@ static void chroma_dc_dct_c(DCTELEM *block){ * gets the chroma qp. */ static inline int get_chroma_qp(H264Context *h, int t, int qscale){ - return h->pps.chroma_qp_table[t][qscale & 0xff]; + return h->pps.chroma_qp_table[t][qscale]; } //FIXME need to check that this does not overflow signed 32 bit for low qp, I am not sure, it's very close @@ -7337,8 +7337,8 @@ static void build_qp_table(PPS *pps, int t, int index) { int i; - for(i = 0; i < 255; i++) - pps->chroma_qp_table[t][i & 0xff] = chroma_qp[av_clip(i + index, 0, 51)]; + for(i = 0; i < 52; i++) + pps->chroma_qp_table[t][i] = chroma_qp[av_clip(i + index, 0, 51)]; } static inline int decode_picture_parameter_set(H264Context *h, int bit_length){ |