[FFmpeg-devel] [PATCH 07/18] avcodec/hevc_mvs: Pass HEVCLocalContext when slice-threading
    Anton Khirnov 
    anton at khirnov.net
       
    Fri Jul  1 14:14:34 EEST 2022
    
    
  
Quoting Andreas Rheinhardt (2022-07-01 00:29:38)
> 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 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_mvs.c; it also constifies
> everything that is possible in order to ensure that no slice thread
> accidentally modifies the main HEVCContext state.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>  libavcodec/hevc_mvs.c | 56 +++++++++++++++++++++----------------------
>  libavcodec/hevcdec.c  | 27 +++++++++++----------
>  libavcodec/hevcdec.h  |  6 ++---
>  3 files changed, 45 insertions(+), 44 deletions(-)
Looks very reasonable
-- 
Anton Khirnov
    
    
More information about the ffmpeg-devel
mailing list