diff options
author | Frank Barchard <fbarchard@google.com> | 2022-08-01 12:49:02 -0700 |
---|---|---|
committer | Frank Barchard <fbarchard@chromium.org> | 2022-08-01 22:54:48 +0000 |
commit | b028453ba61043a560298acae28eb813ea9bc67d (patch) | |
tree | ef1915fb359491eb88c283885baa6ba033a548e2 /source/row_common.cc | |
parent | fe8c78b61aaf5a8cb2045e8a6231daf2d904c1a0 (diff) | |
download | libyuv-b028453ba61043a560298acae28eb813ea9bc67d.tar.gz |
Disable bilinear 16 bit scale up for SSE2
- Undefine HAS_SCALEROWUP2_BILINEAR_16_SSE2
- Save XMM7 in ScaleRowUp2_Bilinear_16_SSE2().
- Rename HAS_SCALEROWUP2LINEAR_xxx to HAS_SCALEROWUP2_LINEAR_xxx
- DetileSplitUVRow_C() is implemented using SplitUVRow_C().
- Changes to unit_test/planar_test.cc.
Bug: libyuv:882
Change-Id: I0a8e8e5fb43bdf58ded87244e802343eacb789f2
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/3795063
Reviewed-by: Wan-Teh Chang <wtc@google.com>
Diffstat (limited to 'source/row_common.cc')
-rw-r--r-- | source/row_common.cc | 71 |
1 files changed, 32 insertions, 39 deletions
diff --git a/source/row_common.cc b/source/row_common.cc index 150f48db..f4e98762 100644 --- a/source/row_common.cc +++ b/source/row_common.cc @@ -2663,45 +2663,6 @@ void RGB24MirrorRow_C(const uint8_t* src_rgb24, uint8_t* dst_rgb24, int width) { } } -void DetileRow_C(const uint8_t* src, - ptrdiff_t src_tile_stride, - uint8_t* dst, - int width) { - int x; - for (x = 0; x < width - 15; x += 16) { - memcpy(dst, src, 16); - dst += 16; - src += src_tile_stride; - } - if (width & 15) { - memcpy(dst, src, width & 15); - } -} - -void DetileSplitUVRow_C(const uint8_t* src_uv, - ptrdiff_t src_tile_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width) { - int tile; - for (tile = 0; tile < width / 16; tile++) { - for (int x = 0; x < 8; x++) { - *dst_u++ = src_uv[0]; - *dst_v++ = src_uv[1]; - src_uv += 2; - } - src_uv += src_tile_stride - 16; - } - for (int x = 0; x < (width & 0xF) / 2; ++x) { - *dst_u = *src_uv; - dst_u++; - src_uv++; - *dst_v = *src_uv; - dst_v++; - src_uv++; - } -} - void SplitUVRow_C(const uint8_t* src_uv, uint8_t* dst_u, uint8_t* dst_v, @@ -2738,6 +2699,38 @@ void MergeUVRow_C(const uint8_t* src_u, } } +void DetileRow_C(const uint8_t* src, + ptrdiff_t src_tile_stride, + uint8_t* dst, + int width) { + int x; + for (x = 0; x < width - 15; x += 16) { + memcpy(dst, src, 16); + dst += 16; + src += src_tile_stride; + } + if (width & 15) { + memcpy(dst, src, width & 15); + } +} + +void DetileSplitUVRow_C(const uint8_t* src_uv, + ptrdiff_t src_tile_stride, + uint8_t* dst_u, + uint8_t* dst_v, + int width) { + int x; + for (x = 0; x < width - 15; x += 16) { + SplitUVRow_C(src_uv, dst_u, dst_v, 8); + dst_u += 8; + dst_v += 8; + src_uv += src_tile_stride; + } + if (width & 15) { + SplitUVRow_C(src_uv, dst_u, dst_v, ((width & 15) + 1) / 2); + } +} + void SplitRGBRow_C(const uint8_t* src_rgb, uint8_t* dst_r, uint8_t* dst_g, |