theora.git
8 years agoUpdate versions and changelog for the 1.1.1 release. v1.1.1
Ralph Giles [Thu, 1 Oct 2009 18:00:57 +0000 (18:00 +0000)]
Update versions and changelog for the 1.1.1 release.

svn path=/trunk/theora/; revision=16598

8 years agoChanged the C runtime library to the default option - dynamic runtime library.
Cristian Adam [Tue, 29 Sep 2009 22:46:49 +0000 (22:46 +0000)]
Changed the C runtime library to the default option - dynamic runtime library.

svn path=/trunk/theora/; revision=16596

8 years agoupdate pkg.m4
j [Mon, 28 Sep 2009 16:52:44 +0000 (16:52 +0000)]
update pkg.m4

svn path=/trunk/theora/; revision=16591

8 years agoreplace existing libtool files if running autogen.sh
j [Mon, 28 Sep 2009 16:49:40 +0000 (16:49 +0000)]
replace existing libtool files if running autogen.sh

svn path=/trunk/theora/; revision=16590

8 years agoUpdate the version number in the readme; we're no longer beta.
Ralph Giles [Sat, 26 Sep 2009 20:55:46 +0000 (20:55 +0000)]
Update the version number in the readme; we're no longer beta.

svn path=/trunk/theora/; revision=16585

8 years agoFix a problem with the MSVC asm.
Tim Terriberry [Sat, 26 Sep 2009 19:35:55 +0000 (19:35 +0000)]
Fix a problem with the MSVC asm.
Thanks to Matthew Gregan for the patch.

svn path=/trunk/theora/; revision=16584

8 years agoFrom Mozilla 455357_wince_local_variable_macro_clash_patch
Gregory Maxwell [Fri, 25 Sep 2009 22:56:16 +0000 (22:56 +0000)]
From Mozilla 455357_wince_local_variable_macro_clash_patch

svn path=/trunk/theora/; revision=16581

8 years agoRemoved EBX register usage in inline MSVC assembly.
Cristian Adam [Fri, 25 Sep 2009 19:50:48 +0000 (19:50 +0000)]
Removed EBX register usage in inline MSVC assembly.

svn path=/trunk/theora/; revision=16578

8 years agoAdd encoder_disabled.c to the distribution.
Ralph Giles [Fri, 25 Sep 2009 15:29:31 +0000 (15:29 +0000)]
Add encoder_disabled.c to the distribution.

This is an optional file which supports the --disable-encode option to
configure. Such source files must be listed separately in EXTRA_DIST
to be included in a release.

svn path=/trunk/theora/; revision=16576

8 years agoUse 1.1.0+svn instead of 1.1.1svn for the package version between the
Ralph Giles [Fri, 25 Sep 2009 15:12:22 +0000 (15:12 +0000)]
Use 1.1.0+svn instead of 1.1.1svn for the package version between the
1.1.0 and 1.1.1 releases. This again improves sorting and gives better
results with pkg-config.

Thanks to j^ for the suggestion.

svn path=/trunk/theora/; revision=16575

8 years agoBump the version after the 1.1.0 release.
Ralph Giles [Fri, 25 Sep 2009 06:55:18 +0000 (06:55 +0000)]
Bump the version after the 1.1.0 release.

Also, remove periods after the 1.1.0 CHANGES entries to match the other
sections of that file.

svn path=/trunk/theora/; revision=16574

8 years agoBump the version number and change log for the 1.1.0 release. v1.1.0
Ralph Giles [Thu, 24 Sep 2009 19:18:41 +0000 (19:18 +0000)]
Bump the version number and change log for the 1.1.0 release.

Note that we're switching to a three-part version number here, like the
other xiph code projects use. This has some implications for pkg-config.
There was a problem with the 1.0 release because pkg-config sorted '1.0'
later than '1.0beta3'. To work around this, the pkg-config files for the
1.0 release give the version at '1.0final'. Anything with 1.1 version
sorts after 1.0, but 1.1.x doesn't sort after the 1.1beta versions we've
already released. The 1.1 beta period was much shorter than for 1.0, so
I've switched schemes for this release. Requesting 'theoradec >=
1.0final' or 'theoradec >= 1.1.0' will work, but not, for
example, 'theoradec >= 1.1beta2'.

svn path=/trunk/theora/; revision=16561

8 years agoBump library so versioning for decoder changes since the last release.
Ralph Giles [Thu, 24 Sep 2009 18:26:22 +0000 (18:26 +0000)]
Bump library so versioning for decoder changes since the last release.

svn path=/trunk/theora/; revision=16560

8 years agoFix handling of 0-byte packet as the first frame.
Tim Terriberry [Tue, 15 Sep 2009 04:21:05 +0000 (04:21 +0000)]
Fix handling of 0-byte packet as the first frame.

