Mesa (master): st/va: enable h264 VAAPI encode

Christian König deathsimple at kemper.freedesktop.org
Mon Jul 25 11:40:57 UTC 2016


Module: Mesa
Branch: master
Commit: dd208ea006c3c66bf64f21ecc1eaffdc0e57db5e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd208ea006c3c66bf64f21ecc1eaffdc0e57db5e

Author: Boyuan Zhang <boyuan.zhang at amd.com>
Date:   Thu Jul 21 19:40:22 2016 -0400

st/va: enable h264 VAAPI encode

Enable H.264 VAAPI encoding through config. Currently only H.264 baseline is supported. Encode entrypoint is not accepted by driver.

Signed-off-by: Boyuan Zhang <boyuan.zhang at amd.com>

---

 src/gallium/state_trackers/va/config.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/gallium/state_trackers/va/config.c b/src/gallium/state_trackers/va/config.c
index 889ce38..84bf913 100644
--- a/src/gallium/state_trackers/va/config.c
+++ b/src/gallium/state_trackers/va/config.c
@@ -94,11 +94,9 @@ vlVaQueryConfigEntrypoints(VADriverContextP ctx, VAProfile profile,
 				PIPE_VIDEO_CAP_SUPPORTED))
       entrypoint_list[(*num_entrypoints)++] = VAEntrypointVLD;
 
-#if 0
    if (pscreen->get_video_param(pscreen, p, PIPE_VIDEO_ENTRYPOINT_ENCODE,
 				PIPE_VIDEO_CAP_SUPPORTED))
       entrypoint_list[(*num_entrypoints)++] = VAEntrypointEncSlice;
-#endif
 
    if (num_entrypoints == 0)
       return VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
@@ -122,7 +120,7 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile profile, VAEntrypoint en
          value = VA_RT_FORMAT_YUV420;
          break;
       case VAConfigAttribRateControl:
-         value = VA_RC_NONE;
+         value = VA_RC_CQP | VA_RC_CBR;
          break;
       default:
          value = VA_ATTRIB_NOT_SUPPORTED;
@@ -183,7 +181,6 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin
       config->entrypoint = PIPE_VIDEO_ENTRYPOINT_BITSTREAM;
       break;
 
-#if 0
    case VAEntrypointEncSlice:
       if (!pscreen->get_video_param(pscreen, p, PIPE_VIDEO_ENTRYPOINT_ENCODE,
 				    PIPE_VIDEO_CAP_SUPPORTED)) {
@@ -193,7 +190,6 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin
 
       config->entrypoint = PIPE_VIDEO_ENTRYPOINT_ENCODE;
       break;
-#endif
 
    default:
       FREE(config);




More information about the mesa-commit mailing list