diff options
author | Sergio Garcia Murillo <sergio.garcia.murillo@gmail.com> | 2023-01-04 08:53:51 +0100 |
---|---|---|
committer | libyuv LUCI CQ <libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-01-04 21:10:01 +0000 |
commit | f8626a72248f7063c9bf3bbe96333a4af6e8b36f (patch) | |
tree | e66d03495dd5c81beba3d509a0b7aa90e2f069eb /source/row_common.cc | |
parent | 22a579c438410710f627e67b38b3df9968efafb9 (diff) | |
download | libyuv-f8626a72248f7063c9bf3bbe96333a4af6e8b36f.tar.gz |
Add 10 bit rotate methods.
This initial implementation is based on current unoptimized code in webrtc using just plain for loops.
Bug: libyuv:949
Change-Id: Ic87ee49c3a0b62edbaaa4255c263c1f7be4ea02b
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4110782
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'source/row_common.cc')
-rw-r--r-- | source/row_common.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/row_common.cc b/source/row_common.cc index 3d1e705e..84afd35b 100644 --- a/source/row_common.cc +++ b/source/row_common.cc @@ -2688,6 +2688,19 @@ void MirrorRow_C(const uint8_t* src, uint8_t* dst, int width) { } } +void MirrorRow_16_C(const uint16_t* src, uint16_t* dst, int width) { + int x; + src += width - 1; + for (x = 0; x < width - 1; x += 2) { + dst[x] = src[0]; + dst[x + 1] = src[-1]; + src -= 2; + } + if (width & 1) { + dst[width - 1] = src[0]; + } +} + void MirrorUVRow_C(const uint8_t* src_uv, uint8_t* dst_uv, int width) { int x; src_uv += (width - 1) << 1; |