1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/h263: Move setting mbskip_table to decoder/encoders

This removes a branch from H.263 based decoders.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-05-03 18:22:59 +02:00
parent 9645eeb485
commit 47e43c19cb
3 changed files with 7 additions and 3 deletions

View File

@ -56,9 +56,6 @@ void ff_h263_update_motion_val(MpegEncContext * s){
const int wrap = s->b8_stride;
const int xy = s->block_index[0];
if (s->current_picture.mbskip_table)
s->current_picture.mbskip_table[mb_xy] = s->mb_skipped;
if(s->mv_type != MV_TYPE_8X8){
int motion_x, motion_y;
if (s->mb_intra) {

View File

@ -692,6 +692,9 @@ void ff_h263_update_mb(MpegEncContext *s)
{
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
if (s->current_picture.mbskip_table)
s->current_picture.mbskip_table[mb_xy] = s->mb_skipped;
if (s->mv_type == MV_TYPE_8X8)
s->current_picture.mb_type[mb_xy] = MB_TYPE_L0 | MB_TYPE_8x8;
else if(s->mb_intra)

View File

@ -1594,9 +1594,11 @@ static int mpeg4_decode_partitioned_mb(MpegEncContext *s, int16_t block[6][64])
&& ctx->vol_sprite_usage == GMC_SPRITE) {
s->mcsel = 1;
s->mb_skipped = 0;
s->current_picture.mbskip_table[xy] = 0;
} else {
s->mcsel = 0;
s->mb_skipped = 1;
s->current_picture.mbskip_table[xy] = 1;
}
} else if (s->mb_intra) {
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])
s->mcsel = 1;
s->mv[0][0][0] = get_amv(ctx, 0);
s->mv[0][0][1] = get_amv(ctx, 1);
s->current_picture.mbskip_table[xy] = 0;
s->mb_skipped = 0;
} else {
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])
s->mcsel = 0;
s->mv[0][0][0] = 0;
s->mv[0][0][1] = 0;
s->current_picture.mbskip_table[xy] = 1;
s->mb_skipped = 1;
}
goto end;