diff options
author | Frank Barchard <fbarchard@google.com> | 2021-03-24 13:45:04 -0700 |
---|---|---|
committer | Frank Barchard <fbarchard@chromium.org> | 2021-03-24 21:37:10 +0000 |
commit | 312c02a5aad4adda67cb2e0cc93a497d12845522 (patch) | |
tree | ce776a4db30d2319fad3bbf41fe48d6cdf1e2602 /source/convert.cc | |
parent | d8f1bfc9816a9fc76f3a25cc0ee272fb9c07622a (diff) | |
download | libyuv-312c02a5aad4adda67cb2e0cc93a497d12845522.tar.gz |
Fixes for SplitUVPlane_16 and MergeUVPlane_16
Planar functions pass depth instead of scale factor.
Row functions pass shift instead of depth. Add assert to C.
AVX shift instruction expects a single shift value in XMM.
Neon pass shift as input (not output).
Split Neon reimplemented as left shift on shorts by negative to achieve right shift.
Add planar unitests
Bug: libyuv:888
Change-Id: I8fe62d3d777effc5321c361cd595c58b7f93807e
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2782086
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Diffstat (limited to 'source/convert.cc')
-rw-r--r-- | source/convert.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/convert.cc b/source/convert.cc index 768e0f37..69f7fb6e 100644 --- a/source/convert.cc +++ b/source/convert.cc @@ -400,7 +400,7 @@ int I210ToI010(const uint16_t* src_y, } // Any I[420]1[02] to P[420]1[02] format with mirroring. -static int Ix1xToPx1x(const uint16_t* src_y, +static int IxxxToPxxx(const uint16_t* src_y, int src_stride_y, const uint16_t* src_u, int src_stride_u, @@ -441,7 +441,7 @@ int I010ToP010(const uint16_t* src_y, int dst_stride_uv, int width, int height) { - return Ix1xToPx1x(src_y, src_stride_y, src_u, src_stride_u, src_v, + return IxxxToPxxx(src_y, src_stride_y, src_u, src_stride_u, src_v, src_stride_v, dst_y, dst_stride_y, dst_uv, dst_stride_uv, width, height, 1, 1, 10); } @@ -459,7 +459,7 @@ int I210ToP210(const uint16_t* src_y, int dst_stride_uv, int width, int height) { - return Ix1xToPx1x(src_y, src_stride_y, src_u, src_stride_u, src_v, + return IxxxToPxxx(src_y, src_stride_y, src_u, src_stride_u, src_v, src_stride_v, dst_y, dst_stride_y, dst_uv, dst_stride_uv, width, height, 1, 0, 10); } @@ -477,7 +477,7 @@ int I012ToP012(const uint16_t* src_y, int dst_stride_uv, int width, int height) { - return Ix1xToPx1x(src_y, src_stride_y, src_u, src_stride_u, src_v, + return IxxxToPxxx(src_y, src_stride_y, src_u, src_stride_u, src_v, src_stride_v, dst_y, dst_stride_y, dst_uv, dst_stride_uv, width, height, 1, 1, 12); } @@ -495,7 +495,7 @@ int I212ToP212(const uint16_t* src_y, int dst_stride_uv, int width, int height) { - return Ix1xToPx1x(src_y, src_stride_y, src_u, src_stride_u, src_v, + return IxxxToPxxx(src_y, src_stride_y, src_u, src_stride_u, src_v, src_stride_v, dst_y, dst_stride_y, dst_uv, dst_stride_uv, width, height, 1, 0, 12); } @@ -2246,20 +2246,20 @@ int RAWToI420(const uint8_t* src_raw, // Convert RAW to J420. LIBYUV_API int RAWToJ420(const uint8_t* src_raw, - int src_stride_raw, - uint8_t* dst_y, - int dst_stride_y, - uint8_t* dst_u, - int dst_stride_u, - uint8_t* dst_v, - int dst_stride_v, - int width, - int height) { + int src_stride_raw, + uint8_t* dst_y, + int dst_stride_y, + uint8_t* dst_u, + int dst_stride_u, + uint8_t* dst_v, + int dst_stride_v, + int width, + int height) { int y; #if (defined(HAS_RAWTOYJROW_NEON) && defined(HAS_RAWTOUVJROW_NEON)) || \ defined(HAS_RAWTOYJROW_MSA) || defined(HAS_RAWTOYJROW_MMI) void (*RAWToUVJRow)(const uint8_t* src_raw, int src_stride_raw, - uint8_t* dst_u, uint8_t* dst_v, int width) = + uint8_t* dst_u, uint8_t* dst_v, int width) = RAWToUVJRow_C; void (*RAWToYJRow)(const uint8_t* src_raw, uint8_t* dst_y, int width) = RAWToYJRow_C; |