Граф коммитов

275 Коммитов

Автор SHA1 Сообщение Дата
Dmitry Kovalev 7d5bffc452 Adding vpx_sse_to_psnr() function.
Removing all copies of identical vp8_mse2psnr/vp9_mse2psnr functions.
Using vpx_sse_to_psnr() instead in all places.

Change-Id: I15beef9834d43d8fc8a8a7a2d1fc5de3d658fed8
2014-02-26 16:21:12 -08:00
Ivan Maltz 74e1830b05 log overall psnr, average psnr, and overall mse
Change-Id: I0b4fa1f8104b7fa5780d4e99e5401c14271a992d
2014-02-26 14:18:51 -08:00
Minghai Shang 8c196b27b3 [svc] Add target bitrate settings for each layers.
Change-Id: Ia7677fb436667bc4f76db71f65e4784f433f7826
2014-02-26 13:30:50 -08:00
Minghai Shang c79bd22a5f Change for adding QP settings for key frames
Change-Id: I4dcabb60cb1185eb9a2efa18b50f17af272d2cd6
2014-02-26 11:19:06 -08:00
James Zern 53a11c9ce7 vp8cx.h: add brief desc. for VP9E_SET_SVC_LAYER_ID
fixes doxygen warning related to vpx_svc_layer_id

Change-Id: I365688133c1598182488501158de6af4b0f4c546
2014-02-20 23:19:07 -08:00
James Zern fdb2337b01 Merge "Fixed compilation on mingw with secure APIs enabled by default." 2014-02-19 21:00:09 -08:00
James Zern c467095450 Merge "vpx_frame_buffer.h: add doxygen \file block" 2014-02-19 11:41:18 -08:00
Marco Paniconi 89ec990421 Add comments to portion of SVC interface.
Fixes issue #705.

Change-Id: I60d45ee28fb34f401a440015bfe7bd3837b51de1
2014-02-18 18:52:16 -08:00
Jacek Caban aed2ca4b39 Fixed compilation on mingw with secure APIs enabled by default.
If MINGW_HAS_SECURE_API is defined, we don't need to declare strtok_s, but we still need strtok_r define.

Change-Id: I7cf781bb58f991a2bdce6a2ccf5082f6924579a3
2014-02-14 20:13:56 -08:00
James Zern c8175adc0b vpx_frame_buffer.h: add doxygen \file block
the remainder of the documentation will not be included in the output
unless the file itself is documented

Change-Id: I5a83a6c41cdfbf2976da288e4b70bd04002725f2
2014-02-14 13:08:51 -08:00
Frank Galligan a4f30a5023 Add VP9 decoder support for external frame buffers
Added support for external frame buffers to libvpx's VP9 decoder.
If the external frame buffer functions are set then libvpx will
call the get function whenever it needs a new frame buffer to
decode a frame into. And it will call the release function
whenever there are no more references to that buffer.

Change-Id: Id2934d005f606af6e052fb6db0d5b7c02f567522
2014-02-13 13:14:19 -08:00
Dmitry Kovalev 955b35d983 Cleaning up vpx_codec_get_cx_data() function.
Change-Id: I1cd7f0502a28dfe65449ff04d70498b2e92c3823
2014-02-13 11:50:13 -08:00
Frank Galligan d51ca0db00 Merge "Add get release decoder frame buffer functions." 2014-02-11 08:19:37 -08:00
Tom Finegan 7320fdda38 vpx_integer: Use inttypes.h in MSVC (2013 and later).
Change-Id: I2c47f0ab13de82de8833c3f134e5f3c74394374f
2014-02-10 15:30:43 -08:00
Frank Galligan e8e152799b Add get release decoder frame buffer functions.
This CL changes libvpx to call a function when a frame buffer
is needed for decode. Libvpx will call a release callback when
no other frames reference the frame buffer. This CL adds a
default implementation of the frame buffer callbacks. Currently
only VP9 is supported. A future CL will add support for
applications to supply their own frame buffer callbacks.

Change-Id: I1405a320118f1cdd95f80c670d52b085a62cb10d
2014-02-10 14:08:11 -08:00
Dmitry Kovalev dd776e8c36 Fixing c++ compiler errors in svc_encodeframe.c.
Change-Id: I242035d433f6d4027252cb8aa7d938c4170a2d65
2014-02-06 13:49:58 -08:00
Dmitry Kovalev 64279307c4 Using vpx_codec_err_t instead of int.
This fixes errors generated by c++ compiler.

Change-Id: I0f792371790b5e6462b77c8d7fabab0db30b11eb
2014-02-06 11:25:57 -08:00
Marco Paniconi 4864ab21b0 Layer based rate control for CBR mode.
This patch adds a buffer-based rate control for temporal layers,
under CBR mode.

Added vpx_temporal_scalable_patters.c encoder for testing temporal
layers, for both vp9 and vp8 (replaces the old vp8_scalable_patterns).

Updated datarate unittest with tests for temporal layer rate-targeting.

Change-Id: I8900a854288b9354d9c697cfeb0243a9fd6790b1
2014-02-06 09:24:45 -08:00
Marco Paniconi 7ec838edc4 Revert "Layer based rate control for CBR mode."
This reverts commit 6be2b750b8

Change-Id: Ic52acd98b37c3ba49d4999b463389eb564f49c4b
2014-02-03 12:28:32 -08:00
Marco Paniconi 6be2b750b8 Layer based rate control for CBR mode.
This patch adds a buffer-based rate control for temporal layers,
under CBR mode.

Added vpx_temporal_scalable_patters.c encoder for testing temporal
layers, for both vp9 and vp8 (replaces the old vp8_scalable_patterns).

Updated datarate unittest with tests for temporal layer rate-targeting.

Change-Id: I9cb6cce2494390ae6096ee17774af7fb9308bde7
2014-02-02 14:30:43 -08:00
Frank Galligan c6d537155c Merge "Revert external frame buffer code." 2014-01-24 11:31:23 -08:00
Frank Galligan b1c72b633e Revert external frame buffer code.
A future CL will add external frame buffers
differently.

Squash commit of four revert commits:
Revert "Increase required number of external frame buffers"

This reverts commit 9e41d569d7.

Revert "Add external constants."

This reverts commit bbf53047b0.

