summaryrefslogtreecommitdiff
path: root/vp8/encoder/rdopt.c
AgeCommit message (Collapse)Author
2012-03-01Merge t8x8 experimentsYaowu Xu
Change-Id: I8e9b6b154e1a0d0cb42d596366380d69c00ac15f
2012-03-01Various bug fixes related to high precision mvDeb Mukherjee
Change-Id: Ie5a7c87d71bd4a541463b68704620d89cec142cf
2012-02-28Rename "dual" prediction to "compound" prediction.Ronald S. Bultje
Change-Id: Ibcd2b9b247ff9f83331dac47f91ec285e8955ff1
2012-02-28Compound intra prediction (b_pred/4x4 only, for now),Ronald S. Bultje
Also remove duplicate build_intra_predictors_mby/uv(). Change-Id: I78607e7304952a9b962a5b25af9bb9c48692187b
2012-02-28Initial refactoring of high_precision mv code.Deb Mukherjee
This is the first patch for refactoring of the code related to high-precision mv, so that 1/4 and 1/8 pel motion vectors can co-exist in the same bit-stream by use of a frame level flag. The current patch works fine for only use of 1/4th and only use of 1/8th pel mv, but there are some issues with the mode switching in between. Subsequent patches on this change Id will fix the remaining issues. Patch 2: Adds fixes to make sure that multiple mv precisions can co-exist in the bit-stream. Frame level switching has been tested to work correctly. Patch 3: Fixes lines exceeding 80 char Patch 4: http://www.corp.google.com/~debargha/vp8_results/enhinterp.html Results on derf after ssse3 bugfix, compared to everything enabled but the 8-tap, 1/8-subpel and 1/16-subpel uv. Overall the gains are about 3% now. Hopefully there are no more bugs lingering. Apparently the sse3 bug affected the quartel subpel results more than the eighth pel ones (which is understandabale because one bad predictor due to the bug, matters less if there are a lot more subpel options available as in the 1/8 subpel case). The results in the 4th column correspond to the current settings. The first two columns correspond to two settings of adaptive switching of the 1/4 or 1/8 subpel mode based on initial Q estimate. These do not work as good as just using 1/8 all the time yet. Change-Id: I3ef392ad338329f4d68a85257a49f2b14f3af472
2012-02-24Further code simplification and clean up.Paul Wilkins
Change-Id: Ifdb17b56090a317b2aa82cf125d57934902c5298
2012-02-23Supporting high precision 1/8-pel motion vectorsDeb Mukherjee
This is the initial patch for supporting 1/8th pel motion. Currently if we configure with enable-high-precision-mv, all motion vectors would default to 1/8 pel. Encode and decode syncs fine with the current code. In the next phase the code will be refactored so that we can choose the 1/8 pel mode adaptively at a frame/segment/mb level. Derf results: http://www.corp.google.com/~debargha/vp8_results/enhinterp_hpmv.html (about 0.83% better than 8-tap interpoaltion) Patch 3: Rebased. Also adding 1/16th pel interpolation for U and V Patch 4: HD results. http://www.corp.google.com/~debargha/vp8_results/enhinterp_hd_hpmv.html Seems impressive (unless I am doing something wrong). Patch 5: Added mmx/sse for bilateral filtering, as well as enforced use of c-versions of subpel filters with 8-taps and 1/16th pel; Also redesigned the 8-tap filters to reduce the cut-off in order to introduce a denoising effect. There is a new configure option sixteenth-subpel-uv which will use 1/16 th pel interpolation for uv, if the motion vectors have 1/8 pel accuracy. With the fixes the results are promising on the derf set. The enhanced interpolation option with 8-taps alone gives 3% improvement over thei derf set: http://www.corp.google.com/~debargha/vp8_results/enhinterpn.html Results on high precision mv and on the hd set are to follow. Patch 6: Adding a missing condition for CONFIG_SIXTEENTH_SUBPEL_UV in vp8/common/x86/x86_systemdependent.c Patch 7: Cleaning up various debug messages. Patch 8: Merge conflict Change-Id: I5b1d844457aefd7414a9e4e0e06c6ed38fd8cc04
2012-02-22Fixed skippable evaluation in mode decisionYaowu Xu
Yunqing fixed an oddity in UVIntra skippable evaluation for stable branch, which brought up the fact that the evaluation is broken. The issue was that for MBs with 2nd order block, the eob for 1st order blocks is set at 1. The previous evaluation did not take that into account. This commit intend to fix the problem. The commit also absorbed Yunqing's fix for UVIntra skippable evalution. Test on hd showed some good gains in combination with LPF bias fix: http://www.corp.google.com/~yaowu/no_crawl/LPFBias_FixSkip.html (avg psnr: .34%, glb psnr: .32%, ssim: .22%) Change-Id: I36af11c8ef7f643e8ff46da7bf3a167b437039d4
2012-02-16Reworked context conversion between 8x8 and 4x4Yaowu Xu
The commit rationized and simplified the entropy context conversion betwen MB using 8x8 transform and MB using 4x4 transform. The old version had a number of weirdness in how 4x4 transform MB's context is used for 8x8 blocks other than the first 8x8 within a MB. Test showed the change has a gain ~.1% for avg psnr, glb psnr and ssim on the limited HD set. Change-Id: I774536c416baa6845aa741f956d8a69fa40e5d47
2012-02-16revised the rate distortion computation for UVYaowu Xu
this commit changed the UV r/d calculation in the mode decision process to properly account for the rate of 8x8 transform coefficients. Change-Id: I485f8f35f2b61db0b6539beb32e83481b1cf083b
2012-02-16moved scaling from dequantization to inverse transform for T8x8Yaowu Xu
Previously, the scaling related to extended quantize range happens in dequantization stage, which implies the coefficients form forward transform are in different scale(4x) from dequantization coefficients This worked fine when there was not distortion computation done based on 8x8 transform, but it completely wracked the distortion estimation based on transform coefficients and dequantized transform coefficients introduced in commit f64725a00 for macroblocks using 8x8 transform. This commit fixed the issue by moving the scaling into the stage of inverse 8x8 transform. TODO: Test&Verify the transform/quantization pipeline accuracy. Change-Id: Iff77b36a965c2a6b247e59b9c59df93eba5d60e2
2012-02-15Fix overflows in dual prediction mode selection.Ronald S. Bultje
Change-Id: I265ad46e01a307bca21e6223725e4055f5e08648
2012-02-14added 8x8 based Rate estimation for dualpred caseYaowu Xu
This commmit added logic for MB using dual-pred to compute rate estimation based on correct transform size. The section of code was previously located under #if CONFIG_DUALPRED, that was made to be working with T8x8 experiment at the same time. Change-Id: Iebc2518c03f11378b9c2e72905520f088b54d5c0
2012-02-10Improved coding using 8x8 transformRonald S. Bultje
In summary, this commit encompasses a series of changes in attempt to improve the 8x8 transform based coding to help overall compression quality, please refer to the detailed commit history below for what are the rationale underly the series of changes: a. A frame level flag to indicate if 8x8 transform is used at all. b. 8x8 transform is not used for key frames and small image size. c. On inter coded frame, macroblocks using modes B_PRED, SPLIT_MV and I8X8_PRED are forced to using 4x4 transform based coding, the rest uses 8x8 transform based coding. d. Encoder and decoder has the same assumption on the relationship between prediction modes and transform size, therefore no signaling is encoded in bitstream. e. Mode decision process now calculate the rate and distortion scores using their respective transforms. Overall test results: 1. HD set http://www.corp.google.com/~yaowu/no_crawl/t8x8/HD_t8x8_20120206.html (avg psnr: 3.09% glb psnr: 3.22%, ssim: 3.90%) 2. Cif set: http://www.corp.google.com/~yaowu/no_crawl/t8x8/cif_t8x8_20120206.html (avg psnr: -0.03%, glb psnr: -0.02%, ssim: -0.04%) It should be noted here, as 8x8 transform coding itself is disabled for cif size clips, the 0.03% loss is purely from the 1 bit/frame flag overhead on if 8x8 transform is used or not for the frame. ---patch history for future reference--- Patch 1: this commit tries to select transform size based on macroblock prediction mode. If the size of a prediction mode is 16x16, then the macroblock is forced to use 8x8 transform. If the prediction mode is B_PRED, SPLITMV or I8X8_PRED, then the macroblock is forced to use 4x4 transform. Tests on the following HD clips showed mixed results: (all hd clips only used first 100 frames in the test) http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdmodebased8x8.html http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdmodebased8x8_log.html while the results are mixed and overall negative, it is interesting to see 8x8 helped a few of the clips. Patch 2: this patch tries to hard-wire selection of transform size based on prediction modes without using segmentation to signal the transform size. encoder and decoder both takes the same assumption that all macroblocks use 8x8 transform except when prediciton mode is B_PRED, I8X8_PRED or SPLITMV. Test results are as follows: http://www.corp.google.com/~yaowu/no_crawl/t8x8/cifmodebase8x8_0125.html http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdmodebased8x8_0125log.html Interestingly, by removing the overhead or coding the segmentation, the results on this limited HD set have turn positive on average. Patch 3: this patch disabled the usage of 8x8 transform on key frames, and kept the logic from patch 2 for inter frames only. test results on HD set turned decidedly positive with 8x8 transform enabled on inter frame with 16x16 prediction modes: (avg psnr: .81% glb psnr: .82 ssim: .55%) http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdintermode8x8_0125.html results on cif set still negative overall Patch 4: continued from last patch, but now in mode decision process, the rate and distortion estimates are computed based on 8x8 transform results for MBs with modes associated with 8x8 transform. This patch also fixed a problem related to segment based eob coding when 8x8 transform is used. The patch significantly improved the results on HD clips: http://www.corp.google.com/~yaowu/no_crawl/t8x8/hd8x8RDintermode.html (avg psnr: 2.70% glb psnr: 2.76% ssim: 3.34%) results on cif also improved, though they are still negative compared to baseline that uses 4x4 transform only: http://www.corp.google.com/~yaowu/no_crawl/t8x8/cif8x8RDintermode.html (avg psnr: -.78% glb psnr: -.86% ssim: -.19%) Patch 5: This patch does 3 things: a. a bunch of decoder bug fixes, encodings and decodings were verified to have matched recon buffer on a number of encodes on cif size mobile and hd version of _pedestrian. b. the patch further improved the rate distortion calculation of MBS that use 8x8 transform. This provided some further gain on compression. c. the patch also got the experimental work SEG_LVL_EOB to work with 8x8 transformed macroblock, test results indicates it improves the cif set but hurt the HD set slightly. Tests results on HD clips: http://www.corp.google.com/~yaowu/no_crawl/t8x8/HD_t8x8_20120201.html (avg psnr: 3.19% glb psnr: 3.30% ssim: 3.93%) Test results on cif clips: http://www.corp.google.com/~yaowu/no_crawl/t8x8/cif_t8x8_20120201.html (avg psnr: -.47% glb psnr: -.51% ssim: +.28%) Patch 6: Added a frame level flag to indicate if 8x8 transform is allowed at all. temporarily the decision is based on frame size, can be optimized later one. This get the cif results to basically unchanged, with one bit per frame overhead on both cif and hd clips. Patch 8: Rebase and Merge to head by PGW. Fixed some suspect 4s that look like hey should be 64s in regard to segmented EOB. Perhaps #defines would be bette. Bulit and tested without T8x8 enabled and produces unchanged output. Patch 9: Corrected misalligned code/decode of "txfm_mode" bit. Limited testing for correct encode and decode with T8x8 configured on derf clips. Change-Id: I156e1405d25f81579d579dff8ab9af53944ec49c
2012-02-09Reindent some code after merging the dualpred experiment.Ronald S. Bultje
Change-Id: Idb328dd29ebcd360e39886abe48694f90f2e1140
2012-02-09Merge dualpred (compound prediction) experiment.Ronald S. Bultje
Change-Id: Ieaaa07c50eae41118596197f6a4d848135946e41
2012-02-09Removal of SEGFEATURES placeholder commentsPaul Wilkins
This commit only involves the removal of placeholder comments //#if CONFIG_SEGFEATURES. Change-Id: I94b350daaf998ee0cfdde5aa25b1d3b0522ab816
2012-02-09Merge Extended Q experiment.Paul Wilkins
Merge the extended Q experiment as indicated by the Change-Id: I02d9e654fff9998cc7e9e2f1f5cd838dad8fb431
2012-02-09Merge COMPREDPaul Wilkins
Merged in most of the current common prediction changes that were under the #if CONFIG_COMPRED option. Change-Id: If4e6f61dbe7b86dd449f6effbe93b5eb7e893885
2012-02-06Merged NEWNEAR experimentPaul Wilkins
This commit merges the NEWNEAR experiment such that it is effectively always on. The fact that there were changes in the threading code again highlights the need to strip out such features during the bitstream development phase as trying to maintain this code (especially as it is not being tested) slows the development cycle. Change-Id: I8b34950a1333231ced9928aa11cd6d6459984b65
2012-02-06Coding the hybrid dual prediction signal.Paul Wilkins
Initial modifications to make limited use of common prediction functions. The only functional change thus far is that updates to the probabilities are no longer "damped". This was a testing convenience but in fact seems to help by a little over 0.1% over the derf set. Change-Id: I8b82907d9d6b6a4a075728b60b31ce93392a5f2e
2012-02-06Moved prob_dualpred to common.Paul Wilkins
Moved the prob_dualpred[] sturcture to common. Created common prediction entry for Dual flag. Change-Id: I9ac3d128bae6114f09e5c18216d4b95cf36453d5
2012-02-02Added encoding in Superblock OrderAdrian Grange
As a precursor to encoding 32x32 blocks this cl adds the ability to encode the frame superblock (=32x32 block) at a time. Within a SB the 4 indiviual MBs are encoded in raster-order (NW,NE,SW,SE). This functionality is added as an experiment which can be enabled by ispecifying --enable-superblocks in the command line specified to configure (CONFIG_SUPERBLOCKS macro in the code). To make this work I had to disable the two intra prediction modes that use data from the top-right of the MB. On the tests that I have run the results produce almost exactly the same PSNRs & SSIMs with a very slightly higher average data rate (and slightly higher data rate than just disabling the two intra modes in the original code). NOTE: This will also break the multi-threaded code. This replaces the abandoned change: Iebebe0d1a50ce8c15c79862c537b765a2f67e162 Change-Id: I1bc1a00f236abc1a373c7210d756e25f970fcad8
2012-01-31Implementation of new prediction model for reference frame coding.Paul Wilkins
This check in uses the common prediction interface functions to code reference frame. Some updates made regarding the impact of the new code in rd loop but there remain TODOs in this regard. Change-Id: I9da3ed5dfdaa489e0903ab33258b0767a585567f
2012-01-26fixed an issue with 8x8 token cost in trellisquantYaowu Xu
changed the token cost for 8x8 transformed macroblock used in trellisquant from those derived from 4x4 transform coefficient distribution to those derived from 8x8 transform coefficient distribution. Test results show this fix help 8x8 transform based compression consistently on cif and hd sets: http://www.corp.google.com/~yaowu/no_crawl/t8x8/cif_cost8x8only.html (avg psnr:.14% glb psnr: .17% ssim: .20%) http://www.corp.google.com/~yaowu/no_crawl/t8x8/hd_cost8x8only.html (avg psnr:.17% glb psnr: .18% ssim: .58%) Note: To test the effect of this change, 8x8 transform was forced to be used only on 16x16 predicted macroblocks on inter frames, the effect would be bigger had all macroblocks been forcd to use 8x8 transform. Change-Id: If9b7868b75357c66541f511e5ee78e4d2d4929a4
2012-01-19Added code to prevent I8X8_PRED mode for MBs using 8x8 transformYaowu Xu
This fixed a conflict introduced by the change of adding 8x8 intra prediction modes. The 8x8 intra prediction mode code assumed the use of 4x4 transform, and causes encoder crashes when the codec is configured with --enable-t8x8. Change-Id: I00cc94df63e9725377ffba9eb51be6b77fe3fcf9
2011-12-22Fix more warnings.Christian Duvivier
Change-Id: Ifadf65026a11bdb5d39840748613880bcfb364bb
2011-12-19Further QIndex realted Fixes:Paul Wilkins
Added code to support 256 index steps instead of 128 but disabled for now. Replace hard wired table vp8cx_base_skip_false_prob[128] Observed Qindex problem with setting minimum loop filter value. (Experiment code using real Q in place but for now just returning 0. This has a big beneficial effect on some clips, particularly waterfall which shows 5% ssim gain) Change-Id: I2f7117de8adc1797164c106aa13effc900a1467e
2011-12-07Removed #if CONFIG_I8X8Yaowu Xu
This commit removed the macro CONFIG_I8X8, which was used to indicate the 8x8 intra prediction experiment, made the change fully merged in. Change-Id: Iafa4443781ce6e83f5591c12ba615a0e92ce0ea0
2011-12-07made vp8_mode_context adaptiveYaowu Xu
vp8_mode_contexts[] is an entropy table used to code inter mode choices. It was a fixed constant table. This commit made the entropy context adaptive. Tests on derf set showed very good consistent gains on all metrics: avg psnr .47%, overall psnr .46% and ssim .40%. http://www.corp.google.com/~yaowu/no_crawl/newModeContext.html Change-Id: Ia62b14485c948e2b74586118619c5eb2068b43b2
2011-12-07Minor fixes:Paul Wilkins
fixed issues caused by conflicts between two experiments. Change-Id: I56a9bd69493e4850c121ea057a6233c55777c2a5
2011-12-06Dual 16x16 inter prediction.Ronald S. Bultje
This patch introduces the concept of dual inter16x16 prediction. A 16x16 inter-predicted macroblock can use 2 references instead of 1, where both references use the same mvmode (new, near/est, zero). In the case of newmv, this means that two MVs are coded instead of one. The frame can be encoded in 3 ways: all MBs single-prediction, all MBs dual prediction, or per-MB single/dual prediction selection ("hybrid"), in which case a single bit is coded per-MB to indicate whether the MB uses single or dual inter prediction. In the future, we can (maybe?) get further gains by mixing this with Adrian's 32x32 work, per-segment dual prediction settings, or adding support for dual splitmv/8x8mv inter prediction. Gain (on derf-set, CQ mode) is ~2.8% (SSIM) or ~3.6% (glb PSNR). Most gain is at medium/high bitrates, but there's minor gains at low bitrates also. Output was confirmed to match between encoder and decoder. Note for optimization people: this patch introduces a 2nd version of 16x16/8x8 sixtap/bilin functions, which does an avg instead of a store. They may want to look and make sure this is implemented to their satisfaction so we can optimize it best in the future. Change-ID: I59dc84b07cbb3ccf073ac0f756d03d294cb19281
2011-12-06Some further QIndex issues with extended QPaul Wilkins
Resolved or factored out some further issues with Q index. Put in a 3rd order polynomial instead of less accurate power function as the best fit on gf and kf boost adjustment. Added avg_q value to use instead of ni_av_qi. Compute segment delta Q values based on avg_q. Fixed bug in adjust_maxq_qrange(). The extended range Q on the derf set, using standard data rates (which do not extend high enough to get big benefits) still show a shortfall of between 0.5 and 1% though so there would appear to be further issues that need to be tracked down. Change-Id: Icfd49b9f401906ba487ef1bef7d397048295d959
2011-12-02enabled 8x8 intra prediction modes on inter framesYaowu Xu
This commit enabled the usage of 8x8 intra prediction modes on inter frames. There are a few TODO items related to this: 1)baseline entropy need be calibrated; 2)cost of UV need to be done more properly rather than using decision only relying on Y; 3)Threshold for allowing picking 8x8 intra prediction should be lowered to lower than the B_PRED. Even with all the TODOs, tests showed consistent gain on derf set ~0.1% (PSNR:0.08% and SSIM:0.14%). It is assumed that 8x8 intra prediction will help more on large resolution clips, especially with above TODOs addressed. Change-Id: I398ada49dfc32575cfab962a569c2885111ae3ba
2011-12-02Further work on extended Q range.Paul Wilkins
Fixed some further QIndex related issues and replaced some tables (eg zbin and rounding) Also Added function (currently disabled by default) to populate the main AC and DC quantizer tables. Using the original AC range the resulting computed DC values give behavior broadly comparable on the DERF set. That is not to say that the equations will hold good over a more extended range. The purpose of this code is to make it easier to experiment with further alterations to the Q range and distribution of Q values plus the relative weights given to AC and DC. The function find_fp_qindex() ensures that changes to the Q tables are reflected in the value passed in to the first pass code. Slight experimental adjustment to static segment Q offset. Change-Id: I36186267d55dfc2a3d565d0cff7218ef300d1cd5
2011-11-29Further work on extended Q range.Paul Wilkins
Fixed bug in firspass.c call to vp8_initialize_rd_consts() This was passing in vp8_dc_quant(cm->base_qindex, cm->y1dc_delta_q) instead of (cm->base_qindex + cm->y1dc_delta_q). It just so happens that for the value 26 used for cm->base_qindex in the unextended Q case, the two give similar results. However, when using the extended Q range the two are very different. Also added more stats output and partly disabled another broken feature. Change-Id: Iddf6cf5ea8467c44b7c133f38e629f6ba6f2581e
2011-11-28changed find_near_mvs search to include a mb from last frameYaowu Xu
This is an experiment to include a mv contribution from last frame to nearest and near mv definition. Initial test showed some small though consistent gain. latest patch slightly better result ~.13%-~.18%. TODO: the entropy used to encode the mode choice, i.e. the mv counts based conditional distribution of modes should be re-collected to reflect this change, it is expected that there is some further gain from that. Change-Id: Ief1e284a36d8aa56b49ae5b360c91419ec494fa4
2011-11-23Further resolution of QIndex LUTS;Paul Wilkins
This commit resolves further QIndex look up tables to facilitate experimentation with the quantizer range. In some cases rather than remove the look up tables completely I have created functions that are called once to populate them using a formulaic approach base on the actual quantizer. The use of these functions based on best fit of data from the original tables does affect the results on some clips but across the derf test set the effect was broadly neutral. Change-Id: I8baa61c97ce87dc09a6340d56fdeb681b9345793
2011-11-22Remove redundant code (lf_or_gf and frame_lf_or_gf)Adrian Grange
Removed unused variables lf_or_gf and frame_lf_or_gf. Change-Id: I88692cd7d53e532d303c4525ee4667c1ecea3026
2011-11-22Removal of Qindex LUTS.Paul Wilkins
One of the problems arising when tweaking or adjusting the quantizer tables is that there are a lot of look up tables that depend on the QINDEX. Any adjustment to the link between QINDEX and real quantizer therefore tends to break aspects of for example the rate control. In this check in I have replaced several of the look up tables with functions that approximate the same results as the old Q luts but use a formulaic approach based on real Q values rather than QIndex. This should hopefully make it easier to experiment with changes to the Q tables without always having to go through and hand optimize a set of look up tables. Once things stabilize we may choose to re-instate luts for the sake of performance. Patch 2: Addressed Ronald's comments. vp8_init_me_luts() Added so luts only initialized once. Change-Id: Ic80db2212d2fd01e08e8cb5c7dca1fda1102be57
2011-11-21CONFIG_T8X8 experiment.:Paul Wilkins
Block the selection of 4x4 modes in key frames if 8x8 is selected. Change-Id: Ie5729ec22a999d9a1996f020bd4b941e29514992
2011-11-09T8x8 experiment merge.Paul Wilkins
For ease of testing and merging experiments I have removed in line code in encode_frame() that assigns MBs to be t8x8 or t4x4 coded segments and have moved the decision point and segment setup to the init_seg_features0 test function. Keeping everything in one place helps make sure for now that experiments using segmentation are not fighting each other. Also made sure mode selection code can't choose 4x4 modes if t8x8 is selected. Patch2: In init_seg_features() add checks for SEG_LVL_TRANSFORM active. Change-Id: Ia1767edd99b78510011d4251539f9bc325842e3a
2011-11-09Segmentation feature logic fix.Paul Wilkins
Bug fix to logic in vp8_pick_inter_mode() and vp8_rd_pick_inter_mode(). The block on the use of segment features for the cm->refresh_alt_ref_frame case was just for testing and is not correct. The special case code for alt ref can be re-enabled as an else clause. Change-Id: Ic9b57cdb5f04ea7737032b8fb953d84d7717b3ce
2011-11-08Segment signaling of TX sizePaul Wilkins
Initial attempt at using new segment feature signaling to indicate 4x4 or 8x8 transform. needs --enable-experimental --enable-t8x8 Note this is work in progress. Change-Id: Ib160d46a5d810307bfcbc79853ce1a65b5b870b7
2011-11-04Segment Feature Data AccessPaul Wilkins
No change to functionality or output. Updates to the segment feature data structure now all done through functions such as set_segdata() and get_segdata() in seg_common.c. The reason for this is to make changing the structures (if needed) and debug easier. In addition it provides a single location for subsequent addition of range and validity checks. For example valid combination of mode and reference frame. Change-Id: I2e866505562db4e4cb6f17a472b25b4465f01add
2011-11-03Segment Features. Removal of #ifdefsPaul Wilkins
Removal of configure #ifdefs so that segment features always available. Removal of code supporting old segment feature method. Still a good deal of tidying up to do. Change-Id: I397855f086f8c09ab1fae0a5f65d9e06d2e3e39f
2011-11-02Segmentation: Reference framesPaul Wilkins
Modify reference frame segmentation so that ONE or MORE reference frames may be marked as a available for a given segment. Fixed bugs relating to segment coding of INTRA and some INTER modes at the segment level. Modified Q boost for static areas based on ambient average Q. Strong results now on clips with significant static areas. (some data points in derf set as high as 9% and some static & slide show type content in YT set > 20%) Change-Id: Ia79f912efa84b977f35a23683ae3643251e24f0c
2011-10-24Further segment feature extensions.Paul Wilkins
This quite large check in includes the following: Merge in some code from Ronald (mbgraph.c) that scans a Gf/arf group. This is used as a basis for a simple segmentation for the normal frames in a gf/arf group. This code also uses satd functions from Yaowu. Adds functionality for coding the latest possible position of an EOB for blocks in the segment. (Currently 0-15 only, hence just for 4x4 dct). Where the EOB position is 0 this acts like "skip" and the normal coding of skip at the per mb level is disabled. Added functions (seg_common.c) for setting and reading segment feature elements. These may want to be optimized away at some point but while the mecahnism is in a state of flux they provide a single location for making changes and keep things a bit cleaner. This is still proof of concept code. Currently the tested feature set:- Quantizer, Loop Filter level, Reference frame, Prediction Mode, EOB end stop. TBD:- Add functions for setting and reading the feature data with range and validity checking. Handling of signed and unsigned feature data. At the moment all is assumed to be signed and a sign bit is coded but many cannot be negative. Correct handling of EOB feature with intra coded blocks. Testing/trapping of legal/illegal ref frame and mode combinations. Transform size switch plus merge and test with 8c8 DCT work Merge and test with Sumans Segmenation coding optimizations Change-Id: Iee12e83661c7abbd1e0ce6810915eb4ec35e2d8e
2011-09-30Segment coding of mode and reference frame.Paul Wilkins
Proof of concept test code that encodes mode and reference frame data at the segment level. Decode-able bit stream but some issues not yet resolved. As it this helps a little on a couple of clips but hurts on most as the basis for segmentation is unsound. To build and test, configure with --enable-experimental --enable-segfeatures Change-Id: I22a60774f69273523fb152db8c31f4b10b07c7f4
2011-09-16enable selecting&transmitting to for intra mode entropyYaowu Xu
This commit added a 3 bit index to the bitstream, the index is used to look into the intra mode coding entropy context table. The commit uses the mode stats to calculate the cost of transmitting modes using 8 possible entropy distributions, and selects the distribution that provides the lowest cost to do the actual mode coding. Initial test show this provides additional .2%~.3% gain over quantizer adaptive intra mode coding. So the adaptive intra mode coding provides a total of .5%(psnr) to .6% gain(ssim) combined for all-key-encoding To build and test, configure with --enable-experimental --enable-qimode Change-Id: I7c41cd8bfb352bc1fe7c5da1848a58faea5ed74a