Add new VA-API methods to the gotcha wrappers (#203)
For a new feature in rocJPEG adding new VA-APIs to the gotcha wrapper
[ROCm/rocprofiler-systems commit: 90ad264447]
This commit is contained in:
+107
@@ -100,6 +100,25 @@ vaapi_gotcha::configure()
|
||||
"vaRenderPicture");
|
||||
vaapi_gotcha_t::configure<18, VAStatus, VADisplay>("vaTerminate");
|
||||
vaapi_gotcha_t::configure<19, int, VADisplay>("vaDisplayIsValid");
|
||||
vaapi_gotcha_t::configure<20, VAStatus, VADisplay, VAImageFormat*, int, int,
|
||||
VAImage*>("vaCreateImage");
|
||||
vaapi_gotcha_t::configure<21, VAStatus, VADisplay, VAImageID>("vaDestroyImage");
|
||||
vaapi_gotcha_t::configure<22, VAStatus, VADisplay, VASurfaceID, int, int,
|
||||
unsigned int, unsigned int, VAImageID>("vaGetImage");
|
||||
vaapi_gotcha_t::configure<23, VAStatus, VADisplay, VASurfaceID, VAImage*>(
|
||||
"vaDeriveImage");
|
||||
vaapi_gotcha_t::configure<24, VAStatus, VADisplay, VAImageFormat*, int*>(
|
||||
"vaQueryImageFormats");
|
||||
vaapi_gotcha_t::configure<25, VAStatus, VADisplay, VABufferID, void**>(
|
||||
"vaMapBuffer");
|
||||
vaapi_gotcha_t::configure<26, VAStatus, VADisplay, VABufferID>("vaUnmapBuffer");
|
||||
vaapi_gotcha_t::configure<27, VAStatus, VADisplay, VABufferID, VABufferInfo*>(
|
||||
"vaAcquireBufferHandle");
|
||||
vaapi_gotcha_t::configure<28, VAStatus, VADisplay, VABufferID>(
|
||||
"vaReleaseBufferHandle");
|
||||
vaapi_gotcha_t::configure<29, VAStatus, VADisplay, VASurfaceID, VAImageID, int,
|
||||
int, unsigned int, unsigned int, int, int, unsigned int,
|
||||
unsigned int>("vaPutImage");
|
||||
};
|
||||
}
|
||||
|
||||
@@ -184,11 +203,39 @@ vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
num_surfaces, "num_attribs", num_attribs);
|
||||
}
|
||||
|
||||
// vaCreateImage
|
||||
void
|
||||
vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VAImageFormat* format, int width, int height, VAImage* image)
|
||||
{
|
||||
(void) format; // unused
|
||||
(void) image; // unused
|
||||
category_region<category::vaapi>::start(std::string_view{ _data.tool_id }, "dpy", dpy,
|
||||
"width", width, "height", height);
|
||||
}
|
||||
|
||||
// vaPutImage
|
||||
void
|
||||
vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VASurfaceID surface, VAImageID image, int src_x, int src_y,
|
||||
unsigned int src_width, unsigned int src_height, int dest_x,
|
||||
int dest_y, unsigned int dest_width, unsigned int dest_height)
|
||||
{
|
||||
category_region<category::vaapi>::start(
|
||||
std::string_view{ _data.tool_id }, "dpy", dpy, "surfaceID", surface, "imageID",
|
||||
image, "x-cordinate", src_x, "y-cordinate", src_y, "src_width", src_width,
|
||||
"src_height", src_height, "dest_x", dest_x, "dest_y", dest_y, "dest_width",
|
||||
dest_width, "dest_height", dest_height);
|
||||
}
|
||||
|
||||
// vaDestroyBuffer
|
||||
// vaDestroyConfig
|
||||
// vaDestroyContext
|
||||
// vaEndPicture
|
||||
// vaSyncSurface
|
||||
// vaDestroyImage
|
||||
// vaUnmapBuffer
|
||||
// vaReleaseBufferHandle
|
||||
void
|
||||
vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VAContextID context)
|
||||
@@ -208,6 +255,15 @@ vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
else if(_data.tool_id == "vaSyncSurface")
|
||||
category_region<category::vaapi>::start(std::string_view{ _data.tool_id }, "dpy",
|
||||
dpy, "render_target", context);
|
||||
else if(_data.tool_id == "vaDestroyImage")
|
||||
category_region<category::vaapi>::start(std::string_view{ _data.tool_id }, "dpy",
|
||||
dpy, "image_id", context);
|
||||
else if(_data.tool_id == "vaUnmapBuffer" || _data.tool_id == "vaReleaseBufferHandle")
|
||||
category_region<category::vaapi>::start(std::string_view{ _data.tool_id }, "dpy",
|
||||
dpy, "buffer_id", context);
|
||||
else
|
||||
category_region<category::vaapi>::start(std::string_view{ _data.tool_id }, "dpy",
|
||||
dpy, "id", context);
|
||||
}
|
||||
|
||||
// vaDestroySurfaces
|
||||
@@ -231,6 +287,18 @@ vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
"mem_type", mem_type, "flags", flags, "descriptor", descriptor);
|
||||
}
|
||||
|
||||
// vaGetImage
|
||||
void
|
||||
vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VASurfaceID surface, int x, int y, unsigned int width,
|
||||
unsigned int height, VAImageID image)
|
||||
{
|
||||
category_region<category::vaapi>::start(std::string_view{ _data.tool_id }, "dpy", dpy,
|
||||
"surfaceID", surface, "x-cordinate", x,
|
||||
"y-cordinate", y, "width", width, "height",
|
||||
height, "imageID", image);
|
||||
}
|
||||
|
||||
// vaGetConfigAttributes
|
||||
void
|
||||
vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
@@ -253,6 +321,16 @@ vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
"minor_version", minor_version);
|
||||
}
|
||||
|
||||
// vaQueryImageFormats
|
||||
void
|
||||
vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VAImageFormat* format_list, int* num_formats)
|
||||
{
|
||||
(void) format_list; // unused
|
||||
category_region<category::vaapi>::start(std::string_view{ _data.tool_id }, "dpy", dpy,
|
||||
"num_formats", num_formats);
|
||||
}
|
||||
|
||||
// vaQueryConfigEntrypoints
|
||||
void
|
||||
vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
@@ -285,6 +363,35 @@ vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
status);
|
||||
}
|
||||
|
||||
// vaDeriveImage
|
||||
void
|
||||
vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VASurfaceID surface, VAImage* image)
|
||||
{
|
||||
(void) image; // unused
|
||||
category_region<category::vaapi>::start(std::string_view{ _data.tool_id }, "dpy", dpy,
|
||||
"surfaceID", surface);
|
||||
}
|
||||
|
||||
// vaMapBuffer
|
||||
void
|
||||
vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VABufferID buf_id, void** pbuf)
|
||||
{
|
||||
category_region<category::vaapi>::start(std::string_view{ _data.tool_id }, "dpy", dpy,
|
||||
"bufferID", buf_id, "pbuf", pbuf);
|
||||
}
|
||||
|
||||
// vaAcquireBufferHandle
|
||||
void
|
||||
vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VABufferID buf_id, VABufferInfo* buf_info)
|
||||
{
|
||||
(void) buf_info; // unused
|
||||
category_region<category::vaapi>::start(std::string_view{ _data.tool_id }, "dpy", dpy,
|
||||
"bufferID", buf_id);
|
||||
}
|
||||
|
||||
// vaRenderPicture
|
||||
void
|
||||
vaapi_gotcha::audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
|
||||
+18
-1
@@ -53,7 +53,7 @@ namespace component
|
||||
{
|
||||
struct vaapi_gotcha : tim::component::base<vaapi_gotcha, void>
|
||||
{
|
||||
static constexpr size_t gotcha_capacity = 20;
|
||||
static constexpr size_t gotcha_capacity = 30;
|
||||
|
||||
using gotcha_data = tim::component::gotcha_data;
|
||||
using exit_func_t = void (*)(int);
|
||||
@@ -88,6 +88,12 @@ struct vaapi_gotcha : tim::component::base<vaapi_gotcha, void>
|
||||
unsigned int format, unsigned int width, unsigned int height,
|
||||
VASurfaceID* surfaces, unsigned int num_surfaces,
|
||||
VASurfaceAttrib* attrib_list, unsigned int num_attribs);
|
||||
static void audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VAImageFormat* format, int width, int height, VAImage* image);
|
||||
static void audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VASurfaceID surface, VAImageID image, int src_x, int src_y,
|
||||
unsigned int src_width, unsigned int src_height, int dest_x,
|
||||
int dest_y, unsigned int dest_width, unsigned int dest_height);
|
||||
static void audit(const gotcha_data&, audit::incoming, VADisplay dpy,
|
||||
VASurfaceID* surfaces, int num_surfaces);
|
||||
static void audit(const gotcha_data&, audit::incoming, VADisplay dpy,
|
||||
@@ -95,11 +101,16 @@ struct vaapi_gotcha : tim::component::base<vaapi_gotcha, void>
|
||||
static void audit(const gotcha_data&, audit::incoming, VADisplay dpy,
|
||||
VASurfaceID surface_id, uint32_t mem_type, uint32_t flags,
|
||||
void* descriptor);
|
||||
static void audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VASurfaceID surface, int x, int y, unsigned int width,
|
||||
unsigned int height, VAImageID image);
|
||||
static void audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VAProfile profile, VAEntrypoint entrypoint,
|
||||
VAConfigAttrib* attrib_list, int num_attribs);
|
||||
static void audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
int* major_version, int* minor_version);
|
||||
static void audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VAImageFormat* format_list, int* num_formats);
|
||||
static void audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VAProfile profile, VAEntrypoint* entrypoint_list,
|
||||
int* num_entrypoints);
|
||||
@@ -108,6 +119,12 @@ struct vaapi_gotcha : tim::component::base<vaapi_gotcha, void>
|
||||
unsigned int* num_attribs);
|
||||
static void audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VASurfaceID render_target, VASurfaceStatus* status);
|
||||
static void audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VASurfaceID surface, VAImage* image);
|
||||
static void audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VABufferID buf_id, void** pbuf);
|
||||
static void audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VABufferID buf_id, VABufferInfo* buf_info);
|
||||
static void audit(const gotcha_data& _data, audit::incoming, VADisplay dpy,
|
||||
VAContextID context, VABufferID* buffers, int num_buffers);
|
||||
static void audit(const gotcha_data& _data, audit::incoming, VADisplay dpy);
|
||||
|
||||
Reference in New Issue
Block a user