summaryrefslogtreecommitdiff
path: root/libavcodec/mpv_reconstruct_mb_template.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-17 01:43:02 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-10-20 07:32:28 +0200
commiteb1ce6e3c73dbb59c3178d643eacc48bba824922 (patch)
treef4b8c1ffac3b227d5ed3dbdf3b49e3803c56f967 /libavcodec/mpv_reconstruct_mb_template.c
parent7d23b350c200901ee8db91684104f1624eec0c49 (diff)
downloadffmpeg-eb1ce6e3c73dbb59c3178d643eacc48bba824922.tar.gz
avcodec/mpv_reconstruct_mb_template: Optimize dead code away
None of the MPEG-1/2 codecs support frame threading, so one can optimize the check for it away. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpv_reconstruct_mb_template.c')
-rw-r--r--libavcodec/mpv_reconstruct_mb_template.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpv_reconstruct_mb_template.c b/libavcodec/mpv_reconstruct_mb_template.c
index fd03d71985..5023fe58ae 100644
--- a/libavcodec/mpv_reconstruct_mb_template.c
+++ b/libavcodec/mpv_reconstruct_mb_template.c
@@ -121,7 +121,8 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64],
/* decoding or more than one mb_type (MC was already done otherwise) */
#if !IS_ENCODER
- if (HAVE_THREADS && s->avctx->active_thread_type & FF_THREAD_FRAME) {
+ if (HAVE_THREADS && is_mpeg12 != DEFINITELY_MPEG12 &&
+ s->avctx->active_thread_type & FF_THREAD_FRAME) {
if (s->mv_dir & MV_DIR_FORWARD) {
ff_thread_await_progress(&s->last_picture_ptr->tf,
lowest_referenced_row(s, 0), 0);