mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 05:38:39 +00:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/Move.h"
|
||||
#include "mozilla/Opaque.h"
|
||||
#include "mozilla/OperatorNewExtensions.h"
|
||||
#include "mozilla/PodOperations.h"
|
||||
#include "mozilla/ReentrancyGuard.h"
|
||||
#include "mozilla/TemplateLib.h"
|
||||
|
||||
@@ -28,6 +28,8 @@ Cristian Adam
|
||||
Sebastian Pippin
|
||||
Simon Hosie
|
||||
Brad Smith
|
||||
Petter Reinholdtsen
|
||||
Tristan Matthews
|
||||
- Bug fixes, enhancements, build systems.
|
||||
|
||||
Mauricio Piacentini
|
||||
|
||||
+152
-103
@@ -1,169 +1,218 @@
|
||||
libteora 1.2.0alpha1 (2010 September 23)
|
||||
libtheora 1.2.0 (2025 March 29)
|
||||
* Bumped minor SONAME versions as oc_comment_unpack() implementation
|
||||
changed.
|
||||
* Added example wrapper script encoder_example_ffmpeg (#1601 #2336).
|
||||
* Improve comment handling on platforms where malloc(0) return NULL
|
||||
(#2304).
|
||||
* Added pragma in example code to quiet clang op precedenca warnings.
|
||||
* Adjusted encoder_example help text.
|
||||
* Adjusted README, CHANGES, pkg-config and spec files to better reflect
|
||||
current release (#2331 #2328).
|
||||
* Corrected english typos in source and build system.
|
||||
* Switched http links to https in doc and comments where relevant.
|
||||
Did not touch RFC drafts.
|
||||
|
||||
- New 'ptalarbvorm' encoder with better rate/distortion optimization
|
||||
- New th_encode_ctl option for copying configuration from an existing
|
||||
setup header, useful for splicing streams.
|
||||
- Returns TH_DUPFRAME in more cases.
|
||||
- Add ARM optimizations
|
||||
- Add TI C64x+ DSP optimizations
|
||||
- Other performance improvements
|
||||
- Rename speedlevel 2 to 3 and provide a new speedlevel 2
|
||||
- Various minor bug fixes
|
||||
libtheora 1.2.0beta1 (2025 March 15)
|
||||
* Bumped minor SONAME versions as <codec.h> methods changed constness
|
||||
of arguments.
|
||||
* Updated libogg dependency to version 1.3.4 for ogg_uint64_t.
|
||||
* Updated doxygen setup.
|
||||
* Updated autotools setup and support scripts (#1467 #1800 #1987 #2318
|
||||
#2320).
|
||||
* Added support for RISC OS.
|
||||
* Fixed mingw build (#2141).
|
||||
* Improved ARM support.
|
||||
* Converted SCons setup to work with Python 3.
|
||||
* Introduced new configure options --enable-mem-constraint and
|
||||
--enable-gcc-sanitizers.
|
||||
* Fixed all known compiler warnings and errors from gcc and clang.
|
||||
* Improved examples for stability and correctness.
|
||||
* Various speed, bug fixes and code quality improvements.
|
||||
- Fixed build problem with Visual Studio (#2317).
|
||||
- Avoids undefined bit shift of signed numbers (#2321, #2322).
|
||||
- Avoids example encoder crash on bogus audio input (#2305).
|
||||
- Fixed musl linking issue with asm enabled (#2287).
|
||||
- Fixed some broken clamping in rate control (#2229).
|
||||
- Added NULL check _tc and _setup even for data packets (#2279).
|
||||
- Fixed mismatched oc_mb_fill_cmapping11 signature (#2068).
|
||||
- Updated the documentation for theora_encode_comment() (#726).
|
||||
- Adjusted build to only link libcompat with dump_video (#1587).
|
||||
- Corrected an operator precedence error in the visualization
|
||||
code (#1751).
|
||||
- Fixed two spelling errors in the comments (#1804).
|
||||
- Avoid negative bit shift operation in huffdec.c (CVE-2024-56431).
|
||||
* Improved library documentation and specification text.
|
||||
* Adjusted library dependencies so libtheoraenc do not depend on
|
||||
libtheoradec.
|
||||
* Handle fallout from CVE-2017-14633 in libvorbis, check return value
|
||||
in encoder_example and transcoder_example.
|
||||
|
||||
libtheora 1.2.0alpha1 (2010 September 23)
|
||||
|
||||
* New 'ptalarbvorm' encoder with better rate/distortion optimization
|
||||
* New th_encode_ctl option for copying configuration from an existing
|
||||
setup header, useful for splicing streams.
|
||||
* Returns TH_DUPFRAME in more cases.
|
||||
* Add ARM optimizations
|
||||
* Add TI C64x+ DSP optimizations
|
||||
* Other performance improvements
|
||||
* Rename speedlevel 2 to 3 and provide a new speedlevel 2
|
||||
* Various minor bug fixes
|
||||
|
||||
libtheora 1.1.2 (unreleased snapshot)
|
||||
|
||||
- Fix Huffman table decoding with OC_HUFF_SLUSH is set to 0
|
||||
- Fix a frame size bug in player_example
|
||||
- Add support for passing a buffer the size of the picture
|
||||
* Fix Huffman table decoding with OC_HUFF_SLUSH is set to 0
|
||||
* Fix a frame size bug in player_example
|
||||
* Add support for passing a buffer the size of the picture
|
||||
region, rather than a full padded frame to th_encode_ycbcr_in()
|
||||
as was possible with the legacy pre-1.0 API.
|
||||
- 4:4:4 support in player_example using software yuv->rgb
|
||||
- Better rgb->yuv conversion in png2theora
|
||||
- Clean up warnings and local variables
|
||||
- Build and documentation fixes
|
||||
* 4:4:4 support in player_example using software yuv->rgb
|
||||
* Better rgb->yuv conversion in png2theora
|
||||
* Clean up warnings and local variables
|
||||
* Build and documentation fixes
|
||||
|
||||
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
|
||||
* 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.
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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.
|
||||
* 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
|
||||
* 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.
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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
|
||||
* 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.
|
||||
* 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
|
||||
* 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.
|
||||
* 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
|
||||
* Document that granule_time() returns the end of the
|
||||
presentation interval.
|
||||
- Use a custom copy of the libogg bitpacker in the decoder
|
||||
* 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.
|
||||
* 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.
|
||||
* 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
|
||||
* 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 noticeable direction.
|
||||
|
||||
libtheora 1.0alpha8 (2007 September 18)
|
||||
|
||||
- Switch to new spec compliant decoder from theora-exp branch.
|
||||
* Switch to new spec compliant decoder from theora-exp branch.
|
||||
Written by Dr. Timothy Terriberry.
|
||||
- Add support to the encoder for using quantization settings
|
||||
* Add support to the encoder for using quantization settings
|
||||
provided by the application.
|
||||
- more assembly optimizations
|
||||
* 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
|
||||
* 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)
|
||||
|
||||
@@ -183,7 +232,7 @@ 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.
|
||||
being initialized properly.
|
||||
* new utility function:
|
||||
- theora_granule_shift()
|
||||
* dump_video example now makes YUV4MPEG files by default, so
|
||||
@@ -220,7 +269,7 @@ libtheora 1.0alpha3 (2004 March 20)
|
||||
- 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.
|
||||
- support for a range of interpolated quant matrices.
|
||||
- include the in-loop block filter coeff.
|
||||
* Bitsteam data packet FORMAT CHANGES:
|
||||
- Reserve a bit for per-block Q index selection.
|
||||
|
||||
+15
-10
@@ -10,13 +10,13 @@ while allowing it a longer useful lifetime.
|
||||
The 1.0 release decoder supported all the new features, but the
|
||||
encoder is nearly identical to the VP3 code.
|
||||
|
||||
The 1.1 release featured a completely rewritten encoder, offering
|
||||
better performance and compression, and making more complete use
|
||||
of the format's feature set.
|
||||
The 1.1 release, codenamed Thusnelda, featured a completely rewritten
|
||||
encoder, offering better performance and compression, and making more
|
||||
complete use of the format's feature set.
|
||||
|
||||
The 1.2 release features significant additional improvements in
|
||||
compression and performance. Files produced by newer encoders can
|
||||
be decoded by earlier releases.
|
||||
The 1.2 release, codenamed Ptalarbvorm, features significant
|
||||
additional improvements in compression and performance. Files produced
|
||||
by newer encoders can be decoded by earlier releases.
|
||||
|
||||
### Where is Theora?
|
||||
|
||||
@@ -35,7 +35,7 @@ Requirements summary:
|
||||
|
||||
For libtheora:
|
||||
|
||||
* libogg 1.1 or newer.
|
||||
* libogg 1.3.4 or newer.
|
||||
|
||||
For example encoder:
|
||||
|
||||
@@ -59,7 +59,9 @@ For the player only:
|
||||
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.
|
||||
considered a bug; please report problems to theora-dev@xiph.org,
|
||||
https://lists.xiph.org/mailman/listinfo/theora-dev or preferably to
|
||||
https://gitlab.xiph.org/xiph/theora.
|
||||
|
||||
Windows build support is included in the win32 directory.
|
||||
|
||||
@@ -67,6 +69,9 @@ Project files for Apple XCode are included in the macosx directory.
|
||||
|
||||
There is also a more limited scons build.
|
||||
|
||||
The mailing list theora@xiph.org has been created for discussing use
|
||||
of the theora video codec, https://lists.xiph.org/mailman/listinfo/theora.
|
||||
|
||||
### How do I use the sample encoder?
|
||||
|
||||
The sample encoder takes raw video in YUV4MPEG2 format, as used by
|
||||
@@ -111,7 +116,7 @@ Jan Gerber's ffmpeg2theora is an excellent encoding front end.
|
||||
|
||||
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
|
||||
This means you have version of libogg prior to 1.3.4. A *complete* new Ogg
|
||||
install, libs and headers is needed.
|
||||
|
||||
Also be sure that there aren't multiple copies of Ogg installed in
|
||||
@@ -122,7 +127,7 @@ for libs and headers.
|
||||
|
||||
undefined reference to `oggpackB_stream`
|
||||
|
||||
See above; you need libogg 1.1 or later.
|
||||
See above; you need libogg 1.3.4 or later.
|
||||
|
||||
### Link error, such as:
|
||||
|
||||
|
||||
@@ -4,4 +4,4 @@ made were those applied by update.sh and the addition/update of
|
||||
Makefile.in files for the UXP build system.
|
||||
|
||||
The upstream release used was https://gitlab.xiph.org/xiph/theora
|
||||
The git revision used was 7180717276af1ebc7da15c83162d6c5d6203aabf.
|
||||
The version used was tagged v1.2.0.
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id: theora.h,v 1.8 2004/03/15 22:17:32 derf Exp $
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -22,13 +21,13 @@
|
||||
* This is the documentation for the <tt>libtheora</tt> C API.
|
||||
*
|
||||
* The \c libtheora package is the current reference
|
||||
* implementation for <a href="http://www.theora.org/">Theora</a>, a free,
|
||||
* implementation for <a href="https://www.theora.org/">Theora</a>, a free,
|
||||
* patent-unencumbered video codec.
|
||||
* Theora is derived from On2's VP3 codec with additional features and
|
||||
* integration with Ogg multimedia formats by
|
||||
* <a href="http://www.xiph.org/">the Xiph.Org Foundation</a>.
|
||||
* <a href="https://www.xiph.org/">the Xiph.Org Foundation</a>.
|
||||
* Complete documentation of the format itself is available in
|
||||
* <a href="http://www.theora.org/doc/Theora.pdf">the Theora
|
||||
* <a href="https://www.theora.org/doc/Theora.pdf">the Theora
|
||||
* specification</a>.
|
||||
*
|
||||
* \section Organization
|
||||
@@ -47,7 +46,7 @@
|
||||
* During initial development, prior to the 1.0 release,
|
||||
* \c libtheora exported a different \ref oldfuncs which
|
||||
* combined both encode and decode functions.
|
||||
* In general, legacy API symbols can be indentified
|
||||
* In general, legacy API symbols can be identified
|
||||
* by their \c theora_ or \c OC_ namespace prefixes.
|
||||
* The current API uses \c th_ or \c TH_ instead.
|
||||
*
|
||||
@@ -62,8 +61,8 @@
|
||||
* The shared <tt>libtheoradec</tt> and <tt>libtheoraenc</tt> C API.
|
||||
* You don't need to include this directly.*/
|
||||
|
||||
#if !defined(_O_THEORA_CODEC_H_)
|
||||
# define _O_THEORA_CODEC_H_ (1)
|
||||
#if !defined(OGG_THEORA_CODEC_HEADER)
|
||||
# define OGG_THEORA_CODEC_HEADER (1)
|
||||
# include <ogg/ogg.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
@@ -95,7 +94,7 @@ extern "C" {
|
||||
/*@}*/
|
||||
|
||||
/**The currently defined color space tags.
|
||||
* See <a href="http://www.theora.org/doc/Theora.pdf">the Theora
|
||||
* See <a href="https://www.theora.org/doc/Theora.pdf">the Theora
|
||||
* specification</a>, Chapter 4, for exact details on the meaning
|
||||
* of each of these color spaces.*/
|
||||
typedef enum{
|
||||
@@ -111,7 +110,7 @@ typedef enum{
|
||||
}th_colorspace;
|
||||
|
||||
/**The currently defined pixel format tags.
|
||||
* See <a href="http://www.theora.org/doc/Theora.pdf">the Theora
|
||||
* See <a href="https://www.theora.org/doc/Theora.pdf">the Theora
|
||||
* specification</a>, Section 4.4, for details on the precise sample
|
||||
* locations.*/
|
||||
typedef enum{
|
||||
@@ -195,7 +194,7 @@ typedef th_img_plane th_ycbcr_buffer[3];
|
||||
*
|
||||
* It is also generally recommended that the offsets and sizes should still be
|
||||
* multiples of 2 to avoid chroma sampling shifts when chroma is sub-sampled.
|
||||
* See <a href="http://www.theora.org/doc/Theora.pdf">the Theora
|
||||
* See <a href="https://www.theora.org/doc/Theora.pdf">the Theora
|
||||
* specification</a>, Section 4.4, for more details.
|
||||
*
|
||||
* Frame rate, in frames per second, is stored as a rational fraction, as is
|
||||
@@ -314,7 +313,7 @@ typedef struct{
|
||||
* A particular tag may occur more than once, and order is significant.
|
||||
* The character set encoding for the strings is always UTF-8, but the tag
|
||||
* names are limited to ASCII, and treated as case-insensitive.
|
||||
* See <a href="http://www.theora.org/doc/Theora.pdf">the Theora
|
||||
* See <a href="https://www.theora.org/doc/Theora.pdf">the Theora
|
||||
* specification</a>, Section 6.3.3 for details.
|
||||
*
|
||||
* In filling in this structure, th_decode_headerin() will null-terminate
|
||||
@@ -603,4 +602,4 @@ extern void th_comment_clear(th_comment *_tc);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* OGG_THEORA_CODEC_HEADER */
|
||||
|
||||
@@ -6,17 +6,16 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id: theora.h,v 1.17 2003/12/06 18:06:19 arc Exp $
|
||||
|
||||
********************************************************************/
|
||||
|
||||
#ifndef _O_THEORA_H_
|
||||
#define _O_THEORA_H_
|
||||
#ifndef OGG_THEORA_HEADER
|
||||
#define OGG_THEORA_HEADER
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
@@ -41,16 +40,16 @@ extern "C"
|
||||
* declared in theoradec.h and theoraenc.h.
|
||||
*
|
||||
* libtheora is the reference implementation for
|
||||
* <a href="http://www.theora.org/">Theora</a>, a free video codec.
|
||||
* <a href="https://www.theora.org/">Theora</a>, a free video codec.
|
||||
* Theora is derived from On2's VP3 codec with improved integration with
|
||||
* Ogg multimedia formats by <a href="http://www.xiph.org/">Xiph.Org</a>.
|
||||
* Ogg multimedia formats by <a href="https://www.xiph.org/">Xiph.Org</a>.
|
||||
*
|
||||
* \section overview Overview
|
||||
*
|
||||
* This library will both decode and encode theora packets to/from raw YUV
|
||||
* frames. In either case, the packets will most likely either come from or
|
||||
* need to be embedded in an Ogg stream. Use
|
||||
* <a href="http://xiph.org/ogg/">libogg</a> or
|
||||
* <a href="https://www.xiph.org/ogg/">libogg</a> or
|
||||
* <a href="http://www.annodex.net/software/liboggz/index.html">liboggz</a>
|
||||
* to extract/package these packets.
|
||||
*
|
||||
@@ -260,7 +259,7 @@ typedef struct{
|
||||
* the 'comment' header packet.
|
||||
*
|
||||
* Meta data is stored as a series of (tag, value) pairs, in
|
||||
* length-encoded string vectors. The first occurence of the
|
||||
* length-encoded string vectors. The first occurrence of the
|
||||
* '=' character delimits the tag and value. A particular tag
|
||||
* may occur more than once. The character set encoding for
|
||||
* the strings is always UTF-8, but the tag names are limited
|
||||
@@ -330,7 +329,7 @@ typedef struct theora_comment{
|
||||
* Call this after a seek, to update the internal granulepos
|
||||
* in the decoder, to insure that subsequent frames are marked
|
||||
* properly. If you track timestamps yourself and do not use
|
||||
* the granule postion returned by the decoder, then you do
|
||||
* the granule position returned by the decoder, then you do
|
||||
* not need to use this control.
|
||||
*/
|
||||
#define TH_DECCTL_SET_GRANPOS (5)
|
||||
@@ -755,7 +754,7 @@ extern char *theora_comment_query(theora_comment *tc, char *tag, int count);
|
||||
* \param tag The tag to look up
|
||||
* \returns The number on instances of a particular tag.
|
||||
*
|
||||
* Call this first when querying for a specific tag and then interate
|
||||
* Call this first when querying for a specific tag and then iterate
|
||||
* over the number of instances with separate calls to
|
||||
* theora_comment_query() to retrieve all instances in order.
|
||||
**/
|
||||
@@ -783,4 +782,4 @@ extern int theora_control(theora_state *th,int req,void *buf,size_t buf_sz);
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _O_THEORA_H_ */
|
||||
#endif /* OGG_THEORA_HEADER */
|
||||
|
||||
@@ -6,20 +6,19 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id: theora.h,v 1.8 2004/03/15 22:17:32 derf Exp $
|
||||
|
||||
********************************************************************/
|
||||
|
||||
/**\file
|
||||
* The <tt>libtheoradec</tt> C decoding API.*/
|
||||
|
||||
#if !defined(_O_THEORA_THEORADEC_H_)
|
||||
# define _O_THEORA_THEORADEC_H_ (1)
|
||||
#if !defined(OGG_THEORA_THEORADEC_HEADER)
|
||||
# define OGG_THEORA_THEORADEC_HEADER (1)
|
||||
# include <stddef.h>
|
||||
# include <ogg/ogg.h>
|
||||
# include "codec.h"
|
||||
@@ -330,4 +329,4 @@ extern void th_decode_free(th_dec_ctx *_dec);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* OGG_THEORA_THEORADEC_HEADER */
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id: x86int.h 17344 2010-07-21 01:42:18Z tterribe $
|
||||
|
||||
********************************************************************/
|
||||
#if !defined(_arm_armbits_H)
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
;* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
;* *
|
||||
;* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 *
|
||||
;* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
;* by the Xiph.Org Foundation and contributors *
|
||||
;* https://www.xiph.org/ *
|
||||
;* *
|
||||
;********************************************************************
|
||||
;
|
||||
; function:
|
||||
; last mod: $Id$
|
||||
;
|
||||
;********************************************************************
|
||||
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
CPU capability detection for ARM processors.
|
||||
|
||||
function:
|
||||
last mod: $Id: cpu.c 17344 2010-07-21 01:42:18Z tterribe $
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -147,7 +147,7 @@ ogg_uint32_t oc_cpu_flags_get(void) {
|
||||
|
||||
#else
|
||||
/*The feature registers which can tell us what the processor supports are
|
||||
accessible in priveleged modes only, so we can't have a general user-space
|
||||
accessible in privileged modes only, so we can't have a general user-space
|
||||
detection method like on x86.*/
|
||||
# error "Configured to use ARM asm but no CPU detection method available for " \
|
||||
"your platform. Reconfigure with --disable-asm (or send patches)."
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
function:
|
||||
last mod: $Id: cpu.h 17344 2010-07-21 01:42:18Z tterribe $
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
;* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
;* *
|
||||
;* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 *
|
||||
;* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
;* by the Xiph.Org Foundation and contributors *
|
||||
;* https://www.xiph.org/ *
|
||||
;* *
|
||||
;********************************************************************
|
||||
; Original implementation:
|
||||
; Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd
|
||||
; last mod: $Id$
|
||||
;********************************************************************
|
||||
|
||||
AREA |.text|, CODE, READONLY
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
;* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
;* *
|
||||
;* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 *
|
||||
;* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
;* by the Xiph.Org Foundation and contributors *
|
||||
;* https://www.xiph.org/ *
|
||||
;* *
|
||||
;********************************************************************
|
||||
; Original implementation:
|
||||
; Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd
|
||||
; last mod: $Id$
|
||||
;********************************************************************
|
||||
|
||||
AREA |.text|, CODE, READONLY
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id: x86int.h 17344 2010-07-21 01:42:18Z tterribe $
|
||||
|
||||
********************************************************************/
|
||||
#if !defined(_arm_armint_H)
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
;* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
;* *
|
||||
;* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 *
|
||||
;* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
;* by the Xiph.Org Foundation and contributors *
|
||||
;* https://www.xiph.org/ *
|
||||
;* *
|
||||
;********************************************************************
|
||||
; Original implementation:
|
||||
; Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd
|
||||
; last mod: $Id$
|
||||
;********************************************************************
|
||||
|
||||
AREA |.text|, CODE, READONLY
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
;* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
;* *
|
||||
;* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 *
|
||||
;* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
;* by the Xiph.Org Foundation and contributors *
|
||||
;* https://www.xiph.org/ *
|
||||
;* *
|
||||
;********************************************************************
|
||||
; Original implementation:
|
||||
; Copyright (C) 2009 Robin Watts for Pinknoise Productions Ltd
|
||||
; last mod: $Id$
|
||||
;********************************************************************
|
||||
|
||||
; Set the following to 1 if we have EDSP instructions
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2010 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id: x86state.c 17344 2010-07-21 01:42:18Z tterribe $
|
||||
|
||||
********************************************************************/
|
||||
#include "armint.h"
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggTheora SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: packing variable sized words into an octet stream
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
#include <string.h>
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE OggTheora SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function: packing variable sized words into an octet stream
|
||||
last mod: $Id: bitwise.c 7675 2004-09-01 00:34:39Z xiphmont $
|
||||
|
||||
********************************************************************/
|
||||
#if !defined(_bitpack_H)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.2.0alpha1+git"
|
||||
#define PACKAGE_VERSION "1.2.0"
|
||||
|
||||
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||
required in a freestanding environment). This macro is provided for
|
||||
@@ -100,4 +100,4 @@
|
||||
/* #undef THEORA_DISABLE_ENCODE */
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.2.0alpha1+git"
|
||||
#define VERSION "1.2.0"
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -134,28 +134,33 @@ static int oc_comment_unpack(oc_pack_buf *_opb,th_comment *_tc){
|
||||
_tc->comments=0;
|
||||
return TH_EBADHEADER;
|
||||
}
|
||||
_tc->comment_lengths=(int *)_ogg_malloc(
|
||||
_tc->comments*sizeof(_tc->comment_lengths[0]));
|
||||
_tc->user_comments=(char **)_ogg_malloc(
|
||||
_tc->comments*sizeof(_tc->user_comments[0]));
|
||||
if(_tc->comment_lengths==NULL||_tc->user_comments==NULL){
|
||||
_tc->comments=0;
|
||||
return TH_EFAULT;
|
||||
}
|
||||
for(i=0;i<_tc->comments;i++){
|
||||
len=oc_unpack_length(_opb);
|
||||
if(len<0||len>oc_pack_bytes_left(_opb)){
|
||||
_tc->comments=i;
|
||||
return TH_EBADHEADER;
|
||||
}
|
||||
_tc->comment_lengths[i]=len;
|
||||
_tc->user_comments[i]=_ogg_malloc((size_t)len+1);
|
||||
if(_tc->user_comments[i]==NULL){
|
||||
_tc->comments=i;
|
||||
if(0<_tc->comments){
|
||||
_tc->comment_lengths=(int *)_ogg_malloc(
|
||||
_tc->comments*sizeof(_tc->comment_lengths[0]));
|
||||
_tc->user_comments=(char **)_ogg_malloc(
|
||||
_tc->comments*sizeof(_tc->user_comments[0]));
|
||||
if(_tc->comment_lengths==NULL||_tc->user_comments==NULL){
|
||||
_tc->comments=0;
|
||||
return TH_EFAULT;
|
||||
}
|
||||
oc_unpack_octets(_opb,_tc->user_comments[i],len);
|
||||
_tc->user_comments[i][len]='\0';
|
||||
for(i=0;i<_tc->comments;i++){
|
||||
len=oc_unpack_length(_opb);
|
||||
if(len<0||len>oc_pack_bytes_left(_opb)){
|
||||
_tc->comments=i;
|
||||
return TH_EBADHEADER;
|
||||
}
|
||||
_tc->comment_lengths[i]=len;
|
||||
_tc->user_comments[i]=_ogg_malloc((size_t)len+1);
|
||||
if(_tc->user_comments[i]==NULL){
|
||||
_tc->comments=i;
|
||||
return TH_EFAULT;
|
||||
}
|
||||
oc_unpack_octets(_opb,_tc->user_comments[i],len);
|
||||
_tc->user_comments[i][len]='\0';
|
||||
}
|
||||
} else {
|
||||
_tc->comment_lengths=NULL;
|
||||
_tc->user_comments=NULL;
|
||||
}
|
||||
return oc_pack_bytes_left(_opb)<0?TH_EBADHEADER:0;
|
||||
}
|
||||
@@ -219,7 +224,7 @@ static int oc_dec_headerin(oc_pack_buf *_opb,th_info *_info,
|
||||
/*Comment header.*/
|
||||
case 0x81:{
|
||||
if(_tc==NULL)return TH_EFAULT;
|
||||
/*We shoud have already decoded the info header, and should not yet have
|
||||
/*We should have already decoded the info header, and should not yet have
|
||||
decoded the comment header.*/
|
||||
if(_info->frame_width==0||_tc->vendor!=NULL)return TH_EBADHEADER;
|
||||
ret=oc_comment_unpack(_opb,_tc);
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -86,12 +86,12 @@ struct oc_dec_pipeline_state{
|
||||
from buffer overflow.
|
||||
We make it fully twice as large so that the second half can serve as the
|
||||
reconstruction buffer, which saves passing another parameter to all the
|
||||
acceleration functios.
|
||||
acceleration functions.
|
||||
It also solves problems with 16-byte alignment for NEON on ARM.
|
||||
gcc (as of 4.2.1) only seems to be able to give stack variables 8-byte
|
||||
alignment, and silently produces incorrect results if you ask for 16.
|
||||
Finally, keeping it off the stack means there's less likely to be a data
|
||||
hazard beween the NEON co-processor and the regular ARM core, which avoids
|
||||
hazard between the NEON co-processor and the regular ARM core, which avoids
|
||||
unnecessary stalls.*/
|
||||
OC_ALIGN16(ogg_int16_t dct_coeffs[128]);
|
||||
OC_ALIGN16(signed char bounding_values[256]);
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009,2025 *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -147,7 +147,7 @@ static const unsigned char OC_INTERNAL_DCT_TOKEN_EXTRA_BITS[15]={
|
||||
((_eobs)<<OC_DCT_CW_EOB_SHIFT| \
|
||||
(_rlen)<<OC_DCT_CW_RLEN_SHIFT| \
|
||||
(_flip)<<OC_DCT_CW_FLIP_BIT| \
|
||||
(_mag)-(_flip)<<OC_DCT_CW_MAG_SHIFT)
|
||||
((_mag)-(_flip))*(1<<OC_DCT_CW_MAG_SHIFT))
|
||||
|
||||
/*A special code word value that signals the end of the frame (a long EOB run
|
||||
of zero).*/
|
||||
@@ -1755,13 +1755,13 @@ static void oc_dec_deblock_frag_rows(oc_dec_ctx *_dec,
|
||||
flimit=(qstep*3)>>2;
|
||||
oc_filter_hedge(dst+x,dst_ystride,src+x-src_ystride,src_ystride,
|
||||
qstep,flimit,variance,variance+nhfrags);
|
||||
oc_filter_vedge(dst+x-(dst_ystride<<2)-4,dst_ystride,
|
||||
oc_filter_vedge(dst+x-(dst_ystride*4)-4,dst_ystride,
|
||||
qstep,flimit,variance-1);
|
||||
variance++;
|
||||
dc_qi++;
|
||||
}
|
||||
dst+=dst_ystride<<3;
|
||||
src+=src_ystride<<3;
|
||||
dst+=dst_ystride*8;
|
||||
src+=src_ystride*8;
|
||||
}
|
||||
/*And finally, handle the last row in the frame, if it's in the range.*/
|
||||
if(!notdone){
|
||||
@@ -1777,7 +1777,7 @@ static void oc_dec_deblock_frag_rows(oc_dec_ctx *_dec,
|
||||
for(x=8;x<width;x+=8){
|
||||
qstep=_dec->pp_dc_scale[*dc_qi++];
|
||||
flimit=(qstep*3)>>2;
|
||||
oc_filter_vedge(dst+x-(dst_ystride<<3)-4,dst_ystride,
|
||||
oc_filter_vedge(dst+x-(dst_ystride*8)-4,dst_ystride,
|
||||
qstep,flimit,variance++);
|
||||
}
|
||||
}
|
||||
@@ -1952,7 +1952,7 @@ static void oc_dec_dering_frag_rows(oc_dec_ctx *_dec,th_img_plane *_img,
|
||||
frag++;
|
||||
variance++;
|
||||
}
|
||||
idata+=ystride<<3;
|
||||
idata+=ystride*8;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2101,7 +2101,7 @@ static void oc_render_telemetry(th_dec_ctx *_dec,th_ycbcr_buffer _ycbcr,
|
||||
hdec=!(_dec->state.info.pixel_fmt&1);
|
||||
vdec=!(_dec->state.info.pixel_fmt&2);
|
||||
/*Lazy data buffer init.
|
||||
We could try to re-use the post-processing buffer, which would save
|
||||
We could try to reuse the post-processing buffer, which would save
|
||||
memory, but complicate the allocation logic there.
|
||||
I don't think anyone cares about memory usage when using telemetry; it is
|
||||
not meant for embedded devices.*/
|
||||
@@ -2674,10 +2674,10 @@ static void oc_render_telemetry(th_dec_ctx *_dec,th_ycbcr_buffer _ycbcr,
|
||||
u_row[x>>1]=OC_CLAMP255(u);
|
||||
v_row[x>>1]=OC_CLAMP255(v);
|
||||
}
|
||||
y_row+=_ycbcr[0].stride<<1;
|
||||
y_row+=_ycbcr[0].stride*2;
|
||||
u_row+=_ycbcr[1].stride;
|
||||
v_row+=_ycbcr[2].stride;
|
||||
rgb_row+=cstride<<1;
|
||||
rgb_row+=cstride*2;
|
||||
}
|
||||
}break;
|
||||
case TH_PF_422:{
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
#include <string.h>
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009,2025 *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -225,6 +225,7 @@ int oc_huff_tree_unpack(oc_pack_buf *_opb,unsigned char _tokens[256][2]){
|
||||
_tokens[ntokens][1]=(unsigned char)(len+neb);
|
||||
ntokens++;
|
||||
}
|
||||
if(len<=0)break;
|
||||
code_bit=0x80000000U>>len-1;
|
||||
while(len>0&&(code&code_bit)){
|
||||
code^=code_bit;
|
||||
@@ -442,13 +443,10 @@ static size_t oc_huff_tree_size(const ogg_int16_t *_tree,int _node){
|
||||
_src: The array of trees to copy.*/
|
||||
int oc_huff_trees_copy(ogg_int16_t *_dst[TH_NHUFFMAN_TABLES],
|
||||
const ogg_int16_t *const _src[TH_NHUFFMAN_TABLES]){
|
||||
int total;
|
||||
int i;
|
||||
total=0;
|
||||
for(i=0;i<TH_NHUFFMAN_TABLES;i++){
|
||||
size_t size;
|
||||
size=oc_huff_tree_size(_src[i],0);
|
||||
total+=size;
|
||||
_dst[i]=(ogg_int16_t *)_ogg_malloc(size*sizeof(*_dst[i]));
|
||||
if(_dst[i]==NULL){
|
||||
while(i-->0)_ogg_free(_dst[i]);
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
#if !defined(_internal_H)
|
||||
@@ -44,6 +44,10 @@
|
||||
# if __GNUC_PREREQ(4,2)
|
||||
# pragma GCC diagnostic ignored "-Wparentheses"
|
||||
# endif
|
||||
/*Et tu, clang.*/
|
||||
# if defined(__clang__)
|
||||
# pragma clang diagnostic ignored "-Wparentheses"
|
||||
# endif
|
||||
|
||||
/*Some assembly constructs require aligned operands.
|
||||
The following macros are _only_ intended for structure member declarations.
|
||||
@@ -72,7 +76,7 @@
|
||||
|
||||
|
||||
/*This library's version.*/
|
||||
# define OC_VENDOR_STRING "Xiph.Org libtheora 1.2.0alpha 20100924 (Ptalarbvorm)"
|
||||
# define OC_VENDOR_STRING "Xiph.Org libtheora 1.2.0 20250329 (Ptalarbvorm)"
|
||||
|
||||
/*Theora bitstream version.*/
|
||||
# define TH_VERSION_MAJOR (3)
|
||||
|
||||
@@ -67,7 +67,7 @@ int oc_ilog64(ogg_int64_t _v);
|
||||
* This is the number of bits that would be required to represent _v in two's
|
||||
* complement notation with all of the leading zeros stripped.
|
||||
*/
|
||||
# define OC_ILOG_32(_v) (OC_ILOGNZ_32(_v)&-!!(_v))
|
||||
# define OC_ILOG_32(_v) ((_v)?OC_ILOGNZ_32(_v):0)
|
||||
# else
|
||||
# define OC_ILOGNZ_32(_v) (oc_ilog32(_v))
|
||||
# define OC_ILOG_32(_v) (oc_ilog32(_v))
|
||||
@@ -90,7 +90,7 @@ int oc_ilog64(ogg_int64_t _v);
|
||||
* This is the number of bits that would be required to represent _v in two's
|
||||
* complement notation with all of the leading zeros stripped.
|
||||
*/
|
||||
# define OC_ILOG_64(_v) (OC_ILOGNZ_64(_v)&-!!(_v))
|
||||
# define OC_ILOG_64(_v) ((_v)?OC_ILOGNZ_64(_v):0)
|
||||
# else
|
||||
# define OC_ILOGNZ_64(_v) (oc_ilog64(_v))
|
||||
# define OC_ILOG_64(_v) (oc_ilog64(_v))
|
||||
@@ -131,7 +131,7 @@ int oc_ilog64(ogg_int64_t _v);
|
||||
*/
|
||||
# define OC_STATIC_ILOG_64(_v) (OC_STATIC_ILOG6((ogg_int64_t)(_v)))
|
||||
|
||||
#define OC_Q57(_v) ((ogg_int64_t)(_v)<<57)
|
||||
#define OC_Q57(_v) ((_v)*((ogg_int64_t)1<<57))
|
||||
#define OC_Q10(_v) ((_v)<<10)
|
||||
|
||||
ogg_int64_t oc_bexp64(ogg_int64_t _z);
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -34,13 +34,13 @@
|
||||
speed difference between the two approaches is not measurable).
|
||||
Interestingly, the bit-twiddling method was patented in 2000 (US 6,073,150)
|
||||
by Sun Microsystems, despite prior art dating back to at least 1996:
|
||||
http://web.archive.org/web/19961201174141/www.x86.org/ftp/articles/pentopt/PENTOPT.TXT
|
||||
https://web.archive.org/web/19961201174141/www.x86.org/ftp/articles/pentopt/PENTOPT.TXT
|
||||
On gcc 3.x, however, our assumption is not true, as abs() is translated to a
|
||||
conditional jump, which is horrible on deeply piplined architectures (e.g.,
|
||||
all consumer architectures for the past decade or more).
|
||||
Also be warned that -C*abs(x) where C is a constant is mis-optimized as
|
||||
abs(C*x) on every gcc release before 4.2.3.
|
||||
See bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34130 */
|
||||
See bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34130 */
|
||||
|
||||
/*Modern gcc (4.x) can compile the naive versions of min and max with cmov if
|
||||
given an appropriate architecture, but the branchless bit-twiddling versions
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -66,7 +66,7 @@ void oc_dequant_tables_init(ogg_uint16_t *_dequant[64][3][2],
|
||||
qi_start=qi;
|
||||
if(qri==_qinfo->qi_ranges[qti][pli].nranges)qi_end=qi+1;
|
||||
else qi_end=qi+_qinfo->qi_ranges[qti][pli].sizes[qri];
|
||||
/*Iterate over quality indicies in this range.*/
|
||||
/*Iterate over quality indices in this range.*/
|
||||
for(;;){
|
||||
ogg_uint32_t qfac;
|
||||
int zzi;
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009,2025 *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -388,7 +388,7 @@ static void oc_state_border_init(oc_theora_state *_state){
|
||||
/*Otherwise, check to see if it straddles the border.*/
|
||||
else if(x<crop_x0&&crop_x0<x+8||x<crop_xf&&crop_xf<x+8||
|
||||
y<crop_y0&&crop_y0<y+8||y<crop_yf&&crop_yf<y+8){
|
||||
ogg_int64_t mask;
|
||||
ogg_uint64_t mask;
|
||||
int npixels;
|
||||
int i;
|
||||
mask=npixels=0;
|
||||
@@ -396,7 +396,7 @@ static void oc_state_border_init(oc_theora_state *_state){
|
||||
int j;
|
||||
for(j=0;j<8;j++){
|
||||
if(x+j>=crop_x0&&x+j<crop_xf&&y+i>=crop_y0&&y+i<crop_yf){
|
||||
mask|=(ogg_int64_t)1<<(i<<3|j);
|
||||
mask|=(ogg_uint64_t)1<<(i<<3|j);
|
||||
npixels++;
|
||||
}
|
||||
}
|
||||
@@ -651,7 +651,7 @@ static int oc_state_ref_bufs_init(oc_theora_state *_state,int _nrefs){
|
||||
frag_buf_offs[fragi]=hpix-ref_frame_data;
|
||||
hpix+=8;
|
||||
}
|
||||
vpix+=stride<<3;
|
||||
vpix+=stride*8;
|
||||
}
|
||||
}
|
||||
/*Initialize the reference frame pointers and indices.*/
|
||||
@@ -1053,7 +1053,7 @@ void oc_loop_filter_init_c(signed char _bv[256],int _flimit){
|
||||
_fragy0: The Y coordinate of the first fragment row to filter.
|
||||
_fragy_end: The Y coordinate of the fragment row to stop filtering at.*/
|
||||
void oc_state_loop_filter_frag_rows_c(const oc_theora_state *_state,
|
||||
signed char *_bv,int _refi,int _pli,int _fragy0,int _fragy_end){
|
||||
signed char _bvarray[256],int _refi,int _pli,int _fragy0,int _fragy_end){
|
||||
const oc_fragment_plane *fplane;
|
||||
const oc_fragment *frags;
|
||||
const ptrdiff_t *frag_buf_offs;
|
||||
@@ -1064,7 +1064,7 @@ void oc_state_loop_filter_frag_rows_c(const oc_theora_state *_state,
|
||||
ptrdiff_t fragi0_end;
|
||||
int ystride;
|
||||
int nhfrags;
|
||||
_bv+=127;
|
||||
signed char *_bv = &_bvarray[127];
|
||||
fplane=_state->fplanes+_pli;
|
||||
nhfrags=fplane->nhfrags;
|
||||
fragi_top=fplane->froffset;
|
||||
@@ -1095,7 +1095,7 @@ void oc_state_loop_filter_frag_rows_c(const oc_theora_state *_state,
|
||||
loop_filter_h(ref+8,ystride,_bv);
|
||||
}
|
||||
if(fragi+nhfrags<fragi_bot&&!frags[fragi+nhfrags].coded){
|
||||
loop_filter_v(ref+(ystride<<3),ystride,_bv);
|
||||
loop_filter_v(ref+(ystride*8),ystride,_bv);
|
||||
}
|
||||
}
|
||||
fragi++;
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009,2025 *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id: internal.h 17337 2010-07-19 16:08:54Z tterribe $
|
||||
|
||||
********************************************************************/
|
||||
#if !defined(_state_H)
|
||||
@@ -229,7 +229,7 @@ typedef struct oc_theora_state oc_theora_state;
|
||||
|
||||
|
||||
|
||||
#define OC_MV(_x,_y) ((oc_mv)((_x)&0xFF|(_y)<<8))
|
||||
#define OC_MV(_x,_y) ((oc_mv)((_x)&0xFF|(_y)*256))
|
||||
#define OC_MV_X(_mv) ((signed char)(_mv))
|
||||
#define OC_MV_Y(_mv) ((_mv)>>8)
|
||||
#define OC_MV_ADD(_mv1,_mv2) \
|
||||
@@ -523,7 +523,7 @@ void oc_idct8x8_c(ogg_int16_t _y[64],ogg_int16_t _x[64],int _last_zzi);
|
||||
void oc_state_frag_recon_c(const oc_theora_state *_state,ptrdiff_t _fragi,
|
||||
int _pli,ogg_int16_t _dct_coeffs[128],int _last_zzi,ogg_uint16_t _dc_quant);
|
||||
void oc_state_loop_filter_frag_rows_c(const oc_theora_state *_state,
|
||||
signed char _bv[256],int _refi,int _pli,int _fragy0,int _fragy_end);
|
||||
signed char _bvarray[256],int _refi,int _pli,int _fragy0,int _fragy_end);
|
||||
void oc_restore_fpu_c(void);
|
||||
|
||||
/*We need a way to call a few encoder functions without introducing a link-time
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009,2025 *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -216,7 +216,7 @@ void oc_frag_recon_intra_mmx(unsigned char *_dst,int _ystride,
|
||||
:
|
||||
:[residue]"r"(_residue),
|
||||
[dst]"r"(_dst),
|
||||
[dst4]"r"(_dst+(_ystride<<2)),
|
||||
[dst4]"r"(_dst+(_ystride*4)),
|
||||
[ystride]"r"((ptrdiff_t)_ystride),
|
||||
[ystride3]"r"((ptrdiff_t)_ystride*3)
|
||||
:"memory"
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009,2025 *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -312,7 +312,7 @@ static void oc_idct8x8_slow_mmx(ogg_int16_t _y[64],ogg_int16_t _x[64]){
|
||||
#undef OC_J
|
||||
:[y]"=m"OC_ARRAY_OPERAND(ogg_int16_t,_y,64)
|
||||
:[x]"m"OC_CONST_ARRAY_OPERAND(ogg_int16_t,_x,64),
|
||||
[c]"m"OC_CONST_ARRAY_OPERAND(ogg_int16_t,OC_IDCT_CONSTS,128)
|
||||
[c]"m"OC_CONST_ARRAY_OPERAND(ogg_int16_t,OC_IDCT_CONSTS,64)
|
||||
);
|
||||
__asm__ __volatile__("pxor %%mm0,%%mm0\n\t"::);
|
||||
for(i=0;i<4;i++){
|
||||
@@ -510,7 +510,7 @@ static void oc_idct8x8_10_mmx(ogg_int16_t _y[64],ogg_int16_t _x[64]){
|
||||
#undef OC_J
|
||||
:[y]"=m"OC_ARRAY_OPERAND(ogg_int16_t,_y,64)
|
||||
:[x]"m"OC_CONST_ARRAY_OPERAND(ogg_int16_t,_x,64),
|
||||
[c]"m"OC_CONST_ARRAY_OPERAND(ogg_int16_t,OC_IDCT_CONSTS,128)
|
||||
[c]"m"OC_CONST_ARRAY_OPERAND(ogg_int16_t,OC_IDCT_CONSTS,64)
|
||||
);
|
||||
__asm__ __volatile__(
|
||||
"pxor %%mm0,%%mm0\n\t"
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -147,7 +147,7 @@ void oc_state_loop_filter_frag_rows_mmx(const oc_theora_state *_state,
|
||||
OC_LOOP_FILTER_H(OC_LOOP_FILTER8_MMX,ref+8,ystride,ll);
|
||||
}
|
||||
if(fragi+nhfrags<fragi_bot&&!frags[fragi+nhfrags].coded){
|
||||
OC_LOOP_FILTER_V(OC_LOOP_FILTER8_MMX,ref+(ystride<<3),ystride,ll);
|
||||
OC_LOOP_FILTER_V(OC_LOOP_FILTER8_MMX,ref+(ystride*8),ystride,ll);
|
||||
}
|
||||
}
|
||||
fragi++;
|
||||
@@ -214,7 +214,7 @@ void oc_state_loop_filter_frag_rows_mmxext(const oc_theora_state *_state,
|
||||
OC_LOOP_FILTER_H(OC_LOOP_FILTER8_MMXEXT,ref+8,ystride,_bv);
|
||||
}
|
||||
if(fragi+nhfrags<fragi_bot&&!frags[fragi+nhfrags].coded){
|
||||
OC_LOOP_FILTER_V(OC_LOOP_FILTER8_MMXEXT,ref+(ystride<<3),ystride,_bv);
|
||||
OC_LOOP_FILTER_V(OC_LOOP_FILTER8_MMXEXT,ref+(ystride*8),ystride,_bv);
|
||||
}
|
||||
}
|
||||
fragi++;
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009,2025 *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id: mmxidct.c 16503 2009-08-22 18:14:02Z giles $
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -229,7 +229,7 @@ static void oc_idct8x8_slow_sse2(ogg_int16_t _y[64],ogg_int16_t _x[64]){
|
||||
:[buf]"=m"(OC_ARRAY_OPERAND(ogg_int16_t,buf,16)),
|
||||
[y]"=m"(OC_ARRAY_OPERAND(ogg_int16_t,_y,64))
|
||||
:[x]"m"(OC_CONST_ARRAY_OPERAND(ogg_int16_t,_x,64)),
|
||||
[c]"m"(OC_CONST_ARRAY_OPERAND(ogg_int16_t,OC_IDCT_CONSTS,128))
|
||||
[c]"m"(OC_CONST_ARRAY_OPERAND(ogg_int16_t,OC_IDCT_CONSTS,64))
|
||||
);
|
||||
__asm__ __volatile__("pxor %%xmm0,%%xmm0\n\t"::);
|
||||
/*Clear input data for next block (decoder only).*/
|
||||
@@ -407,7 +407,7 @@ static void oc_idct8x8_10_sse2(ogg_int16_t _y[64],ogg_int16_t _x[64]){
|
||||
:[buf]"=m"(OC_ARRAY_OPERAND(short,buf,16)),
|
||||
[y]"=m"(OC_ARRAY_OPERAND(ogg_int16_t,_y,64))
|
||||
:[x]"m"OC_CONST_ARRAY_OPERAND(ogg_int16_t,_x,64),
|
||||
[c]"m"(OC_CONST_ARRAY_OPERAND(ogg_int16_t,OC_IDCT_CONSTS,128))
|
||||
[c]"m"(OC_CONST_ARRAY_OPERAND(ogg_int16_t,OC_IDCT_CONSTS,64))
|
||||
);
|
||||
/*Clear input data for next block (decoder only).*/
|
||||
__asm__ __volatile__(
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id: sse2trans.h 15675 2009-02-06 09:43:27Z tterribe $
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
@@ -14,7 +15,6 @@
|
||||
Originally written by Rudolf Marek.
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
# define OC_MEM_OFFS(_offs,_name) \
|
||||
OC_M2STR(_offs-8+%H[_name])
|
||||
# endif
|
||||
/*If your gcc version does't support %H, then you get to suffer the warnings.
|
||||
/*If your gcc version doesn't support %H, then you get to suffer the warnings.
|
||||
Note that Apple's gas breaks on things like _offs+(%esp): it throws away the
|
||||
whole offset, instead of substituting in 0 for the missing operand to +.*/
|
||||
# if !defined(OC_MEM_OFFS)
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
@@ -158,7 +158,7 @@ void oc_state_loop_filter_frag_rows_mmx(const oc_theora_state *_state,
|
||||
OC_LOOP_FILTER_H_MMX(ref+8,ystride,_bv);
|
||||
}
|
||||
if(fragi+nhfrags<fragi_bot&&!frags[fragi+nhfrags].coded){
|
||||
OC_LOOP_FILTER_V_MMX(ref+(ystride<<3),ystride,_bv);
|
||||
OC_LOOP_FILTER_V_MMX(ref+(ystride*8),ystride,_bv);
|
||||
}
|
||||
#undef PIX
|
||||
#undef YSTRIDE3
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
@@ -14,7 +15,6 @@
|
||||
Originally written by Rudolf Marek.
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE Theora SOURCE CODE IS COPYRIGHT (C) 2002-2009 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* by the Xiph.Org Foundation and contributors *
|
||||
* https://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************
|
||||
|
||||
function:
|
||||
last mod: $Id$
|
||||
|
||||
********************************************************************/
|
||||
|
||||
|
||||
@@ -47,9 +47,17 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) && !defined(__aarch64__)
|
||||
#include <mach/mach.h>
|
||||
#include <mach/clock.h>
|
||||
#include <mach/mach_time.h>
|
||||
#endif
|
||||
|
||||
struct vpx_usec_timer {
|
||||
#if defined(_WIN32)
|
||||
LARGE_INTEGER begin, end;
|
||||
#elif defined(__APPLE__) && !defined(__aarch64__)
|
||||
mach_timespec_t begin, end;
|
||||
#else
|
||||
struct timespec begin, end;
|
||||
#endif
|
||||
@@ -58,6 +66,12 @@ struct vpx_usec_timer {
|
||||
static INLINE void vpx_usec_timer_start(struct vpx_usec_timer *t) {
|
||||
#if defined(_WIN32)
|
||||
QueryPerformanceCounter(&t->begin);
|
||||
#elif defined(__APPLE__) && !defined(__aarch64__)
|
||||
clock_serv_t cclock;
|
||||
|
||||
host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock);
|
||||
clock_get_time(cclock, &t->begin);
|
||||
mach_port_deallocate(mach_task_self(), cclock);
|
||||
#elif defined(CLOCK_MONOTONIC_RAW)
|
||||
clock_gettime(CLOCK_MONOTONIC_RAW, &t->begin);
|
||||
#else
|
||||
@@ -68,6 +82,12 @@ static INLINE void vpx_usec_timer_start(struct vpx_usec_timer *t) {
|
||||
static INLINE void vpx_usec_timer_mark(struct vpx_usec_timer *t) {
|
||||
#if defined(_WIN32)
|
||||
QueryPerformanceCounter(&t->end);
|
||||
#elif defined(__APPLE__) && !defined(__aarch64__)
|
||||
clock_serv_t cclock;
|
||||
|
||||
host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock);
|
||||
clock_get_time(cclock, &t->end);
|
||||
mach_port_deallocate(mach_task_self(), cclock);
|
||||
#elif defined(CLOCK_MONOTONIC_RAW)
|
||||
clock_gettime(CLOCK_MONOTONIC_RAW, &t->end);
|
||||
#else
|
||||
@@ -83,9 +103,12 @@ static INLINE int64_t vpx_usec_timer_elapsed(struct vpx_usec_timer *t) {
|
||||
|
||||
QueryPerformanceFrequency(&freq);
|
||||
return diff.QuadPart * 1000000 / freq.QuadPart;
|
||||
#else
|
||||
#if defined(__APPLE__) && !defined(__aarch64__)
|
||||
mach_timespec_t diff;
|
||||
#else
|
||||
struct timespec diff;
|
||||
|
||||
#endif
|
||||
timersub_ns(&t->end, &t->begin, &diff);
|
||||
return (int64_t)diff.tv_sec * 1000000 + diff.tv_nsec / 1000;
|
||||
#endif
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
#include "vpx_util/vpx_pthread.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <AvailabilityMacros.h>
|
||||
#endif
|
||||
|
||||
#if CONFIG_MULTITHREAD
|
||||
|
||||
struct VPxWorkerImpl {
|
||||
@@ -39,7 +43,7 @@ static void execute(VPxWorker *const worker); // Forward declaration.
|
||||
|
||||
static THREADFN thread_loop(void *ptr) {
|
||||
VPxWorker *const worker = (VPxWorker *)ptr;
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
|
||||
if (worker->thread_name != NULL) {
|
||||
// Apple's version of pthread_setname_np takes one argument and operates on
|
||||
// the current thread only. The maximum size of the thread_name buffer was
|
||||
|
||||
@@ -88,7 +88,7 @@ elif CONFIG['CPU_ARCH'] == 'mips64':
|
||||
SOURCES += files['MIPS64_SOURCES']
|
||||
ASFLAGS += [ '-I%s/media/libvpx/config/linux/mips64/' % TOPSRCDIR ]
|
||||
CFLAGS += [ '-I%s/media/libvpx/config/linux/mips64/' % TOPSRCDIR ]
|
||||
elif CONFIG['CPU_ARCH'].startswith('ppc'):
|
||||
elif CONFIG['CPU_ARCH'] == 'ppc64le':
|
||||
EXPORTS.vpx += files['PPC64LE_EXPORTS']
|
||||
SOURCES += files['PPC64LE_SOURCES']
|
||||
ASFLAGS += [ '-I%s/media/libvpx/config/linux/ppc64le/' % TOPSRCDIR ]
|
||||
|
||||
+8
-7
@@ -649,10 +649,11 @@ public:
|
||||
template<size_t Offset, size_t Count = dynamic_extent>
|
||||
MOZ_SPAN_GCC_CONSTEXPR Span<element_type, Count> Subspan() const
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(Offset <= size() &&
|
||||
(Count == dynamic_extent || (Offset + Count <= size())));
|
||||
const size_t len = size();
|
||||
MOZ_RELEASE_ASSERT(Offset <= len &&
|
||||
(Count == dynamic_extent || (Count <= len - Offset)));
|
||||
return { data() + Offset,
|
||||
Count == dynamic_extent ? size() - Offset : Count };
|
||||
Count == dynamic_extent ? len - Offset : Count };
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -682,11 +683,11 @@ public:
|
||||
index_type aStart,
|
||||
index_type aLength = dynamic_extent) const
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(aStart <= size() &&
|
||||
(aLength == dynamic_extent ||
|
||||
(aStart + aLength <= size())));
|
||||
const size_t len = size();
|
||||
MOZ_RELEASE_ASSERT(aStart <= len &&
|
||||
(aLength == dynamic_extent || (aLength <= len - aStart)));
|
||||
return { data() + aStart,
|
||||
aLength == dynamic_extent ? size() - aStart : aLength };
|
||||
aLength == dynamic_extent ? len - aStart : aLength };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -310,6 +310,8 @@ MOZ_WIN_MEM_TRY_BEGIN
|
||||
mFileData = mFileStart + headerSize;
|
||||
return NS_OK;
|
||||
}
|
||||
// If we get here, the file was truncated.
|
||||
return NS_ERROR_FILE_CORRUPTED;
|
||||
}
|
||||
mLen = mTotalLen;
|
||||
mFileData = mFileStart;
|
||||
|
||||
@@ -200,6 +200,13 @@ nsHtml5TreeOperation::Append(nsIContent* aNode,
|
||||
{
|
||||
MOZ_ASSERT(aBuilder);
|
||||
MOZ_ASSERT(aBuilder->IsInDocUpdate());
|
||||
if (MOZ_UNLIKELY(aNode->GetParentNode())) {
|
||||
Detach(aNode, aBuilder);
|
||||
if (MOZ_UNLIKELY(aNode->GetParentNode())) {
|
||||
// Can this happen? If it can, give up.
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
nsresult rv = NS_OK;
|
||||
nsHtml5OtherDocUpdate update(aParent->OwnerDoc(),
|
||||
aBuilder->GetDocument());
|
||||
@@ -219,6 +226,13 @@ nsHtml5TreeOperation::AppendToDocument(nsIContent* aNode,
|
||||
MOZ_ASSERT(aBuilder);
|
||||
MOZ_ASSERT(aBuilder->GetDocument() == aNode->OwnerDoc());
|
||||
MOZ_ASSERT(aBuilder->IsInDocUpdate());
|
||||
if (MOZ_UNLIKELY(aNode->GetParentNode())) {
|
||||
Detach(aNode, aBuilder);
|
||||
if (MOZ_UNLIKELY(aNode->GetParentNode())) {
|
||||
// Can this happen? If it can, give up.
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nsIDocument* doc = aBuilder->GetDocument();
|
||||
@@ -308,6 +322,14 @@ nsHtml5TreeOperation::FosterParent(nsIContent* aNode,
|
||||
{
|
||||
MOZ_ASSERT(aBuilder);
|
||||
MOZ_ASSERT(aBuilder->IsInDocUpdate());
|
||||
if (MOZ_UNLIKELY(aNode->GetParentNode())) {
|
||||
Detach(aNode, aBuilder);
|
||||
if (MOZ_UNLIKELY(aNode->GetParentNode())) {
|
||||
// Can this happen? If it can, give up.
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
nsIContent* foster = aTable->GetParent();
|
||||
|
||||
if (IsElementOrTemplateContent(foster)) {
|
||||
|
||||
Reference in New Issue
Block a user