diff --git a/.libvpx.metadata b/.libvpx.metadata new file mode 100644 index 0000000..925b15e --- /dev/null +++ b/.libvpx.metadata @@ -0,0 +1 @@ +d624b9c88c5aa83d39c8a048532cd742146e7a2e SOURCES/libvpx-v1.2.0.tar.bz2 diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/libvpx-nasm.patch b/SOURCES/libvpx-nasm.patch new file mode 100644 index 0000000..16b03f0 --- /dev/null +++ b/SOURCES/libvpx-nasm.patch @@ -0,0 +1,40 @@ +diff -up libvpx-v1.2.0/vp8/common/x86/iwalsh_mmx.asm.nasm libvpx-v1.2.0/vp8/common/x86/iwalsh_mmx.asm +--- libvpx-v1.2.0/vp8/common/x86/iwalsh_mmx.asm.nasm 2013-02-28 18:51:11.000000000 +0100 ++++ libvpx-v1.2.0/vp8/common/x86/iwalsh_mmx.asm 2013-04-05 14:16:31.784250142 +0200 +@@ -24,7 +24,7 @@ sym(vp8_short_inv_walsh4x4_mmx): + + movq mm0, [rdx + 0] ;ip[0] + movq mm1, [rdx + 8] ;ip[4] +- movd mm7, rax ++ movq mm7, rax + + movq mm2, [rdx + 16] ;ip[8] + movq mm3, [rdx + 24] ;ip[12] +diff -up libvpx-v1.2.0/vp8/common/x86/mfqe_sse2.asm.nasm libvpx-v1.2.0/vp8/common/x86/mfqe_sse2.asm +--- libvpx-v1.2.0/vp8/common/x86/mfqe_sse2.asm.nasm 2013-02-28 18:51:11.000000000 +0100 ++++ libvpx-v1.2.0/vp8/common/x86/mfqe_sse2.asm 2013-04-05 15:20:26.521402526 +0200 +@@ -271,7 +271,11 @@ sym(vp8_variance_and_sad_16x16_sse2): + SECTION_RODATA + align 16 + t128: +- ddq 128 ++%if CONFIG_BIG_ENDIAN ++ dq 0, 128 ++%else ++ dq 128, 0 ++%endif + align 16 + tMFQE: ; 1 << MFQE_PRECISION + times 8 dw 0x10 +diff -up libvpx-v1.2.0/vp8/encoder/x86/temporal_filter_apply_sse2.asm.nasm libvpx-v1.2.0/vp8/encoder/x86/temporal_filter_apply_sse2.asm +--- libvpx-v1.2.0/vp8/encoder/x86/temporal_filter_apply_sse2.asm.nasm 2013-02-28 18:51:11.000000000 +0100 ++++ libvpx-v1.2.0/vp8/encoder/x86/temporal_filter_apply_sse2.asm 2013-04-05 14:16:31.784250142 +0200 +@@ -50,7 +50,7 @@ sym(vp8_temporal_filter_apply_sse2): + ; 0x8000 >> (16 - strength) + mov rdx, 16 + sub rdx, arg(4) ; 16 - strength +- movd xmm4, rdx ; can't use rdx w/ shift ++ movq xmm4, rdx ; can't use rdx w/ shift + movdqa xmm5, [GLOBAL(_const_top_bit)] + psrlw xmm5, xmm4 + movdqa [rsp + rounding_bit], xmm5 diff --git a/SOURCES/libvpx.ver b/SOURCES/libvpx.ver new file mode 100644 index 0000000..c3010ec --- /dev/null +++ b/SOURCES/libvpx.ver @@ -0,0 +1,58 @@ +{ global: +vpx_codec_build_config; +vpx_codec_control_; +vpx_codec_dec_init_ver; +vpx_codec_decode; +vpx_codec_destroy; +vpx_codec_enc_config_default; +vpx_codec_enc_config_set; +vpx_codec_enc_init_ver; +vpx_codec_encode; +vpx_codec_error; +vpx_codec_error_detail; +vpx_codec_err_to_string; +vpx_codec_get_caps; +vpx_codec_get_cx_data; +vpx_codec_get_frame; +vpx_codec_get_global_headers; +vpx_codec_get_mem_map; +vpx_codec_get_preview_frame; +vpx_codec_get_stream_info; +vpx_codec_iface_name; +vpx_codec_peek_stream_info; +vpx_codec_register_put_frame_cb; +vpx_codec_register_put_slice_cb; +vpx_codec_set_cx_data_buf; +vpx_codec_set_mem_map; +vpx_codec_version; +vpx_codec_version_extra_str; +vpx_codec_version_str; +vpx_codec_vp8_algo; +vpx_codec_vp8_cx; +vpx_codec_vp8_cx_algo; +vpx_codec_vp8_dx; +vpx_codec_vp8_dx_algo; +vpx_dec_control; +vpx_dec_decode; +vpx_dec_destroy; +vpx_dec_error; +vpx_dec_error_detail; +vpx_dec_err_to_string; +vpx_dec_get_caps; +vpx_dec_get_frame; +vpx_dec_get_mem_map; +vpx_dec_get_stream_info; +vpx_dec_iface_name; +vpx_dec_init_ver; +vpx_dec_peek_stream_info; +vpx_dec_register_put_frame_cb; +vpx_dec_register_put_slice_cb; +vpx_dec_set_mem_map; +vpx_dec_xma_init_ver; +vpx_enc_vp8_algo; +vpx_img_alloc; +vpx_img_flip; +vpx_img_free; +vpx_img_set_rect; +vpx_img_wrap; +local: *; }; diff --git a/SPECS/libvpx.spec b/SPECS/libvpx.spec new file mode 100644 index 0000000..81fb0ae --- /dev/null +++ b/SPECS/libvpx.spec @@ -0,0 +1,248 @@ +%global majorver 1 +%global minorver 2 +%global tinyver 0 + +Name: libvpx +Summary: VP8 Video Codec SDK +Version: %{majorver}.%{minorver}.%{tinyver} +%global soversion %{version} +Release: 2%{?dist} +License: BSD +Group: System Environment/Libraries +# Google forgot to make a 1.2.0 tarball, so I made one from the git tag. +# git clone https://code.google.com/p/webm.libvpx/ libvpx +# cd libvpx +# git checkout v1.2.0 +# rm -rf .git* +# cd .. +# mv libvpx libvpx-v1.2.0 +# tar xvfj libvpx-v1.2.0.tar.bz2 libvpx-v1.2.0 +Source0: http://webm.googlecode.com/files/%{name}-v%{version}.tar.bz2 +# Thanks to debian. +Source2: libvpx.ver +Patch0: libvpx-nasm.patch +URL: http://www.webmproject.org/tools/vp8-sdk/ +%ifarch %{ix86} x86_64 +BuildRequires: nasm +%endif +BuildRequires: doxygen, php-cli + +%description +libvpx provides the VP8 SDK, which allows you to integrate your applications +with the VP8 video codec, a high quality, royalty free, open source codec +deployed on millions of computers and devices worldwide. + +%package devel +Summary: Development files for libvpx +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Development libraries and headers for developing software against +libvpx. + +%package utils +Summary: VP8 utilities and tools +Group: Development/Tools +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description utils +A selection of utilities and tools for VP8, including a sample encoder +and decoder. + +%prep +%setup -q -n %{name}-v%{version} +%patch0 -p1 -b .nasm + +%build +%ifarch %{ix86} +%global vpxtarget x86-linux-gcc +%else +%ifarch x86_64 +%global vpxtarget x86_64-linux-gcc +%else +%global vpxtarget generic-gnu +%endif +%endif + +# The configure script will reject the shared flag on the generic target +# This means we need to fall back to the manual creation we did before. :P +%if "%{vpxtarget}" == "generic-gnu" +%global generic_target 1 +%else +%global generic_target 0 +%endif + +./configure --target=%{vpxtarget} --enable-pic --disable-install-srcs \ +%if ! %{generic_target} +--enable-shared \ +%endif +--prefix=%{_prefix} --libdir=%{_libdir} + +# Hack our optflags in. +sed -i "s|-O3|%{optflags}|g" libs-%{vpxtarget}.mk +sed -i "s|-O3|%{optflags}|g" examples-%{vpxtarget}.mk +sed -i "s|-O3|%{optflags}|g" docs-%{vpxtarget}.mk + +make %{?_smp_mflags} verbose=true target=libs + +%if %{generic_target} +# Manual shared library creation +mkdir tmp +cd tmp +ar x ../libvpx_g.a +cd .. +gcc -fPIC -shared -pthread -lm -Wl,--no-undefined -Wl,-soname,libvpx.so.%{majorver} -Wl,--version-script,%{SOURCE2} -Wl,-z,noexecstack -o libvpx.so.%{soversion} tmp/*.o +rm -rf tmp +%endif + +# Temporarily dance the static libs out of the way +mv libvpx.a libNOTvpx.a +mv libvpx_g.a libNOTvpx_g.a + +# We need to do this so the examples can link against it. +ln -sf libvpx.so.%{soversion} libvpx.so + +make %{?_smp_mflags} verbose=true target=examples CONFIG_SHARED=1 +make %{?_smp_mflags} verbose=true target=docs + +# Put them back so the install doesn't fail +mv libNOTvpx.a libvpx.a +mv libNOTvpx_g.a libvpx_g.a + +%install +make DIST_DIR=%{buildroot}%{_prefix} dist + +# Simpler to label the dir as %doc. +mv %{buildroot}/usr/docs doc/ + +%if %{generic_target} +install -p libvpx.so.%{soversion} %{buildroot}%{_libdir} +pushd %{buildroot}%{_libdir} +ln -sf libvpx.so.%{soversion} libvpx.so +ln -sf libvpx.so.%{soversion} libvpx.so.%{majorver} +ln -sf libvpx.so.%{soversion} libvpx.so.%{majorver}.%{minorver} +popd +%endif + +pushd %{buildroot} +# Stuff we don't need. +rm -rf usr/build/ usr/md5sums.txt usr/lib*/*.a usr/CHANGELOG usr/README +# Rename a few examples +mv usr/bin/postproc usr/bin/vp8_postproc +mv usr/bin/simple_decoder usr/bin/vp8_simple_decoder +mv usr/bin/simple_encoder usr/bin/vp8_simple_encoder +mv usr/bin/twopass_encoder usr/bin/vp8_twopass_encoder +# Fix the binary permissions +chmod 755 usr/bin/* +popd + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%doc AUTHORS CHANGELOG LICENSE README +%{_libdir}/libvpx.so.* + +%files devel +# These are SDK docs, not really useful to an end-user. +%doc docs/html/ +%{_includedir}/vpx/ +%{_libdir}/pkgconfig/vpx.pc +%{_libdir}/libvpx.so + +%files utils +%{_bindir}/* + +%changelog +* Fri Apr 5 2013 Martin Stransky - 1.2.0-2 +- Build fix for nasm + +* Thu Feb 28 2013 Tom Callaway - 1.2.0-1 +- update to 1.2.0 + +* Thu Feb 14 2013 Fedora Release Engineering - 1.1.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jul 19 2012 Fedora Release Engineering - 1.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue May 29 2012 Tom Callaway - 1.1.0-1 +- update to 1.1.0 + +* Tue May 29 2012 Tom Callaway - 1.0.0-3 +- fix vpx.pc file to include -lm (bz825754) + +* Fri May 11 2012 Tom Callaway - 1.0.0-2 +- use included vpx.pc file (drop local libvpx.pc) +- apply upstream fix to vpx.pc file (bz 814177) + +* Mon Jan 30 2012 Tom Callaway - 1.0.0-1 +- update to 1.0.0 + +* Fri Jan 13 2012 Fedora Release Engineering - 0.9.7.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Oct 10 2011 Dan Horák - 0.9.7.1-3 +- use macro instead of hard-coded version + +* Mon Sep 12 2011 Dan Horák - 0.9.7.1-2 +- fix build on generic targets + +* Tue Aug 16 2011 Adam Jackson 0.9.7.1-1 +- libvpx 0.9.7-p1 + +* Tue Aug 09 2011 Adam Jackson 0.9.7-1 +- libvpx 0.9.7 + +* Mon Mar 21 2011 Dan Horák - 0.9.6-2 +- add 2 symbols to the shared library for generic targets + +* Thu Mar 10 2011 Tom Callaway - 0.9.6-1 +- update to 0.9.6 + +* Tue Feb 08 2011 Fedora Release Engineering - 0.9.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Nov 17 2010 Tom "spot" Callaway 0.9.5-2 +- apply patch from upstream git (Change I6266aba7), should resolve CVE-2010-4203 + +* Mon Nov 1 2010 Tom "spot" Callaway 0.9.5-1 +- update to 0.9.5 + +* Wed Sep 1 2010 Tom "spot" Callaway 0.9.1-3 +- only package html docs to avoid multilib conflict (bz 613185) + +* Thu Jun 24 2010 Tom "spot" Callaway 0.9.1-2 +- build shared library the old way for generic arches + +* Thu Jun 24 2010 Tom "spot" Callaway 0.9.1-1 +- update to 0.9.1 + +* Fri Jun 11 2010 Tom "spot" Callaway 0.9.0-7 +- update to git revision 8389f1967c5f8b3819cca80705b1b4ba04132b93 +- upstream fix for bz 599147 +- proper shared library support + +* Wed Jun 2 2010 Tom "spot" Callaway 0.9.0-6 +- add hackish fix for bz 599147 + (upstream will hopefully fix properly in future release) + +* Fri May 21 2010 Tom "spot" Callaway 0.9.0-5 +- fix noexecstack flag + +* Thu May 20 2010 Tom "spot" Callaway 0.9.0-4 +- BuildRequires: yasm (we're optimized again) + +* Thu May 20 2010 Tom "spot" Callaway 0.9.0-3 +- add pkg-config file +- move headers into include/vpx/ +- enable optimization + +* Thu May 20 2010 Tom "spot" Callaway 0.9.0-2 +- fix permissions on binaries +- rename generic binaries to v8_* +- link shared library to -lm, -lpthread to resolve missing weak symbols + +* Wed May 19 2010 Tom "spot" Callaway 0.9.0-1 +- Initial package for Fedora