From d045df9d51b5162fa29ecd2ccb92588ee5976b5c Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Date: Sat, 15 Mar 2025 04:59:55 +0100 Subject: [PATCH 17/77] avcodec/pthread_slice: Remove MPEG-1 height hack This is no longer necessary given that the MPEG-1 encoder now adapts the size of the last slice to ensure that no slice header has an invalid slice_start_code. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/pthread_slice.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libavcodec/pthread_slice.c b/libavcodec/pthread_slice.c index 8fd3fdafd3..4714fef106 100644 --- a/libavcodec/pthread_slice.c +++ b/libavcodec/pthread_slice.c @@ -115,12 +115,6 @@ av_cold int ff_slice_thread_init(AVCodecContext *avctx) int thread_count = avctx->thread_count; void (*mainfunc)(void *); - // We cannot do this in the encoder init as the threads are created before - if (ff_codec_is_encoder(avctx->codec) && - avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO && - avctx->height > 2800) - thread_count = avctx->thread_count = 1; - if (!thread_count) { int nb_cpus = av_cpu_count(); if (avctx->height) -- 2.45.2