svn path=/trunk/theora/; revision=16557

8 years agoFix 4:2:2 in player_example; broken by the switch to the 1.0 api
Gregory Maxwell [Wed, 9 Sep 2009 17:53:13 +0000 (17:53 +0000)]
Fix 4:2:2 in player_example; broken by the switch to the 1.0 api

svn path=/trunk/theora/; revision=16551

8 years agoRemove some redundant stores from oc_filter_vedge().
Tim Terriberry [Sat, 5 Sep 2009 19:30:33 +0000 (19:30 +0000)]
Remove some redundant stores from oc_filter_vedge().
Thanks to Robin Watts for the report.

svn path=/trunk/theora/; revision=16550

8 years agoThe examples have been ported to the 1.x api and are no longer useful
Ralph Giles [Tue, 1 Sep 2009 03:07:14 +0000 (03:07 +0000)]
The examples have been ported to the 1.x api and are no longer useful
references for using the legacy api.

svn path=/trunk/theora/; revision=16546

8 years agoUpdate copyright year on the public library headers.
Ralph Giles [Mon, 31 Aug 2009 22:52:42 +0000 (22:52 +0000)]
Update copyright year on the public library headers.

svn path=/trunk/theora/; revision=16545

8 years agoFix a doxygen warning about duplicate \mainpage attributes.
Ralph Giles [Mon, 31 Aug 2009 22:49:44 +0000 (22:49 +0000)]
Fix a doxygen warning about duplicate \mainpage attributes.

The original \mainpage directive in theora.h was shadowed by the newer
one in codec.h, generating a warning. This was probably reliable since
the later comes first in sort order, but was still infelicitous.

I've just commuted the second to file-level documenation. I've not
figured out how to get it on the 'Legacy pre-1.0 API' module
documenation page, which is where it should be.

svn path=/trunk/theora/; revision=16544

8 years agoDocumenation fix: the legacy api uses an OC_ prefix for error
Ralph Giles [Mon, 31 Aug 2009 22:30:22 +0000 (22:30 +0000)]
Documenation fix: the legacy api uses an OC_ prefix for error
defines. Use this in the documentation rather than the TH_
prefix from the 1.x api.

The numerical error codes are the same, so no harm came from
the mislabelling, but this is much less confusing as far as
which header is which.

svn path=/trunk/theora/; revision=16543

8 years agoDocumentation fix: some calls were documented to return TH_IMPL, but
Ralph Giles [Mon, 31 Aug 2009 22:25:40 +0000 (22:25 +0000)]
Documentation fix: some calls were documented to return TH_IMPL, but
the actual define in code.h is TH_EIMPL.

svn path=/trunk/theora/; revision=16542

8 years agoLink the two encoding examles with the math library for rint().
Ralph Giles [Fri, 28 Aug 2009 08:42:36 +0000 (08:42 +0000)]
Link the two encoding examles with the math library for rint().

This is redundant for encoder_example, since the vorbis libs
already bring in -lm, but it's better to have consistent references.

svn path=/trunk/theora/; revision=16522

8 years agoCorrect a bug where the bit usage telemetry can freak out if the FPS
Monty [Wed, 26 Aug 2009 12:31:38 +0000 (12:31 +0000)]
Correct a bug where the bit usage telemetry can freak out if the FPS
ration consists of large integers

svn path=/trunk/theora/; revision=16520

8 years agoFix an ignored fread() warning.
Ralph Giles [Tue, 25 Aug 2009 19:48:57 +0000 (19:48 +0000)]
Fix an ignored fread() warning.

GCC now warns if the return code for fread() and similar functions is
ignored, but it can be pacified just by assigning it to a variable.
Clang isn't pursuaded by this and still warns that nothing is done
to check the result.

This combines the dummy read of the 4 byte chunk size (which we ignore)
with the subsequent read for the 'WAVE' chunk id so that the length
check covers both.

svn path=/trunk/theora/; revision=16517

8 years agoBump version number post-release.
Ralph Giles [Sat, 22 Aug 2009 18:22:02 +0000 (18:22 +0000)]
Bump version number post-release.

svn path=/trunk/theora/; revision=16507

8 years agoUpdate copyright year on the OggTheora source code.
Ralph Giles [Sat, 22 Aug 2009 18:14:02 +0000 (18:14 +0000)]
Update copyright year on the OggTheora source code.

svn path=/trunk/theora/; revision=16503

8 years agoDocumentation updates.
Ralph Giles [Sat, 22 Aug 2009 18:02:08 +0000 (18:02 +0000)]
Documentation updates.

svn path=/trunk/theora/; revision=16502

