├── .github └── workflows │ └── autotools.yml ├── .gitignore ├── .gitlab-ci.yml ├── .travis.yml ├── AUTHORS ├── CHANGES ├── COPYING ├── LICENSE ├── Makefile.am ├── README.md ├── SConstruct ├── autogen.sh ├── configure.ac ├── doc ├── Doxyfile.in ├── Makefile.am ├── color.html ├── draft-ietf-avt-rtp-theora-00.txt ├── draft-ietf-avt-rtp-theora-00.xml ├── draft-kerr-avt-theora-rtp-00.txt ├── draft-kerr-avt-theora-rtp-00.xml ├── spec │ ├── Makefile.am │ ├── fdct.fig │ ├── hilbert-block.fig │ ├── hilbert-mb.fig │ ├── idct.fig │ ├── lflim.fig │ ├── ltablex.sty │ ├── macroblock.fig │ ├── pic-frame.fig │ ├── pic_even.fig │ ├── pic_even_odd.fig │ ├── pic_odd.fig │ ├── pic_odd_even.fig │ ├── pixel420.fig │ ├── pixel422.fig │ ├── pixel444.fig │ ├── raster-block.fig │ ├── reference-frames.fig │ ├── spec.bib │ ├── spec.tex │ ├── superblock.fig │ ├── vp3huff.c │ └── xifish.fig └── vp3-format.txt ├── examples ├── Makefile.am ├── README_SPLAYER ├── dump_psnr.c ├── dump_video.c ├── encoder_example.c ├── encoder_example_ffmpeg ├── getopt.c ├── getopt.h ├── getopt1.c ├── libtheora_info.c ├── player_example.c ├── png2theora.c ├── splayer.c └── tiff2theora.c ├── include ├── Makefile.am └── theora │ ├── Makefile.am │ ├── codec.h │ ├── theora.h │ ├── theoradec.h │ └── theoraenc.h ├── lib ├── Makefile.am ├── Version_script ├── Version_script-dec ├── Version_script-enc ├── analyze.c ├── apiwrapper.c ├── apiwrapper.h ├── arm │ ├── arm2gnu.pl │ ├── armbits.h │ ├── armbits.s │ ├── armcpu.c │ ├── armcpu.h │ ├── armenc.c │ ├── armenc.h │ ├── armencfrag.s │ ├── armenquant.s │ ├── armfrag.s │ ├── armidct.s │ ├── armint.h │ ├── armloop.s │ ├── armopts.s.in │ └── armstate.c ├── bitpack.c ├── bitpack.h ├── c64x │ ├── c64xdec.c │ ├── c64xdec.h │ ├── c64xfrag.c │ ├── c64xidct.c │ ├── c64xint.h │ └── c64xstate.c ├── collect.c ├── collect.h ├── dct.h ├── decapiwrapper.c ├── decinfo.c ├── decint.h ├── decode.c ├── defexp.awk ├── dequant.c ├── dequant.h ├── encapiwrapper.c ├── encfrag.c ├── encinfo.c ├── encint.h ├── encode.c ├── encoder_disabled.c ├── enquant.c ├── enquant.h ├── fdct.c ├── fragment.c ├── huffdec.c ├── huffdec.h ├── huffenc.c ├── huffenc.h ├── huffman.h ├── idct.c ├── info.c ├── internal.c ├── internal.h ├── mathops.c ├── mathops.h ├── mcenc.c ├── modedec.h ├── ocintrin.h ├── quant.c ├── quant.h ├── rate.c ├── state.c ├── state.h ├── theora.def ├── theora.exp ├── theoradec.exp ├── theoraenc.exp ├── tokenize.c ├── x86 │ ├── mmxencfrag.c │ ├── mmxfdct.c │ ├── mmxfrag.c │ ├── mmxidct.c │ ├── mmxloop.h │ ├── mmxstate.c │ ├── sse2encfrag.c │ ├── sse2fdct.c │ ├── sse2idct.c │ ├── sse2trans.h │ ├── x86cpu.c │ ├── x86cpu.h │ ├── x86enc.c │ ├── x86enc.h │ ├── x86enquant.c │ ├── x86int.h │ ├── x86state.c │ └── x86zigzag.h └── x86_vc │ ├── mmxencfrag.c │ ├── mmxfdct.c │ ├── mmxfrag.c │ ├── mmxidct.c │ ├── mmxloop.h │ ├── mmxstate.c │ ├── x86cpu.c │ ├── x86cpu.h │ ├── x86enc.c │ ├── x86enc.h │ ├── x86int.h │ ├── x86state.c │ └── x86zigzag.h ├── libtheora.spec.in ├── m4 ├── Makefile.am ├── as-ac-expand.m4 ├── as-gcc-inline-assembly.m4 ├── ogg.m4 ├── pkg.m4 └── vorbis.m4 ├── macosx ├── English.lproj │ └── InfoPlist.strings ├── Info.plist ├── Theora.xcodeproj │ └── project.pbxproj └── Theora_Prefix.pch ├── symbian ├── bld.inf ├── config.h └── theora.mmp ├── tests ├── Makefile.am ├── comment.c ├── comment_theora.c ├── granulepos.c ├── granulepos_theora.c ├── noop.c ├── noop_theora.c └── tests.h ├── theora-uninstalled.pc.in ├── theora.pc.in ├── theoradec-uninstalled.pc.in ├── theoradec.pc.in ├── theoraenc-uninstalled.pc.in ├── theoraenc.pc.in ├── tools └── process_modedec_stats.c └── win32 ├── VS2005 ├── README ├── dump_video │ ├── dump_video_dynamic.vcproj │ └── dump_video_static.vcproj ├── encoder_example │ ├── encoder_example_dynamic.vcproj │ └── encoder_example_static.vcproj ├── libogg.vsprops ├── libtheora │ ├── libtheora_dynamic.vcproj │ └── libtheora_static.vcproj ├── libtheora_dynamic.sln ├── libtheora_static.sln └── libvorbis.vsprops ├── VS2008 ├── README ├── dump_video │ ├── dump_video_dynamic.vcproj │ └── dump_video_static.vcproj ├── encoder_example │ ├── encoder_example_dynamic.vcproj │ └── encoder_example_static.vcproj ├── libogg.vsprops ├── libtheora │ ├── libtheora_dynamic.vcproj │ └── libtheora_static.vcproj ├── libtheora_dynamic.sln ├── libtheora_static.sln └── libvorbis.vsprops ├── VS2010 ├── README ├── dump_video │ ├── dump_video_dynamic.vcxproj │ └── dump_video_static.vcxproj ├── encoder_example │ ├── encoder_example_dynamic.vcxproj │ └── encoder_example_static.vcxproj ├── libogg.props ├── libtheora │ ├── libtheora_dynamic.vcxproj │ └── libtheora_static.vcxproj ├── libtheora_dynamic.sln ├── libtheora_static.sln └── libvorbis.props ├── build_theora_static.bat ├── build_theora_static_debug.bat ├── experimental ├── dumpvid │ └── dumpvid.dsp ├── encoderwin │ ├── ReadMe.txt │ └── encoderwin.dsp ├── transcoder │ ├── avi2vp3 │ │ ├── avi2vp3.c │ │ ├── avilib.c │ │ ├── avilib.h │ │ ├── outfile.vp3 │ │ └── vp31.avi │ ├── readme.txt │ ├── transcoder.dsp │ └── transcoder_example.c └── wincompat │ ├── README.txt │ ├── getopt.c │ ├── getopt.h │ ├── getopt_long.c │ └── unistd.h ├── getopt.c ├── getopt1.c ├── getopt_win.h ├── theora_static.dsp └── xmingw32 ├── Makefile ├── libtheoradec-all.def ├── libtheoradec-all.rc ├── libtheoradec.rc ├── libtheoradec70.rc ├── libtheoradec70d.rc ├── libtheoradec71.rc ├── libtheoradec71d.rc ├── libtheoradec80.rc ├── libtheoradec80d.rc ├── libtheoradecd.rc ├── libtheoraenc-all.def ├── libtheoraenc-all.rc ├── libtheoraenc.rc ├── libtheoraenc70.rc ├── libtheoraenc70d.rc ├── libtheoraenc71.rc ├── libtheoraenc71d.rc ├── libtheoraenc80.rc ├── libtheoraenc80d.rc └── libtheoraencd.rc /.github/workflows/autotools.yml: -------------------------------------------------------------------------------- 1 | name: Autotools build 2 | 3 | on: 4 | push: 5 | pull_request: 6 | schedule: 7 | - cron: '0 0 1 * *' 8 | 9 | jobs: 10 | build: 11 | strategy: 12 | matrix: 13 | os: 14 | [ 15 | ubuntu-latest, 16 | macos-latest, 17 | ] 18 | 19 | runs-on: ${{ matrix.os }} 20 | 21 | steps: 22 | - uses: actions/checkout@v2 23 | 24 | - name: Install macOS dependencies 25 | if: startsWith(matrix.os,'macos') 26 | run: brew install automake pkg-config libtool libogg 27 | 28 | - name: Install Linux dependencies 29 | if: startsWith(matrix.os,'ubuntu') 30 | run: sudo apt install automake pkgconf libtool libogg-dev libvorbis-dev libsdl1.2-dev libpng-dev libtiff-dev doxygen fig2dev texlive texlive-latex-extra 31 | 32 | - name: configure 33 | run: | 34 | ./autogen.sh 35 | ./configure 36 | 37 | - name: build 38 | run: make 39 | 40 | - name: test 41 | run: make check 42 | 43 | - name: distcheck 44 | if: startsWith(matrix.os,'ubuntu') 45 | run: make distcheck 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | *.m4 4 | autom4te.cache 5 | config.guess 6 | config.h 7 | config.h.in 8 | config.log 9 | config.status 10 | config.sub 11 | configure 12 | depcomp 13 | install-sh 14 | ltmain.sh 15 | missing 16 | libtool 17 | stamp-h1 18 | .deps 19 | .libs 20 | *.o 21 | *.lo 22 | *.la 23 | *.sw* 24 | *~ 25 | *.pc 26 | 27 | compile 28 | libtheora.spec 29 | test-driver 30 | lib/arm/armopts.s 31 | 32 | doc/Doxyfile 33 | doc/doxygen-build.stamp 34 | doc/libtheora/ 35 | doc/spec/vp3huff 36 | doc/spec/Theora.pdf 37 | doc/spec/fdct.pdf 38 | doc/spec/hilbert-block.pdf 39 | doc/spec/hilbert-mb.pdf 40 | doc/spec/idct.pdf 41 | doc/spec/lflim.pdf 42 | doc/spec/macroblock.pdf 43 | doc/spec/pic-frame.pdf 44 | doc/spec/pic_even.pdf 45 | doc/spec/pic_even_odd.pdf 46 | doc/spec/pic_odd.pdf 47 | doc/spec/pic_odd_even.pdf 48 | doc/spec/pixel420.pdf 49 | doc/spec/pixel422.pdf 50 | doc/spec/pixel444.pdf 51 | doc/spec/raster-block.pdf 52 | doc/spec/reference-frames.pdf 53 | doc/spec/spec.aux 54 | doc/spec/spec.bbl 55 | doc/spec/spec.blg 56 | doc/spec/spec.lof 57 | doc/spec/spec.log 58 | doc/spec/spec.lot 59 | doc/spec/spec.out 60 | doc/spec/spec.toc 61 | doc/spec/superblock.pdf 62 | doc/spec/vp3huff.aux 63 | doc/spec/vp3huff.tex 64 | doc/spec/xifish.pdf 65 | 66 | examples/dump_psnr 67 | examples/dump_video 68 | examples/libtheora_info 69 | examples/encoder_example 70 | examples/player_example 71 | examples/png2theora 72 | examples/tiff2theora 73 | 74 | tests/*.log 75 | tests/*.trs 76 | tests/comment 77 | tests/comment_theora 78 | tests/comment_theoradec 79 | tests/granulepos 80 | tests/granulepos_theora 81 | tests/granulepos_theoraenc 82 | tests/noop 83 | tests/noop_theora 84 | tests/noop_theoraenc 85 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | default: 2 | tags: 3 | - docker 4 | # Image from https://hub.docker.com/_/gcc/ based on Debian 5 | image: gcc:14 6 | 7 | .autotools: 8 | stage: build 9 | before_script: 10 | - apt-get update && 11 | apt-get install -y libogg-dev libvorbis-dev 12 | libsdl1.2-dev libpng-dev libtiff-dev 13 | doxygen fig2dev texlive texlive-latex-extra 14 | ${INSTALL_COMPILER} ${INSTALL_EXTRA} 15 | script: 16 | - ./autogen.sh 17 | - ./configure ${CONFIG_FLAGS} || cat config.log 18 | - make 19 | - make check 20 | variables: 21 | INSTALL_COMPILER: gcc g++ 22 | 23 | autotools-gcc: 24 | extends: .autotools 25 | script: 26 | - ./autogen.sh 27 | - ./configure ${CONFIG_FLAGS} || cat config.log 28 | - make 29 | - make distcheck 30 | - sha256sum libtheora-*.* 31 | artifacts: 32 | paths: 33 | - libtheora-*.tar.* 34 | - libtheora-*.zip 35 | expire_in: 2 week 36 | 37 | autotools-gcc-builddir: 38 | extends: .autotools 39 | script: 40 | - ./autogen.sh 41 | - mkdir build 42 | - (cd build && ../configure ${CONFIG_FLAGS}) || cat config.log 43 | - (cd build && make) 44 | - (cd build && make check) 45 | 46 | autotools-clang: 47 | extends: .autotools 48 | script: 49 | - ./autogen.sh 50 | - ./configure ${CONFIG_FLAGS} || cat config.log 51 | - make 52 | - make distcheck 53 | variables: 54 | INSTALL_COMPILER: clang 55 | CONFIG_FLAGS: CFLAGS=-Wreserved-identifier 56 | CC: clang 57 | 58 | autotools-disable-asm: 59 | extends: .autotools 60 | variables: 61 | CONFIG_FLAGS: --disable-asm 62 | 63 | autotools-disable-encoding: 64 | extends: .autotools 65 | variables: 66 | CONFIG_FLAGS: --disable-encode 67 | 68 | autotools-enable-telemetry: 69 | extends: .autotools 70 | variables: 71 | CONFIG_FLAGS: --enable-telemetry 72 | 73 | autotools-enable-valgrind-testing: 74 | extends: .autotools 75 | variables: 76 | INSTALL_EXTRA: libtool valgrind 77 | CONFIG_FLAGS: --enable-valgrind-testing 78 | 79 | autotools-enable-gcc-sanitizers: 80 | extends: .autotools 81 | variables: 82 | INSTALL_EXTRA: libtool 83 | CONFIG_FLAGS: --enable-gcc-sanitizers 84 | 85 | autotools-mingw: 86 | extends: .autotools 87 | script: 88 | - mkdir build-mingw 89 | - git clone https://gitlab.xiph.org/xiph/ogg.git build-mingw/ogg-mingw 90 | - (cd build-mingw/ogg-mingw && ./autogen.sh) 91 | - (cd build-mingw/ogg-mingw && ./configure ${CONFIG_FLAGS}) 92 | - (cd build-mingw/ogg-mingw && make) 93 | - ./autogen.sh 94 | - (cd build-mingw && CPPFLAGS=-I`pwd`/ogg-mingw/include LDFLAGS=-L`pwd`/ogg-mingw/src ../configure --disable-examples ${CONFIG_FLAGS}) 95 | - (cd build-mingw && make) 96 | variables: 97 | CONFIG_FLAGS: --disable-shared --host=x86_64-pc-linux-gnu 98 | INSTALL_COMPILER: gcc-mingw-w64 99 | CC: x86_64-w64-mingw32-gcc 100 | 101 | scons: 102 | stage: build 103 | before_script: 104 | - apt-get update && 105 | apt-get install -y libogg-dev libvorbis-dev 106 | libsdl1.2-dev libpng-dev libtiff-dev 107 | scons 108 | script: 109 | - scons 110 | - scons -c 111 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | compiler: 4 | - gcc 5 | - clang 6 | 7 | os: 8 | - linux 9 | - osx 10 | 11 | before_install: 12 | - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi 13 | - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libogg; fi 14 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi 15 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y perl libogg-dev; fi 16 | 17 | env: 18 | - CONFIG="--disable-examples --disable-doc" 19 | - CONFIG="--disable-examples --disable-encode" 20 | - CONFIG="--disable-examples --disable-asm" 21 | 22 | script: 23 | - ./autogen.sh 24 | - ./configure $CONFIG 25 | - make check 26 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Monty 2 | - Original VP3 port 3 | 4 | Timothy B. Terriberry 5 | Gregory Maxwell 6 | Ralph Giles 7 | Monty 8 | - Ongoing development 9 | 10 | Dan B. Miller 11 | - Pre alpha3 development 12 | 13 | Rudolf Marek 14 | Wim Tayman 15 | Dan Lenski 16 | Nils Pipenbrinck 17 | Monty 18 | - MMX optimized functions 19 | 20 | David Schleef 21 | - C64x port 22 | 23 | Aaron Colwell 24 | Thomas Vander Stichele 25 | Jan Gerber 26 | Conrad Parker 27 | Cristian Adam 28 | Sebastian Pippin 29 | Simon Hosie 30 | Brad Smith 31 | Petter Reinholdtsen 32 | Tristan Matthews 33 | - Bug fixes, enhancements, build systems. 34 | 35 | Mauricio Piacentini 36 | - Original win32 projects and example ports 37 | - VP3->Theora transcoder 38 | 39 | Silvia Pfeiffer 40 | - Figures for the spec 41 | 42 | Michael Smith 43 | Andre Pang 44 | calc 45 | Chris Cheney 46 | Brendan Cully 47 | Edward Hervey 48 | Adam Moss 49 | Colin Ward 50 | Jeremy C. Reed 51 | Arc Riley 52 | Rodolphe Ortalo 53 | - Bug fixes 54 | 55 | Robin Watts 56 | - ARM code optimisations 57 | 58 | and other Xiph.org contributors 59 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2002-2009 Xiph.org Foundation 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | - Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | - Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in the 12 | documentation and/or other materials provided with the distribution. 13 | 14 | - Neither the name of the Xiph.org Foundation nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION 22 | OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Please see the file COPYING for the copyright license for this software. 2 | 3 | In addition to and irrespective of the copyright license associated 4 | with this software, On2 Technologies, Inc. makes the following statement 5 | regarding technology used in this software: 6 | 7 | On2 represents and warrants that it shall not assert any rights 8 | relating to infringement of On2's registered patents, nor initiate 9 | any litigation asserting such rights, against any person who, or 10 | entity which utilizes the On2 VP3 Codec Software, including any 11 | use, distribution, and sale of said Software; which make changes, 12 | modifications, and improvements in said Software; and to use, 13 | distribute, and sell said changes as well as applications for other 14 | fields of use. 15 | 16 | This reference implementation is originally derived from the On2 VP3 17 | Codec Software, and the Theora video format is essentially compatible 18 | with the VP3 video format, consisting of a backward-compatible superset. 19 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | AUTOMAKE_OPTIONS = foreign 1.11 dist-zip dist-xz 4 | ACLOCAL_AMFLAGS=-I m4 5 | 6 | if THEORA_ENABLE_EXAMPLES 7 | EXAMPLES_DIR = examples 8 | else 9 | EXAMPLES_DIR = 10 | endif 11 | 12 | SUBDIRS = lib include doc tests m4 $(EXAMPLES_DIR) 13 | 14 | EXTRA_DIST = \ 15 | README.md CHANGES COPYING LICENSE \ 16 | autogen.sh win32 macosx symbian SConstruct \ 17 | libtheora.spec libtheora.spec.in \ 18 | theora-uninstalled.pc.in 19 | 20 | pkgconfigdir = $(libdir)/pkgconfig 21 | pkgconfig_DATA = theora.pc theoradec.pc theoraenc.pc 22 | 23 | # Remove the .svn folders included in the tarball 24 | dist-hook: 25 | find $(distdir) -type d -name '.svn' | xargs rm -rf 26 | 27 | debug: 28 | $(MAKE) all CFLAGS="@DEBUG@" 29 | 30 | profile: 31 | $(MAKE) all CFLAGS="@PROFILE@" 32 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (c) 2010-2015 Xiph.Org Foundation and contributors. 3 | # Use of this source code is governed by a BSD-style license that can be 4 | # found in the COPYING file. 5 | 6 | # Run this to set up the build system: configure, makefiles, etc. 7 | set -e 8 | 9 | srcdir=`dirname $0` 10 | test -n "$srcdir" && cd "$srcdir" 11 | 12 | echo "Updating build configuration files, please wait...." 13 | 14 | autoreconf -isf 15 | -------------------------------------------------------------------------------- /doc/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | SUBDIRS = spec 4 | 5 | static_docs = vp3-format.txt color.html \ 6 | draft-ietf-avt-rtp-theora-00.xml \ 7 | draft-ietf-avt-rtp-theora-00.txt 8 | 9 | doc_DATA = $(static_docs) doxygen-build.stamp 10 | 11 | EXTRA_DIST = $(static_docs) Doxyfile.in 12 | 13 | if HAVE_DOXYGEN 14 | doxygen-build.stamp: Doxyfile $(top_srcdir)/include/theora/*.h 15 | doxygen 16 | touch doxygen-build.stamp 17 | else 18 | doxygen-build.stamp: 19 | echo "*** Warning: Doxygen not found; documentation will not be built." 20 | touch doxygen-build.stamp 21 | endif 22 | 23 | dist_docdir = $(distdir)/libtheora 24 | 25 | dist-hook: 26 | if test -d libtheora; then \ 27 | mkdir $(dist_docdir); \ 28 | echo -n "copying built documentation..."; \ 29 | for dir in libtheora/*; do \ 30 | b=`basename $$dir`; \ 31 | if test $$b != ".svn"; then \ 32 | if test -d $$dir; then \ 33 | mkdir $(dist_docdir)/$$b; \ 34 | for f in $$dir/*; do \ 35 | cp -p $$f $(dist_docdir)/$$b; \ 36 | done; \ 37 | fi; \ 38 | fi; \ 39 | done; \ 40 | echo "OK"; \ 41 | fi 42 | for item in $(EXTRA_DIST); do \ 43 | if test -d $$item; then \ 44 | echo -n "cleaning $$item dir for distribution..."; \ 45 | rm -rf `find $(distdir)/$$item -name .svn`; \ 46 | echo "OK"; \ 47 | fi; \ 48 | done 49 | 50 | 51 | 52 | install-data-local: doxygen-build.stamp 53 | $(mkinstalldirs) $(DESTDIR)$(docdir) 54 | if test -d libtheora; then \ 55 | for dir in libtheora/*; do \ 56 | if test -d $$dir; then \ 57 | b=`basename $$dir`; \ 58 | $(mkinstalldirs) $(DESTDIR)$(docdir)/$$b; \ 59 | for f in $$dir/*; do \ 60 | $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$b; \ 61 | done \ 62 | fi \ 63 | done \ 64 | fi 65 | 66 | uninstall-local: 67 | rm -rf $(DESTDIR)$(docdir) 68 | 69 | clean-local: 70 | if test -d libtheora; then rm -rf libtheora; fi 71 | if test -f doxygen-build.stamp; then rm -f doxygen-build.stamp; fi 72 | 73 | -------------------------------------------------------------------------------- /doc/spec/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | # makefile to generate the spec document from sources 4 | # requires transfig and pdflatex 5 | 6 | built_docs = Theora.pdf 7 | 8 | DISTCLEANFILES = $(built_docs) 9 | 10 | if BUILD_SPEC 11 | doc_DATA = $(built_docs) 12 | endif 13 | 14 | SPEC_SRCS = spec.tex spec.bib 15 | 16 | FIG_SRCS = pic-frame.fig hilbert-mb.fig hilbert-block.fig xifish.fig \ 17 | superblock.fig macroblock.fig raster-block.fig reference-frames.fig \ 18 | pixel444.fig pixel422.fig pixel420.fig idct.fig fdct.fig \ 19 | pic_even.fig pic_even_odd.fig pic_odd.fig pic_odd_even.fig \ 20 | lflim.fig 21 | 22 | FIG_TEXS = $(FIG_SRCS:.fig=.tex) 23 | FIG_AUXS = $(FIG_SRCS:.fig=.aux) 24 | FIG_PDFS = $(FIG_SRCS:.fig=.pdf) 25 | 26 | # add any native-pdf figures here 27 | FIG_OBJS = $(FIG_PDFS) 28 | 29 | EXTRA_DIST = $(built_docs) $(SPEC_SRCS) $(FIG_SRCS) ltablex.sty 30 | 31 | if BUILD_SPEC 32 | # latex three times is the charm with references 33 | # long tables require the .aux file to start from scratch 34 | Theora.pdf : $(SPEC_SRCS) $(FIG_OBJS) vp3huff.tex 35 | -$(RM) spec.aux 36 | -cd $(srcdir) && TEXINPUTS=".:$(CURDIR):" pdflatex \ 37 | -interaction nonstopmode -output-directory "$(CURDIR)" spec.tex 38 | BIBINPUTS="$(srcdir):.:" BSTINPUT="$(srcdir):.:" bibtex spec.aux 39 | cd $(srcdir) && TEXINPUTS=".:$(CURDIR):" pdflatex \ 40 | -interaction nonstopmode -output-directory "$(CURDIR)" spec.tex 41 | cd $(srcdir) && TEXINPUTS=".:$(CURDIR):" pdflatex \ 42 | -interaction nonstopmode -output-directory "$(CURDIR)" spec.tex 43 | mv spec.pdf $@ 44 | else 45 | Theora.pdf : 46 | echo "*** Warning: Missing tools; $@ will not be built." 47 | endif 48 | 49 | vp3huff.tex : vp3huff 50 | ./vp3huff > $@ 51 | 52 | noinst_PROGRAMS = vp3huff 53 | vp3huff_SOURCES = vp3huff.c 54 | 55 | figures : $(FIG_OBJS) 56 | 57 | # rules to generate latex and pdf versions of the xfig figures 58 | .fig.tex: 59 | fig2dev -L latex $< $@ 60 | 61 | .fig.pdf: 62 | fig2dev -L pdf -p 0 $< $@ 63 | 64 | SUFFIXES = .fig .tex .pdf 65 | 66 | # clean targets 67 | clean-local: 68 | -$(RM) $(FIG_TEXS) 69 | -$(RM) $(FIG_AUXS) 70 | -$(RM) $(FIG_PDFS) 71 | -$(RM) vp3huff 72 | -$(RM) vp3huff.tex 73 | -$(RM) vp3huff.aux 74 | -$(RM) spec.aux 75 | -$(RM) spec.log 76 | -$(RM) spec.lof 77 | -$(RM) spec.lot 78 | -$(RM) spec.out 79 | -$(RM) spec.bbl 80 | -$(RM) spec.blg 81 | -$(RM) spec.toc 82 | 83 | maintainer-clean-local: 84 | -$(RM) $(built_docs) 85 | 86 | maintainerclean: maintainer-clean 87 | -------------------------------------------------------------------------------- /doc/spec/hilbert-block.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 Produced by xfig version 3.2.5-alpha4 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 6 675 645 3825 3795 11 | 4 1 0 50 0 1 12 0.0000 0 150 105 900 3660 0\001 12 | 4 1 0 50 0 1 12 0.0000 0 150 105 1800 3660 1\001 13 | 4 1 0 50 0 1 12 0.0000 0 150 105 1800 2760 2\001 14 | 4 1 0 50 0 1 12 0.0000 0 150 105 900 2760 3\001 15 | 4 1 0 50 0 1 12 0.0000 0 150 105 900 1860 4\001 16 | 4 1 0 50 0 1 12 0.0000 0 150 105 900 960 5\001 17 | 4 1 0 50 0 1 12 0.0000 0 150 105 1800 960 6\001 18 | 4 1 0 50 0 1 12 0.0000 0 150 105 1800 1860 7\001 19 | 4 1 0 50 0 1 12 0.0000 0 150 105 2700 1860 8\001 20 | 4 1 0 50 0 1 12 0.0000 0 150 105 2700 960 9\001 21 | 4 1 0 50 0 1 12 0.0000 0 150 210 3600 960 10\001 22 | 4 1 0 50 0 1 12 0.0000 0 150 210 3600 1860 11\001 23 | 4 1 0 50 0 1 12 0.0000 0 150 210 3600 2760 12\001 24 | 4 1 0 50 0 1 12 0.0000 0 150 210 2700 2760 13\001 25 | 4 1 0 50 0 1 12 0.0000 0 150 210 2700 3660 14\001 26 | 4 1 0 50 0 1 12 0.0000 0 150 210 3600 3660 15\001 27 | -6 28 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 29 | 1 1 1.00 60.00 120.00 30 | 1125 3600 1575 3600 31 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 32 | 1 1 1.00 60.00 120.00 33 | 1800 3375 1800 2925 34 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 35 | 1 1 1.00 60.00 120.00 36 | 1575 2700 1125 2700 37 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 38 | 1 1 1.00 60.00 120.00 39 | 900 2475 900 2025 40 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 41 | 1 1 1.00 60.00 120.00 42 | 900 1575 900 1125 43 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 44 | 1 1 1.00 60.00 120.00 45 | 1125 900 1575 900 46 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 47 | 1 1 1.00 60.00 120.00 48 | 1800 1125 1800 1575 49 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 50 | 1 1 1.00 60.00 120.00 51 | 2025 1800 2475 1800 52 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 53 | 1 1 1.00 60.00 120.00 54 | 2700 1575 2700 1125 55 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 56 | 1 1 1.00 60.00 120.00 57 | 2925 900 3375 900 58 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 59 | 1 1 1.00 60.00 120.00 60 | 3600 1125 3600 1575 61 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 62 | 1 1 1.00 60.00 120.00 63 | 3600 2025 3600 2475 64 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 65 | 1 1 1.00 60.00 120.00 66 | 3375 2700 2925 2700 67 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 68 | 1 1 1.00 60.00 120.00 69 | 2700 2925 2700 3375 70 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 71 | 1 1 1.00 60.00 120.00 72 | 2925 3600 3375 3600 73 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 74 | 450 450 1350 450 1350 1350 450 1350 450 450 75 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 76 | 1350 450 2250 450 2250 1350 1350 1350 1350 450 77 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 78 | 2250 450 3150 450 3150 1350 2250 1350 2250 450 79 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 80 | 3150 450 4050 450 4050 1350 3150 1350 3150 450 81 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 82 | 450 1350 1350 1350 1350 2250 450 2250 450 1350 83 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 84 | 1350 1350 2250 1350 2250 2250 1350 2250 1350 1350 85 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 86 | 2250 1350 3150 1350 3150 2250 2250 2250 2250 1350 87 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 88 | 3150 1350 4050 1350 4050 2250 3150 2250 3150 1350 89 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 90 | 450 2250 1350 2250 1350 3150 450 3150 450 2250 91 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 92 | 1350 2250 2250 2250 2250 3150 1350 3150 1350 2250 93 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 94 | 2250 2250 3150 2250 3150 3150 2250 3150 2250 2250 95 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 96 | 3150 2250 4050 2250 4050 3150 3150 3150 3150 2250 97 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 98 | 450 3150 1350 3150 1350 4050 450 4050 450 3150 99 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 100 | 1350 3150 2250 3150 2250 4050 1350 4050 1350 3150 101 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 102 | 2250 3150 3150 3150 3150 4050 2250 4050 2250 3150 103 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 104 | 3150 3150 4050 3150 4050 4050 3150 4050 3150 3150 105 | -------------------------------------------------------------------------------- /doc/spec/hilbert-mb.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 Produced by xfig version 3.2.5-alpha4 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 6 810 810 1890 1890 11 | 4 1 0 50 0 1 12 0.0000 0 150 105 900 1860 0\001 12 | 4 1 0 50 0 1 12 0.0000 0 150 105 900 960 1\001 13 | 4 1 0 50 0 1 12 0.0000 0 150 105 1800 960 2\001 14 | 4 1 0 50 0 1 12 0.0000 0 150 105 1800 1860 3\001 15 | -6 16 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 17 | 1 1 1.00 60.00 120.00 18 | 900 1575 900 1125 19 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 20 | 1 1 1.00 60.00 120.00 21 | 1125 900 1575 900 22 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 23 | 1 1 1.00 60.00 120.00 24 | 1800 1125 1800 1575 25 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 26 | 450 450 1350 450 1350 1350 450 1350 450 450 27 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 28 | 1350 450 2250 450 2250 1350 1350 1350 1350 450 29 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 30 | 450 1350 1350 1350 1350 2250 450 2250 450 1350 31 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 32 | 1350 1350 2250 1350 2250 2250 1350 2250 1350 1350 33 | -------------------------------------------------------------------------------- /doc/spec/lflim.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 Produced by xfig version 3.2.5 2 | Landscape 3 | Center 4 | Inches 5 | Letter 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 2 11 | 1 1 1.00 60.00 120.00 12 | 600 2400 5400 2400 13 | 2 1 2 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 2 14 | 1 1 1.00 60.00 120.00 15 | 3000 4200 3000 600 16 | 2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 6 17 | 600 2400 1200 2400 2100 3300 3900 1500 4800 2400 5400 2400 18 | 4 1 0 50 -1 1 12 0.0000 0 195 615 1200 2325 (-2L,0)\001 19 | 4 1 0 50 -1 1 12 0.0000 0 195 600 2100 3525 (-L,-L)\001 20 | 4 0 0 50 -1 1 12 0.0000 0 150 360 3075 825 lflim\001 21 | 4 1 0 50 -1 1 12 0.0000 0 195 480 3900 1425 (L,L)\001 22 | 4 1 0 50 -1 1 12 0.0000 0 195 555 4800 2625 (2L,0)\001 23 | 4 0 0 50 -1 1 12 0.0000 0 150 135 5250 2625 R\001 24 | -------------------------------------------------------------------------------- /doc/spec/macroblock.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 Produced by xfig version 3.2.5-alpha4 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 11 | 702 1540 4867 1540 4867 4828 702 4828 702 1540 12 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 13 | 710 4828 928 4828 928 4610 710 4610 710 4828 14 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 15 | 914 4610 1133 4610 1133 4391 914 4391 914 4610 16 | 2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 17 | 723 4385 1133 4385 1133 4828 723 4828 723 4385 18 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 19 | 710 4610 928 4610 928 4391 710 4391 710 4610 20 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 21 | 914 4828 1133 4828 1133 4610 914 4610 914 4828 22 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 23 | 2068 857 6233 857 6233 4145 2068 4145 2068 857 24 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 25 | 1385 1198 5550 1198 5550 4487 1385 4487 1385 1198 26 | 2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 27 | 2089 3702 2499 3702 2499 4145 2089 4145 2089 3702 28 | 2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 29 | 1406 4043 1816 4043 1816 4487 1406 4487 1406 4043 30 | 4 0 0 50 -1 0 5 0.0000 4 79 182 613 4943 (0,0)\001 31 | 4 0 0 50 -1 0 5 0.0000 4 80 785 2055 833 Frame: chroma plane\001 32 | 4 0 0 50 -1 0 5 0.0000 4 57 467 894 4009 Macroblock\001 33 | 4 0 0 50 -1 0 5 0.0000 4 57 228 450 4521 Block\001 34 | 4 0 0 50 -1 0 5 0.0000 4 57 228 450 4760 Block\001 35 | 4 0 0 50 -1 0 5 0.0000 4 57 148 450 4863 8x8\001 36 | 4 0 0 50 -1 0 5 0.0000 4 80 785 1235 1175 Frame: chroma plane\001 37 | 4 0 0 50 -1 0 5 0.0000 4 80 694 621 1516 Frame: luma plane\001 38 | -------------------------------------------------------------------------------- /doc/spec/pic-frame.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 0 32 #7f7f7f 11 | 6 250 236 5737 4724 12 | 6 659 4520 1068 4724 13 | 4 1 0 50 0 0 7 0.0000 0 75 450 864 4724 X Offset\001 14 | 4 1 0 50 0 0 7 0.0000 0 90 375 864 4596 Picture\001 15 | -6 16 | 6 250 3880 454 4290 17 | 4 1 0 50 0 0 7 1.5708 0 90 375 327 4086 Picture\001 18 | 4 1 0 50 0 0 7 1.5708 0 75 450 454 4086 Y Offset\001 19 | -6 20 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 21 | 608 301 608 454 22 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 23 | 5466 301 5466 454 24 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 1 2 25 | 1 1 1.00 34.09 68.18 26 | 1 1 1.00 34.09 68.18 27 | 608 378 5466 378 28 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 29 | 608 4392 608 4546 30 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 31 | 1119 4392 1119 4546 32 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 1 2 33 | 1 1 1.00 34.09 68.18 34 | 1 1 1.00 34.09 68.18 35 | 608 4468 1119 4468 36 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 1 2 37 | 1 1 1.00 34.09 68.18 38 | 1 1 1.00 34.09 68.18 39 | 1119 4468 5211 4468 40 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 41 | 5211 4392 5211 4546 42 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 43 | 404 4340 557 4340 44 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 45 | 404 3830 557 3830 46 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 47 | 404 761 557 761 48 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 1 2 49 | 1 1 1.00 34.09 68.18 50 | 1 1 1.00 34.09 68.18 51 | 480 3830 480 761 52 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 53 | 5517 4340 5671 4340 54 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2 55 | 5517 506 5671 506 56 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 1 2 57 | 1 1 1.00 34.09 68.18 58 | 1 1 1.00 34.09 68.18 59 | 5594 4340 5594 506 60 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 1 2 61 | 1 1 1.00 34.09 68.18 62 | 1 1 1.00 34.09 68.18 63 | 480 4340 480 3830 64 | 2 2 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 65 | 608 506 5466 506 5466 4340 608 4340 608 506 66 | 2 2 0 1 0 7 50 0 -1 0.000 0 0 7 0 0 5 67 | 1119 761 5211 761 5211 3830 1119 3830 1119 761 68 | 4 1 0 50 0 0 7 0.0000 0 90 720 3165 4596 Picture Width\001 69 | 4 1 0 50 0 0 7 1.5708 0 105 690 5722 1912 Frame Height\001 70 | 4 1 0 50 0 0 7 0.0000 0 90 660 2782 326 Frame Width\001 71 | 4 1 0 50 0 0 7 1.5708 0 105 750 454 2295 Picture Height\001 72 | 4 1 0 50 0 0 7 0.0000 0 75 315 2782 685 Frame\001 73 | 4 1 0 50 0 0 7 0.0000 0 90 375 3165 2295 Picture\001 74 | 4 0 0 50 0 0 7 0.0000 0 105 240 659 4290 (0,0)\001 75 | -6 76 | -------------------------------------------------------------------------------- /doc/spec/pic_even.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 6 724 2025 945 2475 11 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 12 | 732 2244 945 2244 945 2025 732 2025 732 2244 13 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 14 | 732 2475 945 2475 945 2256 732 2256 732 2475 15 | -6 16 | 6 1665 2070 1888 2475 17 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 18 | 1673 2267 1888 2267 1888 2070 1673 2070 1673 2267 19 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 20 | 1673 2475 1888 2475 1888 2278 1673 2278 1673 2475 21 | -6 22 | 6 724 900 945 1350 23 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 24 | 732 1119 945 1119 945 900 732 900 732 1119 25 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 26 | 732 1350 945 1350 945 1131 732 1131 732 1350 27 | -6 28 | 6 6300 2070 6795 2520 29 | 6 6300 2070 6570 2295 30 | 6 6300 2070 6570 2295 31 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 32 | 6335 2295 6553 2295 6553 2076 6335 2076 6335 2295 33 | -6 34 | -6 35 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 36 | 6335 2520 6553 2520 6553 2301 6335 2301 6335 2520 37 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 38 | 6560 2295 6778 2295 6778 2076 6560 2076 6560 2295 39 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 40 | 6560 2520 6778 2520 6778 2301 6560 2301 6560 2520 41 | -6 42 | 6 4455 2070 4950 2520 43 | 6 4455 2070 4725 2295 44 | 6 4455 2070 4725 2295 45 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 46 | 4490 2295 4708 2295 4708 2076 4490 2076 4490 2295 47 | -6 48 | -6 49 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 50 | 4490 2520 4708 2520 4708 2301 4490 2301 4490 2520 51 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 52 | 4715 2295 4933 2295 4933 2076 4715 2076 4715 2295 53 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 54 | 4715 2520 4933 2520 4933 2301 4715 2301 4715 2520 55 | -6 56 | 6 4455 945 4950 1395 57 | 6 4455 945 4725 1170 58 | 6 4455 945 4725 1170 59 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 60 | 4490 1170 4708 1170 4708 951 4490 951 4490 1170 61 | -6 62 | -6 63 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 64 | 4490 1395 4708 1395 4708 1176 4490 1176 4490 1395 65 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 66 | 4715 1170 4933 1170 4933 951 4715 951 4715 1170 67 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 68 | 4715 1395 4933 1395 4933 1176 4715 1176 4715 1395 69 | -6 70 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 71 | 2249 1800 3736 1800 3736 2947 2249 2947 2249 1800 72 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 73 | 2385 1935 3600 1935 3600 2745 2385 2745 2385 1935 74 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 75 | 2397 2745 2610 2745 2610 2526 2397 2526 2397 2745 76 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 77 | 3375 2745 3590 2745 3590 2548 3375 2548 3375 2745 78 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 79 | 724 900 1888 900 1888 2475 724 2475 724 900 80 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 81 | 473 675 2003 675 2003 2925 473 2925 473 675 82 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 83 | 2397 2154 2610 2154 2610 1935 2397 1935 2397 2154 84 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 85 | 4500 945 6795 945 6795 2520 4500 2520 4500 945 86 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 87 | 4500 945 6795 945 6795 2520 4500 2520 4500 945 88 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 89 | 4005 720 7020 720 7020 2970 4005 2970 4005 720 90 | 4 0 0 50 -1 0 24 0.0000 4 30 270 2835 2655 ...\001 91 | 4 0 0 50 -1 0 24 0.0000 4 30 270 1080 2295 ...\001 92 | 4 0 0 50 -1 0 24 0.0000 4 30 270 765 1665 ...\001 93 | 4 0 0 50 -1 0 24 0.0000 4 30 270 2430 2385 ...\001 94 | 4 0 0 50 -1 0 7 0.0000 4 90 210 450 3060 (0,0)\001 95 | 4 0 0 50 -1 0 7 0.0000 4 90 210 2205 3060 (0,0)\001 96 | 4 0 0 50 -1 0 7 0.0000 4 90 210 3943 3098 (0,0)\001 97 | 4 0 0 50 -1 0 7 0.0000 4 75 285 4545 2655 Pixels\001 98 | 4 0 0 50 -1 0 24 0.0000 4 30 270 5220 2295 ...\001 99 | 4 0 0 50 -1 0 24 0.0000 4 30 270 4680 1755 ...\001 100 | 4 0 0 50 -1 0 9 0.0000 4 105 1335 2205 1665 Frame: chroma (4:2:0 case)\001 101 | 4 0 0 50 -1 0 9 0.0000 4 105 1335 450 585 Frame: chroma (4:2:2 case)\001 102 | 4 0 0 50 -1 0 9 0.0000 4 75 615 4005 630 Frame: luma\001 103 | -------------------------------------------------------------------------------- /doc/spec/pic_even_odd.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 6 724 2025 945 2475 11 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 12 | 732 2244 945 2244 945 2025 732 2025 732 2244 13 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 14 | 732 2475 945 2475 945 2256 732 2256 732 2475 15 | -6 16 | 6 1665 2070 1888 2475 17 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 18 | 1673 2267 1888 2267 1888 2070 1673 2070 1673 2267 19 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 20 | 1673 2475 1888 2475 1888 2278 1673 2278 1673 2475 21 | -6 22 | 6 4455 2070 4950 2520 23 | 6 4455 2070 4725 2295 24 | 6 4455 2070 4725 2295 25 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 26 | 4490 2295 4708 2295 4708 2076 4490 2076 4490 2295 27 | -6 28 | -6 29 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 30 | 4490 2520 4708 2520 4708 2301 4490 2301 4490 2520 31 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 32 | 4715 2295 4933 2295 4933 2076 4715 2076 4715 2295 33 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 34 | 4715 2520 4933 2520 4933 2301 4715 2301 4715 2520 35 | -6 36 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 37 | 2249 1800 3736 1800 3736 2947 2249 2947 2249 1800 38 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 39 | 2385 1935 3600 1935 3600 2745 2385 2745 2385 1935 40 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 41 | 2397 2745 2610 2745 2610 2526 2397 2526 2397 2745 42 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 43 | 3375 2745 3590 2745 3590 2548 3375 2548 3375 2745 44 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 45 | 724 900 1888 900 1888 2475 724 2475 724 900 46 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 47 | 473 675 2003 675 2003 2925 473 2925 473 675 48 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 49 | 2397 2154 2610 2154 2610 1935 2397 1935 2397 2154 50 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 51 | 4500 945 6795 945 6795 2520 4500 2520 4500 945 52 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 53 | 4005 720 7020 720 7020 2970 4005 2970 4005 720 54 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 55 | 4500 945 6795 945 6795 2520 4500 2520 4500 945 56 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 57 | 4490 1170 4708 1170 4708 951 4490 951 4490 1170 58 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 59 | 4715 1170 4933 1170 4933 951 4715 951 4715 1170 60 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 61 | 6560 2520 6778 2520 6778 2301 6560 2301 6560 2520 62 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 63 | 6560 2295 6778 2295 6778 2076 6560 2076 6560 2295 64 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 65 | 4715 945 4933 945 4933 726 4715 726 4715 945 66 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 67 | 4490 945 4708 945 4708 726 4490 726 4490 945 68 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 69 | 6785 2295 7003 2295 7003 2076 6785 2076 6785 2295 70 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 71 | 6785 2520 7003 2520 7003 2301 6785 2301 6785 2520 72 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 73 | 732 1125 945 1125 945 906 732 906 732 1125 74 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 75 | 732 894 945 894 945 675 732 675 732 894 76 | 4 0 0 50 -1 0 24 0.0000 4 30 270 2835 2655 ...\001 77 | 4 0 0 50 -1 0 24 0.0000 4 30 270 1080 2295 ...\001 78 | 4 0 0 50 -1 0 24 0.0000 4 30 270 765 1665 ...\001 79 | 4 0 0 50 -1 0 24 0.0000 4 30 270 2430 2385 ...\001 80 | 4 0 0 50 -1 0 7 0.0000 4 90 210 450 3060 (0,0)\001 81 | 4 0 0 50 -1 0 7 0.0000 4 90 210 2205 3060 (0,0)\001 82 | 4 0 0 50 -1 0 7 0.0000 4 90 210 3943 3098 (0,0)\001 83 | 4 0 0 50 -1 0 7 0.0000 4 75 285 4545 2655 Pixels\001 84 | 4 0 0 50 -1 0 24 0.0000 4 30 270 5220 2295 ...\001 85 | 4 0 0 50 -1 0 24 0.0000 4 30 270 4680 1755 ...\001 86 | 4 0 0 50 -1 0 9 0.0000 4 105 1335 2205 1665 Frame: chroma (4:2:0 case)\001 87 | 4 0 0 50 -1 0 9 0.0000 4 105 1335 450 585 Frame: chroma (4:2:2 case)\001 88 | 4 0 0 50 -1 0 9 0.0000 4 75 615 4005 630 Frame: luma\001 89 | -------------------------------------------------------------------------------- /doc/spec/pic_odd.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 6 724 2025 945 2475 11 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 12 | 732 2244 945 2244 945 2025 732 2025 732 2244 13 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 14 | 732 2475 945 2475 945 2256 732 2256 732 2475 15 | -6 16 | 6 1665 2070 1888 2475 17 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 18 | 1673 2267 1888 2267 1888 2070 1673 2070 1673 2267 19 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 20 | 1673 2475 1888 2475 1888 2278 1673 2278 1673 2475 21 | -6 22 | 6 724 900 945 1350 23 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 24 | 732 1119 945 1119 945 900 732 900 732 1119 25 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 26 | 732 1350 945 1350 945 1131 732 1131 732 1350 27 | -6 28 | 6 6300 2070 6795 2520 29 | 6 6300 2070 6570 2295 30 | 6 6300 2070 6570 2295 31 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 32 | 6335 2295 6553 2295 6553 2076 6335 2076 6335 2295 33 | -6 34 | -6 35 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 36 | 6335 2520 6553 2520 6553 2301 6335 2301 6335 2520 37 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 38 | 6560 2295 6778 2295 6778 2076 6560 2076 6560 2295 39 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 40 | 6560 2520 6778 2520 6778 2301 6560 2301 6560 2520 41 | -6 42 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 43 | 2249 1800 3736 1800 3736 2947 2249 2947 2249 1800 44 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 45 | 2385 1935 3600 1935 3600 2745 2385 2745 2385 1935 46 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 47 | 2397 2745 2610 2745 2610 2526 2397 2526 2397 2745 48 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 49 | 3375 2745 3590 2745 3590 2548 3375 2548 3375 2745 50 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 51 | 724 900 1888 900 1888 2475 724 2475 724 900 52 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 53 | 473 675 2003 675 2003 2925 473 2925 473 675 54 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 55 | 2397 2154 2610 2154 2610 1935 2397 1935 2397 2154 56 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 57 | 4500 945 6795 945 6795 2520 4500 2520 4500 945 58 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 59 | 4500 945 6795 945 6795 2520 4500 2520 4500 945 60 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 61 | 4005 720 7020 720 7020 2970 4005 2970 4005 720 62 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 63 | 4490 2295 4708 2295 4708 2076 4490 2076 4490 2295 64 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 65 | 4490 2520 4708 2520 4708 2301 4490 2301 4490 2520 66 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 67 | 4490 1170 4708 1170 4708 951 4490 951 4490 1170 68 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 69 | 4490 1395 4708 1395 4708 1176 4490 1176 4490 1395 70 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 71 | 4265 1170 4483 1170 4483 951 4265 951 4265 1170 72 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 73 | 4265 1395 4483 1395 4483 1176 4265 1176 4265 1395 74 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 75 | 4265 2295 4483 2295 4483 2076 4265 2076 4265 2295 76 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 77 | 4265 2520 4483 2520 4483 2301 4265 2301 4265 2520 78 | 4 0 0 50 -1 0 24 0.0000 4 30 270 2835 2655 ...\001 79 | 4 0 0 50 -1 0 24 0.0000 4 30 270 1080 2295 ...\001 80 | 4 0 0 50 -1 0 24 0.0000 4 30 270 765 1665 ...\001 81 | 4 0 0 50 -1 0 24 0.0000 4 30 270 2430 2385 ...\001 82 | 4 0 0 50 -1 0 7 0.0000 4 90 210 450 3060 (0,0)\001 83 | 4 0 0 50 -1 0 7 0.0000 4 90 210 2205 3060 (0,0)\001 84 | 4 0 0 50 -1 0 7 0.0000 4 90 210 3943 3098 (0,0)\001 85 | 4 0 0 50 -1 0 7 0.0000 4 75 285 4545 2655 Pixels\001 86 | 4 0 0 50 -1 0 24 0.0000 4 30 270 5220 2295 ...\001 87 | 4 0 0 50 -1 0 24 0.0000 4 30 270 4680 1755 ...\001 88 | 4 0 0 50 -1 0 9 0.0000 4 105 1335 2205 1665 Frame: chroma (4:2:0 case)\001 89 | 4 0 0 50 -1 0 9 0.0000 4 105 1335 450 585 Frame: chroma (4:2:2 case)\001 90 | 4 0 0 50 -1 0 9 0.0000 4 75 615 4005 630 Frame: luma\001 91 | -------------------------------------------------------------------------------- /doc/spec/pic_odd_even.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 6 724 2025 945 2475 11 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 12 | 732 2244 945 2244 945 2025 732 2025 732 2244 13 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 14 | 732 2475 945 2475 945 2256 732 2256 732 2475 15 | -6 16 | 6 1665 2070 1888 2475 17 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 18 | 1673 2267 1888 2267 1888 2070 1673 2070 1673 2267 19 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 20 | 1673 2475 1888 2475 1888 2278 1673 2278 1673 2475 21 | -6 22 | 6 724 900 945 1350 23 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 24 | 732 1119 945 1119 945 900 732 900 732 1119 25 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 26 | 732 1350 945 1350 945 1131 732 1131 732 1350 27 | -6 28 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 29 | 2249 1800 3736 1800 3736 2947 2249 2947 2249 1800 30 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 31 | 2385 1935 3600 1935 3600 2745 2385 2745 2385 1935 32 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 33 | 2397 2745 2610 2745 2610 2526 2397 2526 2397 2745 34 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 35 | 3375 2745 3590 2745 3590 2548 3375 2548 3375 2745 36 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 37 | 724 900 1888 900 1888 2475 724 2475 724 900 38 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 39 | 473 675 2003 675 2003 2925 473 2925 473 675 40 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 41 | 2397 2154 2610 2154 2610 1935 2397 1935 2397 2154 42 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 43 | 4500 945 6795 945 6795 2520 4500 2520 4500 945 44 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 45 | 4005 720 7020 720 7020 2970 4005 2970 4005 720 46 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 47 | 4490 2295 4708 2295 4708 2076 4490 2076 4490 2295 48 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 49 | 4490 2520 4708 2520 4708 2301 4490 2301 4490 2520 50 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 51 | 4265 2295 4483 2295 4483 2076 4265 2076 4265 2295 52 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 53 | 4265 2520 4483 2520 4483 2301 4265 2301 4265 2520 54 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 55 | 4500 945 6795 945 6795 2520 4500 2520 4500 945 56 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 57 | 6560 2520 6778 2520 6778 2301 6560 2301 6560 2520 58 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 59 | 6560 2295 6778 2295 6778 2076 6560 2076 6560 2295 60 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 61 | 6785 2295 7003 2295 7003 2076 6785 2076 6785 2295 62 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 63 | 6785 2520 7003 2520 7003 2301 6785 2301 6785 2520 64 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 65 | 4490 1170 4708 1170 4708 951 4490 951 4490 1170 66 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 67 | 4265 945 4483 945 4483 726 4265 726 4265 945 68 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 69 | 4265 1170 4483 1170 4483 951 4265 951 4265 1170 70 | 2 2 0 1 0 11 50 -1 43 0.000 0 0 -1 0 0 5 71 | 4490 945 4708 945 4708 726 4490 726 4490 945 72 | 4 0 0 50 -1 0 24 0.0000 4 30 270 2835 2655 ...\001 73 | 4 0 0 50 -1 0 24 0.0000 4 30 270 1080 2295 ...\001 74 | 4 0 0 50 -1 0 24 0.0000 4 30 270 765 1665 ...\001 75 | 4 0 0 50 -1 0 24 0.0000 4 30 270 2430 2385 ...\001 76 | 4 0 0 50 -1 0 7 0.0000 4 90 210 450 3060 (0,0)\001 77 | 4 0 0 50 -1 0 7 0.0000 4 90 210 2205 3060 (0,0)\001 78 | 4 0 0 50 -1 0 7 0.0000 4 90 210 3943 3098 (0,0)\001 79 | 4 0 0 50 -1 0 7 0.0000 4 75 285 4545 2655 Pixels\001 80 | 4 0 0 50 -1 0 24 0.0000 4 30 270 5220 2295 ...\001 81 | 4 0 0 50 -1 0 24 0.0000 4 30 270 4680 1755 ...\001 82 | 4 0 0 50 -1 0 9 0.0000 4 105 1335 2205 1665 Frame: chroma (4:2:0 case)\001 83 | 4 0 0 50 -1 0 9 0.0000 4 105 1335 450 585 Frame: chroma (4:2:2 case)\001 84 | 4 0 0 50 -1 0 9 0.0000 4 75 615 4005 630 Frame: luma\001 85 | -------------------------------------------------------------------------------- /doc/spec/pixel420.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 6 675 4365 1170 4815 11 | 6 675 4365 945 4590 12 | 6 675 4365 945 4590 13 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 14 | 710 4590 928 4590 928 4371 710 4371 710 4590 15 | -6 16 | -6 17 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 18 | 710 4815 928 4815 928 4596 710 4596 710 4815 19 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 20 | 935 4590 1153 4590 1153 4371 935 4371 935 4590 21 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 22 | 935 4815 1153 4815 1153 4596 935 4596 935 4815 23 | -6 24 | 6 1125 4365 1646 4815 25 | 6 1125 4365 1420 4590 26 | 6 1125 4365 1420 4590 27 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 28 | 1163 4590 1401 4590 1401 4371 1163 4371 1163 4590 29 | -6 30 | -6 31 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 32 | 1163 4815 1401 4815 1401 4596 1163 4596 1163 4815 33 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 34 | 1409 4590 1646 4590 1646 4371 1409 4371 1409 4590 35 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 36 | 1409 4815 1646 4815 1646 4596 1409 4596 1409 4815 37 | -6 38 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 39 | 1665 1350 4788 1350 4788 4153 1665 4153 1665 1350 40 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 41 | 2700 900 5823 900 5823 3703 2700 3703 2700 900 42 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 43 | 702 2025 3825 2025 3825 4828 702 4828 702 2025 44 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 45 | 1800 4005 2018 4005 2018 3786 1800 3786 1800 4005 46 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 47 | 2160 4005 2378 4005 2378 3786 2160 3786 2160 4005 48 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 49 | 2835 3555 3053 3555 3053 3336 2835 3336 2835 3555 50 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 51 | 3195 3555 3413 3555 3413 3336 3195 3336 3195 3555 52 | 4 0 0 50 -1 0 8 0.0000 4 105 1215 1485 1305 Frame: chroma plane Cb\001 53 | 4 0 0 50 -1 0 8 0.0000 4 105 1200 2565 855 Frame: chroma plane Cr\001 54 | 4 0 0 50 -1 0 8 0.0000 4 105 1035 540 1980 Frame: luma planeY'\001 55 | 4 0 0 50 -1 0 7 0.0000 4 75 285 765 4320 Pixels\001 56 | 4 0 0 50 -1 0 7 0.0000 4 90 210 613 4943 (0,0)\001 57 | -------------------------------------------------------------------------------- /doc/spec/pixel422.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 6 675 4365 1170 4815 11 | 6 675 4365 945 4590 12 | 6 675 4365 945 4590 13 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 14 | 710 4590 928 4590 928 4371 710 4371 710 4590 15 | -6 16 | -6 17 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 18 | 710 4815 928 4815 928 4596 710 4596 710 4815 19 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 20 | 935 4590 1153 4590 1153 4371 935 4371 935 4590 21 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 22 | 935 4815 1153 4815 1153 4596 935 4596 935 4815 23 | -6 24 | 6 1125 4365 1646 4815 25 | 6 1125 4365 1420 4590 26 | 6 1125 4365 1420 4590 27 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 28 | 1163 4590 1401 4590 1401 4371 1163 4371 1163 4590 29 | -6 30 | -6 31 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 32 | 1163 4815 1401 4815 1401 4596 1163 4596 1163 4815 33 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 34 | 1409 4590 1646 4590 1646 4371 1409 4371 1409 4590 35 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 36 | 1409 4815 1646 4815 1646 4596 1409 4596 1409 4815 37 | -6 38 | 6 1800 3690 2025 4140 39 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 40 | 1807 3909 2025 3909 2025 3690 1807 3690 1807 3909 41 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 42 | 1807 4140 2025 4140 2025 3921 1807 3921 1807 4140 43 | -6 44 | 6 2160 3690 2385 4140 45 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 46 | 2167 3909 2385 3909 2385 3690 2167 3690 2167 3909 47 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 48 | 2167 4140 2385 4140 2385 3921 2167 3921 2167 4140 49 | -6 50 | 6 3195 3240 3420 3690 51 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 52 | 3202 3459 3420 3459 3420 3240 3202 3240 3202 3459 53 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 54 | 3202 3690 3420 3690 3420 3471 3202 3471 3202 3690 55 | -6 56 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 57 | 1665 1350 4788 1350 4788 4153 1665 4153 1665 1350 58 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 59 | 2842 3459 3060 3459 3060 3240 2842 3240 2842 3459 60 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 61 | 2700 900 5823 900 5823 3703 2700 3703 2700 900 62 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 63 | 2842 3690 3060 3690 3060 3471 2842 3471 2842 3690 64 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 65 | 702 2025 3825 2025 3825 4828 702 4828 702 2025 66 | 4 0 0 50 -1 0 8 0.0000 4 105 1215 1485 1305 Frame: chroma plane Cb\001 67 | 4 0 0 50 -1 0 8 0.0000 4 105 1200 2565 855 Frame: chroma plane Cr\001 68 | 4 0 0 50 -1 0 8 0.0000 4 105 1035 540 1980 Frame: luma planeY'\001 69 | 4 0 0 50 -1 0 7 0.0000 4 75 285 765 4320 Pixels\001 70 | 4 0 0 50 -1 0 7 0.0000 4 90 210 613 4943 (0,0)\001 71 | -------------------------------------------------------------------------------- /doc/spec/pixel444.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 11 | 702 2025 3825 2025 3825 4828 702 4828 702 2025 12 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 13 | 1665 1350 4788 1350 4788 4153 1665 4153 1665 1350 14 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 15 | 2700 900 5823 900 5823 3703 2700 3703 2700 900 16 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 17 | 710 4590 928 4590 928 4371 710 4371 710 4590 18 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 19 | 935 4590 1153 4590 1153 4371 935 4371 935 4590 20 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 21 | 935 4815 1153 4815 1153 4596 935 4596 935 4815 22 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 23 | 710 4815 928 4815 928 4596 710 4596 710 4815 24 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 25 | 1700 3915 1918 3915 1918 3696 1700 3696 1700 3915 26 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 27 | 1925 3915 2143 3915 2143 3696 1925 3696 1925 3915 28 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 29 | 1925 4140 2143 4140 2143 3921 1925 3921 1925 4140 30 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 31 | 1700 4140 1918 4140 1918 3921 1700 3921 1700 4140 32 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 33 | 2735 3465 2953 3465 2953 3246 2735 3246 2735 3465 34 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 35 | 2960 3465 3178 3465 3178 3246 2960 3246 2960 3465 36 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 37 | 2960 3690 3178 3690 3178 3471 2960 3471 2960 3690 38 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 39 | 2735 3690 2953 3690 2953 3471 2735 3471 2735 3690 40 | 4 0 0 50 -1 0 8 0.0000 4 105 1215 1485 1305 Frame: chroma plane Cb\001 41 | 4 0 0 50 -1 0 8 0.0000 4 105 1200 2565 855 Frame: chroma plane Cr\001 42 | 4 0 0 50 -1 0 8 0.0000 4 105 1035 540 1980 Frame: luma planeY'\001 43 | 4 0 0 50 -1 0 7 0.0000 4 75 285 765 4320 Pixels\001 44 | 4 0 0 50 -1 0 7 0.0000 4 90 210 613 4943 (0,0)\001 45 | -------------------------------------------------------------------------------- /doc/spec/raster-block.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 Produced by xfig version 3.2.5-alpha4 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 11 | 1 1 1.00 60.00 120.00 12 | 1125 900 1575 900 13 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 14 | 450 450 1350 450 1350 1350 450 1350 450 450 15 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 16 | 1350 450 2250 450 2250 1350 1350 1350 1350 450 17 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 18 | 2250 450 3150 450 3150 1350 2250 1350 2250 450 19 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 20 | 3150 450 4050 450 4050 1350 3150 1350 3150 450 21 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 22 | 450 1350 1350 1350 1350 2250 450 2250 450 1350 23 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 24 | 1350 1350 2250 1350 2250 2250 1350 2250 1350 1350 25 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 26 | 2250 1350 3150 1350 3150 2250 2250 2250 2250 1350 27 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 28 | 3150 1350 4050 1350 4050 2250 3150 2250 3150 1350 29 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 30 | 450 2250 1350 2250 1350 3150 450 3150 450 2250 31 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 32 | 1350 2250 2250 2250 2250 3150 1350 3150 1350 2250 33 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 34 | 2250 2250 3150 2250 3150 3150 2250 3150 2250 2250 35 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 36 | 3150 2250 4050 2250 4050 3150 3150 3150 3150 2250 37 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 38 | 450 3150 1350 3150 1350 4050 450 4050 450 3150 39 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 40 | 1350 3150 2250 3150 2250 4050 1350 4050 1350 3150 41 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 42 | 2250 3150 3150 3150 3150 4050 2250 4050 2250 3150 43 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 44 | 3150 3150 4050 3150 4050 4050 3150 4050 3150 3150 45 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 46 | 4050 450 4950 450 4950 1350 4050 1350 4050 450 47 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 48 | 4050 1350 4950 1350 4950 2250 4050 2250 4050 1350 49 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 50 | 4050 2250 4950 2250 4950 3150 4050 3150 4050 2250 51 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 52 | 4050 3150 4950 3150 4950 4050 4050 4050 4050 3150 53 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 54 | 4950 3150 5850 3150 5850 4050 4950 4050 4950 3150 55 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 56 | 4950 2250 5850 2250 5850 3150 4950 3150 4950 2250 57 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 58 | 4950 1350 5850 1350 5850 2250 4950 2250 4950 1350 59 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 60 | 4950 450 5850 450 5850 1350 4950 1350 4950 450 61 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 62 | 1 1 1.00 60.00 120.00 63 | 1125 3600 1575 3600 64 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 65 | 1 1 1.00 60.00 120.00 66 | 2925 3600 3375 3600 67 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 68 | 1 1 1.00 60.00 120.00 69 | 2025 3600 2475 3600 70 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 71 | 1 1 1.00 60.00 120.00 72 | 1125 2655 1575 2655 73 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 74 | 1 1 1.00 60.00 120.00 75 | 4770 3600 5220 3600 76 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 77 | 1 1 1.00 60.00 120.00 78 | 5445 3510 900 2880 79 | 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 1 0 2 80 | 1 1 1.00 60.00 120.00 81 | 5400 1800 855 1170 82 | 4 1 0 50 0 1 12 0.0000 0 150 105 900 3660 0\001 83 | 4 1 0 50 0 1 12 0.0000 0 150 105 1800 3660 1\001 84 | 4 1 0 50 0 1 12 0.0000 0 150 105 2700 3660 2\001 85 | 4 0 0 50 -1 0 20 0.0000 4 30 225 3555 3645 ...\001 86 | 4 0 0 50 -1 0 20 0.0000 4 30 225 945 1845 ...\001 87 | 4 0 0 50 -1 0 12 0.0000 4 150 330 5310 3645 m-1\001 88 | 4 0 0 50 -1 0 12 0.0000 4 150 435 5175 2655 2m-1\001 89 | 4 1 0 50 0 1 12 0.0000 0 105 165 900 2760 m\001 90 | 4 1 0 50 0 1 12 0.0000 0 195 690 855 1035 (n-1)*m\001 91 | 4 0 0 50 -1 0 12 0.0000 4 150 540 5085 900 n*m-1\001 92 | -------------------------------------------------------------------------------- /doc/spec/reference-frames.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 Produced by xfig version 3.2.5-alpha4 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 2 2 1 2 0 7 50 -1 -1 4.000 0 0 -1 0 0 5 11 | 1980 450 2430 450 2430 900 1980 900 1980 450 12 | 2 2 1 2 0 7 50 -1 -1 4.000 0 0 -1 0 0 5 13 | 2520 450 2970 450 2970 900 2520 900 2520 450 14 | 2 2 1 2 0 7 50 -1 -1 4.000 0 0 -1 0 0 5 15 | 4140 450 4590 450 4590 900 4140 900 4140 450 16 | 2 2 1 2 0 7 50 -1 -1 4.000 0 0 -1 0 0 5 17 | 1440 450 1890 450 1890 900 1440 900 1440 450 18 | 2 2 1 2 0 7 50 -1 15 4.000 0 0 -1 0 0 5 19 | 3600 450 4050 450 4050 900 3600 900 3600 450 20 | 2 2 1 2 0 7 50 -1 41 4.000 0 0 -1 0 0 5 21 | 3060 450 3510 450 3510 900 3060 900 3060 450 22 | 2 2 0 2 0 7 50 -1 41 0.000 0 0 -1 0 0 5 23 | 900 450 1350 450 1350 900 900 900 900 450 24 | 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2 25 | 0 0 1.00 60.00 120.00 26 | 3780 990 3780 1395 27 | 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2 28 | 0 0 1.00 60.00 120.00 29 | 3240 990 3240 1395 30 | 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 1 2 31 | 0 0 1.00 60.00 120.00 32 | 1125 990 1125 1395 33 | 4 0 0 50 -1 0 20 0.0000 4 30 225 4770 675 ...\001 34 | 4 0 0 50 -1 0 12 0.0000 4 150 420 900 405 Intra\001 35 | 4 0 0 50 -1 0 12 0.0000 4 150 420 1440 405 Inter\001 36 | 4 0 0 50 -1 0 12 0.0000 4 150 420 1980 405 Inter\001 37 | 4 0 0 50 -1 0 12 0.0000 4 150 420 2520 405 Inter\001 38 | 4 0 0 50 -1 0 12 0.0000 4 150 420 3060 405 Inter\001 39 | 4 0 0 50 -1 0 12 0.0000 4 150 420 3600 405 Inter\001 40 | 4 0 0 50 -1 0 12 0.0000 4 150 420 4140 405 Inter\001 41 | 4 0 0 50 -1 0 12 0.0000 4 120 630 3690 1575 current\001 42 | 4 0 0 50 -1 0 12 0.0000 4 150 840 2745 1575 reference\001 43 | 4 0 0 50 -1 0 12 0.0000 4 150 510 2925 1755 frame\001 44 | 4 0 0 50 -1 0 12 0.0000 4 150 510 3690 1755 frame\001 45 | 4 0 0 50 -1 0 12 0.0000 4 195 570 855 1575 golden\001 46 | 4 0 0 50 -1 0 12 0.0000 4 150 510 900 1800 frame\001 47 | -------------------------------------------------------------------------------- /doc/spec/spec.bib: -------------------------------------------------------------------------------- 1 | @MANUAL{rfc2044, 2 | author="Francois Yergeau", 3 | title="{RFC} 2044: {UTF}-8, a transformation format of Unicode and {ISO} 4 | 10646", 5 | month=oct, 6 | year=1996, 7 | note="\url{https://www.ietf.org/rfc/rfc2044.txt}" 8 | } 9 | 10 | @ARTICLE{CSF77, 11 | author="Wen-Hsiung Chen and C. Harrison Smith and S. C. Fralick", 12 | title="A Fast Computational Algorithm for the Discrete Cosine Transform", 13 | journal="{IEEE} Transactions on Communications", 14 | volume="COM-25", 15 | number=9, 16 | pages="1004--1011", 17 | month=sep, 18 | year=1977 19 | } 20 | 21 | @MISC{Mel04, 22 | author="Mike Melanson", 23 | title="{VP3} Bitstream Format and Decoding Process", 24 | howpublished="\url{http://www.multimedia.cx/vp3-format.txt}", 25 | month=mar, 26 | year=2004 27 | } 28 | 29 | @MISC{Poyn97, 30 | author="Charles Poynton", 31 | title="Frequently-Asked Questions about Gamma", 32 | howpublished="\url{https://www.poynton.com/GammaFAQ.html}", 33 | month=feb, 34 | year=1997 35 | } 36 | 37 | @MANUAL{rec470, 38 | key="ITU470", 39 | title="Reccomendation {ITU-R} {BT}.470-6: Conventional Television Systems", 40 | edition="1970, revised", 41 | organization="International Telecommunications Union", 42 | address="1211 Geneva 20, Switzerland", 43 | year=1998 44 | } 45 | 46 | @MANUAL{rec601, 47 | key="ITU601", 48 | title="Reccomendation {ITU-R} {BT}.601-5: Studio Encoding Parameters of 49 | Digital Television for Standard 4:3 and Wide-Screen 16:9 Aspect Ratios", 50 | edition="1982, revised", 51 | organization="International Telecommunications Union", 52 | address="1211 Geneva 20, Switzerland", 53 | year=1995 54 | } 55 | 56 | @MANUAL{rec709, 57 | key="ITU709", 58 | title="Recommendation {ITU-R} {BT}.709-5: Parameter values for the {HDTV} 59 | standards for production and international programme exchange", 60 | edition="1990, revised", 61 | organization="International Telecommunications Union", 62 | address="1211 Geneva 20, Switzerland", 63 | year=2002 64 | } 65 | 66 | @MANUAL{smpte170m, 67 | key="SMPTE170M", 68 | title="{SMPTE-170M}: Television --- Composite Analog Video Signal --- {NTSC} 69 | for Studio Applications", 70 | organization="Society of Motion Pciture and Television Engineers", 71 | year=1994 72 | } 73 | 74 | @MANUAL{smpte240m, 75 | key="SMPTE240M", 76 | title="{SMPTE-240M}: Television --- Signal Parameters --- 1125-Line 77 | High-Definition Production", 78 | organization="Society of Motion Pciture and Television Engineers", 79 | year=1999 80 | } 81 | 82 | @MANUAL{vorbis, 83 | title="{Vorbis~I} specification", 84 | organization="{Xiph.Org Foundation}", 85 | year=2002, 86 | note="\url{https://www.xiph.org/ogg/vorbis/doc/}" 87 | } 88 | 89 | @MANUAL{rfc2119, 90 | author="Scott Bradner", 91 | title="{RFC} 2119: Key words for use in {RFC}s to Indicate Requirement 92 | Levels", 93 | month=mar, 94 | year=1997, 95 | note="\url{https://www.ietf.org/rfc/rfc2119.txt}" 96 | } 97 | 98 | @MANUAL{rfc3533, 99 | author="Silvia Pfeiffer", 100 | title="{RFC} 3533: The {Ogg} Encapsulation Format Version 0", 101 | month=may, 102 | year=2003, 103 | note="\url{https://www.ietf.org/rfc/rfc3533.txt}" 104 | } 105 | 106 | @MANUAL{rfc3534, 107 | author="Linus Walleij", 108 | title="{RFC} 3534: The {application/ogg} Media Type", 109 | month=may, 110 | year=2003, 111 | note="\url{https://www.ietf.org/rfc/rfc3534.txt}" 112 | } 113 | 114 | @MANUAL{rfc3550, 115 | author="H. Schulzrinne, S. Casner, R. Frederick, V. Jacobson", 116 | title="RTP: A Transport Protocol for Real-Time Applications", 117 | month=jul, 118 | year=2003, 119 | note="\url{https://www.ietf.org/rfc/rfc3550.txt}" 120 | } 121 | -------------------------------------------------------------------------------- /doc/spec/superblock.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 Produced by xfig version 3.2.5-alpha4 2 | Landscape 3 | Center 4 | Metric 5 | A4 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 6 270 180 5905 4860 11 | 6 387 3531 1542 4687 12 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 13 | 387 4687 675 4687 675 4397 387 4397 387 4687 14 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 15 | 675 4687 963 4687 963 4397 675 4397 675 4687 16 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 17 | 963 4687 1252 4687 1252 4397 963 4397 963 4687 18 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 19 | 1252 4397 1542 4397 1542 4109 1252 4109 1252 4397 20 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 21 | 387 4397 675 4397 675 4109 387 4109 387 4397 22 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 23 | 387 4109 675 4109 675 3820 387 3820 387 4109 24 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 25 | 963 4109 1252 4109 1252 3820 963 3820 963 4109 26 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 27 | 1252 4109 1542 4109 1542 3820 1252 3820 1252 4109 28 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 29 | 1252 3820 1542 3820 1542 3531 1252 3531 1252 3820 30 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 31 | 675 3820 963 3820 963 3531 675 3531 675 3820 32 | -6 33 | 6 387 3531 1542 4687 34 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 35 | 1252 4687 1542 4687 1542 4397 1252 4397 1252 4687 36 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 37 | 963 4397 1252 4397 1252 4109 963 4109 963 4397 38 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 39 | 963 3820 1252 3820 1252 3531 963 3531 963 3820 40 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 41 | 387 3820 675 3820 675 3531 387 3531 387 3820 42 | -6 43 | 6 357 3502 1570 4715 44 | 6 675 3820 963 4397 45 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 46 | 675 4397 963 4397 963 4109 675 4109 675 4397 47 | 2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 48 | 675 4109 963 4109 963 3820 675 3820 675 4109 49 | -6 50 | 2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 51 | 387 3531 1542 3531 1542 4687 387 4687 387 3531 52 | -6 53 | 2 2 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 54 | 387 353 5876 353 5876 4687 387 4687 387 353 55 | 2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 56 | 1542 3531 2697 3531 2697 4687 1542 4687 1542 3531 57 | 2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 58 | 2697 3531 3854 3531 3854 4687 2697 4687 2697 3531 59 | 2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 60 | 387 2375 1542 2375 1542 3531 387 3531 387 2375 61 | 2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 62 | 1542 2375 2697 2375 2697 3531 1542 3531 1542 2375 63 | 2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 64 | 387 1220 1542 1220 1542 2375 387 2375 387 1220 65 | 4 0 0 50 -1 0 7 0.0000 4 125 270 270 4831 (0,0)\001 66 | 4 0 0 50 -1 0 7 0.0000 4 96 367 473 297 Frame\001 67 | 4 0 0 50 -1 0 7 0.0000 4 125 1002 501 3474 Super Block (4x4)\001 68 | 4 0 0 50 -1 0 7 0.0000 4 96 203 415 4657 8x8\001 69 | 4 0 0 50 -1 0 7 0.0000 4 96 318 357 4513 Block\001 70 | 4 0 0 50 -1 0 13 0.0000 4 20 145 4085 4081 ...\001 71 | 4 0 0 50 -1 0 13 4.7124 4 20 145 848 815 ...\001 72 | -6 73 | -------------------------------------------------------------------------------- /doc/spec/xifish.fig: -------------------------------------------------------------------------------- 1 | #FIG 3.2 2 | Landscape 3 | Center 4 | Inches 5 | Letter 6 | 100.00 7 | Single 8 | -2 9 | 1200 2 10 | 0 32 #496d9e 11 | 0 33 #304d71 12 | 0 34 #8eb2cf 13 | 1 4 0 6 0 7 1 0 20 0.000 1 0.0000 1470 3255 270 270 1200 3255 1740 3255 14 | 1 3 0 0 0 0 0 0 20 0.000 1 0.0000 1485 3255 75 75 1485 3255 1560 3255 15 | 2 1 0 7 0 3 8 0 20 0.000 0 0 -1 0 0 6 16 | 2445 4140 2505 4350 2385 4425 2145 4425 2025 4380 1890 4320 17 | 2 1 0 7 0 3 8 0 20 0.000 0 0 -1 0 0 20 18 | 2445 3480 2775 3450 2955 3390 3090 3315 3285 3285 3555 3285 19 | 3615 3390 3540 3675 3465 3720 3315 3765 3105 3810 3330 3765 20 | 3420 3825 3540 3900 3480 4260 3330 4320 3165 4305 2910 4260 21 | 2715 4185 2520 4185 22 | 2 1 0 7 0 3 11 0 20 0.000 0 0 -1 0 0 9 23 | 1575 3150 1755 2985 2040 2820 2355 2760 2670 2850 2850 2985 24 | 3165 3270 3435 3420 2835 3780 25 | 2 1 0 7 0 6 6 0 20 0.000 0 0 -1 0 0 15 26 | 900 3570 1020 3450 1095 3360 1395 3150 1545 3090 1725 3075 27 | 2025 3090 2205 3150 2295 3225 2385 3300 2445 3375 2550 3465 28 | 2655 3540 2775 3600 2865 3600 29 | 2 1 0 7 0 3 4 0 20 0.000 0 0 -1 0 0 7 30 | 1515 4080 1770 4080 1875 3945 1965 3870 2025 3780 1995 3780 31 | 1665 3780 32 | 2 1 0 0 -1 6 7 0 20 0.000 0 0 -1 0 0 11 33 | 2865 3615 2850 3735 2775 3945 2685 4080 2595 4155 2010 4185 34 | 1185 4170 1035 3990 1035 3870 975 3540 1155 3435 35 | 2 1 0 0 0 3 5 0 20 0.000 0 0 -1 0 0 7 36 | 1035 3885 1005 4020 1095 4065 1245 4065 1245 3870 1050 3870 37 | 1065 3870 38 | 2 1 0 7 0 3 0 0 20 0.000 0 0 -1 0 0 11 39 | 1245 3915 1245 3840 1170 3750 1005 3585 930 3510 750 3510 40 | 630 3600 645 3690 765 3780 885 3825 1035 3975 41 | 2 1 0 7 0 3 0 0 20 0.000 0 0 -1 0 0 8 42 | 1095 3990 945 3990 855 4050 795 4140 885 4200 1095 4200 43 | 1155 4140 1245 4050 44 | 2 1 0 7 0 6 6 0 20 0.000 0 0 -1 0 0 8 45 | 2685 4185 2400 4185 2220 4215 1920 4305 1695 4335 1485 4320 46 | 1245 4215 1155 4125 47 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 48 | 2250 3900 2250 3825 2175 3825 2175 3900 2250 3900 49 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 50 | 2250 3750 2250 3675 2175 3675 2175 3750 2250 3750 51 | 2 1 0 0 -1 3 5 0 20 0.000 0 0 -1 0 0 9 52 | 1650 3780 1590 3975 1485 4035 1530 4080 1770 4065 1845 3960 53 | 1920 3900 1965 3795 1695 3780 54 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 55 | 1950 3450 1950 3375 1875 3375 1875 3450 1950 3450 56 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 57 | 2400 3900 2400 3825 2325 3825 2325 3900 2400 3900 58 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 59 | 2550 3975 2550 3900 2475 3900 2475 3975 2550 3975 60 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 61 | 2700 3900 2700 3825 2625 3825 2625 3900 2700 3900 62 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 63 | 2700 3750 2700 3675 2625 3675 2625 3750 2700 3750 64 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 65 | 2550 3675 2550 3600 2475 3600 2475 3675 2550 3675 66 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 67 | 2400 3750 2400 3675 2325 3675 2325 3750 2400 3750 68 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 69 | 2400 3600 2400 3525 2325 3525 2325 3600 2400 3600 70 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 71 | 2250 3600 2250 3525 2175 3525 2175 3600 2250 3600 72 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 73 | 2250 3450 2250 3375 2175 3375 2175 3450 2250 3450 74 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 75 | 2100 3525 2100 3450 2025 3450 2025 3525 2100 3525 76 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 77 | 2100 3375 2100 3300 2025 3300 2025 3375 2100 3375 78 | 2 2 0 0 0 0 3 0 20 0.000 0 0 0 0 0 5 79 | 2550 3825 2550 3750 2475 3750 2475 3825 2550 3825 80 | 2 3 0 0 -1 32 13 0 20 0.000 0 0 7 0 0 5 81 | 2160 2055 3810 3705 2160 5355 510 3705 2160 2055 82 | 2 1 0 0 32 34 12 0 20 0.000 0 0 -1 0 0 3 83 | 2160 2055 2160 3705 510 3705 84 | 2 1 0 0 32 33 12 0 20 0.000 0 0 -1 0 0 3 85 | 3810 3705 2160 3705 2160 5355 86 | -------------------------------------------------------------------------------- /examples/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | noinst_PROGRAMS = dump_video dump_psnr libtheora_info \ 4 | $(BUILDABLE_EXAMPLES) 5 | 6 | # possible contents of BUILDABLE_EXAMPLES: 7 | EXTRA_PROGRAMS = player_example encoder_example png2theora tiff2theora 8 | EXTRA_DIST = encoder_example_ffmpeg 9 | 10 | AM_CPPFLAGS = -I$(top_srcdir)/include 11 | AM_CFLAGS = $(OGG_CFLAGS) 12 | LDADD = ../lib/libtheora.la $(OGG_LIBS) 13 | LDADDDEC = ../lib/libtheoradec.la $(OGG_LIBS) 14 | LDADDENC = ../lib/libtheoraenc.la ../lib/libtheoradec.la $(OGG_LIBS) 15 | 16 | dump_video_SOURCES = dump_video.c 17 | EXTRA_dump_video_SOURCES = getopt.c getopt1.c getopt.h 18 | dump_video_LDADD = $(GETOPT_OBJS) $(LDADDDEC) $(COMPAT_LIBS) 19 | 20 | dump_psnr_SOURCES = dump_psnr.c 21 | EXTRA_dump_psnr_SOURCES = getopt.c getopt1.c getopt.h 22 | dump_psnr_LDADD = $(GETOPT_OBJS) $(LDADDDEC) -lm 23 | 24 | libtheora_info_SOURCES = libtheora_info.c 25 | libtheora_info_LDADD = $(LDADDENC) 26 | 27 | player_example_SOURCES = player_example.c 28 | player_example_CFLAGS = $(SDL_CFLAGS) $(OGG_CFLAGS) $(VORBIS_CFLAGS) 29 | player_example_LDADD = $(LDADDDEC) $(SDL_LIBS) $(VORBIS_LIBS) $(OSS_LIBS) -lm 30 | 31 | encoder_example_SOURCES = encoder_example.c 32 | EXTRA_encoder_example_SOURCES = getopt.c getopt1.c getopt.h 33 | encoder_example_CFLAGS = $(OGG_CFLAGS) $(VORBIS_CFLAGS) 34 | encoder_example_LDADD = $(GETOPT_OBJS) $(LDADDENC) $(VORBIS_LIBS) $(VORBISENC_LIBS) -lm 35 | 36 | png2theora_SOURCES = png2theora.c 37 | png2theora_CFLAGS = $(OGG_CFLAGS) $(PNG_CFLAGS) 38 | png2theora_LDADD = $(GETOPT_OBJS) $(LDADDENC) $(PNG_LIBS) -lm 39 | 40 | tiff2theora_SOURCES = tiff2theora.c 41 | tiff2theora_CFLAGS = $(OGG_CFLAGS) $(TIFF_CFLAGS) 42 | tiff2theora_LDADD = $(GETOPT_OBJS) $(LDADDENC) $(TIFF_LIBS) -lm 43 | 44 | debug: 45 | $(MAKE) all CFLAGS="@DEBUG@" 46 | 47 | profile: 48 | $(MAKE) all CFLAGS="@PROFILE@" 49 | 50 | -------------------------------------------------------------------------------- /examples/README_SPLAYER: -------------------------------------------------------------------------------- 1 | 06/09/03 - by mau (mauricio at xiph.org) 2 | 3 | The splayer example is a experimental simple Theora player using SDL and 4 | Portaudio for cross platform compatibility. To build the windows version 5 | please use the Visual C++ project available at the 6 | win32/experimental/splayer directory. 7 | 8 | By default this sample will not be built on Linux, unless Portaudio is 9 | properly installed. Follow these steps to install Portaudio: 10 | 11 | 1) Get portaudio tar package from www.portaudio.com 12 | 2) Uncompress it to a local directory 13 | 3) Run './configure' in the portaudio directory 14 | 4) Run 'make install' 15 | 16 | This will install Portaudio libraries in /usr/local/lib, and the Portaudio 17 | include file at /usr/local/include. On linux you may need to manually 18 | execute 'ldconfig' to rebuild the library cache. 19 | 20 | Switch to theora's directory, re-run theora's autogen.sh script to 21 | re-generate the appropriate makefiles, and 'make install' to build. 22 | -------------------------------------------------------------------------------- /examples/encoder_example_ffmpeg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #################################################################### 3 | # # 4 | # THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. # 5 | # USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS # 6 | # GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE # 7 | # IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. # 8 | # # 9 | # THE Theora SOURCE CODE IS COPYRIGHT (C) 2009,2025 # 10 | # by the Xiph.Org Foundation and contributors # 11 | # https://www.xiph.org/ # 12 | # # 13 | #################################################################### 14 | 15 | ffmpeg=ffmpeg 16 | if ! command -v $ffmpeg 2>&1 >/dev/null ; then 17 | echo error: $ffmpeg executable not found! 18 | exit 1 19 | fi 20 | ffprobe=ffprobe 21 | if ! command -v $ffprobe 2>&1 >/dev/null ; then 22 | echo error: $ffprobe executable not found! 23 | exit 1 24 | fi 25 | 26 | 27 | # TODO: get script dir, and call encoder_example from the same dir, to 28 | # support both system installed as well as local dir version 29 | 30 | # check encoder_example as well as Debian named theora_encoder_example 31 | if command -v encoder_example 2>&1 >/dev/null ; then 32 | encoder_example=encoder_example 33 | elif command -v theora_encoder_example 2>&1 >/dev/null ; then 34 | encoder_example=theora_encoder_example 35 | else 36 | echo error: encoder_example or theora_encoder_example executable \ 37 | not found! 38 | exit 1 39 | fi 40 | 41 | if [ -z "$2" ] ; then 42 | echo usage: 43 | echo $0 inputfile outputfile [$encoder_example encoder options] 44 | echo 45 | echo for $encoder_example encoder options run: 46 | echo $encoder_example -h 47 | exit 48 | fi 49 | 50 | inputfile=$1 51 | outputfile=$2 52 | shift 2 53 | 54 | INPUT_AUDIO=0 55 | # check if there is audio in the input file, then encoder_example 56 | # needs a different syntax 57 | $ffprobe -i $inputfile -show_streams -select_streams a -loglevel error | \ 58 | grep -q audio && INPUT_AUDIO=1 59 | 60 | video=$(mktemp -u) 61 | mkfifo -m 600 $video 62 | 63 | # TODO: merge the two separate ffmpeg commands to a single process 64 | $ffmpeg -i $inputfile -y -hide_banner -loglevel error -an \ 65 | -f yuv4mpegpipe $video & 66 | 67 | if [ "$INPUT_AUDIO" = 1 ] ; then 68 | audio=$(mktemp -u) 69 | mkfifo -m 600 $audio 70 | 71 | $ffmpeg -i $inputfile -y -hide_banner -loglevel error -vn -f wav \ 72 | -bitexact $audio & 73 | 74 | $encoder_example $@ $audio $video -o $outputfile 75 | 76 | rm -f $audio 77 | else 78 | $encoder_example $@ $video -o $outputfile 79 | fi 80 | 81 | rm -f $video 82 | -------------------------------------------------------------------------------- /include/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | SUBDIRS = theora 4 | -------------------------------------------------------------------------------- /include/theora/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | 3 | theoraincludedir = $(includedir)/theora 4 | 5 | theorainclude_HEADERS = theora.h theoradec.h theoraenc.h codec.h 6 | 7 | noinst_HEADERS = codec.h theoradec.h 8 | -------------------------------------------------------------------------------- /lib/Version_script: -------------------------------------------------------------------------------- 1 | # 2 | # Export file for libtheora 3 | # 4 | # Only the symbols listed in the global section will be callable from 5 | # applications linking to the libraries. 6 | # 7 | 8 | # We use something that looks like a versioned so filename here 9 | # to define the old API because of a historical confusion. This 10 | # label must be kept to maintain ABI compatibility. 11 | 12 | libtheora.so.1.0 13 | { 14 | global: 15 | theora_version_string; 16 | theora_version_number; 17 | 18 | theora_encode_init; 19 | theora_encode_YUVin; 20 | theora_encode_packetout; 21 | theora_encode_header; 22 | theora_encode_comment; 23 | theora_encode_tables; 24 | 25 | theora_decode_header; 26 | theora_decode_init; 27 | theora_decode_packetin; 28 | theora_decode_YUVout; 29 | 30 | theora_control; 31 | 32 | theora_packet_isheader; 33 | theora_packet_iskeyframe; 34 | 35 | theora_granule_shift; 36 | theora_granule_frame; 37 | theora_granule_time; 38 | 39 | theora_info_init; 40 | theora_info_clear; 41 | 42 | theora_clear; 43 | 44 | theora_comment_init; 45 | theora_comment_add; 46 | theora_comment_add_tag; 47 | theora_comment_query; 48 | theora_comment_query_count; 49 | theora_comment_clear; 50 | 51 | local: 52 | *; 53 | }; 54 | -------------------------------------------------------------------------------- /lib/Version_script-dec: -------------------------------------------------------------------------------- 1 | # 2 | # Export file for libtheoradec 3 | # 4 | # Only the symbols listed in the global section will be callable from 5 | # applications linking to the libraries. 6 | # 7 | 8 | # The 1.x API 9 | libtheoradec_1.0 10 | { 11 | global: 12 | th_version_string; 13 | th_version_number; 14 | 15 | th_decode_headerin; 16 | th_decode_alloc; 17 | th_setup_free; 18 | th_decode_ctl; 19 | th_decode_packetin; 20 | th_decode_ycbcr_out; 21 | th_decode_free; 22 | 23 | th_packet_isheader; 24 | th_packet_iskeyframe; 25 | 26 | th_granule_frame; 27 | th_granule_time; 28 | 29 | th_info_init; 30 | th_info_clear; 31 | 32 | th_comment_init; 33 | th_comment_add; 34 | th_comment_add_tag; 35 | th_comment_query; 36 | th_comment_query_count; 37 | th_comment_clear; 38 | 39 | local: 40 | *; 41 | }; 42 | 43 | # The deprecated legacy api from the libtheora alpha releases. 44 | # We use something that looks like a versioned so filename here 45 | # to define the old API because of a historical confusion. This 46 | # label must be kept to maintain ABI compatibility. 47 | 48 | libtheora.so.1.0 49 | { 50 | global: 51 | theora_version_string; 52 | theora_version_number; 53 | 54 | theora_decode_header; 55 | theora_decode_init; 56 | theora_decode_packetin; 57 | theora_decode_YUVout; 58 | 59 | theora_control; 60 | 61 | theora_packet_isheader; 62 | theora_packet_iskeyframe; 63 | 64 | theora_granule_shift; 65 | theora_granule_frame; 66 | theora_granule_time; 67 | 68 | theora_info_init; 69 | theora_info_clear; 70 | 71 | theora_clear; 72 | 73 | theora_comment_init; 74 | theora_comment_add; 75 | theora_comment_add_tag; 76 | theora_comment_query; 77 | theora_comment_query_count; 78 | theora_comment_clear; 79 | 80 | local: 81 | *; 82 | }; 83 | -------------------------------------------------------------------------------- /lib/Version_script-enc: -------------------------------------------------------------------------------- 1 | # 2 | # Export file for libtheora 3 | # 4 | # Only the symbols listed in the global section will be callable from 5 | # applications linking to the libraries. 6 | # 7 | 8 | # The 1.x encoder API 9 | libtheoraenc_1.0 10 | { 11 | global: 12 | th_encode_alloc; 13 | th_encode_ctl; 14 | th_encode_flushheader; 15 | th_encode_ycbcr_in; 16 | th_encode_packetout; 17 | th_encode_free; 18 | 19 | TH_VP31_QUANT_INFO; 20 | TH_VP31_HUFF_CODES; 21 | 22 | local: 23 | *; 24 | }; 25 | 26 | # The encoder portion of the deprecated alpha release api. 27 | # We use something that looks like a versioned so filename here 28 | # to define the old API because of a historical confusion. This 29 | # label must be kept to maintain ABI compatibility. 30 | 31 | libtheora.so.1.0 32 | { 33 | global: 34 | theora_encode_init; 35 | theora_encode_YUVin; 36 | theora_encode_packetout; 37 | theora_encode_header; 38 | theora_encode_comment; 39 | theora_encode_tables; 40 | 41 | local: 42 | *; 43 | }; 44 | -------------------------------------------------------------------------------- /lib/apiwrapper.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | 18 | #if !defined(_apiwrapper_H) 19 | # define _apiwrapper_H (1) 20 | # include 21 | # include 22 | # include "theora/theoradec.h" 23 | # include "theora/theoraenc.h" 24 | # include "state.h" 25 | 26 | typedef struct th_api_wrapper th_api_wrapper; 27 | typedef struct th_api_info th_api_info; 28 | 29 | /*Provide an entry point for the codec setup to clear itself in case we ever 30 | want to break pieces off into a common base library shared by encoder and 31 | decoder. 32 | In addition, this makes several other pieces of the API wrapper cleaner.*/ 33 | typedef void (*oc_setup_clear_func)(void *_ts); 34 | 35 | /*Generally only one of these pointers will be non-NULL in any given instance. 36 | Technically we do not even really need this struct, since we should be able 37 | to figure out which one from "context", but doing it this way makes sure we 38 | don't flub it up.*/ 39 | struct th_api_wrapper{ 40 | oc_setup_clear_func clear; 41 | th_setup_info *setup; 42 | th_dec_ctx *decode; 43 | th_enc_ctx *encode; 44 | }; 45 | 46 | struct th_api_info{ 47 | th_api_wrapper api; 48 | theora_info info; 49 | }; 50 | 51 | 52 | void oc_theora_info2th_info(th_info *_info,const theora_info *_ci); 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /lib/arm/armbits.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | #if !defined(_arm_armbits_H) 18 | # define _arm_armbits_H (1) 19 | # include "../bitpack.h" 20 | # include "armcpu.h" 21 | 22 | # if defined(OC_ARM_ASM) 23 | # define oc_pack_read oc_pack_read_arm 24 | # define oc_pack_read1 oc_pack_read1_arm 25 | # define oc_huff_token_decode oc_huff_token_decode_arm 26 | # endif 27 | 28 | long oc_pack_read_arm(oc_pack_buf *_b,int _bits); 29 | int oc_pack_read1_arm(oc_pack_buf *_b); 30 | int oc_huff_token_decode_arm(oc_pack_buf *_b,const ogg_int16_t *_tree); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /lib/arm/armcpu.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | function: 14 | 15 | ********************************************************************/ 16 | 17 | #if !defined(_arm_armcpu_H) 18 | # define _arm_armcpu_H (1) 19 | #include "../internal.h" 20 | 21 | /*"Parallel instructions" from ARM v6 and above.*/ 22 | #define OC_CPU_ARM_MEDIA (1<<24) 23 | /*Flags chosen to match arch/arm/include/asm/hwcap.h in the Linux kernel.*/ 24 | #define OC_CPU_ARM_EDSP (1<<7) 25 | #define OC_CPU_ARM_NEON (1<<12) 26 | 27 | ogg_uint32_t oc_cpu_flags_get(void); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /lib/arm/armenc.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | #include "armenc.h" 18 | 19 | #if defined(OC_ARM_ASM) 20 | 21 | void oc_enc_accel_init_arm(oc_enc_ctx *_enc){ 22 | ogg_uint32_t cpu_flags; 23 | cpu_flags=_enc->state.cpu_flags; 24 | oc_enc_accel_init_c(_enc); 25 | # if defined(OC_ENC_USE_VTABLE) 26 | /*TODO: Add ARMv4 functions here.*/ 27 | # endif 28 | # if defined(OC_ARM_ASM_EDSP) 29 | if(cpu_flags&OC_CPU_ARM_EDSP){ 30 | # if defined(OC_STATE_USE_VTABLE) 31 | /*TODO: Add EDSP functions here.*/ 32 | # endif 33 | } 34 | # if defined(OC_ARM_ASM_MEDIA) 35 | if(cpu_flags&OC_CPU_ARM_MEDIA){ 36 | # if defined(OC_STATE_USE_VTABLE) 37 | /*TODO: Add Media functions here.*/ 38 | # endif 39 | } 40 | # if defined(OC_ARM_ASM_NEON) 41 | if(cpu_flags&OC_CPU_ARM_NEON){ 42 | # if defined(OC_STATE_USE_VTABLE) 43 | _enc->opt_vtable.frag_satd=oc_enc_frag_satd_neon; 44 | _enc->opt_vtable.frag_satd2=oc_enc_frag_satd2_neon; 45 | _enc->opt_vtable.frag_intra_satd=oc_enc_frag_intra_satd_neon; 46 | _enc->opt_vtable.enquant_table_init=oc_enc_enquant_table_init_neon; 47 | _enc->opt_vtable.enquant_table_fixup=oc_enc_enquant_table_fixup_neon; 48 | _enc->opt_vtable.quantize=oc_enc_quantize_neon; 49 | # endif 50 | _enc->opt_data.enquant_table_size=128*sizeof(ogg_uint16_t); 51 | _enc->opt_data.enquant_table_alignment=16; 52 | } 53 | # endif 54 | # endif 55 | # endif 56 | } 57 | #endif 58 | -------------------------------------------------------------------------------- /lib/arm/armenc.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | #if !defined(_arm_armenc_H) 18 | # define _arm_armenc_H (1) 19 | # include "armint.h" 20 | 21 | # if defined(OC_ARM_ASM) 22 | # define oc_enc_accel_init oc_enc_accel_init_arm 23 | # define OC_ENC_USE_VTABLE (1) 24 | # endif 25 | 26 | # include "../encint.h" 27 | 28 | # if defined(OC_ARM_ASM) 29 | void oc_enc_accel_init_arm(oc_enc_ctx *_enc); 30 | 31 | # if defined(OC_ARM_ASM_EDSP) 32 | # if defined(OC_ARM_ASM_MEDIA) 33 | # if defined(OC_ARM_ASM_NEON) 34 | unsigned oc_enc_frag_satd_neon(int *_dc,const unsigned char *_src, 35 | const unsigned char *_ref,int _ystride); 36 | unsigned oc_enc_frag_satd2_neon(int *_dc,const unsigned char *_src, 37 | const unsigned char *_ref1,const unsigned char *_ref2,int _ystride); 38 | unsigned oc_enc_frag_intra_satd_neon(int *_dc, 39 | const unsigned char *_src,int _ystride); 40 | 41 | void oc_enc_enquant_table_init_neon(void *_enquant, 42 | const ogg_uint16_t _dequant[64]); 43 | void oc_enc_enquant_table_fixup_neon(void *_enquant[3][3][2],int _nqis); 44 | int oc_enc_quantize_neon(ogg_int16_t _qdct[64],const ogg_int16_t _dct[64], 45 | const ogg_uint16_t _dequant[64],const void *_enquant); 46 | # endif 47 | # endif 48 | # endif 49 | # endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /lib/arm/armopts.s.in: -------------------------------------------------------------------------------- 1 | ;******************************************************************** 2 | ;* * 3 | ;* THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | ;* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | ;* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | ;* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | ;* * 8 | ;* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 * 9 | ;* by the Xiph.Org Foundation and contributors * 10 | ;* https://www.xiph.org/ * 11 | ;* * 12 | ;******************************************************************** 13 | ; Original implementation: 14 | ; Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd 15 | ;******************************************************************** 16 | 17 | ; Set the following to 1 if we have EDSP instructions 18 | ; (LDRD/STRD, etc., ARMv5E and later). 19 | OC_ARM_ASM_EDSP * @HAVE_ARM_ASM_EDSP@ 20 | 21 | ; Set the following to 1 if we have ARMv6 media instructions. 22 | OC_ARM_ASM_MEDIA * @HAVE_ARM_ASM_MEDIA@ 23 | 24 | ; Set the following to 1 if we have NEON (some ARMv7) 25 | OC_ARM_ASM_NEON * @HAVE_ARM_ASM_NEON@ 26 | 27 | ; Set the following to 1 if LDR/STR can work on unaligned addresses 28 | ; This is assumed to be true for ARMv6 and later code 29 | OC_ARM_CAN_UNALIGN * 0 30 | 31 | ; Large unaligned loads and stores are often configured to cause an exception. 32 | ; They cause an 8 cycle stall when they cross a 128-bit (load) or 64-bit (store) 33 | ; boundary, so it's usually a bad idea to use them anyway if they can be 34 | ; avoided. 35 | 36 | ; Set the following to 1 if LDRD/STRD can work on unaligned addresses 37 | OC_ARM_CAN_UNALIGN_LDRD * 0 38 | 39 | END 40 | -------------------------------------------------------------------------------- /lib/bitpack.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE OggTheora SOURCE CODE IS (C) COPYRIGHT 1994-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: packing variable sized words into an octet stream 15 | 16 | ********************************************************************/ 17 | #include 18 | #include 19 | #include "bitpack.h" 20 | 21 | /*We're 'MSb' endian; if we write a word but read individual bits, 22 | then we'll read the MSb first.*/ 23 | 24 | void oc_pack_readinit(oc_pack_buf *_b,unsigned char *_buf,long _bytes){ 25 | memset(_b,0,sizeof(*_b)); 26 | _b->ptr=_buf; 27 | _b->stop=_buf+_bytes; 28 | } 29 | 30 | static oc_pb_window oc_pack_refill(oc_pack_buf *_b,int _bits){ 31 | const unsigned char *ptr; 32 | const unsigned char *stop; 33 | oc_pb_window window; 34 | int available; 35 | unsigned shift; 36 | stop=_b->stop; 37 | ptr=_b->ptr; 38 | window=_b->window; 39 | available=_b->bits; 40 | shift=OC_PB_WINDOW_SIZE-available; 41 | while(7ptr=ptr; 46 | available=OC_PB_WINDOW_SIZE-shift; 47 | if(_bits>available){ 48 | if(ptr>=stop){ 49 | _b->eof=1; 50 | available=OC_LOTS_OF_BITS; 51 | } 52 | else window|=*ptr>>(available&7); 53 | } 54 | _b->bits=available; 55 | return window; 56 | } 57 | 58 | int oc_pack_look1(oc_pack_buf *_b){ 59 | oc_pb_window window; 60 | int available; 61 | window=_b->window; 62 | available=_b->bits; 63 | if(available<1)_b->window=window=oc_pack_refill(_b,1); 64 | return window>>OC_PB_WINDOW_SIZE-1; 65 | } 66 | 67 | void oc_pack_adv1(oc_pack_buf *_b){ 68 | _b->window<<=1; 69 | _b->bits--; 70 | } 71 | 72 | /*Here we assume that 0<=_bits&&_bits<=32.*/ 73 | long oc_pack_read_c(oc_pack_buf *_b,int _bits){ 74 | oc_pb_window window; 75 | int available; 76 | long result; 77 | window=_b->window; 78 | available=_b->bits; 79 | if(_bits==0)return 0; 80 | if(available<_bits){ 81 | window=oc_pack_refill(_b,_bits); 82 | available=_b->bits; 83 | } 84 | result=window>>OC_PB_WINDOW_SIZE-_bits; 85 | available-=_bits; 86 | window<<=1; 87 | window<<=_bits-1; 88 | _b->window=window; 89 | _b->bits=available; 90 | return result; 91 | } 92 | 93 | int oc_pack_read1_c(oc_pack_buf *_b){ 94 | oc_pb_window window; 95 | int available; 96 | int result; 97 | window=_b->window; 98 | available=_b->bits; 99 | if(available<1){ 100 | window=oc_pack_refill(_b,1); 101 | available=_b->bits; 102 | } 103 | result=window>>OC_PB_WINDOW_SIZE-1; 104 | available--; 105 | window<<=1; 106 | _b->window=window; 107 | _b->bits=available; 108 | return result; 109 | } 110 | 111 | long oc_pack_bytes_left(oc_pack_buf *_b){ 112 | if(_b->eof)return -1; 113 | return _b->stop-_b->ptr+(_b->bits>>3); 114 | } 115 | -------------------------------------------------------------------------------- /lib/bitpack.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE OggTheora SOURCE CODE IS (C) COPYRIGHT 1994-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: packing variable sized words into an octet stream 15 | 16 | ********************************************************************/ 17 | #if !defined(_bitpack_H) 18 | # define _bitpack_H (1) 19 | # include 20 | # include 21 | # include "internal.h" 22 | 23 | 24 | 25 | typedef size_t oc_pb_window; 26 | typedef struct oc_pack_buf oc_pack_buf; 27 | 28 | 29 | 30 | /*Custom bitpacker implementations.*/ 31 | # if defined(OC_ARM_ASM) 32 | # include "arm/armbits.h" 33 | # endif 34 | 35 | # if !defined(oc_pack_read) 36 | # define oc_pack_read oc_pack_read_c 37 | # endif 38 | # if !defined(oc_pack_read1) 39 | # define oc_pack_read1 oc_pack_read1_c 40 | # endif 41 | # if !defined(oc_huff_token_decode) 42 | # define oc_huff_token_decode oc_huff_token_decode_c 43 | # endif 44 | 45 | # define OC_PB_WINDOW_SIZE ((int)sizeof(oc_pb_window)*CHAR_BIT) 46 | /*This is meant to be a large, positive constant that can still be efficiently 47 | loaded as an immediate (on platforms like ARM, for example). 48 | Even relatively modest values like 100 would work fine.*/ 49 | # define OC_LOTS_OF_BITS (0x40000000) 50 | 51 | 52 | 53 | struct oc_pack_buf{ 54 | const unsigned char *stop; 55 | const unsigned char *ptr; 56 | oc_pb_window window; 57 | int bits; 58 | int eof; 59 | }; 60 | 61 | void oc_pack_readinit(oc_pack_buf *_b,unsigned char *_buf,long _bytes); 62 | int oc_pack_look1(oc_pack_buf *_b); 63 | void oc_pack_adv1(oc_pack_buf *_b); 64 | /*Here we assume 0<=_bits&&_bits<=32.*/ 65 | long oc_pack_read_c(oc_pack_buf *_b,int _bits); 66 | int oc_pack_read1_c(oc_pack_buf *_b); 67 | /* returns -1 for read beyond EOF, or the number of whole bytes available */ 68 | long oc_pack_bytes_left(oc_pack_buf *_b); 69 | 70 | /*These two functions are implemented locally in huffdec.c*/ 71 | /*Read in bits without advancing the bitptr. 72 | Here we assume 0<=_bits&&_bits<=32.*/ 73 | /*static int oc_pack_look(oc_pack_buf *_b,int _bits);*/ 74 | /*static void oc_pack_adv(oc_pack_buf *_b,int _bits);*/ 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /lib/c64x/c64xdec.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2007 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | #if !defined(_c64x_c64xdec_H) 18 | # define _c64x_c64xdec_H (1) 19 | # include "c64xint.h" 20 | 21 | # if defined(OC_C64X_ASM) 22 | # define oc_dec_accel_init oc_dec_accel_init_c64x 23 | # define oc_dec_dc_unpredict_mcu_plane oc_dec_dc_unpredict_mcu_plane_c64x 24 | # endif 25 | 26 | # include "../decint.h" 27 | 28 | void oc_dec_accel_init_c64x(oc_dec_ctx *_dec); 29 | 30 | void oc_dec_dc_unpredict_mcu_plane_c64x(oc_dec_ctx *_dec, 31 | oc_dec_pipeline_state *_pipe,int _pli); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /lib/c64x/c64xint.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2007 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | 18 | #if !defined(_c64x_c64xint_H) 19 | # define _c64x_c64xint_H (1) 20 | # include "../internal.h" 21 | 22 | # if defined(OC_C64X_ASM) 23 | # define oc_state_accel_init oc_state_accel_init_c64x 24 | # define oc_frag_copy(_state,_dst,_src,_ystride) \ 25 | oc_frag_copy_c64x(_dst,_src,_ystride) 26 | # define oc_frag_copy_list(_state,_dst_frame,_src_frame,_ystride, \ 27 | _fragis,_nfragis,_frag_buf_offs) \ 28 | oc_frag_copy_list_c64x(_dst_frame,_src_frame,_ystride, \ 29 | _fragis,_nfragis,_frag_buf_offs) 30 | # define oc_frag_recon_intra(_state,_dst,_dst_ystride,_residue) \ 31 | oc_frag_recon_intra_c64x(_dst,_dst_ystride,_residue) 32 | # define oc_frag_recon_inter(_state,_dst,_src,_ystride,_residue) \ 33 | oc_frag_recon_inter_c64x(_dst,_src,_ystride,_residue) 34 | # define oc_frag_recon_inter2(_state,_dst,_src1,_src2,_ystride,_residue) \ 35 | oc_frag_recon_inter2_c64x(_dst,_src1,_src2,_ystride,_residue) 36 | # define oc_idct8x8(_state,_y,_x,_last_zzi) \ 37 | oc_idct8x8_c64x(_y,_x,_last_zzi) 38 | # define oc_state_frag_recon oc_state_frag_recon_c64x 39 | # define oc_loop_filter_init(_state,_bv,_flimit) \ 40 | oc_loop_filter_init_c64x(_bv,_flimit) 41 | # define oc_state_loop_filter_frag_rows oc_state_loop_filter_frag_rows_c64x 42 | # define oc_restore_fpu(_state) do{}while(0) 43 | # endif 44 | 45 | # include "../state.h" 46 | 47 | void oc_state_accel_init_c64x(oc_theora_state *_state); 48 | 49 | void oc_frag_copy_c64x(unsigned char *_dst, 50 | const unsigned char *_src,int _ystride); 51 | void oc_frag_copy_list_c64x(unsigned char *_dst_frame, 52 | const unsigned char *_src_frame,int _ystride, 53 | const ptrdiff_t *_fragis,ptrdiff_t _nfragis,const ptrdiff_t *_frag_buf_offs); 54 | void oc_frag_recon_intra_c64x(unsigned char *_dst,int _ystride, 55 | const ogg_int16_t *_residue); 56 | void oc_frag_recon_inter_c64x(unsigned char *_dst, 57 | const unsigned char *_src,int _ystride,const ogg_int16_t *_residue); 58 | void oc_frag_recon_inter2_c64x(unsigned char *_dst,const unsigned char *_src1, 59 | const unsigned char *_src2,int _ystride,const ogg_int16_t *_residue); 60 | void oc_idct8x8_c64x(ogg_int16_t _y[64],ogg_int16_t _x[64],int _last_zzi); 61 | void oc_state_frag_recon_c64x(const oc_theora_state *_state,ptrdiff_t _fragi, 62 | int _pli,ogg_int16_t _dct_coeffs[128],int _last_zzi,ogg_uint16_t _dc_quant); 63 | void oc_loop_filter_init_c64x(signed char _bv[256],int _flimit); 64 | void oc_state_loop_filter_frag_rows_c64x(const oc_theora_state *_state, 65 | signed char _bv[256],int _refi,int _pli,int _fragy0,int _fragy_end); 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /lib/c64x/c64xstate.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2007 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | 18 | #include "c64xint.h" 19 | 20 | #if defined(OC_C64X_ASM) 21 | 22 | void oc_state_accel_init_c64x(oc_theora_state *_state){ 23 | oc_state_accel_init_c(_state); 24 | # if defined(OC_STATE_USE_VTABLE) 25 | _state->opt_vtable.frag_copy=oc_frag_copy_c64x; 26 | _state->opt_vtable.frag_recon_intra=oc_frag_recon_intra_c64x; 27 | _state->opt_vtable.frag_recon_inter=oc_frag_recon_inter_c64x; 28 | _state->opt_vtable.frag_recon_inter2=oc_frag_recon_inter2_c64x; 29 | _state->opt_vtable.idct8x8=oc_idct8x8_c64x; 30 | _state->opt_vtable.state_frag_recon=oc_state_frag_recon_c64x; 31 | _state->opt_vtable.frag_copy_list=oc_frag_copy_list_c64x; 32 | _state->opt_vtable.loop_filter_init=oc_loop_filter_init_c64x; 33 | _state->opt_vtable.state_loop_filter_frag_rows= 34 | oc_state_loop_filter_frag_rows_c64x; 35 | _state->opt_vtable.restore_fpu=oc_restore_fpu_c; 36 | # endif 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /lib/collect.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation https://www.xiph.org/ * 10 | * * 11 | ******************************************************************** 12 | 13 | function: mode selection code 14 | 15 | ********************************************************************/ 16 | #if !defined(_collect_H) 17 | # define _collect_H (1) 18 | # include "encint.h" 19 | # if defined(OC_COLLECT_METRICS) 20 | # include 21 | 22 | 23 | 24 | typedef struct oc_mode_metrics oc_mode_metrics; 25 | 26 | 27 | 28 | /**Sets the file name to load/store mode metrics from/to. 29 | * The file name string is stored by reference, and so must be valid for the 30 | * lifetime of the encoder. 31 | * Mode metric collection uses global tables; do not attempt to perform 32 | * multiple collections at once. 33 | * \param[in] _buf char[] The file name. 34 | * \retval TH_EIMPL Not supported by this implementation.*/ 35 | #define TH_ENCCTL_SET_METRICS_FILE (0x8000) 36 | 37 | 38 | 39 | /*Accumulates various weighted sums of the measurements. 40 | w -> weight 41 | s -> SATD 42 | q -> log quantizer 43 | r -> rate (in bits) 44 | d -> RMSE 45 | All of the single letters correspond to direct, weighted sums, e.g., 46 | w=sum(w_i), s=sum(s_i*w_i), etc. 47 | The others correspond to central moments (or co-moments) of the given order, 48 | e.g., sq=sum((s_i-s/w)*(q_i-q/w)*w_i). 49 | Because we need some moments up to fourth order, we use central moments to 50 | minimize the dynamic range and prevent rounding error from dominating the 51 | calculations.*/ 52 | struct oc_mode_metrics{ 53 | double w; 54 | double s; 55 | double q; 56 | double r; 57 | double d; 58 | double s2; 59 | double sq; 60 | double q2; 61 | double sr; 62 | double qr; 63 | double r2; 64 | double sd; 65 | double qd; 66 | double d2; 67 | double s2q; 68 | double sq2; 69 | double sqr; 70 | double sqd; 71 | double s2q2; 72 | }; 73 | 74 | 75 | # define OC_ZWEIGHT (0.25) 76 | 77 | /*TODO: It may be helpful (for block-level quantizers especially) to separate 78 | out the contributions from AC and DC into separate tables.*/ 79 | 80 | extern ogg_int16_t OC_MODE_LOGQ[OC_LOGQ_BINS][3][2]; 81 | extern oc_mode_rd OC_MODE_RD_SATD[OC_LOGQ_BINS][3][2][OC_COMP_BINS]; 82 | extern oc_mode_rd OC_MODE_RD_SAD[OC_LOGQ_BINS][3][2][OC_COMP_BINS]; 83 | 84 | extern int OC_HAS_MODE_METRICS; 85 | extern oc_mode_metrics OC_MODE_METRICS_SATD[OC_LOGQ_BINS-1][3][2][OC_COMP_BINS]; 86 | extern oc_mode_metrics OC_MODE_METRICS_SAD[OC_LOGQ_BINS-1][3][2][OC_COMP_BINS]; 87 | extern const char *OC_MODE_METRICS_FILENAME; 88 | 89 | void oc_mode_metrics_dump(); 90 | void oc_mode_metrics_print(FILE *_fout); 91 | 92 | void oc_mode_metrics_add(oc_mode_metrics *_metrics, 93 | double _w,int _s,int _q,int _r,double _d); 94 | void oc_mode_metrics_merge(oc_mode_metrics *_dst, 95 | const oc_mode_metrics *_src,int _n); 96 | double oc_mode_metrics_solve(double *_r,double *_d, 97 | const oc_mode_metrics *_metrics,const int *_s0,const int *_s1, 98 | const int *_q0,const int *_q1, 99 | const double *_ra,const double *_rb,const double *_rc, 100 | const double *_da,const double *_db,const double *_dc,int _n); 101 | void oc_mode_metrics_update(oc_mode_metrics (*_metrics)[3][2][OC_COMP_BINS], 102 | int _niters_min,int _reweight,oc_mode_rd (*_table)[3][2][OC_COMP_BINS], 103 | int shift,double (*_weight)[3][2][OC_COMP_BINS]); 104 | void oc_enc_mode_metrics_load(oc_enc_ctx *_enc); 105 | void oc_enc_mode_metrics_collect(oc_enc_ctx *_enc); 106 | 107 | # endif 108 | #endif 109 | -------------------------------------------------------------------------------- /lib/dct.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | 18 | /*Definitions shared by the forward and inverse DCT transforms.*/ 19 | #if !defined(_dct_H) 20 | # define _dct_H (1) 21 | 22 | /*cos(n*pi/16) (resp. sin(m*pi/16)) scaled by 65536.*/ 23 | #define OC_C1S7 ((ogg_int32_t)64277) 24 | #define OC_C2S6 ((ogg_int32_t)60547) 25 | #define OC_C3S5 ((ogg_int32_t)54491) 26 | #define OC_C4S4 ((ogg_int32_t)46341) 27 | #define OC_C5S3 ((ogg_int32_t)36410) 28 | #define OC_C6S2 ((ogg_int32_t)25080) 29 | #define OC_C7S1 ((ogg_int32_t)12785) 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /lib/defexp.awk: -------------------------------------------------------------------------------- 1 | # awk script to convert symbol export table formats 2 | 3 | # converts an msvc .def file to an darwin ld export-symbols-list file 4 | # we only support the most basic module definition syntax 5 | 6 | # skip comments 7 | /^\w*#.*/ {next} 8 | /^\w*;.*/ {next} 9 | 10 | # remember and propagate the library name 11 | /LIBRARY/ {name = $2; print "# export list for", name; next} 12 | 13 | # skip various other lines 14 | /^\w*NAME/ || 15 | /^\w*VERSION/ || 16 | /^\w*EXPORTS/ || 17 | /^\w*HEAPSIZE/ || 18 | /^\w*STACKSIZE/ || 19 | /^\w*STUB/ {next} 20 | 21 | # todo: handle SECTIONS 22 | 23 | # for symbols, strip the semicolon and mangle the name 24 | /[a-zA-Z]+/ {sub(/\;/, ""); print "_" $1} 25 | 26 | # todo: warn if we see publicname=privatename mappings 27 | # which other linkers don't support 28 | -------------------------------------------------------------------------------- /lib/dequant.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | 18 | #if !defined(_dequant_H) 19 | # define _dequant_H (1) 20 | # include "quant.h" 21 | # include "bitpack.h" 22 | 23 | int oc_quant_params_unpack(oc_pack_buf *_opb, 24 | th_quant_info *_qinfo); 25 | void oc_quant_params_clear(th_quant_info *_qinfo); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /lib/encoder_disabled.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation https://www.xiph.org/ * 10 | * * 11 | ******************************************************************** 12 | 13 | function: 14 | 15 | ********************************************************************/ 16 | #include "apiwrapper.h" 17 | #include "encint.h" 18 | 19 | const th_quant_info TH_VP31_QUANT_INFO = {}; 20 | const th_huff_code TH_VP31_HUFF_CODES[TH_NHUFFMAN_TABLES][TH_NDCT_TOKENS]; 21 | 22 | th_enc_ctx *th_encode_alloc(const th_info *_info){ 23 | return NULL; 24 | } 25 | 26 | void th_encode_free(th_enc_ctx *_enc){} 27 | 28 | 29 | int th_encode_ctl(th_enc_ctx *_enc,int _req,void *_buf,size_t _buf_sz){ 30 | return OC_DISABLED; 31 | } 32 | 33 | int th_encode_flushheader(th_enc_ctx *_enc,th_comment *_tc,ogg_packet *_op){ 34 | return OC_DISABLED; 35 | } 36 | 37 | int th_encode_ycbcr_in(th_enc_ctx *_enc,th_ycbcr_buffer _img){ 38 | return OC_DISABLED; 39 | } 40 | 41 | int th_encode_packetout(th_enc_ctx *_enc,int _last_p,ogg_packet *_op){ 42 | return OC_DISABLED; 43 | } 44 | 45 | 46 | 47 | int theora_encode_init(theora_state *_te,theora_info *_ci){ 48 | return OC_DISABLED; 49 | } 50 | 51 | int theora_encode_YUVin(theora_state *_te,yuv_buffer *_yuv){ 52 | return OC_DISABLED; 53 | } 54 | 55 | int theora_encode_packetout(theora_state *_te,int _last_p,ogg_packet *_op){ 56 | return OC_DISABLED; 57 | } 58 | 59 | int theora_encode_header(theora_state *_te,ogg_packet *_op){ 60 | return OC_DISABLED; 61 | } 62 | 63 | int theora_encode_comment(theora_comment *_tc,ogg_packet *_op){ 64 | return OC_DISABLED; 65 | } 66 | 67 | int theora_encode_tables(theora_state *_te,ogg_packet *_op){ 68 | return OC_DISABLED; 69 | } 70 | -------------------------------------------------------------------------------- /lib/enquant.h: -------------------------------------------------------------------------------- 1 | #if !defined(_enquant_H) 2 | # define _enquant_H (1) 3 | # include "quant.h" 4 | 5 | typedef struct oc_iquant oc_iquant; 6 | 7 | #define OC_QUANT_MAX_LOG (OC_Q57(OC_STATIC_ILOG_32(OC_QUANT_MAX)-1)) 8 | 9 | /*Used to compute x/d via ((x*m>>16)+x>>l)+(x<0)) 10 | (i.e., one 16x16->16 mul, 2 shifts, and 2 adds). 11 | This is not an approximation; for 16-bit x and d, it is exact.*/ 12 | struct oc_iquant{ 13 | ogg_int16_t m; 14 | ogg_int16_t l; 15 | }; 16 | 17 | 18 | 19 | int oc_quant_params_clone(th_quant_info *_dst,const th_quant_info *_src); 20 | void oc_quant_params_pack(oggpack_buffer *_opb,const th_quant_info *_qinfo); 21 | void oc_iquant_init(oc_iquant *_this,ogg_uint16_t _d); 22 | void oc_enquant_qavg_init(ogg_int64_t _log_qavg[2][64], 23 | ogg_int16_t _log_plq[64][3][2],ogg_uint16_t _pl_rd_scale[2][64][2], 24 | ogg_uint16_t *_dequant[64][3][2],int _pixel_fmt); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /lib/fragment.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | #include 18 | #include "internal.h" 19 | 20 | void oc_frag_copy_c(unsigned char *_dst,const unsigned char *_src,int _ystride){ 21 | int i; 22 | for(i=8;i-->0;){ 23 | memcpy(_dst,_src,8*sizeof(*_dst)); 24 | _dst+=_ystride; 25 | _src+=_ystride; 26 | } 27 | } 28 | 29 | /*Copies the fragments specified by the lists of fragment indices from one 30 | frame to another. 31 | _dst_frame: The reference frame to copy to. 32 | _src_frame: The reference frame to copy from. 33 | _ystride: The row stride of the reference frames. 34 | _fragis: A pointer to a list of fragment indices. 35 | _nfragis: The number of fragment indices to copy. 36 | _frag_buf_offs: The offsets of fragments in the reference frames.*/ 37 | void oc_frag_copy_list_c(unsigned char *_dst_frame, 38 | const unsigned char *_src_frame,int _ystride, 39 | const ptrdiff_t *_fragis,ptrdiff_t _nfragis,const ptrdiff_t *_frag_buf_offs){ 40 | ptrdiff_t fragii; 41 | for(fragii=0;fragii<_nfragis;fragii++){ 42 | ptrdiff_t frag_buf_off; 43 | frag_buf_off=_frag_buf_offs[_fragis[fragii]]; 44 | oc_frag_copy_c(_dst_frame+frag_buf_off, 45 | _src_frame+frag_buf_off,_ystride); 46 | } 47 | } 48 | 49 | void oc_frag_recon_intra_c(unsigned char *_dst,int _ystride, 50 | const ogg_int16_t _residue[64]){ 51 | int i; 52 | for(i=0;i<8;i++){ 53 | int j; 54 | for(j=0;j<8;j++)_dst[j]=OC_CLAMP255(_residue[i*8+j]+128); 55 | _dst+=_ystride; 56 | } 57 | } 58 | 59 | void oc_frag_recon_inter_c(unsigned char *_dst, 60 | const unsigned char *_src,int _ystride,const ogg_int16_t _residue[64]){ 61 | int i; 62 | for(i=0;i<8;i++){ 63 | int j; 64 | for(j=0;j<8;j++)_dst[j]=OC_CLAMP255(_residue[i*8+j]+_src[j]); 65 | _dst+=_ystride; 66 | _src+=_ystride; 67 | } 68 | } 69 | 70 | void oc_frag_recon_inter2_c(unsigned char *_dst,const unsigned char *_src1, 71 | const unsigned char *_src2,int _ystride,const ogg_int16_t _residue[64]){ 72 | int i; 73 | for(i=0;i<8;i++){ 74 | int j; 75 | for(j=0;j<8;j++)_dst[j]=OC_CLAMP255(_residue[i*8+j]+(_src1[j]+_src2[j]>>1)); 76 | _dst+=_ystride; 77 | _src1+=_ystride; 78 | _src2+=_ystride; 79 | } 80 | } 81 | 82 | void oc_restore_fpu_c(void){} 83 | -------------------------------------------------------------------------------- /lib/huffdec.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | 18 | #if !defined(_huffdec_H) 19 | # define _huffdec_H (1) 20 | # include "huffman.h" 21 | # include "bitpack.h" 22 | 23 | 24 | 25 | int oc_huff_trees_unpack(oc_pack_buf *_opb, 26 | ogg_int16_t *_nodes[TH_NHUFFMAN_TABLES]); 27 | int oc_huff_trees_copy(ogg_int16_t *_dst[TH_NHUFFMAN_TABLES], 28 | const ogg_int16_t *const _src[TH_NHUFFMAN_TABLES]); 29 | void oc_huff_trees_clear(ogg_int16_t *_nodes[TH_NHUFFMAN_TABLES]); 30 | int oc_huff_token_decode_c(oc_pack_buf *_opb,const ogg_int16_t *_node); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /lib/huffenc.h: -------------------------------------------------------------------------------- 1 | #if !defined(_huffenc_H) 2 | # define _huffenc_H (1) 3 | # include "huffman.h" 4 | # include "bitpack.h" 5 | 6 | 7 | 8 | typedef th_huff_code th_huff_table[TH_NDCT_TOKENS]; 9 | 10 | 11 | 12 | extern const th_huff_code 13 | TH_VP31_HUFF_CODES[TH_NHUFFMAN_TABLES][TH_NDCT_TOKENS]; 14 | 15 | 16 | 17 | int oc_huff_codes_pack(oggpack_buffer *_opb, 18 | const th_huff_code _codes[TH_NHUFFMAN_TABLES][TH_NDCT_TOKENS]); 19 | int oc_huff_codes_unpack(oc_pack_buf *_opb, 20 | th_huff_code _codes[TH_NHUFFMAN_TABLES][TH_NDCT_TOKENS]); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /lib/huffman.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | 18 | #if !defined(_huffman_H) 19 | # define _huffman_H (1) 20 | # include "theora/codec.h" 21 | # include "ocintrin.h" 22 | 23 | /*The range of valid quantized DCT coefficient values. 24 | VP3 used 511 in the encoder, but the bitstream is capable of 580.*/ 25 | #define OC_DCT_VAL_RANGE (580) 26 | 27 | #define OC_NDCT_TOKEN_BITS (5) 28 | 29 | #define OC_DCT_EOB1_TOKEN (0) 30 | #define OC_DCT_EOB2_TOKEN (1) 31 | #define OC_DCT_EOB3_TOKEN (2) 32 | #define OC_DCT_REPEAT_RUN0_TOKEN (3) 33 | #define OC_DCT_REPEAT_RUN1_TOKEN (4) 34 | #define OC_DCT_REPEAT_RUN2_TOKEN (5) 35 | #define OC_DCT_REPEAT_RUN3_TOKEN (6) 36 | 37 | #define OC_DCT_SHORT_ZRL_TOKEN (7) 38 | #define OC_DCT_ZRL_TOKEN (8) 39 | 40 | #define OC_ONE_TOKEN (9) 41 | #define OC_MINUS_ONE_TOKEN (10) 42 | #define OC_TWO_TOKEN (11) 43 | #define OC_MINUS_TWO_TOKEN (12) 44 | 45 | #define OC_DCT_VAL_CAT2 (13) 46 | #define OC_DCT_VAL_CAT3 (17) 47 | #define OC_DCT_VAL_CAT4 (18) 48 | #define OC_DCT_VAL_CAT5 (19) 49 | #define OC_DCT_VAL_CAT6 (20) 50 | #define OC_DCT_VAL_CAT7 (21) 51 | #define OC_DCT_VAL_CAT8 (22) 52 | 53 | #define OC_DCT_RUN_CAT1A (23) 54 | #define OC_DCT_RUN_CAT1B (28) 55 | #define OC_DCT_RUN_CAT1C (29) 56 | #define OC_DCT_RUN_CAT2A (30) 57 | #define OC_DCT_RUN_CAT2B (31) 58 | 59 | #define OC_NDCT_EOB_TOKEN_MAX (7) 60 | #define OC_NDCT_ZRL_TOKEN_MAX (9) 61 | #define OC_NDCT_VAL_MAX (23) 62 | #define OC_NDCT_VAL_CAT1_MAX (13) 63 | #define OC_NDCT_VAL_CAT2_MAX (17) 64 | #define OC_NDCT_VAL_CAT2_SIZE (OC_NDCT_VAL_CAT2_MAX-OC_DCT_VAL_CAT2) 65 | #define OC_NDCT_RUN_MAX (32) 66 | #define OC_NDCT_RUN_CAT1A_MAX (28) 67 | 68 | extern const unsigned char OC_DCT_TOKEN_EXTRA_BITS[TH_NDCT_TOKENS]; 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /lib/quant.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | 18 | #if !defined(_quant_H) 19 | # define _quant_H (1) 20 | # include "theora/codec.h" 21 | # include "ocintrin.h" 22 | 23 | typedef ogg_uint16_t oc_quant_table[64]; 24 | 25 | 26 | /*Maximum scaled quantizer value.*/ 27 | #define OC_QUANT_MAX (1024<<2) 28 | 29 | 30 | void oc_dequant_tables_init(ogg_uint16_t *_dequant[64][3][2], 31 | int _pp_dc_scale[64],const th_quant_info *_qinfo); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /lib/theora.def: -------------------------------------------------------------------------------- 1 | LIBRARY libtheora 2 | EXPORTS 3 | theora_version_string 4 | theora_version_number 5 | theora_encode_init 6 | theora_encode_YUVin 7 | theora_encode_packetout 8 | theora_encode_header 9 | theora_encode_comment 10 | theora_encode_tables 11 | theora_decode_header 12 | theora_decode_init 13 | theora_decode_packetin 14 | theora_decode_YUVout 15 | theora_control 16 | theora_packet_isheader 17 | theora_packet_iskeyframe 18 | theora_granule_shift 19 | theora_granule_frame 20 | theora_granule_time 21 | theora_info_init 22 | theora_info_clear 23 | theora_clear 24 | theora_comment_init 25 | theora_comment_add 26 | theora_comment_add_tag 27 | theora_comment_query 28 | theora_comment_query_count 29 | theora_comment_clear 30 | th_version_string 31 | th_version_number 32 | th_decode_headerin 33 | th_decode_alloc 34 | th_setup_free 35 | th_decode_ctl 36 | th_decode_packetin 37 | th_decode_ycbcr_out 38 | th_decode_free 39 | th_packet_isheader 40 | th_packet_iskeyframe 41 | th_granule_frame 42 | th_granule_time 43 | th_info_init 44 | th_info_clear 45 | th_comment_init 46 | th_comment_add 47 | th_comment_add_tag 48 | th_comment_query 49 | th_comment_query_count 50 | th_comment_clear 51 | th_encode_alloc 52 | th_encode_ctl 53 | th_encode_flushheader 54 | th_encode_packetout 55 | th_encode_ycbcr_in 56 | th_encode_free 57 | -------------------------------------------------------------------------------- /lib/theora.exp: -------------------------------------------------------------------------------- 1 | # export list for libtheora 2 | _theora_version_string 3 | _theora_version_number 4 | _theora_encode_init 5 | _theora_encode_YUVin 6 | _theora_encode_packetout 7 | _theora_encode_header 8 | _theora_encode_comment 9 | _theora_encode_tables 10 | _theora_decode_header 11 | _theora_decode_init 12 | _theora_decode_packetin 13 | _theora_decode_YUVout 14 | _theora_control 15 | _theora_packet_isheader 16 | _theora_packet_iskeyframe 17 | _theora_granule_shift 18 | _theora_granule_frame 19 | _theora_granule_time 20 | _theora_info_init 21 | _theora_info_clear 22 | _theora_clear 23 | _theora_comment_init 24 | _theora_comment_add 25 | _theora_comment_add_tag 26 | _theora_comment_query 27 | _theora_comment_query_count 28 | _theora_comment_clear 29 | _th_version_string 30 | _th_version_number 31 | _th_decode_headerin 32 | _th_decode_alloc 33 | _th_setup_free 34 | _th_decode_ctl 35 | _th_decode_packetin 36 | _th_decode_ycbcr_out 37 | _th_decode_free 38 | _th_packet_isheader 39 | _th_packet_iskeyframe 40 | _th_granule_frame 41 | _th_granule_time 42 | _th_info_init 43 | _th_info_clear 44 | _th_comment_init 45 | _th_comment_add 46 | _th_comment_add_tag 47 | _th_comment_query 48 | _th_comment_query_count 49 | _th_comment_clear 50 | _th_encode_alloc 51 | _th_encode_ctl 52 | _th_encode_flushheader 53 | _th_encode_packetout 54 | _th_encode_ycbcr_in 55 | _th_encode_free 56 | -------------------------------------------------------------------------------- /lib/theoradec.exp: -------------------------------------------------------------------------------- 1 | # export list for theoradec 2 | _th_version_string 3 | _th_version_number 4 | _th_decode_headerin 5 | _th_decode_alloc 6 | _th_setup_free 7 | _th_decode_ctl 8 | _th_decode_packetin 9 | _th_decode_ycbcr_out 10 | _th_decode_free 11 | _th_packet_isheader 12 | _th_packet_iskeyframe 13 | _th_granule_frame 14 | _th_granule_time 15 | _th_info_init 16 | _th_info_clear 17 | _th_comment_init 18 | _th_comment_add 19 | _th_comment_add_tag 20 | _th_comment_query 21 | _th_comment_query_count 22 | _th_comment_clear 23 | _theora_version_string 24 | _theora_version_number 25 | _theora_decode_header 26 | _theora_decode_init 27 | _theora_decode_packetin 28 | _theora_decode_YUVout 29 | _theora_control 30 | _theora_packet_isheader 31 | _theora_packet_iskeyframe 32 | _theora_granule_shift 33 | _theora_granule_frame 34 | _theora_granule_time 35 | _theora_info_init 36 | _theora_info_clear 37 | _theora_clear 38 | _theora_comment_init 39 | _theora_comment_add 40 | _theora_comment_add_tag 41 | _theora_comment_query 42 | _theora_comment_query_count 43 | _theora_comment_clear 44 | -------------------------------------------------------------------------------- /lib/theoraenc.exp: -------------------------------------------------------------------------------- 1 | # export list for theoraenc 2 | _th_encode_alloc 3 | _th_encode_ctl 4 | _th_encode_flushheader 5 | _th_encode_ycbcr_in 6 | _th_encode_packetout 7 | _th_encode_free 8 | _TH_VP31_QUANT_INFO 9 | _TH_VP31_HUFF_CODES 10 | _theora_encode_init 11 | _theora_encode_YUVin 12 | _theora_encode_packetout 13 | _theora_encode_header 14 | _theora_encode_comment 15 | _theora_encode_tables 16 | -------------------------------------------------------------------------------- /lib/x86/x86cpu.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | function: 14 | 15 | ********************************************************************/ 16 | 17 | #if !defined(_x86_x86cpu_H) 18 | # define _x86_x86cpu_H (1) 19 | #include "../internal.h" 20 | 21 | #define OC_CPU_X86_MMX (1<<0) 22 | #define OC_CPU_X86_3DNOW (1<<1) 23 | #define OC_CPU_X86_3DNOWEXT (1<<2) 24 | #define OC_CPU_X86_MMXEXT (1<<3) 25 | #define OC_CPU_X86_SSE (1<<4) 26 | #define OC_CPU_X86_SSE2 (1<<5) 27 | #define OC_CPU_X86_PNI (1<<6) 28 | #define OC_CPU_X86_SSSE3 (1<<7) 29 | #define OC_CPU_X86_SSE4_1 (1<<8) 30 | #define OC_CPU_X86_SSE4_2 (1<<9) 31 | #define OC_CPU_X86_SSE4A (1<<10) 32 | #define OC_CPU_X86_SSE5 (1<<11) 33 | 34 | ogg_uint32_t oc_cpu_flags_get(void); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /lib/x86/x86enc.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | #include "x86enc.h" 18 | 19 | #if defined(OC_X86_ASM) 20 | 21 | void oc_enc_accel_init_x86(oc_enc_ctx *_enc){ 22 | ogg_uint32_t cpu_flags; 23 | cpu_flags=_enc->state.cpu_flags; 24 | oc_enc_accel_init_c(_enc); 25 | # if defined(OC_ENC_USE_VTABLE) 26 | if(cpu_flags&OC_CPU_X86_MMX){ 27 | _enc->opt_vtable.frag_sub=oc_enc_frag_sub_mmx; 28 | _enc->opt_vtable.frag_sub_128=oc_enc_frag_sub_128_mmx; 29 | _enc->opt_vtable.frag_recon_intra=oc_frag_recon_intra_mmx; 30 | _enc->opt_vtable.frag_recon_inter=oc_frag_recon_inter_mmx; 31 | } 32 | if(cpu_flags&OC_CPU_X86_MMXEXT){ 33 | _enc->opt_vtable.frag_sad=oc_enc_frag_sad_mmxext; 34 | _enc->opt_vtable.frag_sad_thresh=oc_enc_frag_sad_thresh_mmxext; 35 | _enc->opt_vtable.frag_sad2_thresh=oc_enc_frag_sad2_thresh_mmxext; 36 | _enc->opt_vtable.frag_satd=oc_enc_frag_satd_mmxext; 37 | _enc->opt_vtable.frag_satd2=oc_enc_frag_satd2_mmxext; 38 | _enc->opt_vtable.frag_intra_satd=oc_enc_frag_intra_satd_mmxext; 39 | _enc->opt_vtable.frag_copy2=oc_enc_frag_copy2_mmxext; 40 | _enc->opt_vtable.fdct8x8=oc_enc_fdct8x8_mmxext; 41 | } 42 | if(cpu_flags&OC_CPU_X86_SSE2){ 43 | # if defined(OC_X86_64_ASM) 44 | _enc->opt_vtable.fdct8x8=oc_enc_fdct8x8_x86_64sse2; 45 | # endif 46 | _enc->opt_vtable.frag_ssd=oc_enc_frag_ssd_sse2; 47 | _enc->opt_vtable.frag_border_ssd=oc_enc_frag_border_ssd_sse2; 48 | _enc->opt_vtable.frag_satd=oc_enc_frag_satd_sse2; 49 | _enc->opt_vtable.frag_satd2=oc_enc_frag_satd2_sse2; 50 | _enc->opt_vtable.frag_intra_satd=oc_enc_frag_intra_satd_sse2; 51 | _enc->opt_vtable.enquant_table_init=oc_enc_enquant_table_init_x86; 52 | _enc->opt_vtable.enquant_table_fixup=oc_enc_enquant_table_fixup_x86; 53 | _enc->opt_vtable.quantize=oc_enc_quantize_sse2; 54 | # else 55 | (void) cpu_flags; 56 | # endif 57 | _enc->opt_data.enquant_table_size=128*sizeof(ogg_uint16_t); 58 | _enc->opt_data.enquant_table_alignment=16; 59 | # if defined(OC_ENC_USE_VTABLE) 60 | } 61 | # endif 62 | } 63 | #endif 64 | -------------------------------------------------------------------------------- /lib/x86/x86state.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | 18 | #include "x86int.h" 19 | 20 | #if defined(OC_X86_ASM) 21 | 22 | #if defined(OC_STATE_USE_VTABLE) 23 | /*This table has been modified from OC_FZIG_ZAG by baking a 4x4 transpose into 24 | each quadrant of the destination.*/ 25 | static const unsigned char OC_FZIG_ZAG_MMX[128]={ 26 | 0, 8, 1, 2, 9,16,24,17, 27 | 10, 3,32,11,18,25, 4,12, 28 | 5,26,19,40,33,34,41,48, 29 | 27, 6,13,20,28,21,14, 7, 30 | 56,49,42,35,43,50,57,36, 31 | 15,22,29,30,23,44,37,58, 32 | 51,59,38,45,52,31,60,53, 33 | 46,39,47,54,61,62,55,63, 34 | 64,64,64,64,64,64,64,64, 35 | 64,64,64,64,64,64,64,64, 36 | 64,64,64,64,64,64,64,64, 37 | 64,64,64,64,64,64,64,64, 38 | 64,64,64,64,64,64,64,64, 39 | 64,64,64,64,64,64,64,64, 40 | 64,64,64,64,64,64,64,64, 41 | 64,64,64,64,64,64,64,64 42 | }; 43 | #endif 44 | 45 | /*This table has been modified from OC_FZIG_ZAG by baking an 8x8 transpose into 46 | the destination.*/ 47 | static const unsigned char OC_FZIG_ZAG_SSE2[128]={ 48 | 0, 8, 1, 2, 9,16,24,17, 49 | 10, 3, 4,11,18,25,32,40, 50 | 33,26,19,12, 5, 6,13,20, 51 | 27,34,41,48,56,49,42,35, 52 | 28,21,14, 7,15,22,29,36, 53 | 43,50,57,58,51,44,37,30, 54 | 23,31,38,45,52,59,60,53, 55 | 46,39,47,54,61,62,55,63, 56 | 64,64,64,64,64,64,64,64, 57 | 64,64,64,64,64,64,64,64, 58 | 64,64,64,64,64,64,64,64, 59 | 64,64,64,64,64,64,64,64, 60 | 64,64,64,64,64,64,64,64, 61 | 64,64,64,64,64,64,64,64, 62 | 64,64,64,64,64,64,64,64, 63 | 64,64,64,64,64,64,64,64 64 | }; 65 | 66 | void oc_state_accel_init_x86(oc_theora_state *_state){ 67 | oc_state_accel_init_c(_state); 68 | _state->cpu_flags=oc_cpu_flags_get(); 69 | # if defined(OC_STATE_USE_VTABLE) 70 | if(_state->cpu_flags&OC_CPU_X86_MMX){ 71 | _state->opt_vtable.frag_copy=oc_frag_copy_mmx; 72 | _state->opt_vtable.frag_copy_list=oc_frag_copy_list_mmx; 73 | _state->opt_vtable.frag_recon_intra=oc_frag_recon_intra_mmx; 74 | _state->opt_vtable.frag_recon_inter=oc_frag_recon_inter_mmx; 75 | _state->opt_vtable.frag_recon_inter2=oc_frag_recon_inter2_mmx; 76 | _state->opt_vtable.idct8x8=oc_idct8x8_mmx; 77 | _state->opt_vtable.state_frag_recon=oc_state_frag_recon_mmx; 78 | _state->opt_vtable.loop_filter_init=oc_loop_filter_init_mmx; 79 | _state->opt_vtable.state_loop_filter_frag_rows= 80 | oc_state_loop_filter_frag_rows_mmx; 81 | _state->opt_vtable.restore_fpu=oc_restore_fpu_mmx; 82 | _state->opt_data.dct_fzig_zag=OC_FZIG_ZAG_MMX; 83 | } 84 | if(_state->cpu_flags&OC_CPU_X86_MMXEXT){ 85 | _state->opt_vtable.loop_filter_init=oc_loop_filter_init_mmxext; 86 | _state->opt_vtable.state_loop_filter_frag_rows= 87 | oc_state_loop_filter_frag_rows_mmxext; 88 | } 89 | if(_state->cpu_flags&OC_CPU_X86_SSE2){ 90 | _state->opt_vtable.idct8x8=oc_idct8x8_sse2; 91 | # endif 92 | _state->opt_data.dct_fzig_zag=OC_FZIG_ZAG_SSE2; 93 | # if defined(OC_STATE_USE_VTABLE) 94 | } 95 | # endif 96 | } 97 | #endif 98 | -------------------------------------------------------------------------------- /lib/x86_vc/x86cpu.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | function: 14 | 15 | ********************************************************************/ 16 | 17 | #if !defined(_x86_vc_x86cpu_H) 18 | # define _x86_vc_x86cpu_H (1) 19 | #include "../internal.h" 20 | 21 | #define OC_CPU_X86_MMX (1<<0) 22 | #define OC_CPU_X86_3DNOW (1<<1) 23 | #define OC_CPU_X86_3DNOWEXT (1<<2) 24 | #define OC_CPU_X86_MMXEXT (1<<3) 25 | #define OC_CPU_X86_SSE (1<<4) 26 | #define OC_CPU_X86_SSE2 (1<<5) 27 | #define OC_CPU_X86_PNI (1<<6) 28 | #define OC_CPU_X86_SSSE3 (1<<7) 29 | #define OC_CPU_X86_SSE4_1 (1<<8) 30 | #define OC_CPU_X86_SSE4_2 (1<<9) 31 | #define OC_CPU_X86_SSE4A (1<<10) 32 | #define OC_CPU_X86_SSE5 (1<<11) 33 | 34 | ogg_uint32_t oc_cpu_flags_get(void); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /lib/x86_vc/x86enc.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | #include "x86enc.h" 18 | 19 | #if defined(OC_X86_ASM) 20 | 21 | void oc_enc_accel_init_x86(oc_enc_ctx *_enc){ 22 | ogg_uint32_t cpu_flags; 23 | cpu_flags=_enc->state.cpu_flags; 24 | oc_enc_accel_init_c(_enc); 25 | if(cpu_flags&OC_CPU_X86_MMX){ 26 | _enc->opt_vtable.frag_sub=oc_enc_frag_sub_mmx; 27 | _enc->opt_vtable.frag_sub_128=oc_enc_frag_sub_128_mmx; 28 | _enc->opt_vtable.frag_recon_intra=oc_frag_recon_intra_mmx; 29 | _enc->opt_vtable.frag_recon_inter=oc_frag_recon_inter_mmx; 30 | } 31 | if(cpu_flags&OC_CPU_X86_MMXEXT){ 32 | _enc->opt_vtable.frag_sad=oc_enc_frag_sad_mmxext; 33 | _enc->opt_vtable.frag_sad_thresh=oc_enc_frag_sad_thresh_mmxext; 34 | _enc->opt_vtable.frag_sad2_thresh=oc_enc_frag_sad2_thresh_mmxext; 35 | _enc->opt_vtable.frag_satd=oc_enc_frag_satd_mmxext; 36 | _enc->opt_vtable.frag_satd2=oc_enc_frag_satd2_mmxext; 37 | _enc->opt_vtable.frag_intra_satd=oc_enc_frag_intra_satd_mmxext; 38 | _enc->opt_vtable.frag_copy2=oc_enc_frag_copy2_mmxext; 39 | _enc->opt_vtable.fdct8x8=oc_enc_fdct8x8_mmxext; 40 | } 41 | if(cpu_flags&OC_CPU_X86_SSE2){ 42 | # if defined(OC_X86_64_ASM) 43 | _enc->opt_vtable.fdct8x8=oc_enc_fdct8x8_x86_64sse2; 44 | # endif 45 | } 46 | } 47 | #endif 48 | -------------------------------------------------------------------------------- /lib/x86_vc/x86enc.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | 18 | #if !defined(_x86_vc_x86enc_H) 19 | # define _x86_vc_x86enc_H (1) 20 | # include "x86int.h" 21 | # if defined(OC_X86_ASM) 22 | # define oc_enc_accel_init oc_enc_accel_init_x86 23 | # define OC_ENC_USE_VTABLE (1) 24 | # endif 25 | # include "../encint.h" 26 | 27 | void oc_enc_accel_init_x86(oc_enc_ctx *_enc); 28 | 29 | unsigned oc_enc_frag_sad_mmxext(const unsigned char *_src, 30 | const unsigned char *_ref,int _ystride); 31 | unsigned oc_enc_frag_sad_thresh_mmxext(const unsigned char *_src, 32 | const unsigned char *_ref,int _ystride,unsigned _thresh); 33 | unsigned oc_enc_frag_sad2_thresh_mmxext(const unsigned char *_src, 34 | const unsigned char *_ref1,const unsigned char *_ref2,int _ystride, 35 | unsigned _thresh); 36 | unsigned oc_enc_frag_satd_mmxext(unsigned *_dc,const unsigned char *_src, 37 | const unsigned char *_ref,int _ystride); 38 | unsigned oc_enc_frag_satd2_mmxext(unsigned *_dc,const unsigned char *_src, 39 | const unsigned char *_ref1,const unsigned char *_ref2,int _ystride); 40 | unsigned oc_enc_frag_intra_satd_mmxext(unsigned *_dc, 41 | const unsigned char *_src,int _ystride); 42 | void oc_enc_frag_sub_mmx(ogg_int16_t _diff[64], 43 | const unsigned char *_x,const unsigned char *_y,int _stride); 44 | void oc_enc_frag_sub_128_mmx(ogg_int16_t _diff[64], 45 | const unsigned char *_x,int _stride); 46 | void oc_enc_frag_copy2_mmxext(unsigned char *_dst, 47 | const unsigned char *_src1,const unsigned char *_src2,int _ystride); 48 | void oc_enc_fdct8x8_mmxext(ogg_int16_t _y[64],const ogg_int16_t _x[64]); 49 | void oc_enc_fdct8x8_x86_64sse2(ogg_int16_t _y[64],const ogg_int16_t _x[64]); 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /lib/x86_vc/x86int.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | 18 | #if !defined(_x86_vc_x86int_H) 19 | # define _x86_vc_x86int_H (1) 20 | # include "../internal.h" 21 | # if defined(OC_X86_ASM) 22 | # define oc_state_accel_init oc_state_accel_init_x86 23 | # define OC_STATE_USE_VTABLE (1) 24 | # endif 25 | # include "../state.h" 26 | # include "x86cpu.h" 27 | 28 | void oc_state_accel_init_x86(oc_theora_state *_state); 29 | 30 | void oc_frag_copy_mmx(unsigned char *_dst, 31 | const unsigned char *_src,int _ystride); 32 | void oc_frag_copy_list_mmx(unsigned char *_dst_frame, 33 | const unsigned char *_src_frame,int _ystride, 34 | const ptrdiff_t *_fragis,ptrdiff_t _nfragis,const ptrdiff_t *_frag_buf_offs); 35 | void oc_frag_recon_intra_mmx(unsigned char *_dst,int _ystride, 36 | const ogg_int16_t *_residue); 37 | void oc_frag_recon_inter_mmx(unsigned char *_dst, 38 | const unsigned char *_src,int _ystride,const ogg_int16_t *_residue); 39 | void oc_frag_recon_inter2_mmx(unsigned char *_dst,const unsigned char *_src1, 40 | const unsigned char *_src2,int _ystride,const ogg_int16_t *_residue); 41 | void oc_idct8x8_mmx(ogg_int16_t _y[64],ogg_int16_t _x[64],int _last_zzi); 42 | void oc_state_frag_recon_mmx(const oc_theora_state *_state,ptrdiff_t _fragi, 43 | int _pli,ogg_int16_t _dct_coeffs[128],int _last_zzi,ogg_uint16_t _dc_quant); 44 | void oc_loop_filter_init_mmx(signed char _bv[256],int _flimit); 45 | void oc_state_loop_filter_frag_rows_mmx(const oc_theora_state *_state, 46 | signed char _bv[256],int _refi,int _pli,int _fragy0,int _fragy_end); 47 | void oc_restore_fpu_mmx(void); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /lib/x86_vc/x86state.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation and contributors * 10 | * https://www.xiph.org/ * 11 | * * 12 | ******************************************************************** 13 | 14 | function: 15 | 16 | ********************************************************************/ 17 | 18 | #include "x86int.h" 19 | 20 | #if defined(OC_X86_ASM) 21 | 22 | /*This table has been modified from OC_FZIG_ZAG by baking a 4x4 transpose into 23 | each quadrant of the destination.*/ 24 | static const unsigned char OC_FZIG_ZAG_MMX[128]={ 25 | 0, 8, 1, 2, 9,16,24,17, 26 | 10, 3,32,11,18,25, 4,12, 27 | 5,26,19,40,33,34,41,48, 28 | 27, 6,13,20,28,21,14, 7, 29 | 56,49,42,35,43,50,57,36, 30 | 15,22,29,30,23,44,37,58, 31 | 51,59,38,45,52,31,60,53, 32 | 46,39,47,54,61,62,55,63, 33 | 64,64,64,64,64,64,64,64, 34 | 64,64,64,64,64,64,64,64, 35 | 64,64,64,64,64,64,64,64, 36 | 64,64,64,64,64,64,64,64, 37 | 64,64,64,64,64,64,64,64, 38 | 64,64,64,64,64,64,64,64, 39 | 64,64,64,64,64,64,64,64, 40 | 64,64,64,64,64,64,64,64, 41 | }; 42 | 43 | void oc_state_accel_init_x86(oc_theora_state *_state){ 44 | _state->cpu_flags=oc_cpu_flags_get(); 45 | if(_state->cpu_flags&OC_CPU_X86_MMX){ 46 | _state->opt_vtable.frag_copy=oc_frag_copy_mmx; 47 | _state->opt_vtable.frag_copy_list=oc_frag_copy_list_mmx; 48 | _state->opt_vtable.frag_recon_intra=oc_frag_recon_intra_mmx; 49 | _state->opt_vtable.frag_recon_inter=oc_frag_recon_inter_mmx; 50 | _state->opt_vtable.frag_recon_inter2=oc_frag_recon_inter2_mmx; 51 | _state->opt_vtable.idct8x8=oc_idct8x8_mmx; 52 | _state->opt_vtable.state_frag_recon=oc_state_frag_recon_mmx; 53 | _state->opt_vtable.loop_filter_init=oc_loop_filter_init_mmx; 54 | _state->opt_vtable.state_loop_filter_frag_rows= 55 | oc_state_loop_filter_frag_rows_mmx; 56 | _state->opt_vtable.restore_fpu=oc_restore_fpu_mmx; 57 | _state->opt_data.dct_fzig_zag=OC_FZIG_ZAG_MMX; 58 | } 59 | else oc_state_accel_init_c(_state); 60 | } 61 | #endif 62 | -------------------------------------------------------------------------------- /libtheora.spec.in: -------------------------------------------------------------------------------- 1 | Name: libtheora 2 | Version: @VERSION@ 3 | Release: 0.xiph.0 4 | Summary: The Theora Video Compression Codec. 5 | 6 | Group: System Environment/Libraries 7 | License: BSD 8 | URL: https://www.theora.org/ 9 | Vendor: Xiph.org Foundation 10 | Source: http://downloads.xiph.org/releases/theora/%{name}-%{version}.tar.gz 11 | BuildRoot: %{_tmppath}/%{name}-%{version}-root 12 | 13 | BuildRequires: libogg-devel >= 2:@THEORA_LIBOGG_REQ_VERSION@ 14 | BuildRequires: libvorbis-devel >= 1:1.0.1 15 | BuildRequires: SDL-devel 16 | 17 | # this needs to be explicit since vorbis's .so versioning didn't get bumped 18 | # when going from 1.0 to 1.0.1 19 | Requires: libvorbis >= 1:1.0.1 20 | 21 | %description 22 | Theora is Xiph.Org's first publicly released video codec, intended 23 | for use within the Ogg's project's Ogg multimedia streaming system. 24 | Theora is derived directly from On2's VP3 codec; Currently the two are 25 | nearly identical, varying only in encapsulating decoder tables in the 26 | bitstream headers, but Theora will make use of this extra freedom 27 | in the future to improve over what is possible with VP3. 28 | 29 | %package devel 30 | Summary: Development tools for Theora applications. 31 | Group: Development/Libraries 32 | Requires: %{name} = %{version}-%{release} 33 | Requires: libogg-devel >= 2:@THEORA_LIBOGG_REQ_VERSION@ 34 | 35 | %description devel 36 | The libtheora-devel package contains the header files and documentation 37 | needed to develop applications with Ogg Theora. 38 | 39 | %prep 40 | %setup -q -n %{name}-%{version} 41 | 42 | %build 43 | %configure --enable-shared 44 | make 45 | 46 | %install 47 | rm -rf $RPM_BUILD_ROOT 48 | # make sure our temp doc build dir is removed 49 | rm -rf $(pwd)/__docs 50 | 51 | %makeinstall docdir=$(pwd)/__docs 52 | 53 | find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';' 54 | 55 | %clean 56 | rm -rf $RPM_BUILD_ROOT 57 | 58 | %post -p /sbin/ldconfig 59 | 60 | %postun -p /sbin/ldconfig 61 | 62 | %files 63 | %defattr(-,root,root) 64 | %doc COPYING README 65 | %{_libdir}/libtheora.so.* 66 | 67 | %files devel 68 | %defattr(-,root,root,-) 69 | %doc __docs/* 70 | %{_libdir}/libtheora.a 71 | %{_libdir}/libtheora.so 72 | %dir %{_includedir}/theora 73 | %{_includedir}/theora/codec.h 74 | %{_includedir}/theora/theora.h 75 | %{_includedir}/theora/theoradec.h 76 | %{_libdir}/pkgconfig/theora.pc 77 | 78 | %changelog 79 | * Sat Mar 29 2025 Petter Reinholdtsen 80 | - updated version for 1.2.0 release 81 | * Sat Aug 20 2005 Ralph Giles 82 | - updated version for 1.0alpha5 release 83 | * Thu Jun 10 2004 Thomas Vander Stichele 84 | - transported fedora.us spec file 85 | -------------------------------------------------------------------------------- /m4/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = \ 2 | as-ac-expand.m4 \ 3 | as-gcc-inline-assembly.m4 \ 4 | ogg.m4 \ 5 | pkg.m4 \ 6 | vorbis.m4 7 | -------------------------------------------------------------------------------- /m4/as-ac-expand.m4: -------------------------------------------------------------------------------- 1 | dnl as-ac-expand.m4 0.2.0 2 | dnl autostars m4 macro for expanding directories using configure's prefix 3 | dnl thomas@apestaart.org 4 | 5 | dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR) 6 | dnl example 7 | dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) 8 | dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local 9 | 10 | AC_DEFUN([AS_AC_EXPAND], 11 | [ 12 | EXP_VAR=[$1] 13 | FROM_VAR=[$2] 14 | 15 | dnl first expand prefix and exec_prefix if necessary 16 | prefix_save=$prefix 17 | exec_prefix_save=$exec_prefix 18 | 19 | dnl if no prefix given, then use /usr/local, the default prefix 20 | if test "x$prefix" = "xNONE"; then 21 | prefix="$ac_default_prefix" 22 | fi 23 | dnl if no exec_prefix given, then use prefix 24 | if test "x$exec_prefix" = "xNONE"; then 25 | exec_prefix=$prefix 26 | fi 27 | 28 | full_var="$FROM_VAR" 29 | dnl loop until it doesn't change anymore 30 | while true; do 31 | new_full_var="`eval echo $full_var`" 32 | if test "x$new_full_var" = "x$full_var"; then break; fi 33 | full_var=$new_full_var 34 | done 35 | 36 | dnl clean up 37 | full_var=$new_full_var 38 | AC_SUBST([$1], "$full_var") 39 | 40 | dnl restore prefix and exec_prefix 41 | prefix=$prefix_save 42 | exec_prefix=$exec_prefix_save 43 | ]) 44 | -------------------------------------------------------------------------------- /m4/as-gcc-inline-assembly.m4: -------------------------------------------------------------------------------- 1 | dnl as-gcc-inline-assembly.m4 0.1.0 2 | 3 | dnl autostars m4 macro for detection of gcc inline assembly 4 | 5 | dnl David Schleef 6 | 7 | dnl $Id$ 8 | 9 | dnl AS_COMPILER_FLAG(ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) 10 | dnl Tries to compile with the given CFLAGS. 11 | dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags, 12 | dnl and ACTION-IF-NOT-ACCEPTED otherwise. 13 | 14 | AC_DEFUN([AS_GCC_INLINE_ASSEMBLY], 15 | [ 16 | AC_MSG_CHECKING([if compiler supports gcc-style inline assembly]) 17 | 18 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [ 19 | #ifdef __GNUC_MINOR__ 20 | #if (__GNUC__ * 1000 + __GNUC_MINOR__) < 3004 21 | #error GCC before 3.4 has critical bugs compiling inline assembly 22 | #endif 23 | #endif 24 | __asm__ (""::)])],[flag_ok=yes],[flag_ok=no]) 25 | 26 | if test "X$flag_ok" = Xyes ; then 27 | $1 28 | true 29 | else 30 | $2 31 | true 32 | fi 33 | AC_MSG_RESULT([$flag_ok]) 34 | ]) 35 | 36 | AC_DEFUN([AC_TRY_ASSEMBLE], 37 | [ac_c_ext=$ac_ext 38 | ac_ext=${ac_s_ext-s} 39 | cat > conftest.$ac_ext <&AS_MESSAGE_LOG_FD 49 | cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD 50 | ac_ext=$ac_c_ext 51 | ifelse([$3], , , [ rm -rf conftest* 52 | $3 53 | ])dnl 54 | fi 55 | rm -rf conftest*]) 56 | 57 | 58 | AC_DEFUN([AS_ASM_ARM_NEON], 59 | [ 60 | AC_MSG_CHECKING([if assembler supports NEON instructions on ARM]) 61 | 62 | AC_TRY_ASSEMBLE([vorr d0,d0,d0], [flag_ok=yes], [flag_ok=no]) 63 | 64 | if test "X$flag_ok" = Xyes ; then 65 | $1 66 | true 67 | else 68 | $2 69 | true 70 | fi 71 | AC_MSG_RESULT([$flag_ok]) 72 | ]) 73 | 74 | 75 | AC_DEFUN([AS_ASM_ARM_MEDIA], 76 | [ 77 | AC_MSG_CHECKING([if assembler supports ARMv6 media instructions on ARM]) 78 | 79 | AC_TRY_ASSEMBLE([shadd8 r3,r3,r3], [flag_ok=yes], [flag_ok=no]) 80 | 81 | if test "X$flag_ok" = Xyes ; then 82 | $1 83 | true 84 | else 85 | $2 86 | true 87 | fi 88 | AC_MSG_RESULT([$flag_ok]) 89 | ]) 90 | 91 | 92 | AC_DEFUN([AS_ASM_ARM_EDSP], 93 | [ 94 | AC_MSG_CHECKING([if assembler supports EDSP instructions on ARM]) 95 | 96 | AC_TRY_ASSEMBLE([qadd r3,r3,r3], [flag_ok=yes], [flag_ok=no]) 97 | 98 | if test "X$flag_ok" = Xyes ; then 99 | $1 100 | true 101 | else 102 | $2 103 | true 104 | fi 105 | AC_MSG_RESULT([$flag_ok]) 106 | ]) 107 | -------------------------------------------------------------------------------- /macosx/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiph/theora/b167cb4a3e3e2d3239d71f0ca2cbc25af4f2183c/macosx/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /macosx/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | Theora 9 | CFBundleGetInfoString 10 | Theora framework 1.1alpha1svn, Copyright © 2002-2009Xiph.Org Foundation 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | org.xiph.theora 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0d6 23 | CFBundleShortVersionString 24 | 1.1alpha1svn 25 | NSHumanReadableCopyright 26 | Theora framework 1.1alpha1svn, Copyright © 2002-2009Xiph.Org Foundation 27 | CSResourcesFileMapped 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /macosx/Theora_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Theora' target in the 'Theora' project. 3 | // 4 | 5 | #include 6 | -------------------------------------------------------------------------------- /symbian/bld.inf: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2003 Commonwealth Scientific and Industrial Research 3 | Organisation (CSIRO) Australia 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | - Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | - Neither the name of CSIRO Australia nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 23 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR 24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | PRJ_MMPFILES 34 | 35 | theora.mmp 36 | -------------------------------------------------------------------------------- /symbian/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2003 Commonwealth Scientific and Industrial Research 3 | Organisation (CSIRO) Australia 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | - Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | - Neither the name of CSIRO Australia nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 23 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR 24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | #ifndef CONFIG_H 34 | #define CONFIG_H 35 | 36 | /* Do not build encoding support */ 37 | 38 | #define THEORA_SUPPORT_ENCODE 0 39 | 40 | #ifdef __WINS__ 41 | 42 | /* Disable some warnings */ 43 | 44 | #pragma warning(disable: 4100) /* unreferenced formal parameter */ 45 | //#pragma warning(disable: 4121) /* alignment of a member was sensitive to packing */ 46 | #pragma warning(disable: 4244) /* conversion from '...' to '...', possible loss of data */ 47 | #pragma warning(disable: 4505) /* unreferenced local function has been removed */ 48 | #pragma warning(disable: 4701) /* local variable may be be used without having been initialized */ 49 | #pragma warning(disable: 4761) /* integral size mismatch in argument: conversion supplied */ 50 | 51 | #endif 52 | 53 | #endif /* ! CONFIG_H */ 54 | -------------------------------------------------------------------------------- /symbian/theora.mmp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2003 Commonwealth Scientific and Industrial Research 3 | Organisation (CSIRO) Australia 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | - Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | - Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | - Neither the name of CSIRO Australia nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 23 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR 24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | TARGET theora.lib 34 | TARGETTYPE lib 35 | UID 0 36 | MACRO HAVE_CONFIG_H 37 | SOURCEPATH ..\lib 38 | SOURCE blockmap.c comment.c dct.c dct_decode.c decode.c frarray.c frinit.c huffman.c 39 | SOURCE idct.c mcomp.c misc_common.c pb.c pp.c quant.c reconstruct.c scan.c toplevel.c encoder_disabled.c 40 | USERINCLUDE . 41 | SYSTEMINCLUDE \epoc32\include \epoc32\include\libc ..\include ..\..\ogg\include ..\..\ogg\symbian 42 | -------------------------------------------------------------------------------- /tests/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_HEADERS = tests.h 2 | 3 | AM_CPPFLAGS = -I$(top_srcdir)/include 4 | AM_CFLAGS = $(OGG_CFLAGS) 5 | 6 | THEORADIR = ../lib 7 | THEORA_LIBS = $(THEORADIR)/libtheora.la $(OGG_LIBS) 8 | THEORADEC_LIBS = $(THEORADIR)/libtheoradec.la $(OGG_LIBS) 9 | THEORAENC_LIBS = $(THEORADIR)/libtheoraenc.la \ 10 | $(THEORADIR)/libtheoradec.la $(OGG_LIBS) 11 | test: check 12 | 13 | TEST_ENV = @TEST_ENV@ 14 | 15 | LOG_COMPILER=$(LIBTOOL) --mode=execute $(VALGRIND) $(TEST_ENV) 16 | 17 | TESTS_DEC = noop_theora \ 18 | comment comment_theoradec comment_theora 19 | 20 | TESTS_ENC = noop noop_theoraenc \ 21 | granulepos granulepos_theoraenc granulepos_theora 22 | 23 | if THEORA_DISABLE_ENCODE 24 | TESTS = $(TESTS_DEC) 25 | else 26 | TESTS = $(TESTS_DEC) $(TESTS_ENC) 27 | endif 28 | 29 | check_PROGRAMS = $(TESTS) 30 | # dummy call tests for the current api 31 | noop_SOURCES = noop.c 32 | noop_LDADD = $(THEORAENC_LIBS) 33 | noop_CFLAGS = $(OGG_CFLAGS) 34 | 35 | # dummy call tests for the pre-1.0 legacy api with current link line 36 | noop_theoraenc_SOURCES = noop_theora.c 37 | noop_theoraenc_LDADD = $(THEORAENC_LIBS) 38 | noop_theoraenc_CFLAGS = $(OGG_CFLAGS) 39 | 40 | # dummy call tests for the pre-1.0 legacy api with legacy link line 41 | noop_theora_SOURCES = noop_theora.c 42 | noop_theora_LDADD = $(THEORA_LIBS) 43 | noop_theora_CFLAGS = $(OGG_CFLAGS) 44 | 45 | # comment utilities for the current api 46 | comment_SOURCES = comment.c 47 | comment_LDADD = $(THEORADEC_LIBS) 48 | comment_CFLAGS = $(OGG_CFLAGS) 49 | 50 | # comment utilities for the legacy api and current lib 51 | comment_theoradec_SOURCES = comment.c 52 | comment_theoradec_LDADD = $(THEORADEC_LIBS) 53 | comment_theoradec_CFLAGS = $(OGG_CFLAGS) 54 | 55 | # comment utilities for the legacy api and legacy lib 56 | comment_theora_SOURCES = comment_theora.c 57 | comment_theora_LDADD = $(THEORA_LIBS) 58 | comment_theora_CFLAGS = $(OGG_CFLAGS) 59 | 60 | granulepos_SOURCES = granulepos.c 61 | granulepos_LDADD = $(THEORAENC_LIBS) -lm 62 | granulepos_CFLAGS = $(OGG_CFLAGS) 63 | 64 | granulepos_theoraenc_SOURCES = granulepos_theora.c 65 | granulepos_theoraenc_LDADD = $(THEORAENC_LIBS) -lm 66 | granulepos_theoraenc_CFLAGS = $(OGG_CFLAGS) 67 | 68 | granulepos_theora_SOURCES = granulepos_theora.c 69 | granulepos_theora_LDADD = $(THEORA_LIBS) -lm 70 | granulepos_theora_CFLAGS = $(OGG_CFLAGS) 71 | -------------------------------------------------------------------------------- /tests/comment.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation https://www.xiph.org/ * 10 | * * 11 | ******************************************************************** 12 | 13 | function: routines for validating comment header code 14 | 15 | ********************************************************************/ 16 | 17 | #include 18 | 19 | #include 20 | #include "tests.h" 21 | 22 | #define ARTIST1 "Bug-eyed Fish" 23 | #define ARTIST2 "VJ Fugu" 24 | #define COPYRIGHT "Copyright (C) 2005. Some Rights Reserved." 25 | #define LICENSE "Creative Commons Attribution-ShareAlike 2.5" 26 | 27 | static int 28 | test_comments () 29 | { 30 | th_comment tc; 31 | int n; 32 | char * value; 33 | 34 | INFO ("+ Initializing th_comment"); 35 | th_comment_init (&tc); 36 | 37 | INFO ("+ Adding ARTIST1"); 38 | th_comment_add (&tc, "ARTIST=" ARTIST1); 39 | 40 | INFO ("+ Adding LICENSE by tag"); 41 | th_comment_add_tag (&tc, "LICENSE", LICENSE); 42 | 43 | INFO ("+ Adding ARTIST2 by tag"); 44 | th_comment_add_tag (&tc, "ARTIST", ARTIST2); 45 | 46 | INFO ("+ Querying value of LICENSE"); 47 | value = th_comment_query (&tc, "LICENSE", 0); 48 | printf("foo %s\n", value); 49 | 50 | if (strcmp (value, LICENSE)) 51 | FAIL ("Incorrect value for LICENSE"); 52 | 53 | INFO ("+ Querying count of ARTIST comments"); 54 | n = th_comment_query_count (&tc, "ARTIST"); 55 | 56 | if (n != 2) 57 | FAIL ("Incorrect count of ARTIST comments"); 58 | 59 | INFO ("+ Querying value of ARTIST index 0"); 60 | value = th_comment_query (&tc, "ARTIST", 0); 61 | if (strcmp (value, ARTIST1)) 62 | FAIL ("Incorrect value for ARTIST index 0"); 63 | 64 | INFO ("+ Querying value of ARTIST index 1"); 65 | value = th_comment_query (&tc, "ARTIST", 1); 66 | if (strcmp (value, ARTIST2)) 67 | FAIL ("Incorrect value for ARTIST index 1"); 68 | 69 | INFO ("+ Querying value of ARTIST index 2 (out of bounds)"); 70 | value = th_comment_query (&tc, "ARTIST", 2); 71 | if (value != NULL) 72 | FAIL ("Non-NULL value for ARTIST index 2 (out of bounds)"); 73 | 74 | INFO ("+ Querying value of UNDEF index 7 (tag not defined)"); 75 | value = th_comment_query (&tc, "UNDEF", 7); 76 | if (value != NULL) 77 | FAIL ("Non-NULL value for UNDEF index 7 (tag not defined)"); 78 | 79 | INFO ("+ Clearing th_comment"); 80 | th_comment_clear (&tc); 81 | 82 | return 0; 83 | } 84 | 85 | int main(int argc, char *argv[]) 86 | { 87 | test_comments (); 88 | 89 | exit (0); 90 | } 91 | -------------------------------------------------------------------------------- /tests/comment_theora.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation https://www.xiph.org/ * 10 | * * 11 | ******************************************************************** 12 | 13 | function: routines for validating comment header code 14 | 15 | ********************************************************************/ 16 | 17 | #include 18 | 19 | #include 20 | #include "tests.h" 21 | 22 | #define ARTIST1 "Bug-eyed Fish" 23 | #define ARTIST2 "VJ Fugu" 24 | #define COPYRIGHT "Copyright (C) 2005. Some Rights Reserved." 25 | #define LICENSE "Creative Commons Attribution-ShareAlike 2.5" 26 | 27 | static int 28 | test_comments () 29 | { 30 | theora_comment tc; 31 | int n; 32 | char * value; 33 | 34 | INFO ("+ Initializing theora_comment"); 35 | theora_comment_init (&tc); 36 | 37 | INFO ("+ Adding ARTIST1"); 38 | theora_comment_add (&tc, "ARTIST=" ARTIST1); 39 | 40 | INFO ("+ Adding LICENSE by tag"); 41 | theora_comment_add_tag (&tc, "LICENSE", LICENSE); 42 | 43 | INFO ("+ Adding ARTIST2 by tag"); 44 | theora_comment_add_tag (&tc, "ARTIST", ARTIST2); 45 | 46 | INFO ("+ Querying value of LICENSE"); 47 | value = theora_comment_query (&tc, "LICENSE", 0); 48 | printf("foo %s\n", value); 49 | 50 | if (strcmp (value, LICENSE)) 51 | FAIL ("Incorrect value for LICENSE"); 52 | 53 | INFO ("+ Querying count of ARTIST comments"); 54 | n = theora_comment_query_count (&tc, "ARTIST"); 55 | 56 | if (n != 2) 57 | FAIL ("Incorrect count of ARTIST comments"); 58 | 59 | INFO ("+ Querying value of ARTIST index 0"); 60 | value = theora_comment_query (&tc, "ARTIST", 0); 61 | if (strcmp (value, ARTIST1)) 62 | FAIL ("Incorrect value for ARTIST index 0"); 63 | 64 | INFO ("+ Querying value of ARTIST index 1"); 65 | value = theora_comment_query (&tc, "ARTIST", 1); 66 | if (strcmp (value, ARTIST2)) 67 | FAIL ("Incorrect value for ARTIST index 1"); 68 | 69 | INFO ("+ Querying value of ARTIST index 2 (out of bounds)"); 70 | value = theora_comment_query (&tc, "ARTIST", 2); 71 | if (value != NULL) 72 | FAIL ("Non-NULL value for ARTIST index 2 (out of bounds)"); 73 | 74 | INFO ("+ Querying value of UNDEF index 7 (tag not defined)"); 75 | value = theora_comment_query (&tc, "UNDEF", 7); 76 | if (value != NULL) 77 | FAIL ("Non-NULL value for UNDEF index 7 (tag not defined)"); 78 | 79 | INFO ("+ Clearing theora_comment"); 80 | theora_comment_clear (&tc); 81 | 82 | return 0; 83 | } 84 | 85 | int main(int argc, char *argv[]) 86 | { 87 | test_comments (); 88 | 89 | exit (0); 90 | } 91 | -------------------------------------------------------------------------------- /tests/noop.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation https://www.xiph.org/ * 10 | * * 11 | ******************************************************************** 12 | 13 | function: routines for validating codec initialization 14 | 15 | ********************************************************************/ 16 | 17 | #include 18 | #include 19 | 20 | #include "tests.h" 21 | 22 | static int 23 | noop_test_info () 24 | { 25 | th_info ti; 26 | 27 | INFO ("+ Initializing th_info struct"); 28 | th_info_init (&ti); 29 | 30 | INFO ("+ Clearing empty th_info struct"); 31 | th_info_clear (&ti); 32 | 33 | return 0; 34 | } 35 | 36 | static int 37 | noop_test_comments () 38 | { 39 | th_comment tc; 40 | 41 | INFO ("+ Initializing th_comment struct"); 42 | th_comment_init (&tc); 43 | 44 | INFO ("+ Clearing empty th_comment struct") 45 | th_comment_clear (&tc); 46 | 47 | return 0; 48 | } 49 | 50 | static int 51 | noop_test_encode () 52 | { 53 | th_info ti; 54 | th_enc_ctx *te; 55 | 56 | INFO ("+ Initializing th_info struct"); 57 | th_info_init (&ti); 58 | 59 | INFO ("+ Testing encoder context with empty th_info"); 60 | te = th_encode_alloc(&ti); 61 | if (te != NULL) 62 | FAIL("td_encode_alloc accepted an unconfigured th_info"); 63 | 64 | INFO ("+ Setting 16x16 image size"); 65 | ti.frame_width = 16; 66 | ti.frame_height = 16; 67 | 68 | INFO ("+ Setting a 1:1 frame rate"); 69 | ti.fps_numerator = 1; 70 | ti.fps_denominator = 1; 71 | 72 | INFO ("+ Allocating encoder context"); 73 | te = th_encode_alloc(&ti); 74 | if (te == NULL) 75 | FAIL("td_encode_alloc returned a null pointer"); 76 | 77 | INFO ("+ Clearing th_info struct"); 78 | th_info_clear (&ti); 79 | 80 | INFO ("+ Freeing encoder context"); 81 | th_encode_free(te); 82 | 83 | return 0; 84 | } 85 | 86 | static int 87 | noop_test_decode () 88 | { 89 | th_info ti; 90 | th_dec_ctx *td; 91 | 92 | INFO ("+ Testing decoder context with null info and setup"); 93 | td = th_decode_alloc(NULL, NULL); 94 | if (td != NULL) 95 | FAIL("td_decode_alloc accepted null info pointers"); 96 | 97 | INFO ("+ Initializing th_info struct"); 98 | th_info_init (&ti); 99 | 100 | INFO ("+ Testing decoder context with empty info and null setup"); 101 | td = th_decode_alloc(&ti, NULL); 102 | if (td != NULL) 103 | FAIL("td_decode_alloc accepted null info pointers"); 104 | 105 | INFO ("+ Clearing th_info struct"); 106 | th_info_clear (&ti); 107 | 108 | return 0; 109 | } 110 | 111 | int main(int argc, char *argv[]) 112 | { 113 | noop_test_info (); 114 | 115 | noop_test_comments (); 116 | 117 | noop_test_encode (); 118 | 119 | noop_test_decode (); 120 | 121 | exit (0); 122 | } 123 | -------------------------------------------------------------------------------- /tests/noop_theora.c: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation https://www.xiph.org/ * 10 | * * 11 | ******************************************************************** 12 | 13 | function: routines for validating codec initialization 14 | 15 | ********************************************************************/ 16 | 17 | #include 18 | 19 | #include "tests.h" 20 | 21 | static int 22 | noop_test_encode () 23 | { 24 | theora_info ti; 25 | theora_state th; 26 | 27 | INFO ("+ Initializing theora_info struct"); 28 | theora_info_init (&ti); 29 | 30 | INFO ("+ Setting a 16x16 frame"); 31 | ti.width = 16; 32 | ti.height = 16; 33 | 34 | INFO ("+ Setting a 1:1 frame rate"); 35 | ti.fps_numerator = 1; 36 | ti.fps_denominator = 1; 37 | 38 | INFO ("+ Initializing theora_state for encoding"); 39 | if (theora_encode_init (&th, &ti) != OC_DISABLED) { 40 | INFO ("+ Clearing theora_state"); 41 | theora_clear (&th); 42 | } 43 | 44 | INFO ("+ Clearing theora_info struct"); 45 | theora_info_clear (&ti); 46 | 47 | return 0; 48 | } 49 | 50 | #if 0 51 | static int 52 | noop_test_decode () 53 | { 54 | theora_info ti; 55 | theora_state th; 56 | 57 | INFO ("+ Initializing theora_info struct"); 58 | theora_info_init (&ti); 59 | 60 | INFO ("+ Initializing theora_state for decoding"); 61 | theora_decode_init (&th, &ti); 62 | 63 | INFO ("+ Clearing theora_state"); 64 | theora_clear (&th); 65 | 66 | INFO ("+ Clearing theora_info struct"); 67 | theora_info_clear (&ti); 68 | 69 | return 0; 70 | } 71 | #endif 72 | 73 | static int 74 | noop_test_comments () 75 | { 76 | theora_comment tc; 77 | 78 | theora_comment_init (&tc); 79 | theora_comment_clear (&tc); 80 | 81 | return 0; 82 | } 83 | 84 | int main(int argc, char *argv[]) 85 | { 86 | /*noop_test_decode ();*/ 87 | 88 | noop_test_encode (); 89 | 90 | noop_test_comments (); 91 | 92 | exit (0); 93 | } 94 | -------------------------------------------------------------------------------- /tests/tests.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggTheora SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 * 9 | * by the Xiph.Org Foundation https://www.xiph.org/ * 10 | * * 11 | ******************************************************************** 12 | 13 | function: common test utilities 14 | 15 | ********************************************************************/ 16 | 17 | #include "config.h" 18 | 19 | #include 20 | #include 21 | 22 | #define INFO(str) \ 23 | { printf ("---- %s ...\n", (str)); } 24 | 25 | #define WARN(str) \ 26 | { printf ("%s:%d: warning: %s\n", __FILE__, __LINE__, (str)); } 27 | 28 | #define FAIL(str) \ 29 | { printf ("%s:%d: %s\n", __FILE__, __LINE__, (str)); exit(1); } 30 | 31 | #undef MIN 32 | #define MIN(a,b) ((a)<(b)?(a):(b)) 33 | -------------------------------------------------------------------------------- /theora-uninstalled.pc.in: -------------------------------------------------------------------------------- 1 | # theora uninstalled pkg-config file 2 | 3 | prefix= 4 | exec_prefix= 5 | libdir=${pcfiledir}/lib 6 | includedir=${pcfiledir}/include 7 | 8 | Name: theora uninstalled 9 | Description: Theora video codec (not installed) 10 | Version: @VERSION@ 11 | Requires: ogg >= @THEORA_LIBOGG_REQ_VERSION@ 12 | Conflicts: 13 | Libs: ${libdir}/libtheora.la 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /theora.pc.in: -------------------------------------------------------------------------------- 1 | # theora installed pkg-config file 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: theora 9 | Description: Theora video codec 10 | Version: @VERSION@ 11 | Requires: ogg >= @THEORA_LIBOGG_REQ_VERSION@ 12 | Conflicts: 13 | Libs: -L${libdir} -ltheora 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /theoradec-uninstalled.pc.in: -------------------------------------------------------------------------------- 1 | # theoradec uninstalled pkg-config file 2 | 3 | prefix= 4 | exec_prefix= 5 | libdir=${pcfiledir}/lib 6 | includedir=${pcfiledir}/include 7 | 8 | Name: theora uninstalled 9 | Description: Theora video codec(decoder) (not installed) 10 | Version: @VERSION@ 11 | Requires: ogg >= @THEORA_LIBOGG_REQ_VERSION@ 12 | Conflicts: 13 | Libs: ${libdir}/libtheoradec.la 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /theoradec.pc.in: -------------------------------------------------------------------------------- 1 | # theoradec installed pkg-config file 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: theora 9 | Description: Theora video codec (decoder) 10 | Version: @VERSION@ 11 | Requires: ogg >= @THEORA_LIBOGG_REQ_VERSION@ 12 | Conflicts: 13 | Libs: -L${libdir} -ltheoradec 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /theoraenc-uninstalled.pc.in: -------------------------------------------------------------------------------- 1 | # theoraenc uninstalled pkg-config file 2 | 3 | prefix= 4 | exec_prefix= 5 | libdir=${pcfiledir}/lib 6 | includedir=${pcfiledir}/include 7 | 8 | Name: theora uninstalled 9 | Description: Theora video codec (encoder) (not installed) 10 | Version: @VERSION@ 11 | Requires: theoradec, ogg >= @THEORA_LIBOGG_REQ_VERSION@ 12 | Conflicts: 13 | Libs: ${libdir}/libtheoraenc.la 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /theoraenc.pc.in: -------------------------------------------------------------------------------- 1 | # theoraenc installed pkg-config file 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | libdir=@libdir@ 6 | includedir=@includedir@ 7 | 8 | Name: theora 9 | Description: Theora video codec (encoder) 10 | Version: @VERSION@ 11 | Requires: theoradec, ogg >= @THEORA_LIBOGG_REQ_VERSION@ 12 | Conflicts: 13 | Libs: -L${libdir} -ltheoraenc 14 | Cflags: -I${includedir} 15 | -------------------------------------------------------------------------------- /win32/VS2005/README: -------------------------------------------------------------------------------- 1 | libtheora has libogg as a dependency, and for examples, also 2 | libvorbis, therefore you need to have libogg and libvorbis 3 | compiled beforehand. 4 | 5 | Lets say you have libogg, libvorbis and libtheora in the same directory: 6 | 7 | libogg-1.1.4 8 | libvorbis-1.2.2 9 | libtheora-1.0 10 | 11 | Because there is no automatic library detection you have to, 12 | either: 13 | 14 | 1. Rename libogg-1.1.4 to libogg, and libvorbis-1.2.2 to libvorbis. 15 | 16 | 2. Open libogg.vsprops with a text editor (even notepad.exe 17 | will suffice) and see if LIBOGG_VERSION is set to the correct 18 | version, in this case "1.1.4". 19 | 20 | The same procedure should be done for libvorbis.vsprops and 21 | check LIBVORBIS_VERSION for the correct version, in this 22 | case "1.2.2". 23 | -------------------------------------------------------------------------------- /win32/VS2005/libogg.vsprops: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 15 | 19 | 20 | -------------------------------------------------------------------------------- /win32/VS2005/libtheora_dynamic.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtheora", "libtheora\libtheora_dynamic.vcproj", "{653F3841-3F26-49B9-AFCF-091DB4B67031}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dump_video", "dump_video\dump_video_dynamic.vcproj", "{1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encoder_example", "encoder_example\encoder_example_dynamic.vcproj", "{AD710263-EBFA-4388-BAA9-AD73C32AFF26}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Debug|x64 = Debug|x64 14 | Release|Win32 = Release|Win32 15 | Release|x64 = Release|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|Win32.ActiveCfg = Debug|Win32 19 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|Win32.Build.0 = Debug|Win32 20 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|x64.ActiveCfg = Debug|x64 21 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|x64.Build.0 = Debug|x64 22 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|Win32.ActiveCfg = Release|Win32 23 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|Win32.Build.0 = Release|Win32 24 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|x64.ActiveCfg = Release|x64 25 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|x64.Build.0 = Release|x64 26 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|Win32.ActiveCfg = Debug|Win32 27 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|Win32.Build.0 = Debug|Win32 28 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|x64.ActiveCfg = Debug|x64 29 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|x64.Build.0 = Debug|x64 30 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|Win32.ActiveCfg = Release|Win32 31 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|Win32.Build.0 = Release|Win32 32 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|x64.ActiveCfg = Release|x64 33 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|x64.Build.0 = Release|x64 34 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|Win32.ActiveCfg = Debug|Win32 35 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|Win32.Build.0 = Debug|Win32 36 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|x64.ActiveCfg = Debug|x64 37 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|x64.Build.0 = Debug|x64 38 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|Win32.ActiveCfg = Release|Win32 39 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|Win32.Build.0 = Release|Win32 40 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|x64.ActiveCfg = Release|x64 41 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|x64.Build.0 = Release|x64 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /win32/VS2005/libtheora_static.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual Studio 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dump_video_static", "dump_video\dump_video_static.vcproj", "{1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtheora_static", "libtheora\libtheora_static.vcproj", "{653F3841-3F26-49B9-AFCF-091DB4B67031}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encoder_example_static", "encoder_example\encoder_example_static.vcproj", "{AD710263-EBFA-4388-BAA9-AD73C32AFF26}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Debug|x64 = Debug|x64 14 | Release|Win32 = Release|Win32 15 | Release|x64 = Release|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|Win32.ActiveCfg = Debug|Win32 19 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|Win32.Build.0 = Debug|Win32 20 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|x64.ActiveCfg = Debug|x64 21 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|x64.Build.0 = Debug|x64 22 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|Win32.ActiveCfg = Release|Win32 23 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|Win32.Build.0 = Release|Win32 24 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|x64.ActiveCfg = Release|x64 25 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|x64.Build.0 = Release|x64 26 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|Win32.ActiveCfg = Debug|Win32 27 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|Win32.Build.0 = Debug|Win32 28 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|x64.ActiveCfg = Debug|x64 29 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|x64.Build.0 = Debug|x64 30 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|Win32.ActiveCfg = Release|Win32 31 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|Win32.Build.0 = Release|Win32 32 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|x64.ActiveCfg = Release|x64 33 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|x64.Build.0 = Release|x64 34 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|Win32.ActiveCfg = Debug|Win32 35 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|Win32.Build.0 = Debug|Win32 36 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|x64.ActiveCfg = Debug|x64 37 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|x64.Build.0 = Debug|x64 38 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|Win32.ActiveCfg = Release|Win32 39 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|Win32.Build.0 = Release|Win32 40 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|x64.ActiveCfg = Release|x64 41 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|x64.Build.0 = Release|x64 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /win32/VS2005/libvorbis.vsprops: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 15 | 19 | 20 | -------------------------------------------------------------------------------- /win32/VS2008/README: -------------------------------------------------------------------------------- 1 | libtheora has libogg as a dependency, and for examples, also 2 | libvorbis, therefore you need to have libogg and libvorbis 3 | compiled beforehand. 4 | 5 | Lets say you have libogg, libvorbis and libtheora in the same directory: 6 | 7 | libogg-1.1.4 8 | libvorbis-1.2.2 9 | libtheora-1.0 10 | 11 | Because there is no automatic library detection you have to, 12 | either: 13 | 14 | 1. Rename libogg-1.1.4 to libogg, and libvorbis-1.2.2 to libvorbis. 15 | 16 | 2. Open libogg.vsprops with a text editor (even notepad.exe 17 | will suffice) and see if LIBOGG_VERSION is set to the correct 18 | version, in this case "1.1.4". 19 | 20 | The same procedure should be done for libvorbis.vsprops and 21 | check LIBVORBIS_VERSION for the correct version, in this 22 | case "1.2.2". 23 | -------------------------------------------------------------------------------- /win32/VS2008/libogg.vsprops: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 15 | 19 | 20 | -------------------------------------------------------------------------------- /win32/VS2008/libvorbis.vsprops: -------------------------------------------------------------------------------- 1 | 2 | 7 | 11 | 15 | 19 | 20 | -------------------------------------------------------------------------------- /win32/VS2010/README: -------------------------------------------------------------------------------- 1 | libtheora has libogg as a dependency, and for examples, also 2 | libvorbis, therefore you need to have libogg and libvorbis 3 | compiled beforehand. 4 | 5 | Lets say you have libogg, libvorbis and libtheora in the same directory: 6 | 7 | libogg-1.1.4 8 | libvorbis-1.2.2 9 | libtheora-1.0 10 | 11 | Because there is no automatic library detection you have to, 12 | either: 13 | 14 | 1. Rename libogg-1.1.4 to libogg, and libvorbis-1.2.2 to libvorbis. 15 | 16 | 2. Open libogg.props with a text editor (even notepad.exe 17 | will suffice) and see if LIBOGG_VERSION is set to the correct 18 | version, in this case "1.1.4". 19 | 20 | The same procedure should be done for libvorbis.props and 21 | check LIBVORBIS_VERSION for the correct version, in this 22 | case "1.2.2". 23 | -------------------------------------------------------------------------------- /win32/VS2010/libogg.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 1.2.0 5 | 6 | 7 | <_ProjectFileVersion>10.0.30319.1 8 | 9 | 10 | 11 | ..\..\..\..\libogg-$(LIBOGG_VERSION)\include;..\..\..\..\ogg\include;..\..\..\..\..\..\..\core\ogg\libogg\include;%(AdditionalIncludeDirectories) 12 | 13 | 14 | ..\..\..\..\libogg-$(LIBOGG_VERSION)\win32\VS2010\$(PlatformName)\$(ConfigurationName);..\..\..\..\ogg\win32\VS2010\$(PlatformName)\$(ConfigurationName);..\..\..\..\..\..\..\core\ogg\libogg\win32\VS2010\$(PlatformName)\$(ConfigurationName) 15 | 16 | 17 | 18 | 19 | $(LIBOGG_VERSION) 20 | 21 | 22 | -------------------------------------------------------------------------------- /win32/VS2010/libtheora_dynamic.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtheora_dynamic", "libtheora\libtheora_dynamic.vcxproj", "{653F3841-3F26-49B9-AFCF-091DB4B67031}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dump_video_dynamic", "dump_video\dump_video_dynamic.vcxproj", "{1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encoder_example_dynamic", "encoder_example\encoder_example_dynamic.vcxproj", "{AD710263-EBFA-4388-BAA9-AD73C32AFF26}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Debug|x64 = Debug|x64 14 | Release|Win32 = Release|Win32 15 | Release|x64 = Release|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|Win32.ActiveCfg = Debug|Win32 19 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|Win32.Build.0 = Debug|Win32 20 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|x64.ActiveCfg = Debug|x64 21 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|x64.Build.0 = Debug|x64 22 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|Win32.ActiveCfg = Release|Win32 23 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|Win32.Build.0 = Release|Win32 24 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|x64.ActiveCfg = Release|x64 25 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|x64.Build.0 = Release|x64 26 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|Win32.ActiveCfg = Debug|Win32 27 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|Win32.Build.0 = Debug|Win32 28 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|x64.ActiveCfg = Debug|x64 29 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|x64.Build.0 = Debug|x64 30 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|Win32.ActiveCfg = Release|Win32 31 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|Win32.Build.0 = Release|Win32 32 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|x64.ActiveCfg = Release|x64 33 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|x64.Build.0 = Release|x64 34 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|Win32.ActiveCfg = Debug|Win32 35 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|Win32.Build.0 = Debug|Win32 36 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|x64.ActiveCfg = Debug|x64 37 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|x64.Build.0 = Debug|x64 38 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|Win32.ActiveCfg = Release|Win32 39 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|Win32.Build.0 = Release|Win32 40 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|x64.ActiveCfg = Release|x64 41 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|x64.Build.0 = Release|x64 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /win32/VS2010/libtheora_static.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtheora_static", "libtheora\libtheora_static.vcxproj", "{653F3841-3F26-49B9-AFCF-091DB4B67031}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dump_video_static", "dump_video\dump_video_static.vcxproj", "{1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "encoder_example_static", "encoder_example\encoder_example_static.vcxproj", "{AD710263-EBFA-4388-BAA9-AD73C32AFF26}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Debug|x64 = Debug|x64 14 | Release|Win32 = Release|Win32 15 | Release|x64 = Release|x64 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|Win32.ActiveCfg = Debug|Win32 19 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|Win32.Build.0 = Debug|Win32 20 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|x64.ActiveCfg = Debug|x64 21 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Debug|x64.Build.0 = Debug|x64 22 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|Win32.ActiveCfg = Release|Win32 23 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|Win32.Build.0 = Release|Win32 24 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|x64.ActiveCfg = Release|x64 25 | {653F3841-3F26-49B9-AFCF-091DB4B67031}.Release|x64.Build.0 = Release|x64 26 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|Win32.ActiveCfg = Debug|Win32 27 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|Win32.Build.0 = Debug|Win32 28 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|x64.ActiveCfg = Debug|x64 29 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Debug|x64.Build.0 = Debug|x64 30 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|Win32.ActiveCfg = Release|Win32 31 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|Win32.Build.0 = Release|Win32 32 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|x64.ActiveCfg = Release|x64 33 | {1A8CA99D-B6C7-48CB-B263-6CECDADF5FBF}.Release|x64.Build.0 = Release|x64 34 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|Win32.ActiveCfg = Debug|Win32 35 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|Win32.Build.0 = Debug|Win32 36 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|x64.ActiveCfg = Debug|x64 37 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Debug|x64.Build.0 = Debug|x64 38 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|Win32.ActiveCfg = Release|Win32 39 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|Win32.Build.0 = Release|Win32 40 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|x64.ActiveCfg = Release|x64 41 | {AD710263-EBFA-4388-BAA9-AD73C32AFF26}.Release|x64.Build.0 = Release|x64 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /win32/VS2010/libvorbis.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 1.3.1 5 | 6 | 7 | <_ProjectFileVersion>10.0.30319.1 8 | 9 | 10 | 11 | ..\..\..\..\libvorbis-$(LIBVORBIS_VERSION)\include;..\..\..\..\vorbis\include;..\..\..\..\..\..\vorbis\libs\libvorbis\include;%(AdditionalIncludeDirectories) 12 | 13 | 14 | ..\..\..\..\libvorbis-$(LIBVORBIS_VERSION)\win32\VS2010\$(Platform)\$(Configuration);..\..\..\..\vorbis\win32\VS2010\$(Platform)\$(Configuration);..\..\..\..\..\..\vorbis\libs\libvorbis\win32\VS2010\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories) 15 | 16 | 17 | 18 | 19 | $(LIBVORBIS_VERSION) 20 | 21 | 22 | -------------------------------------------------------------------------------- /win32/build_theora_static.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo ---+++--- Building Theora (Static) ---+++--- 3 | 4 | if .%SRCROOT%==. set SRCROOT=D:\xiph 5 | 6 | set OLDPATH=%PATH% 7 | set OLDINCLUDE=%INCLUDE% 8 | set OLDLIB=%LIB% 9 | 10 | call "c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat" 11 | echo Setting include paths for Theora 12 | set INCLUDE=%INCLUDE%;%SRCROOT%\ogg\include;%SRCROOT%\theora\include 13 | echo Compiling... 14 | msdev theora_static.dsp /useenv /make "theora_static - Win32 Release" /rebuild 15 | 16 | set PATH=%OLDPATH% 17 | set INCLUDE=%OLDINCLUDE% 18 | set LIB=%OLDLIB% 19 | -------------------------------------------------------------------------------- /win32/build_theora_static_debug.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | echo ---+++--- Building Theora (Static) ---+++--- 3 | 4 | if .%SRCROOT%==. set SRCROOT=D:\xiph 5 | 6 | set OLDPATH=%PATH% 7 | set OLDINCLUDE=%INCLUDE% 8 | set OLDLIB=%LIB% 9 | 10 | call "c:\program files\microsoft visual studio\vc98\bin\vcvars32.bat" 11 | echo Setting include paths for Theora 12 | set INCLUDE=%INCLUDE%;%SRCROOT%\ogg\include;%SRCROOT%\theora\include 13 | echo Compiling... 14 | msdev theora_static.dsp /useenv /make "theora_static - Win32 Debug" /rebuild 15 | 16 | set PATH=%OLDPATH% 17 | set INCLUDE=%OLDINCLUDE% 18 | set LIB=%OLDLIB% 19 | -------------------------------------------------------------------------------- /win32/experimental/encoderwin/ReadMe.txt: -------------------------------------------------------------------------------- 1 | 05/30/03 2 | Updated to use the common encoder_sample.c source in theora/examples. 3 | 4 | 05/23/03 5 | 6 | Very simple port of the sample encoder for Windows, for testing. 7 | Encoder options in the command line are not working, and the frame rate 8 | of video needs to be set in code (like in the simple sample encoder.) 9 | 10 | This example will be updated to a true Win32 app sometime in the future, 11 | hope it is useful for basic testing now. 12 | 13 | mauricio@xiph.org -------------------------------------------------------------------------------- /win32/experimental/transcoder/avi2vp3/avi2vp3.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #ifdef _WIN32 4 | #include 5 | #else 6 | typedef long DWORD; 7 | #endif 8 | 9 | /*extremely crude app to dump vp3 frames from an avi file*/ 10 | /*filenames are hardcoded*/ 11 | 12 | #include "avilib.h" 13 | 14 | int main(int argc, const char **argv) 15 | { 16 | 17 | FILE * f = fopen("outfile.vp3", "wb"); 18 | 19 | char * buffer; 20 | int olength; 21 | int length; 22 | avi_t *avifile; 23 | int chunksize; 24 | int frame; 25 | int frames; 26 | int keyframegap = 0; 27 | int maxkeyframegap = 0; 28 | 29 | DWORD initialticks; 30 | 31 | int framew = 0; 32 | int frameh = 0; 33 | double framerate = 0.0f; 34 | double fps_numerator, fps_denominator; 35 | 36 | avifile = AVI_open_input_file("vp31.avi", 1); 37 | frames = AVI_video_frames(avifile); 38 | framew = AVI_video_width(avifile); 39 | frameh = AVI_video_height(avifile); 40 | framerate = AVI_frame_rate(avifile); 41 | chunksize = AVI_max_video_chunk(avifile); 42 | /* avilib only reports the max video chunk size if the file has an 43 | idx table. We fall back to an arbitrary limit otherwise. Better 44 | would be just to handle the chunks dynamically */ 45 | if (chunksize <= 0) chunksize = 131072; 46 | buffer = malloc(chunksize); 47 | printf("Frames(%d) Video(%dx%d) %3.2f fps\n",frames,framew, frameh,framerate); 48 | printf("Video Compressor: %s", AVI_video_compressor(avifile)); 49 | fps_denominator = 1000000.0F; 50 | fps_numerator = framerate * fps_denominator; 51 | 52 | sprintf(buffer,"AVI2VP31R W%d H%d F%.0f:%.0f Ip A0:0\n", framew, frameh, fps_numerator, fps_denominator); 53 | fwrite(buffer, strlen(buffer), 1, f); 54 | 55 | for (frame = 0; frame < frames;) { 56 | int keyframe; 57 | olength = length; 58 | length = AVI_frame_size(avifile, frame++); 59 | if( !length ) { 60 | length = olength; 61 | } 62 | AVI_read_frame(avifile, (char *) buffer, &keyframe); 63 | fwrite("FRAME\n", 6, 1, f); 64 | fwrite(&length, sizeof(int), 1, f); 65 | fwrite(&keyframe, sizeof(int), 1, f); 66 | printf("Frame size(%d) IsKeyframe(%d)\n", length, keyframe); 67 | fwrite(buffer, 1, length, f); 68 | if (!keyframe){ 69 | keyframegap++; 70 | } else { 71 | if (keyframegap>maxkeyframegap) maxkeyframegap=keyframegap; 72 | keyframegap = 0; 73 | } 74 | } 75 | 76 | fclose(f); 77 | printf("Max keyframegap (%d)\n", maxkeyframegap); 78 | 79 | free(buffer); 80 | 81 | exit(0); 82 | } 83 | -------------------------------------------------------------------------------- /win32/experimental/transcoder/avi2vp3/avilib.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiph/theora/b167cb4a3e3e2d3239d71f0ca2cbc25af4f2183c/win32/experimental/transcoder/avi2vp3/avilib.c -------------------------------------------------------------------------------- /win32/experimental/transcoder/avi2vp3/avilib.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiph/theora/b167cb4a3e3e2d3239d71f0ca2cbc25af4f2183c/win32/experimental/transcoder/avi2vp3/avilib.h -------------------------------------------------------------------------------- /win32/experimental/transcoder/avi2vp3/outfile.vp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiph/theora/b167cb4a3e3e2d3239d71f0ca2cbc25af4f2183c/win32/experimental/transcoder/avi2vp3/outfile.vp3 -------------------------------------------------------------------------------- /win32/experimental/transcoder/avi2vp3/vp31.avi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiph/theora/b167cb4a3e3e2d3239d71f0ca2cbc25af4f2183c/win32/experimental/transcoder/avi2vp3/vp31.avi -------------------------------------------------------------------------------- /win32/experimental/transcoder/readme.txt: -------------------------------------------------------------------------------- 1 | Quick hack at a transcoder tool from VP3 to Theora 2 | 3 | I actually built the avi2vp3 tool with codeWarrior, but it should compile under 4 | VC as well. I have included a source avi file and the converted .vp3 output. 5 | Output is a file with some header info matching YUVMPEG, and for each frame: 6 | 7 | FRAME header block matching YUV2MPEG 8 | long (Intel aligned) keyframeflag describing in frame is a keyframe 9 | long (Intel aligned) fsize storing frame size in bytes 10 | bytes[fsize] with binary frame data 11 | 12 | The transcode tool is a modification of the current encoder. PUt it into the 13 | win32/experimental subdirectory, and the paths should be correct. It produces 14 | an apparently valid theora stream, but outputs garbage data. The code is packing 15 | the binary frame data in a way that SHOULD work at least imo, but I am probably 16 | missing some initialization issue (or vp3 is not transcodable to theora). 17 | 18 | -------------------------------------------------------------------------------- /win32/experimental/wincompat/README.txt: -------------------------------------------------------------------------------- 1 | GetOpt routines ported from BSD-licensed sources, see comments. -------------------------------------------------------------------------------- /win32/experimental/wincompat/getopt.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: getopt.h,v 1.4 2000/07/07 10:43:54 ad Exp $ */ 2 | /* $FreeBSD: src/include/getopt.h,v 1.1 2002/09/29 04:14:30 eric Exp $ */ 3 | 4 | /*- 5 | * Copyright (c) 2000 The NetBSD Foundation, Inc. 6 | * All rights reserved. 7 | * 8 | * This code is derived from software contributed to The NetBSD Foundation 9 | * by Dieter Baron and Thomas Klausner. 10 | * 11 | * Redistribution and use in source and binary forms, with or without 12 | * modification, are permitted provided that the following conditions 13 | * are met: 14 | * 1. Redistributions of source code must retain the above copyright 15 | * notice, this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in the 18 | * documentation and/or other materials provided with the distribution. 19 | * 3. All advertising materials mentioning features or use of this software 20 | * must display the following acknowledgement: 21 | * This product includes software developed by the NetBSD 22 | * Foundation, Inc. and its contributors. 23 | * 4. Neither the name of The NetBSD Foundation nor the names of its 24 | * contributors may be used to endorse or promote products derived 25 | * from this software without specific prior written permission. 26 | * 27 | * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 28 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 29 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 30 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 31 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 32 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 33 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 35 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 36 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37 | * POSSIBILITY OF SUCH DAMAGE. 38 | */ 39 | 40 | #ifndef _GETOPT_H_ 41 | #define _GETOPT_H_ 42 | 43 | #ifdef _WIN32 44 | /* from */ 45 | # ifdef __cplusplus 46 | # define __BEGIN_DECLS extern "C" { 47 | # define __END_DECLS } 48 | # else 49 | # define __BEGIN_DECLS 50 | # define __END_DECLS 51 | # endif 52 | # define __P(args) args 53 | #endif 54 | 55 | /*#ifndef _WIN32 56 | #include 57 | #include 58 | #endif*/ 59 | 60 | #ifdef _WIN32 61 | # if !defined(GETOPT_API) 62 | # define GETOPT_API __declspec(dllimport) 63 | # endif 64 | #endif 65 | 66 | /* 67 | * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions 68 | */ 69 | #if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) 70 | #define no_argument 0 71 | #define required_argument 1 72 | #define optional_argument 2 73 | 74 | struct option { 75 | /* name of long option */ 76 | const char *name; 77 | /* 78 | * one of no_argument, required_argument, and optional_argument: 79 | * whether option takes an argument 80 | */ 81 | int has_arg; 82 | /* if not NULL, set *flag to val when option found */ 83 | int *flag; 84 | /* if flag not NULL, value to set *flag to; else return value */ 85 | int val; 86 | }; 87 | 88 | __BEGIN_DECLS 89 | GETOPT_API int getopt_long __P((int, char * const *, const char *, 90 | const struct option *, int *)); 91 | __END_DECLS 92 | #endif 93 | 94 | #ifdef _WIN32 95 | /* These are global getopt variables */ 96 | __BEGIN_DECLS 97 | 98 | GETOPT_API extern int opterr, /* if error message should be printed */ 99 | optind, /* index into parent argv vector */ 100 | optopt, /* character checked for validity */ 101 | optreset; /* reset getopt */ 102 | GETOPT_API extern char* optarg; /* argument associated with option */ 103 | 104 | /* Original getopt */ 105 | GETOPT_API int getopt __P((int, char * const *, const char *)); 106 | 107 | __END_DECLS 108 | #endif 109 | 110 | #endif /* !_GETOPT_H_ */ 111 | -------------------------------------------------------------------------------- /win32/experimental/wincompat/unistd.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiph/theora/b167cb4a3e3e2d3239d71f0ca2cbc25af4f2183c/win32/experimental/wincompat/unistd.h -------------------------------------------------------------------------------- /win32/xmingw32/libtheoradec-all.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | ; Old alpha API 3 | theora_version_string @ 1 4 | theora_version_number @ 2 5 | 6 | theora_decode_header @ 3 7 | theora_decode_init @ 4 8 | theora_decode_packetin @ 5 9 | theora_decode_YUVout @ 6 10 | 11 | theora_control @ 7 12 | 13 | theora_packet_isheader @ 8 14 | theora_packet_iskeyframe @ 9 15 | 16 | theora_granule_shift @ 10 17 | theora_granule_frame @ 11 18 | theora_granule_time @ 12 19 | 20 | theora_info_init @ 13 21 | theora_info_clear @ 14 22 | 23 | theora_clear @ 15 24 | 25 | theora_comment_init @ 16 26 | theora_comment_add @ 17 27 | theora_comment_add_tag @ 18 28 | theora_comment_query @ 19 29 | theora_comment_query_count @ 20 30 | theora_comment_clear @ 21 31 | 32 | ; New theora-exp API 33 | th_version_string @ 22 34 | th_version_number @ 23 35 | 36 | th_decode_headerin @ 24 37 | th_decode_alloc @ 25 38 | th_setup_free @ 26 39 | th_decode_ctl @ 27 40 | th_decode_packetin @ 28 41 | th_decode_ycbcr_out @ 29 42 | th_decode_free @ 30 43 | 44 | th_packet_isheader @ 31 45 | th_packet_iskeyframe @ 32 46 | 47 | th_granule_frame @ 33 48 | th_granule_time @ 34 49 | 50 | th_info_init @ 35 51 | th_info_clear @ 36 52 | 53 | th_comment_init @ 37 54 | th_comment_add @ 38 55 | th_comment_add_tag @ 39 56 | th_comment_query @ 40 57 | th_comment_query_count @ 41 58 | th_comment_clear @ 42 59 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoradec-all.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /*See "VERSIONINFO Resource" in MSDN, 4 | https://msdn2.microsoft.com/en-us/library/Aa381058.aspx */ 5 | VS_VERSION_INFO VERSIONINFO 6 | FILEVERSION TH_VERSION_FIELD 7 | PRODUCTVERSION TH_VERSION_FIELD 8 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 9 | #if defined(_DEBUG) 10 | FILEFLAGS VS_FF_DEBUG 11 | #else 12 | FILEFLAGS 0 13 | #endif 14 | FILEOS VOS__WINDOWS32 15 | FILETYPE VFT_DLL 16 | FILESUBTYPE 0 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | /*0x040904B0 == US English, Unicode*/ 21 | BLOCK "0x040904B0" 22 | BEGIN 23 | VALUE "Comments","Xiph.Org " TH_DEC_INTERNAL_NAME ".dll" 24 | VALUE "CompanyName","The Xiph.Org Foundation" 25 | VALUE "FileDescription","Xiph.Org Theora Decoder Library" 26 | VALUE "FileVersion",TH_VERSION_STRING 27 | VALUE "InternalName",TH_DEC_INTERNAL_NAME 28 | VALUE "LegalCopyright","Copyright (C) 2002-2007 Xiph.Org Foundation" 29 | VALUE "OriginalFilename",TH_DEC_INTERNAL_NAME ".dll" 30 | VALUE "ProductName","libtheora" 31 | VALUE "ProductVersion",TH_VERSION_STRING 32 | END 33 | END 34 | BLOCK "VarFileInfo" 35 | BEGIN 36 | /*0x0409, 1200 == US English, Unicode*/ 37 | VALUE "Translation",0x0409,1200 38 | END 39 | END 40 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoradec.rc: -------------------------------------------------------------------------------- 1 | #define TH_DEC_INTERNAL_NAME "libtheoradec" 2 | #undef _DEBUG 3 | #include "libtheoradec-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoradec70.rc: -------------------------------------------------------------------------------- 1 | #define TH_DEC_INTERNAL_NAME "libtheoradec70" 2 | #undef _DEBUG 3 | #include "libtheoradec-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoradec70d.rc: -------------------------------------------------------------------------------- 1 | #define TH_DEC_INTERNAL_NAME "libtheoradec70d" 2 | #define _DEBUG (1) 3 | #include "libtheoradec-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoradec71.rc: -------------------------------------------------------------------------------- 1 | #define TH_DEC_INTERNAL_NAME "libtheoradec71" 2 | #undef _DEBUG 3 | #include "libtheoradec-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoradec71d.rc: -------------------------------------------------------------------------------- 1 | #define TH_DEC_INTERNAL_NAME "libtheoradec71d" 2 | #define _DEBUG (1) 3 | #include "libtheoradec-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoradec80.rc: -------------------------------------------------------------------------------- 1 | #define TH_DEC_INTERNAL_NAME "libtheoradec80" 2 | #undef _DEBUG 3 | #include "libtheoradec-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoradec80d.rc: -------------------------------------------------------------------------------- 1 | #define TH_DEC_INTERNAL_NAME "libtheoradec80d" 2 | #define _DEBUG (1) 3 | #include "libtheoradec-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoradecd.rc: -------------------------------------------------------------------------------- 1 | #define TH_DEC_INTERNAL_NAME "libtheoradecd" 2 | #define _DEBUG (1) 3 | #include "libtheoradec-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoraenc-all.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | ; Old alpha API 3 | theora_encode_init @ 1 4 | theora_encode_YUVin @ 2 5 | theora_encode_packetout @ 3 6 | theora_encode_header @ 4 7 | theora_encode_comment @ 5 8 | theora_encode_tables @ 6 9 | ; New theora-exp API 10 | th_encode_alloc @ 7 11 | th_encode_ctl @ 8 12 | th_encode_flushheader @ 9 13 | th_encode_ycbcr_in @ 10 14 | th_encode_packetout @ 11 15 | th_encode_free @ 12 16 | TH_VP31_QUANT_INFO @ 13 17 | TH_VP31_HUFF_CODES @ 14 18 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoraenc-all.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /*See "VERSIONINFO Resource" in MSDN, 4 | https://msdn2.microsoft.com/en-us/library/Aa381058.aspx */ 5 | VS_VERSION_INFO VERSIONINFO 6 | FILEVERSION TH_VERSION_FIELD 7 | PRODUCTVERSION TH_VERSION_FIELD 8 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 9 | #if defined(_DEBUG) 10 | FILEFLAGS VS_FF_DEBUG 11 | #else 12 | FILEFLAGS 0 13 | #endif 14 | FILEOS VOS__WINDOWS32 15 | FILETYPE VFT_DLL 16 | FILESUBTYPE 0 17 | BEGIN 18 | BLOCK "StringFileInfo" 19 | BEGIN 20 | /*0x040904B0 == US English, Unicode*/ 21 | BLOCK "0x040904B0" 22 | BEGIN 23 | VALUE "Comments","Xiph.Org " TH_ENC_INTERNAL_NAME ".dll" 24 | VALUE "CompanyName","The Xiph.Org Foundation" 25 | VALUE "FileDescription","Xiph.Org Theora Encoder Library" 26 | VALUE "FileVersion",TH_VERSION_STRING 27 | VALUE "InternalName",TH_ENC_INTERNAL_NAME 28 | VALUE "LegalCopyright","Copyright (C) 2002-2007 Xiph.Org Foundation" 29 | VALUE "OriginalFilename",TH_ENC_INTERNAL_NAME ".dll" 30 | VALUE "ProductName","libtheora" 31 | VALUE "ProductVersion",TH_VERSION_STRING 32 | END 33 | END 34 | BLOCK "VarFileInfo" 35 | BEGIN 36 | /*0x0409, 1200 == US English, Unicode*/ 37 | VALUE "Translation",0x0409,1200 38 | END 39 | END 40 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoraenc.rc: -------------------------------------------------------------------------------- 1 | #define TH_ENC_INTERNAL_NAME "libtheoraenc" 2 | #undef _DEBUG 3 | #include "libtheoraenc-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoraenc70.rc: -------------------------------------------------------------------------------- 1 | #define TH_ENC_INTERNAL_NAME "libtheoraenc70" 2 | #undef _DEBUG 3 | #include "libtheoraenc-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoraenc70d.rc: -------------------------------------------------------------------------------- 1 | #define TH_ENC_INTERNAL_NAME "libtheoraenc70d" 2 | #define _DEBUG (1) 3 | #include "libtheoraenc-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoraenc71.rc: -------------------------------------------------------------------------------- 1 | #define TH_ENC_INTERNAL_NAME "libtheoraenc71" 2 | #undef _DEBUG 3 | #include "libtheoraenc-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoraenc71d.rc: -------------------------------------------------------------------------------- 1 | #define TH_ENC_INTERNAL_NAME "libtheoraenc71d" 2 | #define _DEBUG (1) 3 | #include "libtheoraenc-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoraenc80.rc: -------------------------------------------------------------------------------- 1 | #define TH_ENC_INTERNAL_NAME "libtheoraenc80" 2 | #undef _DEBUG 3 | #include "libtheoraenc-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoraenc80d.rc: -------------------------------------------------------------------------------- 1 | #define TH_ENC_INTERNAL_NAME "libtheoraenc80d" 2 | #define _DEBUG (1) 3 | #include "libtheoraenc-all.rc" 4 | -------------------------------------------------------------------------------- /win32/xmingw32/libtheoraencd.rc: -------------------------------------------------------------------------------- 1 | #define TH_ENC_INTERNAL_NAME "libtheoraencd" 2 | #define _DEBUG (1) 3 | #include "libtheoraenc-all.rc" 4 | --------------------------------------------------------------------------------