summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/vpl/files/0001-Update-vpl-inspect-to-remove-ReportedStats.patch
blob: 8ccd7e467acf867432e544e99e5fe836cf276e65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
From 39ec70e27cb6887d6b9e6abc231d1052f02c4d9b Mon Sep 17 00:00:00 2001
From: "Yuan, Jenny" <jenny.yuan@intel.com>
Date: Thu, 13 Feb 2025 11:54:46 -0800
Subject: [PATCH] Update vpl-inspect to remove ReportedStats

Since experimental API mfxEncoderDescription::encoder::ReportedStats is
going to be removed, update vpl-inspect to remove ReportedStats field
report.

Upstream-Status: Backport [https://github.com/intel/libvpl-tools/commit/39ec70e27cb6887d6b9e6abc231d1052f02c4d9b]
---
 tools/cli/vpl-inspect/src/vpl-inspect.cpp | 38 -----------------------
 1 file changed, 38 deletions(-)

diff --git a/tools/cli/vpl-inspect/src/vpl-inspect.cpp b/tools/cli/vpl-inspect/src/vpl-inspect.cpp
index e872316..b6e302f 100644
--- a/tools/cli/vpl-inspect/src/vpl-inspect.cpp
+++ b/tools/cli/vpl-inspect/src/vpl-inspect.cpp
@@ -113,22 +113,6 @@ const char *_print_MediaAdapterType(mfxMediaAdapterType type) {
     return "<unknown media adapter type>";
 }
 
-#ifdef ONEVPL_EXPERIMENTAL
-const char *_print_EncodeStatsType(mfxU16 type) {
-    switch (type) {
-        STRING_OPTION(MFX_ENCODESTATS_LEVEL_BLK);
-        STRING_OPTION(MFX_ENCODESTATS_LEVEL_SLICE);
-        STRING_OPTION(MFX_ENCODESTATS_LEVEL_TILE);
-        STRING_OPTION(MFX_ENCODESTATS_LEVEL_FRAME);
-
-        default:
-            break;
-    }
-
-    return "<unknown encode stats type>";
-}
-#endif
-
 #ifdef ONEVPL_EXPERIMENTAL
 const char *_print_SurfaceType(mfxSurfaceType type) {
     switch (type) {
@@ -549,28 +533,6 @@ int main(int argc, char *argv[]) {
                        "",
                        enc->Codecs[codec].BiDirectionalPrediction);
 
-#ifdef ONEVPL_EXPERIMENTAL
-                // Once ReportedStats is moved out of experimental API the struct version of mfxEncoderDescription should
-                //   be updated, and that can be used to know whether this field is valid.
-                // For now, just check implementation API version.
-                mfxVersion reqApiVersionReportedStats = {};
-                reqApiVersionReportedStats.Major      = 2;
-                reqApiVersionReportedStats.Minor      = 7;
-                if (idesc->ApiVersion.Version >= reqApiVersionReportedStats.Version) {
-                    mfxU16 reportedStats = enc->Codecs[codec].ReportedStats;
-                    if (reportedStats) {
-                        for (mfxU16 statMask = 1; statMask != 0; statMask <<= 1) {
-                            if (reportedStats & statMask) {
-                                const char *statStr = _print_EncodeStatsType(statMask);
-                                printf("%4sReportedStats: %s\n", "", statStr);
-                            }
-                        }
-                    }
-                    else {
-                        printf("%4sReportedStats: 0\n", "");
-                    }
-                }
-#endif
                 for (int profile = 0; profile < enc->Codecs[codec].NumProfiles; profile++) {
                     printf("%6sProfile: %s\n",
                            "",
-- 
2.43.0