You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/mpeg12dec: Add Mpeg12SliceContext
This is in preparation for removing the GetBitContext from MPVContext. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -128,7 +128,7 @@ static av_cold int init_duplicate_context(MpegEncContext *s)
|
|||||||
av_cold int ff_mpv_init_duplicate_contexts(MpegEncContext *s)
|
av_cold int ff_mpv_init_duplicate_contexts(MpegEncContext *s)
|
||||||
{
|
{
|
||||||
int nb_slices = s->slice_context_count, ret;
|
int nb_slices = s->slice_context_count, ret;
|
||||||
size_t slice_size = s->slice_ctx_size ? s->slice_ctx_size : sizeof(*s);
|
const size_t slice_size = s->slice_ctx_size;
|
||||||
|
|
||||||
/* We initialize the copies before the original so that
|
/* We initialize the copies before the original so that
|
||||||
* fields allocated in init_duplicate_context are NULL after
|
* fields allocated in init_duplicate_context are NULL after
|
||||||
|
@@ -116,6 +116,7 @@ typedef struct MpegEncContext {
|
|||||||
int end_mb_y; ///< end mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y)
|
int end_mb_y; ///< end mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y)
|
||||||
union {
|
union {
|
||||||
struct MpegEncContext *thread_context[MAX_THREADS];
|
struct MpegEncContext *thread_context[MAX_THREADS];
|
||||||
|
struct Mpeg12SliceContext *mpeg12_contexts[MAX_THREADS];
|
||||||
struct MPVEncContext *enc_contexts[MAX_THREADS];
|
struct MPVEncContext *enc_contexts[MAX_THREADS];
|
||||||
};
|
};
|
||||||
int slice_context_count; ///< number of used thread_contexts
|
int slice_context_count; ///< number of used thread_contexts
|
||||||
|
Reference in New Issue
Block a user