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

Author: Thong Thai <[email protected]>
Date:   Fri Oct 13 10:29:21 2023 -0400

frontends/va/config: report max width and height for encoding/decoding

Signed-off-by: Thong Thai <[email protected]>
Reviewed-by: Sil Vilerino <[email protected]>
Reviewed-by: Boyuan Zhang <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25716>

---

 src/gallium/frontends/va/config.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/src/gallium/frontends/va/config.c 
b/src/gallium/frontends/va/config.c
index f669a57540f..dbdf9bb8446 100644
--- a/src/gallium/frontends/va/config.c
+++ b/src/gallium/frontends/va/config.c
@@ -207,6 +207,20 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile 
profile, VAEntrypoint en
                                                        ProfileToPipe(profile),
                                                        
PIPE_VIDEO_ENTRYPOINT_BITSTREAM);
             break;
+         case VAConfigAttribMaxPictureWidth:
+         {
+            value = pscreen->get_video_param(pscreen, ProfileToPipe(profile),
+                                             PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+                                             PIPE_VIDEO_CAP_MAX_WIDTH);
+            value = value ? value : VA_ATTRIB_NOT_SUPPORTED;
+         } break;
+         case VAConfigAttribMaxPictureHeight:
+         {
+            value = pscreen->get_video_param(pscreen, ProfileToPipe(profile),
+                                             PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+                                             PIPE_VIDEO_CAP_MAX_HEIGHT);
+            value = value ? value : VA_ATTRIB_NOT_SUPPORTED;
+         } break;
          default:
             value = VA_ATTRIB_NOT_SUPPORTED;
             break;
@@ -308,6 +322,20 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile 
profile, VAEntrypoint en
                                              
PIPE_VIDEO_CAP_ENC_SUPPORTS_MAX_FRAME_SIZE);
             value = value ? value : VA_ATTRIB_NOT_SUPPORTED;
          } break;
+         case VAConfigAttribMaxPictureWidth:
+         {
+            value = pscreen->get_video_param(pscreen, ProfileToPipe(profile),
+                                             PIPE_VIDEO_ENTRYPOINT_ENCODE,
+                                             PIPE_VIDEO_CAP_MAX_WIDTH);
+            value = value ? value : VA_ATTRIB_NOT_SUPPORTED;
+         } break;
+         case VAConfigAttribMaxPictureHeight:
+         {
+            value = pscreen->get_video_param(pscreen, ProfileToPipe(profile),
+                                             PIPE_VIDEO_ENTRYPOINT_ENCODE,
+                                             PIPE_VIDEO_CAP_MAX_HEIGHT);
+            value = value ? value : VA_ATTRIB_NOT_SUPPORTED;
+         } break;
 #if VA_CHECK_VERSION(1, 12, 0)
          case VAConfigAttribEncHEVCFeatures:
          {

Reply via email to