media-video/libva-utils: Uprev to 2.11.1

This is part of uprev'ing libva to 2.11.1.

BUG=b:191785197
TEST=vainfo

Change-Id: I6e642cccab29984474c781f786f03d28a00d7045
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2987245
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Tested-by: Miguel Casas <mcasas@chromium.org>
diff --git a/media-video/libva-utils/Manifest b/media-video/libva-utils/Manifest
index b876ae4..010d98e 100644
--- a/media-video/libva-utils/Manifest
+++ b/media-video/libva-utils/Manifest
@@ -1 +1 @@
-DIST libva-utils-2.10.0.tar.gz 1203536 BLAKE2B c7b51e07618204c55e992f57dd2d80b289d2edd7b4f526c3afaaec1081f5497ac86614e097bc14a1e79d380ca2c529359d02cee601502e292ca8f89073d5fdbb SHA512 2d44c5e3f52ff4ce8bfb206af95c4d790b6d31ec21f899f0ec9604391359f55de06c63b446e19cd8f0ea0c36ccb4ac7cc5ae7fe68361eb263c01454682d18402
+DIST libva-utils-2.11.1.tar.gz 1205472 BLAKE2B 251a318d10eb5907e0ee54f101a153cfe76a98d61fc1f4fabf890901b52e980439d77acfbb4e1b566d361a7cda5c7ab504e575067eb932b0e121904be34b801f SHA512 d64c4767269a810386e02426fce3bde6aa693ac899ace22900e4ae4918dfe461736fe0a031db36751281d5bd78960354cdfa4ca13c5f7c30cc67d05abdd0bcd2
diff --git a/media-video/libva-utils/files/0002-Enable-new-caps-for-VAConfigAttribEncryption.patch b/media-video/libva-utils/files/0002-Enable-new-caps-for-VAConfigAttribEncryption.patch
deleted file mode 100644
index 3eaf6f6..0000000
--- a/media-video/libva-utils/files/0002-Enable-new-caps-for-VAConfigAttribEncryption.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 1910af3fc815afe64a3534c66102fd4018c5e992 Mon Sep 17 00:00:00 2001
-From: Ryan T Huang <ryan.t.huang@intel.com>
-Date: Wed, 13 Jan 2021 00:11:17 -0800
-Subject: [PATCH] Enable new caps for VAConfigAttribEncryption
-
----
- test/test_data.h | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/test/test_data.h b/test/test_data.h
-index 42a8b64..4ffda61 100644
---- a/test/test_data.h
-+++ b/test/test_data.h
-@@ -229,6 +229,15 @@ static const BitMasks g_vaFEIFunctionTypes = {
-     VA_FEI_FUNCTION_ENC, VA_FEI_FUNCTION_PAK, VA_FEI_FUNCTION_ENC_PAK,
- };
- 
-+#if VA_CHECK_VERSION(1, 11, 0)
-+static const BitMasks g_vaEncryptionTypes = {
-+    VA_ENCRYPTION_TYPE_FULLSAMPLE_CTR,
-+    VA_ENCRYPTION_TYPE_FULLSAMPLE_CBC,
-+    VA_ENCRYPTION_TYPE_SUBSAMPLE_CTR,
-+    VA_ENCRYPTION_TYPE_SUBSAMPLE_CBC,
-+};
-+#endif
-+
- static const std::map<VAConfigAttribType, const BitMasks&>
-     g_vaConfigAttribBitMasks = {
-         {VAConfigAttribRTFormat, g_vaRTFormats},
-@@ -237,6 +246,9 @@ static const std::map<VAConfigAttribType, const BitMasks&>
-         {VAConfigAttribEncPackedHeaders, g_vaEncPackedHeaders},
-         {VAConfigAttribEncInterlaced, g_vaEncInterlaced},
-         {VAConfigAttribFEIFunctionType, g_vaFEIFunctionTypes},
-+#if VA_CHECK_VERSION(1, 11, 0)
-+        {VAConfigAttribEncryption, g_vaEncryptionTypes},
-+#endif
-     };
- 
- static const BitMasks g_vaSurfaceMemTypes = {
--- 
-2.25.1
-
diff --git a/media-video/libva-utils/files/0003-Temporarily-remove-VA-API-1.11.0-check.patch b/media-video/libva-utils/files/0003-Temporarily-remove-VA-API-1.11.0-check.patch
deleted file mode 100644
index e3c9443..0000000
--- a/media-video/libva-utils/files/0003-Temporarily-remove-VA-API-1.11.0-check.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 76f27802ef57cc777e6d8f96a8aff8b7cdbbd829 Mon Sep 17 00:00:00 2001
-From: Ed Baker <edward.baker@intel.com>
-Date: Wed, 10 Mar 2021 10:55:57 -0700
-Subject: [PATCH] Temporarily remove VA-API 1.11.0 check
-
----
- test/test_data.h | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/test/test_data.h b/test/test_data.h
-index 4ffda61..3963a73 100644
---- a/test/test_data.h
-+++ b/test/test_data.h
-@@ -229,14 +229,12 @@ static const BitMasks g_vaFEIFunctionTypes = {
-     VA_FEI_FUNCTION_ENC, VA_FEI_FUNCTION_PAK, VA_FEI_FUNCTION_ENC_PAK,
- };
- 
--#if VA_CHECK_VERSION(1, 11, 0)
- static const BitMasks g_vaEncryptionTypes = {
-     VA_ENCRYPTION_TYPE_FULLSAMPLE_CTR,
-     VA_ENCRYPTION_TYPE_FULLSAMPLE_CBC,
-     VA_ENCRYPTION_TYPE_SUBSAMPLE_CTR,
-     VA_ENCRYPTION_TYPE_SUBSAMPLE_CBC,
- };
--#endif
- 
- static const std::map<VAConfigAttribType, const BitMasks&>
-     g_vaConfigAttribBitMasks = {
-@@ -246,9 +244,7 @@ static const std::map<VAConfigAttribType, const BitMasks&>
-         {VAConfigAttribEncPackedHeaders, g_vaEncPackedHeaders},
-         {VAConfigAttribEncInterlaced, g_vaEncInterlaced},
-         {VAConfigAttribFEIFunctionType, g_vaFEIFunctionTypes},
--#if VA_CHECK_VERSION(1, 11, 0)
-         {VAConfigAttribEncryption, g_vaEncryptionTypes},
--#endif
-     };
- 
- static const BitMasks g_vaSurfaceMemTypes = {
--- 
-2.25.1
-
diff --git a/media-video/libva-utils/files/0004-H264encode-Added-low_power-command-line-option.patch b/media-video/libva-utils/files/0004-H264encode-Added-low_power-command-line-option.patch
deleted file mode 100644
index 3c077b9..0000000
--- a/media-video/libva-utils/files/0004-H264encode-Added-low_power-command-line-option.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From eca467944c65f0d230f407b92175df65c3708521 Mon Sep 17 00:00:00 2001
-From: Sudarshan S <sudarshan.s@intel.com>
-Date: Tue, 9 Feb 2021 20:20:42 +0530
-Subject: [PATCH] h264encode : Added low_power command line option
-
-h264encode utilty failed to run on the platforms where only low-power
-(VAEntryPointEncSliceLPi)entrypoints are supported . This change adds
-a low_power command line option.
----
- encode/h264encode.c | 39 ++++++++++++++++++++++++++++++++++-----
- 1 file changed, 34 insertions(+), 5 deletions(-)
-
-diff --git a/encode/h264encode.c b/encode/h264encode.c
-index 4bb1f12..5486df9 100644
---- a/encode/h264encode.c
-+++ b/encode/h264encode.c
-@@ -174,6 +174,10 @@ static unsigned int SyncPictureTicks=0;
- static unsigned int SavePictureTicks=0;
- static unsigned int TotalTicks=0;
- 
-+//Default entrypoint for Encode
-+static VAEntrypoint requested_entrypoint = -1;
-+static VAEntrypoint selected_entrypoint = -1;
-+
- struct __bitstream {
-     unsigned int *buffer;
-     int bit_offset;
-@@ -860,6 +864,7 @@ static int print_help(void)
-     printf("   --enablePSNR calculate PSNR of recyuv vs. srcyuv\n");
-     printf("   --entropy <0|1>, 1 means cabac, 0 cavlc\n");
-     printf("   --profile <BP|MP|HP>\n");
-+    printf("   --low_power <num> 0: Normal mode, 1: Low power mode, others: auto mode\n");
-     return 0;
- }
- 
-@@ -885,6 +890,7 @@ static int process_cmdline(int argc, char *argv[])
-         {"framecount", required_argument, NULL, 16 },
-         {"entropy", required_argument, NULL, 17 },
-         {"profile", required_argument, NULL, 18 },
-+        {"low_power", required_argument, NULL, 19 },
-         {NULL, no_argument, NULL, 0 }};
-     int long_index;
-     
-@@ -978,6 +984,17 @@ static int process_cmdline(int argc, char *argv[])
-             else
-                 h264_profile = 0;
-             break;
-+        case 19:
-+        {   
-+            int lp_option = atoi(optarg);
-+            if (lp_option == 0)
-+                requested_entrypoint = VAEntrypointEncSlice; //normal 0
-+            else if (lp_option == 1)
-+                requested_entrypoint =  VAEntrypointEncSliceLP; //low power 1
-+            else
-+                requested_entrypoint = -1;
-+        }
-+            break;
-         case ':':
-         case '?':
-             print_help();
-@@ -1088,17 +1105,29 @@ static int init_va(void)
-         h264_profile = profile_list[i];
-         vaQueryConfigEntrypoints(va_dpy, h264_profile, entrypoints, &num_entrypoints);
-         for (slice_entrypoint = 0; slice_entrypoint < num_entrypoints; slice_entrypoint++) {
--            if (entrypoints[slice_entrypoint] == VAEntrypointEncSlice) {
-+            if (requested_entrypoint == -1 ) {
-+                //Select the entry point based on what is avaiable
-+                if ( (entrypoints[slice_entrypoint] == VAEntrypointEncSlice) ||
-+                     (entrypoints[slice_entrypoint] == VAEntrypointEncSliceLP) ) {
-+                    support_encode = 1;
-+                    selected_entrypoint = entrypoints[slice_entrypoint];
-+                    break;
-+                }
-+            } else if ((entrypoints[slice_entrypoint] == requested_entrypoint)) {
-+                //Select the entry point based on what was requested in cmd line option 
-                 support_encode = 1;
-+                selected_entrypoint = entrypoints[slice_entrypoint];
-                 break;
-             }
-         }
--        if (support_encode == 1)
-+        if (support_encode == 1) {
-+            printf("Using EntryPoint - %d \n",selected_entrypoint);
-             break;
-+        }
-     }
-     
-     if (support_encode == 0) {
--        printf("Can't find VAEntrypointEncSlice for H264 profiles\n");
-+        printf("Can't find VAEntrypointEncSlice or  VAEntrypointEncSliceLP for H264 profiles\n");
-         exit(1);
-     } else {
-         switch (h264_profile) {
-@@ -1130,7 +1159,7 @@ static int init_va(void)
-     for (i = 0; i < VAConfigAttribTypeMax; i++)
-         attrib[i].type = i;
- 
--    va_status = vaGetConfigAttributes(va_dpy, h264_profile, VAEntrypointEncSlice,
-+    va_status = vaGetConfigAttributes(va_dpy, h264_profile, selected_entrypoint,
-                                       &attrib[0], VAConfigAttribTypeMax);
-     CHECK_VASTATUS(va_status, "vaGetConfigAttributes");
-     /* check the interested configattrib */
-@@ -1272,7 +1301,7 @@ static int setup_encode()
-     VASurfaceID *tmp_surfaceid;
-     int codedbuf_size, i;
-     
--    va_status = vaCreateConfig(va_dpy, h264_profile, VAEntrypointEncSlice,
-+    va_status = vaCreateConfig(va_dpy, h264_profile, selected_entrypoint,
-             &config_attrib[0], config_attrib_num, &config_id);
-     CHECK_VASTATUS(va_status, "vaCreateConfig");
- 
diff --git a/media-video/libva-utils/libva-utils-2.10.0-r4.ebuild b/media-video/libva-utils/libva-utils-2.10.0-r4.ebuild
deleted file mode 120000
index 4f343c0..0000000
--- a/media-video/libva-utils/libva-utils-2.10.0-r4.ebuild
+++ /dev/null
@@ -1 +0,0 @@
-libva-utils-2.10.0.ebuild
\ No newline at end of file
diff --git a/media-video/libva-utils/libva-utils-2.11.1-r1.ebuild b/media-video/libva-utils/libva-utils-2.11.1-r1.ebuild
new file mode 120000
index 0000000..d53f141
--- /dev/null
+++ b/media-video/libva-utils/libva-utils-2.11.1-r1.ebuild
@@ -0,0 +1 @@
+libva-utils-2.11.1.ebuild
\ No newline at end of file
diff --git a/media-video/libva-utils/libva-utils-2.10.0.ebuild b/media-video/libva-utils/libva-utils-2.11.1.ebuild
similarity index 81%
rename from media-video/libva-utils/libva-utils-2.10.0.ebuild
rename to media-video/libva-utils/libva-utils-2.11.1.ebuild
index 9c6e68de..aa14341 100644
--- a/media-video/libva-utils/libva-utils-2.10.0.ebuild
+++ b/media-video/libva-utils/libva-utils-2.11.1.ebuild
@@ -28,9 +28,6 @@
 
 PATCHES=(
 	"${FILESDIR}"/0001-Add-a-flag-to-build-vendor.patch
-	"${FILESDIR}"/0002-Enable-new-caps-for-VAConfigAttribEncryption.patch
-	"${FILESDIR}"/0003-Temporarily-remove-VA-API-1.11.0-check.patch
-	"${FILESDIR}"/0004-H264encode-Added-low_power-command-line-option.patch
 )
 
 src_prepare() {