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

Function vaapi_encode_make_tile_slice

libavcodec/vaapi_encode.c:241–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241static int vaapi_encode_make_tile_slice(AVCodecContext *avctx,
242 VAAPIEncodePicture *pic)
243{
244 VAAPIEncodeContext *ctx = avctx->priv_data;
245 VAAPIEncodeSlice *slice;
246 int i, j, index;
247
248 for (i = 0; i < ctx->tile_cols; i++) {
249 for (j = 0; j < ctx->tile_rows; j++) {
250 index = j * ctx->tile_cols + i;
251 slice = &pic->slices[index];
252 slice->index = index;
253
254 pic->slices[index].block_start = ctx->col_bd[i] +
255 ctx->row_bd[j] * ctx->slice_block_cols;
256 pic->slices[index].block_size = ctx->row_height[j] * ctx->col_width[i];
257
258 av_log(avctx, AV_LOG_DEBUG, "Slice %2d: (%2d, %2d) start at: %4d "
259 "width:%2d height:%2d (%d blocks).\n", index, ctx->col_bd[i],
260 ctx->row_bd[j], slice->block_start, ctx->col_width[i],
261 ctx->row_height[j], slice->block_size);
262 }
263 }
264
265 return 0;
266}
267
268static int vaapi_encode_issue(AVCodecContext *avctx,
269 FFHWBaseEncodePicture *base_pic)

Callers 1

vaapi_encode_issueFunction · 0.85

Calls 1

av_logFunction · 0.85

Tested by

no test coverage detected