You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/mpegvideo: Don't overallocate buffer
Only encoders need two sets of int16_t [12][64] (one to save the current best state and one for the current working state); decoders need only one. This saves 1.5KiB per slice context for a decoder. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -381,7 +381,7 @@ static int init_duplicate_context(MpegEncContext *s)
|
|||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!FF_ALLOCZ_TYPED_ARRAY(s->blocks, 2))
|
if (!FF_ALLOCZ_TYPED_ARRAY(s->blocks, 1 + s->encoding))
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
s->block = s->blocks[0];
|
s->block = s->blocks[0];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user