Skip to content

Draft PR for the bokeh blur effect#837

Closed
Sergio0694 wants to merge 9 commits intoSixLabors:masterfrom
Sergio0694:feature_bokeh-blur
Closed

Draft PR for the bokeh blur effect#837
Sergio0694 wants to merge 9 commits intoSixLabors:masterfrom
Sergio0694:feature_bokeh-blur

Conversation

@Sergio0694
Copy link
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

This is a draft PR for the bokeh blur effect.
I've added a BokehBlurExtensions class, as well as a BokehBlurProcessor class.
For now I've pretty much done a 1:1 port from the Python code, and the actual convolution execution is not implemented.
The python version uses the complex64 type, which uses two 32-bits floats for the components, and the C# Complex type instead uses two double values. We should consider writing our own Complex64 struct with two floats, to save half the memory usage (and get a speed bump).
Also, some of the preprocessing code might use some optimizations later on (eg. either some parallelization, or a switch to unsafe code to reduce the overhead of iterators and whatnot) if this can lead to a noticeable advantage (will need some benchmarks to test this).

@CLAassistant
Copy link

CLAassistant commented Feb 19, 2019

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Feb 19, 2019

Codecov Report

Merging #837 into master will decrease coverage by 0.21%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #837      +/-   ##
==========================================
- Coverage   88.87%   88.66%   -0.22%     
==========================================
  Files        1015     1018       +3     
  Lines       44240    44348     +108     
  Branches     3202     3207       +5     
==========================================
  Hits        39319    39319              
- Misses       4200     4308     +108     
  Partials      721      721
Impacted Files Coverage Δ
src/ImageSharp/Primitives/Rational.cs 85.29% <ø> (ø) ⬆️
src/ImageSharp/Primitives/Complex64.cs 0% <0%> (ø)
src/ImageSharp/Processing/BokehBlurExtensions.cs 0% <0%> (ø)
...ssing/Processors/Convolution/BokehBlurProcessor.cs 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f3658d...c150df9. Read the comment docs.

@Sergio0694 Sergio0694 closed this Feb 20, 2019
@Sergio0694 Sergio0694 deleted the feature_bokeh-blur branch February 22, 2019 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants