Commit Graph

406 Commits

Author SHA1 Message Date
John Koleszar
fe5765a5f3 Merge remote branch 'origin/master' into experimental
Change-Id: I68e604e4a731f6703fdec7eff2c2c9b9e36879ea
2011-06-29 00:05:10 -04:00
Johann
4e4f835232 use relative include path
Files are already in vpx/

Change-Id: I67dcbb5d5b6cb55e91b4e4927ab842a1e2c9e284
2011-06-28 14:46:24 -04:00
Stefan Holmer
7296b3f922 New ways of passing encoded data between encoder and decoder.
With this commit frames can be received partition-by-partition
from the encoder and passed partition-by-partition to the
decoder.

At the encoder-side this makes it easier to split encoded
frames at partition boundaries, useful when packetizing
frames. When VPX_CODEC_USE_OUTPUT_PARTITION is enabled,
several VPX_CODEC_CX_FRAME_PKT packets will be returned
from vpx_codec_get_cx_data(), containing one partition
each. The partition_id (starting at 0) specifies the decoding
order of the partitions. All partitions but the last has
the VPX_FRAME_IS_FRAGMENT flag set.

At the decoder this opens up the possibility of decoding partition
N even though partition N-1 was lost (given that independent
partitioning has been enabled in the encoder) if more info
about the missing parts of the stream is available through
external signaling.

Each partition is passed to the decoder through the
vpx_codec_decode() function, with the data pointer pointing
to the start of the partition, and with data_sz equal to the
size of the partition. Missing partitions can be signaled to
the decoder by setting data != NULL and data_sz = 0. When
all partitions have been given to the decoder "end of data"
should be signaled by calling vpx_codec_decode() with
data = NULL and data_sz = 0.

The first partition is the first partition according to the
VP8 bitstream + the uncompressed data chunk + DCT address
offsets if multiple residual partitions are used.

Change-Id: I5bc0682b9e4112e0db77904755c694c3c7ac6e74
2011-06-28 11:10:17 -04:00
Stefan Holmer
b433e12a3d Proposing an extension to the encoder and decoder interfaces.
Adding capabilities with which the encoder can output frames
partition by partition, and the decoder can get input data
partition by partition.

Change-Id: Ieae0801480b8de8cd43c3c57dd3bab2e4c346fe0
2011-06-28 11:10:17 -04:00
Stefan Holmer
4cb0ebe5b2 Adding support for independent partitions
Adding support in the encoder for generating
independent residual partitions by forcing
equal probabilities over the prev coef entropy
contexts.

Change-Id: I402f5c353255f3ca20eae2620af739f6a498cd21
2011-06-28 11:10:17 -04:00
John Koleszar
54bc4fde77 Merge remote branch 'origin/master' into experimental
Conflicts:
	configure

Change-Id: I91b9059e5b724a96368c7765c147fdf5a5ce03f2
2011-05-20 08:33:51 -04:00
Stefan Holmer
d04f852368 Adding error-concealment to the decoder.
The error-concealer is plugged in after any motion vectors have been
decoded. It tries to estimate any missing motion vectors from the
motion vectors of the previous frame. Intra blocks with missing
residual are replaced with inter blocks with estimated motion vectors.

This feature was developed in a separate sandbox
(sandbox/holmer/error-concealment).

Change-Id: I5c8917b031078d79dbafd90f6006680e84a23412
2011-05-19 13:46:33 -04:00
John Koleszar
5c849a64d9 Merge remote branch 'origin/master' into experimental
Change-Id: I3149502b80e7c30decc125a2ddc5ad12b12b3667
2011-05-11 00:05:10 -04:00
John Koleszar
814532a33c Merge "Use stdint.h for VS2010" 2011-05-10 18:53:04 -07:00
John Koleszar
4ead98fa84 Use stdint.h for VS2010
VS2010 has included stdint.h, but not inttypes.h. Prefer the compiler's
version of these types. Fixes issue 327.

