Bug 259564 - multimedia/x265: add option to use altivec on powerpc64
Summary: multimedia/x265: add option to use altivec on powerpc64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-31 02:41 UTC by Piotr Kubaj
Modified: 2021-11-16 14:51 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (freebsd-2024)


Attachments
patch (4.06 KB, patch)
2021-10-31 02:41 UTC, Piotr Kubaj
no flags Details | Diff
v2 (3.99 KB, patch)
2021-10-31 02:42 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (freebsd-2024)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2021-10-31 02:41:00 UTC
Created attachment 229158 [details]
patch

This patch uses the ASM option to simplify things, but actually assembly isn't used, just SIMD code in C/C++.

Anyway, POWER8 intrinsics for x265 are available for HI8P, HI10P and HI12P, but additional AltiVec code is only available for HI8P.

On top of that, using ENABLE_ASSEMBLY actually breaks build (because there's no assembly, but C/C++ code).

Also, remove ASM_PREVENTS*. It doesn't work after including bsd.port.options.mk.
Comment 1 Piotr Kubaj freebsd_committer freebsd_triage 2021-10-31 02:42:10 UTC
Created attachment 229159 [details]
v2

Actually don't enable it by default, will break users of older POWER.
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-11-16 14:50:03 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cc29ad6598478ba1125b88114d88838f86a6b8be

commit cc29ad6598478ba1125b88114d88838f86a6b8be
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2021-11-16 14:44:19 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2021-11-16 14:44:19 +0000

    multimedia/x265: add option to use altivec on powerpc64

    PR:     259564
    Approved by: mi@ALDAN.algebra.com (maintainer timeout)

 multimedia/x265/Makefile                          | 42 +++++++++++++++++++++--
 multimedia/x265/files/patch-source_CMakeLists.txt | 20 ++++++++---
 2 files changed, 55 insertions(+), 7 deletions(-)