8 years agoBump soname revision numbers for release.
Ralph Giles [Sat, 22 Aug 2009 17:54:35 +0000 (17:54 +0000)]
Bump soname revision numbers for release.

svn path=/trunk/theora/; revision=16501

8 years agoUpdate version and change log for 1.1beta3.
Ralph Giles [Sat, 22 Aug 2009 17:53:42 +0000 (17:53 +0000)]
Update version and change log for 1.1beta3.

svn path=/trunk/theora/; revision=16500

8 years agoBump vendor string for today's encoder changes.
Ralph Giles [Sat, 22 Aug 2009 17:53:26 +0000 (17:53 +0000)]
Bump vendor string for today's encoder changes.

svn path=/trunk/theora/; revision=16499

8 years agoMore rate control tweaks.
Tim Terriberry [Sat, 22 Aug 2009 15:50:28 +0000 (15:50 +0000)]
More rate control tweaks.
1) Use a smaller time constant for the Bessel filters at the start of a
 sequence, slowly increasing them to the desired level, to avoid catastrophic
 failure in the case that the first frame metrics are completely off (e.g., in
 a fade-in from black).
2) Don't add prediction corrections for the virtual padding frames added at the
 end of a 2-pass sequence.

svn path=/trunk/theora/; revision=16498

8 years agoPrevent the user from setting a keyframe interval of 0.
Tim Terriberry [Fri, 21 Aug 2009 23:41:15 +0000 (23:41 +0000)]
Prevent the user from setting a keyframe interval of 0.

svn path=/trunk/theora/; revision=16496

8 years agoThe theoraenc library always depends on the theoradec library, which
Ralph Giles [Thu, 20 Aug 2009 23:34:09 +0000 (23:34 +0000)]
The theoraenc library always depends on the theoradec library, which
contains public functions shared between encode and decode. Reflect
this in the pkg-config file.

svn path=/trunk/theora/; revision=16495

8 years agoSet DOS line endings on the exports file so they don't get clobbered.
Ralph Giles [Thu, 20 Aug 2009 23:20:35 +0000 (23:20 +0000)]
Set DOS line endings on the exports file so they don't get clobbered.

This property was set on the old version in win32 but not copied in
r16491.

svn path=/trunk/theora/; revision=16494

8 years agoAdd a newline to the exports file.
Ralph Giles [Thu, 20 Aug 2009 23:11:43 +0000 (23:11 +0000)]
Add a newline to the exports file.

Ending without a final newline confuses the defexp.awk script.

svn path=/trunk/theora/; revision=16493

8 years agoRemove a redundant escape character.
Ralph Giles [Thu, 20 Aug 2009 23:10:00 +0000 (23:10 +0000)]
Remove a redundant escape character.

Some awks warn about it having no effect.

svn path=/trunk/theora/; revision=16492

8 years agoMoved win32/libtheora.def to lib/theora.def
Cristian Adam [Thu, 20 Aug 2009 23:04:42 +0000 (23:04 +0000)]
Moved win32/libtheora.def to lib/theora.def

svn path=/trunk/theora/; revision=16491

8 years agoSynced win32\libtheora.def with lib\theora.exp
Cristian Adam [Thu, 20 Aug 2009 22:53:42 +0000 (22:53 +0000)]
Synced win32\libtheora.def with lib\theora.exp

svn path=/trunk/theora/; revision=16490

8 years agoAdded missing exports (dump_video encoder_example projects compile now)
Cristian Adam [Thu, 20 Aug 2009 22:34:41 +0000 (22:34 +0000)]
Added missing exports (dump_video encoder_example projects compile now)

svn path=/trunk/theora/; revision=16489

8 years agoBump vendor string to track today's rate control changes.
Ralph Giles [Tue, 18 Aug 2009 22:47:58 +0000 (22:47 +0000)]
Bump vendor string to track today's rate control changes.

svn path=/trunk/theora/; revision=16486

8 years agoencoder_example.c: Allow -v and -V to coexist without --soft-target.
Monty [Tue, 18 Aug 2009 22:44:06 +0000 (22:44 +0000)]
encoder_example.c: Allow -v and -V to coexist without --soft-target.
Yes, this one might be a tad controversial.

svn path=/trunk/theora/; revision=16485

8 years agoThe code in select_qi that looks for budget underflow and
Monty [Tue, 18 Aug 2009 22:39:28 +0000 (22:39 +0000)]
The code in select_qi that looks for budget underflow and
force-reduces the log_qtarget was predicated on "if drop frames are
enabled and not infinite-buffer two pass mode".  This was primarily
driven by use cases at the time and is subtly inappropriate.