Revert "Add frame buffer lru cache."

This reverts commit fbada948fa.

Conflicts:
	vpxdec.c

Change-Id: I76fe42419923a6ea6c75d9997cbbf941d73d3005

Revert "Add support to pass in external frame buffers."

This reverts commit 10f891696b.

Conflicts:
	test/external_frame_buffer_test.cc
	vp9/common/vp9_alloccommon.c
	vp9/common/vp9_reconinter.c
	vp9/decoder/vp9_decodeframe.c
	vp9/encoder/vp9_onyx_if.c
	vp9/vp9_dx_iface.c
	vpx/vpx_decoder.h
	vpx/vpx_external_frame_buffer.h
	vpx_scale/generic/yv12config.c
	vpxdec.c

Change-Id: I7434cf590f1c852b38569980e4247fad0d939c2e
2014-01-24 10:10:20 -08:00
James Zern ec7f2133d0 vpx: add extern "C" to headers
Change-Id: Ide9a68466ed30453872465a6c2f9c414690df876
2014-01-23 16:22:14 -08:00
Charles 'Buck' Krasic 8aa33ed6b1 Write correct resolution to the IVF file header (b/11270652)
also:
 o remove dead code, create_dummy_frame
 o Fix a bug in command line handling that caused a segfault if wrong
   number of arguments were given.

Change-Id: I78f026aee4e363967b750e6cde0982659c558a1f
2014-01-06 14:18:38 -08:00
Dmitry Kovalev 116e0a1ab7 Removing vpx_codec_vp9x_cx and internal experimental flag.
vpx_codec_vp9x_cx is not used internally. Experimental flag from
vp9_extracfg is also not really used. YUV 4:4:4 just works after these
changes (you have to specify --profile=1 for the encoder).

Change-Id: Ib1c8461d0d19d159827e005efe868f891eea0140
2013-12-27 14:01:12 -08:00
Marco Paniconi 6efb0ab9b2 Fix to overflow in asan test (for vp8 encoder).
Change-Id: Ie67339ab3a16ce7669b5366a743812df93c52711
2013-12-18 14:12:29 -08:00
Frank Galligan 9e41d569d7 Increase required number of external frame buffers
Make applications pass in VPX_MAXIMUM_WORK_BUFFERS as well as
VP9_MAXIMUM_REF_BUFFERS.

Change-Id: I9c07ce83fa19c90ed43227b801b2013690e81edd
2013-12-17 17:34:36 -08:00
Frank Galligan bbf53047b0 Add external constants.
Change-Id: I8d329513c87bd8622306aba27c83bf04ef170fa4
2013-12-17 17:28:23 -08:00
James Zern 7386bde9d2 vpx: normalize include guards
Change-Id: Iee670353cffa1f9e97976ac507ad9519e5dda7f7
2013-12-16 19:41:05 -08:00
Johann e883c7478d Include files in the same directory directly
Change-Id: I56706a8326d9356a6735d13eb5e0832d04221c91
2013-12-16 15:46:05 -08:00
Frank Galligan fbada948fa Add frame buffer lru cache.
Add an option for libvpx to return the least recently used
frame buffer.

Change-Id: I886a96ffb94984f1c42de53086e0131922df3260
2013-12-15 19:57:42 -08:00
Frank Galligan 10f891696b Add support to pass in external frame buffers.
VP9 decoder can now use frame buffers passed in by the application.

Change-Id: I599527ec85c577f3f5552831d79a693884fafb73
2013-12-15 18:45:46 -08:00
Frank Galligan bbf61e35e7 Fix bug with put slice cb function.
Change-Id: Idfbd87d0a4bebdce7dd587c8446e7fa75b030d91
2013-12-05 15:45:15 -08:00
Adrian Grange 475d1d60b8 Modified spatial scalable encoder & unit tests
Modifications to the spatial scalable encoder to match
changes made to the scaling code in the decoder.

In particular, the use of a dummy first frame was removed
now that the decoder is able to handle a smaller first
frame.

SvcTest.FirstFrameHasLayers unit test re-enabled.

Change-Id: Ic2e91fbe4eadf95895569947670d36d68abaf458
2013-12-04 11:45:40 -08:00
Adrian Grange 2117fe0593 Fix decoder to handle display size correctly
The decoder ignored the display width & height
specified in the frame header.

This patch adds a control, VP9D_GET_DISPLAY_SIZE, to
allow the application to obtain the display width and
height from the frame header.

vpxdec has been modified to scale the output frame to
this size.

Should the request for the display size fail vpxdec will
use the native width and height of the raw decoded
frame instead.

Change-Id: I25db04407426dac730263720c75a7dd6400af68a
2013-11-22 11:58:07 -08:00
Guillaume Martres 17084657e6 vpxenc: add --aq-mode flag to control adaptive quantization
Change-Id: I57e1ad4bed3487df12893ced77c49093f8755706
2013-11-15 19:42:20 +01:00
Ivan Maltz 741c14fcf0 Merge "Move SVC per-frame loop from sample app into libvpx proper" 2013-11-06 17:24:05 -08:00
Ivan Maltz 1ed0e1beb5 Move SVC per-frame loop from sample app into libvpx proper
SVC multiple layer per frame encoding is invoked with vpx_svc_init and
vpx_svc_encode. These interfaces are designed to be invoked from ffmpeg.
Additional improvements:
- make dummy frame handling a bit more explicit
- fixed bug with single layer encodes
- track individual frame sizes and psnrs instead of averages
- parameterized quantizer, 16th scalefactors, more logging,
- enabled single layer encodes to generate baseline
- include new mode for 3 layer I frame with 5 total layers

Change-Id: I46cfa600d102e208c6af8acd6132e0cc25cda8d4
2013-11-06 14:49:27 -08:00
Adrian Grange f58eca9020 Resolved Doxygen warnings.
Added comments to make the codebase build cleanly in Doxygen.

Change-Id: I01e000ceac57dbafa04342858c8f1be250ba20d1
2013-10-29 09:38:31 -07:00
James Zern cd74a901a7 Revert "Merge "SVC improvements""
This reverts commit a82001b1cf, reversing
changes made to f6d870f7ae.

This commit breaks windows builds and needs some work to fix those and
some additional comments.

