Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: source/convert_argb.cc

Issue 1387313002: Add J444ToARGB conversion function. (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/libyuv/version.h ('k') | unit_test/convert_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/convert_argb.cc
diff --git a/source/convert_argb.cc b/source/convert_argb.cc
index d205f53fb4c98feaa7a6abbeb84aabaeb63b6037..12fa8f447f247263dd36436587161559f71eb9d1 100644
--- a/source/convert_argb.cc
+++ b/source/convert_argb.cc
@@ -46,11 +46,12 @@ int ARGBCopy(const uint8* src_argb, int src_stride_argb,
// Convert I444 to ARGB.
LIBYUV_API
-int I444ToARGB(const uint8* src_y, int src_stride_y,
- const uint8* src_u, int src_stride_u,
- const uint8* src_v, int src_stride_v,
- uint8* dst_argb, int dst_stride_argb,
- int width, int height) {
+static int I444ToARGBMatrix(const uint8* src_y, int src_stride_y,
+ const uint8* src_u, int src_stride_u,
+ const uint8* src_v, int src_stride_v,
+ uint8* dst_argb, int dst_stride_argb,
+ struct YuvConstants* yuvconstants,
+ int width, int height) {
int y;
void (*I444ToARGBRow)(const uint8* y_buf,
const uint8* u_buf,
@@ -104,7 +105,7 @@ int I444ToARGB(const uint8* src_y, int src_stride_y,
#endif
for (y = 0; y < height; ++y) {
- I444ToARGBRow(src_y, src_u, src_v, dst_argb, &kYuvConstants, width);
+ I444ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width);
dst_argb += dst_stride_argb;
src_y += src_stride_y;
src_u += src_stride_u;
@@ -113,6 +114,38 @@ int I444ToARGB(const uint8* src_y, int src_stride_y,
return 0;
}
+// Convert I444 to ARGB.
+LIBYUV_API
+int I444ToARGB(const uint8* src_y, int src_stride_y,
+ const uint8* src_u, int src_stride_u,
+ const uint8* src_v, int src_stride_v,
+ uint8* dst_argb, int dst_stride_argb,
+ int width, int height) {
+ return I444ToARGBMatrix(src_y, src_stride_y,
+ src_u, src_stride_u,
+ src_v, src_stride_v,
+ dst_argb, dst_stride_argb,
+ &kYuvConstants,
+ width, height);
+}
+
+
+// Convert J444 to ARGB.
+LIBYUV_API
+int J444ToARGB(const uint8* src_y, int src_stride_y,
+ const uint8* src_u, int src_stride_u,
+ const uint8* src_v, int src_stride_v,
+ uint8* dst_argb, int dst_stride_argb,
+ int width, int height) {
+ return I444ToARGBMatrix(src_y, src_stride_y,
+ src_u, src_stride_u,
+ src_v, src_stride_v,
+ dst_argb, dst_stride_argb,
+ &kYuvJConstants,
+ width, height);
+}
+
+
// Convert I444 to ABGR.
LIBYUV_API
int I444ToABGR(const uint8* src_y, int src_stride_y,
« no previous file with comments | « include/libyuv/version.h ('k') | unit_test/convert_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698