Modify the predication to 'if we don't have a minimum quality level';
this allows proper behavior in the case where we have a minimum
quality level but aren't using 'soft-target'.  Otherwise, lambda could
still drop to min when we were trying to force a minimum qi, which
results in what look like 'waterfalls' as SKIP triggers on large
number of blocks but the quantizer is still very fine.

svn path=/trunk/theora/; revision=16484

8 years agoCommit derf's "simple_bias" patch to add a simpler but also more
Monty [Tue, 18 Aug 2009 21:56:31 +0000 (21:56 +0000)]
Commit derf's "simple_bias" patch to add a simpler but also more
robust rate-error bias correction to two-pass encoding mode.  It
doesn't hold a specific rate quite as tightly, but is also not prone
to being thrown way off by assymetrical scale error between passes.

svn path=/trunk/theora/; revision=16483

8 years agoDocumentation fixes.
Ralph Giles [Fri, 14 Aug 2009 06:14:33 +0000 (06:14 +0000)]
Documentation fixes.

Update link to the format specification.
Better line wrapping in a few places for text-side reading.
A minor wording improvement.

svn path=/trunk/theora/; revision=16482

8 years agoDon't free not inited vorbis structures if only doing the first scanning pass.
Arek Korbik [Thu, 13 Aug 2009 15:03:32 +0000 (15:03 +0000)]
Don't free not inited vorbis structures if only doing the first scanning pass.

svn path=/trunk/theora/; revision=16480

8 years agoBump versioning post-release.
Ralph Giles [Wed, 12 Aug 2009 17:06:12 +0000 (17:06 +0000)]
Bump versioning post-release.

svn path=/trunk/theora/; revision=16472

8 years agoBump versioning for the 1.1beta2 release.
Ralph Giles [Wed, 12 Aug 2009 16:56:54 +0000 (16:56 +0000)]
Bump versioning for the 1.1beta2 release.

svn path=/trunk/theora/; revision=16469

8 years agoIf I'm going to put in the useless line to silence the stupid compiler warnings,
Tim Terriberry [Wed, 12 Aug 2009 10:23:01 +0000 (10:23 +0000)]
If I'm going to put in the useless line to silence the stupid compiler warnings,
 actually do the proper assignment.

svn path=/trunk/theora/; revision=16468

8 years agoUpdate Xcode build files after the merge in r16443.
Arek Korbik [Sun, 9 Aug 2009 19:05:01 +0000 (19:05 +0000)]
Update Xcode build files after the merge in r16443.

svn path=/trunk/theora/; revision=16463

8 years agoRe-hook up the speed level setting to the encoder internals and add a ctl code
Tim Terriberry [Sat, 8 Aug 2009 11:46:40 +0000 (11:46 +0000)]
Re-hook up the speed level setting to the encoder internals and add a ctl code
 to retrieve the current setting.
The meaning of the options has changed slightly, and the default is no longer
 zero (the slowest).
The currently defined levels (for all encoding modes):
- 0: Slowest (best)
- 1: Enable early skip (default)
- 2: Disable motion compensation
The difference in quality between 0 and 1 is very small, and quality is only
 likely to improve a very small amount, and only at very low bitrates.
The difference in quality between 1 and 2 is very large, and quality will
 degrade significantly (though speed will vastly improve).

svn path=/trunk/theora/; revision=16458

8 years agoBetter attempt to describe the huskies fix.
Ralph Giles [Sat, 8 Aug 2009 00:02:01 +0000 (00:02 +0000)]
Better attempt to describe the huskies fix.

svn path=/trunk/theora/; revision=16457

8 years agoUpdate change log so far.
Ralph Giles [Fri, 7 Aug 2009 23:51:29 +0000 (23:51 +0000)]
Update change log so far.

svn path=/trunk/theora/; revision=16456

8 years agoGeneralize the structure of the OpenBSD checks a bit.
Ralph Giles [Fri, 7 Aug 2009 22:33:53 +0000 (22:33 +0000)]
Generalize the structure of the OpenBSD checks a bit.

We add -lcompat to everything, but only if it's needed for ftime(). This
moves clutter from Makefile.am to the already messy build lines.

We still add -lossaudio iff the target is OpenBSD, but we call it
OSS_LIBS instead of OBSD_OSSAUDIO which is both shorter and more
generic should other systems need something in the future.

svn path=/trunk/theora/; revision=16455

8 years agoBuild fixes for OpenBSD.
Ralph Giles [Fri, 7 Aug 2009 22:23:28 +0000 (22:23 +0000)]
Build fixes for OpenBSD.

dump_video requires -lcompat for ftime(), and player_example requires
-lossaudio for ioctl() and other bits. This is a little heavy-handed,
but it's better than not building at all.

Patch from Simon Hosie.

svn path=/trunk/theora/; revision=16454

