@@ -75,7 +75,7 @@ std::string PrintChannel(const HeifPixelImage& image, heif_channel channel) {
75
75
uint32_t max_rows = 10 ;
76
76
uint32_t width = std::min (image.get_width (channel), max_cols);
77
77
uint32_t height = std::min (image.get_height (channel), max_rows);
78
- uint32_t stride;
78
+ size_t stride;
79
79
const T* p = (T*)image.get_plane (channel, &stride);
80
80
stride /= (int )sizeof (T);
81
81
int bpp = image.get_bits_per_pixel (channel);
@@ -127,8 +127,8 @@ double GetPsnr(const HeifPixelImage& original, const HeifPixelImage& compressed,
127
127
return 0 ;
128
128
}
129
129
130
- uint32_t orig_stride;
131
- uint32_t compressed_stride;
130
+ size_t orig_stride;
131
+ size_t compressed_stride;
132
132
const T* orig_p = (T*)original.get_plane (channel, &orig_stride);
133
133
const T* compressed_p = (T*)compressed.get_plane (channel, &compressed_stride);
134
134
orig_stride /= (int )sizeof (T);
@@ -301,7 +301,7 @@ void TestConversion(const std::string& test_name, const ColorState& input_state,
301
301
CHECK (out_image->has_alpha () == target_state.has_alpha );
302
302
for (const Plane& plane : GetPlanes (target_state, width, height)) {
303
303
INFO (" Channel: " << plane.channel );
304
- uint32_t stride;
304
+ size_t stride;
305
305
CHECK (out_image->get_plane (plane.channel , &stride) != nullptr );
306
306
CHECK (out_image->get_bits_per_pixel (plane.channel ) ==
307
307
target_state.bits_per_pixel );
@@ -612,7 +612,7 @@ static void fill_plane(std::shared_ptr<HeifPixelImage>& img, heif_channel channe
612
612
auto error = img->add_plane (channel, w, h, 8 , nullptr );
613
613
REQUIRE (!error);
614
614
615
- uint32_t stride;
615
+ size_t stride;
616
616
uint8_t * p = img->get_plane (channel, &stride);
617
617
618
618
for (int y = 0 ; y < h; y++) {
@@ -629,7 +629,7 @@ static void assert_plane(std::shared_ptr<HeifPixelImage>& img, heif_channel chan
629
629
uint32_t w = img->get_width (channel);
630
630
uint32_t h = img->get_height (channel);
631
631
632
- uint32_t stride;
632
+ size_t stride;
633
633
uint8_t * p = img->get_plane (channel, &stride);
634
634
635
635
for (uint32_t y = 0 ; y < h; y++) {
@@ -704,7 +704,7 @@ TEST_CASE("RGB 5-6-5 to RGB")
704
704
705
705
uint8_t v = 1 ;
706
706
for (heif_channel plane: {heif_channel_R, heif_channel_G, heif_channel_B}) {
707
- uint32_t dst_stride = 0 ;
707
+ size_t dst_stride = 0 ;
708
708
uint8_t *dst = img->get_plane (plane, &dst_stride);
709
709
for (uint32_t y = 0 ; y < height; y++) {
710
710
for (uint32_t x = 0 ; x < width; x++) {
0 commit comments