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

Function vaapi_av1_decode_init

libavcodec/vaapi_av1.c:77–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77static av_cold int vaapi_av1_decode_init(AVCodecContext *avctx)
78{
79 VAAPIAV1DecContext *ctx = avctx->internal->hwaccel_priv_data;
80
81 ctx->tmp_frame = av_frame_alloc();
82 if (!ctx->tmp_frame)
83 return AVERROR(ENOMEM);
84
85 for (int i = 0; i < FF_ARRAY_ELEMS(ctx->ref_tab); i++) {
86 ctx->ref_tab[i].frame = av_frame_alloc();
87 if (!ctx->ref_tab[i].frame)
88 return AVERROR(ENOMEM);
89 ctx->ref_tab[i].valid = 0;
90 }
91
92 return ff_vaapi_decode_init(avctx);
93}
94
95static av_cold int vaapi_av1_decode_uninit(AVCodecContext *avctx)
96{

Callers

nothing calls this directly

Calls 2

av_frame_allocFunction · 0.85
ff_vaapi_decode_initFunction · 0.85

Tested by

no test coverage detected