MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / wpp_progress_init

Function wpp_progress_init

libavcodec/hevc/hevcdec.c:2900–2924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2898}
2899
2900static int wpp_progress_init(HEVCContext *s, unsigned count)
2901{
2902 if (s->nb_wpp_progress < count) {
2903 void *tmp = av_realloc_array(s->wpp_progress, count,
2904 sizeof(*s->wpp_progress));
2905 if (!tmp)
2906 return AVERROR(ENOMEM);
2907
2908 s->wpp_progress = tmp;
2909 memset(s->wpp_progress + s->nb_wpp_progress, 0,
2910 (count - s->nb_wpp_progress) * sizeof(*s->wpp_progress));
2911
2912 for (int i = s->nb_wpp_progress; i < count; i++) {
2913 int ret = ff_thread_progress_init(&s->wpp_progress[i], 1);
2914 if (ret < 0)
2915 return ret;
2916 s->nb_wpp_progress = i + 1;
2917 }
2918 }
2919
2920 for (int i = 0; i < count; i++)
2921 ff_thread_progress_reset(&s->wpp_progress[i]);
2922
2923 return 0;
2924}
2925
2926static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal)
2927{

Callers 1

hls_slice_data_wppFunction · 0.85

Calls 3

av_realloc_arrayFunction · 0.85
ff_thread_progress_initFunction · 0.85
ff_thread_progress_resetFunction · 0.85

Tested by

no test coverage detected