Lines Matching defs:frame

413 static int amf_copy_surface(AVCodecContext *avctx, const AVFrame *frame,
431 (const uint8_t**)frame->data, frame->linesize, frame->format,
551 static AMFBuffer *amf_create_buffer_with_frame_ref(const AVFrame *frame, AMFContext *context)
559 frame_ref = av_frame_clone(frame);
586 AVFrame *frame = ctx->delayed_frame;
592 if (!frame->buf[0]) {
593 ret = ff_encode_get_frame(avctx, frame);
598 if (!frame->buf[0]) { // submit drain
614 } else if (!ctx->delayed_surface) { // submit frame
617 // prepare surface from frame
618 switch (frame->format) {
623 ID3D11Texture2D *texture = (ID3D11Texture2D*)frame->data[0]; // actual texture
624 int index = (intptr_t)frame->data[1]; // index is a slice in texture array is - set to tell AMF which slice to use
626 av_assert0(frame->hw_frames_ctx && ctx->hw_frames_ctx &&
627 frame->hw_frames_ctx->data == ctx->hw_frames_ctx->data);
641 IDirect3DSurface9 *texture = (IDirect3DSurface9 *)frame->data[3]; // actual texture
654 amf_copy_surface(avctx, frame, surface);
663 surface->pVtbl->SetCrop(surface, 0, 0, frame->width, frame->height);
665 frame_ref_storage_buffer = amf_create_buffer_with_frame_ref(frame, ctx->context);
674 surface->pVtbl->SetPts(surface, frame->pts);
675 AMF_ASSIGN_PROPERTY_INT64(res, surface, PTS_PROP, frame->pts);
694 int64_t pts = frame->pts;
698 av_frame_unref(frame);
731 if (ctx->delayed_surface != NULL) { // try to resubmit frame
744 av_log(avctx, AV_LOG_WARNING, "Data acquired but delayed frame submission got AMF_INPUT_FULL- should not happen\n");