Change-Id: Ica71600e06b8e94e3bbb4f12988b4a9817d5e5e4
2011-05-06 08:02:39 -04:00
John Koleszar
89c3269636 Merge remote branch 'origin/master' into experimental
Change-Id: I993021d0b2d7fbe44d6371464f2686eed3ccfaae
2011-04-29 00:05:07 -04:00
James Berry
5db296dd70 bug fix 32 bit matches 64 bit
included vpx_config.h in vpx_encoder.c
to properly define FLOATING_POINT_INIT()

Change-Id: Ie518bf5c087622658e37fca90aa4ddfe79d053f6
2011-04-28 14:11:32 -04:00
John Koleszar
0a77e59847 Merge remote branch 'origin/master' into experimental
Conflicts:
	vp8/common/alloccommon.c
	vp8/encoder/rdopt.c

Change-Id: I142167d31d1b9cffe143774f6915bca463df67f0
2011-04-26 08:28:51 -04:00
John Koleszar
cfbfd39de8 Merge "Change rc undershoot/overshoot semantics" 2011-04-25 10:49:32 -07:00
John Koleszar
aa926fbd27 Add rc_max_intra_bitrate_pct control
Adds a control to limit the maximum size of a keyframe, as a function of
the per-frame bitrate. See this thread[1] for more detailed discussion:

[1]: http://groups.google.com/a/webmproject.org/group/codec-devel/browse_thread/thread/271b944a5e47ca38

Change-Id: I7337707642eb8041d1e593efc2edfdf66db02a94
2011-04-25 13:47:14 -04:00
John Koleszar
cb3e0aaba3 Merge remote branch 'origin/master' into experimental
Change-Id: I231e4dd65adcf4f5c158e3749880a18b8c36cbe4
2011-04-13 00:05:09 -04:00
John Koleszar
c99f9d7abf Change rc undershoot/overshoot semantics
This patch changes the rc_undershoot_pct and rc_overshoot_pct controls
to set the "aggressiveness" of rate adaptation, by limiting the
amount of difference between the target buffer level and the actual
buffer level which is applied to the target frame rate for this frame.

This patch was initially provided by arosenberg at logitech.com as
an attachment to issue #270. It was modified to separate these controls
from the other unrelated modifications in that patch, as well as to
use the pre-existing variables rather than introducing new ones.

Change-Id: Id542e3f5667dd92d857d5eabf29878f2fd730a62
2011-04-12 20:49:33 -04:00
Yunqing Wang
4fd81a99f8 Set cpu_used range to [-16, 16] in real-time mode
Remove encoding speed limitation in real-time mode.

Change-Id: Ib5e35d8bb522b2a25f3e4ad5cfe2788ebebb3617
2011-04-11 15:55:04 -04:00
John Koleszar
5f6db3591c Merge remote branch 'origin/master' into experimental
Conflicts:
	vp8/encoder/ratectrl.c
	vp8/encoder/rdopt.c

Change-Id: I4cc58acb432662d2c47aceda1680e52982adbc06
2011-03-23 00:24:25 -04:00
John Koleszar
2fced87e75 vpx_codec_dec_init: check that the iface is a decoder
Make sure the given interface is actually a decoder interface before
initializing it.

Change-Id: Ie48d737f2956cc2f0891666de5ea87251e96bc49
2011-03-21 12:12:14 -04:00
John Koleszar
386ceca8d2 Merge remote branch 'origin/master' into experimental
Change-Id: If09b27454f82265fd5e3b25c85c1eea70c6c637f
2011-03-16 00:05:07 -04:00
Gaute Strokkenes
6795e256c1 Avoid misspelling "dependent".
Change-Id: Ib0c280e1fcfd977e11e4390807b2c8077a87500c
2011-03-15 12:58:29 +00:00
John Koleszar
54c59a03f3 Merge remote branch 'origin/master' into experimental
Change-Id: Ice13978071e98a88cf8ae5c069c6423d74425dea
2011-03-15 00:05:07 -04:00
Ralph Giles
aa4a90c880 Improve grammar in a comment.
Change-Id: I18bfda6d420626f2718e096e338c1d0bf0ba029d
2011-03-14 13:41:50 -07:00
John Koleszar
01eb7c2874 Merge remote branch 'origin/master' into experimental
Change-Id: I70ac5a4f8388a7bfa058178c0ae53f6bdb0bb6e5
2011-03-05 00:05:07 -05:00
John Koleszar
4a742e5c79 cosmetic: clean up comments for new vp8dx controls
Rename the common control id enum vp8_{dec,com}_control_id,
move VP8_DECODER_CTRL_ID_START to common, wrap long lines.

