diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-14 05:39:59 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-20 07:29:03 +0200 |
commit | 6fe4e8fab47089ff095d994a2a2b986cff0a50d4 (patch) | |
tree | 22d3f1365f31df626cc234049e4c1c77505373b4 /libavcodec/mpeg_er.c | |
parent | 9ca312d8abd0d5d9364346392959f0a6d2061219 (diff) |
avcodec/mpegvideo: Split ff_mpv_reconstruct_mb() into de/encoder part
This has the advantage of not having to check for whether
a given MpegEncContext is actually a decoder or an encoder
context at runtime.
To do so, mpv_reconstruct_mb_internal() is moved into a new
template file that is included by both mpegvideo_enc.c
and mpegvideo_dec.c; the decoder-only code (mainly lowres)
are also moved to mpegvideo_dec.c. The is_encoder checks are
changed to #if IS_ENCODER in order to avoid having to include
headers for decoder-only functions in mpegvideo_enc.c.
This approach also has the advantage that it is easy to adapt
mpv_reconstruct_mb_internal() to using different structures
for decoders and encoders (e.g. the check for whether
a macroblock should be processed for the encoder or not
uses MpegEncContext elements that make no sense for decoders
and should not be part of their context).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpeg_er.c')
-rw-r--r-- | libavcodec/mpeg_er.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/mpeg_er.c b/libavcodec/mpeg_er.c index 02f407d8ea..8034963253 100644 --- a/libavcodec/mpeg_er.c +++ b/libavcodec/mpeg_er.c @@ -18,6 +18,7 @@ #include "error_resilience.h" #include "mpegvideo.h" +#include "mpegvideodec.h" #include "mpeg_er.h" static void set_erpic(ERPicture *dst, Picture *src) |