This removes a branch from H.263 based decoders.
Unified · Split
| @@ -56,9 +56,6 @@ void ff_h263_update_motion_val(MpegEncContext * s){ · 55 unmodified lines | |||
| 56 | const int wrap = s->b8_stride; | 56 | const int wrap = s->b8_stride; |
| 57 | const int xy = s->block_index[0]; | 57 | const int xy = s->block_index[0]; |
| 58 | 58 | ||
| 59 | if (s->current_picture.mbskip_table) | ||
| 60 | s->current_picture.mbskip_table[mb_xy] = s->mb_skipped; | ||
| 61 | |||
| 62 | if(s->mv_type != MV_TYPE_8X8){ | 59 | if(s->mv_type != MV_TYPE_8X8){ |
| 63 | int motion_x, motion_y; | 60 | int motion_x, motion_y; |
| 64 | if (s->mb_intra) { | 61 | if (s->mb_intra) { |
| @@ -692,6 +692,9 @@ void ff_h263_update_mb(MpegEncContext *s) · 691 unmodified lines | |||
| 692 | { | 692 | { |
| 693 | const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; | 693 | const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; |
| 694 | 694 | ||
| 695 | if (s->current_picture.mbskip_table) | ||
| 696 | s->current_picture.mbskip_table[mb_xy] = s->mb_skipped; | ||
| 697 | |||
| 695 | if (s->mv_type == MV_TYPE_8X8) | 698 | if (s->mv_type == MV_TYPE_8X8) |
| 696 | s->current_picture.mb_type[mb_xy] = MB_TYPE_L0 | MB_TYPE_8x8; | 699 | s->current_picture.mb_type[mb_xy] = MB_TYPE_L0 | MB_TYPE_8x8; |
| 697 | else if(s->mb_intra) | 700 | else if(s->mb_intra) |
| @@ -1594,9 +1594,11 @@ static int mpeg4_decode_partitioned_mb(MpegEncContext *s, int16_t block[6][64]) · 1593 unmodified lines | |||
| 1594 | && ctx->vol_sprite_usage == GMC_SPRITE) { | 1594 | && ctx->vol_sprite_usage == GMC_SPRITE) { |
| 1595 | s->mcsel = 1; | 1595 | s->mcsel = 1; |
| 1596 | s->mb_skipped = 0; | 1596 | s->mb_skipped = 0; |
| 1597 | s->current_picture.mbskip_table[xy] = 0; | ||
| 1597 | } else { | 1598 | } else { |
| 1598 | s->mcsel = 0; | 1599 | s->mcsel = 0; |
| 1599 | s->mb_skipped = 1; | 1600 | s->mb_skipped = 1; |
| 1601 | s->current_picture.mbskip_table[xy] = 1; | ||
| 1600 | } | 1602 | } |
| 1601 | } else if (s->mb_intra) { | 1603 | } else if (s->mb_intra) { |
| 1602 | s->ac_pred = IS_ACPRED(s->current_picture.mb_type[xy]); | 1604 | s->ac_pred = IS_ACPRED(s->current_picture.mb_type[xy]); |
| @@ -1678,6 +1680,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 75 unmodified lines | |||
| 1678 | s->mcsel = 1; | 1680 | s->mcsel = 1; |
| 1679 | s->mv[0][0][0] = get_amv(ctx, 0); | 1681 | s->mv[0][0][0] = get_amv(ctx, 0); |
| 1680 | s->mv[0][0][1] = get_amv(ctx, 1); | 1682 | s->mv[0][0][1] = get_amv(ctx, 1); |
| 1683 | s->current_picture.mbskip_table[xy] = 0; | ||
| 1681 | s->mb_skipped = 0; | 1684 | s->mb_skipped = 0; |
| 1682 | } else { | 1685 | } else { |
| 1683 | s->current_picture.mb_type[xy] = MB_TYPE_SKIP | | 1686 | s->current_picture.mb_type[xy] = MB_TYPE_SKIP | |
| @@ -1686,6 +1689,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64]) · 2 unmodified lines | |||
| 1686 | s->mcsel = 0; | 1689 | s->mcsel = 0; |
| 1687 | s->mv[0][0][0] = 0; | 1690 | s->mv[0][0][0] = 0; |
| 1688 | s->mv[0][0][1] = 0; | 1691 | s->mv[0][0][1] = 0; |
| 1692 | s->current_picture.mbskip_table[xy] = 1; | ||
| 1689 | s->mb_skipped = 1; | 1693 | s->mb_skipped = 1; |
| 1690 | } | 1694 | } |
| 1691 | goto end; | 1695 | goto end; |