Lines Matching refs:surfaces
903 // default minimum of 4 surfaces
916 "Defined rc_lookahead requires more surfaces, "
917 "increasing used surfaces %d -> %d\n", ctx->nb_surfaces, nb_surfaces);
924 "Defined b-frame requires more surfaces, "
925 "increasing used surfaces %d -> %d\n", ctx->nb_surfaces, nb_surfaces);
1537 NvencSurface* tmp_surface = &ctx->surfaces[idx];
1544 ctx->surfaces[idx].in_ref = av_frame_alloc();
1545 if (!ctx->surfaces[idx].in_ref)
1550 ctx->surfaces[idx].format = nvenc_map_buffer_format(ctx->data_pix_fmt);
1551 if (ctx->surfaces[idx].format == NV_ENC_BUFFER_FORMAT_UNDEFINED) {
1560 allocSurf.bufferFmt = ctx->surfaces[idx].format;
1567 ctx->surfaces[idx].input_surface = allocSurf.inputBuffer;
1568 ctx->surfaces[idx].width = allocSurf.width;
1569 ctx->surfaces[idx].height = allocSurf.height;
1576 p_nvenc->nvEncDestroyInputBuffer(ctx->nvencoder, ctx->surfaces[idx].input_surface);
1577 av_frame_free(&ctx->surfaces[idx].in_ref);
1581 ctx->surfaces[idx].output_surface = allocOut.bitstreamBuffer;
1593 ctx->surfaces = av_calloc(ctx->nb_surfaces, sizeof(*ctx->surfaces));
1594 if (!ctx->surfaces)
1686 if (ctx->surfaces && (avctx->pix_fmt == AV_PIX_FMT_CUDA || avctx->pix_fmt == AV_PIX_FMT_D3D11)) {
1696 if (ctx->surfaces) {
1699 p_nvenc->nvEncDestroyInputBuffer(ctx->nvencoder, ctx->surfaces[i].input_surface);
1700 av_frame_free(&ctx->surfaces[i].in_ref);
1701 p_nvenc->nvEncDestroyBitstreamBuffer(ctx->nvencoder, ctx->surfaces[i].output_surface);
1704 av_freep(&ctx->surfaces);