@@ -79,7 +79,8 @@ Result<std::shared_ptr<HeifPixelImage>>
79
79
Op_YCbCr444_to_YCbCr420_average<Pixel>::convert_colorspace(const std::shared_ptr<const HeifPixelImage>& input,
80
80
const ColorState& input_state,
81
81
const ColorState& target_state,
82
- const heif_color_conversion_options& options) const
82
+ const heif_color_conversion_options& options,
83
+ const heif_security_limits* limits) const
83
84
{
84
85
bool hdr = !std::is_same<Pixel, uint8_t >::value;
85
86
@@ -129,14 +130,14 @@ Op_YCbCr444_to_YCbCr420_average<Pixel>::convert_colorspace(const std::shared_ptr
129
130
uint32_t cwidth = (width + 1 ) / 2 ;
130
131
uint32_t cheight = (height + 1 ) / 2 ;
131
132
132
- if (auto err = outimg->add_plane2 (heif_channel_Y, width, height, bpp_y) ||
133
- outimg->add_plane2 (heif_channel_Cb, cwidth, cheight, bpp_cb) ||
134
- outimg->add_plane2 (heif_channel_Cr, cwidth, cheight, bpp_cr)) {
133
+ if (auto err = outimg->add_plane (heif_channel_Y, width, height, bpp_y, limits ) ||
134
+ outimg->add_plane (heif_channel_Cb, cwidth, cheight, bpp_cb, limits ) ||
135
+ outimg->add_plane (heif_channel_Cr, cwidth, cheight, bpp_cr, limits )) {
135
136
return err;
136
137
}
137
138
138
139
if (has_alpha) {
139
- if (auto err = outimg->add_plane2 (heif_channel_Alpha, width, height, bpp_a)) {
140
+ if (auto err = outimg->add_plane (heif_channel_Alpha, width, height, bpp_a, limits )) {
140
141
return err;
141
142
}
142
143
}
@@ -297,7 +298,8 @@ Result<std::shared_ptr<HeifPixelImage>>
297
298
Op_YCbCr444_to_YCbCr422_average<Pixel>::convert_colorspace(const std::shared_ptr<const HeifPixelImage>& input,
298
299
const ColorState& input_state,
299
300
const ColorState& target_state,
300
- const heif_color_conversion_options& options) const
301
+ const heif_color_conversion_options& options,
302
+ const heif_security_limits* limits) const
301
303
{
302
304
bool hdr = !std::is_same<Pixel, uint8_t >::value;
303
305
@@ -347,14 +349,14 @@ Op_YCbCr444_to_YCbCr422_average<Pixel>::convert_colorspace(const std::shared_ptr
347
349
uint32_t cwidth = (width + 1 ) / 2 ;
348
350
uint32_t cheight = height;
349
351
350
- if (auto err = outimg->add_plane2 (heif_channel_Y, width, height, bpp_y) ||
351
- outimg->add_plane2 (heif_channel_Cb, cwidth, cheight, bpp_cb) ||
352
- outimg->add_plane2 (heif_channel_Cr, cwidth, cheight, bpp_cr)) {
352
+ if (auto err = outimg->add_plane (heif_channel_Y, width, height, bpp_y, limits ) ||
353
+ outimg->add_plane (heif_channel_Cb, cwidth, cheight, bpp_cb, limits ) ||
354
+ outimg->add_plane (heif_channel_Cr, cwidth, cheight, bpp_cr, limits )) {
353
355
return err;
354
356
}
355
357
356
358
if (has_alpha) {
357
- if (auto err = outimg->add_plane2 (heif_channel_Alpha, width, height, bpp_a)) {
359
+ if (auto err = outimg->add_plane (heif_channel_Alpha, width, height, bpp_a, limits )) {
358
360
return err;
359
361
}
360
362
}
@@ -491,7 +493,8 @@ Result<std::shared_ptr<HeifPixelImage>>
491
493
Op_YCbCr420_bilinear_to_YCbCr444<Pixel>::convert_colorspace(const std::shared_ptr<const HeifPixelImage>& input,
492
494
const ColorState& input_state,
493
495
const ColorState& target_state,
494
- const heif_color_conversion_options& options) const
496
+ const heif_color_conversion_options& options,
497
+ const heif_security_limits* limits) const
495
498
{
496
499
bool hdr = !std::is_same<Pixel, uint8_t >::value;
497
500
@@ -538,14 +541,14 @@ Op_YCbCr420_bilinear_to_YCbCr444<Pixel>::convert_colorspace(const std::shared_pt
538
541
539
542
outimg->create (width, height, heif_colorspace_YCbCr, heif_chroma_444);
540
543
541
- if (auto err = outimg->add_plane2 (heif_channel_Y, width, height, bpp_y) ||
542
- outimg->add_plane2 (heif_channel_Cb, width, height, bpp_cb) ||
543
- outimg->add_plane2 (heif_channel_Cr, width, height, bpp_cr)) {
544
+ if (auto err = outimg->add_plane (heif_channel_Y, width, height, bpp_y, limits ) ||
545
+ outimg->add_plane (heif_channel_Cb, width, height, bpp_cb, limits ) ||
546
+ outimg->add_plane (heif_channel_Cr, width, height, bpp_cr, limits )) {
544
547
return err;
545
548
}
546
549
547
550
if (has_alpha) {
548
- if (auto err = outimg->add_plane2 (heif_channel_Alpha, width, height, bpp_a)) {
551
+ if (auto err = outimg->add_plane (heif_channel_Alpha, width, height, bpp_a, limits )) {
549
552
return err;
550
553
}
551
554
}
@@ -768,7 +771,8 @@ Result<std::shared_ptr<HeifPixelImage>>
768
771
Op_YCbCr422_bilinear_to_YCbCr444<Pixel>::convert_colorspace(const std::shared_ptr<const HeifPixelImage>& input,
769
772
const ColorState& input_state,
770
773
const ColorState& target_state,
771
- const heif_color_conversion_options& options) const
774
+ const heif_color_conversion_options& options,
775
+ const heif_security_limits* limits) const
772
776
{
773
777
bool hdr = !std::is_same<Pixel, uint8_t >::value;
774
778
@@ -815,14 +819,14 @@ Op_YCbCr422_bilinear_to_YCbCr444<Pixel>::convert_colorspace(const std::shared_pt
815
819
816
820
outimg->create (width, height, heif_colorspace_YCbCr, heif_chroma_444);
817
821
818
- if (auto err = outimg->add_plane2 (heif_channel_Y, width, height, bpp_y) ||
819
- outimg->add_plane2 (heif_channel_Cb, width, height, bpp_cb) ||
820
- outimg->add_plane2 (heif_channel_Cr, width, height, bpp_cr)) {
822
+ if (auto err = outimg->add_plane (heif_channel_Y, width, height, bpp_y, limits ) ||
823
+ outimg->add_plane (heif_channel_Cb, width, height, bpp_cb, limits ) ||
824
+ outimg->add_plane (heif_channel_Cr, width, height, bpp_cr, limits )) {
821
825
return err;
822
826
}
823
827
824
828
if (has_alpha) {
825
- if (auto err = outimg->add_plane2 (heif_channel_Alpha, width, height, bpp_a)) {
829
+ if (auto err = outimg->add_plane (heif_channel_Alpha, width, height, bpp_a, limits )) {
826
830
return err;
827
831
}
828
832
}
0 commit comments