8 years agoRe-initialize the IIR filters after trial encodes.
Tim Terriberry [Fri, 7 Aug 2009 14:18:57 +0000 (14:18 +0000)]
Re-initialize the IIR filters after trial encodes.

svn path=/trunk/theora/; revision=16453

8 years agoCode review of r16447.
Tim Terriberry [Fri, 7 Aug 2009 06:37:52 +0000 (06:37 +0000)]
Code review of r16447.
Fix a 32-bit/64-bit bug.
Update the stat file version number.
Add back some saturation to prevent overflow.
Fix some other minor discrepancies.

svn path=/trunk/theora/; revision=16452

8 years agoplayer_example: Upgrade to 1.0 API. "This compiles."
Gregory Maxwell [Fri, 7 Aug 2009 04:16:26 +0000 (04:16 +0000)]
player_example: Upgrade to 1.0 API. "This compiles."

svn path=/trunk/theora/; revision=16451

8 years agor16448 for png2theora.c and an error message fix.
Gregory Maxwell [Thu, 6 Aug 2009 23:58:26 +0000 (23:58 +0000)]
r16448 for png2theora.c and an error message fix.

svn path=/trunk/theora/; revision=16449

8 years agoCorrect a minor bufsize setup inconsistency in encoder_example.c
Monty [Thu, 6 Aug 2009 23:54:35 +0000 (23:54 +0000)]
Correct a minor bufsize setup inconsistency in encoder_example.c

svn path=/trunk/theora/; revision=16448

8 years agoCommit fix for rate control 'scale' parameter calculations hitting the
Monty [Thu, 6 Aug 2009 22:05:48 +0000 (22:05 +0000)]
Commit fix for rate control 'scale' parameter calculations hitting the
maximum value clamp hard (as seen in the clip huskies_cif.y4m).

Also, temporarily disable all frame dropping in two-pass as it does
not yet work properly and never did.

Bump vendor version string to 20090806

svn path=/trunk/theora/; revision=16447

8 years agoMove the encoder and decoder source back into a single directory.
Ralph Giles [Thu, 6 Aug 2009 01:43:12 +0000 (01:43 +0000)]
Move the encoder and decoder source back into a single directory.

These were split when they were being worked on separately, and to
simply building when they shared little code. However, for performance
and reuse reasons, the encoder now shares significant code with the
decoder and it doesn't make since to keep the source separate any more.

I've attempted to update all the build files, but the msvc build is
untested and the xmingw32 build is only partially tested.

Also, add the prefix fedora 11 uses for the xmingw32 compiler.

svn path=/trunk/theora/; revision=16443

8 years agoPartial revert of 16441
Gregory Maxwell [Thu, 6 Aug 2009 00:38:30 +0000 (00:38 +0000)]
Partial revert of 16441

svn path=/trunk/theora/; revision=16442

8 years agopng2theora.c: Roll-back the aborted attempt at clean error handling.
Gregory Maxwell [Thu, 6 Aug 2009 00:36:50 +0000 (00:36 +0000)]
png2theora.c: Roll-back the aborted attempt at clean error handling.

svn path=/trunk/theora/; revision=16441

8 years agoDate typo.
Ralph Giles [Wed, 5 Aug 2009 22:21:33 +0000 (22:21 +0000)]
Date typo.

svn path=/trunk/theora/; revision=16438

8 years agoRemove encoder/decoder control codes which weren't in the 1.0 release
Ralph Giles [Wed, 5 Aug 2009 22:05:36 +0000 (22:05 +0000)]
Remove encoder/decoder control codes which weren't in the 1.0 release
from the legacy theora.h header. While the theora_control()
implementation will pass on all the same control codes recognized by
th_encode_ctl() and th_decode_ctl(), we want to encourage migration
to the newer api, so we only declare them there.

Remove an obsolete limitation on user-supplied quant matrices.

Switch to an _old suffix on the theora.h version of the control code
anchors to avoid confusion with the new api. I also tried to clean up
the formatting but wasn't entirely successful; the documentation for
theoraenc.h and theoradec.h looks better.

svn path=/trunk/theora/; revision=16437

8 years agoBump the version number post-release.
Ralph Giles [Wed, 5 Aug 2009 20:56:58 +0000 (20:56 +0000)]
Bump the version number post-release.

svn path=/trunk/theora/; revision=16436

8 years agoUpdate the version for the 1.1beta1 release.
Ralph Giles [Wed, 5 Aug 2009 18:48:12 +0000 (18:48 +0000)]
Update the version for the 1.1beta1 release.

svn path=/trunk/theora/; revision=16429

8 years agoUpdate Makefile for recent source changes.
Ralph Giles [Wed, 5 Aug 2009 18:47:41 +0000 (18:47 +0000)]
Update Makefile for recent source changes.

