Skip to content

Commit

Permalink
[gstreamer] Initial import of libvpx to support VP8/9 video in Gstrea…
Browse files Browse the repository at this point in the history
…mer. Contributes MER#595
  • Loading branch information
Andrew Branson committed Jun 5, 2018
0 parents commit 16b4c72
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "upstream"]
path = upstream
url = https://git.merproject.org/mirror/libvpx.git
13 changes: 13 additions & 0 deletions rpm/0001-armv7-use-hard-float.patch
@@ -0,0 +1,13 @@
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -943,8 +943,8 @@ process_common_toolchain() {
#endif
EOF
fi
- check_add_cflags -march=armv7-a -mfloat-abi=${float_abi}
- check_add_asflags -march=armv7-a -mfloat-abi=${float_abi}
+ check_add_cflags -march=armv7-a -mfloat-abi=hard
+ check_add_asflags -march=armv7-a -mfloat-abi=hard

if enabled neon || enabled neon_asm; then
check_add_cflags -mfpu=neon #-ftree-vectorize
81 changes: 81 additions & 0 deletions rpm/libvpx.spec
@@ -0,0 +1,81 @@
Name: libvpx
Version: 1.7.0
Release: 1
Summary: VPx codec library
License: BSD-3-Clause and GPL-2.0+
Group: Applications/Multimedia
Url: http://www.webmproject.org/
Source0: %{name}-%{version}.tar.gz
Patch1: 0001-armv7-use-hard-float.patch
%ifarch %{ix86} x86_64
BuildRequires: yasm
%endif

%description
WebM is an open, royalty-free, media file format designed for the web.

WebM defines the file container structure, video and audio formats.
WebM files consist of video streams compressed with the VPx video codecs
and audio streams compressed with the Vorbis audio codec.
The WebM file structure is based on the Matroska container.

%package devel
Summary: VPx codec library - Development headers
License: BSD-3-Clause and GPL-2.0+
Group: Development/Languages/C and C++
Requires: %{name} = %{version}

%description devel
Development headers and library

WebM is an open, royalty-free, media file format designed for the web.

WebM defines the file container structure, video and audio formats.
WebM files consist of video streams compressed with the VPx video codecs
and audio streams compressed with the Vorbis audio codec.
The WebM file structure is based on the Matroska container.

%prep
%setup -q -n %{name}-%{version}/upstream
%patch1 -p1

%build

./configure \
--prefix=%{_prefix} --libdir=%{_libdir} \
--disable-unit-tests --disable-examples --disable-docs \
--enable-debug --enable-shared --disable-static \
--enable-vp8 --enable-vp9 --enable-vp9-highbitdepth \
--enable-multithread --enable-postproc \
--enable-experimental --enable-spatial-svc \
%ifarch aarch64
--disable-neon --disable-neon_asm \
%endif
%ifarch %{ix86} x86_64
--as=yasm \
%endif
--enable-pic --size-limit=8192x8192

make %{?_smp_mflags} verbose=yes GEN_EXAMPLES=

%install
%make_install verbose=yes GEN_EXAMPLES=

%clean
rm -rf %{buildroot}

%post -n %{name} -p /sbin/ldconfig

%postun -n %{name} -p /sbin/ldconfig

%files
%defattr(-, root, root)
%doc LICENSE AUTHORS README CHANGELOG
%{_libdir}/libvpx.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/vpx/
%{_libdir}/pkgconfig/vpx.pc
%{_libdir}/libvpx.so

1 change: 1 addition & 0 deletions upstream
Submodule upstream added at f80be2

0 comments on commit 16b4c72

Please sign in to comment.