Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libva for openSUSE:Factory checked 
in at 2021-07-15 23:59:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libva (Old)
 and      /work/SRC/openSUSE:Factory/.libva.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libva"

Thu Jul 15 23:59:02 2021 rev:60 rq:906140 version:2.12.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libva/libva-gl.changes   2021-04-08 
21:01:21.489848317 +0200
+++ /work/SRC/openSUSE:Factory/.libva.new.2625/libva-gl.changes 2021-07-15 
23:59:15.730049092 +0200
@@ -1,0 +2,14 @@
+Tue Jul 13 12:20:48 UTC 2021 - Aaron Stern <[email protected]>
+
+- update to 2.12.0:
+  * add: Report the capability of vaCopy support
+  * add: Report the capability of sub device
+  * add: Add config attributes to advertise HEVC/H.265 encoder features
+  * add: Video processing HVS Denoise: Added 4 modes
+  * add: Introduce VASurfaceAttribDRMFormatModifiers
+  * add: Add 3DLUT Filter in Video Processing.
+  * doc: Update log2_tile_column description for vp9enc
+  * trace: Correct av1 film grain trace information
+  * ci: Fix freebsd build by switching to vmactions/[email protected]
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/libva/libva.changes      2021-04-08 
21:01:21.513848342 +0200
+++ /work/SRC/openSUSE:Factory/.libva.new.2625/libva.changes    2021-07-15 
23:59:15.790048609 +0200
@@ -1,0 +2,14 @@
+Tue Jul 13 12:17:31 UTC 2021 - Aaron Stern <[email protected]>
+
+- update to 2.12.0:
+  * add: Report the capability of vaCopy support
+  * add: Report the capability of sub device
+  * add: Add config attributes to advertise HEVC/H.265 encoder features
+  * add: Video processing HVS Denoise: Added 4 modes
+  * add: Introduce VASurfaceAttribDRMFormatModifiers
+  * add: Add 3DLUT Filter in Video Processing.
+  * doc: Update log2_tile_column description for vp9enc
+  * trace: Correct av1 film grain trace information
+  * ci: Fix freebsd build by switching to vmactions/[email protected]
+    
+-------------------------------------------------------------------

Old:
----
  libva-2.11.0.tar.gz

New:
----
  libva-2.12.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libva-gl.spec ++++++
--- /var/tmp/diff_new_pack.LQzhFi/_old  2021-07-15 23:59:16.330044268 +0200
+++ /var/tmp/diff_new_pack.LQzhFi/_new  2021-07-15 23:59:16.330044268 +0200
@@ -23,7 +23,7 @@
 
 Name:           libva-gl
 %define _name   libva
-Version:        2.11.0
+Version:        2.12.0
 Release:        0
 Summary:        Video Acceleration (VA) API
 License:        MIT

++++++ libva.spec ++++++
--- /var/tmp/diff_new_pack.LQzhFi/_old  2021-07-15 23:59:16.346044139 +0200
+++ /var/tmp/diff_new_pack.LQzhFi/_new  2021-07-15 23:59:16.346044139 +0200
@@ -23,7 +23,7 @@
 
 Name:           libva
 %define _name   libva
-Version:        2.11.0
+Version:        2.12.0
 Release:        0
 Summary:        Video Acceleration (VA) API
 License:        MIT

++++++ libva-2.11.0.tar.gz -> libva-2.12.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.11.0/.github/workflows/freebsd.yml 
new/libva-2.12.0/.github/workflows/freebsd.yml
--- old/libva-2.11.0/.github/workflows/freebsd.yml      2021-03-23 
11:54:35.000000000 +0100
+++ new/libva-2.12.0/.github/workflows/freebsd.yml      2021-06-17 
23:41:13.000000000 +0200
@@ -16,7 +16,7 @@
     steps:
     - uses: actions/checkout@v2
     - name: test
-      uses: vmactions/[email protected]
+      uses: vmactions/[email protected]
       with:
         prepare: |
           pkg install -y meson pkgconf libdrm libXext libXfixes wayland
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.11.0/NEWS new/libva-2.12.0/NEWS
--- old/libva-2.11.0/NEWS       2021-03-23 11:54:35.000000000 +0100
+++ new/libva-2.12.0/NEWS       2021-06-17 23:41:13.000000000 +0200
@@ -1,6 +1,17 @@
-libva NEWS -- summary of user visible changes.  2021-03-23
+libva NEWS -- summary of user visible changes.  2021-06-17
 Copyright (C) 2009-2020 Intel Corporation
 
+version 2.12.0 - 17.Jun.2021
+* add: Report the capability of vaCopy support
+* add: Report the capability of sub device
+* add: Add config attributes to advertise HEVC/H.265 encoder features
+* add: Video processing HVS Denoise: Added 4 modes
+* add: Introduce VASurfaceAttribDRMFormatModifiers
+* add: Add 3DLUT Filter in Video Processing.
+* doc: Update log2_tile_column description for vp9enc
+* trace: Correct av1 film grain trace information
+* ci: Fix freebsd build by switching to vmactions/[email protected]
+
 version 2.11.0 - 23.Mar.2021
 * add: LibVA Protected Content API
 * add: Add a configuration attribute to advertise AV1d LST feature
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.11.0/configure.ac 
new/libva-2.12.0/configure.ac
--- old/libva-2.11.0/configure.ac       2021-03-23 11:54:35.000000000 +0100
+++ new/libva-2.12.0/configure.ac       2021-06-17 23:41:13.000000000 +0200
@@ -27,7 +27,7 @@
 # - reset micro version to zero when minor version is incremented
 # - reset minor version to zero when major version is incremented
 m4_define([va_api_major_version], [1])
-m4_define([va_api_minor_version], [11])
+m4_define([va_api_minor_version], [12])
 m4_define([va_api_micro_version], [0])
 
 m4_define([va_api_version],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.11.0/meson.build new/libva-2.12.0/meson.build
--- old/libva-2.11.0/meson.build        2021-03-23 11:54:35.000000000 +0100
+++ new/libva-2.12.0/meson.build        2021-06-17 23:41:13.000000000 +0200
@@ -7,7 +7,7 @@
 # - reset micro version to zero when VA-API major or minor version is changed
 project(
   'libva', 'c',
-  version : '2.11.0',
+  version : '2.12.0',
   meson_version : '>= 0.37.0',
   default_options : [ 'warning_level=1',
                       'buildtype=debugoptimized' ])
@@ -19,7 +19,7 @@
 # - reset micro version to zero when minor version is incremented
 # - reset minor version to zero when major version is incremented
 va_api_major_version = 1
-va_api_minor_version = 11
+va_api_minor_version = 12
 va_api_micro_version = 0
 
 va_api_version = '@0@.@1@.@2@'.format(va_api_major_version,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.11.0/va/va.h new/libva-2.12.0/va/va.h
--- old/libva-2.11.0/va/va.h    2021-03-23 11:54:35.000000000 +0100
+++ new/libva-2.12.0/va/va.h    2021-06-17 23:41:13.000000000 +0200
@@ -371,6 +371,30 @@
 #define VA_EXEC_MODE_POWER_SAVING 0x1
 #define VA_EXEC_MODE_PERFORMANCE  0x2
 
+/* Values used to describe device features. */
+/** The feature is not supported by the device.
+ *
+ * Any corresponding feature flag must not be set.
+ */
+#define VA_FEATURE_NOT_SUPPORTED  0
+/** The feature is supported by the device.
+ *
+ * The user may decide whether or not to use this feature.
+ *
+ * Note that support for a feature only indicates that the hardware
+ * is able to use it; whether it is actually a positive change to
+ * enable it in a given situation will depend on other factors
+ * including the input provided by the user.
+ */
+#define VA_FEATURE_SUPPORTED      1
+/** The feature is required by the device.
+ *
+ * The device does not support not enabling this feature, so any
+ * corresponding feature flag must be set and any additional
+ * configuration needed by the feature must be supplied.
+ */
+#define VA_FEATURE_REQUIRED       2
+
 /**
  * Returns a short english description of error_status
  */
@@ -956,6 +980,26 @@
      */
     VAConfigAttribProtectedContentUsage = 49,
 
+    /** \brief HEVC/H.265 encoding features.  Read-only.
+     *
+     * This attribute describes the supported features of an
+     * HEVC/H.265 encoder configuration.  The value returned uses the
+     * VAConfigAttribValEncHEVCFeatures type.
+     *
+     * If this attribute is supported by a driver then it must also
+     * support the VAConfigAttribEncHEVCBlockSizes attribute.
+     */
+    VAConfigAttribEncHEVCFeatures       = 50,
+    /** \brief HEVC/H.265 encoding block sizes.  Read-only.
+     *
+     * This attribute describes the supported coding tree and transform
+     * block sizes of an HEVC/H.265 encoder configuration.  The value
+     * returned uses the VAConfigAttribValEncHEVCBlockSizes type.
+     *
+     * If this attribute is supported by a driver then it must also
+     * support the VAConfigAttribEncHEVCFeatures attribute.
+     */
+    VAConfigAttribEncHEVCBlockSizes     = 51,
     /**@}*/
     VAConfigAttribTypeMax
 } VAConfigAttribType;
@@ -1581,6 +1625,13 @@
     /** \brief Surface usage hint, gives the driver a hint of intended usage 
      *  to optimize allocation (e.g. tiling) (int, read/write). */
     VASurfaceAttribUsageHint,
+    /** \brief List of possible DRM format modifiers (pointer, write).
+     *
+     * The value must be a pointer to a VADRMFormatModifierList. This can only
+     * be used when allocating a new buffer, it's invalid to use this attribute
+     * when importing an existing buffer.
+     */
+    VASurfaceAttribDRMFormatModifiers,
     /** \brief Number of surface attributes. */
     VASurfaceAttribCount
 } VASurfaceAttribType;