Change-Id: Ic0b0228e36704b127e5e399ce59db26182cfffe7
2013-10-22 11:09:22 +02:00
Ivan Maltz 663916cea7 SVC improvements
These changes were originally made in the Stratacaster team-review repository

commit e114bffcd82ad74c3696ec58e13c0ac895d6c82d
Author: Charles 'Buck' Krasic <ckrasic@google.com>
Date:   Mon Oct 14 16:52:13 2013 -0700

    Make dummy frame handling a bit more explicit, fixing bug
    with single layer encodes.

Squashed commit of the following:

commit 1ebbfd976c0fadb02bf1ea562a2d0e3f0206daad
Merge: ac468dd 54e88b7
Author: Ivan Maltz <ivanmaltz@google.com>
Date:   Fri Oct 11 17:29:58 2013 -0700

    Move SVC code from vp9_spatial_scalable_encoder to libvpx module accessible from ffmpeg

commit 54e88b78b160becc9569fc3c6cb6b0a8c95dc357
Author: Ivan Maltz <ivanmaltz@google.com>
Date:   Tue Oct 8 09:08:40 2013 -0700

    common svc encoding code for sample app and ffmpeg

    added svc_encodeframe.c, svc_context.h, svc_test.cc

    vp9_spatial_scalable_encoder uses vpx_svc_encode

commit 5616ec8e2e3d3e8d277333d8a9242f6c70151162
Merge: 4528014 e29137d
Author: Ivan Maltz <ivanmaltz@google.com>
Date:   Tue Oct 8 08:47:58 2013 -0700

    Merge branch 'master' into stratacaster

commit 45280148450b1f3d61e390df8aadedf85cd5bce1
Merge: bb2b675 1ab60f7
Author: Sujeevan Rajayogam <sujee@google.com>
Date:   Fri Oct 4 10:22:31 2013 -0700

    Merge branch 'master' into stratacaster

commit bb2b675e595dc9bfc8551e963edf56800c3aea61
Author: Sujeevan Rajayogam <sujee@google.com>
Date:   Wed Oct 2 12:37:26 2013 -0700

    Track individual frame sizes and psnrs instead of averages.

commit c6d303b714795c81e7ceb4173967115c9f8ff5b7
Merge: fa87df9 3583087
Author: Sujeevan Rajayogam <sujee@google.com>
Date:   Fri Sep 27 10:05:35 2013 -0700

    Merge branch 'master' into stratacaster

commit fa87df94fba923d9f7aeb8ae20c6e15f777e00b5
Merge: bf22d71 3c465af
Author: Sujeevan Rajayogam <sujee@google.com>
Date:   Thu Sep 26 16:10:31 2013 -0700

    Merge branch 'master' into stratacaster

commit bf22d7144895a82e0c348ac177c8a261b9e2b88e
Author: Sujeevan Rajayogam <sujee@google.com>
Date:   Thu Sep 26 11:10:34 2013 -0700

    Parameterized quantizer, 16th scalefactors, more logging, enabled single layer encodes to generate baseline.

commit ceffd7e6025b765f9886b5ea0f324248aa37e327
Author: Sujeevan Rajayogam <sujee@google.com>
Date:   Thu Sep 19 10:04:49 2013 -0700

    - Include new mode for 3 layer I frame with 5 total layers.
    - Refactor svc api.

Change-Id: Ie4d775e21e006fa597d884c59488dc999478e9b5
2013-10-21 14:34:37 -07:00
Yaowu Xu b905dab377 Added necessary includes
To avoid the dependency on the order of header files included.

Change-Id: Ic142638d75fe95e6aba41b11664bfa15f076f793
2013-10-18 13:49:31 -07:00
Dmitry Kovalev e288c6015e Removing vpx_codec_impl_{top, bottom}.h files.
It doesn't seem reasonable to have these files as our API part. Just
inlining them in the source.

Change-Id: Iff970bb25e72e49e7ac21990824dbf4ef8bfd2e2
2013-09-30 11:10:54 -07:00
Adrian Grange 88c8ff2508 Modified resize unit test to output test vector
Modified the resize unit test so that it optionally
writes the encoded bitstream to file. The macro
WRITE_COMPRESSED_STREAM should be set to 1 to enable
output of the test bitstream; it is set to 0 by default.

Change-Id: I7d436b1942f935da97db6d84574a98d379f57fb1
2013-09-17 15:38:30 -07:00
Ivan Maltz 20abe595ec Merge "API extensions and sample app for spacial scalable encoder" 2013-09-09 16:57:01 -07:00
Ivan Maltz 01b35c3c16 API extensions and sample app for spacial scalable encoder
Sample app: vp9_spatial_scalable_encoder
vpx_codec_control extensions:
  VP9E_SET_SVC
  VP9E_SET_WIDTH, VP9E_SET_HEIGHT, VP9E_SET_LAYER
  VP9E_SET_MIN_Q, VP9E_SET_MAX_Q
expanded buffer size for vp9_convolve

modified setting of initial width in vp9_onyx_if.c so that layer size
can be set prior to initial encode

Default number of layers set to 3 (VPX_SS_DEFAULT_LAYERS)
Number of layers set explicitly in vpx_codec_enc_cfg.ss_number_layers

Change-Id: I2c7a6fe6d665113671337032f7ad032430ac4197
2013-09-09 15:57:56 -07:00
Deb Mukherjee e378a89bd6 Support a constant quality mode in VP9
Adds a new end-usage option for constant quality encoding in vpx. This
first version implemented for VP9, encodes all regular inter frames
using the quality specified in the --cq-level= option, while encoding
all key frames and golden/altref frames at a quality better than that.

The current performance on derfraw300 is +0.910% up from bitrate control,
but achieved without multiple recode loops per frame.

The decision for qp for each altref/golden/key frame will be improved
in subsequent patches based on better use of stats from the first pass.
Further, the qp for regular inter frames may also be varied around the
provided cq-level.

Change-Id: I6c4a2a68563679d60e0616ebcb11698578615fb3
2013-09-06 10:30:53 -07:00
James Zern b088998e5d vp[89]_dx_iface: factorize vp8_mmap_*()
s/vp8/vpx/ -> vpx_codec_internal.h / vpx_codec.c

