From ca728836ffc2aa9f66031459686749263b59c8de Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Wed, 16 Mar 2022 22:38:51 -0700 Subject: [PATCH] Run clang-format --- src/avif.c | 3 ++- src/read.c | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/avif.c b/src/avif.c index 1fb48aacaf..a42a4c612b 100644 --- a/src/avif.c +++ b/src/avif.c @@ -229,7 +229,8 @@ avifResult avifImageSetViewRect(avifImage * dstImage, const avifImage * srcImage if (srcImage->yuvRowBytes[yuvPlane]) { const size_t planeX = (yuvPlane == AVIF_CHAN_Y) ? rect->x : (rect->x >> formatInfo.chromaShiftX); const size_t planeY = (yuvPlane == AVIF_CHAN_Y) ? rect->y : (rect->y >> formatInfo.chromaShiftY); - dstImage->yuvPlanes[yuvPlane] = srcImage->yuvPlanes[yuvPlane] + planeY * srcImage->yuvRowBytes[yuvPlane] + planeX * pixelBytes; + dstImage->yuvPlanes[yuvPlane] = + srcImage->yuvPlanes[yuvPlane] + planeY * srcImage->yuvRowBytes[yuvPlane] + planeX * pixelBytes; dstImage->yuvRowBytes[yuvPlane] = srcImage->yuvRowBytes[yuvPlane]; } } diff --git a/src/read.c b/src/read.c index 88a7bfcf77..bddebc7d3f 100644 --- a/src/read.c +++ b/src/read.c @@ -4062,7 +4062,11 @@ uint32_t avifDecoderNearestKeyframe(const avifDecoder * decoder, uint32_t frameI } // Returns the number of available rows in decoder->image given a color or alpha subimage. -static uint32_t avifGetDecodedRowCount(const avifDecoder * decoder, const avifImageGrid * grid, uint32_t firstTileIndex, uint32_t tileCount, uint32_t decodedTileCount) +static uint32_t avifGetDecodedRowCount(const avifDecoder * decoder, + const avifImageGrid * grid, + uint32_t firstTileIndex, + uint32_t tileCount, + uint32_t decodedTileCount) { if (decodedTileCount == tileCount) { return decoder->image->height; @@ -4083,8 +4087,11 @@ static uint32_t avifGetDecodedRowCount(const avifDecoder * decoder, const avifIm uint32_t avifDecoderDecodedRowCount(const avifDecoder * decoder) { - const uint32_t colorRowCount = - avifGetDecodedRowCount(decoder, &decoder->data->colorGrid, /*firstTileIndex=*/0, decoder->data->colorTileCount, decoder->data->decodedColorTileCount); + const uint32_t colorRowCount = avifGetDecodedRowCount(decoder, + &decoder->data->colorGrid, + /*firstTileIndex=*/0, + decoder->data->colorTileCount, + decoder->data->decodedColorTileCount); const uint32_t alphaRowCount = avifGetDecodedRowCount(decoder, &decoder->data->alphaGrid, /*firstTileIndex=*/decoder->data->colorTileCount,