summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_tokenize.h
AgeCommit message (Collapse)Author
2014-10-03Rework partition search skip schemeJingning Han
This commit enables the encoder to skip split partition search if the bigger block size has all non-zero quantized coefficients in low frequency area and the total rate cost is below a certain threshold. It logarithmatically scales the rate threshold according to the current block size. For speed 3, the compression performance loss: derf -0.093% stdhd -0.066% Local experiments show 4% - 20% encoding speed-up for speed 3. blue_sky_1080p, 1500 kbps 51051 b/f, 35.891 dB, 67236 ms -> 50554 b/f, 35.857 dB, 59270 ms (12% speed-up) old_town_cross_720p, 1500 kbps 14431 b/f, 36.249 dB, 57687 ms -> 14108 b/f, 36.172 dB, 46586 ms (19% speed-up) pedestrian_area_1080p, 1500 kbps 50812 b/f, 40.124 dB, 100439 ms -> 50755 b/f, 40.118 dB, 96549 ms (4% speed-up) mobile_calendar_720p, 1000 kbps 10352 b/f, 35.055 dB, 51837 ms -> 10172 b/f, 35.003 dB, 44076 ms (15% speed-up) Change-Id: I412e34db49060775b3b89ba1738522317c3239c8
2014-10-01High-bitdepth bugfixesDeb Mukherjee
Miscellaneous bug-fixes for high bitdepth functionality. With this patch, high bit-depth profiles become mostly functional, except for an intermittent assert failure issue that is being tracked. Change-Id: I6a7fcbdcf1e5b09842e88535f8442d2e1230748c
2014-09-25Adds various high bit-depth encode functionsDeb Mukherjee
Change-Id: I6f67b171022bbc8199c6d674190b57f6bab1b62f
2014-02-25Shrink dct_value_cost[] to int16_t.Alex Converse
The largest value is 13358. Change-Id: I7a6b024a92b6250933d9ebc0cad066b966c96bd4
2014-01-23vp9/encoder: add extern "C" to headersJames Zern
Change-Id: I4f51ce859a97bf1b8fd2b37ac585b7c643232b69
2013-12-04Moving vp9_token from common to encoder.Dmitry Kovalev
Change-Id: I40a070c353663e82c59e174d7c92eb84f72ed808
2013-12-04Merge "Cleaning up vp9_entropy.h file."Dmitry Kovalev
2013-12-03Moving eob array to the encoder.Dmitry Kovalev
In the decoder we don't need to save eobs, we can pass eob as an argument. That's why removing eob arrays from VP9Decompressor and TileWorkerData, and moving eob pointer from macroblockd_plane to macroblock_plane. Change-Id: I8eb919acc837acfb3abdd8319af63d1bbca8217a
2013-12-03Cleaning up vp9_entropy.h file.Dmitry Kovalev
Renaming constants for consistency: DCT_VAL_CATEGORY1 => CATEGORY1_TOKEN DCT_VAL_CATEGORY2 => CATEGORY2_TOKEN DCT_VAL_CATEGORY3 => CATEGORY3_TOKEN DCT_VAL_CATEGORY4 => CATEGORY4_TOKEN DCT_VAL_CATEGORY5 => CATEGORY5_TOKEN DCT_VAL_CATEGORY6 => CATEGORY6_TOKEN DCT_EOB_TOKEN => EOB_TOKEN DCT_EOB_MODEL_TOKEN => EOB_MODEL_TOKEN MAX_ENTROPY_TOKENS => ENTROPY_TOKENS Moving constants: INTER_MODE_CONTEXTS from vp9_entropy.h to vp9_blockd.h. EOSB_TOKEN from vp9_entropy.h to vp9_tokenize.h Change-Id: I5fcbf081318e1d365792b6d290a930c6cb0f3fc2
2013-11-27Moving token-encoding related stuff from common to encoder.Dmitry Kovalev
Change-Id: I0e59d320407b3bed0ba3622a7b29975f6fad7ebf
2013-11-04Removing old code.Dmitry Kovalev
Change-Id: Ie05cc5e2d8ce12eacdf482a8b75e5a6ce6f59f57
2013-08-27Renaming BLOCK_SIZE_TYPE to BLOCK_SIZE in the encoder.Dmitry Kovalev
Change-Id: I62bb07c377f947cb72fac68add7a6b199e42c6b9
2013-08-15Refactor rd loop for chroma componentsJingning Han
This commit makes the rate-distortion optimization search of chroma components consistent across all block sizes. It removes redundant codes. Change-Id: I7e76f54d045e8efdd41d84a164c71f55b484471b
2013-08-15Unify luma and chroma rd-cost estimationJingning Han
This commit unifies the rate-distortion cost calculation process of luma and chroma components. It allows early termination to be enabled later in the rd search loop of chroma components, in consistent with luma pixels. Change-Id: I2e52a7c6496176bf2a5e3ef338d34ceb8aad9b3d
2013-07-29Renaming TX_SIZE_MAX_SB to TX_SIZES.Dmitry Kovalev
Change-Id: I6aa4191935aa93461a07c41b59fdae1eb5f5f107
2013-07-11Removing redundant code mostly from vp9_pred_common.{h, c}.Dmitry Kovalev
Removing redundant function arguments and curly braces. Change-Id: I46e02561f33fe02e84a3b19756f03b9504bd6a1b
2013-05-31Merge all various transform size data trackers into single variables.Ronald S. Bultje
Change-Id: I2dfc569106b29fbe4da20585a0e85e5e9ea6a4db
2013-05-22Using 128 entry look up table for coef modelsDeb Mukherjee
Reverts to using 128 bit LUT for the coef models rather than 48 to ease hardware implementation. Also incorporates some cleanups including removing various hooks to support different lookup tables based on block_type and ref_type. Change-Id: I54100c120cca07a2ebd3a7776bc4630fa6a153f6
2013-05-21Merging the model coef prob experimentDeb Mukherjee
Merges the experiment. Change-Id: I4eb19af6de6df6aa3a96a2e82f231d47ed9b3ae9
2013-05-20Updating the model coef experimentDeb Mukherjee
Cleans up the experiment. Actually uses reduced counts for backward updates, and reduced number of probabilities in the context. No change in bitstream when the experiment is on. Between expt on and off: derfraw300 is down only -0.062% (which is better than when expts were run previously). Change-Id: I55285a049a0c22810bdb42914212ab5a4f8521b5
2013-04-29Immigrate tokenize_mb into tokenize_sbJingning Han
Unify the tokenize_ function and enable configurable block size for superblock 8x8. We are immigrating the functionalities of macroblock handles into superblock ones, and eventually will remove encode_mb and decode_mb. To be continued on detokenize_ module. Change-Id: I9f81e8c2291082535cf5e0c4b662eb24fb7c8a7f
2013-04-23Remove unused stuffing function.Ronald S. Bultje
Change-Id: I2bc8d775f8d698bf8582f4eecabc2329452e8d9b
2013-04-22End of orientation zero group experimentDeb Mukherjee
Adds an experiment that codes an end-of-orientation symbol for every eligible zero encountered in scan order. This cleans out various other sub-experiments that were part of the origiinal patch, which will be later included if found useful. Results are slightly positive on all sets (0.1 - 0.2% range). Change-Id: I57765c605fefc7fb9d1b57f1b356843602abefaf
2013-04-18Fixing member names inside TOKENVALUE and TOKENEXTRA structs.Dmitry Kovalev
Change-Id: I183ec5819d4d80966c92db36db75b8c3be0d381d
2013-04-11tokenize: convert skippable functionsJohn Koleszar
Use the common block walker to calculate skippability. Change-Id: I6721e42f065df237426c91c1d871ec226ba7cdcb
2013-04-09Make SB coding size-independent.Ronald S. Bultje
Merge sb32x32 and sb64x64 functions; allow for rectangular sizes. Code gives identical encoder results before and after. There are a few macros for rectangular block sizes under the sbsegment experiment; this experiment is not yet functional and should not yet be used. Change-Id: I71f93b5d2a1596e99a6f01f29c3f0a456694d728
2013-03-26Use above/left (instead of previous in scan-order) as token context.Ronald S. Bultje
Pearson correlation for above or left is significantly higher than for previous-in-scan-order (absolute values depend on position in scan, but in general, we gain about 0.1-0.2 by using either above or left; using both basically just makes this even better). For eob branch skipping, we continue to use the previous token in scan order. This helps about 0.9% on derf after re-training on a limited data set. Full re-training and results on larger-resolution clips are pending. Note that this commit breaks trellis, so we can probably get further gains out of it by fixing trellis at some later point. Change-Id: Iead68e296fc3a105cca746b5e3da9555d6010cfe
2013-03-07Re-add support for ADST in superblocks.Ronald S. Bultje
This also changes the RD search to take account of the correct block index when searching (this is required for ADST positioning to work correctly in combination with tx_select). Change-Id: Ie50d05b3a024a64ecd0b376887aa38ac5f7b6af6
2013-03-04Make superblocks independent of macroblock code and data.Ronald S. Bultje
Split macroblock and superblock tokenization and detokenization functions and coefficient-related data structs so that the bitstream layout and related code of superblock coefficients looks less like it's a hack to fit macroblocks in superblocks. In addition, unify chroma transform size selection from luma transform size (i.e. always use the same size, as long as it fits the predictor); in practice, this means 32x32 and 64x64 superblocks using the 16x16 luma transform will now use the 16x16 (instead of the 8x8) chroma transform, and 64x64 superblocks using the 32x32 luma transform will now use the 32x32 (instead of the 16x16) chroma transform. Lastly, add a trellis optimize function for 32x32 transform blocks. HD gains about 0.3%, STDHD about 0.15% and derf about 0.1%. There's a few negative points here and there that I might want to analyze a little closer. Change-Id: Ibad7c3ddfe1acfc52771dfc27c03e9783e054430
2013-02-23Split coefficient token tables intra vs. inter.Ronald S. Bultje
Change-Id: I5416455f8f129ca0f450d00e48358d2012605072
2013-02-22Code cleanup.Dmitry Kovalev
Removing redundant 'extern' keywords and parentheses, fixing indentation, making variable names lower case, using short expressions x *= c instead of x = x * c, minor code simplifications. Change-Id: If6a25fcf306d1db26e90d27e3c24a32735c607de
2013-02-15Remove Y2 and Y-no-DC token types from the bitstream.Ronald S. Bultje
Change-Id: I7a5314daca993d46b8666ba1ec2ff3766c1e5042
2013-02-15Remove some Y2-related code.Ronald S. Bultje
Change-Id: I4f46d142c2a8d1e8a880cfac63702dcbfb999b78
2013-01-10Merge tx32x32 experiment.Ronald S. Bultje
Change-Id: I615651e4c7b09e576a341ad425cf80c393637833
2013-01-08Merge superblocks (32x32) experiment.Ronald S. Bultje
Change-Id: I0df99742029834a85c4933652b0587cf5b6b2587
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-12-17Remove vp9_type_aliases.hJohn Koleszar
Prefer the standard fixed-size integer typedefs. Change-Id: Iad75582350669e49a8da3b7facb9c259e9514a5b
2012-12-07experiment with CONTEXT conversionYaowu Xu
This commit changed the ENTROPY_CONTEXT conversion between MBs that have different transform sizes. In additioin, this commit also did a number of cleanup/bug fix: 1. removed duplicate function vp9_fix_contexts() and changed to use vp8_reset_mb_token_contexts() for both encoder and decoder 2. fixed a bug in stuff_mb_16x16 where wrong context was used for the UV. 3. changed reset all context to 0 if a MB is skipped to simplify the logic. Change-Id: I7bc57a5fb6dbf1f85eac1543daaeb3a61633275c
2012-12-07Introduce vp9_coeff_probs/counts/stats/accum types.Ronald S. Bultje
Use these, instead of the 4/5-dimensional arrays, to hold statistics, counts, accumulations and probabilities for coefficient tokens. This commit also re-allows ENTROPY_STATS to compile. Change-Id: If441ffac936f52a3af91d8f2922ea8a0ceabdaa5
2012-12-0732x32 transform for superblocks.Ronald S. Bultje
This adds Debargha's DCT/DWT hybrid and a regular 32x32 DCT, and adds code all over the place to wrap that in the bitstream/encoder/decoder/RD. Some implementation notes (these probably need careful review): - token range is extended by 1 bit, since the value range out of this transform is [-16384,16383]. - the coefficients coming out of the FDCT are manually scaled back by 1 bit, or else they won't fit in int16_t (they are 17 bits). Because of this, the RD error scoring does not right-shift the MSE score by two (unlike for 4x4/8x8/16x16). - to compensate for this loss in precision, the quantizer is halved also. This is currently a little hacky. - FDCT and IDCT is double-only right now. Needs a fixed-point impl. - There are no default probabilities for the 32x32 transform yet; I'm simply using the 16x16 luma ones. A future commit will add newly generated probabilities for all transforms. - No ADST version. I don't think we'll add one for this level; if an ADST is desired, transform-size selection can scale back to 16x16 or lower, and use an ADST at that level. Additional notes specific to Debargha's DWT/DCT hybrid: - coefficient scale is different for the top/left 16x16 (DCT-over-DWT) block than for the rest (DWT pixel differences) of the block. Therefore, RD error scoring isn't easily scalable between coefficient and pixel domain. Thus, unfortunately, we need to compute the RD distortion in the pixel domain until we figure out how to scale these appropriately. Change-Id: I00386f20f35d7fabb19aba94c8162f8aee64ef2b
2012-11-30google style guide include guardsJim Bankoski
Change-Id: I2c252f3ddcc99e96c1f5d3dab8bcb25a2a3637ea
2012-11-28fixed includes to be fully specifiedJim Bankoski
Change-Id: Ia1cce221f8511561b9cbd8edb7726fbc286ff243
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