Cleanup: Deduplicate finv_test function

This commit is contained in:
2022-01-11 02:16:24 -05:00
parent d608b98145
commit bc02ede98b
4 changed files with 5 additions and 15 deletions

View File

@@ -85,11 +85,6 @@ void GaussianAlphaBlurBaseOperation::get_area_of_interest(const int input_idx,
}
}
BLI_INLINE float finv_test(const float f, const bool test)
{
return (LIKELY(test == false)) ? f : 1.0f - f;
}
void GaussianAlphaBlurBaseOperation::update_memory_buffer_partial(MemoryBuffer *output,
const rcti &area,
Span<MemoryBuffer *> inputs)

View File

@@ -55,6 +55,11 @@ class GaussianAlphaBlurBaseOperation : public BlurBaseOperation {
{
falloff_ = falloff;
}
BLI_INLINE float finv_test(const float f, const bool test)
{
return (LIKELY(test == false)) ? f : 1.0f - f;
}
};
} // namespace blender::compositor

View File

@@ -71,11 +71,6 @@ void GaussianAlphaXBlurOperation::update_gauss()
}
}
BLI_INLINE float finv_test(const float f, const bool test)
{
return (LIKELY(test == false)) ? f : 1.0f - f;
}
void GaussianAlphaXBlurOperation::execute_pixel(float output[4], int x, int y, void *data)
{
const bool do_invert = do_subtract_;

View File

@@ -73,11 +73,6 @@ void GaussianAlphaYBlurOperation::update_gauss()
}
}
BLI_INLINE float finv_test(const float f, const bool test)
{
return (LIKELY(test == false)) ? f : 1.0f - f;
}
void GaussianAlphaYBlurOperation::execute_pixel(float output[4], int x, int y, void *data)
{
const bool do_invert = do_subtract_;