@@ -4828,7 +4879,17 @@
  * brightness etc. in the rendering process.  The application can query what
  * attributes are supported by the driver, and then set the appropriate 
attributes
  * before calling vaPutSurface()
+ *
+ * Display attributes can also be used to query/set platform or display 
adaptor (vaDisplay)
+ * related information. These attributes do not depend on vaConfig, and could 
not be used
+ * for vaPutSurface. Application can use 
vaQueryDisplayAttributes/vaGetDisplayAttributes
+ * at anytime after vaInitialize, but (for settable attributes) 
vaSetDisplayAttributes should be
+ * called after vaInitialize and before any other function call.
+ *
+ * To distinguish these two types of display attributes, display adaptor 
related attributes
+ * should be marked as "HW attribute" in the description.
  */
+
 /* PowerVR IEP Lite attributes */
 typedef enum
 {
@@ -4878,6 +4939,47 @@
 #define VA_RENDER_DEVICE_LOCAL      1
 #define VA_RENDER_DEVICE_EXTERNAL   2
 
+/**\brief sub device info
+ * Sub-device is the concept basing on the "device" behind "vaDisplay".
+ * If a device could be divided to several sub devices, the task of
+ * decode/encode/vpp could be assigned on one sub-device. So, application
+ * could choose the sub device before any other operations. After that,
+ * all of the task execution/resource allocation will be dispatched to
+ * the sub device. If application does not choose the sub device, driver
+ * will assign one as default.
+ *
+ * If the value == VA_ATTRIB_NOT_SUPPORTED, it mean that the attribute
+ * is unsupport or UNKNOWN.
+ */
+
+typedef union _VADisplayAttribValSubDevice{
+    struct{
+        /** \brief current sub device index, read - write */
+        uint32_t current_sub_device     : 4;
+        /** \brief sub devices count, read - only */
+        uint32_t sub_device_count       : 4;
+        /** \brief reserved bits for future, must be zero*/
+        uint32_t reserved               : 8;
+        /** \brief bit mask to indicate which sub_device is available, read 
only
+         * \code
+         * VADisplayAttribValSubDevice reg;
+         * VADisplayAttribute reg_attr;
+         * reg_attr.type = VADisplayAttribSubDevice;
+         * vaGetDisplayAttributes(dpy, &reg_attr, 1);
+         * reg.value = reg_attr.value;
+         *
+         * for(int i = 0; i < reg.bits.sub_device_count; i ++ ){
+         *    if((1<<i) & reg.bits.sub_device_mask){
+         *        printf("sub device  %d can be selected", i);
+         *    }
+         *}
+         * \endcode
+         */
+        uint32_t sub_device_mask       : 16;
+    }bits;
+    uint32_t value;
+}VADisplayAttribValSubDevice;
+
 /** Currently defined display attribute types */
 typedef enum
 {
@@ -4950,6 +5052,16 @@
      * specify vaPutSurface render area if there is no drawable on the monitor
      */
     VADisplayAttribRenderRect          = 18,
+    /*
+     * HW attribute, read/write, specify the sub device configure
+     */
+    VADisplayAttribSubDevice           = 19,
+    /*
+     * HW attribute. read only. specify whether vaCopy support on current HW
+     * The value of each bit should equal to 1 << VA_EXEC_MODE_XXX to represent
+     * modes of vaCopy
+     */
+    VADisplayAttribCopy                 = 20,
 } VADisplayAttribType;
 
 /* flags for VADisplayAttribute */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.11.0/va/va_drmcommon.h 
new/libva-2.12.0/va/va_drmcommon.h
--- old/libva-2.11.0/va/va_drmcommon.h  2021-03-23 11:54:35.000000000 +0100
+++ new/libva-2.12.0/va/va_drmcommon.h  2021-06-17 23:41:13.000000000 +0200
@@ -154,5 +154,22 @@
     } layers[4];
 } VADRMPRIMESurfaceDescriptor;
 
+/**
+ * \brief List of DRM format modifiers.
+ *
+ * To allocate surfaces with one of the modifiers specified in the array, call
+ * vaCreateSurfaces() with the VASurfaceAttribDRMFormatModifiers attribute set
+ * to point to an array of num_surfaces instances of this structure. The driver
+ * will select the optimal modifier in the list.
+ *
+ * DRM format modifiers are defined in drm_fourcc.h in the Linux kernel.
+ */
+typedef struct _VADRMFormatModifierList {
+       /** Number of modifiers. */
+       uint32_t num_modifiers;
+       /** Array of modifiers. */
+       uint64_t *modifiers;
+} VADRMFormatModifierList;
+
 
 #endif /* VA_DRM_COMMON_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.11.0/va/va_enc_hevc.h 
