Skip to content

Commit dc8d99c

Browse files
committed
conversion warnings in codec_svt.c
1 parent 5bf8fa2 commit dc8d99c

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/codec_svt.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
274274
if (alpha) {
275275
input_picture_buffer->y_stride = image->alphaRowBytes / bytesPerPixel;
276276
input_picture_buffer->luma = image->alphaPlane;
277-
input_buffer->n_filled_len = (size_t)image->alphaRowBytes * image->height;
277+
input_buffer->n_filled_len = (uint32_t)((size_t)image->alphaRowBytes * image->height);
278278

279279
#if SVT_AV1_CHECK_VERSION(1, 8, 0)
280280
// Simulate 4:2:0 UV planes. SVT-AV1 does not support 4:0:0 samples.
@@ -302,11 +302,11 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
302302
}
303303
memset(uvPlanes, 0, uvSize);
304304
input_picture_buffer->cb = uvPlanes;
305-
input_buffer->n_filled_len += uvSize;
305+
input_buffer->n_filled_len += (uint32_t)uvSize;
306306
input_picture_buffer->cr = uvPlanes;
307-
input_buffer->n_filled_len += uvSize;
308-
input_picture_buffer->cb_stride = uvWidth;
309-
input_picture_buffer->cr_stride = uvWidth;
307+
input_buffer->n_filled_len += (uint32_t)uvSize;
308+
input_picture_buffer->cb_stride = (uint32_t)uvWidth;
309+
input_picture_buffer->cr_stride = (uint32_t)uvWidth;
310310
#else
311311
// This workaround was not needed before SVT-AV1 1.8.0.
312312
// See https://github.com/AOMediaCodec/libavif/issues/1992.
@@ -315,11 +315,11 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
315315
} else {
316316
input_picture_buffer->y_stride = image->yuvRowBytes[0] / bytesPerPixel;
317317
input_picture_buffer->luma = image->yuvPlanes[0];
318-
input_buffer->n_filled_len = (size_t)image->yuvRowBytes[0] * image->height;
318+
input_buffer->n_filled_len = (uint32_t)((size_t)image->yuvRowBytes[0] * image->height);
319319
input_picture_buffer->cb = image->yuvPlanes[1];
320-
input_buffer->n_filled_len += (size_t)image->yuvRowBytes[1] * uvHeight;
320+
input_buffer->n_filled_len += (uint32_t)((size_t)image->yuvRowBytes[1] * uvHeight);
321321
input_picture_buffer->cr = image->yuvPlanes[2];
322-
input_buffer->n_filled_len += (size_t)image->yuvRowBytes[2] * uvHeight;
322+
input_buffer->n_filled_len += (uint32_t)((size_t)image->yuvRowBytes[2] * uvHeight);
323323
input_picture_buffer->cb_stride = image->yuvRowBytes[1] / bytesPerPixel;
324324
input_picture_buffer->cr_stride = image->yuvRowBytes[2] / bytesPerPixel;
325325
}

0 commit comments

Comments
 (0)