summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_blockd.h
AgeCommit message (Collapse)Author
2013-08-09Renaming BLOCK_SIZE_TYPES constant to BLOCK_SIZES.Dmitry Kovalev
There will be another change set to rename BLOCK_SIZE_TYPE enum to BLOCK_SIZE. Change-Id: I8d1dfc873d6186fa5e554262f5169e929978085e
2013-08-09Inlining 16 as a stride for BLOCK_OFFSET macro.Dmitry Kovalev
Change-Id: I7f23d174eb089e5500f268a10db09648634c1b82
2013-08-09Merge "Removing plane_block_{width, height}_log2by4 functions."Dmitry Kovalev
2013-08-09Merge "Moving loopfilter struct to VP9_COMMON."Dmitry Kovalev
2013-08-09Moving loopfilter struct to VP9_COMMON.Dmitry Kovalev
Loop filter configuration doesn't belong to macroblock, so moving it from MACROBLOCKD to VP9_COMMON. Also moving the declaration of loopfilter struct from vp9_blockd.h to vp9_loopfilter.h. Change-Id: I4b3e34be9623b47cda35f9b1f9951f8c5b1d5d28
2013-08-09Moving scale_factors and related code to separate files.Dmitry Kovalev
Change-Id: I531829e5aee2a4a7a112d528ecccbddf052d0e74
2013-08-07Removing plane_block_{width, height}_log2by4 functions.Dmitry Kovalev
Change-Id: I040b82b8e32aee272d10cbb021c7ba1c76343d7a
2013-08-07Merge "Using only one scale function in scale_factors struct."Dmitry Kovalev
2013-08-07Adding ss_size_lookup table.Dmitry Kovalev
Removing the old one bsize_from_dim_lookup. Now we have a way to determine block size for plane using its subsampling values (ss_size_lookup). And then we can find the number of pixels in the block (num_pels_log2_lookup). Change-Id: I6fc981da2ae093de81741d3d78eaefed11015db9
2013-08-06Using only one scale function in scale_factors struct.Dmitry Kovalev
Functions scale_mv_q4 and scale_mv_q3_to_q4 were almost identical except q3->q4 conversion in scale_mv_q3_to_q4. Now q3->q4 conversion happens directly in vp9_build_inter_predictor. Also adding useful constants: SUBPEL_BITS and SUBPEL_MASK. Change-Id: Ia0a6ad2ac07c45fdf95a5139ece6286c035e9639
2013-08-05Changing the order switchable filter enum constants.Dmitry Kovalev
This changeset allows to remove vp9_switchable_interp and vp9_switchable_interp_map arrays and make code much clear. Actually we still have to use these mapping but only inside read_interp_filter_type and write_interp_filter_type functions. Change-Id: I4026c6f8c4acefba6c81421b7bacbaa52cc45f50
2013-08-05Replacing long block size enum values with shorter ones (2).Dmitry Kovalev
Change-Id: I428c4d42212b757112e3acfe5b81314cfbb5fd6b
2013-08-02Adding is_inter_block function.Dmitry Kovalev
Using it instead of long unclear verbose check "mbmi->ref_frame[0] != INTRA_FRAME". Change-Id: I9c7b4b3797942fa962bf3ba7460fff3084beabe9
2013-08-02Cleaning up set_contexts_on_border function.Dmitry Kovalev
Change-Id: I8f21c18b29f54b277fb1c167f278f109d9f3b996
2013-08-02Replacing long block size enum values with shorter ones.Dmitry Kovalev
Change-Id: I0e9329490828684a4fd46f540d89114cc68e8407
2013-07-30Cleanup typos, remove unnecessary lines, replace switchAdrian Grange
Removed unnecessary code lines, replaced switch with an if, fixed spelling errors and formatting. Change-Id: Ie48aa4604aa0ed48362ca359d792fb21b2ec1dc6
2013-07-25Removing duplicated PREDICTION_PROBS constant.Dmitry Kovalev
Already defined in vp9_seg_common.h. Change-Id: I5a0e3fa15966b1ebeb77ccd506b55fc231c22342
2013-07-24Adding condition inside get_tx_type_{4x4, 8x8, 16x16}.Dmitry Kovalev
Adding plane type check condition because it was always used outside of get_tx_type_{4x4, 8x8, 16x16}. Change-Id: I02f0bbfee8063474865bd903eb25b54d26e07230
2013-07-22Merge "Optimize operation flow in sub8x8 rd loop"Jingning Han
2013-07-22Optimize operation flow in sub8x8 rd loopJingning Han
Stack the rate-distortion statistics in the sub8x8 rd loop. This allows the encoder to skip the forward transform, quantization, and coeff cost estimation, in the sub8x8 rd optimization search, if the motion vector(s) are of integer pixel value, and have been tested in the previous prediction filter type rd loops of the same block. This gives about 2% speed-up for bus_cif at 2000 kpbs, for speed 0. Its efficacy depends how frequently the motion search will select an integer motion vector. Change-Id: Iee15d4283ad4adea05522c1d40b198b127e6dd97
2013-07-20Merge "Moving all loop filter related variables into new struct."Dmitry Kovalev
2013-07-19Moving all loop filter related variables into new struct.Dmitry Kovalev
Adding loopfilter struct with fields from MACROBLOCKD and VP9Common. Eventually it will be moved to vp9_loopfilter.h for better code structure. Change-Id: Iaf5fb71c33719cdfa1b991f671caf071be9ea035
2013-07-19Removing frame_type field from MACROBLOCKD struct.Dmitry Kovalev
Change-Id: Ia4e83913251c1cdc7aa2abd64bf01ecb1a962119
2013-07-19Block index variables in MACROBLOCKD reduced to chars.Paul Wilkins
Change-Id: I9a4df095732d561807de01a41dcb1a1960726a3c
2013-07-18Merge "Merge scale_factors and scale_factors_uv."Yaowu Xu
2013-07-18Using VP9_REF_NO_SCALE instead of (1 << VP9_REF_SCALE_SHIFT).Dmitry Kovalev
Change-Id: Ide58a74d31ff948319445a6337d2c05e98720e34
2013-07-18Merge scale_factors and scale_factors_uv.Ronald S. Bultje
This prevents a duplicate memcpy of a 128-byte struct every time set_scale_factors() is called (which is a lot), thus leading to a decrease from 3.7 MB to 1.85 MB of struct copying per 64x64 block RD/partition loop. Overall, this decreases encoding time of the first 50 frames of bus @ 1500kbps (speed 0) from 1min5.9 to 1min4.9, i.e. about a 1.5% overall speedup. We can likely get more gains by removing the copy of the other struct (and replacing it with an indexing) as well. Change-Id: I3dceb7e79f71e6fe911b11cc994cf89a869dde7a
2013-07-17Merge "Minor cleanup in code to fine uv tx_size."Paul Wilkins
2013-07-16Merge "vp9: remove frames_{since,till}.. from MACROBLOCKD"James Zern
2013-07-16Minor cleanup in code to fine uv tx_size.Paul Wilkins
Change-Id: I94b97a966b5efbc9a243048f1f5ddbbdc4b1846e
2013-07-16Merge "Removing and moving around constant definitions."Dmitry Kovalev
2013-07-15Change to extend full border only when neededYaowu Xu
This is a short term optimization till we work out a decoder implementation requiring no frame border extension. Change-Id: I02d15bfde4d926b50a4e58b393d8c4062d1be70f
2013-07-15Removing and moving around constant definitions.Dmitry Kovalev
Removing unused and duplicated constants, moving them from *.h to *.c if possible. Change-Id: Ief4d6b984a3ca2e9b38504f0d855ed072cf7133f
2013-07-13vp9: remove frames_{since,till}.. from MACROBLOCKDJames Zern
frames_since_golden / frames_till_alt_ref_frame are unused. Change-Id: I348e7689d4d75412cf4de7703d885be942e4a26b
2013-07-12vp9: consistent 'log2' variable namingJames Zern
lg2 -> log2 Change-Id: I0602ddff49e42c9c40c29c084d04b7592b9f8edf
2013-07-12Some minor cleanups for efficiencyDeb Mukherjee
Implements some of the helper functions more efficiently with lookups rathers than branches. Modeling function is consolidated to reduce some computations. Also merged the two enums BLOCK_SIZE_TYPES and BlockSize into one because there is no need to keep them separate (even though the semantics are a little different). No bitstream or output change. About 0.5% speedup Change-Id: I7d71a66e8031ddb340744dc493f22976052b8f9f
2013-07-11Moving segmentation related vars into separate struct.Dmitry Kovalev
Adding segmentation struct to vp9_seg_common.h. Struct members are from macroblockd and VP9Common structs. Moving segmentation related constants and enums to vp9_seg_common.h. Change-Id: I23fabc33f11a359249f5f80d161daf569d02ec03
2013-07-10Merge "Prunes out full-rd computation based on modeled rd"Deb Mukherjee
2013-07-10remove warnings when NDEBUG is setJim Bankoski
Change-Id: Ie0cb732fdcb98616a422c4463bff80642248d136
2013-07-10Prunes out full-rd computation based on modeled rdDeb Mukherjee
Adds a speed feature to eliminate full-rd computation if the modeled rd or rd based on a different parameter in the same mode is already a lot larger than the best rd yet. Specifically, only search the sharp and smooth filters if the modeled rd cost based on the regular filter is within a certain factor of the best rd cost so far. Also, skip full-rd computation of non splitmv inter modes if the modeled rd cost based on pred error is within the same factor of the best rd cost so far. Also adds some enhancements in the rd search for splitmv mode to speed things up by early breakouts. Negligible impact on performance. Resuts on derfraw300: psnr: -0.013% with the splitmv enhancements, -0.24% with the rd breakout feature on. speedup: 6% with splitmv enhancements, 20% with also residual breakout (tested on football sequence at 600 Kbps) Change-Id: I37abc308ea9f110c1679ce649b6a7e73ab1ad5fc
2013-07-10mi_width_log2 & mi_height_log2Jim Bankoski
converted to lookup to avoid unnecessary code Change-Id: I2ee6a01f06984cc2c4ba74b3fffd215318f749d2
2013-07-10b_width_log2 and b_height_log2 lookupsJim Bankoski
Replace case statement with lookup. Small speed gain at low speed settings but at speed 2+ where the number of motion searches etc. falls the impact rises to ~3-4%. Change-Id: Idff639b7b302ee65e042b7bf836943ac0a06fad8 Change-Id: I5940719a4a161f8c26ac9a6753f1678494cec644
2013-07-02Removing redundant struct from union b_mode_info.Dmitry Kovalev
Change-Id: I08fc6e474ff2c12cfa065bae4989c724276e2c83
2013-07-02Tx size selection enhancementsDeb Mukherjee
(1) Refines the modeling function and uses that to add some speed features. Specifically, intead of using a flag use_largest_txfm as a speed feature, an enum tx_size_search_method is used, of which two of the types are USE_FULL_RD and USE_LARGESTALL. Two other new types are added: USE_LARGESTINTRA (use largest only for intra) USE_LARGESTINTRA_MODELINTER (use largest for intra, and model for inter) (2) Another change is that the framework for deciding transform type is simplified to use a heuristic count based method rather than an rd based method using txfm_cache. In practice the new method is found to work just as well - with derf only -0.01 down. The new method is more compatible with the new framework where certain rd costs are based on full rd and certain others are based on modeled rd or are not computed. In this patch the existing rd based method is still kept for use in the USE_FULL_RD mode. In the other modes, the count based method is used. However the recommendation is to remove it eventually since the benefit is limited, and will remove a lot of complications in the code (3) Finally a bug is fixed with the existing use_largest_txfm speed feature that causes mismatches when the lossless mode and 4x4 WH transform is forced. Results on derf: USE_FULL_RD: +0.03% (due to change in the tables), 0% encode time reduction USE_LARGESTINTRA: -0.21%, 15% encode time reduction (this one is a pretty good compromise) USE_LARGESTINTRA_MODELINTER: -0.98%, 22% encode time reduction (currently the benefit of modeling is limited for txfm size selection, but keeping this enum as a placeholder) . USE_LARGESTALL: -1.05%, 27% encode-time reduction (same as existing use_largest_txfm speed feature). Change-Id: I4d60a5f9ce78fbc90cddf2f97ed91d8bc0d4f936
2013-07-01Removing vp9_mbpitch.c, moving vp9_setup_block_dptrs to vp9_block.h.Dmitry Kovalev
Change-Id: Ia547a5dd7650b771fd00edd673ab9f920270731c
2013-06-28fix test compile errorJames Zern
since: 92479d9 Make update_partition_context faster fixes: vp9/common/vp9_blockd.h:408:22: error: non-constant-expression cannot be narrowed from type 'int' to 'char' in initializer list [-Wc++11-narrowing] char pcvalue[2] = {~(0xe << boffset), ~(0xf <<boffset)}; ^~~~~~~~~~~~~~~~~ Change-Id: Id5b00b9a72d00a2b314081a23879bd1fa3ce983b
2013-06-26Merge "Make update_partition_context faster"Jingning Han
2013-06-26Make update_partition_context fasterJingning Han
Use vpx_memset for updating the partition contexts. Thanks to Noah for pointing out the need of refactoring in this part. Change-Id: I67fb78429d632298f1cd8a0be346cc76f79392a6
2013-06-26Change to use LUT for mode-to-txfm conversionYaowu Xu
Change-Id: Ieb989830f49e6708ee7728eddebf7a2144c37c6f
2013-06-25Merge "Removing unused code."Dmitry Kovalev