summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_rdopt.c
AgeCommit message (Collapse)Author
2020-07-31Assign correct values for zcoeff_blk in sub8x8 RDOHui Su
This fixes a lossless encoding bug as reported in the issue tracker. Coding performance change is neutral. BUG=webm:1700 Change-Id: I0f034b16b57e917e722709a7e9addef864b83d27
2020-04-24Revert "Revert "Remove RD code for CONFIG_REALTIME_ONLY in vp9.""Jerome Jiang
Under CONFIG_REALTIME_ONLY flag, map speed < 5 to speed 5. Bug: webm:1684 This reverts commit 85cb983682fe9ca14fd302b50d27d762da05d665. Change-Id: I67b7ed37e8b74417db310ea0c817d3c5a5de9e44
2020-04-20Revert "Remove RD code for CONFIG_REALTIME_ONLY in vp9."Jerome Jiang
This reverts commit da24d35132e80422dc2c33e7c92462f4db7cd83d. BUG=webm:1684 Change-Id: I552c37c7bdc844610879a65cc02038d76a5d32b1
2020-02-10Set mv to zero if the second ref does not existCheng Chen
Change-Id: I94b936c2642981eccdff073fc71c12e2dccb7909
2019-09-18Move vp9_alloc_motion_field_infoAngie Chiang
Move vp9_alloc_motion_field_info out of init_tpl_buffer, so that vp9_alloc_motion_field_info will be called even though there is not alternate reference frame. This fix the crash with shields_720p50 at bitrate 2000 Change-Id: If2877e8d0b8a834556be12d239b7b58ad1fc8c73
2019-08-28Move motion field from TplDepFrame to MotionFieldAngie Chiang
Replace get_pyramid_mv by vp9_motion_field_mi_get_mv. The goal is to modularize motion field related operations. Change-Id: I33084e680567ab106659ba9389cc4b507b893c69
2019-08-12Merge "vp9_rdopt: fix integer sanitizer warnings"Hien Ho
2019-07-31Reduce call num of exhaustive searchAngie Chiang
The encoding time difference between non_greedy_mv and baseline is reduced from 51% to 13% However, there is also a performance impact. non_greedy_mv performance: Before this CL lowres 0.395% midres 0.716% hdres 0.533% After this CL lowres 0.242% midres 0.429% hdres 0.305% Change-Id: I047d6509df504b264981c0b903c0cc955f45b273
2019-07-30vp9_rdopt: fix integer sanitizer warningsHien Ho
implicit conversion from type 'int' of value -9 (32-bit, signed) to type 'uint8_t' (aka 'unsigned char') changed the value to 247 (8-bit, unsigned) BUG=webm:1615 Change-Id: Ic2254ef4312f349ee38ec6e12a56b2cd5714b101
2019-07-17Make vp9_prepare_nb_full_mvs only return valid mvsAngie Chiang
In this case, vp9_nb_mvs_inconsistency doesn't need to check whether each neighbor mv is valid or not. non_greedy_mv encoding time is reduced by 1.5% Change-Id: I3216c98481e777d5e0b917ea20ee39b7ca9c9d23
2019-06-26Integerize vp9_full_pixel_diamond_newAngie Chiang
Change-Id: I833c82fb910c8274b5a237e26fe0dcda7def9796
2019-06-26Remove mv_dist/mv_cost from new mv search funcsAngie Chiang
The functions are diamond_search_sad_new() vp9_full_pixel_diamond_new() vp9_refining_search_sad_new() Change-Id: Ied6fe98b8a1401c95f0488faf781c5cd5e8e0db6
2019-06-21Make type of lambda int in TplDepFrameAngie Chiang
Change-Id: I8fdf1ad4790201b1624c8408d92983aeb0b08302
2019-06-03Remove unused func for CONFIG_REALTIME_ONLYJerome Jiang
Change-Id: I503e147e20e5b69b910c425d169e59821874f627
2019-05-31Remove RD code for CONFIG_REALTIME_ONLY in vp9.Jerome Jiang
This reduces vp9 only binary size by ~5.7%. Change-Id: I57e46baf591d68b0a0cecbc9319a1190df8b0457
2019-05-06Add mismatch_debug toolAngie Chiang
Change-Id: I045b4cf625d428109688303ced5433d824df2790
2019-04-09Merge "Film Mode: Bias based on sub block energy."Paul Wilkins
2019-04-09Merge "Film mode: Raise threshold for intra modes"Paul Wilkins
2019-04-08Film Mode: Bias based on sub block energy.Paul Wilkins
Apply a bias for film mode against intra coding (especially DC_PRED) and compound modes if the sub blocks of the current block have significantly different variance in the source. Change-Id: Iac1fc0510141be5c472a0ec57567bab3d2fc4164
2019-04-03Bypass skip check in tune for sharpness modeJingning Han
The sharpness mode is enabled for hvc visual quality. Bypass the skip block check that could potentially force all zero block in sharpness mode. This resolves the patchy blockiness issue raised in the 4K SDR HVC encode. Change-Id: I0538a1b774b80c6b0899c921e80edecd4a440d5c
2019-04-02Film mode: Raise threshold for intra modesPaul Wilkins
Substantially increase the threshold for applying variance adjustment in rd_variance_adjustment() for intra modes only, especially for DC_PRED. Change-Id: Idb3f0c5aca5ab58c9b79c3e993247719054d79c9
2019-03-28Further Adjustments to film mode bias.Paul Wilkins
Stronger bias against variance below source than above. Change-Id: Ied3992f4204e14433c6841d51c192118be954f0a
2019-03-28Add GF group noise weighting in rd_variance_adjustment()Paul Wilkins
For film mode add a weighting to the thresholds used in rd_variance_adjustment() based on noise measured in the first pass. Change-Id: I83ca669bb55aa52f1d34f03a2268b79fba890770
2019-03-28Adjustment to low variance block bias in rd_variance_adjustment()Paul Wilkins
Adjust the extra bias applied for very low variance blocks to focus mainly on DC_PRED. Change-Id: I8f1c1a29932f319535807046846b604b5b8827c1
2019-03-28Change to thresholding in rd_variance_adjustment()Paul Wilkins
Always test thresholds using a scaled block variance value. Source pixel variance no longer used so delete it as a parameter to the function Change-Id: I9e251edac6ebb15da98e40dcfa43333fe8b6ba55
2019-03-28Use reconstructed variance in rd_variance_adjustmentsdeng
to replace the variance from .dst which is the prediction buffer in inter mode. Only enable it in tune-content-film mode at the moment. Change-Id: I647b4a524a0849fda42541887ebc34091f152073
2019-03-27Allow more Intra choices in film mode.Paul Wilkins
Disable part of a speed feature that blocks all intra modes except DC_PRED when the source variance is low. Change-Id: I2956951fd05933a39f7225d4dfe14e019410fee3
2019-03-11Add block size scaling in rd_variance_adjustment()Paul Wilkins
Scale the block variance values used in this function to a common block size. Change-Id: I73ad7d48b2621f312d771ee0dd7b6fc59cfc1652
2019-03-11Changes to rd_variance_adjustment()Paul Wilkins
Always calculate per block variance values vs per pixel. Change-Id: I760b3ba1a250d7544813a1b93923eedc207cbd60
2019-02-28Strengthened film grain setting.Paul Wilkins
This patch increases the preference for maintaining similar variance between source and reconstruction and thus helps improve film grain retention. The changes are only active when film mode is selected Change-Id: I3bc082dca678a0f32ec00f30f5d90d0f95ca2381
2019-02-13Only discount new mv mode when tpl model is readyAngie Chiang
Change-Id: I3326f0912627981fd604b16ddbf668d2262d4287
2019-02-13Check the new mv diff in discount_newmv_test()Angie Chiang
Change-Id: I38c5d4de93bebfd3f46bcc01716a0cc4a76af950
2019-02-13Use mv_mode_arr to decide the newmv discount placeAngie Chiang
Change-Id: I98c32aba4c9e81380b588dcdbfa991468487ce73
2019-02-05Merge "Add dist scale in get_mv_dist"Angie Chiang
2019-01-31Add dist scale in get_mv_distAngie Chiang
Add MACRO VP9_DIST_SCALE_LOG2 represents distortion's log scale Change-Id: Ic496a31e6d3f04626510f8c4661af464a002e361
2019-01-24Fix a bug in tune-content film modesdeng
Avoid recursively decreasing 'strength'. avg_psnr ovr_psnr ssim midres -0.224 -0.195 -0.115 Change-Id: Ie74c069cda76873ac38e9c1a9162b1ddfb9b103d
2019-01-04Use motion field for mv inconsistency in mv searchAngie Chiang
Change-Id: I25ea05f4bfe3c6f420e967c33763909c979a0d1b
2018-12-19Merge "Correct condition for skip"Yaowu Xu
2018-12-19Correct condition for skipYaowu Xu
Do not skip without check when lossless is requested. Change-Id: Iceda428e7bf5ab19202b1dcb598e389fcaf6978d
2018-12-19Merge "Improve rd_variance_adjustment() for low variance blocks."Paul Wilkins
2018-12-06Implement find_prev_nb_full_mvsAngie Chiang
In single_motion_search, we use prev coded nb full mvs to compute mv inconsistency. lambda is set to block_area / 4. This is a draft. Will to experiments to figure out the impact on coding efficiency and visual quality. Change-Id: Id10f72b3c7e6085bfbe1a6156b9fd6917843d001
2018-12-06Pass mv_num into vp9_nb_mvs_inconsistency()Angie Chiang
This allow av1_nb_mvs_inconsistency to cope with variant number of motion vectors. Change-Id: I391aa322d458cfefaf640e7b07d5ad5ce2d3375c
2018-12-06Improve rd_variance_adjustment() for low variance blocks.Paul Wilkins
Change the cross over point for switching between per pixel and per block variance numbers when comparing reconstruction and source complexity. This improves the accuracy of the comparison for low variance regions, For example, recon and source may both have an integer per pixel variance of 1, but one of these may actually be be 1.01 and the other 1.99. The reason for using per pixel at all was because this number is already available for the source block so does not need to be recomputed here. Changing the threshold from >0 to >100 for using per pixel values will thus cause a little extra work for some blocks. With my default runs on derf and nf sets their is a net gain as follows: (-ve = better, Overal PSNR, SSIm, PSNR-HVS) derf low res -0.106, -0.107, -0.093 midres -0.000, -0.021, 0.001 hd res -0.198, -0.190, -0.282 nf2k -0.090, -0.088, -0.077 Change-Id: I53ef514fe1c35ee3f08c64e9b22fc05fc7fe5887
2018-12-04Fix the parameter of vp9_full_pixel_diamond_newAngie Chiang
Change-Id: I36b970953c960fde65d7b7705ccfa575c8741c43
2018-11-29Consider mv inconsistency in single_motion_searchAngie Chiang
This is still a work-in-process. nb_full_mvs and lambda are set to zero for now, which means mv inconsistency penalty is zero while doing the mv search. Change-Id: I18680413d748fbdb9a33621f92f83e021036a3ab
2018-10-05Changes to facilitate accurate sub-pel motion searchYunqing Wang
This patch included changes to facilitate accurate sub-pel motion search. More patch will follow to turn on accurate sub-pel motion search. Change-Id: I224c28c338353fe5c7609372162f79885c54248f
2018-09-24Merge "Improve subpel MV search for speed 1"Hui Su
2018-09-21Merge "better-hw-compatibility: fix out of bounds access"Johann Koenig
2018-09-21better-hw-compatibility: fix out of bounds accessMatthias Räncker
With --enable-better-hw-compatibility an access to array element -1 can be observed for VP9/ActiveMapTest.Test/0 ../vp9/encoder/vp9_rdopt.c:3938:53: runtime error: index -1 out of bounds for type 'RefBuffer [3]' There doesn't seem anything that would prevent ref_frame from being 0. If there is no reference frame it can probably be assumed that it isn't scaled. Signed-off-by: Matthias Räncker <theonetruecamper@gmx.de> Change-Id: I0a29cd0ffc9a19742e5e72203d5ec5d0a16eac7a
2018-09-21Improve subpel MV search for speed 1Hui Su
Do one more subpel MV search each round. This improves coding efficiency slightly: lowres 0.12% midres 0.11% hdres 0.13% Also renames the control flag for subpel MV search quality. Encoding speed loss is less than 1%. This only affects speed 1. Change-Id: I3aecd25342f2dcacea6c143db494f7db6282cb92