Change-Id: I659abc62f10aa389d496f7f43950775db0ef2f9f
2011-03-04 08:51:39 -05:00
John Koleszar
1a7ce50a6c Merge remote branch 'origin/master' into experimental
Change-Id: I52f21ff6f9a1dca7099a8459657f6f288c5bfe40
2011-02-25 00:05:08 -05:00
James Zern
8e17e82d9e documentation: minor updates to vp8 (en|de)coder
Group algorithm interfaces to avoid undocumented warning from doxygen
and provide basic documentation for CQ level & cpuused.

Change-Id: I11095061be962cbc998741de9c8c3019d415e137
2011-02-24 14:12:57 -08:00
James Zern
f42d52e6bd documentation: minor cosmetics
- correct spelling
- remove explicit file name w/\file (unnecessary when contained in the
  same file and prone to desync)

Change-Id: I68a3960ac5ab84d0f2e5c9b2e29799f26dfccf23
2011-02-16 17:59:33 -08:00
John Koleszar
16bbf27fa9 Merge remote branch 'origin/master' into experimental
Change-Id: I242ca4854cb21f3d63efb979bd6ecc9f06f67f33
2011-02-04 00:05:13 -05:00
Gaute Strokkenes
72ebafff51 Avoid using an anonymous union.
Change-Id: I5744269a35e2d696ecf40c1665efd572bfc9b6cb
2011-02-02 15:22:51 +00:00
John Koleszar
3ac80a74f8 Merge remote branch 'origin/master' into experimental
Change-Id: Ia0840303fe1dc8c12f3389e7a1fe20b6d3c6b9c5
2011-01-20 00:05:28 -05:00
John Koleszar
2f0331c90c Merge "Implement error tracking in the decoder" 2011-01-19 05:51:00 -08:00
Henrik Lundin
67fb3a5155 Implement error tracking in the decoder
A new vpx_codec_control called VP8D_GET_FRAME_CORRUPTED. The output
from the function is non-zero if the last decoded frame contains
corruption due to packet losses.

The decoder is also modified to accept encoded frames of zero length.
A zero length frame indicates to the decoder that one or more frames
have been completely lost. This will mark the last decoded reference
buffer as corrupted. The data pointer can be NULL if the length is
zero.

Change-Id: Ic5902c785a281c6e05329deea958554b7a6c75ce
2011-01-19 09:53:21 +01:00
John Koleszar
3cb26b4864 Merge remote branch 'origin/master' into experimental
Change-Id: Ib34bc09a295141eb65c8c0478bde6136f178909b
2011-01-08 00:05:09 -05:00
Paul Wilkins
e0846c9c8c CQ Mode
The merge includes hooks to for CQ mode and other code
changes merged from the test branch.

CQ mode attempts to maintain a more stable quantizer within a clip
whilst also trying to adhere to a guidline maximum bitrate.

The existing target data rate parameter is used to specify the
guideline maximum bitrate.

A new parameter allows the user to specify a target CQ level.

For normal (non kf/gf/arf) frames, the quantizer will not drop BELOW the
user specified value (0-63). However, in some cases the encoder may
choose to impose a target CQ that is above that specified by the user,
if it estimates that consistent use of the target value is not compatible
with guideline maximum bitrate.

Change-Id: I2221f9eecae8cc3c431d36caf83503941b25e4c1
2011-01-07 18:46:29 +00:00
John Koleszar
0b710c8d1a Merge remote branch 'origin/master' into experimental
Conflicts:
	vp8/vp8_cx_iface.c

