Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • xiph/theora
  • tmatth/theora
  • zfigura/theora
  • manx/theora
  • fabio/theora
5 results
Show changes
Commits on Source (728)
Monty <monty@xiph.org>
- Original VP3 port
Ralph Giles
Timothy B. Terriberry
Monty
- Ongoing development
Dan B. Miller
- Pre alpha3 development
Rudolf Marek
Wim Tayman
Dan Lenski
Nils Pipenbrinck
Monty
- MMX optimized functions
Aaron Colwell
Thomas Vander Stichele
Jan Gerber
Conrad Parker
Cristian Adam
Sebastian Pippin
Simon Hosie
- Bug fixes, enhancements, build systems.
Mauricio Piacentini
- Original win32 projects and example ports
- VP3->Theora transcoder
Silvia Pfeiffer
- Figures for the spec
Michael Smith
Andre Pang
calc
Chris Cheney
Brendan Cully
Edward Hervey
Adam Moss
Colin Ward
Jeremy C. Reed
Arc Riley
Rodolphe Ortalo
- Bug fixes
and other Xiph.org contributors
libtheora 1.1.1 (2009 October 1)
- Fix problems with MSVC inline assembly
- Add the missing encoder_disabled.c to the distribution
- build updates: autogen.sh should work better after switching systems
and the MSVC project now defaults to the dynamic runtime library
- Namespace some variables to avoid conflicts on wince.
libtheora 1.1.0 (2009 September 24)
- Fix various small issues with the example and telemetry code
- Fix handing a zero-byte packet as the first frame
- Documentation cleanup
- Two minor build fixes
libtheora 1.1beta3 (2009 August 22)
- Rate control fixes to smooth quality
- MSVC build now exports all of the 1.0 api
- Assorted small bug fixes
libtheora 1.1beta2 (2009 August 12)
- Fix a rate control problem with difficult input
- Build fixes for OpenBSD and Apple Xcode
- Examples now all use the 1.0 api
- TH_ENCCTL_SET_SPLEVEL works again
- Various bug fixes and source tree rearrangement
libtheora 1.1beta1 (2009 August 5)
- Support for two-pass encoding
- Performance optimization of both encoder and decoder
- Encoder supports dynamic adjustment of quality and
bitrate targets
- Encoder is generally more configurable, and all
rate control modes perform better
- Encoder now accepts 4:2:2 and 4:4:4 chroma sampling
- Decoder telemetry output shows quantization choice
and a breakdown of bitrate usage in the frame
- MSVC assembly optimizations up to date and functional
libtheora 1.1alpha2 (2009 May 26)
- Reduce lambda for small quantizers.
- New encoder fDCT does better on smooth gradients
- Use SATD for mode decisions (1-2% bitrate reduction)
- Assembly rewrite for new features and general speed up
- Share code between the encoder and decoder for performance
- Fix 4:2:2 decoding and telemetry
- MSVC project files updated, but assembly is disabled.
- New configure option --disable-spec to work around toolchain
detection failures.
- Limit symbol exports on MacOS X.
- Port remaining unit tests from the 1.0 release.
libtheora 1.1alpha1 (2009 March 27)
- Encoder rewrite with much improved vbr quality/bitrate and
better tracking of the target rate in cbr mode.
- MSVC project files do not work in this release.
libtheora 1.0 (2008 November 3)
- Merge x86 assembly for forward DCT from Thusnelda branch.
- Update 32 bit MMX with loop filter fix.
- Check for an uninitialized state before dereferencing in propagating
decode calls.
- Remove all TH_DEBUG statements.
- Rename the bitpacker source files copied from libogg to avoid
confusing simple build systems using both libraries.
- Declare bitfield entries to be explicitly signed for Solaris cc.
- Set quantization parameters to default values when an empty buffer is
passed with TH_ENCCTL_SET_QUANT_PARAMS.
- Split encoder and decoder tests depending on configure settings.
- Return lstylex.sty to the distribution.
- Disable inline assembly on gcc versions prior to 3.1.
- Remove extern references for OC_*_QUANT_MIN.
- Make various data tables static const so they can be read-only.
- Remove ENCCTL codes from the old encoder API.
- Implement TH_ENCCTL_SET_KEYFRAME_FREQUENCY_FORCE ctl.
- Fix segfault when exactly one of the width or height is not a multiple
of 16, but the other is.
- Compute the correct vertical offset for chroma.
- cpuid assembly fix for MSVC.
- Add VS2008 project files.
- Build updates for 64-bit platforms, Mingw32, VS and XCode.
- Do not clobber the cropping rectangle.
- Declare ourselves 1.0final to pkg-config to sort after beta releases.
- Fix the scons build to include asm in libtheoradec/enc.
libtheora 1.0beta3 (2008 April 16)
- Build new libtheoradec and libtheoraenc libraries
supporting the new API from theora-exp. This API should
not be considered stable yet.
- Change granule_frame() to return an index as documented.
This is a change of behaviour from 1.0beta1.
- Document that granule_time() returns the end of the
presentation interval.
- Use a custom copy of the libogg bitpacker in the decoder
to avoid function call overhead.
- MMX code improved and ported to MSVC.
- Fix a problem with the MMX code on SELinux.
- Fix a problem with decoder quantizer initialization.
- Fix a page queue problem with png2theora.
- Improved robustness.
- Updated VS2005 project files.
- Dropped build support for Microsoft VS2003.
- Dropped build support for the unreleased libogg2.
- Added the specification to the autotools build.
- Specification corrections.
libtheora 1.0beta2 (2007 October 12)
- Fix a crash bug on char-is-unsigned architectures (PowerPC)
- Fix a buffer sizing issue that caused rare encoder crashes
- Fix a buffer alignment issue
- Build fixes for MingW32, MSVC
- Improved format documentation.
libtheora 1.0beta1 (2007 September 22)
- Granulepos scheme modified to match other codecs. This bumps
the bitstream revision to 3.2.1. Bitstreams marked 3.2.0 are
handled correctly by this decoder. Older decoders will show
a one frame sync error in the less noticable direction.
libtheora 1.0alpha8 (2007 September 18)
- Switch to new spec compliant decoder from theora-exp branch.
Written by Dr. Timothy Terriberry.
- Add support to the encoder for using quantization settings
provided by the application.
- more assembly optimizations
libtheora 1.0alpha7 (2006 June 20)
- Enable mmx assembly by default
- Avoid some relocations that caused problems on SELinux
- Other build fixes
- time testing mode (-f) for the dump_video example
libtheora 1.0alpha6 (2006 May 30)
* Merge theora-mmx simd acceleration (x86_32 and x86_64)
* Major RTP payload specification update
* Minor format specification updates
* Fix some spurious calls to free() instead of _ogg_free()
* Fix invalid array indexing in PixelLineSearch()
* Improve robustness against invalid input
* General warning cleanup
* The offset_y member now means what every application thought it meant
(offset from the top). This will mean some old files (those with a
non-centered image created with a buggy encoder) will display differently.
libtheora 1.0alpha5 (2005 August 20)
* Fixed bitrate management bugs that caused popping and encode
errors
* Fixed a crash problem with the theora_state internals not
being intialized properly.
* new utility function:
- theora_granule_shift()
* dump_video example now makes YUV4MPEG files by default, so
the results can be fed back to encoder_example and similar
tools. The old behavior is restored through the '-r' switch.
* ./configure now prints a summary
* simple unit test of the comment api under 'make check'
* misc code cleanup, warning and leak fixes
libtheora 1.0alpha4 (2004 December 15)
* first draft of the Theora I Format Specification
* API documentation generated from theora.h with Doxygen
* fix a double-update bug in the motion analysis
* apply the loop filter before filling motion vector border
in the reference frame
* new utility functions:
- theora_packet_isheader(),
- theora_packet_iskeyframe()
- theora_granule_frame()
* optional support for building without floating point
* optional support for building without encode support
* various build and packaging fixes
* pkg-config support
* SymbianOS build support
libtheora 1.0alpha3 (2004 March 20)
UPDATE: on 2004 July 1 the Theora I bitstream format was frozen. Files
produced by the libtheora 1.0alpha3 reference encoder will always be
decodable by the Theora I spec.
* Bitstream info header FORMAT CHANGES:
- move the granulepos shift field to maintain byte alignment longer.
- reserve 5 additional bits for subsampling and interlace flags.
* Bitstream setup header FORMAT CHANGES:
- support for a range of interpolated quant matricies.
- include the in-loop block filter coeff.
* Bitsteam data packet FORMAT CHANGES:
- Reserve a bit for per-block Q index selection.
- Flip the coded image orientation for compatibility with VP3.
This allows lossless transcoding of VP3 content, but files
encoded with earlier theora releases would play upside down.
* example VP3 lossless transcoder
* optional support for libogg2
* timing improvements in the example player
* packaging and build system updates and fixes
libtheora 1.0alpha2 (2003 June 9)
* bitstream FORMAT CHANGES:
- store the quant tables in a third setup header for
future encoder flexibility
- store the huffman tables in the third setup header
- add a field for marking the colorspace to the info header
- add crop parameters for non-multiple-of-16 frame sizes
- add a second vorbiscomment-style metadata header
* API changes to handle multiple headers with a single
theora_decode_header() call, like libvorbis
* code cleanup and minor fixes
* new dump_video code example/utility
* experimental win32 code examples
libtheora 1.0alpha1 (2002 September 25)
* First release of the theora reference implementation
* Port of the newly opened VP3 code to the Ogg container
* Rewrite of the code for portability and to use the libogg bitpacker
Copyright (C) 2002-2009 Xiph.org Foundation
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Please see the file COPYING for the copyright license for this software.
In addition to and irrespective of the copyright license associated
with this software, On2 Technologies, Inc. makes the following statement
regarding technology used in this software:
On2 represents and warrants that it shall not assert any rights
relating to infringement of On2's registered patents, nor initiate
any litigation asserting such rights, against any person who, or
entity which utilizes the On2 VP3 Codec Software, including any
use, distribution, and sale of said Software; which make changes,
modifications, and improvements in said Software; and to use,
distribute, and sell said changes as well as applications for other
fields of use.
This reference implementation is originally derived from the On2 VP3
Codec Software, and the Theora video format is essentially compatible
with the VP3 video format, consisting of a backward-compatible superset.
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = foreign 1.6 dist-zip dist-bzip2
if THEORA_ENABLE_EXAMPLES
EXAMPLES_DIR = examples
else
EXAMPLES_DIR =
endif
SUBDIRS = lib include doc tests m4 $(EXAMPLES_DIR)
# we include the whole debian/ dir in EXTRA_DIST because there's a problem
# with autotools and HFS+ MacOSX file systems that caused debian/Makefile.am
# to pick up on the lowercase changelog file and add ChangeLog to DIST_COMMON
# because of it, breaking make dist. This works just as well.
EXTRA_DIST = \
README CHANGES COPYING LICENSE \
autogen.sh win32 macosx symbian SConstruct \
libtheora.spec libtheora.spec.in \
theora-uninstalled.pc.in
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = theora.pc theoradec.pc theoraenc.pc
# Remove the .svn folders included in the tarball
dist-hook:
find $(distdir) -type d -name '.svn' | xargs rm -rf
debug:
$(MAKE) all CFLAGS="@DEBUG@"
profile:
$(MAKE) all CFLAGS="@PROFILE@"
-------------------------------------------------------------------------
The Xiph.org Foundation's libtheora 1.1
-------------------------------------------------------------------------
*** What is Theora?
Theora is Xiph.Org's first publicly released video codec, intended
for use within the Foundation's Ogg multimedia streaming system.
Theora is derived directly from On2's VP3 codec, adds new features
while allow it a longer useful lifetime as an competitive codec.
The 1.0 release decoder supported all the new features, but the
encoder is nearly identical to the VP3 code.
The 1.1 release features a completely rewritten encoder, offering
better performance and compression, and making more complete use
of the format's feature set. Files produced by both encoders can
be decoded by either release.
*** Where is Theora?
Theora's main site is www.theora.org. Theora and related libraries
can be gotten from www.theora.org or the main Xiph.Org site at
www.xiph.org. Development source is kept in an open subversion
repository, see http://theora.org/svn/ for instructions.
-------------------------------------------------------------------------
Getting started with the code
-------------------------------------------------------------------------
*** What do I need to build the source?
Requirements summary:
For libtheora:
libogg 1.1 or newer.
For example encoder:
as above,
libvorbis and libvorbisenc 1.0.1 or newer.
For creating a source distribution package:
as above,
Doxygen to build the API documentation,
pdflatex and fig2dev to build the format specification
(transfig package in Ubuntu).
For the player only:
as above,
SDL (Simple Direct media Layer) libraries and headers,
OSS audio driver and development headers.
The provided build system is the GNU automake/autoconf system, and
the main library, libtheora, should already build smoothly on any
system. Failure of libtheora to build on a GNU-enabled system is
considered a bug; please report problems to theora-dev@xiph.org.
Windows build support is included in the win32 directory.
Project files for Apple XCode are included in the macosx directory.
There is also an experimental scons build.
*** How do I use the sample encoder?
The sample encoder takes raw video in YUV4MPEG2 format, as used by
lavtools, mjpeg-tools and other packages. The encoder expects audio,
if any, in a separate wave WAV file. Try 'encoder_example -h' for a
complete list of options.
An easy way to get raw video and audio files is to use MPlayer as an
export utility. The options " -ao pcm -vo yuv4mpeg " will export a
wav file named audiodump.wav and a YUV video file in the correct
format for encoder_example as stream.yuv. Be careful when exporting
video alone; MPlayer may drop frames to 'keep up' with the audio
timer. The example encoder can't properly synchronize input audio and
video file that aren't in sync to begin with.
The encoder will also take video or audio on stdin if '-' is specified
as the input file name.
There is also a 'png2theora' example which accepts a set of image
files in that format.
*** How do I use the sample player?
The sample player takes an Ogg file on standard in; the file may be
audio alone, video alone or video with audio.
*** What other tools are available?
The programs in the examples directory are intended as tutorial source
for developers using the library. As such they sacrifice features and
robustness in the interests of comprehension and should not be
considered serious applications.
If you're wanting to just use theora, consider the programs linked
from http://www.theora.org/. There is playback support in a number
of common free players, and plugins for major media frameworks.
Jan Gerber's ffmpeg2theora is an excellent encoding front end.
-------------------------------------------------------------------------
Troubleshooting the build process
-------------------------------------------------------------------------
*** Compile error, such as:
encoder_internal.h:664: parse error before `ogg_uint16_t'
This means you have version of libogg prior to 1.1. A *complete* new Ogg
install, libs and headers is needed.
Also be sure that there aren't multiple copies of Ogg installed in
/usr and /usr/local; an older one might be first on the search path
for libs and headers.
*** Link error, such as:
undefined reference to `oggpackB_stream'
See above; you need libogg 1.1 or later.
*** Link error, such as:
undefined reference to `vorbis_granule_time'
You need libvorbis and libvorbisenc from the 1.0.1 release or later.
*** Link error, such as:
/usr/lib/libSDL.a(SDL_esdaudio.lo): In function `ESD_OpenAudio':
SDL_esdaudio.lo(.text+0x25d): undefined reference to `esd_play_stream'
Be sure to use an SDL that's built to work with OSS. If you use an
SDL that is also built with ESD and/or ALSA support, it will try to
suck in all those extra libraries at link time too. That will only
work if the extra libraries are also installed.
*** Link warning, such as:
libtool: link: warning: library `/usr/lib/libogg.la' was moved.
libtool: link: warning: library `/usr/lib/libogg.la' was moved.
Re-run theora/autogen.sh after an Ogg or Vorbis rebuild/reinstall
# see http://www.scons.org if you do not have this tool
from os.path import join
import SCons
# TODO: should use lamda and map to work on python 1.5
def path(prefix, list): return [join(prefix, x) for x in list]
encoder_sources = """
apiwrapper.c
fragment.c
idct.c
internal.c
state.c
quant.c
analyze.c
encfrag.c
encapiwrapper.c
encinfo.c
encode.c
enquant.c
fdct.c
huffenc.c
mathops.c
mcenc.c
rate.c
tokenize.c
"""
decoder_sources = """
apiwrapper.c
bitpack.c
decapiwrapper.c
decinfo.c
decode.c
dequant.c
fragment.c
huffdec.c
idct.c
info.c
internal.c
quant.c
state.c
"""
env = Environment()
if env['CC'] == 'gcc':
env.Append(CCFLAGS=["-g", "-O2", "-Wall", "-Wno-parentheses"])
def CheckPKGConfig(context, version):
context.Message( 'Checking for pkg-config... ' )
ret = context.TryAction('pkg-config --atleast-pkgconfig-version=%s' % version)[0]
context.Result( ret )
return ret
def CheckPKG(context, name):
context.Message( 'Checking for %s... ' % name )
ret = context.TryAction('pkg-config --exists %s' % name)[0]
context.Result( ret )
return ret
def CheckSDL(context):
name = "sdl-config"
context.Message( 'Checking for %s... ' % name )
ret = SCons.Util.WhereIs('sdl-config')
context.Result( ret )
return ret
# check for appropriate inline asm support
host_x86_32_test = """
int main(int argc, char **argv) {
#if !defined(__i386__)
#error not an x86 host: preprocessor macro __i386__ not defined
#endif
return 0;
}
"""
def CheckHost_x86_32(context):
context.Message('Checking for an x86 host...')
result = context.TryCompile(host_x86_32_test, '.c')
context.Result(result)
return result
host_x86_64_test = """
int main(int argc, char **argv) {
#if !defined(__x86_64__)
#error not an x86_64 host: preprocessor macro __x86_64__ not defined
#endif
return 0;
}
"""
def CheckHost_x86_64(context):
context.Message('Checking for an x86_64 host...')
result = context.TryCompile(host_x86_64_test, '.c')
context.Result(result)
return result
conf = Configure(env, custom_tests = {
'CheckPKGConfig' : CheckPKGConfig,
'CheckPKG' : CheckPKG,
'CheckSDL' : CheckSDL,
'CheckHost_x86_32' : CheckHost_x86_32,
'CheckHost_x86_64' : CheckHost_x86_64,
})
if not conf.CheckPKGConfig('0.15.0'):
print 'pkg-config >= 0.15.0 not found.'
Exit(1)
if not conf.CheckPKG('ogg'):
print 'libogg not found.'
Exit(1)
if conf.CheckPKG('vorbis vorbisenc'):
have_vorbis=True
else:
have_vorbis=False
if conf.CheckPKG('libpng'):
have_libpng=True
else:
have_libpng=False
build_player_example=True
if not conf.CheckHeader('sys/soundcard.h'):
build_player_example=False
if build_player_example and not conf.CheckSDL():
build_player_example=False
if conf.CheckHost_x86_32():
env.Append(CPPDEFINES='OC_X86_ASM')
decoder_sources += """
x86/mmxidct.c
x86/mmxfrag.c
x86/mmxstate.c
x86/x86state.c
"""
encoder_sources += """
x86/mmxencfrag.c
x86/mmxfdct.c
x86/x86enc.c
x86/mmxfrag.c
x86/mmxidct.c
x86/mmxstate.c
x86/x86state.c
"""
elif conf.CheckHost_x86_64():
env.Append(CPPDEFINES=['OC_X86_ASM', 'OC_X86_64_ASM'])
decoder_sources += """
x86/mmxidct.c
x86/mmxfrag.c
x86/mmxstate.c
x86/x86state.c
"""
encoder_sources += """
x86/mmxencfrag.c
x86/mmxfdct.c
x86/x86enc.c
x86/sse2fdct.c
x86/mmxfrag.c
x86/mmxidct.c
x86/mmxstate.c
x86/x86state.c
"""
env = conf.Finish()
env.Append(CPPPATH=['include'])
env.ParseConfig('pkg-config --cflags --libs ogg')
libtheoradec_Sources = Split(decoder_sources)
libtheoraenc_Sources = Split(encoder_sources)
libtheoradec_a = env.Library('lib/theoradec',
path('lib', libtheoradec_Sources))
libtheoradec_so = env.SharedLibrary('lib/theoradec',
path('lib', libtheoradec_Sources))
libtheoraenc_a = env.Library('lib/theoraenc',
path('lib', libtheoraenc_Sources))
libtheoraenc_so = env.SharedLibrary('lib/theoraenc',
path('lib', libtheoraenc_Sources) + [libtheoradec_so])
#installing
prefix='/usr'
lib_dir = prefix + '/lib'
env.Alias('install', prefix)
env.Install(lib_dir, [libtheoradec_a, libtheoradec_so])
env.Install(lib_dir, [libtheoraenc_a, libtheoraenc_so])
# example programs
dump_video = env.Clone()
dump_video_Sources = Split("""dump_video.c ../lib/libtheoradec.a""")
dump_video.Program('examples/dump_video', path('examples', dump_video_Sources))
dump_psnr = env.Clone()
dump_psnr.Append(LIBS='m')
dump_psnr_Sources = Split("""dump_psnr.c ../lib/libtheoradec.a""")
dump_psnr.Program('examples/dump_psnr', path('examples', dump_psnr_Sources))
if have_vorbis:
encex = dump_video.Clone()
encex.ParseConfig('pkg-config --cflags --libs vorbisenc vorbis')
encex_Sources = Split("""
encoder_example.c
../lib/libtheoraenc.a
../lib/libtheoradec.a
""")
encex.Program('examples/encoder_example', path('examples', encex_Sources))
if build_player_example:
plyex = encex.Clone()
plyex_Sources = Split("""
player_example.c
../lib/libtheoradec.a
""")
plyex.ParseConfig('sdl-config --cflags --libs')
plyex.Program('examples/player_example', path('examples', plyex_Sources))
png2theora = env.Clone()
png2theora_Sources = Split("""png2theora.c
../lib/libtheoraenc.a
../lib/libtheoradec.a
""")
png2theora.ParseConfig('pkg-config --cflags --libs libpng')
png2theora.Program('examples/png2theora', path('examples', png2theora_Sources))
#!/bin/sh
# Run this to set up the build system: configure, makefiles, etc.
# (based on the version in enlightenment's cvs)
package="theora"
ACLOCAL_FLAGS="-I m4"
olddir=`pwd`
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
cd "$srcdir"
DIE=0
echo "checking for autoconf... "
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $package."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
VERSIONGREP="sed -e s/.*[^0-9\.]\([0-9][0-9]*\.[0-9][0-9]*\).*/\1/"
VERSIONMKMAJ="sed -e s/\([0-9][0-9]*\)[^0-9].*/\\1/"
VERSIONMKMIN="sed -e s/.*[0-9][0-9]*\.//"
# do we need automake?
if test -r Makefile.am; then
AM_OPTIONS=`fgrep AUTOMAKE_OPTIONS Makefile.am`
AM_NEEDED=`echo $AM_OPTIONS | $VERSIONGREP`
if test x"$AM_NEEDED" = "x$AM_OPTIONS"; then
AM_NEEDED=""
fi
if test -z $AM_NEEDED; then
echo -n "checking for automake... "
AUTOMAKE=automake
ACLOCAL=aclocal
if ($AUTOMAKE --version < /dev/null > /dev/null 2>&1); then
echo "yes"
else
echo "no"
AUTOMAKE=
fi
else
echo -n "checking for automake $AM_NEEDED or later... "
majneeded=`echo $AM_NEEDED | $VERSIONMKMAJ`
minneeded=`echo $AM_NEEDED | $VERSIONMKMIN`
for am in automake-$AM_NEEDED automake$AM_NEEDED \
automake automake-1.7 automake-1.8 automake-1.9 automake-1.10; do
($am --version < /dev/null > /dev/null 2>&1) || continue
ver=`$am --version < /dev/null | head -n 1 | $VERSIONGREP`
maj=`echo $ver | $VERSIONMKMAJ`
min=`echo $ver | $VERSIONMKMIN`
if test $maj -eq $majneeded -a $min -ge $minneeded; then
AUTOMAKE=$am
echo $AUTOMAKE
break
fi
done
test -z $AUTOMAKE && echo "no"
echo -n "checking for aclocal $AM_NEEDED or later... "
for ac in aclocal-$AM_NEEDED aclocal$AM_NEEDED \
aclocal aclocal-1.7 aclocal-1.8 aclocal-1.9 aclocal-1.10; do
($ac --version < /dev/null > /dev/null 2>&1) || continue
ver=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP`
maj=`echo $ver | $VERSIONMKMAJ`
min=`echo $ver | $VERSIONMKMIN`
if test $maj -eq $majneeded -a $min -ge $minneeded; then
ACLOCAL=$ac
echo $ACLOCAL
break
fi
done
test -z $ACLOCAL && echo "no"
fi
test -z $AUTOMAKE || test -z $ACLOCAL && {
echo
echo "You must have automake installed to compile $package."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
exit 1
}
fi
echo -n "checking for libtool... "
for LIBTOOLIZE in libtoolize glibtoolize nope; do
($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break
done
if test x$LIBTOOLIZE = xnope; then
echo "nope."
LIBTOOLIZE=libtoolize
else
echo $LIBTOOLIZE
fi
($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have libtool installed to compile $package."
echo "Download the appropriate package for your system,"
echo "or get the source from one of the GNU ftp sites"
echo "listed in http://www.gnu.org/order/ftp.html"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
echo "Generating configuration files for $package, please wait...."
echo " $ACLOCAL $ACLOCAL_FLAGS"
$ACLOCAL $ACLOCAL_FLAGS || exit 1
echo " $LIBTOOLIZE --automake --force"
$LIBTOOLIZE --automake --force || exit 1
echo " autoheader"
autoheader || exit 1
echo " $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
$AUTOMAKE --add-missing $AUTOMAKE_FLAGS || exit 1
echo " autoconf"
autoconf || exit 1
cd $olddir
$srcdir/configure --enable-maintainer-mode "$@" && echo
dnl Process this file with autoconf to produce a configure script
dnl ------------------------------------------------
dnl Initialization and Versioning
dnl ------------------------------------------------
AC_INIT(libtheora,[1.1.1])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_CONFIG_HEADER([config.h])
AC_CONFIG_SRCDIR([lib/fdct.c])
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
dnl Library versioning
dnl CURRENT, REVISION, AGE
dnl - library source changed -> increment REVISION
dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
dnl - interfaces added -> increment AGE
dnl - interfaces removed -> AGE = 0
TH_LIB_CURRENT=3
TH_LIB_REVISION=10
TH_LIB_AGE=3
AC_SUBST(TH_LIB_CURRENT)
AC_SUBST(TH_LIB_REVISION)
AC_SUBST(TH_LIB_AGE)
THDEC_LIB_CURRENT=2
THDEC_LIB_REVISION=4
THDEC_LIB_AGE=1
AC_SUBST(THDEC_LIB_CURRENT)
AC_SUBST(THDEC_LIB_REVISION)
AC_SUBST(THDEC_LIB_AGE)
THENC_LIB_CURRENT=2
THENC_LIB_REVISION=2
THENC_LIB_AGE=1
AC_SUBST(THENC_LIB_CURRENT)
AC_SUBST(THENC_LIB_REVISION)
AC_SUBST(THENC_LIB_AGE)
dnl Extra linker options (for version script)
THEORA_LDFLAGS=""
dnl --------------------------------------------------
dnl Check for programs
dnl --------------------------------------------------
dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2"
dnl if $CFLAGS is blank
cflags_save="$CFLAGS"
AC_PROG_CC
AC_PROG_CPP
CFLAGS="$cflags_save"
AM_PROG_CC_C_O
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
dnl Add parameters for aclocal
AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
dnl Check for doxygen
AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
AM_CONDITIONAL(HAVE_DOXYGEN,$HAVE_DOXYGEN)
if test $HAVE_DOXYGEN = "false"; then
AC_MSG_WARN([*** doxygen not found, API documentation will not be built])
fi
dnl Check for tools used to build the format specification
BUILD_SPEC="false"
ac_build_spec=yes
AC_ARG_ENABLE(spec,
[ --disable-spec do not build spec ],
[
if test "x$enableval" = "xno"; then
ac_build_spec=$enableval
fi
], [
ac_build_spec=yes
] )
if test "x$ac_build_spec" = "xyes"; then
AC_CHECK_PROG(HAVE_PDFLATEX, pdflatex, yes)
AC_CHECK_PROG(HAVE_BIBTEX, bibtex, yes)
AC_CHECK_PROG(HAVE_TRANSFIG, fig2dev, yes)
if test -r doc/spec/spec.tex; then
if test "x$HAVE_PDFLATEX" = "xyes"; then
if test "x$HAVE_BIBTEX" = "xyes"; then
if test "x$HAVE_TRANSFIG" = "xyes"; then
tex_pkg_list=`fgrep usepackage doc/spec/spec.tex | grep \{ | grep -v ltablex`
tex_pkg_ok="yes"
for pkg_line in $tex_pkg_list; do
pkg_name=`echo $pkg_line | sed -e 's/.*{\(.*\)}.*/\1/'`
AC_MSG_CHECKING([for Tex package $pkg_name])
cat >conftest.tex <<_ACEOF
\\documentclass{book}
$pkg_line
\\begin{document}
Hello World.
\\end{document}
_ACEOF
if pdflatex -interaction batchmode -halt-on-error conftest < /dev/null > /dev/null 2>&1; then
AC_MSG_RESULT([ok])
else
tex_pkg_ok="no"
AC_MSG_RESULT([no])
fi
done
if test -w conftest.tex; then rm conftest.tex; fi
if test -w conftest.tex; then rm conftest.aux; fi
if test -w conftest.pdf; then rm conftest.pdf; fi
if test "x$tex_pkg_ok" = "xyes"; then
BUILD_SPEC="true"
fi
fi
fi
fi
fi
fi
AM_CONDITIONAL(BUILD_SPEC, $BUILD_SPEC)
if test $BUILD_SPEC = "false"; then
AC_MSG_WARN([*** Format Specification will not built.])
fi
dnl Check for valgrind
VALGRIND_ENVIRONMENT=""
ac_enable_valgrind=no
AC_ARG_ENABLE(valgrind-testing,
[ --enable-valgrind-testing enable running of tests inside Valgrind ], [ ac_enable_valgrind=yes ], [ ac_enable_valgrind=no] )
if test "x${ac_enable_valgrind}" = xyes ; then
if test "x${enable_shared}" = xyes ; then
VALGRIND_ENVIRONMENT="libtool --mode=execute "
fi
AC_CHECK_PROG(HAVE_VALGRIND, valgrind, yes, no)
if test "x$HAVE_VALGRIND" = xyes ; then
VALGRIND_ENVIRONMENT="$VALGRIND_ENVIRONMENT valgrind -q --leak-check=yes --show-reachable=yes --num-callers=100"
AC_SUBST(VALGRIND_ENVIRONMENT)
TESTS_INFO="Type 'make check' to run test suite. Tests will be run under:
${VALGRIND_ENVIRONMENT}"
else
TESTS_INFO="Type 'make check' to run test suite (Valgrind not found)"
fi
else
TESTS_INFO="Type 'make check' to run test suite (Valgrind testing not enabled)"
fi
dnl --------------------------------------------------
dnl Set build flags based on environment
dnl --------------------------------------------------
dnl Set some target options
cflags_save="$CFLAGS"
if test -z "$GCC"; then
case $host in
*)
DEBUG="-g -DDEBUG"
CFLAGS="-O"
PROFILE="-g -p -DDEBUG" ;;
esac
else
case $host in
*)
DEBUG="-g -Wall -Wno-parentheses -DDEBUG -D__NO_MATH_INLINES"
CFLAGS="-Wall -Wno-parentheses -O3 -fforce-addr -fomit-frame-pointer -finline-functions -funroll-loops"
PROFILE="-Wall -Wno-parentheses -pg -g -O3 -fno-inline-functions -DDEBUG";;
esac
fi
CFLAGS="$CFLAGS $cflags_save"
cpu_x86_64=no
cpu_x86_32=no
AC_ARG_ENABLE(asm,
[ --disable-asm disable assembly optimizations ],
[ ac_enable_asm=$enableval ], [ ac_enable_asm=yes] )
if test "x${ac_enable_asm}" = xyes; then
cpu_optimization="no optimization for your platform, please send a patch"
case $target_cpu in
i[[3456]]86)
cpu_x86_32=yes
cpu_optimization="32 bit x86"
AC_DEFINE([OC_X86_ASM], [], [make use of x86 asm optimization])
if test "x$target_vendor" = "xapple"; then
THEORA_LDFLAGS="$THEORA_LDFLAGS -Wl,-read_only_relocs,suppress"
fi
;;
x86_64)
cpu_x86_64=yes
cpu_optimization="64 bit x86"
AC_DEFINE([OC_X86_ASM], [], [make use of x86 asm optimization])
AC_DEFINE([OC_X86_64_ASM], [], [make use of x86_64 asm optimization])
;;
esac
else
cpu_optimization="disabled"
fi
AM_CONDITIONAL([CPU_x86_64], [test x$cpu_x86_64 = xyes])
AM_CONDITIONAL([CPU_x86_32], [test x$cpu_x86_32 = xyes])
# Test whenever ld supports -version-script
AC_PROG_LD
AC_PROG_LD_GNU
AC_MSG_CHECKING([how to control symbol export])
THDEC_VERSION_ARG=""
THENC_VERSION_ARG=""
TH_VERSION_ARG=""
if test "x$lt_cv_prog_gnu_ld" = "xyes"; then
case "$target_os" in
*mingw*)
THEORA_LDFLAGS="$THEORA_LDFLAGS -no-undefined"
THDEC_VERSION_ARG="-export-symbols \$(top_srcdir)/win32/xmingw32/libtheoradec-all.def"
THENC_VERSION_ARG="-export-symbols \$(top_srcdir)/win32/xmingw32/libtheoraenc-all.def"
THENC_VERSION_ARG="$THENC_VERSION_ARG -ltheoradec"
THC_VERSION_ARG="-export-symbols \$(top_srcdir)/win32/libtheora.def"
AC_MSG_RESULT([-export-symbols])
;;
linux* | solaris* )
THDEC_VERSION_ARG='-Wl,--version-script=$(srcdir)/Version_script-dec'
THENC_VERSION_ARG='-Wl,--version-script=$(srcdir)/Version_script-enc'
TH_VERSION_ARG='-Wl,--version-script=$(srcdir)/Version_script'
AC_MSG_RESULT([--version-script])
;;
*)
# build without versioning
AC_MSG_RESULT([no])
;;
esac
else
case "$target_os" in
darwin*)
THDEC_VERSION_ARG='-Wl,-exported_symbols_list,$(srcdir)/theoradec.exp'
THENC_VERSION_ARG='-Wl,-exported_symbols_list,$(srcdir)/theoraenc.exp'
TH_VERSION_ARG='-Wl,-exported_symbols_list,$(srcdir)/theora.exp'
AC_MSG_RESULT([-exported_symbols_list])
;;
*)
# build without versioning
AC_MSG_RESULT([no])
;;
esac
fi
THEORADEC_LDFLAGS="$THEORA_LDFLAGS $THDEC_VERSION_ARG"
THEORAENC_LDFLAGS="$THEORA_LDFLAGS $THENC_VERSION_ARG"
THEORA_LDFLAGS="$THEORA_LDFLAGS $TH_VERSION_ARG"
AC_SUBST(THEORADEC_LDFLAGS)
AC_SUBST(THEORAENC_LDFLAGS)
AC_SUBST(THEORA_LDFLAGS)
dnl --------------------------------------------------
dnl Checks for support libraries and headers
dnl --------------------------------------------------
dnl check for Ogg
HAVE_OGG=no
dnl first check through pkg-config since it's more flexible
dnl check for pkg-config itself so we don't try the m4 macro without pkg-config
AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
if test "x$HAVE_PKG_CONFIG" = "xyes"
then
PKG_CHECK_MODULES(OGG, ogg >= 1.1, HAVE_OGG=yes, HAVE_OGG=no)
fi
if test "x$HAVE_OGG" = "xno"
then
dnl fall back to the old school test
XIPH_PATH_OGG(, AC_MSG_ERROR([
libogg is required to build this package!
please see http://www.xiph.org/ for how to
obtain a copy.
]))
cflags_save=$CFLAGS
libs_save=$LIBS
CFLAGS="$CFLAGS $OGG_CFLAGS"
LIBS="$LIBS $OGG_LIBS"
AC_CHECK_FUNC(oggpackB_read, , [
AC_MSG_ERROR([newer libogg version (1.1 or later) required])
])
CFLAGS=$cflags_save
LIBS=$libs_save
fi
dnl check for Vorbis
HAVE_VORBIS=no
dnl first check through pkg-config since it's more flexible
if test "x$HAVE_PKG_CONFIG" = "xyes"
then
PKG_CHECK_MODULES(VORBIS, vorbis >= 1.0.1, HAVE_VORBIS=yes, HAVE_VORBIS=no)
dnl also set VORBISENC_LIBS since an examples needs it
dnl the old .m4 sets this to a value to use on top of VORBIS_LIBS,
dnl so we do the same here.
VORBISENC_LIBS="-lvorbisenc"
AC_SUBST(VORBISENC_LIBS)
fi
if test "x$HAVE_VORBIS" = "xno"
then
dnl fall back to the old school test
XIPH_PATH_VORBIS(HAVE_VORBIS=yes, HAVE_VORBIS=no)
fi
dnl check for SDL
HAVE_SDL=no
AM_PATH_SDL(,[
HAVE_SDL=yes
SDL_LIBS=`$SDL_CONFIG --libs`
],AC_MSG_WARN([*** Unable to find SDL -- Not compiling example players ***]))
dnl check for OSS
HAVE_OSS=no
AC_CHECK_HEADERS([sys/soundcard.h soundcard.h machine/soundcard.h],[
HAVE_OSS=yes
break
])
if test x$HAVE_OSS != xyes; then
AC_MSG_WARN([OSS audio support not found -- not compiling player_example])
fi
dnl OpenBSD needs -lossaudio to use the oss interface
OSS_LIBS=
case "$target_os" in
openbsd*)
OSS_LIBS='-lossaudio'
;;
esac
AC_SUBST(OSS_LIBS)
dnl check for libpng
HAVE_PNG=no
if test "x$HAVE_PKG_CONFIG" = "xyes"
then
PKG_CHECK_MODULES(PNG, libpng, HAVE_PNG=yes, HAVE_PNG=no)
fi
AC_SUBST(PNG_CFLAGS)
AC_SUBST(PNG_LIBS)
dnl check for libcairo
HAVE_CAIRO=no
AC_ARG_ENABLE(telemetry,
[ --enable-telemetry enable debugging output controls ],
[ ac_enable_telemetry=$enableval ], [ ac_enable_telemetry=no] )
if test "x${ac_enable_telemetry}" = xyes; then
if test "x$HAVE_PKG_CONFIG" = "xyes"
then
PKG_CHECK_MODULES(CAIRO, cairo, HAVE_CAIRO=yes, HAVE_CAIRO=no)
AC_DEFINE([HAVE_CAIRO], [], [libcairo is available for visual debugging output])
fi
if test x$HAVE_CAIRO != xyes; then
AC_MSG_WARN([libcairo not found -- not compiling telemetry output support ])
fi
AC_SUBST(CAIRO_CFLAGS)
AC_SUBST(CAIRO_LIBS)
fi
dnl --------------------------------------------------
dnl Overall build configuration options
dnl --------------------------------------------------
dnl Configuration option for building of floating point code.
ac_enable_float=yes
AC_ARG_ENABLE(float,
[ --disable-float disable use of floating point code ],
[ ac_enable_float=$enableval ], [ ac_enable_float=yes] )
if test "x${ac_enable_float}" != xyes ; then
AC_DEFINE([THEORA_DISABLE_FLOAT], [],
[Define to exclude floating point code from the build])
fi
AM_CONDITIONAL(THEORA_DISABLE_FLOAT, [test "x${ac_enable_float}" != xyes])
dnl Configuration option for building of encoding support.
ac_enable_encode=yes
AC_ARG_ENABLE(encode,
[ --disable-encode disable encoding support ],
[ ac_enable_encode=$enableval ], [ ac_enable_encode=yes] )
if test "x${ac_enable_encode}" != xyes ; then
AC_DEFINE([THEORA_DISABLE_ENCODE], [],
[Define to exclude encode support from the build])
else
if test x$HAVE_VORBIS = xyes; then
BUILDABLE_EXAMPLES="$BUILDABLE_EXAMPLES encoder_example\$(EXEEXT)"
else
AC_MSG_NOTICE([Vorbis missing, cannot build example encoder])
fi
fi
AM_CONDITIONAL(THEORA_DISABLE_ENCODE, [test "x${ac_enable_encode}" != xyes])
dnl Configuration option for examples
ac_enable_examples=yes
AC_ARG_ENABLE(examples,
[ --disable-examples disable examples ],
[ ac_enable_examples=$enableval ], [ ac_enable_examples=yes] )
AM_CONDITIONAL(THEORA_ENABLE_EXAMPLES, [test "x${ac_enable_examples}" != xno])
dnl --------------------------------------------------
dnl Check for headers
dnl --------------------------------------------------
dnl none here
dnl --------------------------------------------------
dnl Check for typedefs, structures, etc
dnl --------------------------------------------------
dnl none
dnl --------------------------------------------------
dnl Check for library functions
dnl --------------------------------------------------
dnl OpenBSD needs -lcompat for ftime() used by dump_video.c
AC_SEARCH_LIBS([ftime], [compat])
dnl substitute the included getopt if the system doesn't support long options
AC_CHECK_FUNC(getopt_long,
[GETOPT_OBJS=''],
[GETOPT_OBJS='getopt.$(OBJEXT) getopt1.$(OBJEXT)'])
AC_SUBST(GETOPT_OBJS)
if test x$HAVE_SDL = xyes -a x$HAVE_OSS = xyes -a x$HAVE_VORBIS = xyes; then
BUILDABLE_EXAMPLES="$BUILDABLE_EXAMPLES player_example\$(EXEEXT)"
fi
if test x$HAVE_PNG = xyes; then
BUILDABLE_EXAMPLES="$BUILDABLE_EXAMPLES png2theora\$(EXEEXT)"
fi
AC_SUBST(BUILDABLE_EXAMPLES)
dnl --------------------------------------------------
dnl Do substitutions
dnl --------------------------------------------------
AC_SUBST(DEBUG)
AC_SUBST(PROFILE)
AC_OUTPUT([
Makefile
lib/Makefile
include/Makefile include/theora/Makefile
examples/Makefile
doc/Makefile doc/Doxyfile doc/spec/Makefile
tests/Makefile
m4/Makefile
libtheora.spec
theora.pc
theora-uninstalled.pc
theoradec.pc
theoradec-uninstalled.pc
theoraenc.pc
theoraenc-uninstalled.pc
])
AS_AC_EXPAND(LIBDIR, ${libdir})
AS_AC_EXPAND(INCLUDEDIR, ${includedir})
AS_AC_EXPAND(BINDIR, ${bindir})
AS_AC_EXPAND(DOCDIR, ${datadir}/doc)
if test $HAVE_DOXYGEN = "false"; then
doc_build="no"
else
doc_build="yes"
fi
if test $BUILD_SPEC = "false"; then
spec_build="no"
else
spec_build="yes"
fi
AC_MSG_RESULT([
------------------------------------------------------------------------
$PACKAGE $VERSION: Automatic configuration OK.
General configuration:
Encoding support: ........... ${ac_enable_encode}
Floating point support: ..... ${ac_enable_float}
Assembly optimization: ...... ${cpu_optimization}
Debugging telemetry: ........ ${ac_enable_telemetry}
Build example code: ......... ${ac_enable_examples}
API Documentation: .......... ${doc_build}
Format Documentation: ....... ${spec_build}
Installation paths:
libtheora: ................... ${LIBDIR}
C header files: .............. ${INCLUDEDIR}/theora
Documentation: ............... ${DOCDIR}/$PACKAGE
Building:
Type 'make' to compile $PACKAGE.
Type 'make install' to install $PACKAGE.
${TESTS_INFO}
Example programs will be built but not installed.
------------------------------------------------------------------------
])
libtheora (0.0.0.alpha3-1) unstable; urgency=low
* Initial upload to Debian.
-- Christopher L Cheney <ccheney@debian.org> Tue, 29 Jun 2004 22:00:00 -0500
libtheora (0.0.0-0) unstable; urgency=low
* Initial Release.
-- Christopher L Cheney <ccheney@debian.org> Wed, 25 Sep 2002 21:00:00 -0500
Local variables:
mode: debian-changelog
End:
Source: libtheora
Section: libs
Priority: optional
Maintainer: Christopher L Cheney <ccheney@debian.org>
Build-Depends: cdbs, autotools-dev, debhelper (>> 4.0.0), devscripts, libogg-dev (>= 1.1.0), libvorbis-dev, python
Standards-Version: 3.6.1.0
Package: libtheora0
Architecture: any
Section: libs
Depends: ${shlibs:Depends}
Description: The Theora Video Compression Codec
Ogg Theora
Package: libtheora-dev
Architecture: any
Section: libdevel
Depends: libtheora0 (= ${Source-Version}), libogg-dev
Description: The Theora Compression Codec (development files)
Theora is a fully open, non-proprietary, patent-and-royalty-free,
general-purpose compressed video format.
.
This package contains the header files and documentation needed to develop
applications with libtheora.
This package was debianized by Christopher L Cheney <ccheney@debian.org> on
Wed, 25 Sep 2002 21:00:00 -0500.
It was downloaded from http://svn.xiph.org/trunk/theora/
Upstream Authors: Xiph.Org Foundation
Copyright:
Copyright (c) 2002-2009 Xiph.org Foundation
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
debian/tmp/usr/include/theora/theora.h
debian/tmp/usr/lib/libtheora.a
debian/tmp/usr/lib/libtheora.la
debian/tmp/usr/lib/libtheora.so
debian/tmp/usr/lib/pkgconfig/theora.pc
debian/tmp/usr/lib/libtheora.so.0
debian/tmp/usr/lib/libtheora.so.0.0.0
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
version=2
http://downloads.xiph.org/releases/theora/libtheora-(.*)\.tar\.gz debian uupdate
This diff is collapsed.
## Process this file with automake to produce Makefile.in
SUBDIRS = spec
docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
static_docs = vp3-format.txt color.html \
draft-ietf-avt-rtp-theora-00.xml \
draft-ietf-avt-rtp-theora-00.txt
doc_DATA = $(static_docs) doxygen-build.stamp
EXTRA_DIST = $(static_docs) Doxyfile.in
if HAVE_DOXYGEN
doxygen-build.stamp: Doxyfile $(top_srcdir)/include/theora/*.h
doxygen
touch doxygen-build.stamp
else
doxygen-build.stamp:
echo "*** Warning: Doxygen not found; documentation will not be built."
touch doxygen-build.stamp
endif
dist_docdir = $(distdir)/libtheora
dist-hook:
if test -d libtheora; then \
mkdir $(dist_docdir); \
echo -n "copying built documenation..."; \
for dir in libtheora/*; do \
b=`basename $$dir`; \
if test $$b != ".svn"; then \
if test -d $$dir; then \
mkdir $(dist_docdir)/$$b; \
for f in $$dir/*; do \
cp -p $$f $(dist_docdir)/$$b; \
done; \
fi; \
fi; \
done; \
echo "OK"; \
fi
for item in $(EXTRA_DIST); do \
if test -d $$item; then \
echo -n "cleaning $$item dir for distribution..."; \
rm -rf `find $(distdir)/$$item -name .svn`; \
echo "OK"; \
fi; \
done
install-data-local: doxygen-build.stamp
$(mkinstalldirs) $(DESTDIR)$(docdir)
if test -d libtheora; then \
for dir in libtheora/*; do \
if test -d $$dir; then \
b=`basename $$dir`; \
$(mkinstalldirs) $(DESTDIR)$(docdir)/$$b; \
for f in $$dir/*; do \
$(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$b; \
done \
fi \
done \
fi
uninstall-local:
rm -rf $(DESTDIR)$(docdir)
clean-local:
if test -d libtheora; then rm -rf libtheora; fi
if test -f doxygen-build.stamp; then rm -f doxygen-build.stamp; fi
<HTML>
<HEAD><TITLE>xiph.org: Ogg Theora documentation</TITLE></HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#202020" LINK="#006666" VLINK="#000000">
<H1><FONT COLOR="#000070">
Ogg Theora I specification: color space conventions
</FONT></H1>
<H1>Overview</H1>
<P>
There are a large number of different color standards used in digital video.
Since Theora is a lossy codec, it restricts itself to only a few of them to
simplify playback.
Unlike the alternate method of describing all the parameters of the color
model, this allows a few dedicated routines for color conversion to be written
and heavily optimized in a decoder.
More flexible conversion functions should instead be specified in an encoder,
where additional computational complexity is more easily tolerated.
The color spaces were selected to give a fair representation of color standards
in use around the world today.
Most of the standards that do not exactly match one of these can be converted
to one fairly easily.
</P>
<P>
The Theora codec identification header contains an 8-bit value that describes
the color space.
This merely selects one of the color spaces available from an enumerated list.
Currently, only two color spaces are defined, with a third possibility that
indicates the color space is "unknown".
All of them are Y'C<SUB>b</SUB>C<SUB>r</SUB> color spaces with one luma channel
and two chroma channels.
Each channel contains 8-bit discrete values in the range 0-255, which represent
non-linear gamma pre-corrected signals.
</P>
<H2>color space parameters</H2>
<P>
The parameters which describe each color space are listed below.
These are the parameters needed to map colors from the encoded
Y'C<SUB>b</SUB>C<SUB>r</SUB> representation to the device-independent color
space CIE XYZ (1931).
</P>
<DL>
<DT>Y'C<SUB>b</SUB>C<SUB>r</SUB> to Y'P<SUB>b</SUB>P<SUB>r</SUB></DT>
<DD>
<P>
This conversion takes 8-bit discrete values in the range 0-255 and maps them to
real values in the range [0,1] for Y and [-1/2,1/2] for P<SUB>b</SUB>
and P<SUB>r</SUB>.
Because some values may fall outside the offset and excursion defined for each
channel in the Y'C<SUB>b</SUB>C<SUB>r</SUB> space, the results may fall
outside these ranges in Y'P<SUB>b</SUB>P<SUB>r</SUB> space.
No clamping should be done at this stage.
</P>
<P>
Parameters: <EM>Offset<SUB>Y,C<SUB>b</SUB>,C<SUB>r</SUB></SUB></EM>,
<EM>Excursion<SUB>Y,C<SUB>b</SUB>,C<SUB>r</SUB>,</SUB></EM>
</P>
<TABLE>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">Y'<SUB>out</SUB></TD>
<TD>=</TD>
<TD ALIGN="LEFT">
(Y'<SUB>in</SUB>-<EM>Offset<SUB>Y</SUB></EM>)/
<EM>Excursion<SUB>Y</SUB></EM>
</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">P<SUB>b</SUB></TD>
<TD>=</TD>
<TD ALIGN="LEFT">
(C<SUB>b</SUB>-<EM>Offset<SUB>C<SUB>b</SUB></SUB></EM>)/
<EM>Excursion<SUB>C<SUB>b</SUB></SUB></EM>
</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">P<SUB>r</SUB></TD>
<TD>=</TD>
<TD ALIGN="LEFT">
(C<SUB>r</SUB>-<EM>Offset<SUB>C<SUB>r</SUB></SUB></EM>)/
<EM>Excursion<SUB>C<SUB>r</SUB></SUB></EM>
</TD>
</TR>
</TABLE>
</DD>
<DT>Y'P<SUB>b</SUB>P<SUB>r</SUB> to R'G'B'</DT>
<DD>
<P>
This conversion takes the one luma and two chroma channel representation and
maps it to the non-linear R'G'B' space used to drive actual output devices.
Values should be clamped into the range [0,1] after this stage.
<P>
Parameters: <EM>K<SUB>b</SUB></EM>, <EM>K<SUB>r</SUB></EM>
</P>
<TABLE>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">R'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">Y' + 2(1-<EM>K<SUB>r</SUB></EM>)P<SUB>r</SUB></TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">G'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">
Y' +
2((<EM>K<SUB>b</SUB></EM>-1)<EM>K<SUB>b</SUB></EM>/
(1-<EM>K<SUB>b</SUB></EM>-<EM>K<SUB>r</SUB></EM>))P<SUB>b</SUB> +
2((<EM>K<SUB>r</SUB></EM>-1)<EM>K<SUB>r</SUB></EM>/
(1-<EM>K<SUB>b</SUB></EM>-<EM>K<SUB>r</SUB></EM>))P<SUB>r</SUB>
</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">B'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">Y' + 2(1-<EM>K<SUB>b</SUB></EM>)P<SUB>b</SUB></TD>
</TR>
</TABLE>
</DD>
<DT>R'G'B' to RGB (Output device gamma correction)</DT>
<DD>
<P>
This conversion takes the non-linear R'G'B' voltage levels and maps it to the
linear light levels produced by the actual output device.
Note that this conversion is only that of the output device, and its inverse is
<EM>not</EM> that used by the input device.
Because a dim viewing environment is assumed in most television standards, the
overall gamma between the input and output devices is usually around 1.1 to
1.2, and not a strict 1.0.
</P>
<P>
For calibration with actual output devices, the model
<TABLE>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">L</TD>
<TD>=</TD>
<TD ALIGN="LEFT">(E'+&Delta;)<SUP><EM>&gamma;</EM></SUP></TD>
</TR>
</TABLE>
should be used, with &Delta; the free parameter and <EM>&gamma;</EM> held
fixed to the value specified in this document.
The conversion function presented here is an idealized version with &Delta;=0.
</P>
<P>
Parameters: <EM>&gamma;</EM>
</P>
<TABLE>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">R</TD>
<TD>=</TD>
<TD ALIGN="LEFT">R'<SUP><EM>&gamma;</EM></SUP></TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">G</TD>
<TD>=</TD>
<TD ALIGN="LEFT">G'<SUP><EM>&gamma;</EM></SUP></TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">B</TD>
<TD>=</TD>
<TD ALIGN="LEFT">B'<SUP><EM>&gamma;</EM></SUP></TD>
</TR>
</TABLE>
</DD>
<DT>RGB to R'G'B' (Input device gamma correction)</DT>
<DD>
<P>
This conversion takes linear light levels and maps them to the non-linear
voltage levels used to drive the actual output device.
This information is merely informative.
It is not required for building a decoder or for converting between the various
formats and the actual output capabilities of a particular device.
</P>
<P>
A linear segment is introduced on the low end to reduce noise in dark areas of
the image.
The rest of the scale is adjusted so that the power segment of the curve
intersects the linear segment with the proper slope, and so that it still maps
0 to 0 and 1 to 1.
</P>
<P>
Parameters: <EM>&beta;</EM>, <EM>&alpha;</EM>, <EM>&delta;</EM>,
<EM>&epsilon;</EM>
</P>
<TABLE>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">R'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">
(1+<EM>&epsilon;</EM>)R<SUP>&beta;</SUP>-<EM>&epsilon;</EM>
</TD>
<TD>for <EM>&delta;</EM> &le; R &le; 1</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">R'</TD>
<TD>=</TD>
<TD ALIGN="LEFT"><EM>&alpha;</EM>R</TD>
<TD>for 0 &le; R &lt; <EM>&delta;</EM></TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">G'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">
(1+<EM>&epsilon;</EM>)G<SUP>&beta;</SUP>-<EM>&epsilon;</EM>
</TD>
<TD>for <EM>&delta;</EM> &le; G &le; 1</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">G'</TD>
<TD>=</TD>
<TD ALIGN="LEFT"><EM>&alpha;</EM>G</TD>
<TD>for 0 &le; G &lt; <EM>&delta;</EM></TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">B'</TD>
<TD>=</TD>
<TD ALIGN="LEFT">
(1+<EM>&epsilon;</EM>)B<SUP>&beta;</SUP>-<EM>&epsilon;</EM>
</TD>
<TD>for <EM>&delta;</EM> &le; B &le; 1</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">B'</TD>
<TD>=</TD>
<TD ALIGN="LEFT"><EM>&alpha;</EM>B</TD>
<TD>for 0 &le; B &lt; <EM>&delta;</EM></TD>
</TR>
</TABLE>
</DD>
<DT>RGB to CIE XYZ (1931)</DT>
<DD>
<P>
This conversion maps a device-dependent linear RGB space to the
device-independent linear CIE XYZ space.
The parameters are the CIE chromaticity coordinates of the three primaries,
red, green, and blue, as well as the chromaticity coordinates of the white
point of the device.
This is how hardware manufacturers and standards typically describe a
particular RGB space.
The math required to convert these parameters into a useful transformation
matrix is reproduced below.
</P>
<P>
Parameters: <EM>x<SUB>r,g,b,w</SUB></EM>, <EM>y<SUB>r,g,b,w</SUB></EM>
</P>
<TABLE>
<TR>
<TD ALIGN="RIGHT">F</TD>
<TD>=</TD>
<TD ALIGN="LEFT"><TABLE><TR>
<TD><FONT SIZE="300%">(</FONT></TD>
<TD><TABLE>
<TR>
<TD ALIGN="CENTER"><EM>x<SUB>r</SUB></EM>/<EM>y<SUB>r</SUB></EM></TD>
<TD ALIGN="CENTER"><EM>x<SUB>g</SUB></EM>/<EM>y<SUB>g</SUB></EM></TD>
<TD ALIGN="CENTER"><EM>x<SUB>b</SUB></EM>/<EM>y<SUB>b</SUB></EM></TD>
</TR>
<TR>
<TD ALIGN="CENTER">1</TD>
<TD ALIGN="CENTER">1</TD>
<TD ALIGN="CENTER">1</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
(1-<EM>x<SUB>r</SUB></EM>-<EM>y<SUB>r</SUB></EM>)/<EM>y<SUB>r</SUB></EM>
</TD>
<TD ALIGN="CENTER">
(1-<EM>x<SUB>g</SUB></EM>-<EM>y<SUB>g</SUB></EM>)/<EM>y<SUB>g</SUB></EM>
</TD>
<TD ALIGN="CENTER">
(1-<EM>x<SUB>b</SUB></EM>-<EM>y<SUB>b</SUB></EM>)/<EM>y<SUB>b</SUB></EM>
</TD>
</TR>
</TABLE></TD>
<TD<FONT SIZE="300%">)</FONT></TD>
</TR></TABLE></TD>
</TR>
<TR>
<TD ALIGN="RIGHT"><TABLE><TR>
<TD><FONT SIZE="300%">(</FONT></TD>
<TD><TABLE>
<TR><TD ALIGN="CENTER">s<SUB>r</SUB></TD></TR>
<TR><TD ALIGN="CENTER">s<SUB>g</SUB></TD></TR>
<TR><TD ALIGN="CENTER">s<SUB>b</SUB></TD></TR>
</TABLE></TD>
<TD><FONT SIZE="300%">)</FONT></TD>
</TR></TABLE></TD>
<TD>=</TD>
<TD ALIGN="LEFT"><TABLE><TR>
<TD>F<SUP>-1</SUP><FONT SIZE="300%">(</FONT></TD>
<TD><TABLE>
<TR><TD ALIGN="CENTER"><EM>x<SUB>w</SUB></EM>/<EM>y<SUB>w</SUB></EM></TD></TR>
<TR><TD ALIGN="CENTER">1</TD></TR>
<TR><TD ALIGN="CENTER">
(1-<EM>x<SUB>w</SUB></EM>-<EM>y<SUB>w</SUB></EM>)/<EM>y<SUB>w</SUB></EM>
</TD></TR>
</TABLE></TD>
<TD><FONT SIZE="300%">)</FONT></TD>
</TR></TABLE></TD>
</TR>
<TR>
<TD ALIGN="RIGHT"><TABLE><TR>
<TD><FONT SIZE="300%">(</FONT></TD>
<TD><TABLE>
<TR><TD ALIGN="CENTER">X</TD></TR>
<TR><TD ALIGN="CENTER">Y</TD></TR>
<TR><TD ALIGN="CENTER">Z</TD></TR>
</TABLE></TD>
<TD><FONT SIZE="300%">)</FONT></TD>
</TR></TABLE></TD>
<TD>=</TD>
<TD ALIGN="LEFT"><TABLE><TR>
<TD>F<FONT SIZE="300%">(</FONT></TD>
<TD><TABLE>
<TR><TD ALIGN="CENTER">s<SUB>r</SUB>R</TD></TR>
<TR><TD ALIGN="CENTER">s<SUB>g</SUB>G</TD></TR>
<TR><TD ALIGN="CENTER">s<SUB>b</SUB>B</TD></TR>
</TABLE></TD>
<TD><FONT SIZE="300%">)</FONT></TD>
</TR></TABLE></TD>
</TR>
</TABLE>
</DD>
</DL>
<H2>available color spaces</H2>
<P>
These are the color spaces currently defined for use by Ogg Theora video.
Each one has a short name, with which it is referred to in this document, and
a more detailed specification of the standards from which its parameters are
derived.
Some standards do not specify all the parameters necessary.
For these unspecified parameters, this document serves as the definition of
what should be used when encoding or decoding Ogg Theora video.
<H3>Rec 470M (Rec. ITU-R BT.470-6 System M/NTSC with Rec. ITU-R BT.601-5)</H3>
<P>
This color space is used by broadcast television and DVDs in much of the
Americas, Japan, Korea, and the Union of Myanmar
[<A HREF="#Rec470">Rec470</A>].
This color space may also be used for System M/PAL (Brazil), with an
appropriate conversion supplied by the encoder to compensate for the
different gamma value.
See the Rec 470BG section for an appropriate gamma value to assume for M/PAL
input.
</P>
<P>
In the US, studio monitors are adjusted to a D65 white point
(<EM>x<SUB>w</SUB></EM>,<EM>y<SUB>w</SUB></EM>=0.313,0.329).
In Japan, studio monitors are adjusted to a D white of 9300K
(<EM>x<SUB>w</SUB></EM>,<EM>y<SUB>w</SUB></EM>=0.285,0.293).
</P>
<P>
Rec 470 does not specify a digital encoding of the color signals.
For Ogg Theora, Rec. ITU-R BT.601-5 is used, starting from the R'G'B' signals
specified by Rec 470 [<A HREF="#Rec601">Rec601</A>].
</P>
<P>
<P>
Rec 470 does not specify an input gamma function.
For Ogg Theora, the Rec 709 input function is used.
This is the same as that specified by SMPTE 170M, which claims to reflect
modern practice in the creation of NTSC signals (c. 1994)
[<A HREF="#SMPTE170M">SMPTE170M</A>].
</P>
<H4>parameters</H4>
<TABLE>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>Offset<SUB>Y,C<SUB>b</SUB>,C<SUB>r</SUB></SUB></EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">(16,128,128)</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">
<EM>Excursion<SUB>Y,C<SUB>b</SUB>,C<SUB>r</SUB></SUB></EM>
</TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">(219,224,224)</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>K<SUB>b</SUB></EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">0.114</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>K<SUB>r</SUB></EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">0.299</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>&gamma;</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">2.2</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>&beta;</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">0.45</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>&alpha;</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">4.5</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>&delta;</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">0.018</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>&epsilon;</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">0.099</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>x<SUB>r</SUB></EM>,<EM>y<SUB>r</SUB></EM></TD>
<TD>=</TD>
<TD>0.67,</TD>
<TD>0.33</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>x<SUB>g</SUB></EM>,<EM>y<SUB>g</SUB></EM></TD>
<TD>=</TD>
<TD>0.21,</TD>
<TD>0.71</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>x<SUB>b</SUB></EM>,<EM>y<SUB>b</SUB></EM></TD>
<TD>=</TD>
<TD>0.14,</TD>
<TD>0.08</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">
(Illuminant C) <EM>x<SUB>w</SUB></EM>,<EM>y<SUB>w</SUB></EM>
</TD>
<TD>=</TD>
<TD>0.310,</TD>
<TD>0.316</TD>
</TR>
</TABLE>
<H3>
Rec 470BG (Rec. ITU-R BT.470-6 Systems B and G with Rec. ITU-R BT.601-5)
</H3>
<P>
This color space is used by the PAL and SECAM systems in much of the rest of
the world [<A HREF="#Rec470">Rec470</A>].
This can be used directly by systems (B, B1, D, D1, G, H, I, K, N)/PAL and (B,
D, G, H, K, K1, L)/SECAM.
</P>
<P>
Note that the Rec 470BG chromaticity values are different from those specified
in Rec 470M.
When PAL and SECAM systems were first designed, they were based upon the same
primaries as NTSC.
However, as methods of making color picture tubes have changed, the primaries
used have changed as well.
The US recommends using correction circuitry to approximate the existing,
standard NTSC primaries.
Current PAL and SECAM systems have standardized on primaries in accord with
more recent technology.
</P>
<P>
Rec 470 provisionally permits the use of the NTSC chromaticity values (given
above) with legacy PAL and SECAM equipment.
In Ogg Theora, material must be decoded assuming the new PAL and SECAM
primaries.
Material intended for display on old legacy devices should be converted by the
decoder.
</P>
<P>
The official Rec 470BG specifies a gamma value of <EM>&gamma;</EM>=2.8.
However, in practice this value is unrealistically high
[<A HREF="#RefPoy97">Poy97</A>].
Rec 470BG states that the overall system gamma should be approximately
<EM>&gamma;</EM>/<EM>&beta;</EM>=1.2.
However, most cameras pre-correct with a gamma value of <EM>&beta;</EM>=0.45,
which suggests an output device gamma of approximately <EM>&gamma;</EM>=2.67.
This is the value recommended for use with PAL systems in Ogg Theora.
</P>
<P>
Rec 470 does not specify a digital encoding of the color signals.
For Ogg Theora, Rec. ITU-R BT.601-5 is used, starting from the R'G'B' signals
specified by Rec 470 [<A HREF="#Rec601">Rec601</A>].
</P>
<P>
Rec 470 does not specify an input gamma function.
For Ogg Theora, the Rec 709 input function is used.
</P>
<H4>parameters</H4>
<TABLE>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>Offset<SUB>Y,C<SUB>b</SUB>,C<SUB>r</SUB></SUB></EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">(16,128,128)</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">
<EM>Excursion<SUB>Y,C<SUB>b</SUB>,C<SUB>r</SUB></SUB></EM>
</TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">(219,224,224)</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>K<SUB>b</SUB></EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">0.114</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>K<SUB>r</SUB></EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT" COLSPAN="2">0.299</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>&gamma;</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">2.67</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>&beta;</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">0.45</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>&alpha;</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">4.5</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>&delta;</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">0.018</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>&epsilon;</EM></TD>
<TD>=</TD>
<TD ALIGN="LEFT">0.099</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>x<SUB>r</SUB></EM>,<EM>y<SUB>r</SUB></EM></TD>
<TD>=</TD>
<TD>0.64,</TD>
<TD>0.33</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>x<SUB>g</SUB></EM>,<EM>y<SUB>g</SUB></EM></TD>
<TD>=</TD>
<TD>0.29,</TD>
<TD>0.60</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT"><EM>x<SUB>b</SUB></EM>,<EM>y<SUB>b</SUB></EM></TD>
<TD>=</TD>
<TD>0.15,</TD>
<TD>0.06</TD>
</TR>
<TR VALIGN="BOTTOM">
<TD ALIGN="RIGHT">
(D65) <EM>x<SUB>w</SUB></EM>,<EM>y<SUB>w</SUB></EM>
</TD>
<TD>=</TD>
<TD>0.313,</TD>
<TD>0.329</TD>
</TR>
</TABLE>
<H2>references</H2>
<DL>
<DT>[<A NAME="Poy97">Poy97</A>]</DT>
<DD>
Poynton, Charles, <I>Frequently-Asked Questions about Gamma</I>.
<A HREF="http://www.poynton.com/GammaFAQ.html">http://www.poynton.com/GammaFAQ/html</A>,
Feb. 1997.
</DD>
<DT>[<A NAME="Rec470">Rec470</A>]</DT>
<DD>
Recommendation ITU-R BT.470-6, <I>Conventional Television Systems</I>
(1970, revised 1998). International Telecommunications Union, 1211 Geneva 20,
Switzerland.
</DD>
<DT>[<A NAME="Rec601">Rec601</A>]</DT>
<DD>
Recommendation ITU-R BT.601-5, <I>Studio Encoding Parameters of
Digital Television for Standard 4:3 and Wide-Screen 16:9 Aspect Ratios</I>
(1982, revised 1995). International Telecommunications Union, 1211 Geneva 20,
Switzerland.
</DD>
<DT>[<A NAME="Rec709">Rec709</A>]</DT>
<DD>
Recommendation ITU-R BT.709-5, <I>Parameter values for the
HDTV standards for production and international programme exchange</I>
(1990, revised 2002). International Telecommunications Union, 1211 Geneva 20,
Switzerland.
</DD>
<DT>[<A NAME="SMPTE170M">SMPTE170M</A>]</DT>
<DD>
Society of Motion Picture and Television Engineers, <I>Television &mdash;
Composite Analog Video Signal &mdash; NTSC for Studio Applications</I>.
SMPTE-170M, 1994
</DD>
<DT>[<A NAME="SMPTE240M">SMPTE240M</A>]</DT>
<DD>
Society of Motion Picture and Television Engineers, <I>Television &mdash;
Signal Parameters &mdash; 1125-Line High-Definition Production</I>.
SMPTE-240M, 1999.
</DD>
</DL>
</BODY>
</HTML>
This diff is collapsed.