[vlc-commits] vaapi: remove always true parameter from vlc_vaapi_PoolNew()

Steve Lhomme git at videolan.org
Wed Nov 20 08:42:03 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Nov 18 13:39:16 2019 +0100| [ce88f1c5ebccb05b1f5310ebb49aaa97d6ceb5b5] | committer: Steve Lhomme

vaapi: remove always true parameter from vlc_vaapi_PoolNew()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ce88f1c5ebccb05b1f5310ebb49aaa97d6ceb5b5
---

 modules/hw/vaapi/chroma.c                     | 2 +-
 modules/hw/vaapi/filters.c                    | 3 +--
 modules/hw/vaapi/vlc_vaapi.c                  | 7 ++-----
 modules/hw/vaapi/vlc_vaapi.h                  | 2 +-
 modules/video_output/opengl/converter_vaapi.c | 5 ++---
 5 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/modules/hw/vaapi/chroma.c b/modules/hw/vaapi/chroma.c
index 9634654630..ceaa635d37 100644
--- a/modules/hw/vaapi/chroma.c
+++ b/modules/hw/vaapi/chroma.c
@@ -357,7 +357,7 @@ vlc_vaapi_OpenChroma(vlc_object_t *obj)
         filter_sys->dest_pics =
             vlc_vaapi_PoolNew(obj, filter_sys->dec_device, filter_sys->dpy,
                               DEST_PICS_POOL_SZ, &filter_sys->va_surface_ids,
-                              &filter->fmt_out.video, true);
+                              &filter->fmt_out.video);
         if (!filter_sys->dest_pics)
         {
             vlc_vaapi_FilterReleaseInstance(filter, filter_sys->dec_device);
diff --git a/modules/hw/vaapi/filters.c b/modules/hw/vaapi/filters.c
index ee81a11434..35fe72318c 100644
--- a/modules/hw/vaapi/filters.c
+++ b/modules/hw/vaapi/filters.c
@@ -383,8 +383,7 @@ Open(filter_t * filter,
     filter_sys->dest_pics =
         vlc_vaapi_PoolNew(VLC_OBJECT(filter), filter_sys->va.dec_device,
                           filter_sys->va.dpy, DEST_PICS_POOL_SZ,
-                          &filter_sys->va.surface_ids, &filter->fmt_out.video,
-                          true);
+                          &filter_sys->va.surface_ids, &filter->fmt_out.video);
     if (!filter_sys->dest_pics)
         goto error;
 
diff --git a/modules/hw/vaapi/vlc_vaapi.c b/modules/hw/vaapi/vlc_vaapi.c
index f0fc5f9594..ed2b7a9c56 100644
--- a/modules/hw/vaapi/vlc_vaapi.c
+++ b/modules/hw/vaapi/vlc_vaapi.c
@@ -469,7 +469,7 @@ pic_sys_ctx_destroy_cb(struct picture_context_t *opaque)
 picture_pool_t *
 vlc_vaapi_PoolNew(vlc_object_t *o, vlc_decoder_device *dec_device,
                   VADisplay dpy, unsigned count, VASurfaceID **render_targets,
-                  const video_format_t *restrict fmt, bool b_force_fourcc)
+                  const video_format_t *restrict fmt)
 {
     unsigned va_rt_format;
     int va_fourcc;
@@ -489,14 +489,11 @@ vlc_vaapi_PoolNew(vlc_object_t *o, vlc_decoder_device *dec_device,
             .type = VASurfaceAttribPixelFormat,
             .flags = VA_SURFACE_ATTRIB_SETTABLE,
             .value.type    = VAGenericValueTypeInteger,
-            .value.value.i = b_force_fourcc ? va_fourcc : 0,
+            .value.value.i = va_fourcc,
         }
     };
-    if (b_force_fourcc)
-    {
         attribs = fourcc_attribs;
         num_attribs = 1;
-    }
 
     picture_t *pics[count];
 
diff --git a/modules/hw/vaapi/vlc_vaapi.h b/modules/hw/vaapi/vlc_vaapi.h
index 2a344b9630..a83e1df78e 100644
--- a/modules/hw/vaapi/vlc_vaapi.h
+++ b/modules/hw/vaapi/vlc_vaapi.h
@@ -171,7 +171,7 @@ vlc_vaapi_CreateConfigChecked(vlc_object_t *o, VADisplay dpy,
 picture_pool_t *
 vlc_vaapi_PoolNew(vlc_object_t *o, vlc_decoder_device *dec_device,
                   VADisplay dpy, unsigned count, VASurfaceID **render_targets,
-                  const video_format_t *restrict fmt, bool b_force_fourcc);
+                  const video_format_t *restrict fmt);
 
 /* Get and hold the VADisplay instance attached to the picture sys */
 vlc_decoder_device *
diff --git a/modules/video_output/opengl/converter_vaapi.c b/modules/video_output/opengl/converter_vaapi.c
index b4d7fc8bef..d53f01c138 100644
--- a/modules/video_output/opengl/converter_vaapi.c
+++ b/modules/video_output/opengl/converter_vaapi.c
@@ -236,8 +236,7 @@ tc_vaegl_get_pool(const opengl_tex_converter_t *tc, unsigned requested_count)
     vlc_decoder_device *dec_device = vlc_video_context_HoldDevice(tc->vctx);
     picture_pool_t *pool =
         vlc_vaapi_PoolNew(VLC_OBJECT(tc->gl), dec_device, priv->vadpy,
-                          requested_count, &priv->va_surface_ids, &tc->fmt,
-                          true);
+                          requested_count, &priv->va_surface_ids, &tc->fmt);
     vlc_decoder_device_Release(dec_device);
     if (!pool)
         return NULL;
@@ -345,7 +344,7 @@ tc_va_check_derive_image(opengl_tex_converter_t *tc,
     VASurfaceID *va_surface_ids;
 
     picture_pool_t *pool = vlc_vaapi_PoolNew(o, dec_device, priv->vadpy, 1,
-                                             &va_surface_ids, &tc->fmt, true);
+                                             &va_surface_ids, &tc->fmt);
     if (!pool)
         return VLC_EGENERIC;
 



More information about the vlc-commits mailing list