3#include <bnb/types/full_image.hpp>
4#include <bnb/utils/stdrestrict.hpp>
9 using memory_deletter = std::function<void()>;
11 full_image_t make_full_image_from_rgb_planes(
13 const image_format& image_format,
14 const uint8_t* r_buffer, uint32_t r_row_stride, uint32_t r_pixel_stride,
15 const uint8_t* g_buffer, uint32_t g_row_stride, uint32_t g_pixel_stride,
16 const uint8_t* b_buffer, uint32_t b_row_stride, uint32_t b_pixel_stride
20 full_image_t make_full_image_from_nonplanar_bpc8_no_copy(
21 const image_format& image_format,
22 const bpc8_image_t::pixel_format_t pixel_format,
25 memory_deletter free_memory
28 full_image_t make_full_image_from_yuv_planes(
30 const image_format& image_format,
31 const std::vector<uint8_t>& y_buffer, uint32_t y_row_stride, uint32_t y_pixel_stride,
32 const std::vector<uint8_t>& u_buffer, uint32_t u_row_stride, uint32_t u_pixel_stride,
33 const std::vector<uint8_t>& v_buffer, uint32_t v_row_stride, uint32_t v_pixel_stride,
38 full_image_t make_full_image_from_yuv_planes(
40 const image_format& image_format,
41 const uint8_t* restrict y_buffer, uint32_t y_row_stride, uint32_t y_pixel_stride,
42 const uint8_t* u_buffer, uint32_t u_row_stride, uint32_t u_pixel_stride,
43 const uint8_t* v_buffer, uint32_t v_row_stride, uint32_t v_pixel_stride,
48 full_image_t make_full_image_from_biplanar_yuv(
50 const image_format& image_format,
51 const std::vector<uint8_t>& lumo_buffer, uint32_t lumo_row_stride,
52 const std::vector<uint8_t>& chromo_buffer, uint32_t chromo_row_stride,
57 full_image_t make_full_image_from_biplanar_yuv(
59 const image_format& image_format,
60 const uint8_t* restrict lumo_buffer, uint32_t lumo_row_stride,
61 const uint8_t* restrict chromo_buffer, uint32_t chromo_row_stride,
66 full_image_t make_full_image_from_biplanar_yuv_no_copy(
68 const image_format& image_format,
69 uint8_t* restrict lumo_buffer, uint32_t lumo_row_stride, memory_deletter free_lumo,
70 uint8_t* restrict chromo_buffer, uint32_t chromo_row_stride, memory_deletter free_chromo,
75 full_image_t make_full_image_from_yuv_planes_no_copy(
77 const image_format& image_format,
78 uint8_t* restrict lumo_buffer, uint32_t lumo_row_stride,
79 uint32_t lumo_pixel_stride, memory_deletter free_lumo,
80 uint8_t* restrict chromo_1_buffer, uint32_t chromo_1_row_stride, uint32_t chromo_1_pixel_stride,
81 uint8_t* restrict chromo_2_buffer, uint32_t chromo_2_row_stride, uint32_t chromo_2_pixel_stride,
82 memory_deletter free_chromo_1, memory_deletter free_chromo_2,
87 color_plane convert_bpc8_to_y_plane(
88 const bpc8_image_t& image, uint32_t width, uint32_t height
91 color_plane convert_bpc8_to_uv_plane(
92 const bpc8_image_t& image, uint32_t width, uint32_t height,
bool legacy_yuv =
true
95 full_image_t convert_image_to_yuv(full_image_t input_image,
bool legacy_yuv =
true);
97 color_plane convert_bgr_to_y_plane(
unsigned char const* image, uint32_t width, uint32_t height);
99 color_plane convert_bgr_to_uv_plane(
unsigned char const* image, uint32_t width, uint32_t height);
yuv_format
Enum class represents supported yuv formats.