summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-12-22 15:53:00 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-12-22 15:53:00 +0000
commit127a20e3b8a38452b4ccedbd368281e1d3f3ce54 (patch)
tree6b0884961936d9d36adbe9098771bc5fbec9b05b /libavcodec/h264.c
parent9daa4ceaa3661bc7f994d2864e5599934e9282ce (diff)
Simplify if(), 3 cpu cycles faster in pentium dual.
Originally committed as revision 16272 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 30d7b748ea..7605958a36 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -5314,10 +5314,8 @@ static inline void compute_mb_neighbors(H264Context *h)
const int left_mb_frame_flag = !IS_INTERLACED(s->current_picture.mb_type[pair_xy-1]);
const int curr_mb_frame_flag = !MB_FIELD;
const int bottom = (s->mb_y & 1);
- if (bottom
- ? !curr_mb_frame_flag // bottom macroblock
- : (!curr_mb_frame_flag && !top_mb_frame_flag) // top macroblock
- ) {
+
+ if (!curr_mb_frame_flag && (bottom || !top_mb_frame_flag)){
h->top_mb_xy -= s->mb_stride;
}
if (left_mb_frame_flag != curr_mb_frame_flag) {