summaryrefslogtreecommitdiff
path: root/vp9/vp9_dx_iface.c
AgeCommit message (Collapse)Author
2014-02-21Stop gating non420 features with a configure flag.Alex Converse
Change-Id: I8cc38fdef6a2a0968af8dfe15e7c2b3c46c531ea
2014-02-15vp9_cx_iface vp9_dx_iface vpxdec vs warningsJim Bankoski
Change-Id: I747982e7d1157a8b45f4034ddf207306f9f957e0
2014-02-13Add VP9 decoder support for external frame buffersFrank Galligan
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-11Fix frames that have no references to them.Frank Galligan
BasicRateTargeting3TemporalLayers found an error with the get/release frame buffer management. Change-Id: Iccff25cba1d2f276f2a0d0fb7b20cf99b4405549
2014-02-11Merge "Add get release decoder frame buffer functions."Frank Galligan
2014-02-10Add get release decoder frame buffer functions.Frank Galligan
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-07Fixing undefined behavior vp9_peek_si().Dmitry Kovalev
Bitwise OR operation doesn't guarantee any subexpression evaluation order. Just reading one bit now and ignoring the next one. For reference look at vp9_decode_frame() implementation. Change-Id: I4971686929838ae5ded8f43a38a2934db5e1d462
2014-01-24Revert external frame buffer code.Frank Galligan
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 9e41d569d7c84dd9ca8f0047c15377a883945685. Revert "Add external constants." This reverts commit bbf53047b03106e3c2e24b28cb836cc838db5ee8. Revert "Add frame buffer lru cache." This reverts commit fbada948fa345e67acf9aa41a8f9a78f5dfe8648. Conflicts: vpxdec.c Change-Id: I76fe42419923a6ea6c75d9997cbbf941d73d3005 Revert "Add support to pass in external frame buffers." This reverts commit 10f891696bc4c972c13cc9fde2c53470501a03e2. 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-10Cleaning up vp9_dx_iface.c.Dmitry Kovalev
Change-Id: I6a0dfb95c55ee6cadc7b1675782c7830e5c7caaf
2013-12-27Using VP9_FRAME_MARKER instead of raw number.Dmitry Kovalev
Change-Id: I3addbf6d89a86a707c8df1a463da3e9e367910df
2013-12-17Increase required number of external frame buffersFrank Galligan
Make applications pass in VPX_MAXIMUM_WORK_BUFFERS as well as VP9_MAXIMUM_REF_BUFFERS. Change-Id: I9c07ce83fa19c90ed43227b801b2013690e81edd
2013-12-15Add frame buffer lru cache.Frank Galligan
Add an option for libvpx to return the least recently used frame buffer. Change-Id: I886a96ffb94984f1c42de53086e0131922df3260
2013-12-15Add support to pass in external frame buffers.Frank Galligan
VP9 decoder can now use frame buffers passed in by the application. Change-Id: I599527ec85c577f3f5552831d79a693884fafb73
2013-11-22Fix decoder to handle display size correctlyAdrian Grange
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-10-23Adding VP9_FRAME_MARKER constant.Dmitry Kovalev
Also renaming SYNC_CODE_* to VP9_SYNC_CODE_*. Change-Id: I9ff504c6ebce6cd6673d7df2085d597b818f5960
2013-10-15Prevent access to invalid pointerYaowu Xu
The commit added check to make sure no invalid memory access even when the decoder instance is never initialized. Change-Id: I4da343d0b3c78c27777ac7f5ce7688562c69f0c5
2013-09-29cpplint issues resolved in vp9_dx_iface.cJim Bankoski
Change-Id: I01cbd1b00d8d8e02541b2c29b9e88e690edfcaba
2013-09-04make vp9 postproc a config optionJim Bankoski
Vp9 postproc is disabled for now as its not been shown to help and may be merged with vp8. Change-Id: I25620d6cd34c6e10331b18c7b5ef7482e39c6057
2013-08-21vp9_peek_si: add bitstream v1 supportJames Zern
currently protected by CONFIG_NON420 as v1 is still not entirely stable Change-Id: Id1c5081b04a2c47a842822048b8804be67d23a6d
2013-08-14vp9_dx_iface: check for NULL/0-size inputJames Zern
avoids a crash caused by issue #585 Change-Id: I301595ee0227699b0da6f0dad6d870dd546e94ef
2013-07-12vp9_dx_iface: s/vp8/vp9/ where possibleJames Zern
drop 'vp9_' from most static functions unrelated to the codec interface itself. Change-Id: I33e76c425bb7373570a57a61662a56d65ab4bdf3
2013-07-11vp[89]_dx_iface: delete unused functionJames Zern
static mmap_lkup Change-Id: I24aeac1eca8453e28d58bc06925e58efc228a0a6
2013-07-11vp[89]_dx_iface: factorize vp8_mmap_*()James Zern
s/vp8/vpx/ -> vpx_codec_internal.h / vpx_codec.c Change-Id: If4192b40206276a761b01d44e334fe15bcb81128
2013-07-11vp9: fix peek_si for version==0James Zern
Change-Id: I6bfec4fa50dfc1a953edb1a2aa8e97e6e896bed6
2013-06-12Quick fix to stop vpxdec infinite loopScott LaVarnway
vpxdec stays in a loop when decoding vp9. This patch is a quick fix to stop the loop when all data has been decoded. Eventually we should move the vp9_get_raw_frame() call into vp8_get_frame(). Change-Id: I3f97b6b4e1fe9ba69f746a29fc54c3304956f661
2013-06-11Merge branch 'master' into experimentalJohn Koleszar
Change-Id: Ie648398b82f7311143709f55c0e30ba452f50eff
2013-06-07Add bits for colorspace, profileJohn Koleszar
Adds 3 bits for colorspace (sent on keyframes), 2 bits for version. Change-Id: Iaa0cf1dcdd085cebb46e2bc4a7c78cd33cf24325
2013-05-28Compressed/uncompressed frame header changes.Dmitry Kovalev
Adding API to read/write uncompressed frame header bits (it is not final yet). Separate functions to read/write uncompressed header. Moving clr_type, error_resilient_mode, refresh_frame_context, frame_parallel_decoding_mode, frame_context_idx from compressed partition to uncompressed frame header. Change-Id: Id3ed8a387980c652ae147549412f4ec24a0a5bd0
2013-05-28Revert "Adding API to read/write uncompressed frame header bits." because of ↵Dmitry Kovalev
bitstream mismatches. This reverts commit df037b615fcc0196386977faae060fdfd9a887a8 Change-Id: I1a529f2590df7bc912f5035d22311268933e3dd6
2013-05-21Adding API to read/write uncompressed frame header bits.Dmitry Kovalev
The API is not final yet and can be changed. Actual layout of uncompressed frame part will be finalized later. Right now moving clr_type, error_resilient_mode, refresh_frame_context, frame_parallel_decoding_mode from first compressed partition to uncompressed frame part. Change-Id: I3afc5d4ea92c5a114f4c3d88f96858cccc15b76e
2013-05-20Give VP9 a different sync code from VP8Jingning Han
The new code is 0x49, 0x83, 0x42 There is nothing particularly special about this code bitstream wise. Its derivation is the word "sync" coded using 4x6bit alphabetic indices. Change-Id: Ie2430a854af32ddc5a5c25a6c1c90cf6497ba647
2013-05-15Adding alpha plane to YV12_BUFFER_CONFIG structure.Dmitry Kovalev
Change-Id: I8b2687138df636b2b78c8cc5156e3882b0009de0
2013-04-29Match unsigned typesJohann
Fixes build warning in MSVC: vp9\vp9_dx_iface.c(420) : warning C4018: '<' : signed/unsigned mismatch vp9\vp9_dx_iface.c(423) : warning C4018: '<' : signed/unsigned mismatch Change-Id: Ia238071aee94b2f882c1e74c380adc3df506dfb6
2013-04-26Merge branch 'master' into experimentalJohann
Conflicts: vp9/common/vp9_findnearmv.c vp9/common/vp9_rtcd_defs.sh vp9/decoder/vp9_decodframe.c vp9/decoder/x86/vp9_dequantize_sse2.c vp9/encoder/vp9_rdopt.c vp9/vp9_common.mk Resolve file name changes in favor of master. Resolve rdopt changes in favor of experimental, preserving the newer experiments. Change-Id: If51ed8f457470281c7b20a5c1a2f4ce2cf76c20f
2013-04-23Improve sign consistency.Johann
Fix warning on windows: signed/unsigned mismatch on lines 415, 454 Comparison was between size_t data_sz >= int index_sz on 415 and unsigned int data_sz >= int index_sz on 454. Both might be changed to size_t but that would be tracing and replacing all comparisons is outside the scope of this change. In the rest of these two functions ensure unsigned values are used consistently. Change-Id: I922b399ceca612a92f44b9d1d331c1c6bae9d768
2013-04-02Lower case names for struct members.Dmitry Kovalev
Lower case member names inside VP9D_CONFIG and VP9D_COMP structs. Change-Id: I75af9ad2d929a35c357207a3fd9ebedddabf79c3
2013-03-27Convert inv_tile_order to control interfaceJohn Koleszar
Restore ABI compatibility with the master branch. Change-Id: Ie9f6fdf536662bd87dfcf114d16f003422670763
2013-03-13Fix pulsing issue with scalingJohn Koleszar
Updates the YV12_BUFFER_CONFIG structure to be crop-aware. The exiting width/height parameters are left unchanged, storing the width and height algined to a 16 byte boundary. The cropped dimensions are added as new fields. This fixes a nasty visual pulse when switching between scaled and unscaled frame dimensions due to a mismatch between the scaling ratio and the 16-byte aligned sizes. Change-Id: Id4a3f6aea6b9b9ae38bdfa1b87b7eb2cfcdd57b6
2013-03-13Add VP9_GET_REFERENCE controlJohn Koleszar
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-12fix superframe index marker masksJohn Koleszar
The superframe index marker byte carries data in the lower 5 bits. Only the upper 3 should be used as part of the mask to detect it. By masking with 0xf0, the previous code was incorrect for frames over 65k bytes. Change-Id: I6248889f5af227457f359a56b2348ef6db87a3b4
2013-03-05Add 'superframe' indexJohn Koleszar
A 'superframe' is a group of frames that share the same PTS, but have a defined decoding order. This commit adds the ability to append an index to such a group of frames, allowing for random access to the constituent frames. This could be useful for frame-level parallelism or partial decoding in a multilayer scenario. Decoding the stream serially without such an index should work as a fallback, and VP9/TestSuperframeIndexIsOptional verifies that. Change-Id: Idff83b7560e1a7077d8fb067bfbc45b567e78b1c
2013-03-04Support 16K sequence codingJingning Han
Fixed a couple of variable/function definitions, as well as header handling to support 16K sequence coding at high bit-rates. The width and height are each specified by two bytes in the header. Use an extra byte to explicitly indicate the scaling factors in both directions, each ranging from 0 to 15. Tested coding up to 16400x16400 dimension. Change-Id: Ibc2225c6036620270f2c0cf5172d1760aaec10ec
2013-02-05[WIP] Add column-based tiling.Ronald S. Bultje
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-01-23Adds an error-resilient mode with testDeb Mukherjee
Adds an error-resilient mode where frames can be continued to be decoded even when there are errors (due to network losses) on a prior frame. Specifically, backward updates are turned off and probabilities of various symbols are reset to defaults at the beginning of each frame. Further, the last frame's mvs are not used for the mv reference list, and the sorting of the initial list based on search on previous frames is turned off as well. Also adds a test where an arbitrary set of frames are skipped from decoding to simulate errors. The test verifies (1) that if the error frames are droppable - i.e. frame buffer updates have been turned off - there are no mismatch errors for the remaining frames after the error frames; and (2) if the error-frames are non droppable, there are not only no decoding errors but the mismatch PSNR between the decoder's version of the post-error frames and the encoder's version is at least 20 dB. Change-Id: Ie6e2bcd436b1e8643270356d3a930e8989ff52a5
2013-01-16Start to anonymize reference framesJohn Koleszar
Remove lst_fb_idx, gld_fb_idx, alt_fb_idx, refresh_last_frame, refresh_golden_frame, refresh_alt_ref_frame from common. Gold/Alt are encode side conventions. From the decoder's perspective, we want to be dealing with numbered references. Updates to active_ref 2 signal mode context switches, vestigial from refresh_alt_ref_frame. This needs some clean up to make sense with increased numbers of reference frames, as well as reimplementing the swapping of alt/golden which was previously done using the buffer-to-buffer copy mechanism removed in an earlier commit. Change-Id: I7334445158b7666f9295d2a2dd22aa03f4485f58
2013-01-11Upstream changes from Chromium Android Clang build.Frank Galligan
See https://codereview.chromium.org/11875006/ Change-Id: Ied2a17df2b3222635f84aef120eaa9feb53750d2
2012-12-18Use standard integer types for pixel values and coefficients.Ronald S. Bultje
For coefficients, use int16_t (instead of short); for pixel values in 16-bit intermediates, use uint16_t (instead of unsigned short); for all others, use uint8_t (instead of unsigned char). Change-Id: I3619cd9abf106c3742eccc2e2f5e89a62774f7da
2012-11-27Add vp9_ prefix to all vp9 filesJohn Koleszar
Support for gyp which doesn't support multiple objects in the same static library having the same basename. Change-Id: Ib947eefbaf68f8b177a796d23f875ccdfa6bc9dc
2012-11-15Pack invisible frames without lengthsJohn Koleszar
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-15support building vp8 and vp9 into a single libJohn Koleszar
Change-Id: Ib8f8a66c9fd31e508cdc9caa662192f38433aa3d