Skip to content

Add new Spot Remover filter.#373

Merged
ddennedy merged 1 commit intomltframework:masterfrom
bmatherly:spot_remover_2
Oct 15, 2018
Merged

Add new Spot Remover filter.#373
ddennedy merged 1 commit intomltframework:masterfrom
bmatherly:spot_remover_2

Conversation

@bmatherly
Copy link
Copy Markdown
Member

This filter implements a similar capability as the avfilter.delogo filter. However, I did not port the code from delogo because I didn't really understand it. So the exact interpolation algorithm is different.

Unlike delogo, this filter supports keyframes. Also, it does not crash if the rectangle is outside of the active video.

uint8_t* xValueL = chan + ( y * rowSize ) + ( ( (int)rect.x - 1 ) * step );
uint8_t* xValueR = xValueL + ( (int)rect.w * step );
uint8_t* p = chan + ( y * rowSize ) + ( (int)rect.x * step );
float yRatio = 1.0 - ( ( y - rect.y ) / rect.h );
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nitpick, but I would have chosen double here especially since the literal value 1.0 is double. Add 'f' after a literal numeric to make it float.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Fixed it here 8dd6f12 along with another typo:

@ddennedy ddennedy merged commit e9a5f95 into mltframework:master Oct 15, 2018
@ddennedy ddennedy added this to the v6.12.0 milestone Oct 15, 2018
@bmatherly bmatherly deleted the spot_remover_2 branch November 17, 2018 23:43
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