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

Function ff_er_init

libavcodec/error_resilience.c:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40#include "threadprogress.h"
41
42av_cold int ff_er_init(ERContext *const s)
43{
44 MECmpContext mecc;
45 unsigned mb_array_size = s->mb_height * s->mb_stride;
46
47 s->error_status_table = av_mallocz(mb_array_size);
48 if (!s->error_status_table)
49 return AVERROR(ENOMEM);
50 s->er_temp_buffer = av_malloc_array(mb_array_size, 4*sizeof(int) + 1);
51 if (!s->er_temp_buffer)
52 return AVERROR(ENOMEM);
53
54 ff_me_cmp_init(&mecc, s->avctx);
55 s->sad = mecc.sad[0];
56
57 return 0;
58}
59
60/**
61 * @param stride the number of MVs to get to the next row

Callers 2

ff_mpeg_er_initFunction · 0.85
ff_h264_alloc_tablesFunction · 0.85

Calls 3

av_malloc_arrayFunction · 0.85
ff_me_cmp_initFunction · 0.85
av_malloczFunction · 0.50

Tested by

no test coverage detected