From owner-svn-ports-head@freebsd.org Thu Jun 18 13:08:58 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 28E4735021A; Thu, 18 Jun 2020 13:08:58 +0000 (UTC) (envelope-from pkubaj@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 49nj1k0Hjcz4gnG; Thu, 18 Jun 2020 13:08:58 +0000 (UTC) (envelope-from pkubaj@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 04AD1A0B7; Thu, 18 Jun 2020 13:08:58 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05ID8viZ068331; Thu, 18 Jun 2020 13:08:57 GMT (envelope-from pkubaj@FreeBSD.org) Received: (from pkubaj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05ID8vhF068330; Thu, 18 Jun 2020 13:08:57 GMT (envelope-from pkubaj@FreeBSD.org) Message-Id: <202006181308.05ID8vhF068330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkubaj set sender to pkubaj@FreeBSD.org using -f From: Piotr Kubaj Date: Thu, 18 Jun 2020 13:08:57 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r539539 - head/multimedia/ffmpeg/files X-SVN-Group: ports-head X-SVN-Commit-Author: pkubaj X-SVN-Commit-Paths: head/multimedia/ffmpeg/files X-SVN-Commit-Revision: 539539 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: Thu, 18 Jun 2020 13:08:58 -0000 Author: pkubaj Date: Thu Jun 18 13:08:57 2020 New Revision: 539539 URL: https://svnweb.freebsd.org/changeset/ports/539539 Log: multimedia/ffmpeg: fix build on powerpc and powerpc64 Revert 3a557c5d88b7b15b5954ba2743febb055549b536 to fix build error on POWER systems. PR: 247375 Approved by: jbeich (maintainer) Added: head/multimedia/ffmpeg/files/patch-libswscale_ppc_yuv2rgb__altivec.c (contents, props changed) Added: head/multimedia/ffmpeg/files/patch-libswscale_ppc_yuv2rgb__altivec.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/multimedia/ffmpeg/files/patch-libswscale_ppc_yuv2rgb__altivec.c Thu Jun 18 13:08:57 2020 (r539539) @@ -0,0 +1,145 @@ +Revert 3a557c5d88b7b15b5954ba2743febb055549b536 to fix build on powerpc and powerpc64. + +Error: +CC libswscale/ppc/yuv2rgb_altivec.o +libswscale/ppc/yuv2rgb_altivec.c: In function ?altivec_yuv2_abgr?: +libswscale/ppc/yuv2rgb_altivec.c:338:18: error: implicit declaration of function ?vec_xl?; did you mean ?vec_rl?? [-Werror=implicit-function-declaration] + 338 | y0 = vec_xl(0, y1i); \ + | ^~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:437:1: note: in expansion of macro ?DEFCSP420_CVT? + 437 | DEFCSP420_CVT(yuv2_abgr, out_abgr) + | ^~~~~~~~~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:338:18: error: incompatible types when assigning to type ?__vector unsigned char? {aka ?__vector(16) unsigned char?} from type ?int? + 338 | y0 = vec_xl(0, y1i); \ + | ^~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:437:1: note: in expansion of macro ?DEFCSP420_CVT? + 437 | DEFCSP420_CVT(yuv2_abgr, out_abgr) + | ^~~~~~~~~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:340:18: error: incompatible types when assigning to type ?__vector unsigned char? {aka ?__vector(16) unsigned char?} from type ?int? + 340 | y1 = vec_xl(0, y2i); \ + | ^~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:437:1: note: in expansion of macro ?DEFCSP420_CVT? + 437 | DEFCSP420_CVT(yuv2_abgr, out_abgr) + | ^~~~~~~~~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:437:1: error: can?t convert a value of type ?int? to vector type ?__vector(16) signed char? which has different size +libswscale/ppc/yuv2rgb_altivec.c:437:1: error: can?t convert a value of type ?int? to vector type ?__vector(16) signed char? which has different size +libswscale/ppc/yuv2rgb_altivec.c: In function ?altivec_yuv2_bgra?: +libswscale/ppc/yuv2rgb_altivec.c:338:18: error: incompatible types when assigning to type ?__vector unsigned char? {aka ?__vector(16) unsigned char?} from type ?int? + 338 | y0 = vec_xl(0, y1i); \ + | ^~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:438:1: note: in expansion of macro ?DEFCSP420_CVT? + 438 | DEFCSP420_CVT(yuv2_bgra, out_bgra) + | ^~~~~~~~~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:340:18: error: incompatible types when assigning to type ?__vector unsigned char? {aka ?__vector(16) unsigned char?} from type ?int? + 340 | y1 = vec_xl(0, y2i); \ + | ^~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:438:1: note: in expansion of macro ?DEFCSP420_CVT? + 438 | DEFCSP420_CVT(yuv2_bgra, out_bgra) + | ^~~~~~~~~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:438:1: error: can?t convert a value of type ?int? to vector type ?__vector(16) signed char? which has different size +libswscale/ppc/yuv2rgb_altivec.c:438:1: error: can?t convert a value of type ?int? to vector type ?__vector(16) signed char? which has different size +libswscale/ppc/yuv2rgb_altivec.c: In function ?altivec_yuv2_rgba?: +libswscale/ppc/yuv2rgb_altivec.c:338:18: error: incompatible types when assigning to type ?__vector unsigned char? {aka ?__vector(16) unsigned char?} from type ?int? + 338 | y0 = vec_xl(0, y1i); \ + | ^~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:439:1: note: in expansion of macro ?DEFCSP420_CVT? + 439 | DEFCSP420_CVT(yuv2_rgba, out_rgba) + | ^~~~~~~~~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:340:18: error: incompatible types when assigning to type ?__vector unsigned char? {aka ?__vector(16) unsigned char?} from type ?int? + 340 | y1 = vec_xl(0, y2i); \ + | ^~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:439:1: note: in expansion of macro ?DEFCSP420_CVT? + 439 | DEFCSP420_CVT(yuv2_rgba, out_rgba) + | ^~~~~~~~~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:439:1: error: can?t convert a value of type ?int? to vector type ?__vector(16) signed char? which has different size +libswscale/ppc/yuv2rgb_altivec.c:439:1: error: can?t convert a value of type ?int? to vector type ?__vector(16) signed char? which has different size +libswscale/ppc/yuv2rgb_altivec.c: In function ?altivec_yuv2_argb?: +libswscale/ppc/yuv2rgb_altivec.c:338:18: error: incompatible types when assigning to type ?__vector unsigned char? {aka ?__vector(16) unsigned char?} from type ?int? + 338 | y0 = vec_xl(0, y1i); \ + | ^~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:440:1: note: in expansion of macro ?DEFCSP420_CVT? + 440 | DEFCSP420_CVT(yuv2_argb, out_argb) + | ^~~~~~~~~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:340:18: error: incompatible types when assigning to type ?__vector unsigned char? {aka ?__vector(16) unsigned char?} from type ?int? + 340 | y1 = vec_xl(0, y2i); \ + | ^~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:440:1: note: in expansion of macro ?DEFCSP420_CVT? + 440 | DEFCSP420_CVT(yuv2_argb, out_argb) + | ^~~~~~~~~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:440:1: error: can?t convert a value of type ?int? to vector type ?__vector(16) signed char? which has different size +libswscale/ppc/yuv2rgb_altivec.c:440:1: error: can?t convert a value of type ?int? to vector type ?__vector(16) signed char? which has different size +libswscale/ppc/yuv2rgb_altivec.c: In function ?altivec_yuv2_rgb24?: +libswscale/ppc/yuv2rgb_altivec.c:338:18: error: incompatible types when assigning to type ?__vector unsigned char? {aka ?__vector(16) unsigned char?} from type ?int? + 338 | y0 = vec_xl(0, y1i); \ + | ^~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:441:1: note: in expansion of macro ?DEFCSP420_CVT? + 441 | DEFCSP420_CVT(yuv2_rgb24, out_rgb24) + | ^~~~~~~~~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:340:18: error: incompatible types when assigning to type ?__vector unsigned char? {aka ?__vector(16) unsigned char?} from type ?int? + 340 | y1 = vec_xl(0, y2i); \ + | ^~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:441:1: note: in expansion of macro ?DEFCSP420_CVT? + 441 | DEFCSP420_CVT(yuv2_rgb24, out_rgb24) + | ^~~~~~~~~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:441:1: error: can?t convert a value of type ?int? to vector type ?__vector(16) signed char? which has different size +libswscale/ppc/yuv2rgb_altivec.c:441:1: error: can?t convert a value of type ?int? to vector type ?__vector(16) signed char? which has different size +libswscale/ppc/yuv2rgb_altivec.c: In function ?altivec_yuv2_bgr24?: +libswscale/ppc/yuv2rgb_altivec.c:338:18: error: incompatible types when assigning to type ?__vector unsigned char? {aka ?__vector(16) unsigned char?} from type ?int? + 338 | y0 = vec_xl(0, y1i); \ + | ^~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:442:1: note: in expansion of macro ?DEFCSP420_CVT? + 442 | DEFCSP420_CVT(yuv2_bgr24, out_bgr24) + | ^~~~~~~~~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:340:18: error: incompatible types when assigning to type ?__vector unsigned char? {aka ?__vector(16) unsigned char?} from type ?int? + 340 | y1 = vec_xl(0, y2i); \ + | ^~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:442:1: note: in expansion of macro ?DEFCSP420_CVT? + 442 | DEFCSP420_CVT(yuv2_bgr24, out_bgr24) + | ^~~~~~~~~~~~~ +libswscale/ppc/yuv2rgb_altivec.c:442:1: error: can?t convert a value of type ?int? to vector type ?__vector(16) signed char? which has different size +libswscale/ppc/yuv2rgb_altivec.c:442:1: error: can?t convert a value of type ?int? to vector type ?__vector(16) signed char? which has different size +cc1: some warnings being treated as errors + +--- libswscale/ppc/yuv2rgb_altivec.c.orig 2020-06-15 18:54:24 UTC ++++ libswscale/ppc/yuv2rgb_altivec.c +@@ -305,6 +305,9 @@ static int altivec_ ## name(SwsContext *c, const unsig + vector signed short R1, G1, B1; \ + vector unsigned char R, G, B; \ + \ ++ const vector unsigned char *y1ivP, *y2ivP, *uivP, *vivP; \ ++ vector unsigned char align_perm; \ ++ \ + vector signed short lCY = c->CY; \ + vector signed short lOY = c->OY; \ + vector signed short lCRV = c->CRV; \ +@@ -335,13 +338,26 @@ static int altivec_ ## name(SwsContext *c, const unsig + vec_dstst(oute, (0x02000002 | (((w * 3 + 32) / 32) << 16)), 1); \ + \ + for (j = 0; j < w / 16; j++) { \ +- y0 = vec_xl(0, y1i); \ ++ y1ivP = (const vector unsigned char *) y1i; \ ++ y2ivP = (const vector unsigned char *) y2i; \ ++ uivP = (const vector unsigned char *) ui; \ ++ vivP = (const vector unsigned char *) vi; \ + \ +- y1 = vec_xl(0, y2i); \ ++ align_perm = vec_lvsl(0, y1i); \ ++ y0 = (vector unsigned char) \ ++ vec_perm(y1ivP[0], y1ivP[1], align_perm); \ + \ +- u = (vector signed char) vec_xl(0, ui); \ ++ align_perm = vec_lvsl(0, y2i); \ ++ y1 = (vector unsigned char) \ ++ vec_perm(y2ivP[0], y2ivP[1], align_perm); \ + \ +- v = (vector signed char) vec_xl(0, vi); \ ++ align_perm = vec_lvsl(0, ui); \ ++ u = (vector signed char) \ ++ vec_perm(uivP[0], uivP[1], align_perm); \ ++ \ ++ align_perm = vec_lvsl(0, vi); \ ++ v = (vector signed char) \ ++ vec_perm(vivP[0], vivP[1], align_perm); \ + \ + u = (vector signed char) \ + vec_sub(u, \