diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-06-29 19:02:41 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-25 23:31:37 +0200 |
commit | 8c4f95e1e1488bbbaca19bc6c6214393136e1b51 (patch) | |
tree | 704d8dd506528d9731a2ef2355ad014ec2138853 /libavcodec/h264_metadata_bsf.c | |
parent | 136ada2fc372e8fd2dcdc2b3b7256529ebcbe275 (diff) | |
download | ffmpeg-8c4f95e1e1488bbbaca19bc6c6214393136e1b51.tar.gz |
avcodec/hevc_filter: Pass HEVCLocalContext when slice-threading
The HEVC decoder has both HEVCContext and HEVCLocalContext
structures. The latter is supposed to be the structure
containing the per-slicethread state.
Yet that is not how it is handled in practice: Each HEVCLocalContext
has a unique HEVCContext allocated for it and each of these
coincides with the main HEVCContext except in exactly one field:
The corresponding HEVCLocalContext.
This makes it possible to pass the HEVCContext everywhere where
logically a HEVCLocalContext should be used.
This commit stops doing this for lavc/hevc_filter.c; it also constifies
everything that is possible in order to ensure that no slice thread
accidentally modifies the main HEVCContext state.
There are places where this was not possible, namely with the SAOParams
in sao_filter_CTB() or with sao_pixels_buffer_h in copy_CTB_to_hv().
Both of these instances lead to data races, see
https://fate.ffmpeg.org/report.cgi?time=20220629145651&slot=x86_64-archlinux-gcc-tsan-slices
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/h264_metadata_bsf.c')
0 files changed, 0 insertions, 0 deletions