svn path=/trunk/theora/; revision=16428

8 years agoMentioning multipass is just confusing. Remove it.
Ralph Giles [Wed, 5 Aug 2009 18:08:36 +0000 (18:08 +0000)]
Mentioning multipass is just confusing. Remove it.

svn path=/trunk/theora/; revision=16427

8 years agoCollapse several change log entries. It was a bit to long, while still
Ralph Giles [Wed, 5 Aug 2009 18:01:56 +0000 (18:01 +0000)]
Collapse several change log entries. It was a bit to long, while still
leaving out some important details at that level of reporting.

svn path=/trunk/theora/; revision=16426

8 years agoBump so versions for the 1.1beta1 release.
Ralph Giles [Wed, 5 Aug 2009 17:59:24 +0000 (17:59 +0000)]
Bump so versions for the 1.1beta1 release.

The API hasn't changed as far as symbols go, but there are new keys for
both th_enc_ctl and th_dec_ctl, and it's useful to bump the current
version number for them.

svn path=/trunk/theora/; revision=16425

8 years agoClarify that multipass means two-pass.
Ralph Giles [Wed, 5 Aug 2009 17:52:28 +0000 (17:52 +0000)]
Clarify that multipass means two-pass.

svn path=/trunk/theora/; revision=16424

8 years agoUpdate change log with major features since the last release.
Ralph Giles [Wed, 5 Aug 2009 17:49:49 +0000 (17:49 +0000)]
Update change log with major features since the last release.

svn path=/trunk/theora/; revision=16423

8 years agomake png2theora compile with mingw32:
j [Wed, 5 Aug 2009 17:49:42 +0000 (17:49 +0000)]
make png2theora compile with mingw32:
 add local implementation of alphasort and scandir

svn path=/trunk/theora/; revision=16422

8 years agoComment correctness
Gregory Maxwell [Wed, 5 Aug 2009 17:28:35 +0000 (17:28 +0000)]
Comment correctness

svn path=/trunk/theora/; revision=16421

8 years agopng2theora: New rate control options (two-pass)
Gregory Maxwell [Wed, 5 Aug 2009 17:22:46 +0000 (17:22 +0000)]
png2theora: New rate control options (two-pass)

svn path=/trunk/theora/; revision=16420

8 years agoSet a more trunk-like vendor string for the 1.1 encoder.
Ralph Giles [Wed, 5 Aug 2009 05:29:44 +0000 (05:29 +0000)]
Set a more trunk-like vendor string for the 1.1 encoder.

Suggestion from Derf. Advertises both the incremented version and the
much-discussed codename; drops Monty's roman numeral iteration. The
rewrite is bitstream compatible, so it doesn't make sense to call it
'Theora II' and we already have a spec revision in the vendor string.

svn path=/trunk/theora/; revision=16418

8 years agoAppend $(EXEEXT) to the names of optional programs.
Ralph Giles [Tue, 4 Aug 2009 18:41:20 +0000 (18:41 +0000)]
Append $(EXEEXT) to the names of optional programs.

I don't understand why these are necessary in the first place, but this
at least makes them all consistent. This should fix a build error on
cygwin.

svn path=/branches/theora-thusnelda/; revision=16415

8 years agoClean up after failing to open and read a png file.
Ralph Giles [Tue, 4 Aug 2009 17:03:30 +0000 (17:03 +0000)]
Clean up after failing to open and read a png file.

svn path=/branches/theora-thusnelda/; revision=16414

8 years agoRe-work last change to allow the buffer delay to be set before the 2-pass
Tim Terriberry [Tue, 4 Aug 2009 07:08:07 +0000 (07:08 +0000)]
Re-work last change to allow the buffer delay to be set before the 2-pass
 header is read (like it used to be).

svn path=/branches/theora-thusnelda/; revision=16413

8 years agoActually initialize all the frame totals at the start of pass 2, because we
Tim Terriberry [Tue, 4 Aug 2009 06:54:39 +0000 (06:54 +0000)]
Actually initialize all the frame totals at the start of pass 2, because we
 use it to decide if a new buf_delay can still use the infinite buffer later.

svn path=/branches/theora-thusnelda/; revision=16412

8 years agoActually derefernce the buffer, not the stack.
Tim Terriberry [Tue, 4 Aug 2009 06:48:30 +0000 (06:48 +0000)]
Actually derefernce the buffer, not the stack.

svn path=/branches/theora-thusnelda/; revision=16411

8 years agoAdd encoder controls to change the quality and bitrate targets during the
Tim Terriberry [Tue, 4 Aug 2009 06:23:05 +0000 (06:23 +0000)]
Add encoder controls to change the quality and bitrate targets during the
 middle of an encode.