Change-Id: I76f302448f11b28772efd4b5643f86a7cc69a8c2
2010-12-21 07:54:10 -05:00
Jim Bankoski
6cb708d501 Merge "Add psnr/ssim tuning option" 2010-12-20 09:32:13 -08:00
John Koleszar
eee331e7f3 Merge remote branch 'origin/master' into experimental
Change-Id: Iae8b85d2f6ad4d854c43dded8588e054906f7156
2010-12-18 00:05:19 -05:00
John Koleszar
b0da9b399d Add psnr/ssim tuning option
Add a new encoder control, VP8E_SET_TUNING, to allow the application
to inform the encoder that the material will benefit from certain
tuning. Expose this control as the --tune option to vpxenc. The args
helper is expanded to support enumerated arguments by name or value.

Two tunings are provided by this patch, PSNR (default) and SSIM.
Activity masking is made dependent on setting --tune=ssim, as the
current implementation hurts speed (10%) and PSNR (2.7% avg,
10% peak) too much for it to be a default yet.

Change-Id: I110d969381c4805347ff5a0ffaf1a14ca1965257
2010-12-17 10:01:05 -05:00
Henrik Lundin
2a87491fb0 Inform caller of decoder about updated references
Inform the caller of the decoder if a decoded frame updated last,
golden, or altref frames, required for realtime communication
proposed in document VP8 RTP payload format.

Added a new vpx_codec_control called VP8D_GET_LAST_REF_UPDATES, to be
called after vpx_codec_decode. The control will indicate which of the
reference frames that were updated by setting the 3 LSBs in the input
int (pointer).

Change-Id: Iac9db60dac414356c7ffa0b0fede88cb91e11bd7
2010-12-17 14:43:13 +01:00
John Koleszar
f225211256 Merge remote branch 'origin/master' into experimental
Conflicts:
	configure

Change-Id: Ifa63e4610657f75cb953aa7ca08f997267612cc0
2010-11-11 09:25:10 -05:00
Fritz Koenig
647df00f30 postproc : Re-work posproc calling to allow more flags.
Debugging in postproc needs more flags to allow for specific
block types to be turned on or off in the visualizations.

Must be enabled with --enable-postproc-visualizer during
configuration time.

Change-Id: Ia74f357ddc3ad4fb8082afd3a64f62384e4fcb2d
2010-11-10 14:14:46 -08:00
John Koleszar
7a590c902b Merge remote branch 'origin/master' into experimental
Conflicts:
	configure
	ivfenc.c
	vp8/common/alloccommon.c
	vp8/common/onyxc_int.h
	vp8/vp8_cx_iface.c
2010-11-05 12:30:33 -04:00
Timothy B. Terriberry
c4d7e5e67e Eliminate more warnings.
This eliminates a large set of warnings exposed by the Mozilla build
 system (Use of C++ comments in ISO C90 source, commas at the end of
 enum lists, a couple incomplete initializers, and signed/unsigned
 comparisons).
It also eliminates many (but not all) of the warnings expose by newer
 GCC versions and _FORTIFY_SOURCE (e.g., calling fread and fwrite
 without checking the return values).
There are a few spurious warnings left on my system:

../vp8/encoder/encodemb.c:274:9: warning: 'sz' may be used
 uninitialized in this function
gcc seems to be unable to figure out that the value shortcut doesn't
 change between the two if blocks that test it here.

../vp8/encoder/onyx_if.c:5314:5: warning: comparison of unsigned
 expression >= 0 is always true
../vp8/encoder/onyx_if.c:5319:5: warning: comparison of unsigned
 expression >= 0 is always true
This is true, so far as it goes, but it's comparing against an enum, and the C
 standard does not mandate that enums be unsigned, so the checks can't be
 removed.

Change-Id: Iaf689ae3e3d0ddc5ade00faa474debe73b8d3395
2010-10-27 18:08:04 -07:00
John Koleszar
fa7a55bb04 Add getter functions for the interface data symbols
Having these symbols be available as functions rather than data is
occasionally more convenient. Implemented this way rather than a
get-codec-by-id style to avoid creating a link-time dependency
between the encoder and the decoder.

