LCOV - code coverage report
Current view: top level - src/libavutil - hwcontext_vdpau.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 188 0.0 %
Date: 2017-01-21 09:32:20 Functions: 0 13 0.0 %

          Line data    Source code
       1             : /*
       2             :  * This file is part of FFmpeg.
       3             :  *
       4             :  * FFmpeg is free software; you can redistribute it and/or
       5             :  * modify it under the terms of the GNU Lesser General Public
       6             :  * License as published by the Free Software Foundation; either
       7             :  * version 2.1 of the License, or (at your option) any later version.
       8             :  *
       9             :  * FFmpeg is distributed in the hope that it will be useful,
      10             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      11             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      12             :  * Lesser General Public License for more details.
      13             :  *
      14             :  * You should have received a copy of the GNU Lesser General Public
      15             :  * License along with FFmpeg; if not, write to the Free Software
      16             :  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
      17             :  */
      18             : 
      19             : #include "config.h"
      20             : 
      21             : #include <stdint.h>
      22             : #include <string.h>
      23             : 
      24             : #include <vdpau/vdpau.h>
      25             : 
      26             : #include "buffer.h"
      27             : #include "common.h"
      28             : #include "hwcontext.h"
      29             : #include "hwcontext_internal.h"
      30             : #include "hwcontext_vdpau.h"
      31             : #include "mem.h"
      32             : #include "pixfmt.h"
      33             : #include "pixdesc.h"
      34             : 
      35             : typedef struct VDPAUDeviceContext {
      36             :     VdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities *get_transfer_caps;
      37             :     VdpVideoSurfaceGetBitsYCbCr                     *get_data;
      38             :     VdpVideoSurfacePutBitsYCbCr                     *put_data;
      39             :     VdpVideoSurfaceCreate                           *surf_create;
      40             :     VdpVideoSurfaceDestroy                          *surf_destroy;
      41             : 
      42             :     enum AVPixelFormat *pix_fmts[3];
      43             :     int              nb_pix_fmts[3];
      44             : } VDPAUDeviceContext;
      45             : 
      46             : typedef struct VDPAUFramesContext {
      47             :     VdpVideoSurfaceGetBitsYCbCr *get_data;
      48             :     VdpVideoSurfacePutBitsYCbCr *put_data;
      49             :     VdpChromaType chroma_type;
      50             :     int chroma_idx;
      51             : 
      52             :     const enum AVPixelFormat *pix_fmts;
      53             :     int                       nb_pix_fmts;
      54             : } VDPAUFramesContext;
      55             : 
      56             : typedef struct VDPAUPixFmtMap {
      57             :     VdpYCbCrFormat vdpau_fmt;
      58             :     enum AVPixelFormat pix_fmt;
      59             : } VDPAUPixFmtMap;
      60             : 
      61             : static const VDPAUPixFmtMap pix_fmts_420[] = {
      62             :     { VDP_YCBCR_FORMAT_NV12, AV_PIX_FMT_NV12    },
      63             :     { VDP_YCBCR_FORMAT_YV12, AV_PIX_FMT_YUV420P },
      64             :     { 0,                     AV_PIX_FMT_NONE,   },
      65             : };
      66             : 
      67             : static const VDPAUPixFmtMap pix_fmts_422[] = {
      68             :     { VDP_YCBCR_FORMAT_NV12, AV_PIX_FMT_NV16    },
      69             :     { VDP_YCBCR_FORMAT_YV12, AV_PIX_FMT_YUV422P },
      70             :     { VDP_YCBCR_FORMAT_UYVY, AV_PIX_FMT_UYVY422 },
      71             :     { VDP_YCBCR_FORMAT_YUYV, AV_PIX_FMT_YUYV422 },
      72             :     { 0,                     AV_PIX_FMT_NONE,   },
      73             : };
      74             : 
      75             : static const VDPAUPixFmtMap pix_fmts_444[] = {
      76             :     { VDP_YCBCR_FORMAT_YV12, AV_PIX_FMT_YUV444P },
      77             :     { 0,                     AV_PIX_FMT_NONE,   },
      78             : };
      79             : 
      80             : static const struct {
      81             :     VdpChromaType chroma_type;
      82             :     const VDPAUPixFmtMap *map;
      83             : } vdpau_pix_fmts[] = {
      84             :     { VDP_CHROMA_TYPE_420, pix_fmts_420 },
      85             :     { VDP_CHROMA_TYPE_422, pix_fmts_422 },
      86             :     { VDP_CHROMA_TYPE_444, pix_fmts_444 },
      87             : };
      88             : 
      89           0 : static int count_pixfmts(const VDPAUPixFmtMap *map)
      90             : {
      91           0 :     int count = 0;
      92           0 :     while (map->pix_fmt != AV_PIX_FMT_NONE) {
      93           0 :         map++;
      94           0 :         count++;
      95             :     }
      96           0 :     return count;
      97             : }
      98             : 
      99           0 : static int vdpau_init_pixmfts(AVHWDeviceContext *ctx)
     100             : {
     101           0 :     AVVDPAUDeviceContext *hwctx = ctx->hwctx;
     102           0 :     VDPAUDeviceContext    *priv = ctx->internal->priv;
     103             :     int i;
     104             : 
     105           0 :     for (i = 0; i < FF_ARRAY_ELEMS(priv->pix_fmts); i++) {
     106           0 :         const VDPAUPixFmtMap *map = vdpau_pix_fmts[i].map;
     107             :         int nb_pix_fmts;
     108             : 
     109           0 :         nb_pix_fmts = count_pixfmts(map);
     110           0 :         priv->pix_fmts[i] = av_malloc_array(nb_pix_fmts + 1, sizeof(*priv->pix_fmts[i]));
     111           0 :         if (!priv->pix_fmts[i])
     112           0 :             return AVERROR(ENOMEM);
     113             : 
     114           0 :         nb_pix_fmts = 0;
     115           0 :         while (map->pix_fmt != AV_PIX_FMT_NONE) {
     116             :             VdpBool supported;
     117           0 :             VdpStatus err = priv->get_transfer_caps(hwctx->device, vdpau_pix_fmts[i].chroma_type,
     118             :                                                     map->vdpau_fmt, &supported);
     119           0 :             if (err == VDP_STATUS_OK && supported)
     120           0 :                 priv->pix_fmts[i][nb_pix_fmts++] = map->pix_fmt;
     121           0 :             map++;
     122             :         }
     123           0 :         priv->pix_fmts[i][nb_pix_fmts++] = AV_PIX_FMT_NONE;
     124           0 :         priv->nb_pix_fmts[i]             = nb_pix_fmts;
     125             :     }
     126             : 
     127           0 :     return 0;
     128             : }
     129             : 
     130           0 : static int vdpau_device_init(AVHWDeviceContext *ctx)
     131             : {
     132           0 :     AVVDPAUDeviceContext *hwctx = ctx->hwctx;
     133           0 :     VDPAUDeviceContext   *priv  = ctx->internal->priv;
     134             :     VdpStatus             err;
     135             :     int                   ret;
     136             : 
     137             : #define GET_CALLBACK(id, result)                                                \
     138             : do {                                                                            \
     139             :     void *tmp;                                                                  \
     140             :     err = hwctx->get_proc_address(hwctx->device, id, &tmp);                     \
     141             :     if (err != VDP_STATUS_OK) {                                                 \
     142             :         av_log(ctx, AV_LOG_ERROR, "Error getting the " #id " callback.\n");     \
     143             :         return AVERROR_UNKNOWN;                                                 \
     144             :     }                                                                           \
     145             :     priv->result = tmp;                                                         \
     146             : } while (0)
     147             : 
     148           0 :     GET_CALLBACK(VDP_FUNC_ID_VIDEO_SURFACE_QUERY_GET_PUT_BITS_Y_CB_CR_CAPABILITIES,
     149             :                  get_transfer_caps);
     150           0 :     GET_CALLBACK(VDP_FUNC_ID_VIDEO_SURFACE_GET_BITS_Y_CB_CR, get_data);
     151           0 :     GET_CALLBACK(VDP_FUNC_ID_VIDEO_SURFACE_PUT_BITS_Y_CB_CR, put_data);
     152           0 :     GET_CALLBACK(VDP_FUNC_ID_VIDEO_SURFACE_CREATE,           surf_create);
     153           0 :     GET_CALLBACK(VDP_FUNC_ID_VIDEO_SURFACE_DESTROY,          surf_destroy);
     154             : 
     155           0 :     ret = vdpau_init_pixmfts(ctx);
     156           0 :     if (ret < 0) {
     157           0 :         av_log(ctx, AV_LOG_ERROR, "Error querying the supported pixel formats\n");
     158           0 :         return ret;
     159             :     }
     160             : 
     161           0 :     return 0;
     162             : }
     163             : #undef GET_CALLBACK
     164             : 
     165           0 : static void vdpau_device_uninit(AVHWDeviceContext *ctx)
     166             : {
     167           0 :     VDPAUDeviceContext *priv = ctx->internal->priv;
     168             :     int i;
     169             : 
     170           0 :     for (i = 0; i < FF_ARRAY_ELEMS(priv->pix_fmts); i++)
     171           0 :         av_freep(&priv->pix_fmts[i]);
     172           0 : }
     173             : 
     174           0 : static void vdpau_buffer_free(void *opaque, uint8_t *data)
     175             : {
     176           0 :     AVHWFramesContext          *ctx = opaque;
     177           0 :     VDPAUDeviceContext *device_priv = ctx->device_ctx->internal->priv;
     178           0 :     VdpVideoSurface            surf = (VdpVideoSurface)(uintptr_t)data;
     179             : 
     180           0 :     device_priv->surf_destroy(surf);
     181           0 : }
     182             : 
     183           0 : static AVBufferRef *vdpau_pool_alloc(void *opaque, int size)
     184             : {
     185           0 :     AVHWFramesContext             *ctx = opaque;
     186           0 :     VDPAUFramesContext           *priv = ctx->internal->priv;
     187           0 :     AVVDPAUDeviceContext *device_hwctx = ctx->device_ctx->hwctx;
     188           0 :     VDPAUDeviceContext    *device_priv = ctx->device_ctx->internal->priv;
     189             : 
     190             :     AVBufferRef *ret;
     191             :     VdpVideoSurface surf;
     192             :     VdpStatus err;
     193             : 
     194           0 :     err = device_priv->surf_create(device_hwctx->device, priv->chroma_type,
     195           0 :                                    ctx->width, ctx->height, &surf);
     196           0 :     if (err != VDP_STATUS_OK) {
     197           0 :         av_log(ctx, AV_LOG_ERROR, "Error allocating a VDPAU video surface\n");
     198           0 :         return NULL;
     199             :     }
     200             : 
     201           0 :     ret = av_buffer_create((uint8_t*)(uintptr_t)surf, sizeof(surf),
     202             :                            vdpau_buffer_free, ctx, AV_BUFFER_FLAG_READONLY);
     203           0 :     if (!ret) {
     204           0 :         device_priv->surf_destroy(surf);
     205           0 :         return NULL;
     206             :     }
     207             : 
     208           0 :     return ret;
     209             : }
     210             : 
     211           0 : static int vdpau_frames_init(AVHWFramesContext *ctx)
     212             : {
     213           0 :     VDPAUDeviceContext *device_priv = ctx->device_ctx->internal->priv;
     214           0 :     VDPAUFramesContext        *priv = ctx->internal->priv;
     215             : 
     216             :     int i;
     217             : 
     218           0 :     switch (ctx->sw_format) {
     219           0 :     case AV_PIX_FMT_YUV420P: priv->chroma_type = VDP_CHROMA_TYPE_420; break;
     220           0 :     case AV_PIX_FMT_YUV422P: priv->chroma_type = VDP_CHROMA_TYPE_422; break;
     221           0 :     case AV_PIX_FMT_YUV444P: priv->chroma_type = VDP_CHROMA_TYPE_444; break;
     222             :     default:
     223           0 :         av_log(ctx, AV_LOG_ERROR, "Unsupported data layout: %s\n",
     224             :                av_get_pix_fmt_name(ctx->sw_format));
     225           0 :         return AVERROR(ENOSYS);
     226             :     }
     227             : 
     228           0 :     for (i = 0; i < FF_ARRAY_ELEMS(vdpau_pix_fmts); i++) {
     229           0 :         if (vdpau_pix_fmts[i].chroma_type == priv->chroma_type) {
     230           0 :             priv->chroma_idx  = i;
     231           0 :             priv->pix_fmts    = device_priv->pix_fmts[i];
     232           0 :             priv->nb_pix_fmts = device_priv->nb_pix_fmts[i];
     233           0 :             break;
     234             :         }
     235             :     }
     236           0 :     if (!priv->pix_fmts) {
     237           0 :         av_log(ctx, AV_LOG_ERROR, "Unsupported chroma type: %d\n", priv->chroma_type);
     238           0 :         return AVERROR(ENOSYS);
     239             :     }
     240             : 
     241           0 :     if (!ctx->pool) {
     242           0 :         ctx->internal->pool_internal = av_buffer_pool_init2(sizeof(VdpVideoSurface), ctx,
     243             :                                                             vdpau_pool_alloc, NULL);
     244           0 :         if (!ctx->internal->pool_internal)
     245           0 :             return AVERROR(ENOMEM);
     246             :     }
     247             : 
     248           0 :     priv->get_data = device_priv->get_data;
     249           0 :     priv->put_data = device_priv->put_data;
     250             : 
     251           0 :     return 0;
     252             : }
     253             : 
     254           0 : static int vdpau_get_buffer(AVHWFramesContext *ctx, AVFrame *frame)
     255             : {
     256           0 :     frame->buf[0] = av_buffer_pool_get(ctx->pool);
     257           0 :     if (!frame->buf[0])
     258           0 :         return AVERROR(ENOMEM);
     259             : 
     260           0 :     frame->data[3] = frame->buf[0]->data;
     261           0 :     frame->format  = AV_PIX_FMT_VDPAU;
     262           0 :     frame->width   = ctx->width;
     263           0 :     frame->height  = ctx->height;
     264             : 
     265           0 :     return 0;
     266             : }
     267             : 
     268           0 : static int vdpau_transfer_get_formats(AVHWFramesContext *ctx,
     269             :                                       enum AVHWFrameTransferDirection dir,
     270             :                                       enum AVPixelFormat **formats)
     271             : {
     272           0 :     VDPAUFramesContext *priv  = ctx->internal->priv;
     273             : 
     274             :     enum AVPixelFormat *fmts;
     275             : 
     276           0 :     if (priv->nb_pix_fmts == 1) {
     277           0 :         av_log(ctx, AV_LOG_ERROR,
     278             :                "No target formats are supported for this chroma type\n");
     279           0 :         return AVERROR(ENOSYS);
     280             :     }
     281             : 
     282           0 :     fmts = av_malloc_array(priv->nb_pix_fmts, sizeof(*fmts));
     283           0 :     if (!fmts)
     284           0 :         return AVERROR(ENOMEM);
     285             : 
     286           0 :     memcpy(fmts, priv->pix_fmts, sizeof(*fmts) * (priv->nb_pix_fmts));
     287           0 :     *formats = fmts;
     288             : 
     289           0 :     return 0;
     290             : }
     291             : 
     292           0 : static int vdpau_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst,
     293             :                                     const AVFrame *src)
     294             : {
     295           0 :     VDPAUFramesContext *priv = ctx->internal->priv;
     296           0 :     VdpVideoSurface     surf = (VdpVideoSurface)(uintptr_t)src->data[3];
     297             : 
     298             :     void *data[3];
     299             :     uint32_t linesize[3];
     300             : 
     301             :     const VDPAUPixFmtMap *map;
     302             :     VdpYCbCrFormat vdpau_format;
     303             :     VdpStatus err;
     304             :     int i;
     305             : 
     306           0 :     for (i = 0; i< FF_ARRAY_ELEMS(data) && dst->data[i]; i++) {
     307           0 :         data[i] = dst->data[i];
     308           0 :         if (dst->linesize[i] < 0 || dst->linesize[i] > UINT32_MAX) {
     309           0 :             av_log(ctx, AV_LOG_ERROR,
     310             :                    "The linesize %d cannot be represented as uint32\n",
     311             :                    dst->linesize[i]);
     312           0 :             return AVERROR(ERANGE);
     313             :         }
     314           0 :         linesize[i] = dst->linesize[i];
     315             :     }
     316             : 
     317           0 :     map = vdpau_pix_fmts[priv->chroma_idx].map;
     318           0 :     for (i = 0; map[i].pix_fmt != AV_PIX_FMT_NONE; i++) {
     319           0 :         if (map[i].pix_fmt == dst->format) {
     320           0 :             vdpau_format = map[i].vdpau_fmt;
     321           0 :             break;
     322             :         }
     323             :     }
     324           0 :     if (map[i].pix_fmt == AV_PIX_FMT_NONE) {
     325           0 :         av_log(ctx, AV_LOG_ERROR,
     326             :                "Unsupported target pixel format: %s\n",
     327           0 :                av_get_pix_fmt_name(dst->format));
     328           0 :         return AVERROR(EINVAL);
     329             :     }
     330             : 
     331           0 :     if (vdpau_format == VDP_YCBCR_FORMAT_YV12)
     332           0 :         FFSWAP(void*, data[1], data[2]);
     333             : 
     334           0 :     err = priv->get_data(surf, vdpau_format, data, linesize);
     335           0 :     if (err != VDP_STATUS_OK) {
     336           0 :         av_log(ctx, AV_LOG_ERROR, "Error retrieving the data from a VDPAU surface\n");
     337           0 :         return AVERROR_UNKNOWN;
     338             :     }
     339             : 
     340           0 :     return 0;
     341             : }
     342             : 
     343           0 : static int vdpau_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst,
     344             :                                   const AVFrame *src)
     345             : {
     346           0 :     VDPAUFramesContext *priv = ctx->internal->priv;
     347           0 :     VdpVideoSurface     surf = (VdpVideoSurface)(uintptr_t)dst->data[3];
     348             : 
     349             :     const void *data[3];
     350             :     uint32_t linesize[3];
     351             : 
     352             :     const VDPAUPixFmtMap *map;
     353             :     VdpYCbCrFormat vdpau_format;
     354             :     VdpStatus err;
     355             :     int i;
     356             : 
     357           0 :     for (i = 0; i< FF_ARRAY_ELEMS(data) && src->data[i]; i++) {
     358           0 :         data[i] = src->data[i];
     359           0 :         if (src->linesize[i] < 0 || src->linesize[i] > UINT32_MAX) {
     360           0 :             av_log(ctx, AV_LOG_ERROR,
     361             :                    "The linesize %d cannot be represented as uint32\n",
     362             :                    src->linesize[i]);
     363           0 :             return AVERROR(ERANGE);
     364             :         }
     365           0 :         linesize[i] = src->linesize[i];
     366             :     }
     367             : 
     368           0 :     map = vdpau_pix_fmts[priv->chroma_idx].map;
     369           0 :     for (i = 0; map[i].pix_fmt != AV_PIX_FMT_NONE; i++) {
     370           0 :         if (map[i].pix_fmt == src->format) {
     371           0 :             vdpau_format = map[i].vdpau_fmt;
     372           0 :             break;
     373             :         }
     374             :     }
     375           0 :     if (map[i].pix_fmt == AV_PIX_FMT_NONE) {
     376           0 :         av_log(ctx, AV_LOG_ERROR,
     377             :                "Unsupported source pixel format: %s\n",
     378           0 :                av_get_pix_fmt_name(src->format));
     379           0 :         return AVERROR(EINVAL);
     380             :     }
     381             : 
     382           0 :     if (vdpau_format == VDP_YCBCR_FORMAT_YV12)
     383           0 :         FFSWAP(const void*, data[1], data[2]);
     384             : 
     385           0 :     err = priv->put_data(surf, vdpau_format, data, linesize);
     386           0 :     if (err != VDP_STATUS_OK) {
     387           0 :         av_log(ctx, AV_LOG_ERROR, "Error uploading the data to a VDPAU surface\n");
     388           0 :         return AVERROR_UNKNOWN;
     389             :     }
     390             : 
     391           0 :     return 0;
     392             : }
     393             : 
     394             : #if HAVE_VDPAU_X11
     395             : #include <vdpau/vdpau_x11.h>
     396             : #include <X11/Xlib.h>
     397             : 
     398             : typedef struct VDPAUDevicePriv {
     399             :     VdpDeviceDestroy *device_destroy;
     400             :     Display *dpy;
     401             : } VDPAUDevicePriv;
     402             : 
     403           0 : static void vdpau_device_free(AVHWDeviceContext *ctx)
     404             : {
     405           0 :     AVVDPAUDeviceContext *hwctx = ctx->hwctx;
     406           0 :     VDPAUDevicePriv       *priv = ctx->user_opaque;
     407             : 
     408           0 :     if (priv->device_destroy)
     409           0 :         priv->device_destroy(hwctx->device);
     410           0 :     if (priv->dpy)
     411           0 :         XCloseDisplay(priv->dpy);
     412           0 :     av_freep(&priv);
     413           0 : }
     414             : 
     415           0 : static int vdpau_device_create(AVHWDeviceContext *ctx, const char *device,
     416             :                                AVDictionary *opts, int flags)
     417             : {
     418           0 :     AVVDPAUDeviceContext *hwctx = ctx->hwctx;
     419             : 
     420             :     VDPAUDevicePriv *priv;
     421             :     VdpStatus err;
     422             :     VdpGetInformationString *get_information_string;
     423             :     const char *display, *vendor;
     424             : 
     425           0 :     priv = av_mallocz(sizeof(*priv));
     426           0 :     if (!priv)
     427           0 :         return AVERROR(ENOMEM);
     428             : 
     429           0 :     ctx->user_opaque = priv;
     430           0 :     ctx->free        = vdpau_device_free;
     431             : 
     432           0 :     priv->dpy = XOpenDisplay(device);
     433           0 :     if (!priv->dpy) {
     434           0 :         av_log(ctx, AV_LOG_ERROR, "Cannot open the X11 display %s.\n",
     435             :                XDisplayName(device));
     436           0 :         return AVERROR_UNKNOWN;
     437             :     }
     438           0 :     display = XDisplayString(priv->dpy);
     439             : 
     440           0 :     err = vdp_device_create_x11(priv->dpy, XDefaultScreen(priv->dpy),
     441             :                                 &hwctx->device, &hwctx->get_proc_address);
     442           0 :     if (err != VDP_STATUS_OK) {
     443           0 :         av_log(ctx, AV_LOG_ERROR, "VDPAU device creation on X11 display %s failed.\n",
     444             :                display);
     445           0 :         return AVERROR_UNKNOWN;
     446             :     }
     447             : 
     448             : #define GET_CALLBACK(id, result)                                                \
     449             : do {                                                                            \
     450             :     void *tmp;                                                                  \
     451             :     err = hwctx->get_proc_address(hwctx->device, id, &tmp);                     \
     452             :     if (err != VDP_STATUS_OK) {                                                 \
     453             :         av_log(ctx, AV_LOG_ERROR, "Error getting the " #id " callback.\n");     \
     454             :         return AVERROR_UNKNOWN;                                                 \
     455             :     }                                                                           \
     456             :     result = tmp;                                                               \
     457             : } while (0)
     458             : 
     459           0 :     GET_CALLBACK(VDP_FUNC_ID_GET_INFORMATION_STRING, get_information_string);
     460           0 :     GET_CALLBACK(VDP_FUNC_ID_DEVICE_DESTROY,         priv->device_destroy);
     461             : 
     462           0 :     get_information_string(&vendor);
     463           0 :     av_log(ctx, AV_LOG_VERBOSE, "Successfully created a VDPAU device (%s) on "
     464             :            "X11 display %s\n", vendor, display);
     465             : 
     466           0 :     return 0;
     467             : }
     468             : #endif
     469             : 
     470             : const HWContextType ff_hwcontext_type_vdpau = {
     471             :     .type                 = AV_HWDEVICE_TYPE_VDPAU,
     472             :     .name                 = "VDPAU",
     473             : 
     474             :     .device_hwctx_size    = sizeof(AVVDPAUDeviceContext),
     475             :     .device_priv_size     = sizeof(VDPAUDeviceContext),
     476             :     .frames_priv_size     = sizeof(VDPAUFramesContext),
     477             : 
     478             : #if HAVE_VDPAU_X11
     479             :     .device_create        = vdpau_device_create,
     480             : #endif
     481             :     .device_init          = vdpau_device_init,
     482             :     .device_uninit        = vdpau_device_uninit,
     483             :     .frames_init          = vdpau_frames_init,
     484             :     .frames_get_buffer    = vdpau_get_buffer,
     485             :     .transfer_get_formats = vdpau_transfer_get_formats,
     486             :     .transfer_data_to     = vdpau_transfer_data_to,
     487             :     .transfer_data_from   = vdpau_transfer_data_from,
     488             : 
     489             :     .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_VDPAU, AV_PIX_FMT_NONE },
     490             : };

Generated by: LCOV version 1.12