libports: add libyuv support

Issue #4078
This commit is contained in:
Alexander Boettcher 2021-04-22 14:45:12 +02:00 committed by Norman Feske
parent bf3ad3baff
commit 7b90f8f857
7 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1 @@
INC_DIR += $(call select_from_ports,libyuv)/libyuv/include

View File

@ -0,0 +1,12 @@
YUV_DIR = $(call select_from_ports,libyuv)/libyuv
LIBS = libc
INC_DIR += $(YUV_DIR)/include
SRC_CC = $(notdir $(wildcard $(YUV_DIR)/source/*.cc))
CC_CXX_WARN_STRICT = -Wextra -Werror
CC_OPT += -Wno-unused-parameter
vpath %.cc $(YUV_DIR)/source

View File

@ -0,0 +1 @@
include $(REP_DIR)/lib/mk/libyuv.inc

View File

@ -0,0 +1 @@
include $(REP_DIR)/lib/mk/libyuv.inc

View File

@ -0,0 +1 @@
55b2eba298081feccdcc7400c309842be9c24f93

View File

@ -0,0 +1,10 @@
LICENSE := BSD-3-Clause
VERSION := git
DOWNLOADS := libyuv.git
URL(libyuv) := https://chromium.googlesource.com/libyuv/libyuv
DIR(libyuv) := libyuv
REV(libyuv) := 8c8d907d29255ae0630f414e0e09ee9cca8f4bfc
PATCHES := src/lib/libyuv/constraints.patch

View File

@ -0,0 +1,22 @@
Fixes "-O0" or "-O2 -fno-omit-frame-pointer" compiles because of
insufficient number of freely available registers.
+++ libyuv/source/row_gcc.cc
@@ -5116,7 +5116,7 @@ void SplitRGBRow_SSSE3(const uint8_t* src_rgb,
"+r"(dst_r), // %1
"+r"(dst_g), // %2
"+r"(dst_b), // %3
- "+r"(width) // %4
+ "+rm"(width) // %4
: "m"(kShuffleMaskRGBToR0), // %5
"m"(kShuffleMaskRGBToR1), // %6
"m"(kShuffleMaskRGBToR2), // %7
@@ -5212,7 +5212,7 @@ void MergeRGBRow_SSSE3(const uint8_t* src_r,
"+r"(src_g), // %1
"+r"(src_b), // %2
"+r"(dst_rgb), // %3
- "+r"(width) // %4
+ "+rm"(width) // %4
: "m"(kShuffleMaskRToRGB0), // %5
"m"(kShuffleMaskGToRGB0), // %6
"m"(kShuffleMaskBToRGB0), // %7