In hls_decode_entry_wpp(), self_id is always identical to thread.
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -2587,9 +2587,9 @@ static int hls_decode_entry(HEVCContext *s, GetBitContext *gb) · 2586 unmodified lines | ||
| 2587 | 2587 | } |
| 2588 | 2588 | |
| 2589 | 2589 | static int hls_decode_entry_wpp(AVCodecContext *avctx, void *hevc_lclist, |
| 2590 | − int job, int self_id) | |
| 2590 | + int job, int thread) | |
| 2591 | 2591 | { |
| 2592 | − HEVCLocalContext *lc = &((HEVCLocalContext*)hevc_lclist)[self_id]; | |
| 2592 | + HEVCLocalContext *lc = &((HEVCLocalContext*)hevc_lclist)[thread]; | |
| 2593 | 2593 | const HEVCContext *const s = lc->parent; |
| 2594 | 2594 | const HEVCLayerContext *const l = &s->layers[s->cur_layer]; |
| 2595 | 2595 | const HEVCPPS *const pps = s->pps; |
| @@ -2599,7 +2599,6 @@ static int hls_decode_entry_wpp(AVCodecContext *avctx, void *hevc_lclist, · 3 unmodified lines | ||
| 2599 | 2599 | int ctb_row = job; |
| 2600 | 2600 | int ctb_addr_rs = s->sh.slice_ctb_addr_rs + ctb_row * ((sps->width + ctb_size - 1) >> sps->log2_ctb_size); |
| 2601 | 2601 | int ctb_addr_ts = pps->ctb_addr_rs_to_ts[ctb_addr_rs]; |
| 2602 | − int thread = ctb_row % avctx->thread_count; | |
| 2603 | 2602 | |
| 2604 | 2603 | const uint8_t *data = s->data + s->sh.offset[ctb_row]; |
| 2605 | 2604 | const size_t data_size = s->sh.size[ctb_row]; |