<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi, I have a cuda buffer that has been imported from external memory (e.g. GL/D3D textures), I wanted to know if it is possible to use this buffer as a target for AVFrames that are passed to avcodec_receive_frame based on a cuvid based decoder. I've attemped
 to do this in various ways but it seems to be always ignored and the cuvid decoder will internally allocate (or re-use from a pool?) it's own cuda buffer instead of my own created one.<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Basically I would like to use libav to decode a frame directly to user provided (imported/interop'ed) texture that I can then use for rendering. I would like to avoid device -> host -> device transfers or additional device buffers & mem copies.<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I would also like to know if this is possible in geneal with libav's hw-accelerated api, for other other decoders as I would like to support multiple graphics APIs and hw-accel decoders.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</body>
</html>