Fixes issue #169

Change-Id: I319f281277033a5e7e3ee3b092b9a87cce2f463d
2010-09-23 14:58:43 -04:00
John Koleszar
c2140b8af1 Use WebM in copyright notice for consistency
Changes 'The VP8 project' to 'The WebM project', for consistency
with other webmproject.org repositories.

Fixes issue #97.

Change-Id: I37c13ed5fbdb9d334ceef71c6350e9febed9bbba
2010-09-09 10:01:21 -04:00
Michael Kohler
efbfaf6d11 Fix misspelled "paramter" in vpx_codec_internal.h" to "parameter".
Signed-off-by: Michael Kohler <michaelkohler@live.com>
2010-07-07 20:06:04 +02:00
John Koleszar
94c52e4da8 cosmetics: trim trailing whitespace
When the license headers were updated, they accidentally contained
trailing whitespace, so unfortunately we have to touch all the files
again.

Change-Id: I236c05fade06589e417179c0444cb39b09e4200d
2010-06-18 13:06:11 -04:00
Fabio Pedretti
a0d04ea94e Remove useless 500 frame limit
Change-Id: Ib82de60cf32cf08844c3e2d88d7c587396f3892c
2010-06-14 09:06:42 -04:00
John Koleszar
7aa97a35b5 shared library support (.so)
This patch adds support for building shared libraries when configured
with the --enable-shared switch.

Building DLLs would require more invasive changes to the sample
utilities than I want to make in this patch, since on Windows you can't
use the address of an imported symbol in a static initializer. The best
way to work around this is proably to build the codec interface mapping
table with an init() function, but dll support is of questionable value
anyway, since most windows users will probably use a media framework
lib like webmdshow, which links this library in staticly.

Change-Id: Iafb48900549b0c6b67f4a05d3b790b2643d026f4
2010-06-05 16:47:23 -04:00
John Koleszar
09202d8071 LICENSE: update with latest text
Change-Id: Ieebea089095d9073b3a94932791099f614ce120c
2010-06-04 16:19:40 -04:00
John Koleszar
0952acb79a setup experimental infrastructure
This patch creates some basic infrastructure for doing bitstream-
incompatible changes to the VP8 encoder. The key parts are:

 - --enable-experimental configure switch, to enable support for this
   incompatible bitstream. This switch is required to be set to enable
   any "experiments"

 - A list for "experiments" which translate into --enable-<experiment>
   options and CONFIG_<experiment> macros.

 - The high bit of the "Version" field is used to indicate that the
   bitstream was produced by an experimental encoder. The decoder will
   fail to decode an experimental bitstream without
   --enable-experimental.

 - A new "vp8x" encoder interface is created to set the experimental
   bit.

 - The vp8x encoder interface is made the default for ivfenc in
   experimental mode.

Change-Id: Idbdd5eae4cec5becf75bb4770837dcd256b2abef
2010-06-01 11:14:33 -04:00
James Zern
e80d569d3a Conditionally build enc/dec specific API sources
vpx_codec.mk: Select required sources based on CONFIG_{EN,DE}CODERS.
Relocate _dec_init_ver to vpx_decoder.c to match vpx_encoder.

Change-Id: I6a171bc497499040912b2fb17786fba21a8ebc56
2010-05-26 18:14:26 -04:00
John Koleszar
b6c71918ae vpx_image: add VPX_ prefix to PLANE_*
The PLANE_{PACKED,Y,U,V,ALPHA} macros should be renamed to be within the
VPX_ namespace.

Fixes #27
2010-05-24 21:45:05 -04:00
John Koleszar
b7492341ac install includes in DIST_DIR/include/vpx, move vpx_codec/ to vpx/
This renames the vpx_codec/ directory to vpx/, to allow applications
to more consistently reference these includes with the vpx/ prefix.
This allows the includes to be installed in /usr/local/include/vpx
rather than polluting the system includes directory with an
excessive number of includes.

Change-Id: I7b0652a20543d93f38f421c60b0bbccde4d61b4f
2010-05-24 20:27:42 -04:00