Change-Id: If4192b40206276a761b01d44e334fe15bcb81128
2013-07-11 23:01:26 -07:00
James Zern 43dc0f8886 small update to peek_si/get_si documentation
correct a doxygen and function reference

Change-Id: I525371d64969aa60c464d0f6a133bc29895d7991
2013-07-11 12:23:28 -07:00
Dmitry Kovalev ccd9886ddc Fixing compilation error on Mac OS.
The error happened because of vp8_decrypt_cb typedef redefinition in both
treereader.h and vp8dx.h. Removing typedef from vp8dx.h in favor of raw
function pointer declaration.

Change-Id: I0266eb341ce433d40caf0abf8748694d505ee786
2013-06-17 13:50:22 -07:00
Jeff Petkau 368c72374e Change the encryption feature to use a callback for decryption.
This allows code calling the library can choose an arbitrary
encryption algorithm.

Decoder control parameter VP8_SET_DECRYPT_KEY is renamed to
VP8D_SET_DECRYPTOR, and now takes an small config struct instead
of just a byte array.

Change-Id: I0462b3388d8d45057e4f79a6b6777fe713dc546e
2013-06-17 11:32:16 -07:00
John Koleszar 8dd8287e16 Y4M input support for 4:2:2, 4:4:4, 4:4:4:4
Adds a new experiment CONFIG_NON420 that allows other chroma subsamplings
to be passed to the codec. This commit allows the data to be passed from
a y4m input file through vpxenc to the codec, where they're currently
rejected. Later commits will finish support for this inside the codec.

Change-Id: Ib3aac604d8cad9e24cef395fa1067f16ba7e8e43
2013-05-06 14:35:19 -07:00
Paul Wilkins 31ee193a9c Extension of segmentation to 8 segments.
Also some further simplification following removal
of top node code.

There is an issue in regards to the shared file vp8cx.h
in regard to the roi_map as this interface assumes that
there are only 4 segments. I have left the value here as
4 for now meaning that the roi_map interface is broken
for VP9.

Note that this change would have been easier if I hadn't
had to search for hard wire instances of the number 4
and <= 3.

Change-Id: Ia8b6deea4be4dbd20deb1656e689dd43a5f190e8
2013-04-24 16:36:47 +01:00
John Koleszar 672b75a103 Convert inv_tile_order to control interface
Restore ABI compatibility with the master branch.

Change-Id: Ie9f6fdf536662bd87dfcf114d16f003422670763
2013-03-27 11:22:20 -07:00
John Koleszar 81708cc326 Convert g_frame_parallel_decoding to control interface
Restore ABI compatibility with the master branch.

Change-Id: Ic57e7e1de09ab33bd37990e52a63ba7c8f1432a4
2013-03-27 11:07:26 -07:00
John Koleszar 771fc832f3 Merge branch 'master' into experimental
Pick up VP8 encryption, quantization changes, and some fixes to vpxenc

Conflicts:
	test/decode_test_driver.cc
	test/decode_test_driver.h
	test/encode_test_driver.cc
	vp8/vp8cx.mk
	vpxdec.c
	vpxenc.c

Change-Id: I9fbcc64808ead47e22f1f22501965cc7f0c4791c
2013-03-27 10:46:19 -07:00
Dmitry Kovalev 26cec5c13f Basic encryption feature for libvpx.
New decoder control paramter VP8_SET_DECRYPT_KEY to set the decryption key.

Change-Id: I6fc1f44d41f74f3b3f702778af1a6f8f5cc9439f
2013-03-15 18:21:55 -07:00
John Koleszar b3c350a1a9 Add VP9_GET_REFERENCE control
This is like VP8_COPY_REFERENCE, but returns a pointer to the reference
frame rather than a copy of it. This is useful when the application
doesn't know what the size of the reference is, as is the case when
scaling is in effect.

Change-Id: I63667109f65510364d0e397ebe56217140772085
2013-03-13 19:08:06 -07:00
John Koleszar 69c67c9531 Merge master branch into experimental
Picks up some build system changes, compiler warning fixes, etc.

Change-Id: I2712f99e653502818a101a72696ad54018152d4e
2013-03-01 11:06:05 -08:00
Ronald S. Bultje 89a206ef2f Add support for tile rows.
These allow sending partial bitstream packets over the network before
encoding a complete frame is completed, thus lowering end-to-end
latency. The tile-rows are not independent.

Change-Id: I99986595cbcbff9153e2a14f49b4aa7dee4768e2
2013-02-13 12:31:00 -08:00
Ronald S. Bultje f496f601fb Add tile column size limits (256 pixels min, 4096 pixels max).
This is after discussion with the hardware team. Update the unit test
to take these sizes into account. Split out some duplicate code into
a separate file so it can be shared.

Change-Id: I8311d11b0191d8bb37e8eb4ac962beb217e1bff5
2013-02-12 10:33:34 -08:00
Ronald S. Bultje 1407bdc243 [WIP] Add column-based tiling.
This patch adds column-based tiling. The idea is to make each tile
independently decodable (after reading the common frame header) and
also independendly encodable (minus within-frame cost adjustments in
the RD loop) to speed-up hardware & software en/decoders if they used
multi-threading. Column-based tiling has the added advantage (over
other tiling methods) that it minimizes realtime use-case latency,
since all threads can start encoding data as soon as the first SB-row
worth of data is available to the encoder.

There is some test code that does random tile ordering in the decoder,
to confirm that each tile is indeed independently decodable from other
tiles in the same frame. At tile edges, all contexts assume default
values (i.e. 0, 0 motion vector, no coefficients, DC intra4x4 mode),
and motion vector search and ordering do not cross tiles in the same
frame.
t log

Tile independence is not maintained between frames ATM, i.e. tile 0 of
frame 1 is free to use motion vectors that point into any tile of frame
0. We support 1 (i.e. no tiling), 2 or 4 column-tiles.

The loopfilter crosses tile boundaries. I discussed this briefly with Aki
and he says that's OK. An in-loop loopfilter would need to do some sync
between tile threads, but that shouldn't be a big issue.

