[FFmpeg-devel] [PATCH 08/18] avcodec/vp8: Inline num_coeff_partitions for VP7

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sat Sep 10 04:07:19 EEST 2022


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavcodec/vp8.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 5ecb9b07e5..f5c05cd84f 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -2398,7 +2398,7 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void
     int num_jobs = s->num_jobs;
     const VP8Frame *prev_frame = s->prev_frame;
     VP8Frame *curframe = s->curframe;
-    VPXRangeCoder *c  = &s->coeff_partition[mb_y & (s->num_coeff_partitions - 1)];
+    VPXRangeCoder *c  = &s->coeff_partition[is_vp7 ? 0 : mb_y & (s->num_coeff_partitions - 1)];
     VP8Macroblock *mb;
     uint8_t *dst[3] = {
         curframe->tf.f->data[0] + 16 * mb_y * s->linesize,
@@ -2793,7 +2793,7 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame,
                 goto err;
         }
 
-        if (avctx->active_thread_type == FF_THREAD_FRAME)
+        if (is_vp7 || avctx->active_thread_type == FF_THREAD_FRAME)
             num_jobs = 1;
         else
             num_jobs = FFMIN(s->num_coeff_partitions, avctx->thread_count);
-- 
2.34.1



More information about the ffmpeg-devel mailing list