aboutsummaryrefslogtreecommitdiff
path: root/source/convert_from.cc
diff options
context:
space:
mode:
authorFrank Barchard <fbarchard@google.com>2019-10-07 15:34:01 -0700
committerCommit Bot <commit-bot@chromium.org>2019-10-07 23:01:10 +0000
commitfce0fed542001577e6b10f4cf859e0fa1774974e (patch)
treeae6c01f2b5ca20242aea4b670963ebc4b79c5105 /source/convert_from.cc
parente278d4617fe0fd709bef52ef10137edcd85026f6 (diff)
downloadlibyuv-fce0fed542001577e6b10f4cf859e0fa1774974e.tar.gz
ARGBToY use 8 bit precision instead of 7 bit.
Neon and GCC Intel optimized, but win32 and mips not optimized. BUG=libyuv:842, b/141482243 Change-Id: Ia56fa85c8cc1db51f374bd0c89b56d21ec94afa7 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1825642 Commit-Queue: Frank Barchard <fbarchard@chromium.org> Reviewed-by: Miguel Casas <mcasas@chromium.org> Reviewed-by: richard winterton <rrwinterton@gmail.com>
Diffstat (limited to 'source/convert_from.cc')
-rw-r--r--source/convert_from.cc36
1 files changed, 36 insertions, 0 deletions
diff --git a/source/convert_from.cc b/source/convert_from.cc
index dc25d4fe..0c95f1f2 100644
--- a/source/convert_from.cc
+++ b/source/convert_from.cc
@@ -764,6 +764,42 @@ int I420ToRAW(const uint8_t* src_y,
width, height);
}
+// Convert J420 to RGB24.
+LIBYUV_API
+int J420ToRGB24(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_rgb24,
+ int dst_stride_rgb24,
+ int width,
+ int height) {
+ return I420ToRGB24Matrix(src_y, src_stride_y, src_u, src_stride_u, src_v,
+ src_stride_v, dst_rgb24, dst_stride_rgb24,
+ &kYuvJPEGConstants, width, height);
+}
+
+// Convert J420 to RAW.
+LIBYUV_API
+int J420ToRAW(const uint8_t* src_y,
+ int src_stride_y,
+ const uint8_t* src_u,
+ int src_stride_u,
+ const uint8_t* src_v,
+ int src_stride_v,
+ uint8_t* dst_raw,
+ int dst_stride_raw,
+ int width,
+ int height) {
+ return I420ToRGB24Matrix(src_y, src_stride_y, src_v,
+ src_stride_v, // Swap U and V
+ src_u, src_stride_u, dst_raw, dst_stride_raw,
+ &kYvuJPEGConstants, // Use Yvu matrix
+ width, height);
+}
+
// Convert H420 to RGB24.
LIBYUV_API
int H420ToRGB24(const uint8_t* src_y,