From 87a9782123a75145741c06031c1a5475869fc046 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 06:06:03 +0100 Subject: [PATCH] legacy package [release 1.10.0-2mamba;Sat Oct 23 2021] --- README.md | 2 + ...-0.9.0-no-explicit-dep-on-static-lib.patch | 11 + libvpx-0.9.5-I6266aba7.patch | 73 ++++++ libvpx.pc | 14 ++ libvpx.ver | 56 +++++ libvpx6.spec | 207 ++++++++++++++++++ 6 files changed, 363 insertions(+) create mode 100644 libvpx-0.9.0-no-explicit-dep-on-static-lib.patch create mode 100644 libvpx-0.9.5-I6266aba7.patch create mode 100644 libvpx.pc create mode 100644 libvpx.ver create mode 100644 libvpx6.spec diff --git a/README.md b/README.md index 938b833..bbfcde2 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # libvpx6 +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. + diff --git a/libvpx-0.9.0-no-explicit-dep-on-static-lib.patch b/libvpx-0.9.0-no-explicit-dep-on-static-lib.patch new file mode 100644 index 0000000..d909d7e --- /dev/null +++ b/libvpx-0.9.0-no-explicit-dep-on-static-lib.patch @@ -0,0 +1,11 @@ +diff -up libvpx-0.9.0/examples.mk.BAD libvpx-0.9.0/examples.mk +--- libvpx-0.9.0/examples.mk.BAD 2010-05-19 17:58:42.611058552 -0400 ++++ libvpx-0.9.0/examples.mk 2010-05-19 17:59:11.934181029 -0400 +@@ -129,7 +129,6 @@ BINS-$(NOT_MSVS) += $(addprefi + # Instantiate linker template for all examples. + CODEC_LIB=$(if $(CONFIG_DEBUG_LIBS),vpx_g,vpx) + $(foreach bin,$(BINS-yes),\ +- $(if $(BUILD_OBJS),$(eval $(bin): $(LIB_PATH)/lib$(CODEC_LIB).a))\ + $(if $(BUILD_OBJS),$(eval $(call linker_template,$(bin),\ + $(call objs,$($(notdir $(bin)).SRCS)) \ + -l$(CODEC_LIB) $(addprefix -l,$(CODEC_EXTRA_LIBS))\ diff --git a/libvpx-0.9.5-I6266aba7.patch b/libvpx-0.9.5-I6266aba7.patch new file mode 100644 index 0000000..299a1e9 --- /dev/null +++ b/libvpx-0.9.5-I6266aba7.patch @@ -0,0 +1,73 @@ +From 9fb80f7170ec48e23c3c7b477149eeb37081c699 Mon Sep 17 00:00:00 2001 +From: John Koleszar +Date: Thu, 4 Nov 2010 16:59:26 -0400 +Subject: [PATCH] fix integer promotion bug in partition size check + +The check '(user_data_end - partition < partition_size)' must be +evaluated as a signed comparison, but because partition_size was +unsigned, the LHS was promoted to unsigned, causing an incorrect +result on 32-bit. Instead, check the upper and lower bounds of +the segment separately. + +Change-Id: I6266aba7fd7de084268712a3d2a81424ead7aa06 +--- + vp8/decoder/decodframe.c | 6 ++++-- + vp8/vp8_dx_iface.c | 10 ++++++++-- + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c +index 2d81d61..f5e49a1 100644 +--- a/vp8/decoder/decodframe.c ++++ b/vp8/decoder/decodframe.c +@@ -462,7 +462,8 @@ static void setup_token_decoder(VP8D_COMP *pbi, + partition_size = user_data_end - partition; + } + +- if (user_data_end - partition < partition_size) ++ if (partition + partition_size > user_data_end ++ || partition + partition_size < partition) + vpx_internal_error(&pc->error, VPX_CODEC_CORRUPT_FRAME, + "Truncated packet or corrupt partition " + "%d length", i + 1); +@@ -580,7 +581,8 @@ int vp8_decode_frame(VP8D_COMP *pbi) + (data[0] | (data[1] << 8) | (data[2] << 16)) >> 5; + data += 3; + +- if (data_end - data < first_partition_length_in_bytes) ++ if (data + first_partition_length_in_bytes > data_end ++ || data + first_partition_length_in_bytes < data) + vpx_internal_error(&pc->error, VPX_CODEC_CORRUPT_FRAME, + "Truncated packet or corrupt partition 0 length"); + vp8_setup_version(pc); +diff --git a/vp8/vp8_dx_iface.c b/vp8/vp8_dx_iface.c +index e7e5356..f0adf5b 100644 +--- a/vp8/vp8_dx_iface.c ++++ b/vp8/vp8_dx_iface.c +@@ -253,8 +253,11 @@ static vpx_codec_err_t vp8_peek_si(const uint8_t *data, + unsigned int data_sz, + vpx_codec_stream_info_t *si) + { +- + vpx_codec_err_t res = VPX_CODEC_OK; ++ ++ if(data + data_sz <= data) ++ res = VPX_CODEC_INVALID_PARAM; ++ else + { + /* Parse uncompresssed part of key frame header. + * 3 bytes:- including version, frame type and an offset +@@ -331,7 +334,10 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx, + + ctx->img_avail = 0; + +- /* Determine the stream parameters */ ++ /* Determine the stream parameters. Note that we rely on peek_si to ++ * validate that we have a buffer that does not wrap around the top ++ * of the heap. ++ */ + if (!ctx->si.h) + res = ctx->base.iface->dec.peek_si(data, data_sz, &ctx->si); + +-- +1.7.3.1 + diff --git a/libvpx.pc b/libvpx.pc new file mode 100644 index 0000000..0ec05c5 --- /dev/null +++ b/libvpx.pc @@ -0,0 +1,14 @@ +prefix=@PREFIX@ +exec_prefix=@PREFIX@ +libdir=@LIBDIR@ +includedir=@INCLUDEDIR@ + +Name: libvpx +Description: VP8 Video Codec SDK library +Version: 0.9.1 +URL: http://www.webmproject.org/tools/vp8-sdk/ +Requires: +Conflicts: +Libs: -L${libdir} -lvpx +Libs.private: +Cflags: -I${includedir}/vpx/ diff --git a/libvpx.ver b/libvpx.ver new file mode 100644 index 0000000..d4b6ec2 --- /dev/null +++ b/libvpx.ver @@ -0,0 +1,56 @@ +{ 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_algo; +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/libvpx6.spec b/libvpx6.spec new file mode 100644 index 0000000..1885d5c --- /dev/null +++ b/libvpx6.spec @@ -0,0 +1,207 @@ +%ifarch %{ix86} +%define vpxtarget x86-linux-gcc +%else +%ifarch x86_64 +%define vpxtarget x86_64-linux-gcc +%else +%ifarch arm +%define vpxtarget armv7-linux-gcc +%else +%define vpxtarget generic-gnu +%endif +%endif +%endif + +%define majver %(echo %version | cut -d. -f 1-2) +%define major %(echo %version | cut -d. -f -1) + +Name: libvpx6 +Version: 1.10.0 +Release: 2mamba +Summary: VP8 Video Codec SDK +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://bugs.chromium.org/p/webm +Source0: https://github.com/webmproject/libvpx/archive/v%{version}/libvpx-%{version}.tar.gz +Source1: libvpx.pc +# from debian +Source2: libvpx.ver +Patch0: libvpx-0.9.0-no-explicit-dep-on-static-lib.patch +Patch1: libvpx-0.9.5-I6266aba7.patch +License: BSD +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgcc +BuildRequires: libstdc++6-devel +## AUTOBUILDREQ-END +BuildRequires: doxygen +%if "%{stage1}" != "1" +BuildRequires: php +# TODO BuildRequires: %{_bindir}/php-cli +%endif +BuildRequires: yasm + +%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 +Group: Development/Libraries +Summary: Static libraries and headers for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description devel +libvpx - VP8 Video Codec SDK. + +This package contains static libraries and header files needed for development. + +%package utils +Group: Development/Tools +Summary: Utility applications for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description utils +libvpx - VP8 Video Codec SDK. + +The %{name}-tools package contains a selection of utilities and +tools for VP8, including a sample encoder and decoder. + +%package docs +Group: Documentation +Summary: libvpx API documentation + +%description docs +libvpx - VP8 Video Codec SDK. +This package contains libvpx API documentation. + +%debug_package + +%prep +%setup -q -n libvpx-%{version} + +%build +CROSS=%{_host}- \ +./configure \ + --prefix=%{_prefix} \ + --libdir=%{_libdir} \ + --enable-pic \ + --disable-install-srcs \ +%if "%{stage1}" !="1" + --enable-install-docs \ +%endif + --enable-shared \ + --target=%{vpxtarget} \ + --enable-runtime-cpu-detect \ + --enable-shared \ + --enable-pic \ + --enable-vp8 \ + --enable-postproc \ + --enable-vp9 \ + --enable-vp9-highbitdepth \ + --enable-experimental + +# --enable-spatial-svc + +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +# fix permissions +chmod 644 %{buildroot}%{_includedir}/vpx/*.h + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_libdir}/libvpx.so.* +%doc AUTHORS LICENSE + +%files devel +%defattr(-,root,root) +%dir %{_includedir}/vpx +%{_includedir}/vpx/*.h +%{_libdir}/libvpx.a +%{_libdir}/libvpx.so +%{_libdir}/pkgconfig/vpx.pc +%doc CHANGELOG README + +%files utils +%defattr(-,root,root) +#%{_bindir}/vp8_scalable_patterns +#%{_bindir}/vp9_spatial_scalable_encoder +%{_bindir}/vpxdec +%{_bindir}/vpxenc + +#%if "%{stage1}" !="1" +#%files docs +#%defattr(-,root,root) +##%doc docs/html/ +#%endif + +%changelog +* Sat Oct 23 2021 Silvan Calarco 1.10.0-2mamba +- legacy package + +* Thu Mar 25 2021 Automatic Build System 1.10.0-1mamba +- automatic version update by autodist + +* Tue Aug 04 2020 Automatic Build System 1.9.0-1mamba +- automatic version update by autodist + +* Mon Dec 23 2019 Automatic Build System 1.8.2-1mamba +- automatic version update by autodist + +* Wed Jul 17 2019 Automatic Build System 1.8.1-1mamba +- automatic version update by autodist + +* Thu Apr 25 2019 Automatic Build System 1.8.0-1mamba +- automatic version update by autodist + +* Wed Mar 21 2018 Silvan Calarco 1.7.0-1mamba +- update to 1.7.0 + +* Sun Jan 15 2017 Automatic Build System 1.6.1-1mamba +- automatic version update by autodist + +* Sun Dec 11 2016 Silvan Calarco 1.6.0-2mamba +- added many configure options for chromium + +* Fri Aug 05 2016 Automatic Build System 1.6.0-1mamba +- automatic version update by autodist + +* Thu Nov 12 2015 Automatic Build System 1.5.0-1mamba +- automatic version update by autodist + +* Thu Apr 30 2015 Silvan Calarco 1.4.0-1mamba +- update to 1.4.0 + +* Sun Jan 12 2014 Automatic Build System 1.3.0-1mamba +- automatic version update by autodist + +* Thu Oct 17 2013 Silvan Calarco 1.2.0-2mamba +- fix permissions of header files + +* Wed Sep 04 2013 Automatic Build System 1.2.0-1mamba +- automatic version update by autodist + +* Wed Nov 14 2012 Silvan Calarco 1.1.0-1mamba +- update to 1.1.0 + +* Tue Aug 02 2011 Silvan Calarco 0.9.6-3mamba +- rebuilt in devel + +* Fri Mar 18 2011 gil 0.9.6-2mamba +- fix broken header files + +* Fri Mar 18 2011 gil 0.9.6-1mamba +- update to 0.9.6 + +* Fri Feb 25 2011 gil 0.9.5-1mamba +- package created by autospec