Resuls: with tiling disabled, we go up slightly because of improved edge
use in the intra4x4 prediction. With 2 tiles, we lose about ~1% on derf,
~0.35% on HD and ~0.55% on STD/HD. With 4 tiles, we lose another ~1.5%
on derf ~0.77% on HD and ~0.85% on STD/HD. Most of this loss is
concentrated in the low-bitrate end of clips, and most of it is because
of the loss of edges at tile boundaries and the resulting loss of intra
predictors.

TODO:
- more tiles (perhaps allow row-based tiling also, and max. 8 tiles)?
- maybe optionally (for EC purposes), motion vectors themselves
  should not cross tile edges, or we should emulate such borders as
  if they were off-frame, to limit error propagation to within one
  tile only. This doesn't have to be the default behaviour but could
  be an optional bitstream flag.

Change-Id: I5951c3a0742a767b20bc9fb5af685d9892c2c96f
2013-02-05 15:43:03 -08:00
Yaowu Xu dea143327e Added INT16_MIN and INT16_MAX for MSVC builds
These macros were not defined in earlier version of MSVC

Change-Id: I8270a3abb7c6e9ead1931a653d7e41f877a1017b
2013-02-04 10:21:32 -08:00
Scott LaVarnway 75f647fe8a WIP: Multiple decoder instances support
Started adding support for multiple internal decoder instances.  Also added
code to limit the vp8 config options available when using frame-based
multithreading.

Change-Id: I0f1ee7abcfcff59204f50162e28254b8dd6972eb
2013-01-30 10:27:26 -08:00
Deb Mukherjee dfd89f2eab Adding a frame parallel decoding mode
Adds a flag to disable features that would inhibit frame parallel
decoding. This includes backward adaptation and MV sorting based
on search in ref frame buffer.

Also includes some minor clean-ups.

Change-Id: I434846717a47b7bcb244b37ea670c5cdf776f14d
2013-01-25 17:16:19 -08:00
John Koleszar 24bc1a7189 Use INT64_MAX instead of LLONG_MAX
These variables have the type int64_t, not long long. long long could
be a larger type than 64 bits. Emulate INT64_MAX for older versions of
MSVC, and remove the unreferenced vpx_ports/vpxtypes.h

Change-Id: Ideaca71838fcd3849d816d5ab17aa347c97d03b0
2013-01-14 15:57:21 -08:00
John Koleszar 16810c10c1 Merge branch 'vp9-preview' of review:webm/libvpx
Merge the vp9-preview branch into master.

Change-Id: If700b9054676f24bed9deb59050af546c1ca5296
2012-12-27 09:37:19 -08:00
James Zern d034bfa947 avoid redefining DECLSPEC_DEPRECATED
fixes, e.g.:

In file included from ../vpx/internal/../vpx_decoder.h:33:0,
                 from ../vpx/internal/vpx_codec_internal.h:46,
                 from ../vp8/common/onyx.h:21,
                 from ../vp8/encoder/block.h:15,
                 from ../test/subtract_test.cc:18:
../vpx/internal/../vpx_codec.h:52:0: warning: "DECLSPEC_DEPRECATED"
redefined
/usr/x86_64-w64-mingw32/sys-root/mingw/include/winnt.h:164:0: note: this
is the location of the previous definition

Change-Id: Iddc9318451d3e4e4a78b4d706518083fffff5c61
2012-11-27 14:03:36 -08:00
Johann 999f31f71c Move documentation file list to relevant make file
Change-Id: I2fe3095c4eb60233f00830d4124583ce7a64caa4
2012-11-16 09:16:25 -08:00
Johann 7c7801e34d Each make file is responsible for its own directory
Change-Id: Ia8a59ce79045af209e49c68810bae44616422db5
2012-11-15 16:41:03 -08:00
John Koleszar 64bcffc1ec Pack invisible frames without lengths
Modify the decoder to return the ending position of the bool decoder and
use that as the starting position for the next frame.

The constant-space algorithm for parsing the appended frame lengths is
O(n^2), which is a potential DoS concern if n is unbounded. Revisit
the appended lengths for use as partition lengths when multipartition
support is added.

In addition, this allows decoding of raw streams outside of a container
without additional framing information, though it's insufficient to
be able to remux said stream into a container.

Change-Id: I71e801a9c3e37abe559a56a597635b0cbae1934b
2012-11-15 15:48:07 -08:00
John Koleszar a9c7597adc support building vp8 and vp9 into a single lib
Change-Id: Ib8f8a66c9fd31e508cdc9caa662192f38433aa3d
2012-11-15 10:46:17 -08:00
John Koleszar 3a0cfb3617 Merge "Packing Altref along with succeeding frame and length encoding frames" into experimental 2012-11-09 12:31:37 -08:00
Vignesh Venkatasubramanian bc9670eee0 Packing Altref along with succeeding frame and length encoding frames
The altref frame is packed along with the next P frame. So that
outside of the codec there are now only two types of frames P and I.
Also, now it is one frame in and one frame out with respect to the
codec. Apart from that, all the frames are length encoded with the
length of each frame appended to the frame itself. There are
two categories of frames and each of them will look as follows:

  - Packed frames (an altref along with the succeeding p frame)
    - altref_frame_data | altref_lenngth | frame_data | length
  - Unpacked frames (all frames other than the above)
    - frame_data | length

Change-Id: If1eabf5c473f7d46b3f2d026bd30c803588c5330
2012-11-09 12:04:53 -08:00
John Koleszar 7b8dfcb5a2 Rough merge of master into experimental
Creates a merge between the master and experimental branches. Fixes a
number of conflicts in the build system to allow *either* VP8 or VP9
to be built. Specifically either:

  $ configure --disable-vp9 $ configure --disable-vp8
  --disable-unit-tests

VP9 still exports its symbols and files as VP8, so that will be
resolved in the next commit.

Unit tests are broken in VP9, but this isn't a new issue. They are
fixed upstream on origin/experimental as of this writing, but rebasing
this merge proved difficult, so will tackle that in a second merge
commit.

