aboutsummaryrefslogtreecommitdiff
path: root/source/rotate_common.cc
diff options
context:
space:
mode:
authorFrank Barchard <fbarchard@google.com>2023-01-04 14:27:04 -0800
committerlibyuv LUCI CQ <libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-01-04 23:11:52 +0000
commit6e4b0acb4b3d5858c77a044aad46132998ac4a76 (patch)
tree311527482deeaa517aee2c01e8f004e63ca3c602 /source/rotate_common.cc
parentf8626a72248f7063c9bf3bbe96333a4af6e8b36f (diff)
downloadlibyuv-6e4b0acb4b3d5858c77a044aad46132998ac4a76.tar.gz
I422Rotate take stride for temporary buffers
- Minor variable name changes first/last to top/bottom - Comments explaining rotate temporary buffers usage - Add asserts for scale parameter - Use NULL and stddef.h instead of 0 - Use void * for allocation in row.h - Add () around size parameter in macros Bug: libyuv:926, libyuv:949 Change-Id: Ib55417570926ccada0a0f8abd1753dc12e5b162e Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4136762 Reviewed-by: Wan-Teh Chang <wtc@google.com> Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'source/rotate_common.cc')
-rw-r--r--source/rotate_common.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/rotate_common.cc b/source/rotate_common.cc
index f24accfb..2617c01b 100644
--- a/source/rotate_common.cc
+++ b/source/rotate_common.cc
@@ -94,8 +94,8 @@ void TransposeUVWxH_C(const uint8_t* src,
for (i = 0; i < width * 2; i += 2) {
int j;
for (j = 0; j < height; ++j) {
- dst_a[j + ((i >> 1) * dst_stride_a)] = src[i + (j * src_stride)];
- dst_b[j + ((i >> 1) * dst_stride_b)] = src[i + (j * src_stride) + 1];
+ dst_a[((i >> 1) * dst_stride_a) + j] = src[i + (j * src_stride)];
+ dst_b[((i >> 1) * dst_stride_b) + j] = src[i + (j * src_stride) + 1];
}
}
}