Mercurial > libavcodec.hg
comparison mpeg12.c @ 5437:57434d6c8f49 libavcodec
merge 2 if()
this safes 1-2 cpu cycles
author | michael |
---|---|
date | Wed, 01 Aug 2007 19:17:36 +0000 |
parents | e0624692025f |
children | 8ea581ae9fa2 |
comparison
equal
deleted
inserted
replaced
5436:b4d41cc053b8 | 5437:57434d6c8f49 |
---|---|
336 } | 336 } |
337 } else { | 337 } else { |
338 if (mb_type & MB_TYPE_ZERO_MV){ | 338 if (mb_type & MB_TYPE_ZERO_MV){ |
339 assert(mb_type & MB_TYPE_CBP); | 339 assert(mb_type & MB_TYPE_CBP); |
340 | 340 |
341 /* compute dct type */ | |
342 if (s->picture_structure == PICT_FRAME && //FIXME add a interlaced_dct coded var? | |
343 !s->frame_pred_frame_dct) { | |
344 s->interlaced_dct = get_bits1(&s->gb); | |
345 } | |
346 | |
347 if (IS_QUANT(mb_type)) | |
348 s->qscale = get_qscale(s); | |
349 | |
350 s->mv_dir = MV_DIR_FORWARD; | 341 s->mv_dir = MV_DIR_FORWARD; |
351 if(s->picture_structure == PICT_FRAME) | 342 if(s->picture_structure == PICT_FRAME){ |
343 if(!s->frame_pred_frame_dct) | |
344 s->interlaced_dct = get_bits1(&s->gb); | |
352 s->mv_type = MV_TYPE_16X16; | 345 s->mv_type = MV_TYPE_16X16; |
353 else{ | 346 }else{ |
354 s->mv_type = MV_TYPE_FIELD; | 347 s->mv_type = MV_TYPE_FIELD; |
355 mb_type |= MB_TYPE_INTERLACED; | 348 mb_type |= MB_TYPE_INTERLACED; |
356 s->field_select[0][0]= s->picture_structure - 1; | 349 s->field_select[0][0]= s->picture_structure - 1; |
357 } | 350 } |
351 | |
352 if (IS_QUANT(mb_type)) | |
353 s->qscale = get_qscale(s); | |
354 | |
358 s->last_mv[0][0][0] = 0; | 355 s->last_mv[0][0][0] = 0; |
359 s->last_mv[0][0][1] = 0; | 356 s->last_mv[0][0][1] = 0; |
360 s->last_mv[0][1][0] = 0; | 357 s->last_mv[0][1][0] = 0; |
361 s->last_mv[0][1][1] = 0; | 358 s->last_mv[0][1][1] = 0; |
362 s->mv[0][0][0] = 0; | 359 s->mv[0][0][0] = 0; |