-
Notifications
You must be signed in to change notification settings - Fork 418
add libtheora #3186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
add libtheora #3186
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| package: | ||
| name: libtheora | ||
| version: 1.1.1 | ||
| epoch: 0 | ||
| description: An open video codec developed by the Xiph.org | ||
| copyright: | ||
| - license: BSD-3-Clause | ||
|
|
||
| environment: | ||
| contents: | ||
| packages: | ||
| - busybox | ||
| - ca-certificates-bundle | ||
| - build-base | ||
| - autoconf | ||
| - automake | ||
| - libtool | ||
| - libogg-dev | ||
| - libvorbis-dev | ||
|
|
||
| pipeline: | ||
| - uses: fetch | ||
| with: | ||
| expected-sha512: 9ab9b3af1c35d16a7d6d84f61f59ef3180132e30c27bdd7c0fa2683e0d00e2c791accbc7fd2c90718cc947d8bd10ee4a5940fb55f90f1fd7b0ed30583a47dbbd | ||
| uri: https://downloads.xiph.org/releases/theora/libtheora-${{package.version}}.tar.bz2 | ||
|
|
||
| - uses: patch | ||
| with: | ||
| patches: automake.patch | ||
|
|
||
| - uses: patch | ||
| with: | ||
| patches: enc.patch | ||
|
|
||
| - uses: patch | ||
| with: | ||
| patches: fix-mmx.patch | ||
|
|
||
| - uses: patch | ||
| with: | ||
| patches: fix-timeb.patch | ||
|
|
||
| - uses: patch | ||
| with: | ||
| patches: libtheora-flags.patch | ||
|
|
||
| - runs: | | ||
| libtoolize --force && aclocal -I m4 && autoconf --force && automake --force --add-missing && autoheader | ||
|
|
||
| - runs: | | ||
| CFLAGS="${CFLAGS/-Os/-O3}" CPPFLAGS="${CPPFLAGS/-Os/-O3}" ./configure \ | ||
| --build=$CBUILD \ | ||
| --host=$CHOST \ | ||
| --prefix=/usr \ | ||
| --enable-shared \ | ||
| --enable-static | ||
| make -j 1 -C lib | ||
| make | ||
|
|
||
| - uses: autoconf/make-install | ||
|
|
||
| - uses: strip | ||
|
|
||
| subpackages: | ||
| - name: ${{package.name}}-dev | ||
| pipeline: | ||
| - uses: split/dev | ||
| description: ${{package.name}} dev | ||
|
|
||
| - name: ${{package.name}}-static | ||
| description: ${{package.name}} static libraries | ||
| pipeline: | ||
| - runs: | | ||
| ls -latr "${{targets.destdir}}"/usr/lib | ||
| mkdir -p "${{targets.subpkdir}}"/usr/lib | ||
| mv "${{targets.destdir}}"/usr/lib "${{targets.subpkdir}}"/usr/lib | ||
|
|
||
| - name: ${{package.name}}-doc | ||
| description: ${{package.name}} documentation | ||
| pipeline: | ||
| - uses: split/manpages | ||
| - uses: split/infodir | ||
|
|
||
| update: | ||
| enabled: true | ||
| release-monitor: | ||
| identifier: 11793 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- ./configure.ac.orig 2012-12-31 20:15:29.384600257 +0000 | ||
| +++ ./configure.ac 2012-12-31 20:15:38.461347599 +0000 | ||
| @@ -9,7 +9,7 @@ | ||
| AC_CANONICAL_HOST | ||
| AC_CANONICAL_TARGET | ||
|
|
||
| -AM_CONFIG_HEADER([config.h]) | ||
| +AC_CONFIG_HEADER([config.h]) | ||
| AC_CONFIG_SRCDIR([lib/fdct.c]) | ||
| AM_INIT_AUTOMAKE | ||
| AM_MAINTAINER_MODE | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- ./lib/Makefile.am.orig | ||
| +++ ./lib/Makefile.am | ||
| @@ -152,7 +154,7 @@ | ||
| Version_script-enc theoraenc.exp | ||
| libtheoraenc_la_LDFLAGS = \ | ||
| -version-info @THENC_LIB_CURRENT@:@THENC_LIB_REVISION@:@THENC_LIB_AGE@ \ | ||
| - @THEORAENC_LDFLAGS@ $(OGG_LIBS) | ||
| + -ltheoradec @THEORAENC_LDFLAGS@ $(OGG_LIBS) | ||
|
|
||
| libtheora_la_SOURCES = \ | ||
| $(decoder_sources) \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| http://bugs.alpinelinux.org/issues/6132 | ||
| https://trac.xiph.org/ticket/2287 | ||
|
|
||
| patch rebased for libtheory 1.1.1 stable | ||
|
|
||
| diff -ru libtheora-1.1.1.orig/lib/encode.c libtheora-1.1.1/lib/encode.c | ||
| --- libtheora-1.1.1.orig/lib/encode.c 2009-08-22 18:14:04.000000000 +0000 | ||
| +++ libtheora-1.1.1/lib/encode.c 2016-09-15 05:27:02.065785527 +0000 | ||
| @@ -864,6 +864,9 @@ | ||
| } | ||
|
|
||
| static void oc_enc_frame_pack(oc_enc_ctx *_enc){ | ||
| + /*musl libc malloc()/realloc() calls might use floating point, so make sure | ||
| + we've cleared the MMX state for them.*/ | ||
| + oc_restore_fpu(&_enc->state); | ||
| oggpackB_reset(&_enc->opb); | ||
| /*Only proceed if we have some coded blocks. | ||
| If there are no coded blocks, we can drop this frame simply by emitting a | ||
| diff -ru libtheora-1.1.1.orig/lib/decode.c libtheora-1.1.1/lib/decode.c | ||
| --- libtheora-1.1.1.orig/lib/decode.c 2009-09-26 20:55:21.000000000 +0000 | ||
| +++ libtheora-1.1.1/lib/decode.c 2016-09-15 05:29:45.912196850 +0000 | ||
| @@ -1181,6 +1181,9 @@ | ||
|
|
||
|
|
||
| static int oc_dec_postprocess_init(oc_dec_ctx *_dec){ | ||
| + /*musl libc malloc()/realloc() calls might use floating point, so make sure | ||
| + we've cleared the MMX state for them.*/ | ||
| + oc_restore_fpu(&_dec->state); | ||
| /*pp_level 0: disabled; free any memory used and return*/ | ||
| if(_dec->pp_level<=OC_PP_LEVEL_DISABLED){ | ||
| if(_dec->dc_qis!=NULL){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| --- libtheora-1.1.1.orig/examples/dump_psnr.c | ||
| +++ libtheora-1.1.1/examples/dump_psnr.c | ||
| @@ -37,7 +37,6 @@ | ||
| #endif | ||
| #include <stdlib.h> | ||
| #include <string.h> | ||
| -#include <sys/timeb.h> | ||
| #include <sys/types.h> | ||
| #include <sys/stat.h> | ||
| /*Yes, yes, we're going to hell.*/ | ||
| --- libtheora-1.1.1.orig/examples/dump_video.c | ||
| +++ libtheora-1.1.1/examples/dump_video.c | ||
| @@ -37,7 +37,7 @@ | ||
| #include <stdio.h> | ||
| #include <stdlib.h> | ||
| #include <string.h> | ||
| -#include <sys/timeb.h> | ||
| +#include <sys/time.h> | ||
| #include <sys/types.h> | ||
| #include <sys/stat.h> | ||
| /*Yes, yes, we're going to hell.*/ | ||
| @@ -205,9 +205,9 @@ | ||
| int long_option_index; | ||
| int c; | ||
|
|
||
| - struct timeb start; | ||
| - struct timeb after; | ||
| - struct timeb last; | ||
| + struct timeval start; | ||
| + struct timeval after; | ||
| + struct timeval last; | ||
| int fps_only=0; | ||
| int frames = 0; | ||
|
|
||
| @@ -418,8 +418,8 @@ | ||
| } | ||
|
|
||
| if(fps_only){ | ||
| - ftime(&start); | ||
| - ftime(&last); | ||
| + gettimeofday(&start, NULL); | ||
| + gettimeofday(&last, NULL); | ||
| } | ||
|
|
||
| while(!got_sigint){ | ||
| @@ -433,7 +433,7 @@ | ||
| videobuf_ready=1; | ||
| frames++; | ||
| if(fps_only) | ||
| - ftime(&after); | ||
| + gettimeofday(&after, NULL); | ||
| } | ||
|
|
||
| }else | ||
| @@ -442,16 +442,16 @@ | ||
|
|
||
| if(fps_only && (videobuf_ready || fps_only==2)){ | ||
| long ms = | ||
| - after.time*1000.+after.millitm- | ||
| - (last.time*1000.+last.millitm); | ||
| + after.tv_sec*1000.+after.tv_usec/1000- | ||
| + (last.tv_sec*1000.+last.tv_usec/1000); | ||
|
|
||
| if(ms>500 || fps_only==1 || | ||
| (feof(infile) && !videobuf_ready)){ | ||
| float file_fps = (float)ti.fps_numerator/ti.fps_denominator; | ||
| fps_only=2; | ||
|
|
||
| - ms = after.time*1000.+after.millitm- | ||
| - (start.time*1000.+start.millitm); | ||
| + ms = after.tv_sec*1000.+after.tv_usec/1000- | ||
| + (start.tv_sec*1000.+start.tv_usec/1000); | ||
|
|
||
| fprintf(stderr,"\rframe:%d rate:%.2fx ", | ||
| frames, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| diff -ur libtheora-1.0beta2.orig/configure.ac libtheora-1.0beta2/configure.ac | ||
| --- libtheora-1.0beta2.orig/configure.ac 2007-10-13 00:01:38.000000000 +0300 | ||
| +++ libtheora-1.0beta2/configure.ac 2007-11-25 22:44:49.000000000 +0200 | ||
| @@ -102,8 +102,8 @@ | ||
| case $host in | ||
| *) | ||
| DEBUG="-g -Wall -Wno-parentheses -DDEBUG -D__NO_MATH_INLINES" | ||
| - CFLAGS="-Wall -Wno-parentheses -O3 -fforce-addr -fomit-frame-pointer -finline-functions -funroll-loops" | ||
| - PROFILE="-Wall -Wno-parentheses -pg -g -O3 -fno-inline-functions -DDEBUG";; | ||
| + CFLAGS="-Wall -Wno-parentheses" | ||
| + PROFILE="-Wall -Wno-parentheses -pg -g -fno-inline-functions -DDEBUG";; | ||
| esac | ||
| fi | ||
| CFLAGS="$CFLAGS $cflags_save" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -835,5 +835,6 @@ opus | |
| k3s | ||
| gobuster | ||
| runit | ||
| libtheora | ||
| ipset | ||
| nuclei | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.