| 40 | #include "threadprogress.h" |
| 41 | |
| 42 | av_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 |
no test coverage detected