aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-08-01 19:17:36 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-08-01 19:17:36 +0000
commitfecc146b28b97ae10942c9eabd279f44fb7c18ed (patch)
treeec8d24f7b7702adc4b79c7422b672b9043123f46
parentaf88ae54f4886eecaa9feeb666bc2662a53e2190 (diff)
downloadffmpeg-fecc146b28b97ae10942c9eabd279f44fb7c18ed.tar.gz
merge 2 if()
this safes 1-2 cpu cycles Originally committed as revision 9855 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/mpeg12.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index d0b24d0553..f0cbd8e7d6 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -338,23 +338,20 @@ static int mpeg_decode_mb(MpegEncContext *s,
if (mb_type & MB_TYPE_ZERO_MV){
assert(mb_type & MB_TYPE_CBP);
- /* compute dct type */
- if (s->picture_structure == PICT_FRAME && //FIXME add a interlaced_dct coded var?
- !s->frame_pred_frame_dct) {
- s->interlaced_dct = get_bits1(&s->gb);
- }
-
- if (IS_QUANT(mb_type))
- s->qscale = get_qscale(s);
-
s->mv_dir = MV_DIR_FORWARD;
- if(s->picture_structure == PICT_FRAME)
+ if(s->picture_structure == PICT_FRAME){
+ if(!s->frame_pred_frame_dct)
+ s->interlaced_dct = get_bits1(&s->gb);
s->mv_type = MV_TYPE_16X16;
- else{
+ }else{
s->mv_type = MV_TYPE_FIELD;
mb_type |= MB_TYPE_INTERLACED;
s->field_select[0][0]= s->picture_structure - 1;
}
+
+ if (IS_QUANT(mb_type))
+ s->qscale = get_qscale(s);
+
s->last_mv[0][0][0] = 0;
s->last_mv[0][0][1] = 0;
s->last_mv[0][1][0] = 0;