summaryrefslogtreecommitdiff
path: root/vp8/encoder/pickinter.c
AgeCommit message (Collapse)Author
2014-08-08vp8: Code cleanup for control of denoiser mode.Marco Paniconi
Change-Id: Icb9918dd38d15061d62852e6a2d905e8ceb2c1ac
2014-07-29vp8: Add an aggressive denoising mode.Marco Paniconi
Change-Id: Ie4686e1b15af6bcc8d59d585bbeb996f38224522
2014-07-15vp8: Allow for on/off control of UV temporal denoiser.Marco Paniconi
Use noise_sensitivity level for enabling UV denoiser. Change-Id: Ib208786a6fdf654981bcd96a3cf44e8e678025c1
2014-06-13Allow for deblocking temporal-denoised signal.Marco Paniconi
Allow for an option to selectively apply the deblocking loop filter to the denoised raw block, based on the denoised state (no-filter, filter with zero motion, or filter with non-zero motion) of the current block and its upper and left denoised block. This helps to reduce some blocking artifacts from the motion-compensated denoising. Change-Id: I0ac4e70076df69a98c5391979e739a2681e24ae6
2014-06-04s/INT_MAX/UINT_MAX/ where appropriateTim Kopp
Change-Id: I0156d85671305326525c4644510e240021eca461
2014-05-16vp8: Add increase_denoising parameter to denoiser.Marco Paniconi
Change-Id: I96ed73e109c4f89dd06f3583cf7ecf9277401fae
2014-04-23Add VPXD_SET_DECRYPTOR support to the VP9 decoder.Joey Parrish
Change-Id: I88f86c8ff9af34e0b6531028b691921b54c2fc48
2013-04-11Fix for multi-res-encoding:Marco Paniconi
Use local variable for setting the improved prediction mode. cpi->sf.improved_mv_pred is set/fixed at the frame level and should not be changed inside pick_inter_mode. Change-Id: Ie28d9171ac000e631af0e30204970e3d4fff3078
2013-01-08Merge "Remove cpi parameter from update_mvcount()"Scott LaVarnway
2012-12-10Moved error_bins to macroblock structScott LaVarnway
Change-Id: Ic9956ddf1c2ddffcf7be7fdfc23ad9a2426fc47a WIP: Fixing unsafe threading in VP8 encoder.
2012-12-04Moving mbs_tested_so_far, mode_test_hit_counts to macroblock structScott LaVarnway
Change-Id: Ifa78c0a953fab3e5dd7af0446924846c7022cd09
2012-12-04Remove cpi parameter from update_mvcount()Scott LaVarnway
cpi is no longer used . Change-Id: Ie86b994059e506cc1944212e12d4f75c041c1d15
2012-11-06Moving rd_thresh_mult, rd_threshes to macroblock structScott LaVarnway
Change-Id: I650a593162280ab40e71e527ec6518303e2d5723
2012-11-06Moving MVcount to macroblock structScott LaVarnway
Change-Id: Ie22841d096f3c86694b95bd06fc3a8ce1f032a10
2012-11-02Removed unnecessary VP8_COMP *cpi parametersScott LaVarnway
Code cleanup Change-Id: I82f9d787a2f511d39895fd8dfd5347a1676d9dbc
2012-10-16Fix to rd cost computation for mv bias.Marco Paniconi
This prevents the rd cost from wrapping around and going negative. Change-Id: Id61390537d2ad47762e410918bb4e18f6a0912d4
2012-10-09multi-res: disable intra on forced ref framesJohn Koleszar
If a reference frame is forced because of low dissimilarity, then shut off the search of intra modes. This change has mixed results. On one clip (QVGA), it hurt quality by ~1.5% with negligible speed impact. On another (VGA) it had negligible affect on quality, but a ~0.2% speed impact. Change-Id: Ic8b07648979d732f489de5f094957e140f84d2eb
2012-10-09multi-res: add parent_ref_valid flagJohn Koleszar
Rather than overloading the parent_ref_frame value to shut off the search in some cases, add a new validity flag. This cleans up some of the duplicated mr_encoder_id && mr_low_res_mv_avail checks as well, for readability. Change-Id: Iddad93a27066c3d85ff2f25a361ac113b288ab7b
2012-10-08multi-res: work around reference mismatchJohn Koleszar
In some situations, believed to be an interaction between temporal scalability and dropped frames, the references available to an encoder may not be the same references available to its parent. Previously, the code tried to force the reference frame chosen by the parent to be used on this frame, even if it was disabled. This was preventing the pick mode loop from running even once, which led to a crash. Attempts to reproduce this bug locally were unsuccessful, so it is still undetermined what the underlying cause of this issue is. In the specific case that was failing, the application did not set any flags which influenced the reference selection on that frame. ref_frame_flags indicated that the golden frame was disabled, believed to be because the last frame updated the last and golden frames, so golden was shut off by default. It's not clear why this wouldn't have also been true in the lower res encoder, ie, why the lower res encoder decided to use and/or was allowed to use the golden frame. We weren't able to debug into the non-crashing lower res encoder as the crash couldn't be reproduced locally. Change-Id: Ifb265253d26963ac2afde0e20cf6792788be6af7
2012-10-03fix uninitialized value in multi-res encodingJohn Koleszar
If a parent mb is available but is intra coded, then parent_ref_mv is invalid. Check that the parent is inter coded before trying to access the parent_ref_mv. Previously the parent_ref_mv was being read from an uninitialized stack allocation, causing potential OOB reads and other undefined behavior. Change-Id: I0c93cd412a19c3a184bcf6decaa145b3a036a6c0
2012-08-21Add biasing to ZEROMV for videos with static backgroundYunqing Wang
For videos with big static background(such as video conferencing clips), the mode decision was biased to ZEROMV in order to obtain a stable background. The percentage of ZEROMV on last frame was used to predict if there is static area in current frame, and checking already-encoded neighboring macroblocks' motion vectors to make sure the local area has low motion. Change-Id: I05b3241d3a56a0bda88b6681e5646c1c8baf2e57
2012-08-20static threshold fix for realtimeJim Bankoski
This code allows us to skip encoding if the sse is less than the error we could possibly encode. Change-Id: Iefb590dc0ee30b660495218398c7969f7d5fd19f
2012-08-02Pass B_PREDICTION_MODE to intra4x4_predictJohann
Use the correct type when calling and inside the function. Change-Id: Idbaf1bf58b9574f0cba73d78780e9aedd8889dfd
2012-08-01Rename vp8_intra4x4_predict_dJohann
predict_d has become canonical. Remove previous helper function. Disable ARM assembly pending update. Change-Id: Idd84ac8a28f9b0221ea97904a77de1e705d06a7d
2012-08-01Use intra4x4_predict_d parameter namesJohann
Rename the local variables for consistency. Change-Id: Ic202ff54551332f706d97da9b67b2e0959ee7f61
2012-08-01Change vp8_intra4x4_predict call sitesJohann
Use the _d variant from the decoder. It moves the pointer calculations to the caller. Change-Id: Iae2a793433ef082980a3ffa0a1cabf0264a6a24d
2012-07-26multi-res: add drop_frame supportYunqing Wang
Added drop_frame support in multi-resolution encoder. If one frame is dropped at a lower-resolution level, the next upper-resolution level encoder needs to encode that frame independently without any lower-resolution level motion information. Another issue is that if one frame is dropped at some but not all resolution levels, a frame after that one may use different set of reference frames at different resolution levels. This reference frame asynchronization could degrade motion search precision in upper-resolution level encoding, which uses lower-resolution level motion result. This change compares the lower-resolution and upper- resolution level's reference frames. If they are not the same, the upper-resolution level encoder can not use lower-resolution level motion result. Change-Id: I61afa4f313630e75b7cbdd5742e230e8724a988a
2012-06-11Fix pedantic compiler warningsJohn Koleszar
Allows building the library with the gcc -pedantic option, for improved portabilty. In particular, this commit removes usage of C99/C++ style single-line comments and dynamic struct initializers. This is a continuation of the work done in commit 97b766a46, which removed most of these warnings for decode only builds. Change-Id: Id453d9c1d9f44cc0381b10c3869fabb0184d5966
2012-05-24fix denoiser for temporal patterns and rdJim Bankoski
This extends the denoiser to work for temporally scalable coding. I believe this also fixes a very rare but really bad bug in the original implementation. Change-Id: I8b3593a8c54b86eb76f785af1970935f7d56262a
2012-05-22Merge "multi-res: force Key frame sychronization"Yunqing Wang
2012-05-16multi-res: force Key frame sychronizationYunqing Wang
In multi-resolution encoding, frame_type decision for each frame is made by the lowest-resolution encoder. For all other higher- resolution encoders, kf_mode is always set to VPX_KF_DISABLED, and they are forced to use the same frame_type picked by the lowest-resolution encoder. Change-Id: Ic4d52ec65bbc012ca9c2d236210e28a295591eaf
2012-05-11fix warnings for building on win32Scott Graham
Change-Id: If6e11ba3d681e831d7d98662c0abdd2ac16b3811
2012-04-23Shares one set of RD costs tables between all encoding threadsAttila Nagy
RD costs were local to MACROBLOCK data and had to be copied all the time to each thread's MACROBLOCK data. Tables moved to a common place and only pointers are setup for each encoding thread. vp8_cost_tokens() generates 'int' costs so changed all types to be int (i.e. removed unsigned). NOTE: Could do some more cleaning in vp8cx_init_mbrthread_data(). Change-Id: Ifa4de4c6286dffaca7ed3082041fe5af1345ddc0
2012-03-26Removed duplicate vp8_build_intra_predictors_mb y/uvScott LaVarnway
Added y/uv stride as a parameter and remove the duplicate code. Change-Id: I019117a9dd9659a09d3d4e845d4814d3f33341b5
2012-03-13Merge "Adds a motion compensated temporal denoiser to the encoder."Jim Bankoski
2012-03-13Adds a motion compensated temporal denoiser to the encoder.Stefan Holmer
Some refactoring in rdopt.c and pickinter.c. Change-Id: I4f50020eb3313c37f4d441d708fedcaf219d3038
2012-03-05Move SAD and variance functions to commonJohann
The MFQE function of the postprocessor depends on these Change-Id: I256a37c6de079fe92ce744b1f11e16526d06b50a
2012-02-28Eliminated reconintra_mt.cScott LaVarnway
Reworked the code to use vp8_build_intra_predictors_mby_s, vp8_intra_prediction_down_copy, and vp8_intra4x4_predict_d_c functions instead. vp8_intra4x4_predict_d_c is a decoder-only version of vp8_intra4x4_predict. Future commits will fix this code duplication. Change-Id: Ifb4507103b7c83f8b94a872345191c49240154f5
2012-02-06Merge "Allow to skip highest-resolution encoding in multi-resolution encoder"Yunqing Wang
2012-02-03Allow to skip highest-resolution encoding in multi-resolution encoderYunqing Wang
Sometimes, a user doesn't have enough bandwidth to send high-resolution (i.e. HD) video even though the camera catches HD video. This change allowed users to skip highest-resolution encoding by setting that level's target bit rate to 0. To test it, modify the following line in vp8_multi_resolution_encoder.c. unsigned int target_bitrate[NUM_ENCODERS]={1400, 500, 100}; To skip the highest-resolution level, change it to unsigned int target_bitrate[NUM_ENCODERS]={0, 500, 100}; To skip the first and second highest resolution levels, change it to unsigned int target_bitrate[NUM_ENCODERS]={0, 0, 100}; This change also fixed a small problem in mapping, which slightly helped quality and performance. Change-Id: I977bae9a9fbfba85c8be4bd5af01539f2b84bc81
2012-02-02Moved ref_frame_cost from MACROBLOCKD to MACROBLOCKScott LaVarnway
Change-Id: I05788522e9cde4322cfb12032483bdbf184bdf0b
2012-01-31BLOCKD structure cleanupScott LaVarnway
Removed redundancies. All of the information can be found in the MACROBLOCKD structure. Change-Id: I7556392c6f67b43bef2a5e9932180a737466ef93
2012-01-30RTCD: add arnr functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. It removes the last of the VP8_ENCODER_RTCD struct references. Change-Id: I2a44f52d7cccf5177e1ca98a028ead570d045395
2012-01-30RTCD: add variance functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. Change-Id: Ie5c1aa480637e98dc3918fb562ff45c37a66c538
2012-01-30RTCD: add recon functionsJohn Koleszar
This commit continues the process of converting to the new RTCD system. Change-Id: I9bfcf9bef65c3d4ba0fb9a3e1532bad1463a10d6
2012-01-26Correct clamping in use of vp8_find_near_mvs()John Koleszar
Commit e06c242ba introduced a change to call vp8_find_near_mvs() only once instead of once per reference frame by observing that the only effect that the frame had was on the bias applied to the motion vector. By keeping track of the sign_bias value, the mv to use could be flip-flopped by multiplying its components by -1. This behavior was subtley wrong in the case when clamping was applied to the motion vectors found by vp8_find_near_mvs(). A motion vector could be in-bounds with one sign bias, but out of bounds after inverting the sign, or vice versa. The clamping must match that done by the decoder. This change modifies vp8_find_near_mvs() to remove the clamping from that function. The vp8_pick_inter_mode() and vp8_rd_pick_inter_mode() functions instead track the correctly clamped values for both bias values, switching between them by simple assignment. The common clamping and inversion code is in vp8_find_near_mvs_bias() Change-Id: I17e1a348d1643497eca0be232e2fbe2acf8478e1
2012-01-18Merge changes I1ebe76aa,Ia079b52bJohn Koleszar
* changes: rdopt/pickinter: factor out some common setup rdopt: remove unused frame_lf_or_gf
2012-01-11rdopt/pickinter: factor out some common setupJohn Koleszar
Add new get_predictor_pointers() and get_reference_search_order() functions for code shared between the two implementations. Change-Id: I1ebe76aa8f168b1f5cfabc00d05d8f19a0d4d207
2012-01-03Merge "Remove useless g_common.h"Scott LaVarnway
2011-12-22Remove unnecessary ternary constructsJohn Koleszar
The code had a number of constructs like (condition)?1:0, which is redundant with C's semantics. In the cases where a boolean operator was used in the condition, simply remove the ternary part. Otherwise adjust the surrounding expression to remove the condition (eg, for rounding up. See pickinter.c and rdopt.c) Change-Id: Icb2372defa3783cf31857d90b2630d06b2c7e1be