# HG changeset patch # User michael # Date 1185995856 0 # Node ID 57434d6c8f49f9290eb9042511d0dd3e3318a49a # Parent b4d41cc053b8758305ea2dc9e7fc3a43017f144d merge 2 if() this safes 1-2 cpu cycles diff -r b4d41cc053b8 -r 57434d6c8f49 mpeg12.c --- a/mpeg12.c Wed Aug 01 13:18:23 2007 +0000 +++ b/mpeg12.c Wed Aug 01 19:17:36 2007 +0000 @@ -338,23 +338,20 @@ 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); + s->mv_dir = MV_DIR_FORWARD; + 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{ + 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->mv_dir = MV_DIR_FORWARD; - if(s->picture_structure == PICT_FRAME) - s->mv_type = MV_TYPE_16X16; - else{ - s->mv_type = MV_TYPE_FIELD; - mb_type |= MB_TYPE_INTERLACED; - s->field_select[0][0]= s->picture_structure - 1; - } s->last_mv[0][0][0] = 0; s->last_mv[0][0][1] = 0; s->last_mv[0][1][0] = 0;