History

avcodec/h263: Move setting mbskip_table to decoder/encoders

This removes a branch from H.263 based decoders.

Andreas Rheinhardt committed 2 years ago

Commit 47e43c11 parent 9645eeb3 files · +7 −3Browse files

Showing the changes to libavcodec (3 of 3 files). Show all

Unified · Split

3 files
  1. libavcodec/h263.c +0 −3
  2. libavcodec/ituh263enc.c +3 −0
  3. libavcodec/mpeg4videodec.c +4 −0
libavcodec/h263.c+0−3
@@ -56,9 +56,6 @@ void ff_h263_update_motion_val(MpegEncContext * s){ · 55 unmodified lines
5656 const int wrap = s->b8_stride;
5757 const int xy = s->block_index[0];
5858
59− if (s->current_picture.mbskip_table)
60− s->current_picture.mbskip_table[mb_xy] = s->mb_skipped;
61−
6259 if(s->mv_type != MV_TYPE_8X8){
6360 int motion_x, motion_y;
6461 if (s->mb_intra) {
libavcodec/ituh263enc.c+3−0
@@ -692,6 +692,9 @@ void ff_h263_update_mb(MpegEncContext *s) · 691 unmodified lines
692692 {
693693 const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
694694
695+ if (s->current_picture.mbskip_table)
696+ s->current_picture.mbskip_table[mb_xy] = s->mb_skipped;
697+
695698 if (s->mv_type == MV_TYPE_8X8)
696699 s->current_picture.mb_type[mb_xy] = MB_TYPE_L0 | MB_TYPE_8x8;
697700 else if(s->mb_intra)
libavcodec/mpeg4videodec.c+4−0
@@ -1594,9 +1594,11 @@ static int mpeg4_decode_partitioned_mb(MpegEncContext *s, int16_t block[6][64]) · 1593 unmodified lines
15941594 && ctx->vol_sprite_usage == GMC_SPRITE) {
15951595 s->mcsel = 1;
15961596 s->mb_skipped = 0;
1597+ s->current_picture.mbskip_table[xy] = 0;
15971598 } else {
15981599 s->mcsel = 0;
15991600 s->mb_skipped = 1;
1601+ s->current_picture.mbskip_table[xy] = 1;
16001602 }
16011603 } else if (s->mb_intra) {
16021604 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
16781680 s->mcsel = 1;
16791681 s->mv[0][0][0] = get_amv(ctx, 0);
16801682 s->mv[0][0][1] = get_amv(ctx, 1);
1683+ s->current_picture.mbskip_table[xy] = 0;
16811684 s->mb_skipped = 0;
16821685 } else {
16831686 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
16861689 s->mcsel = 0;
16871690 s->mv[0][0][0] = 0;
16881691 s->mv[0][0][1] = 0;
1692+ s->current_picture.mbskip_table[xy] = 1;
16891693 s->mb_skipped = 1;
16901694 }
16911695 goto end;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t