summaryrefslogtreecommitdiff
path: root/vp8/vp8_dx_iface.c
AgeCommit message (Collapse)Author
2013-04-03vp8: set y_crop_{width,height}John Koleszar
Update to use the new YV12_BUFFER_CONFIG structure. Change-Id: Ia64757d50cc9019d336fa622e059bf68140d0fa7
2013-03-15Basic encryption feature for libvpx.Dmitry Kovalev
New decoder control paramter VP8_SET_DECRYPT_KEY to set the decryption key. Change-Id: I6fc1f44d41f74f3b3f702778af1a6f8f5cc9439f
2013-03-02vp8_init: fix NULL dereference on allocation errorJames Zern
Change-Id: I15a6cd014fce8090cdb0441723bd1a90b562579c
2013-01-30WIP: Multiple decoder instances supportScott LaVarnway
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-29Use FRAGMENT_DATA struct in pbiScott LaVarnway
for fragment information. Change-Id: Idc83625591a1e4ca6f551dcfb7fc0428f6f37351
2013-01-25Merge "Bug fix: Handle input data ptr = NULL and size = 0 correctly"Marco Paniconi
2013-01-22Bug fix: Handle input data ptr = NULL and size = 0 correctlyScott LaVarnway
Issue 517: Issues decoding VPX_CODEC_USE_INPUT_FRAGMENTS http://code.google.com/p/webm/issues/detail?id=517 Change-Id: I030c4cf15b1e1b993433571b6ee77c959a368ff2
2012-11-15support building vp8 and vp9 into a single libJohn Koleszar
Change-Id: Ib8f8a66c9fd31e508cdc9caa662192f38433aa3d
2012-09-24Move frame allocations out of vp8_decode_frame()Scott LaVarnway
in order to make it easier to implement the frame-base multithreading. Change-Id: Iea2fd05be34fa704848fdc7669bf167f2ed229c5
2012-09-19Moved vp8dx_get_raw_frame() call to vp8_get_frame()Scott LaVarnway
This change is necessary for the frame-based multithreading implementation. Since the postproc occurs in this call, vpxdec was modified to time around vpx_codec_get_frame() Change-Id: I389acf78b6003cd35e41becc16c893f7d3028523
2012-06-15Remove threading dependencies with --disable-multithreadJohn Koleszar
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-05-04remove deprecated pre-v0.9.0 APIJohn Koleszar
Remove a bunch of compatibility code dating back to before the initial libvpx release. Change-Id: Ie50b81e7d665955bec3d692cd6521c9583e85ca3
2012-05-04Make global data constAttila Nagy
Removes all runtime initialization of global data. This commit is a squashed version of the following series cherry-picked from master. This is necessary because of a change that was merged to the tester that depends on the scaler being moved to the RTCD framework, which is a worthwhile thing to include in Eider anyway. - a91b42f02 Makes all global data in entropy.c const - b35a0db0e Makes all global data in tokenize.c const - 441cac8ea Makes all mode token tables const - 5948a0210 Ports vpx_xcaler to new RTCD method - 317d4244c Makes all mode token tables const part 2 Change-Id: Ifeaea24df2b731e7c509fa6c6ef6891a374afc26
2012-01-27Hook up VP8D_GET_LAST_REF_USEDJohn Koleszar
Commit 892e23a5b introduced support for the VP8D_GET_LAST_REF_USED, but missed the mapping of the control id to the underlying function, so it was unavailable to applications. In addition, the underlying function vp8_references_buffer() is moved from common/postproc.c to decoder/onyxd_if.c as postproc.c is not built in all configurations. Change-Id: I426dd254e7e6c4c061b70d729b69a6c384ebbe44
2012-01-10vp8d - function to check if a reference frame is used.Jim Bankoski
Change-Id: Id683b4d7f46ffa99145fc4b824c7232ab4182f21
2012-01-09Merge "Multiframe quality enhancement postprocessing"Deb Mukherjee
2012-01-05Multiframe quality enhancement postprocessingDeb Mukherjee
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
2011-12-21Remove opaque pointer VP8D_PTRJohn Koleszar
Use an opaque struct rather than typecasting through VP8D_PTR, an int*. Change-Id: Ia260b7d53d7e0950cfa1e00f4ecead1099bd3b87
2011-12-05Multiple-resolution encoderYunqing Wang
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-11-01Changing decoder input partition API to input fragments.Stefan Holmer
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-07-26cosmetics: consistently use [u]int64_tJames Zern
Removes mixed usage of (unsigned) long long and INT64. Fixes Issue #208. Change-Id: I220d3ed5ce4bb1280cd38bb3715f208ce23cf83a
2011-07-20Increase chrow row alignment to 16 bytes.Timothy B. Terriberry
This is done by expanding luma row to 32-byte alignment, since there is currently a bunch of code that assumes that uv_stride == y_stride/2 (see, for example, vp8/common/postproc.c, common/reconinter.c, common/arm/neon/recon16x16mb_neon.asm, encoder/temporal_filter.c, and possibly others; I haven't done a full audit). It also uses replaces the hardcoded border of 16 in a number of encoder buffers with VP8BORDERINPIXELS (currently 32), as the chroma rows start at an offset of border/2. Together, these two changes have the nice advantage that simply dumping the frame memory as a contiguous blob produces a valid, if padded, image. Change-Id: Iaf5ea722ae5c82d5daa50f6e2dade9de753f1003
2011-06-28New ways of passing encoded data between encoder and decoder.Stefan Holmer
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-22get/set reference buffer dimension check addedJames Berry
vp8_yv12_copy_frame_ptr() expects same size buffers which was not previously gaurenteed. Using an improperly allocated buffer would cause a crash before. Change-Id: I904982313ce9352474f80de842013dcd89f48685
2011-05-19Adding error-concealment to the decoder.Stefan Holmer
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-09clean up unused variable warningsJohann
Change-Id: I9467d7a50eac32d8e8f3a2f26db818e47c93c94b
2011-03-17Set bounds from the array when iterating mmaps.Ralph Giles
The mmap allocation code in vp8_dx_iface.c was inconsistent. The static array vp8_mem_req_segs defines two descriptors, but only the first is real. The second is a sentinel and isn't actually allocated, so vpx_codec_alg_priv is declared with mmaps[NELEMENTS(vp8_mem_req_segs)-1]. Some functions use this reduced upper bound when iterating though the mmap array, but these two functions did not. Instead, this commit calls NELEMENTS(...->mmaps) to directly query the bounds of the dereferenced array. This fixes an array-bounds warning from gcc 4.6 on vp8_xma_set_mmap. Change-Id: I918e2721b401d134c1a9764c978912bdb3188be1
2011-03-17Remove commented-out VP6 code from vp8_finalize_mmapsRalph Giles
Change-Id: I48642c380353043bed96026f56de5908fcee270a
2011-02-17Use endian-neutral bitstream packing/unpackingJohn Koleszar
Eliminate unnecessary checks on target endianness and associated macros. Change-Id: I1d4e6a9dcee9bfc8940c8196838d31ed31b0e4aa
2011-02-10Fix relative include pathsJohn Koleszar
Allow compiling without adding vp8/{common,encoder,decoder} to the include paths. Change-Id: Ifeb5dac351cdfadcd659736f5158b315a0030b6c
2011-01-19Merge "Implement error tracking in the decoder"John Koleszar
2011-01-19Implement error tracking in the decoderHenrik Lundin
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
2010-12-17propagate user private data on decodeJohn Koleszar
The pointer passed in the user_priv argument to vpx_codec_decode() should be propagated through to the corresponding output frame and made available in the image's user_priv member. Fixes issue #252 Change-Id: I182746a6882c8549fb146b4a4fdb64f1789eb750
2010-12-17Inform caller of decoder about updated referencesHenrik Lundin
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-11-10postproc : Re-work posproc calling to allow more flags.Fritz Koenig
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-05Merge commit 'fix integer promotion bug in partition size check'John Koleszar
Change-Id: I4081917b46013fa8f4218cade8bd12cb2d013aee
2010-11-05fix integer promotion bug in partition size checkJohn Koleszar
The check '(user_data_end - partition < partition_size)' must be evaluated as a signed comparison, but because partition_size was unsigned, the LHS was promoted to unsigned, causing an incorrect result on 32-bit. Instead, check the upper and lower bounds of the segment separately. Change-Id: I6266aba7fd7de084268712a3d2a81424ead7aa06
2010-10-27Eliminate more warnings.Timothy B. Terriberry
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-09-23Add getter functions for the interface data symbolsJohn Koleszar
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-09Use WebM in copyright notice for consistencyJohn Koleszar
Changes 'The VP8 project' to 'The WebM project', for consistency with other webmproject.org repositories. Fixes issue #97. Change-Id: I37c13ed5fbdb9d334ceef71c6350e9febed9bbba
2010-07-23Don't dereference ctx->priv if it hasn't been setup correctly.Fredrik Söderquist
2010-07-23Only touch ctx->priv if vp8_mmap_alloc succeeded.Fredrik Söderquist
2010-07-22Remove CONFIG_NEW_TOKENS files.Fritz Koenig
These files were out of date and no longer maintained. Token decoding has implemented the no-crash code which is incompatible with this arm assembly code. Change-Id: Ibf729886c56fca48181af60b44bda896c30023fc
2010-06-18cosmetics: trim trailing whitespaceJohn Koleszar
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-11Incorrect comment.Paul Wilkins
(Thanks to Ronald S. Bultje)
2010-06-10Remove reference to 'vpx Technologies'John Koleszar
Vestigial. Change-Id: Iffa9e6d5ba5199b136d7549890101da17c11e3c3
2010-06-04LICENSE: update with latest textJohn Koleszar
Change-Id: Ieebea089095d9073b3a94932791099f614ce120c
2010-05-24vpx_image: add VPX_ prefix to PLANE_*John Koleszar
The PLANE_{PACKED,Y,U,V,ALPHA} macros should be renamed to be within the VPX_ namespace. Fixes #27
2010-05-24install includes in DIST_DIR/include/vpx, move vpx_codec/ to vpx/John Koleszar
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-21Put img_fmt in the vpx namespaceJames Zern
Avoid an potential name clashes and match other external types. s/IMG_FMT/VPX_$&/g s/img_fmt/vpx_$&/g Change-Id: Ia7ad5bbb6424416b37e71e5f5eb1eca31c3c707f