1 #ifndef DALI_INTERNAL_ADAPTOR_GAUSSIAN_BLUR_H
2 #define DALI_INTERNAL_ADAPTOR_GAUSSIAN_BLUR_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 #include <dali/internal/imaging/common/pixel-buffer-impl.h>
29 * Perform a one dimension Gaussian blur convolution and write its output buffer transposed.
31 * @param[in] inBuffer The input buffer with the source image
32 * @param[in] outBuffer The output buffer with the Gaussian blur applied and transposed
33 * @param[in] bufferWidth The width of the buffer
34 * @param[in] bufferHeight The height of the buffer
35 * @param[in] blurRadius The radius for Gaussian blur
37 void ConvoluteAndTranspose(unsigned char* inBuffer, unsigned char* outBuffer, const unsigned int bufferWidth, const unsigned int bufferHeight, const float blurRadius);
40 * Perform Gaussian blur on a buffer.
42 * A Gaussian blur is generated by replacing each pixel’s color values with the average of the surrounding pixels’
43 * colors. This region is a circle with the given radius. Thus, a bigger radius yields a blurrier image.
45 * @note The pixel format of the buffer must be RGBA8888
47 * @param[in] buffer The buffer to apply the Gaussian blur to
48 * @param[in] blurRadius The radius for Gaussian blur
50 void PerformGaussianBlurRGBA(PixelBuffer& buffer, const float blurRadius);
54 } //namespace Internal
58 #endif // DALI_INTERNAL_ADAPTOR_GAUSSIAN_BLUR_H