From owner-svn-ports-head@freebsd.org Mon Sep 21 17:15:51 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2EB9D3F697B; Mon, 21 Sep 2020 17:15:51 +0000 (UTC) (envelope-from mi@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BwB0k6Cdjz4Whd; Mon, 21 Sep 2020 17:15:50 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B4ED711972; Mon, 21 Sep 2020 17:15:50 +0000 (UTC) (envelope-from mi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08LHFoos060402; Mon, 21 Sep 2020 17:15:50 GMT (envelope-from mi@FreeBSD.org) Received: (from mi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08LHFowk060401; Mon, 21 Sep 2020 17:15:50 GMT (envelope-from mi@FreeBSD.org) Message-Id: <202009211715.08LHFowk060401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mi set sender to mi@FreeBSD.org using -f From: Mikhail Teterin Date: Mon, 21 Sep 2020 17:15:50 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r549462 - head/multimedia/x265/files X-SVN-Group: ports-head X-SVN-Commit-Author: mi X-SVN-Commit-Paths: head/multimedia/x265/files X-SVN-Commit-Revision: 549462 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2020 17:15:51 -0000 Author: mi Date: Mon Sep 21 17:15:50 2020 New Revision: 549462 URL: https://svnweb.freebsd.org/changeset/ports/549462 Log: Actually commit the SVT-HEVC patch carelessly ommitted previously. PR: 247035, 248479 Reported by: VVD Sponsored by: United Marsupials Added: head/multimedia/x265/files/patch-source_encoder_api.cpp (contents, props changed) Added: head/multimedia/x265/files/patch-source_encoder_api.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/x265/files/patch-source_encoder_api.cpp Mon Sep 21 17:15:50 2020 (r549462) @@ -0,0 +1,44 @@ +In svt-hevc 1.5.0, they payload-array (1024 bytes) is part of the structure, +rather than a pointer to be allocated separately. + +This patch should allow compiling x265 against both older (1.4.x) and 1.5.x +versions of the dependency. + +See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248479 + + -mi + +--- source/encoder/api.cpp 2020-05-29 13:39:35.000000000 -0400 ++++ source/encoder/api.cpp 2020-08-06 22:51:30.227635000 -0400 +@@ -451,5 +451,7 @@ + if (pic_in->rpu.payloadSize) + { ++#if ! SVT_CHECK_VERSION(1, 5, 0) + inputData->dolbyVisionRpu.payload = X265_MALLOC(uint8_t, 1024); ++#endif + memcpy(inputData->dolbyVisionRpu.payload, pic_in->rpu.payload, pic_in->rpu.payloadSize); + inputData->dolbyVisionRpu.payloadSize = pic_in->rpu.payloadSize; +@@ -458,5 +460,7 @@ + else + { ++#if ! SVT_CHECK_VERSION(1, 5, 0) + inputData->dolbyVisionRpu.payload = NULL; ++#endif + inputData->dolbyVisionRpu.payloadSize = 0; + } +@@ -696,5 +700,7 @@ + svt_print_summary(enc); + EB_H265_ENC_INPUT *inputData = (EB_H265_ENC_INPUT*)encoder->m_svtAppData->inputPictureBuffer->pBuffer; ++#if ! SVT_CHECK_VERSION(1, 5, 0) + if (inputData->dolbyVisionRpu.payload) X265_FREE(inputData->dolbyVisionRpu.payload); ++#endif + + X265_FREE(inputData); +@@ -2052,5 +2058,7 @@ + + EB_H265_ENC_INPUT *inputData = (EB_H265_ENC_INPUT*)inputPtr->pBuffer; ++#if ! SVT_CHECK_VERSION(1, 5, 0) + inputData->dolbyVisionRpu.payload = NULL; ++#endif + inputData->dolbyVisionRpu.payloadSize = 0; +