svn path=/branches/theora-thusnelda/; revision=16410

8 years agoAdd malloc failure checks.
Tim Terriberry [Tue, 4 Aug 2009 06:19:12 +0000 (06:19 +0000)]
Add malloc failure checks.
Note, on platforms that overcommit (including almost every fork-based Unix,
 excluding Solaris), this does not provide any additional safety as the kernel
 could create page table entries and segfault later when it fails to map pages
 to back them, and even platforms that don't overcommit could allocate more
 memory than the machine has physical RAM and cause a DoS via excessive paging.
Nevertheless, on some systems, with proper precautions, these may be useful.
In addition, we now allocate Huffman trees in a single block of RAM, which may
 provide slightly improved cache coherency (the measured benefit, if any, was
 very small).

svn path=/branches/theora-thusnelda/; revision=16409

8 years agoMore token decode optimizations.
Tim Terriberry [Tue, 4 Aug 2009 04:47:16 +0000 (04:47 +0000)]
More token decode optimizations.
Reorder the bits in the code words so that rlen gets the lower 8 bits (and can
 thus be extracted by a movzb).
Change OC_DCT_TOKEN_EB_POS() to use bitops instead of ternary operators, so
 that gcc can't possibly decide to use branches for it.
Reorder the tokens to remove gaps in the table (saving a miniscule amount of
 cache) and so that the OC_DCT_TOKEN_EB_POS returns zero for tokens which
 do not require any extra bits (to make Gumboot happy).
Reduce the size of OC_DCT_TOKEN_MAP by a factor of 8.
On x86-32, this gives an additional 2.5% for low-bitrate HD content and 3.1%
 for high-bitrate HD content.

svn path=/branches/theora-thusnelda/; revision=16408

8 years agoRemove an attempt at in-place replacement of chroma MVs.
Tim Terriberry [Tue, 4 Aug 2009 04:16:45 +0000 (04:16 +0000)]
Remove an attempt at in-place replacement of chroma MVs.
While this works when optimizations are enabled, because the memcpy's get
 translated into assignments, it violates the semantics of memcpy (source and
 destination cannot overlap), and may fail without optimizations.
Sadly, I can't seem to find a replacement for memcpy that gcc treats nearly as
 well, so we'll waste the 8 bytes of stack.

svn path=/branches/theora-thusnelda/; revision=16407

8 years agoFixed Visual C++ compilation error.
Cristian Adam [Mon, 3 Aug 2009 22:22:30 +0000 (22:22 +0000)]
Fixed Visual C++ compilation error.

svn path=/branches/theora-thusnelda/; revision=16406

8 years agopng2theora: Support for 4:4:4 and 4:2:2 chroma subsampling
Gregory Maxwell [Mon, 3 Aug 2009 21:20:47 +0000 (21:20 +0000)]
png2theora: Support for 4:4:4 and 4:2:2 chroma subsampling

svn path=/branches/theora-thusnelda/; revision=16405

8 years agoMake dump_video do a little more input sanity checking to make it more useful for...
Gregory Maxwell [Mon, 3 Aug 2009 19:44:16 +0000 (19:44 +0000)]
Make dump_video do a little more input sanity checking to make it more useful for fuzz testing.

svn path=/branches/theora-thusnelda/; revision=16404

8 years agoMerge changes from theora-gumboot branch through r16361.
Tim Terriberry [Mon, 3 Aug 2009 04:50:27 +0000 (04:50 +0000)]
Merge changes from theora-gumboot branch through r16361.
This also includes some additional clean-ups and minor
 improvements/optimizations.
The net improvement is 1.2% (for high-resolution, low-bitrate) to 30.5% (for
 insane bitrates) on x86-32, and 3.7% to 33.5% for the same content on x86-64.
Typical content will fall somewhat closer to the former than the latter (e.g.,
 8-10%), but it still represents a significant speed-up.

svn path=/branches/theora-thusnelda/; revision=16403

8 years agoAdd comments elucidating the reason that buffer delay is set after two-pass
Tim Terriberry [Sun, 2 Aug 2009 01:15:32 +0000 (01:15 +0000)]
Add comments elucidating the reason that buffer delay is set after two-pass
 mode is enabled.

svn path=/branches/theora-thusnelda/; revision=16396

8 years agoMove two-pass variable initialization up since it's used in oc_enc_rc_reset()
Tim Terriberry [Sat, 1 Aug 2009 23:48:06 +0000 (23:48 +0000)]
Move two-pass variable initialization up since it's used in oc_enc_rc_reset()
 now.

svn path=/branches/theora-thusnelda/; revision=16395

