From nobody Tue Jul 9 17:07:46 2024 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WJS9J2N5yz5QkMF for ; Tue, 09 Jul 2024 17:07:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WJS9H0Lr7z4cCD for ; Tue, 9 Jul 2024 17:07:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720544867; a=rsa-sha256; cv=none; b=pXv6mzsBv1d///TCpeyVePNW6bzDAjWKHstJ9DrObVqxIa/FeHCnq8fmcW8owBws9c+L1A 3UdCrshzj/0zbdISQlbPBa0Od0/pouTrPGWMWwZXLC51z/RZk58GjMNJ5H+tPGeEgpVpjD O24/MeMAJRhymYnZ0w0fJ7IvXvzTmicLWPwU1qRAIK1rUjWJOfsrd6jTODxeilBreiiJtC xysu/VWUBti+e008aDfI56JQFQCFmOe3c9Lw8AUE0/dqC6Nqz9ZFxR17tuYotqepRtAKCG +qi9ObWFqi1vEeFDMwvm4vTb8bt9wnTDEaTzZQ+Hj+JcgqrHz1eearz1o3XEQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720544867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZeZnB/Ri8/v3OItAAbQ3nWGE6VfkFTVZBmrK56PPUic=; b=mnX4Dt9FNrAOH0458Byvn+5CO8ykd3FSj5aF5waZdeS05p7f7WAnIV3NVv3hKbIdhsubEQ tvinNzdtlhhK3bbjK4Vq0nWTG32iikiiHUxkMmxcRGrKgmqZjIvlolwrxLZcppRHVz0EQH ThTS+BGoGMJM2KIdxPZpR0gfUAnU3w2jrQyhzvSx4mV7ljqRTJQqR0rHctMEfftaMhAc6p H/DGMpVJjSqC6Fmb67uEwBhhpk+eugFDpUsYxqt2eWXAp5mPyDjwZJvwEJdPhIxOb46T2X gww0x3y7J58Wfb7p83d1XcZnIyTKpsplHf0CMPTk08MMD93iwcCUPAbBu3W1kQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WJS9G74NfzjGh for ; Tue, 9 Jul 2024 17:07:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 469H7khY088591 for ; Tue, 9 Jul 2024 17:07:46 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 469H7k88088590 for ports-bugs@FreeBSD.org; Tue, 9 Jul 2024 17:07:46 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 280208] multimedia/x265: Fix HDR10+ support [PATCH] Date: Tue, 09 Jul 2024 17:07:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: olli@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports-bugs@freebsd.org Sender: owner-freebsd-ports-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D280208 Bug ID: 280208 Summary: multimedia/x265: Fix HDR10+ support [PATCH] Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: olli@FreeBSD.org Created attachment 251953 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D251953&action= =3Dedit HDR10+ JSON file for testing. Save as "dummy.json". Currently, the FreeBSD build of multimedia/x265 (version 3.5_1) fails to include HDR10+ (a.k.a. HDR10plus or "dynamic HDR") support. It only includes HDR10 support (without "plus", sometimes referred to as "static HDR"). That problem also affects the ffmpeg port because it uses the x265 port for encoding. And that, in turn, affects many other ports that use ffmpeg or its library for encoding. In other words, the problem renders several ports una= ble to produce HDR10+ video content. How to reproduce (short): The simplest way to check for the problem is this: Command: strings -a /usr/local/lib/libx265.so | grep HDR10_PLUS Output: --dhdr10-info disabled. Enable HDR10_PLUS in cmake. That string shown in the output is only included in the library if support = for HDR10_PLUS was *not* enabled at build time. See the file source/encoder/encoder.cpp in the x265 distribution for details. It contai= ns the conditionally compiled code responsible for that. How to reproduce (long): The following ffmpeg command line will demonstrate the problem. It is suppo= sed to generate 1 second of black frames with HDR10+ data. In order for it to w= ork, you need to store the JSON file attached to this PR with the file name "dummy.json". Be sure that the JSON data doesn't get damaged. If it doesn= 't parse as proper JSON, ffmpeg will simply coredump. Command (all on one line): ffmpeg -hide_banner -loglevel warning -t 1 -f l= avfi -i "color=3Dc=3Dblack:s=3D1280x720" -pix_fmt yuv420p10le -r 25 -c:V:0 libx2= 65 -x265-params "log-level=3Dwarning:hdr10=3D1:hdr10-opt=3D1:colorprim=3Dbt2020:transfer=3D= smpte2084:colormatrix=3Dbt2020nc:repeat-headers=3D1:dhdr10-info=3Ddummy.jso= n" -preset fast test.mkv It will print the following warning: x265 [warning] --dhdr10-info disabled. Enable HDR10_PLUS in cmake. The resulting video file only contains static HDR10, not dynamic HDR10+. You can check with the multimedia/mediainfo port: Command: mediainfo test.mkv | grep HDR Output: HDR format : SMPTE ST 2086, HDR10 compatible How to fix: Put the the follwing patch in the "files" directory of the multimedia/x265 = port (suggested name "patch-HDR10_PLUS": --- source/CMakeLists.txt.ORIG 2023-08-24 13:11:18.000000000 +0200 +++ source/CMakeLists.txt 2024-07-05 20:45:28.571155000 +0200 @@ -196,7 +196,7 @@ add_definitions(-qinline=3Dlevel=3D10 -qpath=3DIL:/data/video_files/la= test.tpo/) endif() # this option is to enable the inclusion of dynamic HDR10 library to the libx265 compilation -option(ENABLE_HDR10_PLUS "Enable dynamic HDR10 compilation" OFF) +option(ENABLE_HDR10_PLUS "Enable dynamic HDR10 compilation" ON) if(MSVC AND (MSVC_VERSION LESS 1800) AND ENABLE_HDR10_PLUS) message(FATAL_ERROR "MSVC version 12.0 or above required to support hdr10plus") endif() Then rebuild and install the port. Afterwards, the above mentioned strings(1) command produces empty output. T= hat means, the warning message is not in the library anymore because the HDR10+ support has been compiled in correctly. When you repeat the above ffmpeg command (remove the old test.mkv file firs= t), the resulting file contains proper HR10+ meta data. The check with the mediainfo command now gives this output: HDR format : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile A compatible Hooray, we can now create dynamic HDR10+ video content! --- Comment #1 from Bugzilla Automation --- Maintainer informed via mail --=20 You are receiving this mail because: You are the assignee for the bug.=