vaDeriveImage returns VA_STATUS_ERROR_OPERATION_FAILED

未关闭
#296 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
c
领域
api

调研方向

从 issue 中的示例开始,将其初始化和 surface 创建序列与 encode/h264encode.c 的开头进行比较。跟踪 vaCreateSurfaces 之后的 vaDeriveImage 调用,并在所示的 X11 和 radeonsi 设置下检查返回的 VAStatus 值。确定导致失败的缺失条件或环境差异后,即表示完成。

由索引模型根据 Issue 内容生成。

描述

It's a kind of weird situation. I wrote small sample code

#include <va/va.h>
#include <va/va_x11.h>
#include <stdio.h>

void main()
{   
    int major_ver;
    int minor_ver;

    Display* x11_display = XOpenDisplay(NULL);
    VADisplay va_dpy = vaGetDisplay(x11_display);

    VAStatus va_status = vaInitialize(va_dpy, &major_ver, &minor_ver);

    VASurfaceID surfaces[4];
    vaCreateSurfaces(va_dpy, VA_RT_FORMAT_YUV420, 1920, 1088, &surfaces[0], 4, NULL, 0);
    for (int i = 0; i < 4; i++) {
        VAImage surface_image;
        VAStatus va_status = vaDeriveImage(va_dpy, surfaces[i], &surface_image);
        printf("surface %d: vaDeriveImage returns %d\n", i, va_status);
    }
}

build command is gcc h264encode.c -lva -lva-x11 -lX11

Output:

libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
surface 0: vaDeriveImage returns 1
surface 1: vaDeriveImage returns 1
surface 2: vaDeriveImage returns 1
surface 3: vaDeriveImage returns 1

The same code at the very beginning of the https://github.com/intel/libva-utils/blob/master/encode/h264encode.c main fuction works fine and vaDeriveImage returns 0.
What I'm missing for?

主要语言
C
星标
244
派生
175
平均合并
9 天 7 小时
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

intel/libva-utils 的其他 Issue

查看 intel/libva-utils 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。