summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_rdopt.c
AgeCommit message (Collapse)Author
2015-01-02Merge "Enable sub8x8 inter block search for RTC coding mode"Jingning Han
2014-12-24Enable sub8x8 inter block search for RTC coding modeJingning Han
This commit enables sub8x8 inter block coding for RTC mode. The use of sub8x8 blocks can be turned on by allowing choose_partitioning function to select 4x4/4x8/8x4 block sizes. Change-Id: Ifbf1fb3888fe4c094fc85158ac3aa89867d8494a
2014-12-23WIP: Remove giant value cost tableJim Bankoski
Change-Id: Iabe8a8868a747626c24bb13f1796f4c7827af367
2014-12-22Tokenization without huge tables.Jim Bankoski
Change-Id: Iff528c4b7528cc70320343b3a7ce07a92b024dfd
2014-12-18Merge "Improve motion detection for low complexity regions."Paul Wilkins
2014-12-16Set second ref frame to be NONE in key frame codingJingning Han
This commit explicitly set the second reference frame type to be NONE in key frame coding mode. This fixes a subtle dependency of reference motion vector used by next inter frame on mode_info reset before key frame coding. Change-Id: I5ff0359753fdc9992b0bfe889490f7a32d7d5f6a
2014-12-16Improve motion detection for low complexity regions.Paul Wilkins
Where there is very subtle motion, especially when combined with low spatial complexity, the codec sometimes fails to quickly pick up the ambient motion field. Once it has been established though the field propagates well using Nearest and Near MV. This patch looks specifically at the case where the Nearest and Near have not been established as non zero vectors and in this case discounts the cost of searching for a new vector in the rd code. This will almost certainly have some implications in terms of encode speed but it should be possible to mitigate the impact in a subsequent using first pass stats and the local spatial complexity. Average results for test sets approximately neutral. Change-Id: I44a29e20f11f7ab10f8c93ffbdc50183d9801524
2014-12-15Simplify rate-distortion modeling functionJingning Han
Use left shift to replace one multiplication. The computation outcome remains identical. Change-Id: I1e1737af0a245de0d2a2bde10f0c171477199fc1
2014-12-12vp9: move encoder-only member from commonJames Zern
allow_comp_inter_inter VP9_COMMON -> VP9_COMP Change-Id: I6d9dc25d1cdd7e2ab62f5be69cd9fa883d21dbb6
2014-12-05Improve the performance by caching the left_mi and right_mi in macroblockd.hkuang
This improve the deocde performance by ~2% on Nexus 7 2013. Change-Id: Ie9c4ba0371a149eb7fddc687a6a291c17298d6c3
2014-12-05Enable conditional skip path in rd_pick_intra_sby_modeJingning Han
These speed-up features for key frame coding are only turned on in the settings of hybrid non-RD and RD mode decision. It provides about 20% speed-up to the hybrid key frame coding at the expense of certain compression performance loss. For vidyo1, the key frame coding statistics are changed 9838F, 35.020 dB, 61677 us -> 9920F, 34.834 dB, 47556 us Overall rtc set compression performance is down by -0.257%. Change-Id: I0025447fda26bb7855e982955642b5f55d71b51f
2014-11-24vp9_ethread: modify VP9_COMP structureYunqing Wang
This patch modified struct VP9_COMP. Created a struct ThreadData to include data that need to be copied for each thread. In multiple thread case, one thread processes one tile. all threads share one copy of VP9_COMP, (refer to VP9_COMP *cpi in the code) but each thread has its own copy of ThreadData, (refer to ThreadData *td in the code). Therefore, within the scope of encode_tiles(), both cpi and td need to be passed as function parameters. In single thread case, the FRAME_COUNTS pointer in ThreadData points to "counts" in VP9_COMMON. Change-Id: Ib37908b2d8e2c0f4f9c18f38017df5ce60e8b13e
2014-11-20vp9_ethread: move filter_cache out of RD_OPT structYunqing Wang
Similar to mask_filter, the filter_cache in RD_OPT struct can be moved out, and declared as a local variable since it is only used in pick_inter_mode functions. Change-Id: I412b99cca82bade07ac912064ec03dd1de6b2c17
2014-11-20vp9_ethread: change mask_filter to a local variableYunqing Wang
The mask_filter in RD_OPT struct is used to record rd result in filter decision. It is only used in pick_inter_mode functions, and is removed from the struct and declared as a local variable. Change-Id: I3c95c8632ba7241591ce00ef2ef5677b5e297d7b
2014-11-20Revert "vp9_ethread: include a pointer to mb in VP9_COMP"Yunqing Wang
This reverts commit 6906d218ddd1af97228a797f4558e402231d94f1. Another way will be used to handle mb struct. Change-Id: Ic1111a46b2b1ee00f8f9e3fcd4cf3eb6030b2dc4
2014-11-14vp9_ethread: include a pointer to mb in VP9_COMPYunqing Wang
Modified VP9_COMP struct to include MACROBLOCK *mb. This change makes it feasible in multi-thread case to allocate a mb for each thread. Change-Id: I624d6d1aa9c132362200753e5d90b581b1738d6e
2014-10-31Merge "Refactor vp9_update_rd_thresh_fact"Jingning Han
2014-10-30Refactor vp9_update_rd_thresh_factJingning Han
Reduce the scope of function parameters. Change-Id: Ifef2cfb559908a97498ffdbd6ea53da1cd45a73c
2014-10-30Merge "Combine vp9_encode_block_intra and encode_block_intra"Hui Su
2014-10-29Enable mode search threshold update in non-RD coding modeJingning Han
Adaptively adjust the mode thresholds after each mode search round to skip checking less likely selected modes. Local tests indicate 5% - 10% speed-up in speed -5 and -6. Average coding performance loss is -1.055%. speed -5 vidyo1 720p 1000 kbps 16533 b/f, 40.851 dB, 12607 ms -> 16556 b/f, 40.796 dB, 11831 ms nik 720p 1000 kbps 33229 b/f, 39.127 dB, 11468 ms -> 33235 b/f, 39.131 dB, 10919 ms speed -6 vidyo1 720p 1000 kbps 16549 b/f, 40.268 dB, 10138 ms -> 16538 b/f, 40.212 dB, 8456 ms nik 720p 1000 kbps 33271 b/f, 38.433 dB, 7886 ms -> 33279 b/f, 38.416 dB, 7843 ms Change-Id: I2c2963f1ce4ed9c1cf233b5b2c880b682e1c1e8b
2014-10-28Combine vp9_encode_block_intra and encode_block_intraHui Su
Change-Id: I79091fb677b64892ecca2fb466fde14602d8cdfc
2014-10-27Refactor encoder tile data structureJingning Han
Make the common tile info as one element in the encoder tile data struct. Change-Id: I8c474b4ba67ee3e2c86ab164f353ff71ea9992be
2014-10-24Tile based adaptive mode search in RD loopJingning Han
Make the spatially adaptive mode search in rate-distortion optimization loop inter tile independent. Experiments suggest that this does not significantly change the coding staticstics. Single tile, speed 3: pedestrian_area 1080p 1500 kbps 59192 b/f, 40.611 dB, 101689 ms blue_sky 1080p 1500 kbps 58505 b/f, 36.347 dB, 62458 ms mobile_cal 720p 1000 kbps 13335 b/f, 35.646 dB, 45655 ms as compared to 4 column tiles, speed 3: pedestrian_area 1080p 1500 kbps 59329 b/f, 40.597 dB, 101917 ms blue_sky 1080p 1500 kbps 58712 b/f, 36.320 dB, 62693 ms mobile_cal 720p 1000 kbps 13191 b/f, 35.485 dB, 45319 ms Change-Id: I35c6e1e0a859fece8f4145dec28623cbc6a12325
2014-10-22Merge "vp9_ethread: allocate frame contexts outside VP9_COMMON struct"Yunqing Wang
2014-10-22vp9_ethread: allocate frame contexts outside VP9_COMMON structYunqing Wang
This patch allocated frame contexts outside VP9_COMMON. This allows multiple threads to share the same copy of frame contexts, and reduces the overhead. It also guarantees the correct update of these contexts during bitstream packing. This patch doesn't change encoding result. Change-Id: Ic181a2460b891d1d587278a6d02d8057b9dbd353
2014-10-17Reset rate cost value in rd mode searchJingning Han
When early termination is triggered, properly reset the rate cost to invalid value to avoid potential ioc issue. Change-Id: I3444390be2e49a34bb02cf8a74c33d5dbd96d88d
2014-10-16Fix an ioc issue in super_block_uvrdJingning Han
This commit fixes an ioc issue that will happen when the cumulative variables are not in effective use. The fix discards these redundant additions. Change-Id: Idbac5bfb989c0cedc5f8a323effce938519b2457
2014-10-14Refactor super_block_uvrd function to remove goto statementJingning Han
Use return value 0/1 as indicator of the validity of the rate- distortion cost. Change-Id: I6244126fbf03472cebcba4f177a6cd329fae4743
2014-10-13Use speed feature variable in vp9_rd_pick_inter/intra_modeJingning Han
Replace repeated fetch cpi->sf with a local sf pointer. Change-Id: I5a55bba3e1c41fbdbc6ad5f078d2fa49dd95ee67
2014-10-13Fix vp9_rd_pick_inter/intra function typesJingning Han
The returned value is not used anywhere, hence changing the function type into void. Change-Id: I0ece49ed61e7aab6df01140135503ad41d4ef4a4
2014-10-13Refactor rate distortion cost structureJingning Han
This commit makes a struct that contains rate value, distortion value, and the rate-distortion cost. The goal is to provide a better interface for rate-distortion related operation. It is first used in rd_pick_partition and saves a few RDCOST calculations. Change-Id: I1a6ab7b35282d3c80195af59b6810e577544691f
2014-10-11Fix ActiveMapTest valgrind warningJingning Han
This fixes a valgrind warning in the ActiveMapTest unit test reported in issue 870. Change-Id: Idf172ab0244ebefe630c3577e649bc9ba7c43d10
2014-10-09Merge "Rename highbitdepth functions to use highbd prefix"Deb Mukherjee
2014-10-09Rename highbitdepth functions to use highbd prefixDeb Mukherjee
Uses highbd_ prefix convention consistently. Change-Id: I58f7f799a7ff8e32701bcd71c955bcf1cdd4581e
2014-10-09Merge "Subpel search cleanups and enhancements"Deb Mukherjee
2014-10-09Merge "Move the high freq coeff check outside store_coding_context"Alex Converse
2014-10-08Subpel search cleanups and enhancementsDeb Mukherjee
- Some fixes to surface fit. - Returns variance function as cost rather than sad in the pattern search and diamond search functions. Only vp9_pattern_search_sad function used in bigdia search uses sad as integer 1-away costs. - Deploys SUBPEL_TREE_PRUNED_MORE for speed 4+. Results: derf [Speed 3]: About +0.036% in coding efficiency without any discernible speed loss. derf [Speed 4]: About 2-3% faster at -0.199% loss in coding efficiency. derf [Speed 5]: About 3-4% faster at -0.149% loss in coding efficiency. Change-Id: I8462f94f6adb46966ca964f2bd0400977357fd63
2014-10-08Merge "Allow mode search breakout at very low prediction errors"Yunqing Wang
2014-10-08Allow mode search breakout at very low prediction errorsYunqing Wang
In model_rd_for_sb function, the spatial domain SSE and variance are checked to see if transform coefficients are quantized to 0. Besides that, this patch adds another set of thresholds that are much more strict. These thresholds are used to conduct a partition block level check to measure if all its TX blocks are skippable for YUV planes. If it is true, x->skip is set for this partition block, and thus its mode search is terminated. This speeds up the encoding at very low prediction error case, such as screen sharing application. This patch covers what rd_encode_breakout_test() does, so that function is removed. Borg test at speed 3 shows: For stdhd set, psnr: +0.008%, ssim: +0.014%; For derf set, psnr: +0.018%, ssim: +0.025%. No noticeable speed change. Change-Id: I4e5f15cf10016a282a68e35175ff854b28195944
2014-10-08Move the high freq coeff check outside store_coding_contextJingning Han
This fixes valgrind message issue 870. Change-Id: Ibbc2481923a2995029ab05de30c9e8a6e9f0f9a8
2014-10-08Use local variable in vp9_rd_pick_inter_mode_sbJingning Han
Change-Id: Ie35a965a6b8de536ccaf61ff61498620d22db205
2014-10-07Merge "Replace mi_width_log2() with mi_width_log2_lookup table"Jingning Han
2014-10-07Merge "Take out repeated block width/height lookup functions"Jingning Han
2014-10-07Merge "Fix skip_txfm issue in rdopt code"Yunqing Wang
2014-10-07Fix skip_txfm issue in rdopt codeYunqing Wang
Fixed an encoder crash. Set skip_txfm to 0 for cases that skip_txfm isn't calculated. Put memcpy of skip_txfm at right place. Change-Id: Ib3b6afc1b251a85b2a853c8138fb3393f48cfef6
2014-10-07Replace mi_width_log2() with mi_width_log2_lookup tableJingning Han
Change-Id: If0ea98aa139d14d40cd924114e18396aff36b5a5
2014-10-07Take out repeated block width/height lookup functionsJingning Han
The functions b_width_log2 and b_height_log2 only do direct table fetch. This commit unifies such use cases by using the table directly and removes these functions. Change-Id: I3103fc6ba959c1182886a2799d21b8b77c8a7b6b
2014-10-07Merge "Resolves some static analysis / undefined warnings"Deb Mukherjee
2014-10-07Resolves some static analysis / undefined warningsDeb Mukherjee
Also fixes a case of distortion becoming negative and messing up the RDCOST computation. Change-Id: Id345af9e8dfff31ade622be5756e51f2cdface53
2014-10-06Fix eobs buffer pointer mis-useJingning Han
This commit fixes a buffer pointer mis-use in store_coding_context. The compression performance for stdhd set of speed 3 is improved by 0.097%. It fixes issue 869. Change-Id: Idc59e22035eaf39f7133ca04174894374d647ff7