summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_block.h
AgeCommit message (Collapse)Author
2016-02-09Restore previous motion search bit-error scale.Alex Converse
The bit to error transformation got doubled as a result of going from 8-bit to 9-bit costs (change d13385c). Use defines to derive the scale numbers and comment some of the fields. derf: -0.023 BDRATE hevcmr: +0.067 BDRATE stdhd: +0.098 BDRATE (These are substantially smaller than than the original gains from 8 to 9 bit costing.) Change-Id: I6a2b3b029b2f1415e4f90a05709b2333ec0eea9b
2016-01-27vp9 non-rd mode: Modification for detected skin areas.Marco
If a superblock contains alot of "skin" then force split of 64x64 partition, and make some adjustments in mode selection. This helps to reduce artifacts on moving face/skin areas at low bitrates. Little/no change in metrics: avgPSNR/SSIM down by ~0.12%. Small encoding time increase < 1%. Change-Id: Ic57f52148c3716f391419fab0530d916e4c1d186
2015-11-13Changes to exhaustive motion search.paulwilkins
This change alters the nature and use of exhaustive motion search. Firstly any exhaustive search is preceded by a normal step search. The exhaustive search is only carried out if the distortion resulting from the step search is above a threshold value. Secondly the simple +/- 64 exhaustive search is replaced by a multi stage mesh based search where each stage has a range and step/interval size. Subsequent stages use the best position from the previous stage as the center of the search but use a reduced range and interval size. For example: stage 1: Range +/- 64 interval 4 stage 2: Range +/- 32 interval 2 stage 3: Range +/- 15 interval 1 This process, especially when it follows on from a normal step search, has shown itself to be almost as effective as a full range exhaustive search with step 1 but greatly lowers the computational complexity such that it can be used in some cases for speeds 0-2. This patch also removes a double exhaustive search for sub 8x8 blocks which also contained a bug (the two searches used different distortion metrics). For best quality in my test animation sequence this patch has almost no impact on quality but improves encode speed by more than 5X. Restricted use in good quality speeds 0-2 yields significant quality gains on the animation test of 0.2 - 0.5 db with only a small impact on encode speed. On most clips though the quality gain and speed impact are small. Change-Id: Id22967a840e996e1db273f6ac4ff03f4f52d49aa
2015-07-31Give skip_txfm constants names.Alex Converse
This is using a define instead of an enum to keep byte packing. Change-Id: I3abb07c8bfe377e19be4531b624af7b7b4207792
2015-07-29Comment zcoeff_blk.Alex Converse
Change-Id: Iefc2eb78e71472ecf51802ec59ff32caef4bd0f4
2015-06-29VP9: Move ref_mvs[][] and mode_context[] from MB_MODE_INFOScott LaVarnway
to MB_MODE_INFO_EXT. This saves 36 bytes per 8x8 area for both the decoder and encoder. (encoder has two MODE_INFO buffers) Change-Id: If006abb2224acaf326df3c2be09e77e967662107
2015-02-04Account for chroma component costs in RTC mode decisionJingning Han
This commit allows the encoder to account for additional chroma plane costs in the mode decision process, if the current block potentially contains significant color change. It improves the visual quality at very low bit-rates. The compression performance of dark720p is improved by 12.39% in speed 6. For jimred at 150 kbps, the PSNR of V component (red) increased by 0.2 dB, at the expense of about 5% increase in encoding time. Note that for sequences where the chroma components are fairly consistent, the encoding time increase is negligible. On average the rtc set compression performance is improved by 1.172% in PSNR and 1.920% in SSIM. Change-Id: Ia55b24ef23a25304f7ec9958fbf07fd6e658505c
2014-12-22Revert "Revert "Removal of legacy zbin_extra / zbin_oq_value.""Jingning Han
This reverts commit 9946ee23e0a4c158e26a505b162a072f81b8a3be. Fix the ssse3 asm function. Change-Id: I07f77a63aa98087626e45c4e87aa5dcafc0b0b07
2014-12-19Revert "Removal of legacy zbin_extra / zbin_oq_value."Paul Wilkins
This reverts commit e9b586e21bb899e247346e82bccf5afb42604910. Change-Id: I5b36e6727da6c05278d97e2c37b80c109f79bed4
2014-12-18Removal of legacy zbin_extra / zbin_oq_value.Paul Wilkins
zbin extra / zbin_oq_value was widely passed around, hence removal touches a lot of code. Change-Id: Idc94359735b60c38a160e4385ae09d5ca8b6b8e5
2014-11-20vp9_ethread: move max/min partition size to mb structYunqing Wang
The max_partition_size and max_partition_size are set at the beginning while setting speed features, and then adjusted at SB level. Moving them to mb struct ensures there is a local copy for each thread. Change-Id: I7dd08dc918d9f772fcd718bbd6533e0787720ad4
2014-11-05Rework cut-off decisions in cyclic refresh aq modeJingning Han
This commit removes the cyclic aq mode dependency on in_static_area and reworks the corresponding cut-off thresholds. It improves the compression performance of speed -5 by 1.47% in PSNR and 2.07% in SSIM, and the compression performance of speed -6 by 3.10% in PSNR and 5.25% in SSIM. Speed wise, about 1% faster in both settings at high bit-rates. Change-Id: I1ffc775afdc047964448d9dff5751491ba4ff4a9
2014-10-09Rename highbitdepth functions to use highbd prefixDeb Mukherjee
Uses highbd_ prefix convention consistently. Change-Id: I58f7f799a7ff8e32701bcd71c955bcf1cdd4581e
2014-10-01Remove repeated header files from vp9_block.hJingning Han
This commit removes unused header file vp9_onyxc_int.h and repeatedly included file vpx_ports/mem.h from vp9_block.h Change-Id: I400b210bd1da48f1880bd50a8f4a6e2c690e15a1
2014-09-11Adds high bitdepth transform functions and testsDeb Mukherjee
Adds various high bitdepth transform functions and tests. Much of the changes are related to using typedefs tran_low_t and tran_high_t for the final transform cofficients and intermediate stages of the transform computation respectively rather than fixed types int16_t/int. When vp9_highbitdepth configure flag is off, these map tp int16_t/int32_t, but when the flag is on, they map to int32_t/int64_t to make space for needed extra precision. Change-Id: I3c56de79e15b904d6f655b62ffae170729befdd8
2014-09-03Speed up compound inter prediction mode checkJingning Han
This commit allows the encoder to store outcomes of single reference frame modes and compares them to decide if the inter prediction filter, forward transform, and quantization can be skipped. The compression performance of speed 3 is down derf -0.364% stdhd -0.198% For test sequences, the speed 3 runtime is reduced highway CIF 100 kbps, 51976 ms -> 45033 ms, 13% speed-up stockholm 720p 1000 kbps, 71826 ms -> 67838 ms, 5.5% speed-up pedestrian 1080p 2000 kbps, 154924 ms -> 150702 ms, 2.6% speed-up Change-Id: I5aa26f918d2b4b5197a2c0afa2779319f1c88e44
2014-08-29Extend block level sse to support multiple txfm blocksJingning Han
This commit extends the sse and forward transform computation flag to support the case 64x64 blocks where there are 4 32x32 2D-DCT blocks. Change-Id: I86a3e805dfaa0f3abd812f590520c71aa0e40473
2014-08-22Move mv cost table to VP9_COMPJingning Han
The mv cost table set is maintained at frame level, hence moved to VP9_COMP. Change-Id: Icb3d0185d47443590bd11357de729aa4ba5c5e5e
2014-08-11Merge "Enable fast forward txfm and quant for rate-distortion search"Jingning Han
2014-08-11Merge "Extend skip_txfm flag into array to cover YUV planes"Jingning Han
2014-08-08Enable fast forward txfm and quant for rate-distortion searchJingning Han
This commit enables encoder to select fast forward transform and quantization path according to the prediction residual sse/variance, in the rate-distortion optimization scheme. Change-Id: Ief9fc3844fd4107166d401970e800c6e5ce2b5fe
2014-08-05Extend skip_txfm flag into array to cover YUV planesJingning Han
Change-Id: Ieae182d72d625d0d3fd4ed7c7d24cb521a0f21b0
2014-08-04energy -> int to avoid unsigned / signed mismatchJim Bankoski
Change-Id: Idd1327852f0df0eab0ea3b33959f2b8292b77301
2014-07-01Re-design quantization processJingning Han
This commit re-designs the quantization process for transform coefficient blocks of size 4x4 to 16x16. It improves compression performance for speed 7 by 3.85%. The SSSE3 version for the new quantization process is included. The average runtime of the 8x8 block quantization is reduced from 285 cycles -> 255 cycles, i.e., over 10% faster. Change-Id: I61278aa02efc70599b962d3314671db5b0446a50
2014-06-30Decide the partitioning threshold from the variance histogramYunqing Wang
Before encoding a frame, calculate and store each 16x16 block's variance of source difference between last and current frame. Find partitioning threshold T for the frame from its variance histogram, and then use T to make partition decisions. Comparing with fixed 16x16 partitioning, rtc set test showed an overall psnr gain of 3.242%, and ssim gain of 3.751%. The best psnr gain is 8.653%. The overall encoding speed didn't change much. It got faster for some clips(for example, 12% speedup for vidyo1), and a little slower for others. Also, a minor modification was made in datarate unit test. Change-Id: Ie290743aa3814e83607b93831b667a2a49d0932c
2014-06-20Switch active map implementation to segment based.Alex Converse
Change-Id: Ibb841a1fa4d08d164cf5461246ec290f582b1f80
2014-06-12Merge "Replacing txfm_size with tx_size."Dmitry Kovalev
2014-06-12Replacing txfm_size with tx_size.Dmitry Kovalev
Change-Id: Ifa6374e9db5919322733b656e0865f5f19ee6f2c
2014-06-12Fast computation path for forward transform and quantizationJingning Han
This commit enables a fast path computational flow for forward transformation. It checks the sse and variance of prediction residuals and decides if the quantized coefficients are all zero, dc only, or more. It then selects the corresponding coding path in the forward transformation and quantization stage. It is currently enabled in rtc coding mode. Will do it for rd coding mode next. In speed -6, the runtime for pedestrian_area 1080p at 1000 kbps goes down from 14234 ms to 13704 ms, i.e., about 4% speed-up. Overall coding performance for rtc set is changed by -0.18%. Change-Id: I0452da1786d59bc8bcbe0a35fdae9f623d1d44e1
2014-05-21Moving itxm_add pointer from MACROBLOCKD to MACROBLOCK.Dmitry Kovalev
The final goal is eventually to get rid of both itxm_add and fwd_txm4x4. This patch does it in the decoder. Change-Id: Ibb3db57efbcbb1ac387c6742538a9fcf2c6f24a5
2014-05-19Replacing int_mv with MV.Dmitry Kovalev
Change-Id: Icd7eea20e944e3e28e5eb20cdc088866a54d53b4
2014-05-16Moving PC_TREE from MACROBLOCK to VP9_COMP.Dmitry Kovalev
Because PC_TREE is encoder-level data, not MACROBLOCK-level data. Change-Id: I4f620c0781acd3a2744860610117e74948e0b2b5
2014-05-01Moving costs from MACROBLOCK to VP9_COMP.Dmitry Kovalev
Change-Id: I61471dd0f77d1547abec13cbf9670e1c4eb9131a
2014-04-29Adding search_site_config struct.Dmitry Kovalev
Change-Id: I2ad333553e673dbabcdc0f0366aea311e90849bf
2014-04-21Enable background detection for adaptive quantizer controlJingning Han
This commit enables a background detection approach for adaptive quantizer control. It combines the cyclic refresh pattern and the background information to determine the segment id for adaptive quantizer selection, prior to the non-RD mode decision process. It hence allows proper quantization information update for a more precise rate-distortion modeling in the non-RD mode decision. The compression performance of speed -5 for rtc set is improved by 2.5%, at no speed change. Change-Id: Ic3713e8ed9185b403b5b1679d19dabd57506d452
2014-04-17add a context tree structure to encoderJim Bankoski
This patch sets up a quad_tree structure (pc_tree) for holding all of pick_mode_context data we use at any square block size during encoding or picking modes. That includes contexts for 2 horizontal and 2 vertical splits, one none, and pointers to 4 sub pc_tree nodes corresponding to split. It also includes a pointer to the current chosen partitioning. This replaces code that held an index for every level in the pick modes array including: sb_index, mb_index, b_index, ab_index. These were used as stateful indexes that pointed to the current pick mode contexts you had at each level stored in the following arrays array ab4x4_context[][][], sb8x4_context[][][], sb4x8_context[][][], sb8x8_context[][][], sb8x16_context[][][], sb16x8_context[][][], mb_context[][], sb32x16[][], sb16x32[], sb32_context[], sb32x64_context[], sb64x32_context[], sb64_context and the partitioning that had been stored in the following: b_partitioning, mb_partitioning, sb_partitioning, and sb64_partitioning. Prior to this patch before doing an encode you had to set the appropriate index for your block size ( switch statement), update it ( up to 3 lookups for the index array value) and then make your call into a recursive function at which point you'd have to call get_context which then had to do a switch statement based on the blocksize, and then up to 3 lookups based upon the block size to find the context to use. With the new code the context for the block size is passed around directly avoiding the extraneous switch statements and multi dimensional array look ups that were listed above. At any level in the search all of the contexts are local to the pc_tree you are working on (in?). In addition in most places code that used to call sub functions and then check if the block size was 4x4 and index was > 0 and return now don't preferring instead to call the right none function on the inside. Change-Id: I06e39318269d9af2ce37961b3f95e181b57f5ed9
2014-04-16Remove old activity masking code.Paul Wilkins
Delete code relating to the old VP8_TUNE_SSIM flag as this code does not currently work and is largely made redundant in VP9 by the various AQ modes. Change-Id: I71f28e1f680573d296422254489000678552b17b
2014-03-24Merge "Using local variable for token_cache."Dmitry Kovalev
2014-03-24vp9_block.h static reconverted to inlineJim Bankoski
Change-Id: I0e7d2815839d8a64250116a5486570d03659a4c0
2014-03-21Using local variable for token_cache.Dmitry Kovalev
We use local variable for token_cache in the decoder. Change-Id: I032763fa7894313cffe73e3f14863ae1d0527665
2014-03-20Remove unused mode_sadYunqing Wang
Removed mode_sad. Change-Id: I230b42ac9b617ae2c375e297057aa0756bd355fe
2014-03-10Add a conservative RD based active map in vp9.Alex Converse
Change-Id: I47b3c38aadfd8f3ea08515a18a5948aa1375c650
2014-03-05Removing vp9_onyx.h and moving its content to the encoder.Dmitry Kovalev
Change-Id: I03451c88536bc498edddbe0cd9773ff79da085c2
2014-03-05Cleaning up mode cost manipulations.Dmitry Kovalev
Change-Id: If175d97990454b171b6abeddb76d142497484487
2014-02-20vp9_rd_pick_inter_mode_sb() reorganizationAlex Converse
* Reduce the number of short cirtcuit checks by pre-computing and combining like checks. * Postpone non-trivial initializations until after the shortcircuits are evaluated. * Add some consts and const pointers. No change to the actual results of the call or output of the encoder. Change-Id: Ie44c4702aec6e08cfe0b8b0ba3cd6b57206478d1
2014-02-12Remove inactive control parametersJingning Han
Change-Id: Ic5692af975fe6bd2d8ec82bbae103c6f7c2fc13e
2014-01-31Cleanup block_rd_txfm.Alex Converse
* Avoid unnecessary type erasure * Prune unused/duplicate fields from struct rdcost_block_args * Make struct rdcost_block_args a local Change-Id: I4f1fd4837ccd028bbfe727191ee8d69f0463b7e5
2014-01-24Renaming INTERPOLATION_TYPE to INTERP_FILTER.Dmitry Kovalev
Corresponding renames: subpel_kernel => interp_kernel vp9_get_filter_kernel() => vp9_get_interp_kernel() pred_filter_type => pred_interp_filter adaptive_pred_filter_type => adaptive_pred_interp_filter mcomp_filter_type => interp_filter read_interp_filter_type() => read_interp_filter() write_interp_filter_type() => write_interp_filter() fix_mcomp_filter_type() => fix_interp_filter() Change-Id: I1fa61fa1dc81ebbf043457c3ee2d8d4515bee6d3
2014-01-23vp9/encoder: add extern "C" to headersJames Zern
Change-Id: I4f51ce859a97bf1b8fd2b37ac585b7c643232b69
2014-01-16Inter-frame non-RD mode decisionJingning Han
This commit setups a test framework for real-time coding. It enables a light motion search for non-RD mode decision purpose. Change-Id: I8bec656331539e963c2b685a70e43e0ae32a6e9d