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/mpegvideo.h | |
parent | 9ca312d8abd0d5d9364346392959f0a6d2061219 (diff) | |
download | ffmpeg-6fe4e8fab47089ff095d994a2a2b986cff0a50d4.tar.gz |
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/mpegvideo.h')
-rw-r--r-- | libavcodec/mpegvideo.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index daaa7c95b4..9d5ca38eb7 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -576,8 +576,6 @@ void ff_mpv_free_context_frame(MpegEncContext *s); void ff_mpv_common_end(MpegEncContext *s); -void ff_mpv_reconstruct_mb(MpegEncContext *s, int16_t block[12][64]); - void ff_clean_intra_table_entries(MpegEncContext *s); int ff_update_duplicate_context(MpegEncContext *dst, const MpegEncContext *src); |