summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_entropymode.c
AgeCommit message (Collapse)Author
2013-05-30Remove one (unused) entry from mvref tables.Ronald S. Bultje
Change-Id: Ieb4669ae564bec9f3051485ecdf186cb4e00decb
2013-05-30Remove splitmv.Ronald S. Bultje
We leave it in rdopt.c as a local define for now - this can be removed later. In all other places, we remove it, thereby slightly decreasing the size of some arrays in the bitstream. Change-Id: Ic2a9beb97a4eda0b086f62c039d994b192f99ca5
2013-05-30Remove i4x4_pred.Ronald S. Bultje
It remains as a local define in rdopt.c so we can distinguish between split and non-split modes in the RD loop, but disappears outside that scope in the codec. Change-Id: I98c18fe5ab7e4fbd1d6620ec5695e2ea20513ce9
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-29Remove some unused code related to macroblock/splitmv coding.Ronald S. Bultje
Change-Id: Ic40d56fb162f4e201547dfae33e62ccd9e865889
2013-05-27a few clean-upsYaowu Xu
1. remove prediction mode conversion 2. unified bmode, same for key and non-key frame 3. set I4X4_PRED count for pdf to 0, as I4X4_PRED is no longer coded ever. It is determined by ref_frame and block partition Change-Id: If5b282957c24339b241acdb9f2afef85658fe47d
2013-05-26Remove splitmv.Ronald S. Bultje
Also do per-partition motion vector referencing in <sb8x8 partitions, and adjust mvref finding for sub8x8 partitions. Change-Id: Id3ed1ed4d2a8910d11d327db6cc63b8eb79f941f
2013-05-23Merge 4x4 block level partition into codebaseJingning Han
Move 4x4/4x8/8x4 partition coding out of experimental list. This commit fixed the unit test failure issues. It also resolved the merge conflicts between 4x4 block level partition and iterative motion search for comp_inter_inter. Change-Id: I898671f0631f5ddc4f5cc68d4c62ead7de9c5a58
2013-05-21Make the intra rd search support 8x4/4x8Jingning Han
This commit allows the rate-distortion optimization of intra coding capable of supporting 8x4 and 4x8 partition settings. It enables the entropy coding of intra modes in key frame using a unified contextual probability model conditioned on its above/left prediction modes. Coding performance: derf 0.464% Change-Id: Ieed055084e11fcb64d5d5faeb0e706d30268ba18
2013-05-19Enable bit-stream support to 8x4 and 4x8 partitionJingning Han
The recursive partition type search is enabled down to 4x4, 4x8 and 8x4, followed by the corresponding rate-distortion optimization for the per-partition encoding mode decisions. The bit-stream writing/reading synchronized in supporting the rectangular partition of 8x8 block. This provides above 1% coding performance gains on derf. To do next: 1. re-design the rate-distortion loop for inter prediction below 8x8. 2. re-design the rate-distortion loop for intra prediction below 4x4. 3. make the loop-filter aware of rectangular partition of 8x8 block. 4. clean the unused probability models. 5. update default probability values. Change-Id: Idd41a315b16879db08f045a322241f46f1d53f20
2013-05-17Replace default counts with default probs.Paul Wilkins
Replace vp9_kf_default_bmode_counts structure with direct default probabilities. The probability structure is smaller and it removes the need to specify in the bitstream how to convert the counts to probabilities. Note that I have concerns still about the size and value of the large intra mode context. This may cause problems for HW but it also means we rely heavily on reverse update as forwards update of a structure this size is problematic. I intend to review this more generally in the next few days to see if we can come up with a competitive solution that does not rely on such a large context. Change-Id: I0a36071079d5d26a57ab0e9fbf91af4199aa7984
2013-05-17Remove MODE_STATS flag and codePaul Wilkins
Change-Id: I6c70a8a8a4633399842ac74792003ae5f7859ffa
2013-05-14Enable recursive partition down to 4x4Jingning Han
This commit allows the rate-distortion optimization recursion at encoder to go down to 4x4 block size. It deprecates the use of I4X4_PRED and SPLITMV syntax elements from bit-stream writing/reading. Will remove the unused probability models in the next patch. The partition type search and bit-stream are now capable of supporting the rectangular partition of 8x8 block, i.e., 8x4 and 4x8. Need to revise the rate-distortion parts to get these two partition tested in the rd loop. Change-Id: I0dfe3b90a1507ad6138db10cc58e6e237a06a9d6
2013-05-07Deprecate comp_interintra_pred experiment.Paul Wilkins
Delete code under the CONFIG_COMP_INTERINTRA_PRED flag. Change-Id: I3d1079cf46305c08f7e11d738596ea112e7b547f
2013-05-07Remove enable_6tap filter experiment.Paul Wilkins
Clean out code under CONFIG_ENABLE_6TAP flag. Change-Id: Ic45b624081181027d6ba24d55dd644c3197f9830
2013-05-07Deprecate the newbintramode experiment.Paul Wilkins
Clean out code relating to newbintramode. Change-Id: Ie91f4f156cdf60ce0da8ca407c1c9cb00c7d0705
2013-05-07Merge SB8X8 into the codebaseJingning Han
Pull sb8x8 out of experimental list. verified via borg run tests. Fixed unit test failures. Change-Id: I12a4bbd17395930580c048ab68becad1ffe46e76
2013-05-03Extend number of reference buffers to 8.Adrian Grange
The number of reference buffers is extended to 8 and a reference sign-bias added for the LAST_FRAME. Whilst the number of reference buffers used by an individual frame remains unchanged at 3, these may now be selected from 8 possible buffers. Change-Id: I2d247b9c1c2b3a339d6c9fac125e81ba373f75a7
2013-04-30sb8x8 integration in rd loop.Ronald S. Bultje
Work-in-progress, not yet ready for review. TODO items: - bitstream writing (encoder) and reading (decoder) - decoder reconstruction Change-Id: I5afb7284e7e0480847b47cd0097cb469433c9081
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-24Move sbsegment out of experimental listJingning Han
Move rectangular superblock coding out of experimental list. Change-Id: I96c37547d122330d666a67b4bf577ae54547857f
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-23Merge "Simple cleanup inside vp9_decodframe.c and vp9_entropymode.c." into ↵Dmitry Kovalev
experimental
2013-04-23Removing redundant code in vp9_entropymode.c.Dmitry Kovalev
Change-Id: Ia7266b8d3aa3d5cff2db0c3b2f014def045759af
2013-04-23Simple cleanup inside vp9_decodframe.c and vp9_entropymode.c.Dmitry Kovalev
Change-Id: I62dde981f5201c5fbc22001609ee4b5fd0a9bdf5
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-19Removal of CONFIG_NEW_MVREF experiment.Paul Wilkins
This experiment has failed to give much benefit but does add complexity so deprecated. Change-Id: Ic7b929ba706390b9907ef0b4f965bd401ca799a4
2013-04-18Merge "Adding DEFAULT_PRED_PROB_{0, 1, 2} constants." into experimentalDmitry Kovalev
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-17make lf_deltas dependent on filter_lvlYaowu Xu
Change-Id: Idb0d11e3ae9afabe667a9f327bf4d3aa84f63649
2013-04-16Recursive partition syntax codingJingning Han
Enable recursive partition information coding from SB64X64 down to MB16X16. The bit-stream syntax is now supporting rectangular block sizes. It starts from SB64X64 and recursively describes the partition type of the current block. If the partition type is PARTITION_NONE, the block is coded as a single unit; if it is PARTITION_HORZ or PARTITION_VERT, the block is segmented into two independently coded rectangular units, with no further partition needed; otherwise, the block is segmented into 4 square blocks. i.e., PARTITION_SPLIT case, each can be potentially further partitioned. Forward adaptive probability modeling is used for the partition information coding, conditioned on the current block size. Change-Id: I499365fb547839d555498e3bcc0387d8a3587d87
2013-04-15Merge "Reorder enum i4X4 predcition modes" into experimentalYaowu Xu
2013-04-14Merge "Renaming vp9_token_struct to vp9_token and removing previous ↵Dmitry Kovalev
typedef." into experimental
2013-04-12Reorder enum i4X4 predcition modesYaowu Xu
To match the order of directional intra prediction modes for larger blocks, also renamed the i4x4 prediction modes to mirror the larger variants. Change-Id: I77cea4d0add6c7758460bf9c7a2fe59aca601f0b
2013-04-12Rename B_PRED to I4X4_PREDYaowu Xu
So it is consistent with I8x8_PRED. Change-Id: Iefa65124b2419690d83e526c611129c0ede29d11
2013-04-11Renaming vp9_token_struct to vp9_token and removing previous typedef.Dmitry Kovalev
Change-Id: If69c3d795f87af5cc7bfdfe70ef733c41b4d55c8
2013-03-26remove code not in useYaowu Xu
Change-Id: I4fa46f10e82aca36c563f7ea829e5a3177a0c740
2013-03-10Optimize vp9_tree_probs_from_distributionJohn Koleszar
The previous implementation visited each node in the tree multiple times because it used each symbol's encoding to revisit the branches taken and increment its count. Instead, we can traverse the tree depth first and calculate the probabilities and branch counts as we walk back up. The complexity goes from somewhere between O(nlogn) and O(n^2) (depending on how balanced the tree is) to O(n). Only tested one clip (256kbps, CIF), saw 13% decoding perf improvement. Note that this optimization should port trivially to VP8 as well. In VP8, the decoder doesn't use this function, but it does routinely show up on the profile for realtime encoding. Change-Id: I4f2848e4f41dc9a7694f73f3e75034bce08d1b12
2013-02-20Refactoring of switchable filter search for speedDeb Mukherjee
Refactors the switchable filter search in the rd loop to improve encode speed. Uses a piecewise approximation to a closed form expression to estimate rd cost for a Laplacian source with a given variance and quantization step-size. About 40% encode time reduction is achieved. Results (on a feb 12 baseline) show a slight drop: derf: -0.019% yt: +0.010% std-hd: -0.162% hd: -0.050% Change-Id: Ie861badf5bba1e3b1052e29a0ef1b7e256edbcd0
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-09New prediction filterAdrian Grange
This patch removes the old pred-filter experiment and replaces it with one that is implemented using the switchable filter framework. If the pred-filter experiment is enabled, three interopolation filters are tested during mode selection; the standard 8-tap interpolation filter, a sharp 8-tap filter and a (new) 8-tap smoothing filter. The 6-tap filter code has been preserved for now and if the enable-6tap experiment is enabled (in addition to the pred-filter experiment) the original 6-tap filter replaces the new 8-tap smooth filter in the switchable mode. The new experiment applies the prediction filter in cases of a fractional-pel motion vector. Future patches will apply the filter where the mv is pel-aligned and also to intra predicted blocks. Change-Id: I08e8cba978f2bbf3019f8413f376b8e2cd85eba4
2013-01-08Merge superblocks (32x32) experiment.Ronald S. Bultje
Change-Id: I0df99742029834a85c4933652b0587cf5b6b2587
2012-12-12Consistently use get_prob(), clip_prob() and newly added clip_pixel().Ronald S. Bultje
Add a function clip_pixel() to clip a pixel value to the [0,255] range of allowed values, and use this where-ever appropriate (e.g. prediction, reconstruction). Likewise, consistently use the recently added function clip_prob(), which calculates a binary probability in the [1,255] range. If possible, try to use get_prob() or its sister get_binary_prob() to calculate binary probabilities, for consistency. Since in some places, this means that binary probability calculations are changed (we use {255,256}*count0/(total) in a range of places, and all of these are now changed to use 256*count0+(total>>1)/total), this changes the encoding result, so this patch warrants some extensive testing. Change-Id: Ibeeff8d886496839b8e0c0ace9ccc552351f7628
2012-11-29signed mismatch mvrefcountJim Bankoski
Change-Id: Ie34820c1b6eaba9cf9316415a46f48af79c41646
2012-11-28Merge "remove the vp9_default_mode_contexts_a" into experimentalYaowu Xu
2012-11-28remove the vp9_default_mode_contexts_aYaowu Xu
Given the way mode_context is updated, the benefit of an additional default is not signficant. Change-Id: I67489453e8781340b18e26a1cc2f04e9221004a2
2012-11-28fixed includes to be fully specifiedJim Bankoski
Change-Id: Ia1cce221f8511561b9cbd8edb7726fbc286ff243
2012-11-28removed redundant mode_context data structuresYaowu Xu
This commit removed a couple of redundant data structures in frame coding contextsm, mode_context and mode_context_a, and changed to use vp9_mode_contexts only. The switch of the context for different frame type now relies on the switch of frame coding context between lfc and lfc_a. This commit also removed a number of memcpy among these redundant data structure. Change-Id: I42e8174bd60f466b0860afc44c1263896471b0f3
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