st/va: add encode entrypoint v2

Graphics / Mesa 3D Graphics Library / Mesa - Boyuan Zhang [amd.com] - 25 July 2016 06:30 UTC

VAAPI passes PIPE_VIDEO_ENTRYPOINT_ENCODE as entry point for encoding case. We will save this encode entry point in config. config_id was used as profile previously. Now, config has both profile and entrypoint field, and config_id is used to get the config object. Later on, we pass this entrypoint to context->templat.entrypoint instead of always hardcoded to PIPE_VIDEO_ENTRYPOINT_BITSTREAM for decoding case previously. Encode entrypoint is not accepted by driver until we enable Vaapi encode in later patch.

v2 (chk): fix commit message to match 80 chars, use switch instead of ifs, fix memory leaks in the error path, implement vlVaQueryConfigEntrypoints as well, drop VAEntrypointEncPicture (only used for JPEG).

5bcaa1b st/va: add encode entrypoint v2
src/gallium/state_trackers/va/config.c | 111 +++++++++++++++++++++++++---
src/gallium/state_trackers/va/context.c | 59 +++++++++------
src/gallium/state_trackers/va/surface.c | 14 +++-
src/gallium/state_trackers/va/va_private.h | 5 ++
4 files changed, 150 insertions(+), 39 deletions(-)

Upstream: cgit.freedesktop.org


  • Share