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

Function vaapi_encode_av1_write_obu

libavcodec/vaapi_encode_av1.c:184–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184static int vaapi_encode_av1_write_obu(AVCodecContext *avctx,
185 char *data, size_t *data_len,
186 CodedBitstreamFragment *bs)
187{
188 VAAPIEncodeAV1Context *priv = avctx->priv_data;
189 int ret;
190
191 ret = ff_cbs_write_fragment_data(priv->cbc, bs);
192 if (ret < 0) {
193 av_log(avctx, AV_LOG_ERROR, "Failed to write packed header.\n");
194 return ret;
195 }
196
197 if ((size_t)8 * MAX_PARAM_BUFFER_SIZE < 8 * bs->data_size - bs->data_bit_padding) {
198 av_log(avctx, AV_LOG_ERROR, "Access unit too large: "
199 "%zu < %zu.\n", (size_t)8 * MAX_PARAM_BUFFER_SIZE,
200 8 * bs->data_size - bs->data_bit_padding);
201 return AVERROR(ENOSPC);
202 }
203
204 memcpy(data, bs->data, bs->data_size);
205 *data_len = 8 * bs->data_size - bs->data_bit_padding;
206
207 return 0;
208}
209
210static int tile_log2(int blkSize, int target) {
211 int k;

Calls 1

av_logFunction · 0.85

Tested by

no test coverage detected