new/libva-2.12.0/va/va_enc_hevc.h
--- old/libva-2.11.0/va/va_enc_hevc.h   2021-03-23 11:54:35.000000000 +0100
+++ new/libva-2.12.0/va/va_enc_hevc.h   2021-06-17 23:41:13.000000000 +0200
@@ -45,6 +45,192 @@
  * @{
  */
 
+/** Attribute value for VAConfigAttribEncHEVCFeatures.
+ *
+ * This attribute decribes the supported features of an HEVC/H.265
+ * encoder configuration.
+ *
+ * All of the field values in this attribute are VA_FEATURE_* values,
+ * indicating support for the corresponding feature.
+ */
+typedef union VAConfigAttribValEncHEVCFeatures {
+    struct {
+        /** Separate colour planes.
+         *
+         * Allows setting separate_colour_plane_flag in the SPS.
+         */
+        uint32_t separate_colour_planes     : 2;
+        /** Scaling lists.
+         *
+         * Allows scaling_list() elements to be present in both the SPS
+         * and the PPS.  The decoded form of the scaling lists must also
+         * be supplied in a VAQMatrixBufferHEVC buffer when scaling lists
+         * are enabled.
+         */
+        uint32_t scaling_lists              : 2;
+        /** Asymmetric motion partitions.
+         *
+         * Allows setting amp_enabled_flag in the SPS.
+         */
+        uint32_t amp                        : 2;
+        /** Sample adaptive offset filter.
+         *
+         * Allows setting slice_sao_luma_flag and slice_sao_chroma_flag
+         * in slice headers.
+         */
+        uint32_t sao                        : 2;
+        /** PCM sample blocks.
+         *
+         * Allows setting pcm_enabled_flag in the SPS.  When enabled
+         * PCM parameters must be supplied with the sequence parameters,
+         * including block sizes which may be further constrained as
+         * noted in the VAConfigAttribEncHEVCBlockSizes attribute.
+         */
+        uint32_t pcm                        : 2;
+        /** Temporal motion vector Prediction.
+         *
+         * Allows setting slice_temporal_mvp_enabled_flag in slice
+         * headers.
+         */
+        uint32_t temporal_mvp               : 2;
+        /** Strong intra smoothing.
+         *
+         * Allows setting strong_intra_smoothing_enabled_flag in the SPS.
+         */
+        uint32_t strong_intra_smoothing     : 2;
+        /** Dependent slices.
+         *
+         * Allows setting dependent_slice_segment_flag in slice headers.
+         */
+        uint32_t dependent_slices           : 2;
+        /** Sign data hiding.
+         *
+         * Allows setting sign_data_hiding_enable_flag in the PPS.
+         */
+        uint32_t sign_data_hiding           : 2;
+        /** Constrained intra prediction.
+         *
+         * Allows setting constrained_intra_pred_flag in the PPS.
+         */
+        uint32_t constrained_intra_pred     : 2;
+        /** Transform skipping.
+         *
+         * Allows setting transform_skip_enabled_flag in the PPS.
+         */
+        uint32_t transform_skip             : 2;
+        /** QP delta within coding units.
+         *
+         * Allows setting cu_qp_delta_enabled_flag in the PPS.
+         */
+        uint32_t cu_qp_delta                : 2;
+        /** Weighted prediction.
+         *
+         * Allows setting weighted_pred_flag and weighted_bipred_flag in
+         * the PPS.  The pred_weight_table() data must be supplied with
+         * every slice header when weighted prediction is enabled.
+         */
+        uint32_t weighted_prediction        : 2;
+        /** Transform and quantisation bypass.
+         *
+         * Allows setting transquant_bypass_enabled_flag in the PPS.
+         */
+        uint32_t transquant_bypass          : 2;
+        /** Deblocking filter disable.
+         *
+         * Allows setting slice_deblocking_filter_disabled_flag.
+         */
+        uint32_t deblocking_filter_disable  : 2;
+        /* Reserved,should not be used, avoid conflict with 
VA_ATTRIB_NOT_SUPPORTED. */
+        uint32_t reserved                   : 2;
+    } bits;
+    uint32_t value;
+} VAConfigAttribValEncHEVCFeatures;
+
+/** Attribute value for VAConfigAttribEncHEVCBlockSizes.
+ *
+ * This attribute describes the supported coding tree and transform block
+ * sizes of an HEVC/H.265 encoder configuration
+ */
+typedef union VAConfigAttribValEncHEVCBlockSizes {
+    struct {
+        /** Largest supported size of coding tree blocks.
+         *
+         * CtbLog2SizeY must not be larger than this.
+         */
+        uint32_t log2_max_coding_tree_block_size_minus3    : 2;
+        /** Smallest supported size of coding tree blocks.
+         *
+         * CtbLog2SizeY must not be smaller than this.
+         *
+         * This may be the same as the maximum size, indicating that only
+         * one CTB size is supported.
+         */
+        uint32_t log2_min_coding_tree_block_size_minus3    : 2;
+
+        /** Smallest supported size of luma coding blocks.
+         *
+         * MinCbLog2SizeY must not be smaller than this.
+         */
+        uint32_t log2_min_luma_coding_block_size_minus3    : 2;
+
+        /** Largest supported size of luma transform blocks.
+         *
+         * MaxTbLog2SizeY must not be larger than this.
+         */
+        uint32_t log2_max_luma_transform_block_size_minus2 : 2;
+        /** Smallest supported size of luma transform blocks.
+         *
+         * MinTbLog2SizeY must not be smaller than this.
+         */
+        uint32_t log2_min_luma_transform_block_size_minus2 : 2;
+
+        /** Largest supported transform hierarchy depth in inter
+         *  coding units.
+         *
+         * max_transform_hierarchy_depth_inter must not be larger
+         * than this.
+         */
+        uint32_t max_max_transform_hierarchy_depth_inter   : 2;
+        /** Smallest supported transform hierarchy depth in inter
+         *  coding units.
+         *
+         * max_transform_hierarchy_depth_inter must not be smaller
+         * than this.
+         */
+        uint32_t min_max_transform_hierarchy_depth_inter   : 2;
+
+        /** Largest supported transform hierarchy depth in intra
+         *  coding units.
+         *
+         * max_transform_hierarchy_depth_intra must not be larger
+         * than this.
+         */
+        uint32_t max_max_transform_hierarchy_depth_intra   : 2;
+        /** Smallest supported transform hierarchy depth in intra
+         *  coding units.
+         *
+         * max_transform_hierarchy_depth_intra must not be smaller
+         * than this.
+         */
+        uint32_t min_max_transform_hierarchy_depth_intra   : 2;
+
+        /** Largest supported size of PCM coding blocks.
+         *
+         *  Log2MaxIpcmCbSizeY must not be larger than this.
+         */
+        uint32_t log2_max_pcm_coding_block_size_minus3     : 2;
+        /** Smallest supported size of PCM coding blocks.
+         *
+         *  Log2MinIpcmCbSizeY must not be smaller than this.
+         */
+        uint32_t log2_min_pcm_coding_block_size_minus3     : 2;
+
+        /** Reserved for future use. */
+        uint32_t reserved                                  : 10;
+    } bits;
+    uint32_t value;
+} VAConfigAttribValEncHEVCBlockSizes;
+
 /**
  * @name Picture flags
  *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.11.0/va/va_enc_vp9.h 
new/libva-2.12.0/va/va_enc_vp9.h
--- old/libva-2.11.0/va/va_enc_vp9.h    2021-03-23 11:54:35.000000000 +0100
+++ new/libva-2.12.0/va/va_enc_vp9.h    2021-06-17 23:41:13.000000000 +0200
@@ -472,7 +472,7 @@
 
     /** \brief log2 of number of tile columns
      *  Corresponds to the same VP9 syntax element in frame header.
-     *  value range [0..5]
+     *  value range [0..6]
      */
     uint8_t     log2_tile_columns;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.11.0/va/va_str.c new/libva-2.12.0/va/va_str.c
--- old/libva-2.11.0/va/va_str.c        2021-03-23 11:54:35.000000000 +0100
+++ new/libva-2.12.0/va/va_str.c        2021-06-17 23:41:13.000000000 +0200
@@ -141,6 +141,8 @@
     TOSTR(VAConfigAttribProtectedContentCipherMode);
     TOSTR(VAConfigAttribProtectedContentCipherSampleType);
     TOSTR(VAConfigAttribProtectedContentUsage);
+    TOSTR(VAConfigAttribEncHEVCFeatures);
+    TOSTR(VAConfigAttribEncHEVCBlockSizes);
     case VAConfigAttribTypeMax: break;
     }
     return "<unknown config attribute type>";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.11.0/va/va_trace.c 
new/libva-2.12.0/va/va_trace.c
--- old/libva-2.11.0/va/va_trace.c      2021-03-23 11:54:35.000000000 +0100
+++ new/libva-2.12.0/va/va_trace.c      2021-06-17 23:41:13.000000000 +0200
@@ -9,11 +9,11 @@
  * distribute, sub license, and/or sell copies of the Software, and to
  * permit persons to whom the Software is furnished to do so, subject to
  * the following conditions:
- * 
+ *
  * The above copyright notice and this permission notice (including the
  * next paragraph) shall be included in all copies or substantial portions
  * of the Software.
- * 
+ *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
@@ -144,11 +144,11 @@
     char *trace_surface_fn; /* file name */
 
     VAContextID  trace_context; /* current context */
-    
+
     VASurfaceID  trace_rendertarget; /* current render target */
     VAProfile trace_profile; /* current profile for buffers */
     VAEntrypoint trace_entrypoint; /* current entrypoint */
-    
+
     unsigned int trace_frame_no; /* current frame NO */
     unsigned int trace_slice_no; /* current slice NO */
     unsigned int trace_slice_size; /* current slice buffer size */
