diff mbox series

[FFmpeg-devel,1/3] lavc/hevcdec: remove a duplicate variable

Message ID 20240910063942.23588-2-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,1/3] lavc/hevcdec: remove a duplicate variable | expand

Checks

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

Commit Message

Anton Khirnov Sept. 10, 2024, 6:39 a.m. UTC
In hls_decode_entry_wpp(), self_id is always identical to thread.
---
 libavcodec/hevc/hevcdec.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index c8c425fd71..993349b678 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -2587,9 +2587,9 @@  static int hls_decode_entry(HEVCContext *s, GetBitContext *gb)
 }
 
 static int hls_decode_entry_wpp(AVCodecContext *avctx, void *hevc_lclist,
-                                int job, int self_id)
+                                int job, int thread)
 {
-    HEVCLocalContext *lc = &((HEVCLocalContext*)hevc_lclist)[self_id];
+    HEVCLocalContext *lc = &((HEVCLocalContext*)hevc_lclist)[thread];
     const HEVCContext *const s = lc->parent;
     const HEVCLayerContext *const l = &s->layers[s->cur_layer];
     const HEVCPPS   *const pps = s->pps;
@@ -2599,7 +2599,6 @@  static int hls_decode_entry_wpp(AVCodecContext *avctx, void *hevc_lclist,
     int ctb_row = job;
     int ctb_addr_rs = s->sh.slice_ctb_addr_rs + ctb_row * ((sps->width + ctb_size - 1) >> sps->log2_ctb_size);
     int ctb_addr_ts = pps->ctb_addr_rs_to_ts[ctb_addr_rs];
-    int thread = ctb_row % avctx->thread_count;
 
     const uint8_t *data      = s->data + s->sh.offset[ctb_row];
     const size_t   data_size = s->sh.size[ctb_row];