summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_denoiser.c
AgeCommit message (Collapse)Author
2015-02-20Remove a few unneccessary multiplications in denoiser.Marco
Change-Id: I3edbb7cc67203fbbf32c6fd4a08015ca9d9ed53e
2015-01-28Fix to vp9 denoiser.Marco
Prevent from using wrong mv for denoiser motion compensation. Change-Id: Ifa0f9daabdbdab0900d3c17304059fe0d15de914
2015-01-21Fix compile error in Chromium building.JackyChen
The comparison of address in the condition is not necessary, since they will constantly be non-null. Change-Id: Id0b0075283f5af65215d5761a8160a4cb2a15c9b
2015-01-16Fix frame buffer swap in denoiserJingning Han
This commit fixes a bug in denoiser reference frame buffer swap, which disables frame buffer update. Change-Id: I39a9427180fd18f9692602064ad821f7af4714c0
2015-01-08Refactor mc reference block fetch in denoiserJingning Han
This commit refactors the motion compensated reference block fetch process in denoiser. It skips the stage that generates motion compensated reference block if denoiser decides to use copy block mode. For high motion clips, this could speed up the denoising process by about 10%. Change-Id: I8ef4fa5fe766a8c4529119b9ec01faefb3d4ef53
2015-01-08Use lookup table to find pixel numbers in blockJingning Han
This could save one multiplication in each threshold funtion called by the denoiser per block. Change-Id: I35f437e09999f0a087180878ef7805f0d86e5819
2015-01-08Merge "Refactor denoiser frame buffer update"Jingning Han
2015-01-08Merge "Initalize zeromv_sse and newmv_sse in vp9_pick_inter_mode"Jingning Han
2015-01-07Refactor denoiser frame buffer updateJingning Han
Use frame buffer pointer swap instead of memcpy when possible. These two CLs make the denoiser when running on vidyo1 720p at speed -6 over 10% faster. Change-Id: I64fe8a2422cafca6787a50c7f4dfb961191c0a9d
2015-01-07Use vp9_convolve_copy in denoiser outputJingning Han
Replace copy_block with vp9_convolve_copy for speed performance improvement. Change-Id: I3a08c4d01dff2253b6ee573efd02f65ccdc1b5a5
2015-01-07Initalize zeromv_sse and newmv_sse in vp9_pick_inter_modeJingning Han
These two parameters are used to control the denoiser cut-off thresholds. They should be properly initialized when starting mode search of a given block. Change-Id: Iba8a25487026a0dbe0d350c347d7e4e4e237b637
2015-01-07Fix denoiser chroma component initializationJingning Han
Use the correct frame size and stride value for chroma components when setting the initial values. These control parameters are assigned when the denoiser buffer was allocated and initialized. Change-Id: Ia6318194c7738aff540bcbd34f77f0dac46221a1
2015-01-07Skip duplicate denoiser frame buffer allocationJingning Han
Allocate the frame buffer allocation for denoiser once during the encoder initialization. This avoids allocating frame buffer multiple times and overwriting the buffer pointer without proper releasing. Change-Id: I9b3baa6283449d86fd164534d344c036bb035700
2014-12-15Revert "Revert "Add support for setting byte alignment.""Frank Galligan
This reverts commit 91471d6aad285ff10e7582e485d8adadd1986fe2. Fixes the compile issues if post_proc is enabled. Change-Id: Ib40a15ce2c194f9b5adfa65a17ab01ddf60f5a59
2014-12-15Revert "Add support for setting byte alignment."Paul Wilkins
Fails to compile. Bad calls to vp9_alloc_frame_buffer and vp9_realloc_frame_buffer in postproc.c This reverts commit 399823b6f50fb7465f62822d1395e2192e7b07fc. Change-Id: I29f0e173f8e185d3a303cfdb17813e1eccb51e3a
2014-12-12Add support for setting byte alignment.Frank Galligan
Add support for setting byte alignment on the Y, U, and V plane of the reference buffers. The byte alignment must be a power of 2, from 32 to 1024. A value of 0 sets legacy alignment. Change-Id: I7c1399622f7aa68e123646369216b32047dda73d
2014-10-06Add SSE2 code and unit test for VP9 denoiser.JackyChen
This SSE2 is based on VP8 denoiser's SSE2 code. In VP8, there are only 16x16 blocks in denoiser, while in VP9, there are 13 different block sizes. By adding this SSE2 code, the improvement of encoder speed is around 20%(using C code vs using SSE2 code), vary for different clips. The unit test for VP9 denoiser is to confirm that the SSE2 code is bit-exact with the C code. The unit test covers all block size. Change-Id: Ic8d8ac26db4ea40a5f146b5678a065af07eaaa3d
2014-09-29Fix a bug in calculating delta in VP9 denoiser.JackyChen
When calculating delta in VP8 denoiser, since the block size is fixed to 16x16, the divisor is 256, which is the number of the pixel. But in VP9, the block size varies, the divisor should correspond to the block size. Change-Id: Ibdc1e5d23ba8c788b0d0dc6d406bcdfc34c1b142
2014-09-19Remove mi_grid_* structures.hkuang
mi_grid_* are arrays of pointer to pointer. They save the pointers that point to the MIs in cm->mi. But they are unnecessary and complicated. The original goal was to remove MODE_INFO_t copy. But with an extra MODE_INFO_t pointer inside MODE_INFO_t, same goal could be achieved. This commit totally removes the mi_grid_* structures. But there are still many dummy MODE_INFO_t inside cm->mi which are a waste of memory. Next commit will do on-demand MODE_INFO_t allocation in order to save these memories. Change-Id: I3a05cf1610679fed26e0b2eadd315a9ae91afdd6
2014-09-10Fix the bug which made VP8 denoiser not bit-exact between C code and SSE code.JackyChen
This issue is found when the denoising mode is set to kDenoiserOnYUVAggressive. Updated the C code to make it the same with SSE version. I also changed several lines in VP9 denoiser for the code style. Change-Id: I640d48cf946fe8c6a400e6e252107501d1e226d3
2014-09-04Map motion magnitude in VP9 denoiser.JackyChen
This is to keep the same with VP8 denoiser. If motion magnitude is small, make denoiser more aggressive. Change-Id: I942a6e2f2ed9aec6f0c4c1f9e5fa47066cadcc0c
2014-09-04Update the condition when COPY_BLOCK is chosen.JackyChen
The change is just to keep the condition the same with VP8. Change-Id: I9662b40996126605945dd853c0cbe8916c1ce578
2014-09-04Fix a bug in VP9 denoiser.JackyChen
When the first try of denoising turns out to be too much, we will use a softer filter by adopting an adjustment to make the result closer to original pixel (as in VP8 denoiser). The old code made the adjustment in the wrong direction. Change-Id: I84e28fa9e01eef47c5a37d5a2e6d3d378a06786b
2014-09-02Adds config opt for highbitdepth + misc. vpxDeb Mukherjee
Adds config parameter vp9_highbitdepth, to support highbitdepth profiles. Also includes most vpx level high bit-depth functions. However encode/decode in the highbitdepth profiles will not work until the rest of the code is in place. Change-Id: I34c53b253c38873611057a6cbc89a1361b8985a6
2014-08-22vp9_denoiser_update_frame_stats: unused parm fixedJim Bankoski
Change-Id: Ic39cc0deafb3ed509434d3d9953b99713de7394a
2014-07-18VP9 denoiser fix: ref frames now updated properlyTim Kopp
The ALT_REF_FRAME is now updated in the case of a KEY_FRAME in the VP9 denoiser. Change-Id: Idf9a9772706f50e774fb240afcc01db38841043c
2014-07-15VP9 Denoiser denoises after mode/bsize searchTim Kopp
In vp8, statistics are collected about the different modes as they are searched. This process is more complicated due to the variable block size. Fields were added to the PICM_MODE_CONTEXT struct to hold this information for each point in the search. The information is then taken from the appropriate part of the tree during denoising. Change-Id: I89261ab77ad637821287ae157dfdf694702b8e77
2014-07-08Vp9 denoiser MC bugfixTim Kopp
In the previous version, only certain buffers in the macroblockd were saved and the restored. In this version, all of the buffers are saved and restored. The code was then rolled into a loop for readability. Also contains a tiny fix for when the -DOUTPUT_YUV_DENOISED flag is used. Change-Id: Id925ef8b3fa122ae88acfa1d9a1e4df45df83518
2014-07-02VP9 denoiser implemented FILTER_BLOCK caseTim Kopp
Renamed updating_running_avg() to filter(). Extended function with the rest of the filter procedure. Made all of the empirically-determined constants used in VP8 into functions so they can be tweaked more easily. Change-Id: I41730c8c92370c76885950a43742347477ca4e7e
2014-07-02VP9 denoising enabled by noise_sensitivity paramTim Kopp
As in VP8. Currently, this parameter is set with the VP8E_SET_NOISE_SENSITIVITY flag. The flag was not renamed so that we don't break the interface for webrtc. This should probably be changed at some point in the future. Change-Id: Ic73fcb0dde9d1d019e9d042050b617333ac65472
2014-07-02Replaced loops with vpx_memcpy()Tim Kopp
Change-Id: Icbe05657f0e92c3838e6a5a975f4f82d21328a2e
2014-07-01VP9 denoiser used s/int/enum where appropriateTim Kopp
Change-Id: Id52a7869fd1f31bb060de170e3295da7435adb9e
2014-07-01Denoised output is now grayscaleTim Kopp
Grayscale is conditionally compiled. Change-Id: I482ab237560d0bae8d397fd9999e78d38104f2a1
2014-06-27Implemented motion compensation for VP9 denoiserTim Kopp
Change-Id: Iee21eb0ecc5a1fe2c56fb3df0cee0ead6d139ed1
2014-06-27VP9 denoiser: implemented update_frame_stats()Tim Kopp
Also added reset_frame_stats() Change-Id: I8e6ca00dbd5fa85cd39485d81c9343c0ff207d6c
2014-06-20Fixed VP9 denoiser COPY_BLOCK caseTim Kopp
Now copies the src to the correct location in the running average buffer. Change-Id: I9c83c96dc7a97f42c8df16ab4a9f18b733181f34
2014-06-20VP9 denoiser bugfixesTim Kopp
s/stdint.h/vpx\/vpx_int.h Added missing 'break;'s Also included other minor changes, mostly cosmetic. Change-Id: I852bba3e85e794f1d4af854c45c16a23a787e6a3
2014-06-19Fixes in VP9 alloc, free, and COPY_FRAME caseTim Kopp
Change-Id: I1216f17e2206ef521fe219b6d72d8e41d1ba1147
2014-06-19Improved vp9 denoiser running avg update.Tim Kopp
Change-Id: Ie0aa41fb7957755544321897b3bb2dd92f392027
2014-06-19Implemented COPY_BLOCK case for vp9 denoiserTim Kopp
Change-Id: Ie89ad1e3aebbd474e1a0db69c1961b4d1ddcd33e
2014-06-18Changed buf_2ds in vp9 denoiser to YV12 buffersTim Kopp
Changed alloc, free, and running average code as necessary. Change-Id: Ifc4d9ccca462164214019963b3768a457791b9c1
2014-06-18Update running avg for VP9 denoiserTim Kopp
Change-Id: I9577d648542064052795bf5770428fbd5c276b7b
2014-06-18Implemented vp9_denoiser_{alloc,free}()Tim Kopp
Change-Id: I79eba79f7c52eec19ef2356278597e06620d5e27
2014-06-12Added skeleton for VP9 denoiserTim Kopp
Change-Id: Iccf6ede4c4f85646b0f8daec47050ce93e267c90