diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-06-03 00:07:04 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-06-20 18:58:38 +0200 |
commit | f5d5b80f3c58eec38d97ffcc8a4d24cd2eba2de0 (patch) | |
tree | 2faff38c5ee806083412cfda844eccb7a271915f /libavcodec/h261dec.c | |
parent | 07ae09bdf18b117e809224fbddcca6eaf7273c4b (diff) | |
download | ffmpeg-f5d5b80f3c58eec38d97ffcc8a4d24cd2eba2de0.tar.gz |
avcodec/mpegutils: Don't use MB_TYPE_L[01] for mpegvideo
MB_TYPE_L[01] is based upon H.264 terminology (it stands for
list); yet the mpegvideo based decoders don't have lists
of reference frames, they have at most one forward and one
backward reference. So use terminology based upon this.
This also has a second advantage: MB_TYPE_L[01] is actually
an OR of two flags (which are set independently for H.264,
but aren't for mpegvideo). Switching to different flags
makes the flags fit into an int16_t, which will be useful
in future commits.
The only downside to this is a very small amount of code
in error_resilience.c and mpegutils.c (the only code shared
between the H.264 decoder and mpegvideo).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/h261dec.c')
-rw-r--r-- | libavcodec/h261dec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index b62575b7b3..be285ce5e9 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -232,7 +232,7 @@ static int h261_decode_mb_skipped(H261DecContext *h, int mba1, int mba2) s->mv_dir = MV_DIR_FORWARD; s->mv_type = MV_TYPE_16X16; - s->cur_pic.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_L0; + s->cur_pic.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_FORWARD_MV; s->mv[0][0][0] = 0; s->mv[0][0][1] = 0; s->mb_skipped = 1; @@ -460,7 +460,7 @@ static int h261_decode_mb(H261DecContext *h) //set motion vectors s->mv_dir = MV_DIR_FORWARD; s->mv_type = MV_TYPE_16X16; - s->cur_pic.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_L0; + s->cur_pic.mb_type[xy] = MB_TYPE_16x16 | MB_TYPE_FORWARD_MV; s->mv[0][0][0] = h->current_mv_x * 2; // gets divided by 2 in motion compensation s->mv[0][0][1] = h->current_mv_y * 2; |