diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-18 12:13:21 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-18 12:13:21 +0000 |
commit | 90a5849efd31458b0cd16a52b7b0d8ede38c4129 (patch) | |
tree | 4ec7ea09cd0843855b37ca44d876f0d61df45237 | |
parent | 077a8d61c067556c25eb7377cc94cc200ba2c84b (diff) | |
download | ffmpeg-90a5849efd31458b0cd16a52b7b0d8ede38c4129.tar.gz |
Speedup decode_cabac_field_decoding_flag() by 9 cpu cycles.
Originally committed as revision 21875 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/h264_cabac.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c index 1479697814..f672ccf692 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -707,12 +707,11 @@ void ff_h264_init_cabac_states(H264Context *h) { static int decode_cabac_field_decoding_flag(H264Context *h) { MpegEncContext * const s = &h->s; - const long mba_xy = h->mb_xy - 1L; const long mbb_xy = h->mb_xy - 2L*s->mb_stride; unsigned long ctx = 0; - ctx += (s->current_picture.mb_type[mba_xy]>>7)&(h->slice_table[mba_xy] == h->slice_num); + ctx += h->mb_field_decoding_flag & !!s->mb_x; //for FMO:(s->current_picture.mb_type[mba_xy]>>7)&(h->slice_table[mba_xy] == h->slice_num); ctx += (s->current_picture.mb_type[mbb_xy]>>7)&(h->slice_table[mbb_xy] == h->slice_num); return get_cabac_noinline( &h->cabac, &(h->cabac_state+70)[ctx] ); |