summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-24 00:23:00 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-04 16:28:55 +0100
commitd83479bec1683f886d45906d155ab84bc4aebeda (patch)
tree11210c4eaa893b085d1e1b90a2e5c9b7b09c23f4 /libavcodec/mpegvideo.h
parentee41c60373fcb8b1d49929367e564020361838da (diff)
avcodec/mpegvideo: Move decoding-only code into a new file
This will allow to disable this code altogether when all decoders are disabled. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpegvideo.h')
-rw-r--r--libavcodec/mpegvideo.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index fabcce2436..1c14f5b0f0 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -679,10 +679,32 @@ void ff_mpv_common_init_neon(MpegEncContext *s);
void ff_mpv_common_init_ppc(MpegEncContext *s);
void ff_mpv_common_init_x86(MpegEncContext *s);
void ff_mpv_common_init_mips(MpegEncContext *s);
+/**
+ * Initialize an MpegEncContext's thread contexts. Presumes that
+ * slice_context_count is already set and that all the fields
+ * that are freed/reset in free_duplicate_context() are NULL.
+ */
+int ff_mpv_init_duplicate_contexts(MpegEncContext *s);
+/**
+ * Initialize and allocates MpegEncContext fields dependent on the resolution.
+ */
+int ff_mpv_init_context_frame(MpegEncContext *s);
+/**
+ * Frees and resets MpegEncContext fields depending on the resolution
+ * as well as the slice thread contexts.
+ * Is used during resolution changes to avoid a full reinitialization of the
+ * codec.
+ */
+void ff_mpv_free_context_frame(MpegEncContext *s);
int ff_mpv_common_frame_size_change(MpegEncContext *s);
void ff_mpv_common_end(MpegEncContext *s);
+/**
+ * Initialize the given MpegEncContext for decoding.
+ * the changed fields will not depend upon
+ * the prior state of the MpegEncContext.
+ */
void ff_mpv_decode_init(MpegEncContext *s, AVCodecContext *avctx);
void ff_mpv_reconstruct_mb(MpegEncContext *s, int16_t block[12][64]);
void ff_mpv_report_decode_progress(MpegEncContext *s);