@@ -255,7 +255,7 @@
 #define DPY2TRACE_VIRCTX_EXIT(pva_trace)                                \
     UNLOCK_CONTEXT(pva_trace)
 
-#define TRACE_FUNCNAME(idx)    va_TraceMsg(trace_ctx, "==========%s\n", 
__func__); 
+#define TRACE_FUNCNAME(idx)    va_TraceMsg(trace_ctx, "==========%s\n", 
__func__);
 
 #define TRACE_NEWLINE() do { \
     va_TracePrint(trace_ctx, "\n"); \
@@ -282,7 +282,7 @@
                        unsigned int *chroma_u_offset,
                        unsigned int *chroma_v_offset,
                        unsigned int *buffer_name,
-                       void **buffer 
+                       void **buffer
                        );
 
 VAStatus vaUnlockSurface(VADisplay dpy,
@@ -1034,7 +1034,7 @@
         fwrite(tmp + trace_ctx->trace_surface_xoff,
                trace_ctx->trace_surface_width,
                pixel_byte, trace_ctx->trace_fp_surface);
-        
+
         tmp += luma_stride;
     }
 
@@ -1044,7 +1044,7 @@
             fwrite(tmp + trace_ctx->trace_surface_xoff,
                    trace_ctx->trace_surface_width,
                    pixel_byte, trace_ctx->trace_fp_surface);
-            
+
             tmp += chroma_u_stride;
         }
     }
@@ -1081,8 +1081,8 @@
 
 void va_TraceCreateConfig(
     VADisplay dpy,
-    VAProfile profile, 
-    VAEntrypoint entrypoint, 
+    VAProfile profile,
+    VAEntrypoint entrypoint,
     VAConfigAttrib *attrib_list,
     int num_attribs,
     VAConfigID *config_id /* out */
@@ -1093,7 +1093,7 @@
     DPY2TRACE_VIRCTX(dpy);
 
     TRACE_FUNCNAME(idx);
-    
+
     va_TraceMsg(trace_ctx, "\tprofile = %d\n", profile);
     va_TraceMsg(trace_ctx, "\tentrypoint = %d\n", entrypoint);
     va_TraceMsg(trace_ctx, "\tnum_attribs = %d\n", num_attribs);
@@ -1135,10 +1135,10 @@
 {
     int i, num;
     VASurfaceAttrib *p;
-    
+
     if (!attrib_list || !num_attribs)
         return;
-    
+
     p = attrib_list;
     num = *num_attribs;
     if (num > VASurfaceAttribCount)
@@ -1146,9 +1146,9 @@
 
     for (i=0; i<num; i++) {
         int type = p->value.type;
-        
+
         va_TraceMsg(trace_ctx, "\tattrib_list[%i] =\n", i);
-        
+
         va_TraceMsg(trace_ctx, "\t\ttype = %d\n", p->type);
         va_TraceMsg(trace_ctx, "\t\tflags = %d\n", p->flags);
         va_TraceMsg(trace_ctx, "\t\tvalue.type = %d\n", type);
@@ -1164,7 +1164,7 @@
             if ((p->type == VASurfaceAttribExternalBufferDescriptor) && 
p->value.value.p) {
                 VASurfaceAttribExternalBuffers *tmp = 
(VASurfaceAttribExternalBuffers *) p->value.value.p;
                 uint32_t j;
-                
+
                 va_TraceMsg(trace_ctx, 
"\t\t--VASurfaceAttribExternalBufferDescriptor\n");
                 va_TraceMsg(trace_ctx, "\t\t  pixel_format=0x%08x\n", 
tmp->pixel_format);
                 va_TraceMsg(trace_ctx, "\t\t  width=%d\n", tmp->width);
@@ -1209,7 +1209,7 @@
     DPY2TRACE_VIRCTX(dpy);
 
     TRACE_FUNCNAME(idx);
-    
+
     va_TraceMsg(trace_ctx, "\twidth = %d\n", width);
     va_TraceMsg(trace_ctx, "\theight = %d\n", height);
     va_TraceMsg(trace_ctx, "\tformat = %d\n", format);
@@ -1219,7 +1219,7 @@
         for (i = 0; i < num_surfaces; i++)
             va_TraceMsg(trace_ctx, "\t\tsurfaces[%d] = 0x%08x\n", i, 
surfaces[i]);
     }
-    
+
     va_TraceSurfaceAttributes(trace_ctx, attrib_list, &num_attribs);
 
     va_TraceMsg(trace_ctx, NULL);
@@ -1242,7 +1242,7 @@
         for (i = 0; i < num_surfaces; i++)
             va_TraceMsg(trace_ctx, "\t\tsurfaces[%d] = 0x%08x\n", i, 
surface_list[i]);
     }
-    
+
     va_TraceMsg(trace_ctx, NULL);
 
     DPY2TRACE_VIRCTX_EXIT(pva_trace);
@@ -1342,7 +1342,7 @@
     if(tra_ctx_id >= MAX_TRACE_CTX_NUM) {
         va_errorMessage(dpy, "Can't get trace context for ctx 0x%08x\n",
                 *context);
-        
+
         goto FAIL;
     }
 
@@ -1350,7 +1350,7 @@
     if(trace_ctx == NULL) {
         va_errorMessage(dpy, "Allocate trace context failed for ctx 0x%08x\n",
                 *context);
-        
+
         goto FAIL;
     }
 
@@ -1559,7 +1559,7 @@
         va_TraceMsg(trace_ctx, "\tbuf_id=0x%x\n", *buf_id);
     va_TraceMsg(trace_ctx, "\tsize=%u\n", size);
     va_TraceMsg(trace_ctx, "\tnum_elements=%u\n", num_elements);
-    
+
     va_TraceMsg(trace_ctx, NULL);
 }
 
@@ -1577,7 +1577,7 @@
 
     DPY2TRACECTX(dpy, VA_INVALID_ID, buf_id);
 
-    vaBufferInfo(dpy, trace_ctx->trace_context, buf_id, &type, &size, 
&num_elements);    
+    vaBufferInfo(dpy, trace_ctx->trace_context, buf_id, &type, &size, 
&num_elements);
 
     delete_trace_buf_info(pva_trace, buf_id);
 
@@ -1590,7 +1590,7 @@
     va_TraceMsg(trace_ctx, "\tbuf_id=0x%x\n", buf_id);
     va_TraceMsg(trace_ctx, "\tsize=%u\n", size);
     va_TraceMsg(trace_ctx, "\tnum_elements=%u\n", num_elements);
-    
+
     va_TraceMsg(trace_ctx, NULL);
 }
 
@@ -1658,13 +1658,13 @@
     VABufferType type;
     unsigned int size;
     unsigned int num_elements;
-    
+
     VACodedBufferSegment *buf_list;
     int i = 0;
 
     DPY2TRACECTX(dpy, VA_INVALID_ID, buf_id);
 
-    vaBufferInfo(dpy, trace_ctx->trace_context, buf_id, &type, &size, 
&num_elements);    
+    vaBufferInfo(dpy, trace_ctx->trace_context, buf_id, &type, &size, 
&num_elements);
 
     /* only trace CodedBuffer */
     if (type != VAEncCodedBufferType)
@@ -1684,7 +1684,7 @@
     buf_list = (VACodedBufferSegment *)(*pbuf);
     while (buf_list != NULL) {
         va_TraceMsg(trace_ctx, "\tCodedbuf[%d] =\n", i++);
-        
+
         va_TraceMsg(trace_ctx, "\t   size = %u\n", buf_list->size);
         va_TraceMsg(trace_ctx, "\t   bit_offset = %u\n", buf_list->bit_offset);
         va_TraceMsg(trace_ctx, "\t   status = 0x%08x\n", buf_list->status);
@@ -1697,7 +1697,7 @@
 
             fflush(trace_ctx->trace_fp_codedbuf);
         }
-        
+
         buf_list = buf_list->next;
     }
     va_TraceMsg(trace_ctx, NULL);
@@ -1718,7 +1718,7 @@
     FILE *fp = NULL;
 
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
-    
+
     va_TracePrint(trace_ctx, "--%s\n", vaBufferTypeStr(type));
 
     if(trace_ctx->plog_file)
