va: encoder: Fix regression since commit 2042c2d4f0.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 27 May 2022 12:45:51 +0000 (14:45 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sun, 29 May 2022 11:56:39 +0000 (11:56 +0000)
There's no need to compare with the open entrypoint to query the
encoder. This commit removes the checks to the configured entrypoint
with the parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2508>

subprojects/gst-plugins-bad/sys/va/gstvaencoder.c

index 8062c6f..fa08754 100644 (file)
@@ -586,9 +586,6 @@ gst_va_encoder_get_max_slice_num (GstVaEncoder * self,
   if (profile == VAProfileNone)
     return -1;
 
-  if (entrypoint != self->entrypoint)
-    return -1;
-
   dpy = gst_va_display_get_va_dpy (self->display);
   status = vaGetConfigAttributes (dpy, profile, entrypoint, &attrib, 1);
   if (status != VA_STATUS_SUCCESS) {
@@ -620,9 +617,6 @@ gst_va_encoder_get_max_num_reference (GstVaEncoder * self,
   if (profile == VAProfileNone)
     return FALSE;
 
-  if (entrypoint != self->entrypoint)
-    return FALSE;
-
   dpy = gst_va_display_get_va_dpy (self->display);
   status = vaGetConfigAttributes (dpy, profile, entrypoint, &attrib, 1);
   if (status != VA_STATUS_SUCCESS) {
@@ -661,9 +655,6 @@ gst_va_encoder_get_rate_control_mode (GstVaEncoder * self,
   if (profile == VAProfileNone)
     return 0;
 
-  if (entrypoint != self->entrypoint)
-    return 0;
-
   dpy = gst_va_display_get_va_dpy (self->display);
   status = vaGetConfigAttributes (dpy, profile, entrypoint, &attrib, 1);
   if (status != VA_STATUS_SUCCESS) {
@@ -693,9 +684,6 @@ gst_va_encoder_get_quality_level (GstVaEncoder * self,
   if (profile == VAProfileNone)
     return 0;
 
-  if (entrypoint != self->entrypoint)
-    return 0;
-
   dpy = gst_va_display_get_va_dpy (self->display);
   status = vaGetConfigAttributes (dpy, profile, entrypoint, &attrib, 1);
   if (status != VA_STATUS_SUCCESS) {
@@ -725,9 +713,6 @@ gst_va_encoder_has_trellis (GstVaEncoder * self,
   if (profile == VAProfileNone)
     return FALSE;
 
-  if (entrypoint != self->entrypoint)
-    return FALSE;
-
   dpy = gst_va_display_get_va_dpy (self->display);
   status = vaGetConfigAttributes (dpy, profile, entrypoint, &attrib, 1);
   if (status != VA_STATUS_SUCCESS) {
@@ -755,9 +740,6 @@ gst_va_encoder_get_rtformat (GstVaEncoder * self,
   if (profile == VAProfileNone)
     return 0;
 
-  if (entrypoint != self->entrypoint)
-    return 0;
-
   dpy = gst_va_display_get_va_dpy (self->display);
   status = vaGetConfigAttributes (dpy, profile, entrypoint, &attrib, 1);
   if (status != VA_STATUS_SUCCESS) {
@@ -785,9 +767,6 @@ gst_va_encoder_get_packed_headers (GstVaEncoder * self, VAProfile profile,
   if (profile == VAProfileNone)
     return 0;
 
-  if (entrypoint != self->entrypoint)
-    return 0;
-
   dpy = gst_va_display_get_va_dpy (self->display);
   status = vaGetConfigAttributes (dpy, profile, entrypoint, &attrib, 1);
   if (status != VA_STATUS_SUCCESS) {