Lines Matching defs:frame
753 static void *get_surface(const AVCodecContext *avctx, const AVFrame *frame)
756 if (frame->format == AV_PIX_FMT_D3D11) {
758 intptr_t index = (intptr_t)frame->data[1];
760 sctx->d3d11_texture != (ID3D11Texture2D *)frame->data[0]) {
761 av_log((void *)avctx, AV_LOG_ERROR, "get_buffer frame is invalid!\n");
767 return frame->data[3];
772 const AVFrame *frame)
774 void *surface = get_surface(avctx, frame);
779 return (intptr_t)frame->data[1];
870 static int frame_add_buf(AVFrame *frame, AVBufferRef *ref)
875 if (!frame->buf[i]) {
876 frame->buf[i] = av_buffer_ref(ref);
877 return frame->buf[i] ? 0 : AVERROR(ENOMEM);
886 int ff_dxva2_common_end_frame(AVCodecContext *avctx, AVFrame *frame,
908 result = frame_add_buf(frame, sctx->decoder_ref);
918 get_surface(avctx, frame),
924 get_surface(avctx, frame),
934 av_log(avctx, AV_LOG_ERROR, "Failed to begin frame: 0x%x\n", (unsigned)hr);
1044 av_log(avctx, AV_LOG_ERROR, "Failed to end frame: 0x%x\n", (unsigned)hr);