Change-Id: I2b7d852c18efd58d1ebc621b8041fe0260442c21
2012-11-07 11:30:16 -08:00
John Koleszar 83b1d907da vpx: merge with master
Change-Id: I44b3ad780cef6f448fa17ff8e28fea87ef9cd518
2012-11-06 12:04:53 -08:00
Ronald S. Bultje 4b2c2b9aa4 Rename vp8/ codec directory to vp9/.
Change-Id: Ic084c475844b24092a433ab88138cf58af3abbe4
2012-11-01 16:31:22 -07:00
Daniel Kang fd084b2489 Shut up warnings added by -Wundef
Change-Id: I9c7ef4a75c37aa0e10df75e165e3066614c955ef
2012-08-14 09:33:22 -07:00
Paul Wilkins 903efe8a2f Added unit test of vp8_set_roimap()
Change-Id: I99937cbdd6bfe52b7c8ae42f05526dfc06a602f4
2012-07-24 10:48:44 +01:00
Jim Bankoski 1b16e74813 Dll build of libvpx
Change-Id: I74e50b4dfbe73eb98e1dce1695a9973f637220c0
2012-07-23 14:51:21 -07:00
John Koleszar c6b9039fd9 Restyle code
Approximate the Google style guide[1] so that that there's a written
document to follow and tools to check compliance[2].

[1]: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
[2]: http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py

Change-Id: Idf40e3d8dddcc72150f6af127b13e5dab838685f
2012-07-17 11:46:03 -07:00
Yunqing Wang 7f009975e9 multi-res: add parameter validity checking
Added validity checking in multi-res encoder. Disable spatial
resampling and frame dropping before we have those supports.
Also, deallocate the memory for all resolution levels once error
occurs.

Change-Id: Ia5d65a645381cad1a49940ab3a19bb5696c39c09
2012-07-13 17:32:40 -07:00
Yunqing Wang a6f4fc5a93 Remove unused parameter in encoder interface code
Removed encoding_mode, which is not used anymore.

Change-Id: I569b2d4afe4d2f57bda8248615108c7cfc40134c
2012-07-13 10:45:29 -07:00
John Koleszar acd147c50c Build unit test driver from the default target
We need an easy way to build the unit test driver without running the
tests. This enables passing options like --gtest_filter to the
executable, which can't be done very cleanly when running under
`make test`.

Fixed a number of compiler errors/warnings when building the tests
in various configurations by Jenkins.

Change-Id: I9198122600bcf02520688e5f052ab379f963b77b
2012-06-29 15:03:50 -07:00
Hui Su e44ee38aef Add lossless compression mode.
This commit adds lossless compression capability to the experimental
branch. The lossless experiment can be enabled using --enable-lossless
in configure. When the experiment is enabled, the encoder will use
lossless compression mode by command line option --lossless, and the
decoder automatically recognizes a losslessly encoded clip and decodes
accordingly.

To achieve the lossless coding, this commit has changed the following:
    1. To encode at lossless mode, encoder forces the use of unit
quantizer, i.e, Q 0, where effective quantization is 1. Encoder also
disables the usage of 8x8 transform and allows only 4x4 transform;
    2. At Q 0, the first order 4x4  DCT/IDCT have been switched over
