ARM NEON Compositor  master
Fast SIMD alpha overlay and blending for ARM
overlay_alpha.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cstddef> // size_t
4 #include <cstdint> // uint8_t
5 
7 
10 
47 template <RescaleType rescale_type = RescaleType::Div255_Round>
48 void overlay_alpha_fast(const uint8_t *bg_img, const uint8_t *fg_img,
49  uint8_t *out_img, size_t n);
50 
107 template <RescaleType rescale_type = RescaleType::Div255_Round>
108 void overlay_alpha_stride(const uint8_t *bg_img, const uint8_t *fg_img,
109  uint8_t *out_img, size_t bg_full_cols, size_t fg_rows,
110  size_t fg_cols, size_t fg_full_cols);
111 
119 inline void overlay_alpha_stride(const uint8_t (&bg_img)[4],
120  const uint8_t (&fg_img)[4],
121  uint8_t (&out_img)[4], size_t bg_full_cols,
122  size_t fg_rows, size_t fg_cols,
123  size_t fg_full_cols) {
124  overlay_alpha_stride(&bg_img[0], &fg_img[0], &out_img[0], bg_full_cols,
125  fg_rows, fg_cols, fg_full_cols);
126 }
127 
128 /// @}
perf_test.fg_img
fg_img
Definition: perf_test.py:113
overlay_alpha_stride
void overlay_alpha_stride(const uint8_t *bg_img, const uint8_t *fg_img, uint8_t *out_img, size_t bg_full_cols, size_t fg_rows, size_t fg_cols, size_t fg_full_cols)
Overlay a smaller image with an alpha channel over a larger background image.
Definition: src/alpha-lib/src/overlay_alpha.cpp:124
perf_test.out_img
out_img
Definition: perf_test.py:114
rescale_type.hpp
perf_test.bg_img
bg_img
Definition: perf_test.py:112
overlay_alpha_fast
void overlay_alpha_fast(const uint8_t *bg_img, const uint8_t *fg_img, uint8_t *out_img, size_t n)
Fast function to overlay two images of the same size, where the number of pixels is a multiple of 8.
Definition: src/alpha-lib/src/overlay_alpha.cpp:101