summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encoder.c
AgeCommit message (Collapse)Author
2019-01-30Implement get_mv_cost()Angie Chiang
The mv_cost contains mv_mode cost and mv_diff cost. The mv_mode cost is inferred from default_inter_mode_probs. The mv_diff cost is estimated used the log2 function. Change-Id: I62702bdb5c3fec018e3302765f5dd749fceebc12
2019-01-30Add assertion in get_block_src_pred_bufAngie Chiang
Print error message and assert when ref_frame_idx is invalid Change-Id: Ice6d06c53ddae0a77d578671b896c4e4d04d5366
2019-01-29Fix bug in predict_mv_modeAngie Chiang
Use kMvPreCheckLines in the for loops. Change-Id: I60204c6294560d47421a8621d907dfa95c9dde18
2019-01-29Allocate memory for mv_mode_arr[]Angie Chiang
Change-Id: Ib9fdf65e263dbaace8d4c86766eba2c6f35f652b
2019-01-28Add predict_mv_mode_arr()Angie Chiang
The function predicts the mv_mode for each prediction block in diagonal order. Change-Id: I7dcfcdb317ffa334cb40bb435baa71b5db62252b
2019-01-28Add predict_mv_mode()Angie Chiang
This function evaluate the impact of setting NEW_MV_MODE on a block and its neighbor blocks. Change-Id: Ie0b2c67bdc5cd14e0efd8ebc5dc3f3f873bcf3fe
2019-01-24Add find_best_ref_mv_mode()Angie Chiang
This function compute the rd cost for each mv_mode and return the one with minimum rd cost. eval_mv_mode() Evaluate the rd cost for a given mv_mode. Change-Id: Ia1b3ec7e1dd538e443e1bc79f2cab352408cd0a0
2019-01-24Add get_mv_distAngie Chiang
Given an mv_mode, get_mv_dist() obtains the mv and uses it to compute distortion. Change-Id: I58b8c7137b99c2736d651e678f0cd013dbd94877
2019-01-24Add get_mv_from_mv_mode()Angie Chiang
Given an mv_mode, this function will return the corresponding mv. find_ref_mv() A helper function finds the nearest and near mvs from the neighbor blocks. select_mv_arr[] An array used for storing selected motion vectors. Change-Id: Ibeb434007f65b2c6e461360f208d99455e76bcbf
2019-01-23Add set_block_src_pred_buf()Angie Chiang
This function sets src and pre buffer of MACROBLOCK and MACROBLOCKD. Will add static decorator once this function is called. Change-Id: I0fb46784dd97839e4d87c9e027fe8c59683e70d8
2019-01-23[cleanup] Move get_feature_score to a proper placeAngie Chiang
Add static decorator to it as well. Change-Id: I6c89fae456561b6975ab49af139a45a7483507c6
2019-01-10Correct pyramid_mv_arr's memory sizeAngie Chiang
Change-Id: Id99ca6fc846ebe11a9f5363da4e6449e976303a1
2019-01-10Adjust lambda with bsize in build_motion_field()Angie Chiang
Change-Id: I34cdbc6e8625c0de8595860af02ca277c3448a19
2019-01-10Free pyramid_mv_arr properlyAngie Chiang
Change-Id: Iac7fee461759599a7e167f8e6716ae3c6414a7d1
2019-01-07vp9_get_blockiness: resolve missing declarationJohann
BUG=webm:1584 Change-Id: I719c64734f4eae07def2d700006834a2420891a7
2019-01-03Increase memory size in non-greedy-mvAngie Chiang
The smallest block size of motion field is 4x4, but the mi_unit size is 8x8, therefore the number of units of motion field is "mi_rows * mi_cols * 4". Change-Id: I95292904d757705d39b78af5d0cf2d25f376c642
2019-01-03Build pyramid motion fieldAngie Chiang
Change-Id: I43fd61f7946a8a96d444dab5e94a9b01483ffab7
2018-12-20vp9/encoder: resolve missing declarationsJohann Koenig
Mark local functions as 'static.' Found with -Wmissing-declarations BUG=webm:1584 Change-Id: Icbdb0ceca3dbf3005ca29bfda05d533d241577d0
2018-12-18Merge "Add frame header control to turn on PSNR_AQ mode"Jingning Han
2018-12-18Merge "Relocate tpl buffer allocation"Jingning Han
2018-12-17Relocate tpl buffer allocationJingning Han
Move it to deeper stages where all the encoder configurations have been set. This avoids the encoding failure when the buffer is allocated before the encoder is fully configured. Change-Id: I6723966fd2c7c36fbab9a92d1f3bd59c83ed95f0
2018-12-17Add frame header control to turn on PSNR_AQ modeJingning Han
Change-Id: I46f695b15153c8c508f525a5673db24326371977
2018-12-17vp9-svc: Define rc scene change flag per superframeMarco Paniconi
Define the rc->high_num_blocks_with_motion, set in the scene change analysis, to be defined per superframe. This is used for increasing motion search area on some (super)frames, e.g., for scrolling. Also some code cleanup in rt_speed_feature_. No change in behavior. Change-Id: I1a5c04b9cd4aef1723ce42f82e981a2ca15c8b9d
2018-12-17Merge "Add build_motion_field()"Angie Chiang
2018-12-13vp9-svc: On scene change: only reset TL in flexible mode.Marco Paniconi
On scene/slide change detected on TL > 0 frame, only reset the temporal layer pattern for flexible/bypass mode. Change-Id: Ib848778addc10ef6981b92839af397833fd4a908
2018-12-12Add build_motion_field()Angie Chiang
Move the related code into the function. This is to facilitate of building pyramid motion field. Change-Id: I879db2271e227af63c5eac76b0c70c985b86a2da
2018-12-12Replace mv_arr by pyramid_mv_arrAngie Chiang
We plan to compute mv field in different scale. Change-Id: I49a92d948f8b5dbab78e38c61f5f4f879bbe269f
2018-12-11Change interface of motion_compensated_predictionAngie Chiang
Change-Id: I44da4884eea26f0feb7b17f4100db7e5bddd14b4
2018-12-11Move prepare_nb_full_mvs to vp9_mcomp.cAngie Chiang
Change-Id: I36e3bcae60751a9caeac03a3c94cb752b73a010b
2018-12-10Merge "vp9 screen: Update motion search offset when set to NSTEP."Jerome Jiang
2018-12-08Merge "Add satd avx2 implementation"Sai Deng
2018-12-07vp9 screen: Update motion search offset when set to NSTEP.Jerome Jiang
Search method and step parameter might be changed in speed settings. In this case, we should update the search area offset due to the change of search method. Change-Id: I51dc584bbf35e998757da326355dd4b8a4d0093f
2018-12-06Add satd avx2 implementationsdeng
Speed Test: C/SatdHighbdTest blocksize: 16 time: 138 us blocksize: 64 time: 315 us blocksize: 256 time: 1120 us blocksize: 1024 time: 3955 us AVX2/SatdHighbdTest blocksize: 16 time: 89 us blocksize: 64 time: 189 us blocksize: 256 time: 590 us blocksize: 1024 time: 1912 us Change-Id: I6357174462fccd589a475b13d8114b853cab5383
2018-12-06Implement get_full_mv()Angie Chiang
Change-Id: Icde1b01ea7f64e2c43dcd039cc37fd306e43030f
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-04Merge "vp9: force refresh of long term ref when denoiser reset."Jerome Jiang
2018-12-04vp9: force refresh of long term ref when denoiser reset.Jerome Jiang
This will allocate extra frame buffer if long term temporal reference is used and denoiser is enabled on non-key frame. Add test. Change-Id: I0e8d1fdb9a2d697a8eed7fe6206bcb362e69f1c8
2018-12-03Merge "vp9: Rename post_encode drop function."Marco Paniconi
2018-12-03vp9: Overshoot detection for skipped base layer.Marco Paniconi
If scene/slide change is detected on current superframe and max-q set because of high overshoot: then if the lower/base spatial layer are skipped on the current superframe, max-q is forced on the next encoded base/lower spatial layers. Change-Id: Id61efda86ee545395012e19476d19845e3932678
2018-12-03vp9: Rename post_encode drop function.Marco Paniconi
Feature works also for non-screen content mode, so rename it. Change-Id: I665362d50cf9a4017f114973586ad0eead066ddd
2018-11-29Change the interface of vp9_full_pixel_diamond_newAngie Chiang
Avoid passing in tpl_stats because this function will be called in motion search, where tpl_stats should be fixed at the point. Let further_steps becomes internal variable in the function. Change-Id: Iebe380925eb1891c19e0b78163dab8e6bfafccdb
2018-11-29vp9-svc: Add num_encoded_top layer counterMarco Paniconi
Useful for noise estimation when top layer is skipped encoded. Change-Id: I18cbe6119bac6c21514941b1e3b530a05a42df14
2018-11-26vp9-svc: Fix to skip enhancement layer settingMarco Paniconi
If in constrained layer drop mode, avoid setting skip flag if base layer is dropped, as whole superframe will be dropped in this case. This avoids an assert trigger in the svc superframe packing. Change-Id: I51c953c7fee979790c65c798bac9bd3d805dc66f
2018-11-20vp9-svc: Reset temporal layers on scene changeMarco Paniconi
Reuse existing function for resetting temporal layer pattern. And fix to use first spatial layer to encode, and some refactoring in encode_without_recode_loop(). Change-Id: Ifb22bb9de793ecb8e73f410e125c7c12383da1d2
2018-11-19Minor simplificationsYaowu Xu
Change-Id: I231e863f838f449335236c174b74bd33dfdd8b19
2018-11-16vp9: Reorganize the buffer level for cbr modeMarco Paniconi
Refactor the code with some changes. Split update into two parts: move the fillup (with per-frame-bandwidth) before the encoding, and keep the leaking part (with encoded_frame_size) after the encoding (postencode). For SVC with ref_frame_config usage: allow usage of timestamp delta for the fillup part of buffer, instead of the (average) framerate passed in via the duration. Moving the buffer fillup (+per-frame-bandwidth) part to the pre-encode causes some difference in performance (since buffer level affects active_worst/QPand frame-dropping), but the change is observed to be small. Made small adjustment to active_worst_quality to compensate. Adjust some thresholds in datarate tests. Change-Id: I81a5562367034f318cffd451304bc4a34bf02a1d
2018-11-15Merge changes Ib9d16a4b,I6061f38cAngie Chiang
* changes: Refactor av1_nb_mvs_inconsistency() Recompute mv inconsistency after mv search is done
2018-11-14Recompute mv inconsistency after mv search is doneAngie Chiang
Change-Id: I6061f38cb42eea2b4c8996ad372c829dc1051c8d
2018-11-14Disable tpl model in GF-only GOP structureJingning Han
The tpl model assumes a relative short stats buffer length. Hence it is not ready to support GF-only GOP structure where the max length can go up to 250. Disable tpl model in such setting to avoid a rare encode failure in GF-only setting. Change-Id: I3409dbb829a8105478876684ec21a2bd405c33c8
2018-11-13Skip ACL recode loop for intermediate ARF layersJingning Han
Speed up the encoding time by ~20% for multi-layer ARF system. Change-Id: I16de1cfed7cd1815cf0269eb4f90ad74fdf087ee