Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libva-utils for openSUSE:Factory checked in at 2023-04-16 16:07:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libva-utils (Old) and /work/SRC/openSUSE:Factory/.libva-utils.new.19717 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libva-utils" Sun Apr 16 16:07:07 2023 rev:22 rq:1079662 version:2.18.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libva-utils/libva-utils.changes 2023-01-16 18:02:24.395991113 +0100 +++ /work/SRC/openSUSE:Factory/.libva-utils.new.19717/libva-utils.changes 2023-04-16 16:07:30.756968217 +0200 @@ -1,0 +2,21 @@ +Sat Apr 15 17:22:58 UTC 2023 - Bjørn Lie <[email protected]> + +- Update to version 2.18.1: + * doc: Add build and install libva-utils steps + * test: + - Add VAProfileH264High10 + - Don't assume our DRM node is first + * add: va_display_drm: Allow VGEM for WSL2 + * win: win32 compat: Fix setenv/unsetenv return values + * fix: + - Add Th limitation by HUFFMAN_TABLES Count + - Add refresh_frame_flags in PPS + - Add checking of stream_scan size + - Add Scan Num limitation + - Changed H2S configuration template + - Correct maximum display luminance per VAAPI definition + - Fix possible memory leak + - Fix coding issues of function return type & ref_frame_idx idx + too large + +------------------------------------------------------------------- Old: ---- libva-utils-2.17.1.tar.gz New: ---- libva-utils-2.18.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libva-utils.spec ++++++ --- /var/tmp/diff_new_pack.iZtyVx/_old 2023-04-16 16:07:31.212970846 +0200 +++ /var/tmp/diff_new_pack.iZtyVx/_new 2023-04-16 16:07:31.212970846 +0200 @@ -17,7 +17,7 @@ Name: libva-utils -Version: 2.17.1 +Version: 2.18.1 Release: 0 Summary: A collection of utilities and examples to exercise VA-API License: EPL-1.0 AND MIT ++++++ libva-utils-2.17.1.tar.gz -> libva-utils-2.18.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.17.1/NEWS new/libva-utils-2.18.1/NEWS --- old/libva-utils-2.17.1/NEWS 2023-01-06 09:21:04.000000000 +0100 +++ new/libva-utils-2.18.1/NEWS 2023-04-12 09:08:59.000000000 +0200 @@ -1,9 +1,20 @@ -libva-utils NEWS -- summary of changes. 2023-01-06 +libva-utils NEWS -- summary of changes. 2023-03-17 Copyright (C) 2009-2023 Intel Corporation -Version 2.17.1 - 6.Jan.2023 +Version 2.18.0 - 17.Mar.2023 +* doc:Add build and install libva-utils steps +* test: Add VAProfileH264High10 +* test: Don't assume our DRM node is first +* add: va_display_drm: Allow VGEM for WSL2 +* win: win32 compat: Fix setenv/unsetenv return values +* fix: Add Th limitation by HUFFMAN_TABLES Count +* fix: Add refresh_frame_flags in PPS +* fix: Add checking of stream_scan size +* fix: Add Scan Num limitation +* fix: Changed H2S configuration template. +* fix: Correct maximum display luminance per VAAPI definition. * fix: Fix possible memory leak -* fix: fix coding issues of array size and function return types +* fix: Fix coding issues of function return type & ref_frame_idx idx too large Version 2.17.0 - 26.Dec.2022 * add: Upload a security disclaimer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.17.1/README.md new/libva-utils-2.18.1/README.md --- old/libva-utils-2.17.1/README.md 2023-01-06 09:21:04.000000000 +0100 +++ new/libva-utils-2.18.1/README.md 2023-04-12 09:08:59.000000000 +0200 @@ -2,36 +2,76 @@ [](https://travis-ci.org/intel/libva-utils) [](https://scan.coverity.com/projects/intel-libva-utils) -#Libva-utils Project +# Libva-utils Project -libva-utils is a collection of utilities and examples to exercise VA-API in -accordance with the libva project. --enable-tests (default = no) provides -a suite of unit-tests based on Google Test Framework. A driver implementation -is necessary to properly operate. - -VA-API is an open-source library and API specification, which -provides access to graphics hardware acceleration capabilities -for video processing. It consists of a main library and -driver-specific acceleration backends for each supported hardware -vendor. - -If you would like to contribute to libva, check our [Contributing -guide](https://github.com/intel/libva-utils/blob/master/CONTRIBUTING.md). - -We also recommend taking a look at the ['janitorial' -bugs](https://github.com/intel/libva-utils/issues?q=is%3Aopen+is%3Aissue+label%3AJanitorial) -in our list of open issues as these bugs can be solved without an -extensive knowledge of libva-utils. +libva-utils is a collection of utilities and examples to exercise VA-API in accordance with the libva project. --enable-tests (default = no) provides a suite of unit-tests based on Google Test Framework. A driver implementation is necessary to properly operate. + +VA-API is an open-source library and API specification, which provides access to graphics hardware acceleration capabilities +for video processing. It consists of a main library and driver-specific acceleration backends for each supported hardware vendor. + +If you would like to contribute to libva, check our [Contributing guide](https://github.com/intel/libva-utils/blob/master/CONTRIBUTING.md). + +We also recommend taking a look at the ['janitorial' bugs](https://github.com/intel/libva-utils/issues?q=is%3Aopen+is%3Aissue+label%3AJanitorial) in our list of open issues as these bugs can be solved without an extensive knowledge of libva-utils. We would love to help you start contributing! -The libva-utils development team can be reached via our [mailing -list](https://lists.01.org/mailman/listinfo/intel-vaapi-media) and on IRC -in channel ##intel-media on [Freenode](https://freenode.net/kb/answer/chat). - -We also use [#Slack](https://slack.com) and host [VAAPI Media Slack -Team](https://intel-media.slack.com). You can signup by submitting your email -address to our [Slack Team invite page](https://slack-join-intel-media.herokuapp.com). +The libva-utils development team can be reached via github issues. + +# Build and Install Libva-utils + +### Install Libva +You could refer to https://github.com/intel/libva to install Libva -Slack complements our other means of communication. Pick the one that works -best for you! +### Build Libva-utils +Take latest libva-utils version: +``` +git clone https://github.com/intel/libva-utils.git +cd libva-utils +``` + +Build libva-utils by autogen. You could add ```--enable-tests``` to run unit test +``` +./autogen.sh or ./autogen.sh --enable-tests +make +sudo make install +``` + +or build using Meson +``` +mkdir build +cd build +meson .. or meson .. -Denable-tests +ninja +sudo ninja install +``` + + +### Validate your environment +You could run ```vainfo``` to check your media stack environment is correct or not as below. +``` +sys@KBL:~/github/libva-utils$ vainfo +Trying display: drm +libva info: VA-API version 1.14.0 +libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so +libva info: Found init function __vaDriverInit_1_14 +libva info: va_openDriver() returns 0 +vainfo: VA-API version: 1.18 (libva 2.18.0.pre1) +vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 () +vainfo: Supported profile and entrypoints + VAProfileMPEG2Simple : VAEntrypointVLD + VAProfileMPEG2Main : VAEntrypointVLD + VAProfileH264Main : VAEntrypointVLD + VAProfileH264Main : VAEntrypointEncSliceLP + VAProfileH264High : VAEntrypointVLD + VAProfileH264High : VAEntrypointEncSliceLP + VAProfileJPEGBaseline : VAEntrypointVLD + VAProfileJPEGBaseline : VAEntrypointEncPicture + VAProfileH264ConstrainedBaseline: VAEntrypointVLD + VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP + VAProfileVP8Version0_3 : VAEntrypointVLD + VAProfileHEVCMain : VAEntrypointVLD + VAProfileHEVCMain10 : VAEntrypointVLD + VAProfileVP9Profile0 : VAEntrypointVLD + VAProfileVP9Profile2 : VAEntrypointVLD + ... +``` \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.17.1/common/Makefile.am new/libva-utils-2.18.1/common/Makefile.am --- old/libva-utils-2.17.1/common/Makefile.am 2023-01-06 09:21:04.000000000 +0100 +++ new/libva-utils-2.18.1/common/Makefile.am 2023-04-12 09:08:59.000000000 +0200 @@ -41,8 +41,8 @@ if USE_DRM source_c += va_display_drm.c -libva_display_cflags += $(DRM_CFLAGS) $(LIBVA_DRM_CFLAGS) $(DRM_CFLAGS) -libva_display_libs += $(DRM_LIBS) $(LIBVA_DRM_LIBS) +libva_display_cflags += $(LIBVA_DRM_CFLAGS) +libva_display_libs += $(LIBVA_DRM_LIBS) endif if USE_WAYLAND diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.17.1/common/va_display_drm.c new/libva-utils-2.18.1/common/va_display_drm.c --- old/libva-utils-2.17.1/common/va_display_drm.c 2023-01-06 09:21:04.000000000 +0100 +++ new/libva-utils-2.18.1/common/va_display_drm.c 2023-04-12 09:08:59.000000000 +0200 @@ -34,6 +34,7 @@ #endif #include <xf86drm.h> #include "va_display.h" +#include <sys/utsname.h> static int drm_fd = -1; extern const char *g_device_name; @@ -81,7 +82,14 @@ close(drm_fd); continue; } - if (!strncmp(version->name, "vgem", 4)) { + /* On normal Linux platforms we do not want vgem. + * Yet Windows subsystem for linux uses vgem, + * while also providing a fallback VA driver. + * See https://github.com/intel/libva/pull/688 + */ + struct utsname sysinfo = {}; + if (!strncmp(version->name, "vgem", 4) && (uname(&sysinfo) >= 0) && + !strstr(sysinfo.release, "WSL")) { drmFreeVersion(version); close(drm_fd); continue; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.17.1/configure.ac new/libva-utils-2.18.1/configure.ac --- old/libva-utils-2.17.1/configure.ac 2023-01-06 09:21:04.000000000 +0100 +++ new/libva-utils-2.18.1/configure.ac 2023-04-12 09:08:59.000000000 +0200 @@ -29,7 +29,7 @@ # - micro version is libva_micro_version # - pre version is libva_pre_version, usually development version m4_define([libva_utils_major_version], [2]) -m4_define([libva_utils_minor_version], [17]) +m4_define([libva_utils_minor_version], [18]) m4_define([libva_utils_micro_version], [1]) m4_define([libva_utils_pre_version], [0]) @@ -143,8 +143,7 @@ AM_CONDITIONAL(USE_SSP, test "$ssp_cc" = "yes") # Check for DRM (mandatory) -PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm]) -PKG_CHECK_MODULES([DRM], [libdrm]) +PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm libdrm]) # Check for libva (for dynamic linking) LIBVA_API_MIN_VERSION=libva_api_min_version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.17.1/decode/tinyjpeg.c new/libva-utils-2.18.1/decode/tinyjpeg.c --- old/libva-utils-2.17.1/decode/tinyjpeg.c 2023-01-06 09:21:04.000000000 +0100 +++ new/libva-utils-2.18.1/decode/tinyjpeg.c 2023-04-12 09:08:59.000000000 +0200 @@ -330,6 +330,8 @@ Tc = index & 0xf0; // it is not important to <<4 Th = index & 0x0f; + if (Th >= HUFFMAN_TABLES) + error("No more than %d Huffman tables is supported (got %d)\n", HUFFMAN_TABLES, Th); if (Tc) { memcpy(priv->HTAC[Th].bits, stream, 16); } else { @@ -344,8 +346,6 @@ #if SANITY_CHECK if (count >= HUFFMAN_BITS_SIZE) error("No more than %d bytes is allowed to describe a huffman table", HUFFMAN_BITS_SIZE); - if (Th >= HUFFMAN_TABLES) - error("No more than %d Huffman tables is supported (got %d)\n", HUFFMAN_TABLES, Th); trace("Huffman table %s[%d] length=%d\n", Tc ? "AC" : "DC", Th, count); #endif @@ -486,6 +486,13 @@ printf("ERROR:Sampling other than 1x1 for Cr and Cb is not supported"); #endif findEOI(priv, stream); + + if (priv->stream_scan > priv->stream_end) + { + error("stream_scan cannot exceed stream_end\n"); + return -1; + } + return next_image_found; } @@ -816,6 +823,8 @@ vaDestroyConfig(va_dpy, config_id); vaDestroyContext(va_dpy, context_id); + if (scan_num >= JPEG_SCAN_MAX) + break; parse_JFIF(priv, priv->stream); if (priv->width[scan_num] == 0 && priv->height[scan_num] == 0) break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.17.1/encode/av1encode.c new/libva-utils-2.18.1/encode/av1encode.c --- old/libva-utils-2.17.1/encode/av1encode.c 2023-01-06 09:21:04.000000000 +0100 +++ new/libva-utils-2.18.1/encode/av1encode.c 2023-04-12 09:08:59.000000000 +0200 @@ -2293,6 +2293,7 @@ pps->ref_frame_ctrl_l0.value = 0; pps->ref_frame_ctrl_l1.value = 0; fill_ref_params(pps); + pps->refresh_frame_flags = fh.refresh_frame_flags; // //loop filter // auto& lf = fh.loop_filter_params; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.17.1/meson.build new/libva-utils-2.18.1/meson.build --- old/libva-utils-2.17.1/meson.build 2023-01-06 09:21:04.000000000 +0100 +++ new/libva-utils-2.18.1/meson.build 2023-04-12 09:08:59.000000000 +0200 @@ -1,5 +1,5 @@ project('libva-utils', 'c', 'cpp', - version : '2.17.1', + version : '2.18.1', default_options : [ 'warning_level=2', 'c_std=gnu99', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.17.1/test/compat_win32.h new/libva-utils-2.18.1/test/compat_win32.h --- old/libva-utils-2.17.1/test/compat_win32.h 2023-01-06 09:21:04.000000000 +0100 +++ new/libva-utils-2.18.1/test/compat_win32.h 2023-04-12 09:08:59.000000000 +0200 @@ -30,14 +30,27 @@ extern "C" { #endif +/* The setenv() function returns zero on success, or -1 on error, with +* errno set to indicate the cause of the error. +* +* SetEnvironmentVariableA Return value +* If the function succeeds, the return value is nonzero. +* If the function fails, the return value is zero. +*/ inline int setenv(const char *varname, const char *value_string, int overwrite) { - return SetEnvironmentVariableA(varname, value_string); + return SetEnvironmentVariableA(varname, value_string) ? 0 : -1; } +/* The unsetenv() function returns zero on success, or -1 on error, +* with errno set to indicate the cause of the error. +* SetEnvironmentVariableA Return value +* If the function succeeds, the return value is nonzero. +* If the function fails, the return value is zero. +*/ inline int unsetenv(const char *varname) { - return SetEnvironmentVariableA(varname, NULL); + return SetEnvironmentVariableA(varname, NULL) ? 0 : -1; } #ifdef __cplusplus diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.17.1/test/test_data.h new/libva-utils-2.18.1/test/test_data.h --- old/libva-utils-2.17.1/test/test_data.h 2023-01-06 09:21:04.000000000 +0100 +++ new/libva-utils-2.18.1/test/test_data.h 2023-04-12 09:08:59.000000000 +0200 @@ -59,6 +59,9 @@ VAProfileVP9Profile1, VAProfileVP9Profile2, VAProfileVP9Profile3, +#if VA_CHECK_VERSION(1,18,0) + VAProfileH264High10, +#endif }; static const Profiles g_vaNoneProfiles = { @@ -81,6 +84,9 @@ static const Profiles g_vaH264Profiles = { VAProfileH264Main, VAProfileH264High, VAProfileH264ConstrainedBaseline, VAProfileH264MultiviewHigh, VAProfileH264StereoHigh, +#if VA_CHECK_VERSION(1,18,0) + VAProfileH264High10, +#endif }; static const Profiles g_vaVC1Profiles = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.17.1/test/test_va_api_fixture.cpp new/libva-utils-2.18.1/test/test_va_api_fixture.cpp --- old/libva-utils-2.17.1/test/test_va_api_fixture.cpp 2023-01-06 09:21:04.000000000 +0100 +++ new/libva-utils-2.18.1/test/test_va_api_fixture.cpp 2023-04-12 09:08:59.000000000 +0200 @@ -29,6 +29,7 @@ #include <fcntl.h> // for O_RDWR #include <limits> +#include <string.h> #if defined(_WIN32) #include <va/va_win32.h> @@ -36,6 +37,7 @@ #else #include <unistd.h> // for close() #include <va/va_drm.h> +#include <xf86drm.h> #endif namespace VAAPI @@ -91,22 +93,45 @@ #else static VADisplay getDrmDisplay(int &fd) { - typedef std::vector<std::string> DevicePaths; - typedef DevicePaths::const_iterator DevicePathsIterator; + drmDevicePtr devices[32]; + int ret, max_devices = sizeof(devices) / sizeof(devices[0]); - static DevicePaths paths({"/dev/dri/renderD128", "/dev/dri/card0"}); + ret = drmGetDevices2(0, devices, max_devices); + EXPECT_TRUE(ret >= 0); + if (ret < 0) + return NULL; + max_devices = ret; + + for (int i = 0; i < max_devices; i++) { + for (int j = DRM_NODE_MAX - 1; j >= 0; j--) { + drmVersionPtr version; + + if (!(devices[i]->available_nodes & 1 << j)) + continue; + + fd = open(devices[i]->nodes[j], O_RDWR); + if (fd < 0) + continue; + + version = drmGetVersion(fd); + if (!version) { + close(fd); + continue; + } + if (!strncmp(version->name, "vgem", 4)) { + drmFreeVersion(version); + close(fd); + continue; + } + drmFreeVersion(version); - const DevicePathsIterator endIt(paths.end()); - for (DevicePathsIterator it(paths.begin()); it != endIt; ++it) { - fd = open(it->c_str(), O_RDWR); - if (fd < 0) - continue; - VADisplay disp = vaGetDisplayDRM(fd); + VADisplay disp = vaGetDisplayDRM(fd); - if (disp) - return disp; + if (disp) + return disp; - close(fd); + close(fd); + } } return NULL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.17.1/videoprocess/process_hdr_tm_h2h.cfg.template new/libva-utils-2.18.1/videoprocess/process_hdr_tm_h2h.cfg.template --- old/libva-utils-2.17.1/videoprocess/process_hdr_tm_h2h.cfg.template 2023-01-06 09:21:04.000000000 +0100 +++ new/libva-utils-2.18.1/videoprocess/process_hdr_tm_h2h.cfg.template 2023-04-12 09:08:59.000000000 +0200 @@ -8,41 +8,41 @@ # filter and the corresponding parameters. #To simplify this test app, we use the default gamut for both source and destination. -#Please set correct gamut according to the real value. -#BT2020 Gammut Multiplier Output -#G 0.17 0.797 50000 8500 39850 -#R 0.708 0.292 50000 35400 14600 -#B 0.131 0.046 50000 6550 2300 -#w 0.3127 0.329 50000 15635 16450 -#BT709 Gammut Multiplier Output -#G 0.3 0.6 50000 15000 30000 -#R 0.64 0.33 50000 32000 16500 -#B 0.15 0.06 50000 7500 3000 -#w 0.3127 0.329 50000 15635 16450 +#Please set correct gamut according to the real value and VAAPI definition. +#BT2020 Gammut Multiplier Output +#G 0.17 0.797 50000 8500 39850 +#R 0.708 0.292 50000 35400 14600 +#B 0.131 0.046 50000 6550 2300 +#w 0.3127 0.329 50000 15635 16450 +#BT709 Gammut Multiplier Output +#G 0.3 0.6 50000 15000 30000 +#R 0.64 0.33 50000 32000 16500 +#B 0.15 0.06 50000 7500 3000 +#w 0.3127 0.329 50000 15635 16450 #0. Tone Map Type: 0-H2H, 1-H2E, 2-H2S TM_TYPE: 0 #1.Source YUV(RGB) file information -SRC_FILE_NAME: ShowGirl2Teaser_1920x1080_4000nits.p010 +SRC_FILE_NAME: Source_1920x1080_4000nits.p010 SRC_FRAME_WIDTH: 1920 SRC_FRAME_HEIGHT: 1080 SRC_FRAME_FORMAT: P010 SRC_FRAME_COLOUR_PRIMARIES: 9 SRC_FRAME_TRANSFER_CHARACTERISTICS: 16 -SRC_MAX_DISPLAY_MASTERING_LUMINANCE: 1000 +SRC_MAX_DISPLAY_MASTERING_LUMINANCE: 10000000 SRC_MIN_DISPLAY_MASTERING_LUMINANCE: 100 SRC_MAX_CONTENT_LIGHT_LEVEL: 4000 SRC_MAX_PICTURE_AVERAGE_LIGHT_LEVEL: 100 #2.Destination YUV(RGB) file information -DST_FILE_NAME: ShowGirl2Teaser_1920x1080_1000nits_writer.a2rgb10 +DST_FILE_NAME: Dest_1920x1080_1000nits_writer.p010 DST_FRAME_WIDTH: 1920 DST_FRAME_HEIGHT: 1080 -DST_FRAME_FORMAT: A2RGB10 +DST_FRAME_FORMAT: P010 DST_FRAME_COLOUR_PRIMARIES: 9 DST_FRAME_TRANSFER_CHARACTERISTICS: 16 -DST_MAX_DISPLAY_MASTERING_LUMINANCE: 1000 +DST_MAX_DISPLAY_MASTERING_LUMINANCE: 10000000 DST_MIN_DISPLAY_MASTERING_LUMINANCE: 100 DST_MAX_CONTENT_LIGHT_LEVEL: 1000 DST_MAX_PICTURE_AVERAGE_LIGHT_LEVEL: 100 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.17.1/videoprocess/process_hdr_tm_h2s.cfg.template new/libva-utils-2.18.1/videoprocess/process_hdr_tm_h2s.cfg.template --- old/libva-utils-2.17.1/videoprocess/process_hdr_tm_h2s.cfg.template 2023-01-06 09:21:04.000000000 +0100 +++ new/libva-utils-2.18.1/videoprocess/process_hdr_tm_h2s.cfg.template 2023-04-12 09:08:59.000000000 +0200 @@ -8,43 +8,42 @@ # filter and the corresponding parameters. #To simplify this test app, we use the default gamut for both source and destination. -#Please set correct gamut according to the real value. -#BT2020 Gammut Multiplier Output -#G 0.17 0.797 50000 8500 39850 -#R 0.708 0.292 50000 35400 14600 -#B 0.131 0.046 50000 6550 2300 -#w 0.3127 0.329 50000 15635 16450 -#BT709 Gammut Multiplier Output -#G 0.3 0.6 50000 15000 30000 -#R 0.64 0.33 50000 32000 16500 -#B 0.15 0.06 50000 7500 3000 -#w 0.3127 0.329 50000 15635 16450 +#Please set correct gamut according to the real value and VAAPI definition. +#BT2020 Gammut Multiplier Output +#G 0.17 0.797 50000 8500 39850 +#R 0.708 0.292 50000 35400 14600 +#B 0.131 0.046 50000 6550 2300 +#w 0.3127 0.329 50000 15635 16450 +#BT709 Gammut Multiplier Output +#G 0.3 0.6 50000 15000 30000 +#R 0.64 0.33 50000 32000 16500 +#B 0.15 0.06 50000 7500 3000 +#w 0.3127 0.329 50000 15635 16450 #0. Tone Map Type: 0-H2H, 1-H2E, 2-H2S TM_TYPE: 2 #1.Source YUV(RGB) file information -SRC_FILE_NAME: ShowGirl2Teaser_1920x1080_4000nits.p010 +SRC_FILE_NAME: Source_1920x1080_4000nits.p010 SRC_FRAME_WIDTH: 1920 SRC_FRAME_HEIGHT: 1080 SRC_FRAME_FORMAT: P010 SRC_FRAME_COLOUR_PRIMARIES: 9 SRC_FRAME_TRANSFER_CHARACTERISTICS: 16 -SRC_MAX_DISPLAY_MASTERING_LUMINANCE: 1000 +SRC_MAX_DISPLAY_MASTERING_LUMINANCE: 10000000 SRC_MIN_DISPLAY_MASTERING_LUMINANCE: 100 SRC_MAX_CONTENT_LIGHT_LEVEL: 4000 SRC_MAX_PICTURE_AVERAGE_LIGHT_LEVEL: 100 #2.Destination YUV(RGB) file information -DST_FILE_NAME: ShowGirl2Teaser_1920x1080_4000nits_writer.argb +DST_FILE_NAME: Dest_1920x1080_100nits_writer.abgr DST_FRAME_WIDTH: 1920 DST_FRAME_HEIGHT: 1080 DST_FRAME_FORMAT: RGBA -DST_FRAME_COLOUR_PRIMARIES: 9 -DST_FRAME_TRANSFER_CHARACTERISTICS: 1 -DST_MAX_DISPLAY_MASTERING_LUMINANCE: 1000 +DST_FRAME_COLOUR_PRIMARIES: 1 +DST_MAX_DISPLAY_MASTERING_LUMINANCE: 1000000 DST_MIN_DISPLAY_MASTERING_LUMINANCE: 100 -DST_MAX_CONTENT_LIGHT_LEVEL: 1000 +DST_MAX_CONTENT_LIGHT_LEVEL: 100 DST_MAX_PICTURE_AVERAGE_LIGHT_LEVEL: 100 #3.How many frames to be processed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libva-utils-2.17.1/videoprocess/vpphdr_tm.cpp new/libva-utils-2.18.1/videoprocess/vpphdr_tm.cpp --- old/libva-utils-2.17.1/videoprocess/vpphdr_tm.cpp 2023-01-06 09:21:04.000000000 +0100 +++ new/libva-utils-2.18.1/videoprocess/vpphdr_tm.cpp 2023-04-12 09:08:59.000000000 +0200 @@ -74,12 +74,14 @@ static uint32_t g_dst_file_fourcc = VA_FOURCC('Y', 'V', '1', '2'); static uint32_t g_frame_count = 1; -static uint32_t g_in_max_display_luminance = 1000; -static uint32_t g_in_min_display_luminance = 1; +// The maximum display luminace is 1000 nits by default. +static uint32_t g_in_max_display_luminance = 10000000; +static uint32_t g_in_min_display_luminance = 100; static uint32_t g_in_max_content_luminance = 4000; static uint32_t g_in_pic_average_luminance = 1000; -static uint32_t g_out_max_display_luminance = 1000; -static uint32_t g_out_min_display_luminance = 1; +// The maximum display luminace is 1000 nits by default. +static uint32_t g_out_max_display_luminance = 10000000; +static uint32_t g_out_min_display_luminance = 100; static uint32_t g_out_max_content_luminance = 4000; static uint32_t g_out_pic_average_luminance = 1000; @@ -667,13 +669,13 @@ y_src = (unsigned char*)in_buf + va_image.offsets[0]; u_src = (unsigned char*)in_buf + va_image.offsets[1]; // U offset for P010 for (i = 0; i < va_image.height; i++) { - memcpy(y_dst, y_src, va_image.width * 2); - y_dst += va_image.width * 2; + memcpy(y_dst, y_src, va_image.width * bytes_per_pixel); + y_dst += va_image.width * bytes_per_pixel; y_src += va_image.pitches[0]; } for (i = 0; i < va_image.height >> 1; i++) { - memcpy(u_dst, u_src, va_image.width * 2); - u_dst += va_image.width * 2; + memcpy(u_dst, u_src, va_image.width * bytes_per_pixel); + u_dst += va_image.width * bytes_per_pixel; u_src += va_image.pitches[1]; } printf("read_frame_to_surface: P010 \n");
