summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
AgeCommit message (Collapse)Author
2017-10-11vp9: use nonrd pick_intra for small blocks on keyframes.Jerome Jiang
Keyframe encoding is more than 2x faster. Disabled on Speed 8. Change-Id: I2157318b6ac8253fa5398322c72d98cd7fa9b2b6
2017-10-06Adjust threshold in scene detectionMarco
For 1 pass vbr: increase min_thresh slightly, and also add condition on golden/arf update for using full nonrd_pick_partition. Reduces possible false detection for scene cut detection. Neutral/small change in metrics or speed for speed 5. Change-Id: I388f4d9a56e3cc763e0148338c1bc0381e58ad76
2017-10-04Avoid nonrd_pick_partition for speed >= 6.Marco
For 1 pass vbr speed >= 6: when REFERENCE_PARTITION is selected, avoid doing the full nonrd_pickmode based partition. No change in overall metrics or speed. Reduces encode times on scene cuts by 10-20%. Change-Id: I0310b1610cc1c83793a509e0a9059840e8f18308
2017-10-03Use adapt_partition for ARF in 1 pass.Marco
For speed 6 real-time mode: use adapt_partition on ARF frame instead of REFERENCE_PARTITION (which is slower). This requires enabling compute_source_sad_onepass for no-show_frames. Speedup of ~3-5% on some clips that heavily use ARF, small loss (~0.2%) in quality on ytlive set. Change-Id: Ib50acc97df06458244a6ac55d2bd882c30012536
2017-09-28vp9: Modification to adapt the ARF usage for 1 pass vbrMarco
Add stats for past ARF usage, and use it to disable ARF usage based on some conditions. Overall improvement on ytlive set, reduces the regression on the problem clips for this feature. Only affects when sf->use_altref_onepass is enabled (currently off by default). Change-Id: I66267f227ea132dc86acb730e9882f85bead2cdb
2017-09-18vp9: Adjustments for ARF usage in 1 pass vbr.Marco
Only when USE_ALT_REF_ONE_PASS is enabled (off by default). Force fixed partition to 64x64 when is_src_alt_ref_frame is true, and don't force early exit for some modes in nonrd_pickmode for ARF noshow frames. Small gain ~0.2% on ytlive metrics for speed 6. Neutral speed difference. Change-Id: I27eb6622d0453c09a06ccdc3b16368762474d11d
2017-08-25vp9: Speed 6 adapt_partition for live/vbr usage.Marco
Enable adapt_partition for vbr mode for speed 6. This allows the usage of the pickmode-based partition (used in speed 5), but only selectively for superblocks with high source sad, otherwise the faster variance based partition scheme is used. For speed 6 on ytlive set: avgPSNR/SSIM metrics up by ~0.6%, several clips up by ~1.5%. Small/negligible decrease in speed. Change-Id: I12f3efef6b3e059391de330fdbe5a44c2587f1f8
2017-08-24vp9: Adjust 16x16 splot threshold for variance partitionMarco
For speeds < 7, increase threshold that controls the split of 16x16->8x8 blocks, for resolutions 720p and higher. Minor change for speed 5 (since it uses reference partition scheme which only uses variance partition as first step). For speed 6: ~0.5% increase in avgPSNR/SSIM metrics on ytlvie set. No change in speed. Change-Id: I5126580973201538d8ca26a9256b93c4d11d685b
2017-08-22vp9: Condition lighting change detection on CBR mode.Marco
This feature is used for the CBR RTC encoding mode at speed >= 6. This change will exclude it for VBR mode. For speed 6 live encoding (VBR): avgPSNR/SSIM metrics on ytlive set up by ~1% (few clips up by 2/3%). No change in speed. Change-Id: I1a0dd94c334f7df309ab5a48d477d7e25355b798
2017-08-08vp9: Partition logic adjustment for speed 6 feature.Marco
When adapt_partition_source_sad is enabled (currently only at speed 6 for resoln <= 360p): use lower subsize (8x8 instead of 16x16) for nonrd_select_partition on 32X32 blocks. And force avoiding rectangular partition checks in nonrd_pick_partition for speed >= 6. Small increase ~0.5 in metrics for speed 6 on rtc_derf, no change in speed. Change-Id: Id751bc8f7573634571b2d6f5e29627cd5cebccae
2017-07-31Merge "Revert "Revert "vp9: Speed feature to adapt partition based on ↵Marco Paniconi
source_sad."""
2017-07-30vp9: Fix denoising condition when pickmode partition is used.Marco
When the superblock partition is based on the nonrd-pickmode, we need to avoid the denoising. Current condition was based on the speed level. This change is to make the condition at the superblock level, as the switch in partitioning may be done at sb level based on source_sad (e.g., in speed 6). Change-Id: I12ece4f60b93ed34ee65ff2d6cdce1213c36de04
2017-07-30Revert "Revert "vp9: Speed feature to adapt partition based on source_sad.""Jerome Jiang
This reverts commit c9266b85476aadf078238b7bde3c36bf7953e11c. Disable source_sad when resolution > 1080P. The test should pass now. BUG=webm:1452 Change-Id: I72dde88e66590ff9e41da5e5dd83f5550a83f082
2017-07-29Revert "vp9: Speed feature to adapt partition based on source_sad."James Zern
This reverts commit 064fc570ff8399536563e3846500fd99b273b034. This causes an assertion failure in vp9_mcomp.c when running gtest_filter=VP9/MotionVectorTestLarge.OverallTest/41: `mv->col >= -((1 << (11 + 1 + 2)) - 1) && mv->col < ((1 << (11 + 1 + 2)) - 1)' Change-Id: I449e777bf18b661cb3f1d82253610c55c51687f6
2017-07-29Merge "vp9: Adjust logic in source sad for screen content."Marco Paniconi
2017-07-28vp9: Adjust logic in source sad for screen content.Jerome Jiang
Change-Id: I917d106f4c95ea44e413e23881f6303982e1a6a3
2017-07-29vp9: Speed feature to adapt partition based on source_sad.Marco
Move the source_sad feature to speed 6 (from speed 7), and add speed feature to switch from the variance-based partition to reference_partition (which uses nonrd-pickmode for bsize selection) if source_sad is high. Currently used only for speed 6 for resoln <= 360p. About 4-5% improvement on 360p in RTC set. Some speed slowdown, but still ~30% faster than speed 5. Change-Id: Ib0330ee5fe9fdd2608aed91359a2a339d967491c
2017-07-22set_var_thresh_from_histogram: prevent negative varianceJames Zern
For 8-bit the subtrahend is small enough to fit into uint32_t. For 10/12-bit apply: 63a37d16f Prevent negative variance previously: 47b9a0912 Resolve -Wshorten-64-to-32 in highbd variance. c0241664a Resolve -Wshorten-64-to-32 in variance. Change-Id: I181c85f0b9a03da37c2e8b89482d48aa3dbc0aee
2017-07-17vp9: Fix to setting content_state for real-time mode.Marco
When content_state_sb is set to LowVarHighSumdiff, don't reset it to VeryHighSad. Visually better on clips with strong lighting changes. Small/negligible change in RTC metrics and speed. Change-Id: I20c383e3c4cf8d1149de5f9260449c0b7cf7c6aa
2017-07-17vp9: Reuse motion from choose_partitioning in NEWMV search.Marco
When int_pro_motion_estimation is done for superblock in choose_partitioning, use it to avoid the full_pixel_search for NEWMV mode, if bsize is >= 32X32. For speed > 7. Small/neutral change on RTC metrics. ~1-2% speedup on arm on high motion clip. Change-Id: I3cfe6833ff4bf75d4afa83eaf058ad45729de85b
2017-07-13vp9: Adjust minmax threshold for variance partitioning.Marco
Only affects speed 7. Improvement on high motion clips. Change-Id: Ibddb68fed9c63207df29ffd790f9205b1cecf687
2017-07-10vp9: Move skinmap computation into multithreading loop.Jerome Jiang
Change-Id: Iebc9dd293d8b1449c0674c0295349297e9b90646
2017-07-07Merge "cosmetics,vp9/: normalize inv/fwd_txfm naming"James Zern
2017-07-06cosmetics,vp9/: normalize inv/fwd_txfm namingJames Zern
+ vpx_dsp/, test/ itxfm -> inv_txfm, ftxfm -> fwd_txfm Change-Id: I3aacdb65143576d64cfe5c9b14dd358c17c1fe7e
2017-07-06vp9: Nonrd mode: use content_state_sb for high motion.Marco
In the content_state for a superblock is set to HighSad, use that to bias some decisions in variance partition and nonrd pickmde: use int_pro_motion for sad computation in choose_partitioning, and set large_block in pickmode based on the content_state_sb. Only affects speed >= 7. Immprovement for high motion content. Small gain (~1%) in RTC metrics. Speedup of ~5 for high motion clip on android (speed 8, 1 thread). Change-Id: I5774c4854f012b89c8e969f6129b60988c2ce11c
2017-06-29cosmetics,vp9/encoder: s/txm/txfm/James Zern
txfm is more commonly used as an abbreviation through the codebase Change-Id: I86fd90ef132468f9da270091c05daa1f5a49ece2
2017-06-27vp9: compute skinmap only once before encoding.Jerome Jiang
This could save some cycles since skin detection is used in multiple places in vp9. 1~2% speed up on ARM. Change-Id: I86b731945f85215bbb0976021cd0f2040ff2687c
2017-06-23Merge changes from topic 'missing-proto'James Zern
* changes: onyxd_int.h: add missing prototypes onyxd.h: add vp8dx_references_buffer prototype vp[89],vpx_dsp: add missing includes vp8,encodeframe.h: correct prototypes vp8: add temporal_filter.h add picklpf.h add ethreading.h vp8,bitstream.h: add missing prototypes vp8: remove vp8_fast_quantize_b_mmx vp8,loopfilter_filters: make some functions static vp9_ratectrl: make adjust_gf_boost_lag_one_pass_vbr static vp9_encodeframe: make scale_part_thresh_sumdiff static vp9_alt_ref_aq: correct vp9_alt_ref_aq_create proto tiny_ssim: make some functions static
2017-06-21vp9: Add high source sad to content state.Marco
Use it to limit NEWMV early exit in nonrd pickmode Small change in RTC metrics, has some improvement for high motion clips. Change-Id: I1d89fd955e1b3486d5fb07f4472eeeecd553f67f
2017-06-21vp9_encodeframe: make scale_part_thresh_sumdiff staticJames Zern
quiets -Wmissing-prototypes Change-Id: I696223d75860edba13c6b6f38c1f8db353a6f812
2017-06-21vp9: Put skin detection usage around cpi flag.Marco
Skin detection usage in choose_partitioning should be around the cpi->use_skin_detection. Change-Id: I6986179af9ce94c60c0974d66c311fc07cc04cfe
2017-05-18vp9: SVC: Modify condition to allow for copy partition.Marco
When temporal layers are used, only allow for copy partition on the top temporal enhancement layer frames. Change-Id: I5472abdc0f9f6c8dafa75a7a84c615e08ae22af8
2017-05-18vp9: Make copy partition work for SVC and dynamic resize.Marco
Only affects speed 8. Make changes to copy partition to fix a bug in setting microblock offset. Avg PSNR shows 0.02% gain on rtc_derf and 0.08% loss on rtc. Change-Id: I61c3e5914dde645331344388e7437e5638acd4f3
2017-05-11vp9: SVC: Increase the partiiton and acskip thresholdsMarco
Increase the partition and acskip thresholds for temporal enhancement layers. ~1-2% speedup, with negligible loss in quality. Change-Id: Id527398a05855298ad9ddac10ada972482415627
2017-04-26Merge "Make the row based multi-threaded encoder deterministic"Yunqing Wang
2017-04-26Merge "vp9: speed >= 8: Skip uv variance in model_rd_sb_y_large"Jerome Jiang
2017-04-25vp9: speed >= 8: Skip uv variance in model_rd_sb_y_largeJerome Jiang
For speed >= 8 and color_sensitivity not set, skip the transform skipping test in UV planes. Add a new condition to check noise level to skip chroma check for speed >= 8 if y_sad is high. 1~2% speedup on ARM for speed 8. Borg tests show neutral results in both rtc and rtc_derf. Change-Id: Idecd3ff6e28c97757a43bb6f3a7082c85f72109c
2017-04-24vp9; Reduce artifact in non-rd pickmode for lighting changes.Marco
Add a low-variance high-sumdiff to the superblock content state and use it to limit the mv and bias some decisions in non-rd pickmode. Only affects speed >= 6. Reduces artifact for lighting changes. Small/no difference in metrics on RTC set. Change-Id: Ic84b2379fe0ae3fa71ae826ee6bae3eaf551a25b
2017-04-24Make the row based multi-threaded encoder deterministicYunqing Wang
This patch followed allow_exhaustive_searches feature modification and continued to modify the encoder to achieve the determinism in the row based multi-threaded encoding. While row-mt = 1 and using multiple threads, the adaptive feature in encoder was disabled, which gave BDRate gain(at speed 1, -0.6% ~ -0.7%; at speed 2, -0.46% ~ -0.59%), but some encoder speed losses(7% ~ 10% at speed 1 and 3% ~ 6% at speed 2). These speed losses were acceptable considering the speed gains obtained from row-mt. Change-Id: I60d87a25346ebc487a864b57d559f560b7e398bb
2017-04-24Merge "Make allow_exhaustive_searches feature no longer adaptive"Yunqing Wang
2017-04-21Make allow_exhaustive_searches feature no longer adaptiveYunqing Wang
A previous patch turned on allow_exhaustive_searches feature only for FC_GRAPHICS_ANIMATION content. This patch further modified the feature by removing the exhaustive search limit, and made it no longer adaptive. As a result, the 2 counts that recorded the number of motion searches were removed, which helped achieve the determinism in the row based multi-threading encoding. Tests showed that this patch didn't cause the encoder much slower. Used exhaustive_searches_thresh for this speed feature, and removed allow_exhaustive_searches. Also, refactored the speed feature code to follow the general speed feature setting style. Change-Id: Ib96b182c4c8dfff4c1ab91d2497cc42bb9e5a4aa
2017-04-20vp9: SVC: fix condition for partition/skip threshold when denoising.Marco
The more aggressive settings should only be used when denoise_svc condition is satisfied (which means top spatial layer). Change-Id: Ia8e3515b27f31bf21b1976ca80a2fa826daece3a
2017-04-11Merge "vp9: speed >= 8: Adjust speed settings on ARM."Jerome Jiang
2017-04-11vp9: speed >= 8: Adjust speed settings on ARM.Jerome Jiang
Set adaptive_rd_thresh to 2 when simple block yrd is not used. Fix regression caused by computing y sad without int_pro_motion_estimation on low res motion clips. Overall 0.07% quality loss on rtc_derf. Change only affects low res on speed 8. Change-Id: Ic6a188a56529f1034d6431005fb4b0e24e8a7e27
2017-04-10vp9: 1 pass CBR: avoid nonrd_pick_partition on segment.Marco
For speed 5, 1 pass CBR: Don't use the nonrd_pick_partition on the segment, rather use choose_partitioning followed by nonrd_select_partition (as is done on base segment). Little/no quality loss on RTC and RTC_derf (< 0.3%), speedup of at least 5%. Change-Id: I5273d5f950e60adf5e437b4ca8c4f63964641e83
2017-04-07Merge changes from topic 'Wshorten'James Zern
* changes: configure: enable -Wshorten-64-to-32 for hbd vp9_encodeframe: resolve -Wshorten-64-to-32 in hbd Resolve -Wshorten-64-to-32 in highbd variance.
2017-04-06Merge "vp9: speed 8: Compute y sad without int_pro_motion_estimation."Jerome Jiang
2017-04-05vp9_encodeframe: resolve -Wshorten-64-to-32 in hbdJames Zern
vp9_high_get_sby_perpixel_variance the variance operated on in is already in 32-bits Change-Id: I97006eb9c08dbd0f88ee35e1a1ca205737508296
2017-04-05vp9: speed 8: Compute y sad without int_pro_motion_estimation.Jerome Jiang
Little change in overall PSNR in rtc. 2-4% speedup on VGA on ARM. Change-Id: I3395806d7afd456deacd4077c330adca13ab0645
2017-04-05vp9: Temporal denoising: avoid denoising for speed <= 5.Marco
Temporal denoiser runs in non-rd pickmode, so it is only used for speed >= 5. Regression exists for speed 5, due to use of reference_partition (which use non-rd pickmode for partitioning). Avoid denoising for now at speed 5. Change-Id: I74a74d2e1404d7cfd33dcf4ec06dd2e503256cf0