Lines Matching refs:mids
245 QSVMid *mid = &ctx->mids[i]; in ff_qsv_find_surface_idx()
452 QSVMid *mids; in qsv_create_mids() local
459 mids = av_mallocz_array(nb_surfaces, sizeof(*mids)); in qsv_create_mids()
460 if (!mids) { in qsv_create_mids()
465 mids_buf = av_buffer_create((uint8_t*)mids, nb_surfaces * sizeof(*mids), in qsv_create_mids()
469 av_freep(&mids); in qsv_create_mids()
474 QSVMid *mid = &mids[i]; in qsv_create_mids()
487 QSVMid *mids = (QSVMid*)mids_buf->data; in qsv_setup_mids() local
494 resp->mids = av_mallocz_array(nb_surfaces + 2, sizeof(*resp->mids)); in qsv_setup_mids()
495 if (!resp->mids) in qsv_setup_mids()
499 resp->mids[i] = &mids[i]; in qsv_setup_mids()
502 resp->mids[resp->NumFrameActual] = (mfxMemId)av_buffer_ref(hw_frames_ref); in qsv_setup_mids()
503 if (!resp->mids[resp->NumFrameActual]) { in qsv_setup_mids()
504 av_freep(&resp->mids); in qsv_setup_mids()
508 resp->mids[resp->NumFrameActual + 1] = av_buffer_ref(mids_buf); in qsv_setup_mids()
509 if (!resp->mids[resp->NumFrameActual + 1]) { in qsv_setup_mids()
510 av_buffer_unref((AVBufferRef**)&resp->mids[resp->NumFrameActual]); in qsv_setup_mids()
511 av_freep(&resp->mids); in qsv_setup_mids()
609 av_buffer_unref((AVBufferRef**)&resp->mids[resp->NumFrameActual]); in qsv_frame_free()
610 av_buffer_unref((AVBufferRef**)&resp->mids[resp->NumFrameActual + 1]); in qsv_frame_free()
611 av_freep(&resp->mids); in qsv_frame_free()
800 qsv_frames_ctx->mids = (QSVMid*)qsv_frames_ctx->mids_buf->data; in ff_qsv_init_session_frames()