to a pair of forward and inverse Walsh-Hadamard Transform
(http://goo.gl/EIsfy),  with proper scaling applied to match the range
of the original 4x4 DCT/IDCT pair;
    3. At Q 0, the second order remains to use the previous
walsh-hadamard transform pair. However, to maintain the reversibility
in second order transform at Q 0, scaling down is applied to first
order DC coefficients prior to forward transform, and scaling up is
applied to the second order output prior to quantization. Symmetric
upscaling and downscaling are added around inverse second order
transform;
    4. At lossless mode, encoder also disables a number of minor
features to ensure no loss is introduced, these features includes:
        a. Trellis quantization optimization
        b. Loop filtering
        c. Aggressive zero-binning, rounding and zero-bin boosting
        d. Mode based zero-bin boosting

Lossless coding test was performed on all clips within the derf set,
to verify that the commit has achieved lossless compression for all
clips. The average compression ratio is around 2.57 to 1.
(http://goo.gl/dEShs)

Change-Id: Ia3aba7dd09df40dd590f93b9aba134defbc64e34
2012-06-28 17:09:47 -07:00
Paul Wilkins a87fb0da5b Alter comment on range of delta_q and delta_lf
Update the comment that defines the allowed ranges for
delta_q and delta_lf that can be used with segmentation.

Change-Id: Ie56ad6f946704259e03ffd49921a4cfb7e1e2f1f
2012-06-23 16:33:30 +01:00
John Koleszar 8df79e9d42 Remove threading dependencies with --disable-multithread
Avoid a pthreads dependency via pthread_once() when compiled with
--disable-multithread.

In addition, this synchronization is disabled for Win32 as well, even
though we can be sure that the required primatives exist, so that the
requirements on the application when built with --disable-multithread
are consistent across platforms.

Users using libvpx built with --disable-multithread in a multithreaded
context should provide their own synchronization. Updated the
documentation to vpx_codec_enc_init_ver() and vpx_codec_dec_init_ver()
to note this requirement. Moved the RTCD initialization call to match
this description, as previously it didn't happen until the first
frame.

Change-Id: Id576f6bce2758362188278d3085051c218a56d4a
2012-06-15 16:26:39 -07:00
Yunqing Wang eb5b965b44 Merge "multi-res: force Key frame sychronization" 2012-05-22 08:00:12 -07:00
Yunqing Wang 65dd157c3c multi-res: force Key frame sychronization
In multi-resolution encoding, frame_type decision for each frame
is made by the lowest-resolution encoder. For all other higher-
resolution encoders, kf_mode is always set to VPX_KF_DISABLED,
and they are forced to use the same frame_type picked by the
lowest-resolution encoder.

Change-Id: Ic4d52ec65bbc012ca9c2d236210e28a295591eaf
2012-05-16 15:06:42 -04:00
John Koleszar 2bf8fb5889 remove deprecated pre-v0.9.0 API
Remove a bunch of compatibility code dating back to before the initial
libvpx release.

Change-Id: Ie50b81e7d665955bec3d692cd6521c9583e85ca3
2012-05-04 10:44:46 -07:00
John Koleszar 9f9cc8fe71 Merge "Add VPX_TS_ prefix to MAX_LAYERS, MAX_PERIODICITY" into eider 2012-05-03 09:40:50 -07:00
John Koleszar 25a36d6b3c multi-res: restore v1.0.0 API
Move the notion of 0 bitrate implying skip deeper into the codec,
rather than doing it at the multi-encoder API level. This preserves
v1.0.0 ABI compatibility, rather than forcing a bump to v2.0.0 over a
minor change. Also, this allows the case where the application can
selectively enable and disable the larger resolution(s) without having
to reinitialize the codec instace (for instance, if no target is
receiving the full resolution stream).

It's not clear how deep to push this check. It may be valuable to
allow the framerate adaptation code to run, for example. Currently put
the check as early as possible for simplicity, should reevaluate this
as this feature gains real use.

Change-Id: I371709b8c6b52185a1c71a166a131ecc244582f0
2012-05-02 17:40:08 -07:00
John Koleszar d8216b19b6 Merge "Fix compiler warnings" into eider 2012-05-02 16:22:34 -07:00
John Koleszar d46ddd0839 Add VPX_TS_ prefix to MAX_LAYERS, MAX_PERIODICITY
Preserved the prior names for compatibility, will remove in the future.

Change-Id: I8773f959ebce72f60168a2972f7a8ffe6642b9b2
2012-05-02 16:21:52 -07:00
Timothy B. Terriberry 22ae1403e9 Fix trailing commas in enums.
These are warnings in most builds, but show up as compile errors on
 some platforms when these headers are included from C++ code.

Change-Id: I6c523b4dbbc699075fe73830442b51922e5a61d5
2012-05-02 10:35:28 -07:00
Timothy B. Terriberry 28f5451572 Fix trailing commas in enums.
These are warnings in most builds, but show up as compile errors on
 some platforms when these headers are included from C++ code.

Change-Id: I6c523b4dbbc699075fe73830442b51922e5a61d5
2012-05-02 10:08:10 -07:00
Attila Nagy 14c9fce8e4 Fix compiler warnings
Fix code for following warnings:
-Wimplicit-function-declaration
-Wuninitialized
-Wunused-but-set-variable
-Wunused-variable

Change-Id: I2be434f22fdecb903198e8b0711255b4c1a2947a
2012-05-02 10:57:57 +03:00
John Koleszar d72c536ede multi-res: restore v1.0.0 API
Move the notion of 0 bitrate implying skip deeper into the codec,
rather than doing it at the multi-encoder API level. This preserves
v1.0.0 ABI compatibility, rather than forcing a bump to v2.0.0 over a
minor change. Also, this allows the case where the application can
selectively enable and disable the larger resolution(s) without having
to reinitialize the codec instace (for instance, if no target is
receiving the full resolution stream).

It's not clear how deep to push this check. It may be valuable to
allow the framerate adaptation code to run, for example. Currently put
the check as early as possible for simplicity, should reevaluate this
as this feature gains real use.

Change-Id: I371709b8c6b52185a1c71a166a131ecc244582f0
2012-04-20 11:39:42 -07:00
Johann c459d37c26 Allow disabling disabled codecs
When using 'make dist' after --disable-vp8[encoder|decoder] it would
fail to recognize the option. This would only occur when also specifying
--enable-install-docs and --enable-install-srcs but not
--enable-codec-srcs

Including vpx/ fixes builds with --enable-codec-srcs

vpx_timer.h is also required for vpxenc.c

Change-Id: Ie3e28b2f7ec7ee6d5961d3843f9eab869f79c35b
2012-04-02 15:57:28 -07:00
James Zern 6b7cf3077d doxy: fix conditional usage, ref warnings
doxygen < 1.7.? seems to have been more tolerant of single line
\if/\endif

This change fixes warnings such as:
mainpage.dox:13: warning: unable to resolve reference to `vp8_encoder-'
for \ref command
vpx_decoder.h:193: warning: explicit link request to 'n' could not be
resolved

Change-Id: If3d04af5ede1b0d1e2c63021d0e4ac8f98db20b2
2012-03-15 16:51:51 -07:00
Paul Wilkins 46f9ad2ca5 Experimental code base simplification.
Remove error concealment code.

Change-Id: I882705174fbfea212e96f7f684e47a671dbe5c67
2012-02-15 16:08:47 +00:00
Yunqing Wang fa1a9290e6 Allow to skip highest-resolution encoding in multi-resolution encoder
Sometimes, a user doesn't have enough bandwidth to send high-resolution
(i.e. HD) video even though the camera catches HD video. This change
allowed users to skip highest-resolution encoding by setting that level's
target bit rate to 0.

To test it, modify the following line in vp8_multi_resolution_encoder.c.
    unsigned int  target_bitrate[NUM_ENCODERS]={1400, 500, 100};
To skip the highest-resolution level, change it to
    unsigned int  target_bitrate[NUM_ENCODERS]={0, 500, 100};
To skip the first and second highest resolution levels, change it to
    unsigned int  target_bitrate[NUM_ENCODERS]={0, 0, 100};

This change also fixed a small problem in mapping, which slightly helped
quality and performance.

Change-Id: I977bae9a9fbfba85c8be4bd5af01539f2b84bc81
2012-02-03 13:39:05 -05:00
Jim Bankoski 892e23a5ba vp8d - function to check if a reference frame is used.
Change-Id: Id683b4d7f46ffa99145fc4b824c7232ab4182f21
2012-01-10 10:10:26 -08:00
Deb Mukherjee 87aa846b47 Multiframe quality enhancement postprocessing
Adds a multiframe postprocessing module to enhance the quality of
certain frames that are coded at lower quality than preceding frames.
The module can be invoked from the commandline by use of the --mfqe
option, and will be most beneficial for enhancing the quality of
frames decoded using scalable patterns.

Uses the vp8_variance_var16x16 and vp8_variance_sad16x16 function
pointers to compute SAD and Variance of blocks.

Change-Id: Id73d2a6e3572d07f9f8e36bbce00a4fc5ffd8961
2012-01-05 10:21:48 -08:00
John Koleszar c4aeff94b1 Merge "vpx_integer.h: fix incorrect type emulation" 2011-12-13 12:55:46 -08:00
Yunqing Wang 153eec46e0 Align image buffer in multiple-resolution encoder
Aligned the image buffer and stride to 32 bytes. This enables
calling of optimized scaler function in libyuv, and improves
the performance.

Tested libyuv scaler(x86 optimization) on Linux and Windows,
including: Linux 32/64bit, visual studio 32/64bit, Cygwin, and
MinGW32.

Also, fixed a wrong pointer in vpx_codec_encode().

Change-Id: Ibe97d7a0a745f82c43852fa4ed719be5a4db6abc
2011-12-13 09:25:30 -05:00
John Koleszar a4e410a3ca vpx_integer.h: fix incorrect type emulation
The previous definition of uintptr_t was incorrect on x64 with MSVC.
Also, the ARMV6 version of int_fast16_t was defined as unsigned for
some reason. Since the fast types are currently unused, just remove
them.

Change-Id: Idd73f77a989c77feedcb4a6802ae6bd37324ed40
2011-12-09 11:54:40 -08:00
Yunqing Wang 254889cdfc Merge "Allow aligning the raw image buffer" 2011-12-06 10:21:28 -08:00
Yunqing Wang be5bbc96e8 Allow aligning the raw image buffer
Added code to allocate aligned image buffer in vpx_img_alloc(). The
alignment of the buffer and stride is determined by the parameter
align.

Change-Id: Idc866978484be3558551c56df39130ab7f74ddd4
2011-12-06 13:19:59 -05:00
Yunqing Wang aa7335e610 Multiple-resolution encoder
The example encoder down-samples the input video frames a number of
times with a down-sampling factor, and then encodes and outputs
bitstreams with different resolutions.

Support arbitrary down-sampling factor, and down-sampling factor
can be different for each encoding level.

For example, the encoder can be tested as follows.
1. Configure with multi-resolution encoding enabled:
../libvpx/configure --target=x86-linux-gcc --disable-codecs
--enable-vp8 --enable-runtime_cpu_detect --enable-debug
--disable-install-docs --enable-error-concealment
--enable-multi-res-encoding
2. Run make
3. Encode:
If input video is 1280x720, run:
./vp8_multi_resolution_encoder 1280 720 input.yuv 1.ivf 2.ivf 3.ivf 1
(output: 1.ivf(1280x720); 2.ivf(640x360); 3.ivf(320x180).
The last parameter is set to 1/0 to show/not show PSNR.)
4. Decode:
./simple_decoder 1.ivf 1.yuv
./simple_decoder 2.ivf 2.yuv
./simple_decoder 3.ivf 3.yuv
5. View video:
mplayer 1.yuv -demuxer rawvideo -rawvideo w=1280:h=720 -loop 0 -fps 30
mplayer 2.yuv -demuxer rawvideo -rawvideo w=640:h=360 -loop 0 -fps 30
mplayer 3.yuv -demuxer rawvideo -rawvideo w=320:h=180 -loop 0 -fps 30

The encoding parameters can be modified in vp8_multi_resolution_encoder.c,
for example, target bitrate, frame rate...

Modified API. John helped a lot with that. Thanks!

Change-Id: I03be9a51167eddf94399f92d269599fb3f3d54f5
2011-12-05 17:59:42 -05:00
Stefan Holmer 1427205215 Changing decoder input partition API to input fragments.
Adding support for several partitions within one input fragment.
This is necessary to fully support all possible packetization
combinations in the VP8 RTP profile. Several partitions can
be transmitted in the same packet, and they can only be split
by reading the partition lengths from the bitstream.

Change-Id: If7d7ea331cc78cb7efd74c4a976b720c9a655463
2011-11-01 14:44:37 -07:00
John Koleszar 6505adf271 Bump ABI version number for temporal scalability
Commit 217591f modified the encoder ABI without incrementing the version number.

Change-Id: I74de01597dadcdcd96f6b817e4ec69d9ab535e4c
2011-10-11 12:57:17 -07:00
Adrian Grange 217591fde5 Added rate-targeted temporal scalability
Added the ability to create rate-targeted, temporally
scalable, VP8 compatible bitstreams.

The application vp8_scalable_patterns.c demonstrates how
to use this capability. Users can create output bitstreams
containing upto 5 temporally separable streams encoded
as a single VP8 bitstream.
(previously abandoned as:
I92d1483e887adb274d07ce9e567e4d0314881b0a)

Change-Id: I156250a3fe930be57c069d508c41b6a7a4ea8d6a
2011-10-11 12:49:12 -07:00
John Koleszar 87e570e6be Merge remote branch 'origin/master' into experimental
Change-Id: I473166452c0ed5a4219b5e7d96a91a6641b11b9d
2011-07-30 00:05:09 -04:00
John Koleszar 1654ae9a2a Convert rc_max_intra_bitrate_pct to control
Since this is the only ABI incompatible change since the last release,
convert it to use the control interface instead. The member of the
configuration struct is replaced with the VP8E_SET_MAX_INTRA_BITRATE_PCT
control.

More significant API changes were expected to be forthcoming when this
control was first introduced, and while they continue to be expected,
it's not worth breaking compatibility for only this change.

Change-Id: I799d8dbe24c8bc9c241e0b7743b2b64f81327d59
2011-07-28 09:17:35 -04:00
John Koleszar 6907117175 Merge remote branch 'origin/master' into experimental
Change-Id: I956822324c046c254806dd712a2d3be4dcf8564b
2011-07-20 00:05:17 -04:00
John Koleszar d98a5ed4dd Revert "Disable __longjmp_chk protection"
This reverts commit b73a3693e5.

This version of the check doesn't work with generic-gnu, and figuring
out the correct symbol version at configure time is probably more work
than this is worth. May revisit in the future.

Change-Id: I6c75e88bd3bd82a4b21e09a25780fe53aacb7d70
2011-07-19 10:00:27 -04:00
John Koleszar 2614b77fcb Merge remote branch 'origin/master' into experimental
Change-Id: Ida9204624fe3fb99fed1b149d1f88159480fdd83
2011-07-19 00:05:11 -04:00
John Koleszar b73a3693e5 Disable __longjmp_chk protection
glibc implements some checking on longjmp() calls by replacing it with
an internal function __longjmp_chk(), when FORTIFY_SOURCE is defined.
This can be problematic when compiling the library under one version of
glibc and running it under another. Work around this issue for the one
symbol affected for now, before taking out the undef hammer.

Fixes http://code.google.com/p/webm/issues/detail?id=166

Change-Id: Ifc5e25cdec17915e394711f2185b3e9214572d10
2011-07-13 16:07:00 -04:00
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