You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/mpegvideo: Check h263_aic, not h263_plus for allocating dc_val
This means that these buffers won't be allocated any more for H.263+ with AIC disabled. Also remove setting h263_plus for the RV20 encoder, as it has only been done to force allocating dc_val. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -335,9 +335,11 @@ av_cold int ff_mpv_init_context_frame(MpegEncContext *s)
|
||||
s->coded_block = s->coded_block_base + s->b8_stride + 1;
|
||||
}
|
||||
|
||||
if (s->h263_pred || s->h263_plus || !s->encoding) {
|
||||
if (s->h263_pred || s->h263_aic || !s->encoding) {
|
||||
/* dc values */
|
||||
// MN: we need these for error resilience of intra-frames
|
||||
// Allocating them unconditionally for decoders also means
|
||||
// that we don't need to reinitialize when e.g. h263_aic changes.
|
||||
if (!FF_ALLOCZ_TYPED_ARRAY(s->dc_val_base, yc_size))
|
||||
return AVERROR(ENOMEM);
|
||||
s->dc_val[0] = s->dc_val_base + s->b8_stride + 1;
|
||||
|
@ -944,8 +944,9 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
|
||||
avctx->delay = 0;
|
||||
s->c.low_delay = 1;
|
||||
s->c.modified_quant = 1;
|
||||
// Set here to force allocation of dc_val;
|
||||
// will be set later on a per-frame basis.
|
||||
s->c.h263_aic = 1;
|
||||
s->c.h263_plus = 1;
|
||||
s->c.loop_filter = 1;
|
||||
s->c.unrestricted_mv = 0;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user