diff mbox series

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

Message ID AS8P250MB0744A9269B29F28AAD7394028F429@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series [FFmpeg-devel,01/18] avcodec/vp8: Disable segmentation for VP7 | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 10, 2022, 1:07 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/vp8.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

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);