Lines Matching defs:decoder

45     CUvideodecoder decoder;
61 #define CHECK_CU(x) FF_CUDA_CHECK_DL(logctx, decoder->cudl, x)
102 static int nvdec_test_capabilities(NVDECDecoder *decoder,
112 if (!decoder->cvdl->cuvidGetDecoderCaps) {
124 ret = CHECK_CU(decoder->cvdl->cuvidGetDecoderCaps(&caps));
164 NVDECDecoder *decoder = (NVDECDecoder*)data;
166 if (decoder->decoder) {
167 void *logctx = decoder->hw_device_ref->data;
169 CHECK_CU(decoder->cudl->cuCtxPushCurrent(decoder->cuda_ctx));
170 CHECK_CU(decoder->cvdl->cuvidDestroyDecoder(decoder->decoder));
171 CHECK_CU(decoder->cudl->cuCtxPopCurrent(&dummy));
174 av_buffer_unref(&decoder->real_hw_frames_ref);
175 av_buffer_unref(&decoder->hw_device_ref);
177 cuvid_free_functions(&decoder->cvdl);
179 av_freep(&decoder);
189 NVDECDecoder *decoder;
194 decoder = av_mallocz(sizeof(*decoder));
195 if (!decoder)
198 decoder_ref = av_buffer_create((uint8_t*)decoder, sizeof(*decoder),
201 av_freep(&decoder);
205 decoder->hw_device_ref = av_buffer_ref(hw_device_ref);
206 if (!decoder->hw_device_ref) {
210 decoder->cuda_ctx = device_hwctx->cuda_ctx;
211 decoder->cudl = device_hwctx->internal->cuda_dl;
212 decoder->stream = device_hwctx->stream;
214 ret = cuvid_load_functions(&decoder->cvdl, logctx);
220 ret = CHECK_CU(decoder->cudl->cuCtxPushCurrent(decoder->cuda_ctx));
224 ret = nvdec_test_capabilities(decoder, params, logctx);
226 CHECK_CU(decoder->cudl->cuCtxPopCurrent(&dummy));
230 ret = CHECK_CU(decoder->cvdl->cuvidCreateDecoder(&decoder->decoder, params));
232 CHECK_CU(decoder->cudl->cuCtxPopCurrent(&dummy));
335 NVDECDecoder *decoder;
419 decoder = (NVDECDecoder*)ctx->decoder_ref->data;
420 decoder->real_hw_frames_ref = real_hw_frames_ref;
460 NVDECDecoder *decoder = (NVDECDecoder*)unmap_data->decoder_ref->data;
461 void *logctx = decoder->hw_device_ref->data;
466 ret = CHECK_CU(decoder->cudl->cuCtxPushCurrent(decoder->cuda_ctx));
470 CHECK_CU(decoder->cvdl->cuvidUnmapVideoFrame(decoder->decoder, devptr));
472 CHECK_CU(decoder->cudl->cuCtxPopCurrent(&dummy));
485 NVDECDecoder *decoder = (NVDECDecoder*)cf->decoder_ref->data;
501 vpp.output_stream = decoder->stream;
503 ret = CHECK_CU(decoder->cudl->cuCtxPushCurrent(decoder->cuda_ctx));
507 ret = CHECK_CU(decoder->cvdl->cuvidMapVideoFrame(decoder->decoder,
528 frame->hw_frames_ctx = av_buffer_ref(decoder->real_hw_frames_ref);
549 CHECK_CU(decoder->cvdl->cuvidUnmapVideoFrame(decoder->decoder, devptr));
556 CHECK_CU(decoder->cudl->cuCtxPopCurrent(&dummy));
585 av_log(avctx, AV_LOG_ERROR, "No decoder surfaces left\n");
619 av_log(avctx, AV_LOG_ERROR, "No decoder surfaces left\n");
639 NVDECDecoder *decoder = (NVDECDecoder*)ctx->decoder_ref->data;
652 ret = CHECK_CU(decoder->cudl->cuCtxPushCurrent(decoder->cuda_ctx));
656 ret = CHECK_CU(decoder->cvdl->cuvidDecodePicture(decoder->decoder, &ctx->pic_params));
661 CHECK_CU(decoder->cudl->cuCtxPopCurrent(&dummy));