@@ -1737,7 +1737,7 @@
         }
         fprintf(fp, "\n");
     }
-    
+
     va_TraceMsg(trace_ctx, NULL);
 
     return;
@@ -1870,7 +1870,7 @@
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
 
     trace_ctx->trace_slice_no++;
-    
+
     trace_ctx->trace_slice_size = p->slice_data_size;
 
     va_TraceMsg(trace_ctx,"VASliceParameterBufferMPEG2\n");
@@ -2026,7 +2026,7 @@
 {
     int i;
     VAPictureParameterBufferMPEG4 *p=(VAPictureParameterBufferMPEG4 *)data;
-    
+
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
 
     va_TraceMsg(trace_ctx,"*VAPictureParameterBufferMPEG4\n");
@@ -2138,9 +2138,9 @@
 {
     VAEncSequenceParameterBufferMPEG4 *p = (VAEncSequenceParameterBufferMPEG4 
*)data;
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
-    
+
     va_TraceMsg(trace_ctx, "\t--VAEncSequenceParameterBufferMPEG4\n");
-    
+
     va_TraceMsg(trace_ctx, "\tprofile_and_level_indication = %d\n", 
p->profile_and_level_indication);
     va_TraceMsg(trace_ctx, "\tintra_period = %d\n", p->intra_period);
     va_TraceMsg(trace_ctx, "\tvideo_object_layer_width = %d\n", 
p->video_object_layer_width);
@@ -2168,7 +2168,7 @@
 {
     VAEncPictureParameterBufferMPEG4 *p = (VAEncPictureParameterBufferMPEG4 
*)data;
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
-    
+
     va_TraceMsg(trace_ctx, "\t--VAEncPictureParameterBufferMPEG4\n");
     va_TraceMsg(trace_ctx, "\treference_picture = 0x%08x\n", 
p->reference_picture);
     va_TraceMsg(trace_ctx, "\treconstructed_picture = 0x%08x\n", 
p->reconstructed_picture);
@@ -2194,7 +2194,7 @@
     void *data)
 {
     VASliceParameterBufferMPEG4 *p=(VASliceParameterBufferMPEG4 *)data;
-    
+
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
 
     trace_ctx->trace_slice_no++;
@@ -2300,12 +2300,12 @@
     va_TraceMsg(trace_ctx, "\tCurrPic.frame_idx = %d\n", 
p->CurrPic.pic_order_cnt);
     va_TraceMsg(trace_ctx, "\tCurrPic.flags = %d\n", p->CurrPic.flags);
 
-    va_TraceMsg(trace_ctx, "\tReferenceFrames 
(picture_id-pic_order_cnt-flags:\n");
+    va_TraceMsg(trace_ctx, "\tReferenceFrames 
(picture_id-pic_order_cnt-flags):\n");
     for (i = 0; i < 15; i++)
     {
         if ((p->ReferenceFrames[i].picture_id != VA_INVALID_SURFACE) &&
             ((p->ReferenceFrames[i].flags & VA_PICTURE_HEVC_INVALID) == 0)) {
-            va_TraceMsg(trace_ctx, "\t\t%08d-%08d-0x%08x\n",
+            va_TraceMsg(trace_ctx, "\t\t0x%08x-%08d-0x%08x\n",
                         p->ReferenceFrames[i].picture_id,
                         p->ReferenceFrames[i].pic_order_cnt,
                         p->ReferenceFrames[i].flags);
@@ -2788,13 +2788,13 @@
 
     va_TracePrint(trace_ctx, "\t--VAEncPictureParameterBufferHEVC\n");
 
-    va_TraceMsg(trace_ctx, "\tdecoded_curr_pic.picture_id = %d\n", 
p->decoded_curr_pic.picture_id);
+    va_TraceMsg(trace_ctx, "\tdecoded_curr_pic.picture_id = 0x%08x\n", 
p->decoded_curr_pic.picture_id);
     va_TraceMsg(trace_ctx, "\tdecoded_curr_pic.pic_order_cnt = %d\n", 
p->decoded_curr_pic.pic_order_cnt);
     va_TraceMsg(trace_ctx, "\tdecoded_curr_pic.flags = %d\n", 
p->decoded_curr_pic.flags);
 
     for(i = 0; i < 15; i ++)
     {
-        va_TraceMsg(trace_ctx, "\treference_frames[%d].picture_id = %d\n", i, 
p->reference_frames[i].picture_id);
+        va_TraceMsg(trace_ctx, "\treference_frames[%d].picture_id = 0x%08x\n", 
i, p->reference_frames[i].picture_id);
         va_TraceMsg(trace_ctx, "\treference_frames[%d].pic_order_cnt = %d\n", 
i, p->reference_frames[i].pic_order_cnt);
         va_TraceMsg(trace_ctx, "\treference_frames[%d].flags = %d\n", i, 
p->reference_frames[i].flags);
     }
@@ -2881,10 +2881,10 @@
 
     for(i = 0; i < 15; i ++)
     {
-        va_TraceMsg(trace_ctx, "\tref_pic_list0[%d].picture_id = %d\n", i, 
p->ref_pic_list0[i].picture_id);
+        va_TraceMsg(trace_ctx, "\tref_pic_list0[%d].picture_id = 0x%08x\n", i, 
p->ref_pic_list0[i].picture_id);
         va_TraceMsg(trace_ctx, "\tref_pic_list0[%d].pic_order_cnt = %d\n", i, 
p->ref_pic_list0[i].pic_order_cnt);
         va_TraceMsg(trace_ctx, "\tref_pic_list0[%d].flags = %d\n", i, 
p->ref_pic_list0[i].flags);
-        va_TraceMsg(trace_ctx, "\tref_pic_list1[%d].picture_id = %d\n", i, 
p->ref_pic_list1[i].picture_id);
+        va_TraceMsg(trace_ctx, "\tref_pic_list1[%d].picture_id = 0x%08x\n", i, 
p->ref_pic_list1[i].picture_id);
         va_TraceMsg(trace_ctx, "\tref_pic_list1[%d].pic_order_cnt = %d\n", i, 
p->ref_pic_list1[i].pic_order_cnt);
         va_TraceMsg(trace_ctx, "\tref_pic_list1[%d].flags = %d\n", i, 
p->ref_pic_list1[i].flags);
     }
@@ -2953,7 +2953,7 @@
 {
     int i;
     VAPictureParameterBufferH264 *p = (VAPictureParameterBufferH264*)data;
-    
+
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
 
     va_TraceMsg(trace_ctx, "\t--VAPictureParameterBufferH264\n");
@@ -2964,7 +2964,7 @@
     va_TraceMsg(trace_ctx, "\tCurrPic.TopFieldOrderCnt = %d\n", 
p->CurrPic.TopFieldOrderCnt);
     va_TraceMsg(trace_ctx, "\tCurrPic.BottomFieldOrderCnt = %d\n", 
p->CurrPic.BottomFieldOrderCnt);
 
-    va_TraceMsg(trace_ctx, "\tReferenceFrames 
(TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags:\n");
+    va_TraceMsg(trace_ctx, "\tReferenceFrames 
(TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):\n");
     for (i = 0; i < 16; i++)
     {
         if ((p->ReferenceFrames[i].picture_id != VA_INVALID_SURFACE) &&
@@ -3317,7 +3317,7 @@
 
     if (!p)
         return;
-    
+
     va_TraceMsg(trace_ctx, "\t--VAEncSliceParameterBufferH264\n");
     va_TraceMsg(trace_ctx, "\tmacroblock_address = %u\n", 
p->macroblock_address);
     va_TraceMsg(trace_ctx, "\tnum_macroblocks = %u\n", p->num_macroblocks);
@@ -3336,8 +3336,8 @@
 
     va_TraceMsg(trace_ctx, "\tRefPicList0 
(TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):\n");
 
-    
-    
+
+
     for (i = 0; i < 32; i++) {
         if ((p->RefPicList0[i].picture_id != VA_INVALID_SURFACE) &&
             ((p->RefPicList0[i].flags & VA_PICTURE_H264_INVALID) == 0))
@@ -3350,7 +3350,7 @@
         else
             break;
     }
-    
+
     va_TraceMsg(trace_ctx, "\tRefPicList1 
(TopFieldOrderCnt-BottomFieldOrderCnt-picture_id-frame_idx-flags):\n");
     for (i = 0; i < 32; i++) {
         if ((p->RefPicList1[i].picture_id != VA_INVALID_SURFACE) &&
@@ -3365,7 +3365,7 @@
         else
             break;
     }
-    
+
     va_TraceMsg(trace_ctx, "\tluma_log2_weight_denom = %d\n", 
p->luma_log2_weight_denom);
     va_TraceMsg(trace_ctx, "\tchroma_log2_weight_denom = %d\n", 
p->chroma_log2_weight_denom);
     va_TraceMsg(trace_ctx, "\tluma_weight_l0_flag = %d\n", 
p->luma_weight_l0_flag);
@@ -3454,7 +3454,7 @@
 {
     VAEncMiscParameterBuffer* tmp = (VAEncMiscParameterBuffer*)data;
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
-    
+
     switch (tmp->type) {
     case VAEncMiscParameterTypeFrameRate:
     {
@@ -3491,7 +3491,7 @@
     case VAEncMiscParameterTypeMaxSliceSize:
     {
         VAEncMiscParameterMaxSliceSize *p = (VAEncMiscParameterMaxSliceSize 
*)tmp->data;
-        
+
         va_TraceMsg(trace_ctx, "\t--VAEncMiscParameterTypeMaxSliceSize\n");
         va_TraceMsg(trace_ctx, "\tmax_slice_size = %d\n", p->max_slice_size);
         break;
@@ -3499,7 +3499,7 @@
     case VAEncMiscParameterTypeAIR:
     {
         VAEncMiscParameterAIR *p = (VAEncMiscParameterAIR *)tmp->data;
-        
+
         va_TraceMsg(trace_ctx, "\t--VAEncMiscParameterAIR\n");
         va_TraceMsg(trace_ctx, "\tair_num_mbs = %d\n", p->air_num_mbs);
         va_TraceMsg(trace_ctx, "\tair_threshold = %d\n", p->air_threshold);
@@ -3647,13 +3647,13 @@
 {
     VAPictureParameterBufferVC1* p = (VAPictureParameterBufferVC1*)data;
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
-    
+
     va_TraceMsg(trace_ctx, "\t--VAPictureParameterBufferVC1\n");
-    
+
     va_TraceMsg(trace_ctx, "\tforward_reference_picture = 0x%08x\n", 
p->forward_reference_picture);
     va_TraceMsg(trace_ctx, "\tbackward_reference_picture = 0x%08x\n", 
p->backward_reference_picture);
     va_TraceMsg(trace_ctx, "\tinloop_decoded_picture = 0x%08x\n", 
p->inloop_decoded_picture);
-    
+
     va_TraceMsg(trace_ctx, "\tpulldown = %d\n", 
p->sequence_fields.bits.pulldown);
     va_TraceMsg(trace_ctx, "\tinterlace = %d\n", 
p->sequence_fields.bits.interlace);
     va_TraceMsg(trace_ctx, "\ttfcntrflag = %d\n", 
p->sequence_fields.bits.tfcntrflag);
@@ -4156,12 +4156,12 @@
       va_TraceMsg(trace_ctx, "\t\tfilm_grain_info.ar_coeffs_cb[%d] = %d\n", i, 
p->film_grain_info.ar_coeffs_cb[i]);
     for (i=0;i<25;i++)
       va_TraceMsg(trace_ctx, "\t\tfilm_grain_info.ar_coeffs_cr[%d] = %d\n", i, 
p->film_grain_info.ar_coeffs_cr[i]);
-    va_TraceMsg(trace_ctx, "\t\tfilm_grain_info.cb_mult = %d\n", i, 
p->film_grain_info.cb_mult);
-    va_TraceMsg(trace_ctx, "\t\tfilm_grain_info.cb_luma_mult = %d\n", i, 
p->film_grain_info.cb_luma_mult);
-    va_TraceMsg(trace_ctx, "\t\tfilm_grain_info.cb_offset = %d\n", i, 
p->film_grain_info.cb_offset);
-    va_TraceMsg(trace_ctx, "\t\tfilm_grain_info.cr_mult = %d\n", i, 
p->film_grain_info.cr_mult);
-    va_TraceMsg(trace_ctx, "\t\tfilm_grain_info.cr_luma_mult = %d\n", i, 
p->film_grain_info.cr_luma_mult);
-    va_TraceMsg(trace_ctx, "\t\tfilm_grain_info.cr_offset = %d\n", i, 
p->film_grain_info.cr_offset);
+    va_TraceMsg(trace_ctx, "\t\tfilm_grain_info.cb_mult = %d\n", 
p->film_grain_info.cb_mult);
+    va_TraceMsg(trace_ctx, "\t\tfilm_grain_info.cb_luma_mult = %d\n", 
p->film_grain_info.cb_luma_mult);
+    va_TraceMsg(trace_ctx, "\t\tfilm_grain_info.cb_offset = %d\n", 
p->film_grain_info.cb_offset);
+    va_TraceMsg(trace_ctx, "\t\tfilm_grain_info.cr_mult = %d\n", 
p->film_grain_info.cr_mult);
+    va_TraceMsg(trace_ctx, "\t\tfilm_grain_info.cr_luma_mult = %d\n", 
p->film_grain_info.cr_luma_mult);
+    va_TraceMsg(trace_ctx, "\t\tfilm_grain_info.cr_offset = %d\n", 
p->film_grain_info.cr_offset);
 
     va_TraceMsg(trace_ctx, "\ttile_cols = %d\n", p->tile_cols);
     va_TraceMsg(trace_ctx, "\ttile_rows = %d\n", p->tile_rows);
@@ -4284,7 +4284,7 @@
     va_TraceMsg(trace_ctx, "\tref_flags.bits.no_ref_gf = %d\n", 
p->ref_flags.bits.no_ref_gf);
     va_TraceMsg(trace_ctx, "\tref_flags.bits.no_ref_arf = %d\n", 
p->ref_flags.bits.no_ref_arf);
     va_TraceMsg(trace_ctx, "\tref_flags.bits.no_ref_arf = 0x%08x\n", 
p->ref_flags.bits.reserved);
-    
+
     va_TraceMsg(trace_ctx, "\tpic_flags.bits.frame_type = %d\n", 
p->pic_flags.bits.frame_type);
     va_TraceMsg(trace_ctx, "\tpic_flags.bits.version = %d\n", 
p->pic_flags.bits.version);
     va_TraceMsg(trace_ctx, "\tpic_flags.bits.show_frame = %d\n", 
p->pic_flags.bits.show_frame);
@@ -4579,9 +4579,9 @@
 {
     VAEncSequenceParameterBufferH263 *p = (VAEncSequenceParameterBufferH263 
*)data;
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
-    
+
     va_TraceMsg(trace_ctx, "\t--VAEncSequenceParameterBufferH263\n");
-    
+
     va_TraceMsg(trace_ctx, "\tintra_period = %d\n", p->intra_period);
     va_TraceMsg(trace_ctx, "\tbits_per_second = %d\n", p->bits_per_second);
     va_TraceMsg(trace_ctx, "\tframe_rate = %d\n", p->frame_rate);
@@ -4604,7 +4604,7 @@
 {
     VAEncPictureParameterBufferH263 *p = (VAEncPictureParameterBufferH263 
*)data;
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
-    
+
     va_TraceMsg(trace_ctx, "\t--VAEncPictureParameterBufferH263\n");
     va_TraceMsg(trace_ctx, "\treference_picture = 0x%08x\n", 
p->reference_picture);
     va_TraceMsg(trace_ctx, "\treconstructed_picture = 0x%08x\n", 
p->reconstructed_picture);
@@ -4628,9 +4628,9 @@
 {
     VAEncPictureParameterBufferJPEG *p = (VAEncPictureParameterBufferJPEG 
*)data;
     int i;
-    
+
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
-    
+
     va_TraceMsg(trace_ctx, "\t--VAEncPictureParameterBufferJPEG\n");
     va_TraceMsg(trace_ctx, "\treconstructed_picture = 0x%08x\n", 
p->reconstructed_picture);
     va_TraceMsg(trace_ctx, "\tcoded_buf = %08x\n", p->coded_buf);
@@ -4672,7 +4672,7 @@
 {
     VAQMatrixBufferJPEG *p = (VAQMatrixBufferJPEG *)data;
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
-    
+
     va_TraceMsg(trace_ctx, "\t--VAQMatrixBufferJPEG\n");
     va_TraceMsg(trace_ctx, "\tload_lum_quantiser_matrix = %d", 
p->load_lum_quantiser_matrix);
     if (p->load_lum_quantiser_matrix) {
@@ -4694,9 +4694,9 @@
         }
         va_TraceMsg(trace_ctx, "\n");
     }
-    
+
     va_TraceMsg(trace_ctx, NULL);
-    
+
     return;
 }
 
@@ -4712,9 +4712,9 @@
 {
     VAEncSliceParameterBufferJPEG *p = (VAEncSliceParameterBufferJPEG *)data;
     int i;
-    
+
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
-    
+
     va_TraceMsg(trace_ctx, "\t--VAEncSliceParameterBufferJPEG\n");
     va_TraceMsg(trace_ctx, "\trestart_interval = 0x%04x\n", 
p->restart_interval);
     va_TraceMsg(trace_ctx, "\tnum_components = 0x%08x\n", p->num_components);
@@ -4724,9 +4724,9 @@
         va_TraceMsg(trace_ctx, "\t\tdc_table_selector = %d\n", 
p->components[i].dc_table_selector);
         va_TraceMsg(trace_ctx, "\t\tac_table_selector = %d\n", 
p->components[i].ac_table_selector);
     }
-    
+
     va_TraceMsg(trace_ctx, NULL);
-    
+
     return;
 }
 
@@ -4954,7 +4954,7 @@
 )
 {
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
-    
+
     switch (type) {
     case VAPictureParameterBufferType:
         va_TraceVAPictureParameterBufferH264(dpy, context, buffer, type, size, 
num_elements, pbuf);
@@ -4963,7 +4963,7 @@
         va_TraceVAIQMatrixBufferH264(dpy, context, buffer, type, size, 
num_elements, pbuf);
         break;
     case VABitPlaneBufferType:
-        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, 
pbuf);        
+        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, 
pbuf);
         break;
     case VASliceGroupMapBufferType:
         va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, 
pbuf);
@@ -4975,10 +4975,10 @@
         va_TraceVABuffers(dpy, context, buffer, type, 
trace_ctx->trace_slice_size, num_elements, pbuf);
         break;
     case VAMacroblockParameterBufferType:
-        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, 
pbuf);        
+        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, 
pbuf);
         break;
     case VAResidualDataBufferType:
-        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, 
pbuf);        
+        va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, 
pbuf);
         break;
     case VADeblockingParameterBufferType:
         va_TraceVABuffers(dpy, context, buffer, type, size, num_elements, 
pbuf);
@@ -5005,7 +5005,7 @@
     case VAEncPackedHeaderParameterBufferType:
         va_TraceVAEncPackedHeaderParameterBufferType(dpy, context, buffer, 
type, size, num_elements, pbuf);
         break;
-        
+
     case VAEncMiscParameterBufferType:
         va_TraceVAEncMiscParameterBuffer(dpy, context, buffer, type, size, 
num_elements, pbuf);
         break;
@@ -5432,16 +5432,16 @@
     DPY2TRACECTX(dpy, context, VA_INVALID_ID);
 
     TRACE_FUNCNAME(idx);
-    
+
     va_TraceMsg(trace_ctx, "\tcontext = 0x%08x\n", context);
     va_TraceMsg(trace_ctx, "\tnum_buffers = %d\n", num_buffers);
     if (buffers == NULL)
         return;
-    
+
     for (i = 0; i < num_buffers; i++) {
         unsigned char *pbuf = NULL;
         unsigned int j;
-        
+
         /* get buffer type information */
         vaBufferInfo(dpy, context, buffers[i], &type, &size, &num_elements);
 
@@ -5454,7 +5454,7 @@
         vaMapBuffer(dpy, buffers[i], (void **)&pbuf);
         if (pbuf == NULL)
             continue;
-        
+
         switch (trace_ctx->trace_profile) {
         case VAProfileMPEG2Simple:
         case VAProfileMPEG2Main:
@@ -5476,7 +5476,7 @@
         case VAProfileH264ConstrainedBaseline:
             for (j=0; j<num_elements; j++) {
                 va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
-                
+
                 va_TraceH264Buf(dpy, context, buffers[i], type, size, 
num_elements, pbuf + size*j);
             }
             break;
@@ -5485,21 +5485,21 @@
         case VAProfileVC1Advanced:
             for (j=0; j<num_elements; j++) {
                 va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
-                
+
                 va_TraceVC1Buf(dpy, context, buffers[i], type, size, 
num_elements, pbuf + size*j);
             }
             break;
         case VAProfileH263Baseline:
             for (j=0; j<num_elements; j++) {
                 va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
-                
+
                 va_TraceH263Buf(dpy, context, buffers[i], type, size, 
num_elements, pbuf + size*j);
             }
             break;
         case VAProfileJPEGBaseline:
             for (j=0; j<num_elements; j++) {
                 va_TraceMsg(trace_ctx, "\telement[%d] =\n", j);
-                
+
                 va_TraceJPEGBuf (dpy, context, buffers[i], type, size, 
num_elements, pbuf + size*j);
             }
             break;
@@ -5598,7 +5598,7 @@
     if ((encode && (va_trace_flag & VA_TRACE_FLAG_SURFACE_ENCODE))||
         (jpeg && (va_trace_flag & VA_TRACE_FLAG_SURFACE_JPEG)))
         va_TraceSurface(dpy, context);
-    
+
     /* trace decoded surface, do it after HW completes rendering */
     if (decode && ((va_trace_flag & VA_TRACE_FLAG_SURFACE_DECODE))) {
         vaSyncSurface(dpy, trace_ctx->trace_rendertarget);
@@ -5651,7 +5651,7 @@
     TRACE_FUNCNAME(idx);
     va_TraceMsg(trace_ctx, "\tconfig = 0x%08x\n", config);
     va_TraceSurfaceAttributes(trace_ctx, attrib_list, num_attribs);
-    
+
     va_TraceMsg(trace_ctx, NULL);
 
     DPY2TRACE_VIRCTX_EXIT(pva_trace);
@@ -5728,7 +5728,7 @@
     DPY2TRACE_VIRCTX(dpy);
 
     TRACE_FUNCNAME(idx);
-    
+
     va_TraceMsg(trace_ctx, "\tmax_display_attributes = %d\n", number);
     va_TraceMsg(trace_ctx, NULL);
 
@@ -5750,7 +5750,7 @@
 
     TRACE_FUNCNAME(idx);
     va_TraceMsg(trace_ctx, "\tnum_attributes = %d\n", *num_attributes);
-    
+
     for (i=0; i<*num_attributes; i++) {
         va_TraceMsg(trace_ctx, "\tattr_list[%d] =\n", i);
         va_TraceMsg(trace_ctx, "\t  type = 0x%08x\n", attr_list[i].type);
@@ -5841,7 +5841,7 @@
     DPY2TRACE_VIRCTX(dpy);
 
     TRACE_FUNCNAME(idx);
-    
+
     va_TraceMsg(trace_ctx, "\tsurface = 0x%08x\n", surface);
     va_TraceMsg(trace_ctx, "\tdraw = 0x%p\n", draw);
     va_TraceMsg(trace_ctx, "\tsrcx = %d\n", srcx);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libva-2.11.0/va/va_vpp.h new/libva-2.12.0/va/va_vpp.h
--- old/libva-2.11.0/va/va_vpp.h        2021-03-23 11:54:35.000000000 +0100
+++ new/libva-2.12.0/va/va_vpp.h        2021-06-17 23:41:13.000000000 +0200
@@ -253,6 +253,8 @@
     VAProcFilterHVSNoiseReduction,
     /** \brief High Dynamic Range Tone Mapping. */
     VAProcFilterHighDynamicRangeToneMapping,
+    /** \brief Three-Dimensional Look Up Table (3DLUT). */
+    VAProcFilter3DLUT,
     /** \brief Number of video filters. */
     VAProcFilterCount
 } VAProcFilterType;
@@ -1298,6 +1300,30 @@
     float                             value;
 } VAProcFilterParameterBufferTotalColorCorrection;
 
+/** @name Video Processing Human Vision System (HVS) Denoise Mode.*/
+/**@{*/
+/**
+ *  \brief Default Mode.
+ *  This mode is decided in driver to the appropriate mode.
+ */
+#define VA_PROC_HVS_DENOISE_DEFAULT               0x0000
+/**
+ *  \brief Auto BDRate Mode.
+ *  Indicates auto BD rate improvement in pre-processing (such as before video 
encoding), ignore Strength.
+ */
+#define VA_PROC_HVS_DENOISE_AUTO_BDRATE           0x0001
+/**
+ *  \brief Auto Subjective Mode.
+ *  Indicates auto subjective quality improvement in pre-processing (such as 
before video encoding), ignore Strength.
+ */
+#define VA_PROC_HVS_DENOISE_AUTO_SUBJECTIVE       0x0002
+/**
+ *  \brief Manual Mode.
+ *  Indicates manual mode, allow to adjust the denoise strength manually (need 
to set Strength explicitly).
+ */
+#define VA_PROC_HVS_DENOISE_MANUAL                0x0003
+/**@}*/
+
 /** \brief Human Vision System(HVS) Noise reduction filter parametrization. */
 typedef struct _VAProcFilterParameterBufferHVSNoiseReduction {
     /** \brief Filter type. Shall be set to #VAProcFilterHVSNoiseReduction. */
@@ -1313,8 +1339,14 @@
      *  Value 10 is the default value.
      */
     uint16_t            strength;
+    /**
+     *  \brief HVS Denoise Mode which controls denoise method.
+     *  It is a value of VA_PROC_HVS_DENOISE_xxx.
+     *  Please see the definition of VA_PROC_HVS_DENOISE_xxx.
+     */
+    uint16_t            mode;
     /** \brief Reserved bytes for future use, must be zero */
-    uint16_t            va_reserved[VA_PADDING_HIGH];
+    uint16_t            va_reserved[VA_PADDING_HIGH - 1];
 } VAProcFilterParameterBufferHVSNoiseReduction;
 
 /** \brief High Dynamic Range(HDR) Tone Mapping filter parametrization. */
@@ -1333,6 +1365,90 @@
     uint32_t            va_reserved[VA_PADDING_HIGH];
 } VAProcFilterParameterBufferHDRToneMapping;
 
+/** @name 3DLUT Channel Layout and Mapping */
+/**@{*/
+/** \brief 3DLUT Channel Layout is unknown. */
+#define VA_3DLUT_CHANNEL_UNKNOWN              0x00000000
+/** \brief 3DLUT Channel Layout is R, G, B, the default layout. Map RGB to 
RGB. */
+#define VA_3DLUT_CHANNEL_RGB_RGB              0x00000001
+/** \brief 3DLUT Channel Layout is Y, U, V. Map YUV to RGB. */
+#define VA_3DLUT_CHANNEL_YUV_RGB              0x00000002
+/** \brief 3DLUT Channel Layout is V, U, Y. Map VUY to RGB. */
+#define VA_3DLUT_CHANNEL_VUY_RGB              0x00000004
+/**@}*/
+
+/**
+  *  \brief 3DLUT filter parametrization.
+  *
+  *  3DLUT (Three Dimensional Look Up Table) is often used when converting an 
image or a video frame
+  *  from one color representation to another, for example, when converting 
log and gamma encodings,
+  *  changing the color space, applying a color correction, changing the 
dynamic range, gamut mapping etc.
+  *
+  *  This buffer defines 3DLUT attributes and memory layout. The typical 3DLUT 
has fixed number(lut_size)
+  *  per dimension and memory layout is 3 dimensional array as 
3dlut[stride_0][stride_1][stride_2] (lut_size
+  *  shall be smaller than stride_0/1/2).
+  *
+  *  API user should query hardware capability by using the 
VAProcFilterCap3DLUT to get the 3DLUT attributes
+  *  which hardware supports, and use these attributes. For example, if the 
user queries hardware, the API user
+  *  could get caps with 3dlut[33][33][64] (lut_size = 33, lut_stride[0/1/2] = 
33/33/64). API user shall not
+  *  use the attributes which hardware can not support.
+  *
+  *  3DLUT is usually used to transform input RGB/YUV values in one color 
space to output RGB values in another
+  *  color space. Based on 1) the format and color space of VPP input and 
output and 2) 3DLUT memory layout and
+  *  channel mapping, driver will enable some color space conversion 
implicitly if needed. For example, the input of
+  *  VPP is P010 format in BT2020 color space, the output of VPP is NV12 in 
BT709 color space and the 3DLUT channel
+  *  mapping is VA_3DLUT_CHANNEL_RGB_RGB, driver could build the data pipeline 
as P010(BT2020)->RGB(BT2020)
+  *  ->3DULT(BT709)->NV12(BT709). Please note, the limitation of 3DLUT filter 
color space is that the color space of
+  *  3DLUT filter input data needs to be same as the input data of VPP; the 
color space of 3DLUT filter output data
+  *  needs to be same as the output data of VPP; format does not have such 
limitation.
+  */
+typedef struct _VAProcFilterParameterBuffer3DLUT {
+    /** \brief Filter type. Shall be set to #VAProcFilter3DLUT.*/
+    VAProcFilterType    type;
+
+    /** \brief lut_surface contains 3DLUT data in the 3DLUT memory layout, 
must be linear */
+    VASurfaceID         lut_surface;
+    /**
+      * \brief lut_size is the number of valid points on every dimension of 
the three dimensional look up table.
+      * The size of LUT (lut_size) shall be same among every dimension of the 
three dimensional look up table.
+      * The size of LUT (lut_size) shall be smaller than lut_stride[0/1/2].
+      */
+    uint16_t            lut_size;
+    /**
+      *  \brief lut_stride are the number of points on every dimension of the 
three dimensional look up table.
+      *  Three dimension can has 3 different stride, 
lut3d[lut_stride[0]][lut_stride[1]][lut_stride[2]].
+      *  But the valid point shall start from 0, the range of valid point is 
[0, lut_size-1] for every dimension.
+      */
+    uint16_t            lut_stride[3];
+    /** \brief bit_depth is the number of bits for every channel R, G or B (or 
Y, U, V) */
+    uint16_t            bit_depth;
+    /** \brief num_channel is the number of channels */
+    uint16_t            num_channel;
+
+    /** \brief channel_mapping defines the mapping of input and output 
channels, could be one of VA_3DLUT_CHANNEL_XXX*/
+    uint32_t            channel_mapping;
+
+    /** \brief reserved bytes for future use, must be zero */
+    uint32_t            va_reserved[VA_PADDING_HIGH];
+} VAProcFilterParameterBuffer3DLUT;
+
+/** \brief Capabilities specification for the 3DLUT filter. */
+typedef struct _VAProcFilterCap3DLUT {
+    /** \brief lut_size is the number of valid points on every dimension of 
the three dimensional look up table. */
+    uint16_t            lut_size;
+    /**  \brief lut_stride are the number of points on every dimension of the 
three dimensional look up table. 
lut3d[lut_stride[0]][lut_stride[1]][lut_stride[2]]*/
+    uint16_t            lut_stride[3];
+    /** \brief bit_depth is the number of bits for every channel R, G or B (or 
Y, U, V) */
+    uint16_t            bit_depth;
+    /** \brief num_channel is the number of channels */
+    uint16_t            num_channel;
+    /** \brief channel_mapping defines the mapping of channels, could be some 
combination of VA_3DLUT_CHANNEL_XXX*/
+    uint32_t            channel_mapping;
+
+    /** \brief Reserved bytes for future use, must be zero */
+    uint32_t            va_reserved[VA_PADDING_HIGH];
+} VAProcFilterCap3DLUT;
+
 /**
  * \brief Default filter cap specification (single range value).
  *

Reply via email to