8 years agoMore two-pass fixes and updates.
Tim Terriberry [Sat, 1 Aug 2009 22:23:02 +0000 (22:23 +0000)]
More two-pass fixes and updates.
- Change the precision of some intermediate calculations in
   oc_iir_filter_init().
  This gives more accurate coefficients for very large delays and fixes a
   divide by zero error when the cutoff frequency underflowed.
- Continue to update the IIR filters even in pass 2, and use them at the end to
   smooth out allocations in the final frames.
- Also use them to obtain scale estimates when the current frame type does not
   match pass 1's (e.g., because the keyframe interval is smaller in pass 2).
- Go back to using the offset in the scale correction fit, and make the fit
   coefficients long-term moving averages, to get slightly more local behavior.
  This is better at avoiding long-term drift over the course of the file.
- Replace Newton's method with a binary search for the actual allocation
   decision.
  The former was aborting on the first iteration with large buffer sizes
   because the derivative was too small, which caused fun effects like using up
   all of the bits in the first half of the file and then dropping the rest of
   the frames.
- Also correct some algebra mistakes in the use of the keyframe boost ratio.
  This now behaves like it was originally intended.
- Compute scale estimates using the target quantizer, not the actual quantizer.
  This gives better fits in the second pass, especially when the file starts
   off at qi=63 or qi=0.
- Don't add to the scale correction statistics when no blocks were coded or
   when the frame type does not match pass 1's.
- Always use the exponents from the first pass.
  This turns out to be more reliable than using the proper exponents while the
   scale correction fit is gathering statistics after all.

svn path=/branches/theora-thusnelda/; revision=16389

8 years agoFix the problems with early skip and chroma.
Tim Terriberry [Thu, 30 Jul 2009 12:42:24 +0000 (12:42 +0000)]
Fix the problems with early skip and chroma.
This was a combination of the OC_MODE_RD tables introduced in r16312 being
 constructed with the wrong binning and the comparisons introduced in r16314
 using the wrong scale.
Early skip is now re-enabled for chroma; it still gives a small quality loss,
 but a significant speed-up.

svn path=/branches/theora-thusnelda/; revision=16363

8 years agoMove dequantization back out of the idct.
Tim Terriberry [Wed, 29 Jul 2009 13:44:25 +0000 (13:44 +0000)]
Move dequantization back out of the idct.
This sets up further optimizations, though it does not actually make anything
 faster in and of itself.
Modified version of a patch from Simon Hosie.

svn path=/branches/theora-thusnelda/; revision=16360

8 years agoSome additional comments and minor control-flow restructuring in 2pass_in.
Tim Terriberry [Wed, 29 Jul 2009 03:16:39 +0000 (03:16 +0000)]
Some additional comments and minor control-flow restructuring in 2pass_in.

svn path=/branches/theora-thusnelda/; revision=16358

8 years agoInitialize twopass_force_kf, so we don't accidentally force everything to be
Tim Terriberry [Wed, 29 Jul 2009 03:13:18 +0000 (03:13 +0000)]
Initialize twopass_force_kf, so we don't accidentally force everything to be
 a keyframe when we're not in pass-2 mode.

svn path=/branches/theora-thusnelda/; revision=16357

8 years agoMinor two-pass refinements.
Tim Terriberry [Tue, 28 Jul 2009 02:22:10 +0000 (02:22 +0000)]
Minor two-pass refinements.
Set the default keyframe interval to 256 in two-pass mode (instead of 64).
Pick a buffer fullness target based on the size of the buffer with respect to
 the keyframe interval.
Target the last keyframe in the current buffer interval when using a finite
 buffer (just like 1-pass mode).
Target the next hypothetical forced keyframe past the end of the file (also
 just like 1-pass mode).
Force the offset in the log_scale fits to zero (which is what it should be over
 the duration of the file, and experiments confirm).
Boost quality if the buffer is about to overflow (as otherwise the bits would
 be wasted); this reduces the amount we're undersized when using a finite
 buffer.
Minor control-flow re-organization to eliminate duplicate code and keep
 two-pass specific things out of the top-level.

svn path=/branches/theora-thusnelda/; revision=16346

8 years agoRemove debuggint output accidentall comitted in r16341.
Tim Terriberry [Mon, 27 Jul 2009 04:28:41 +0000 (04:28 +0000)]
Remove debuggint output accidentall comitted in r16341.

svn path=/branches/theora-thusnelda/; revision=16343

8 years agoMore minor two-pass clean-ups.
Tim Terriberry [Mon, 27 Jul 2009 04:23:20 +0000 (04:23 +0000)]
More minor two-pass clean-ups.
Clients no longer have to keep calling TH_ENCCTL_2PASS_IN after each frame if
 they've already submitted all of the pass-1 data.

svn path=/branches/theora-thusnelda/; revision=16342