summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_alloccommon.c
AgeCommit message (Collapse)Author
2013-10-01Moving get_token_alloc function from common to the encoder.Dmitry Kovalev
Also renaming mb_row -> mi_row, mb_col -> mi_col arguments and calculate mb_rows/mb_cols values from mi_rows/mi_cols. Change-Id: I6919a279f560648e23bc9a12f507d17c21ffd5d7
2013-09-27Removing unnecessary function calls.Dmitry Kovalev
Both vp9_init_mbmode_probs() and vp9_zero(cm->ref_frame_sign_bias) are called inside vp9_setup_past_independence() which called in any case for encoder/decoder after VP9_COMMON struct creation. Change-Id: I3724d1a4fb8060101ff0290dd6a158f0b5c57bb4
2013-09-11New mode_info_context storage -- undo revertScott LaVarnway
mode_info_context was stored as a grid of MODE_INFO structs. The grid now constists of pointers to MODE_INFO structs. The MODE_INFO structs are now stored as a stream (decoder only), eliminating unnecessary copies and is a little more cache friendly. Change-Id: I031d376284c6eb98a38ad5595b797f048a6cfc0d
2013-09-09Revert "New mode_info_context storage"James Zern
This reverts commit dae17734ece414091ba1184f7becd0aa6c0004f1 Encode crashes, leaks and increases integer overflow errors. Change-Id: I595aa2649bb8d0b6552ff91652837a74c103fda2
2013-09-06New mode_info_context storageScott LaVarnway
mode_info_context was stored as a grid of MODE_INFO structs. The grid now constists of a pointer to a MODE_INFO struct and a "in the image" flag. The MODE_INFO structs are now stored as a stream, eliminating unnecessary copies and is a little more cache friendly. For the test clips used, the decoder performance improved by ~4.3% (1080p) and ~9.7% (720p). Patch Set 2: Re-encoded clips with latest. Now ~1.7% (1080p) and 5.9% (720p). Change-Id: I846f29e88610fce2523ca697a9a9ef2a182e9256
2013-08-29consistently name VP9_COMMON variables #2James Zern
oci -> cm Change-Id: Ifd75c809d9cc99034d3c2fccc4653a78b3aec21f
2013-08-22rename LOG2_* defines to *_LOG2James Zern
gets rid of a mix of styles Change-Id: I3591d312157bc6f53a25438bf047765c671fd8a8
2013-08-16Merge "Added resizing & initialization of last frame segment map"Adrian Grange
2013-08-15Added resizing & initialization of last frame segment mapAdrian Grange
When the frame size changes the last frame segment map must be resized to match and initialized to 0. Change-Id: Idc10de109f55dbe9af3a6caae355a2974712243d
2013-08-14Renaming in MB_MODE_INFOPaul Wilkins
The macro block mode info context originally contained an entry for each 16x16 macroblock. In VP9 each entry refers to an 8x8 region not a macro block, so the naming is misleading. This first stage clean up changes the names of 3 entries in the structure to remove the mb_ prefix. TODO clean up the nomenclature more widely in respect of mbmi and bmi. Change-Id: Ia7305c6d0cb805dfe8cdc98dad21338f502e49c6
2013-08-12Entropy context related cleanups.Dmitry Kovalev
Adding set_skip_context() function used from both encoder and decoder. Change-Id: Ia22cfad3211a00a63eb294f64f857b78f4aa9b85
2013-07-22VP9_COMMON: remove unused temp_scale_frameJames Zern
Change-Id: I696a0dca1d02d365e283029d1d077710bd5680e0
2013-07-19Renaming TXFM_MODE to TX_MODE (like TX_SIZE, TX_TYPE).Dmitry Kovalev
Moving TX_MODE enum to vp9_enums.h. Renaming txfm_mode variables to tx_mode. Change-Id: I459d1af6dd928ce7fccdf8ce30b6f1ca057bef92
2013-07-16Merge "yv12config: remove YUV_TYPE"James Zern
2013-07-16Fix above context pointersJohn Koleszar
In the prior code, the above context pointers used for entropy decoding were initialized on the first frame, and not updated when the frame size changed. The per-frame code which initializes the contexts assumes that the contexts are contiguous, leading to an incomplete initialization when the frame is smaller. This commit updates the pointers so that the context is contigous whenever the frame size changes. Change-Id: I08b53e3a30c8289491212311682ff1b8028cff6c
2013-07-12yv12config: remove YUV_TYPEJames Zern
this was never fleshed out in the context of VP8, for which it was added. for VP9 it has no meaning. Change-Id: Iba2ecc026d9e947067b96690245d337e51e26eff
2013-07-08Using mi_cols instead of mb_cols.Dmitry Kovalev
Eliminating usage of mb-units, switching to mi-units. Adding ALIGN_POWER_OF_TWO macro. Change-Id: I2491c969f713207c062011878b57e4e531818607
2013-07-03Replacing 64 / MI_SIZE with MI_BLOCK_SIZE.Dmitry Kovalev
Change-Id: I32276552b3ea6dc1dce8e298be114cfe1019b31c
2013-06-10Remove remnants of VP8 profiles/versionsJohn Koleszar
Remove the bilinear filter mode, and the no-loopfilter mode, and the related vp9_setup_version() function. Change-Id: I32311367812faf37863131df3af37d63d03973d7
2013-06-08Merge "Align frame size to 8 instead of 16." into experimentalRonald S. Bultje
2013-06-07Align frame size to 8 instead of 16.Ronald S. Bultje
Change-Id: Ic606ef1b31e49963a779455a1e010a9ebb0f3f1f
2013-06-07Handle partition type coding of boundary blocksJingning Han
The partition types of blocks sitting on the frame boundary are constrained by the block size and the position of each sub-block relative to the frame. Hence we use truncated probability models to handle the coding of such information. 100 frames run: yt 0.138% Change-Id: I85d9b45665c15280069c0234ea6f778af586d87d
2013-06-07Merge "Revert "Align frame size to 8 instead of 16."" into experimentalRonald S. Bultje
2013-06-07Revert "Align frame size to 8 instead of 16."Ronald S. Bultje
This reverts commit c2574414d432c7d040f3b2b05f23a109a801ea69 Change-Id: Ie9013cb0bb43e639e01b4588f630b1da59295d38
2013-06-06Align frame size to 8 instead of 16.Ronald S. Bultje
Change-Id: Ic22f416a33de558519d5c30a929f6a954546ade9
2013-06-06Fix FIXME.Ronald S. Bultje
Change-Id: I47a9857d35da1bff6153f8090c6b98b689b31a61
2013-06-06don't tokenize & encode tokens for blocks in UMVJim Bankoski
This avoids encoding tokens for blocks that are entirely in the UMV border. This changes the bitstream. Change-Id: I32b4df46ac8a990d0c37cee92fd34f8ddd4fb6c9
2013-06-05Moving bits from compressed header to uncompressed one.Dmitry Kovalev
Bits moved: refresh_frame_flags, active_ref_idx[], ref_frame_sign_bias[], allow_high_precision_mv, mcomp_filter_type, ref_pred_probs[]. Derf results: +0.040% Change-Id: I011f43c7eac0371d533b255fd99aee5ed75b85a5
2013-05-30Merge all intra mode coding trees into a single one.Ronald S. Bultje
Also merge all counters. This removes a few unused probability updates from the bitstream. Change-Id: I20f58853e9dac84d8c0d9703ae012c55917516eb
2013-05-21Merge "Initial version of alpha channel support" into experimentalJohn Koleszar
2013-05-17Removing clamp_type from the bitstream.Dmitry Kovalev
Change-Id: Ica75bdd4905c4a04b7f92795d0b8ce6836a99ef4
2013-05-16Initial version of alpha channel supportJohn Koleszar
This is a mostly-working implementation of an extra channel in the bitstream. Configure with --enable-alpha to test. Notable TODOs: - Add extra channel to all mismatch tests, PSNR, SSIM, etc - Configurable subsampling - Variable number of planes (currently always uses all 4) - Loop filtering - Per-plane lossless quantizer - ARNR support This implementation just uses the same contents as the Y channel for the A channel, due to lack of content and general pain in playing back 4 channel content. A later patch will use the actual alpha channel passed in from outside the codec. Change-Id: Ibf81f023b1c570bd84b3064e9b4b8ae52e087592
2013-05-09Subsampling aware allocs and bitstreamJohn Koleszar
Make framebuffer allocations according to the chroma subsamping factors in use. A bit is placed in the raw part of the frame header for each of the two subsampling factors. This will be moved in a future commit to make them part of the TBD feature set bits, probably only set on keyframes, etc. Change-Id: I59ed38d3a3c0d4af3c7c277617de28d04a001853
2013-05-08Removing LOOPFILTER_TYPE and corresponding bit in bitstream.Dmitry Kovalev
We don't have two loopfilter types anymore. Change-Id: I53c0137361342c7d00887ad03be3490f0dfa3532
2013-05-08Extend left/above partition context to per mi(8x8)Jingning Han
Update and buffer left/above partition information context per 8x8 block. This allows to further enable recursive partition down to 4x4 block size, and hence deprecating I4X4_PRED and SPLITMV. This commit also fixes a context buffer swap/restore issue in 32x32 partition type search. This gives 0.1% performance gain for derf/yt. Will refactor the superblock partition type search into recursion form. Change-Id: Ib61975aca5f12b78d8018481d7fa1393d085689b
2013-04-30Adding vp9_update_frame_size function.Dmitry Kovalev
Moving common code from encoder and decoder to vp9_update_frame_size. Change-Id: I6ca758b7d05ffd52821bd3f7ad68089da11e4165
2013-04-29Change above/left_context to use an 8x8 basis.Ronald S. Bultje
Output changes slightly because of a minor bug in (at least) the sb32x16 block2above tx16x16 tables that previously existed in vp9_blockd.c. Change-Id: I624af28ac200a8322d64454cf05c79e9502968cc
2013-04-26Grow MODE_INFO array to use an 8x8 basis.Ronald S. Bultje
Change-Id: I087e08e7909a406b71715b8525c104208daa6889
2013-04-25Remove implicit assumption that mode_info_stride == mb_cols + 1.Ronald S. Bultje
Change-Id: I3030d7adac73109aeaa1ecc0f78ac968c092d9aa
2013-04-24Contextual entropy coding of partition syntaxJingning Han
This commit enables selecting probability models for recursive block partition information syntax, depending on its above/left partition information, as well as the current block size. These conditional probability models are reasonably stationary and consistent across frames, hence the backward adaptive approach is used to maintain and update the contextual models. It achieves coding performance gains (on top of enabling rectangular block sizes): derf: 0.242% yt: 0.391% hd: 0.376% stdhd: 0.645% Change-Id: Ie513d9673337f0d27abd65fb566b711d0844ec2e
2013-04-19Eliminated prev_mip memsets/memcpysScott LaVarnway
For 1080 material, this buffer is currently 2,270,928 bytes. This patch swaps ptrs instead of copying and uses the last show_frame flag instead of setting the entire buffer to zero. For the test clip used, the decoder improved by up to 1%. Change-Id: I686825712ad56043e09ada9808dc489f875a6ce0
2013-04-17Adding DEFAULT_PRED_PROB_{0, 1, 2} constants.Dmitry Kovalev
Also using ALLOWED_REFS_PER_FRAME instead of 3. Change-Id: I810dd8521d8138edb9dbd78edede49b62f706554
2013-04-16Remove the mb_no_coeff_skip flagJohn Koleszar
This flag was added to VP8 to allow a mode where MB-level skipping was not allowed, saving a bit per mb. It was never used in practice, and hasn't been tested in VP9, so remove it. Change-Id: Id450ec6904c6d06c1919508e7efc52d05cde5631
2013-04-05Remove full-pixel-related code.Ronald S. Bultje
This is a VP8-only feature (part of profile 3) that is unsupported in VP9. Change-Id: I78016eede8d9c834d44d4c517f3e8b8fc2a378b1
2013-04-01Code cleanup.Dmitry Kovalev
Adding multiple16 function, removing redundant code, better formatting. Change-Id: I50195b78ac8ab803e3d05c8fb05a7ca134fab386
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-02-13Remove NEWCOEFCONTEXT experiment.Paul Wilkins
Removal of the NEWCOEFCONTEXT experiment to reduce code clutter and make it easier to experiment with some other changes to the coefficient coding context. Change-Id: Icd17b421384c354df6117cc714747647c5eb7e98
2013-01-29Merge "Fix overread/write reported by valgrind if (mb_cols) & 3 != 0." into ↵Ronald S. Bultje
experimental
2013-01-25Fix overread/write reported by valgrind if (mb_cols) & 3 != 0.Ronald S. Bultje
We'd backup and restore all cols for a 64x64 SB, but the array wouldn't be big enough to hold all that data. Change-Id: Ic68ea721bf07e0b2f3937bd16b0b734bcc743ce1
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