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

Unified Diff: source/convert_argb.cc

Issue 1363503002: yuvconstants for all YUV to RGB conversion functions. (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: mips dspr2 add constants parameter Created 5 years, 3 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/row.h ('k') | source/convert_from.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 dec44deddeedf93c1e3028d7aa72eff692fe5173..dc3071926c42f5c1747d2f65ddf91c1a125084e3 100644
--- a/source/convert_argb.cc
+++ b/source/convert_argb.cc
@@ -56,6 +56,7 @@ int I444ToARGB(const uint8* src_y, int src_stride_y,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
+ struct YuvConstants* yuvconstants,
int width) = I444ToARGBRow_C;
if (!src_y || !src_u || !src_v ||
!dst_argb ||
@@ -103,7 +104,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, width);
+ I444ToARGBRow(src_y, src_u, src_v, dst_argb, &kYuvConstants, width);
dst_argb += dst_stride_argb;
src_y += src_stride_y;
src_u += src_stride_u;
@@ -124,6 +125,7 @@ int I444ToABGR(const uint8* src_y, int src_stride_y,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
+ struct YuvConstants* yuvconstants,
int width) = I444ToABGRRow_C;
if (!src_y || !src_u || !src_v ||
!dst_abgr ||
@@ -171,7 +173,7 @@ int I444ToABGR(const uint8* src_y, int src_stride_y,
#endif
for (y = 0; y < height; ++y) {
- I444ToABGRRow(src_y, src_u, src_v, dst_abgr, width);
+ I444ToABGRRow(src_y, src_u, src_v, dst_abgr, &kYuvConstants, width);
dst_abgr += dst_stride_abgr;
src_y += src_stride_y;
src_u += src_stride_u;
@@ -192,6 +194,7 @@ int I422ToARGB(const uint8* src_y, int src_stride_y,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
+ struct YuvConstants* yuvconstants,
int width) = I422ToARGBRow_C;
if (!src_y || !src_u || !src_v ||
!dst_argb ||
@@ -248,7 +251,7 @@ int I422ToARGB(const uint8* src_y, int src_stride_y,
#endif
for (y = 0; y < height; ++y) {
- I422ToARGBRow(src_y, src_u, src_v, dst_argb, width);
+ I422ToARGBRow(src_y, src_u, src_v, dst_argb, &kYuvConstants, width);
dst_argb += dst_stride_argb;
src_y += src_stride_y;
src_u += src_stride_u;
@@ -269,6 +272,7 @@ int I411ToARGB(const uint8* src_y, int src_stride_y,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
+ struct YuvConstants* yuvconstants,
int width) = I411ToARGBRow_C;
if (!src_y || !src_u || !src_v ||
!dst_argb ||
@@ -316,7 +320,7 @@ int I411ToARGB(const uint8* src_y, int src_stride_y,
#endif
for (y = 0; y < height; ++y) {
- I411ToARGBRow(src_y, src_u, src_v, dst_argb, width);
+ I411ToARGBRow(src_y, src_u, src_v, dst_argb, &kYuvConstants, width);
dst_argb += dst_stride_argb;
src_y += src_stride_y;
src_u += src_stride_u;
@@ -338,6 +342,7 @@ int I420AlphaToARGB(const uint8* src_y, int src_stride_y,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
+ struct YuvConstants* yuvconstants,
int width) = I422ToARGBRow_C;
void (*ARGBCopyYToAlphaRow)(const uint8* src_y, uint8* dst_argb, int width) =
ARGBCopyYToAlphaRow_C;
@@ -436,7 +441,7 @@ int I420AlphaToARGB(const uint8* src_y, int src_stride_y,
#endif
for (y = 0; y < height; ++y) {
- I422ToARGBRow(src_y, src_u, src_v, dst_argb, width);
+ I422ToARGBRow(src_y, src_u, src_v, dst_argb, &kYuvConstants, width);
ARGBCopyYToAlphaRow(src_a, dst_argb, width);
ARGBAttenuateRow(dst_argb, dst_argb, width);
dst_argb += dst_stride_argb;
@@ -462,6 +467,7 @@ int I420AlphaToABGR(const uint8* src_y, int src_stride_y,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
+ struct YuvConstants* yuvconstants,
int width) = I422ToABGRRow_C;
void (*ARGBCopyYToAlphaRow)(const uint8* src_y, uint8* dst_argb, int width) =
ARGBCopyYToAlphaRow_C;
@@ -560,7 +566,7 @@ int I420AlphaToABGR(const uint8* src_y, int src_stride_y,
#endif
for (y = 0; y < height; ++y) {
- I422ToABGRRow(src_y, src_u, src_v, dst_abgr, width);
+ I422ToABGRRow(src_y, src_u, src_v, dst_abgr, &kYuvConstants, width);
ARGBCopyYToAlphaRow(src_a, dst_abgr, width);
ARGBAttenuateRow(dst_abgr, dst_abgr, width);
dst_abgr += dst_stride_abgr;
@@ -639,7 +645,7 @@ int J400ToARGB(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb,
int width, int height) {
int y;
- void (*J400ToARGBRow)(const uint8* src_y, uint8* dst_argb, int pix) =
+ void (*J400ToARGBRow)(const uint8* src_y, uint8* dst_argb, int width) =
J400ToARGBRow_C;
if (!src_y || !dst_argb ||
width <= 0 || height == 0) {
@@ -766,7 +772,7 @@ int RGB24ToARGB(const uint8* src_rgb24, int src_stride_rgb24,
uint8* dst_argb, int dst_stride_argb,
int width, int height) {
int y;
- void (*RGB24ToARGBRow)(const uint8* src_rgb, uint8* dst_argb, int pix) =
+ void (*RGB24ToARGBRow)(const uint8* src_rgb, uint8* dst_argb, int width) =
RGB24ToARGBRow_C;
if (!src_rgb24 || !dst_argb ||
width <= 0 || height == 0) {
@@ -816,7 +822,7 @@ int RAWToARGB(const uint8* src_raw, int src_stride_raw,
uint8* dst_argb, int dst_stride_argb,
int width, int height) {
int y;
- void (*RAWToARGBRow)(const uint8* src_rgb, uint8* dst_argb, int pix) =
+ void (*RAWToARGBRow)(const uint8* src_rgb, uint8* dst_argb, int width) =
RAWToARGBRow_C;
if (!src_raw || !dst_argb ||
width <= 0 || height == 0) {
@@ -866,7 +872,7 @@ int RGB565ToARGB(const uint8* src_rgb565, int src_stride_rgb565,
uint8* dst_argb, int dst_stride_argb,
int width, int height) {
int y;
- void (*RGB565ToARGBRow)(const uint8* src_rgb565, uint8* dst_argb, int pix) =
+ void (*RGB565ToARGBRow)(const uint8* src_rgb565, uint8* dst_argb, int width) =
RGB565ToARGBRow_C;
if (!src_rgb565 || !dst_argb ||
width <= 0 || height == 0) {
@@ -925,7 +931,7 @@ int ARGB1555ToARGB(const uint8* src_argb1555, int src_stride_argb1555,
int width, int height) {
int y;
void (*ARGB1555ToARGBRow)(const uint8* src_argb1555, uint8* dst_argb,
- int pix) = ARGB1555ToARGBRow_C;
+ int width) = ARGB1555ToARGBRow_C;
if (!src_argb1555 || !dst_argb ||
width <= 0 || height == 0) {
return -1;
@@ -983,7 +989,7 @@ int ARGB4444ToARGB(const uint8* src_argb4444, int src_stride_argb4444,
int width, int height) {
int y;
void (*ARGB4444ToARGBRow)(const uint8* src_argb4444, uint8* dst_argb,
- int pix) = ARGB4444ToARGBRow_C;
+ int width) = ARGB4444ToARGBRow_C;
if (!src_argb4444 || !dst_argb ||
width <= 0 || height == 0) {
return -1;
@@ -1044,6 +1050,7 @@ int NV12ToARGB(const uint8* src_y, int src_stride_y,
void (*NV12ToARGBRow)(const uint8* y_buf,
const uint8* uv_buf,
uint8* rgb_buf,
+ struct YuvConstants* yuvconstants,
int width) = NV12ToARGBRow_C;
if (!src_y || !src_uv || !dst_argb ||
width <= 0 || height == 0) {
@@ -1081,7 +1088,7 @@ int NV12ToARGB(const uint8* src_y, int src_stride_y,
#endif
for (y = 0; y < height; ++y) {
- NV12ToARGBRow(src_y, src_uv, dst_argb, width);
+ NV12ToARGBRow(src_y, src_uv, dst_argb, &kYuvConstants, width);
dst_argb += dst_stride_argb;
src_y += src_stride_y;
if (y & 1) {
@@ -1098,10 +1105,11 @@ int NV21ToARGB(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb,
int width, int height) {
int y;
- void (*NV21ToARGBRow)(const uint8* y_buf,
+ void (*NV12ToARGBRow)(const uint8* y_buf,
const uint8* uv_buf,
uint8* rgb_buf,
- int width) = NV21ToARGBRow_C;
+ struct YuvConstants* yuvconstants,
+ int width) = NV12ToARGBRow_C;
if (!src_y || !src_uv || !dst_argb ||
width <= 0 || height == 0) {
return -1;
@@ -1112,33 +1120,33 @@ int NV21ToARGB(const uint8* src_y, int src_stride_y,
dst_argb = dst_argb + (height - 1) * dst_stride_argb;
dst_stride_argb = -dst_stride_argb;
}
-#if defined(HAS_NV21TOARGBROW_SSSE3)
+#if defined(HAS_NV12TOARGBROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
- NV21ToARGBRow = NV21ToARGBRow_Any_SSSE3;
+ NV12ToARGBRow = NV12ToARGBRow_Any_SSSE3;
if (IS_ALIGNED(width, 8)) {
- NV21ToARGBRow = NV21ToARGBRow_SSSE3;
+ NV12ToARGBRow = NV12ToARGBRow_SSSE3;
}
}
#endif
-#if defined(HAS_NV21TOARGBROW_AVX2)
+#if defined(HAS_NV12TOARGBROW_AVX2)
if (TestCpuFlag(kCpuHasAVX2)) {
- NV21ToARGBRow = NV21ToARGBRow_Any_AVX2;
+ NV12ToARGBRow = NV12ToARGBRow_Any_AVX2;
if (IS_ALIGNED(width, 16)) {
- NV21ToARGBRow = NV21ToARGBRow_AVX2;
+ NV12ToARGBRow = NV12ToARGBRow_AVX2;
}
}
#endif
-#if defined(HAS_NV21TOARGBROW_NEON)
+#if defined(HAS_NV12TOARGBROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) {
- NV21ToARGBRow = NV21ToARGBRow_Any_NEON;
+ NV12ToARGBRow = NV12ToARGBRow_Any_NEON;
if (IS_ALIGNED(width, 8)) {
- NV21ToARGBRow = NV21ToARGBRow_NEON;
+ NV12ToARGBRow = NV12ToARGBRow_NEON;
}
}
#endif
for (y = 0; y < height; ++y) {
- NV21ToARGBRow(src_y, src_uv, dst_argb, width);
+ NV12ToARGBRow(src_y, src_uv, dst_argb, &kYvuConstants, width);
dst_argb += dst_stride_argb;
src_y += src_stride_y;
if (y & 1) {
@@ -1157,6 +1165,7 @@ int M420ToARGB(const uint8* src_m420, int src_stride_m420,
void (*NV12ToARGBRow)(const uint8* y_buf,
const uint8* uv_buf,
uint8* rgb_buf,
+ struct YuvConstants* yuvconstants,
int width) = NV12ToARGBRow_C;
if (!src_m420 || !dst_argb ||
width <= 0 || height == 0) {
@@ -1194,14 +1203,16 @@ int M420ToARGB(const uint8* src_m420, int src_stride_m420,
#endif
for (y = 0; y < height - 1; y += 2) {
- NV12ToARGBRow(src_m420, src_m420 + src_stride_m420 * 2, dst_argb, width);
+ NV12ToARGBRow(src_m420, src_m420 + src_stride_m420 * 2, dst_argb,
+ &kYuvConstants, width);
NV12ToARGBRow(src_m420 + src_stride_m420, src_m420 + src_stride_m420 * 2,
- dst_argb + dst_stride_argb, width);
+ dst_argb + dst_stride_argb, &kYuvConstants, width);
dst_argb += dst_stride_argb * 2;
src_m420 += src_stride_m420 * 3;
}
if (height & 1) {
- NV12ToARGBRow(src_m420, src_m420 + src_stride_m420 * 2, dst_argb, width);
+ NV12ToARGBRow(src_m420, src_m420 + src_stride_m420 * 2, dst_argb,
+ &kYuvConstants, width);
}
return 0;
}
@@ -1212,7 +1223,10 @@ int YUY2ToARGB(const uint8* src_yuy2, int src_stride_yuy2,
uint8* dst_argb, int dst_stride_argb,
int width, int height) {
int y;
- void (*YUY2ToARGBRow)(const uint8* src_yuy2, uint8* dst_argb, int pix) =
+ void (*YUY2ToARGBRow)(const uint8* src_yuy2,
+ uint8* dst_argb,
+ struct YuvConstants* yuvconstants,
+ int width) =
YUY2ToARGBRow_C;
if (!src_yuy2 || !dst_argb ||
width <= 0 || height == 0) {
@@ -1256,7 +1270,7 @@ int YUY2ToARGB(const uint8* src_yuy2, int src_stride_yuy2,
}
#endif
for (y = 0; y < height; ++y) {
- YUY2ToARGBRow(src_yuy2, dst_argb, width);
+ YUY2ToARGBRow(src_yuy2, dst_argb, &kYuvConstants, width);
src_yuy2 += src_stride_yuy2;
dst_argb += dst_stride_argb;
}
@@ -1269,7 +1283,10 @@ int UYVYToARGB(const uint8* src_uyvy, int src_stride_uyvy,
uint8* dst_argb, int dst_stride_argb,
int width, int height) {
int y;
- void (*UYVYToARGBRow)(const uint8* src_uyvy, uint8* dst_argb, int pix) =
+ void (*UYVYToARGBRow)(const uint8* src_uyvy,
+ uint8* dst_argb,
+ struct YuvConstants* yuvconstants,
+ int width) =
UYVYToARGBRow_C;
if (!src_uyvy || !dst_argb ||
width <= 0 || height == 0) {
@@ -1313,7 +1330,7 @@ int UYVYToARGB(const uint8* src_uyvy, int src_stride_uyvy,
}
#endif
for (y = 0; y < height; ++y) {
- UYVYToARGBRow(src_uyvy, dst_argb, width);
+ UYVYToARGBRow(src_uyvy, dst_argb, &kYuvConstants, width);
src_uyvy += src_stride_uyvy;
dst_argb += dst_stride_argb;
}
@@ -1328,11 +1345,12 @@ int J420ToARGB(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb,
int width, int height) {
int y;
- void (*J422ToARGBRow)(const uint8* y_buf,
+ void (*I422ToARGBRow)(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
- int width) = J422ToARGBRow_C;
+ struct YuvConstants* yuvconstants,
+ int width) = I422ToARGBRow_C;
if (!src_y || !src_u || !src_v || !dst_argb ||
width <= 0 || height == 0) {
return -1;
@@ -1343,42 +1361,42 @@ int J420ToARGB(const uint8* src_y, int src_stride_y,
dst_argb = dst_argb + (height - 1) * dst_stride_argb;
dst_stride_argb = -dst_stride_argb;
}
-#if defined(HAS_J422TOARGBROW_SSSE3)
+#if defined(HAS_I422TOARGBROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
- J422ToARGBRow = J422ToARGBRow_Any_SSSE3;
+ I422ToARGBRow = I422ToARGBRow_Any_SSSE3;
if (IS_ALIGNED(width, 8)) {
- J422ToARGBRow = J422ToARGBRow_SSSE3;
+ I422ToARGBRow = I422ToARGBRow_SSSE3;
}
}
#endif
-#if defined(HAS_J422TOARGBROW_AVX2)
+#if defined(HAS_I422TOARGBROW_AVX2)
if (TestCpuFlag(kCpuHasAVX2)) {
- J422ToARGBRow = J422ToARGBRow_Any_AVX2;
+ I422ToARGBRow = I422ToARGBRow_Any_AVX2;
if (IS_ALIGNED(width, 16)) {
- J422ToARGBRow = J422ToARGBRow_AVX2;
+ I422ToARGBRow = I422ToARGBRow_AVX2;
}
}
#endif
-#if defined(HAS_J422TOARGBROW_NEON)
+#if defined(HAS_I422TOARGBROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) {
- J422ToARGBRow = J422ToARGBRow_Any_NEON;
+ I422ToARGBRow = I422ToARGBRow_Any_NEON;
if (IS_ALIGNED(width, 8)) {
- J422ToARGBRow = J422ToARGBRow_NEON;
+ I422ToARGBRow = I422ToARGBRow_NEON;
}
}
#endif
-#if defined(HAS_J422TOARGBROW_MIPS_DSPR2)
+#if defined(HAS_I422TOARGBROW_MIPS_DSPR2)
if (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(width, 4) &&
IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&
IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) &&
IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) &&
IS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride_argb, 4)) {
- J422ToARGBRow = J422ToARGBRow_MIPS_DSPR2;
+ I422ToARGBRow = I422ToARGBRow_MIPS_DSPR2;
}
#endif
for (y = 0; y < height; ++y) {
- J422ToARGBRow(src_y, src_u, src_v, dst_argb, width);
+ I422ToARGBRow(src_y, src_u, src_v, dst_argb, &kYuvJConstants, width);
dst_argb += dst_stride_argb;
src_y += src_stride_y;
if (y & 1) {
@@ -1397,11 +1415,12 @@ int J422ToARGB(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb,
int width, int height) {
int y;
- void (*J422ToARGBRow)(const uint8* y_buf,
+ void (*I422ToARGBRow)(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
- int width) = J422ToARGBRow_C;
+ struct YuvConstants* yuvconstants,
+ int width) = I422ToARGBRow_C;
if (!src_y || !src_u || !src_v ||
!dst_argb ||
width <= 0 || height == 0) {
@@ -1422,42 +1441,42 @@ int J422ToARGB(const uint8* src_y, int src_stride_y,
height = 1;
src_stride_y = src_stride_u = src_stride_v = dst_stride_argb = 0;
}
-#if defined(HAS_J422TOARGBROW_SSSE3)
+#if defined(HAS_I422TOARGBROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
- J422ToARGBRow = J422ToARGBRow_Any_SSSE3;
+ I422ToARGBRow = I422ToARGBRow_Any_SSSE3;
if (IS_ALIGNED(width, 8)) {
- J422ToARGBRow = J422ToARGBRow_SSSE3;
+ I422ToARGBRow = I422ToARGBRow_SSSE3;
}
}
#endif
-#if defined(HAS_J422TOARGBROW_AVX2)
+#if defined(HAS_I422TOARGBROW_AVX2)
if (TestCpuFlag(kCpuHasAVX2)) {
- J422ToARGBRow = J422ToARGBRow_Any_AVX2;
+ I422ToARGBRow = I422ToARGBRow_Any_AVX2;
if (IS_ALIGNED(width, 16)) {
- J422ToARGBRow = J422ToARGBRow_AVX2;
+ I422ToARGBRow = I422ToARGBRow_AVX2;
}
}
#endif
-#if defined(HAS_J422TOARGBROW_NEON)
+#if defined(HAS_I422TOARGBROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) {
- J422ToARGBRow = J422ToARGBRow_Any_NEON;
+ I422ToARGBRow = I422ToARGBRow_Any_NEON;
if (IS_ALIGNED(width, 8)) {
- J422ToARGBRow = J422ToARGBRow_NEON;
+ I422ToARGBRow = I422ToARGBRow_NEON;
}
}
#endif
-#if defined(HAS_J422TOARGBROW_MIPS_DSPR2)
+#if defined(HAS_I422TOARGBROW_MIPS_DSPR2)
if (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(width, 4) &&
IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&
IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) &&
IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) &&
IS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride_argb, 4)) {
- J422ToARGBRow = J422ToARGBRow_MIPS_DSPR2;
+ I422ToARGBRow = I422ToARGBRow_MIPS_DSPR2;
}
#endif
for (y = 0; y < height; ++y) {
- J422ToARGBRow(src_y, src_u, src_v, dst_argb, width);
+ I422ToARGBRow(src_y, src_u, src_v, dst_argb, &kYuvJConstants, width);
dst_argb += dst_stride_argb;
src_y += src_stride_y;
src_u += src_stride_u;
@@ -1474,11 +1493,12 @@ int J420ToABGR(const uint8* src_y, int src_stride_y,
uint8* dst_abgr, int dst_stride_abgr,
int width, int height) {
int y;
- void (*J422ToABGRRow)(const uint8* y_buf,
+ void (*I422ToABGRRow)(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
- int width) = J422ToABGRRow_C;
+ struct YuvConstants* yuvconstants,
+ int width) = I422ToABGRRow_C;
if (!src_y || !src_u || !src_v || !dst_abgr ||
width <= 0 || height == 0) {
return -1;
@@ -1489,42 +1509,42 @@ int J420ToABGR(const uint8* src_y, int src_stride_y,
dst_abgr = dst_abgr + (height - 1) * dst_stride_abgr;
dst_stride_abgr = -dst_stride_abgr;
}
-#if defined(HAS_J422TOABGRROW_SSSE3)
+#if defined(HAS_I422TOABGRROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
- J422ToABGRRow = J422ToABGRRow_Any_SSSE3;
+ I422ToABGRRow = I422ToABGRRow_Any_SSSE3;
if (IS_ALIGNED(width, 8)) {
- J422ToABGRRow = J422ToABGRRow_SSSE3;
+ I422ToABGRRow = I422ToABGRRow_SSSE3;
}
}
#endif
-#if defined(HAS_J422TOABGRROW_AVX2)
+#if defined(HAS_I422TOABGRROW_AVX2)
if (TestCpuFlag(kCpuHasAVX2)) {
- J422ToABGRRow = J422ToABGRRow_Any_AVX2;
+ I422ToABGRRow = I422ToABGRRow_Any_AVX2;
if (IS_ALIGNED(width, 16)) {
- J422ToABGRRow = J422ToABGRRow_AVX2;
+ I422ToABGRRow = I422ToABGRRow_AVX2;
}
}
#endif
-#if defined(HAS_J422TOABGRROW_NEON)
+#if defined(HAS_I422TOABGRROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) {
- J422ToABGRRow = J422ToABGRRow_Any_NEON;
+ I422ToABGRRow = I422ToABGRRow_Any_NEON;
if (IS_ALIGNED(width, 8)) {
- J422ToABGRRow = J422ToABGRRow_NEON;
+ I422ToABGRRow = I422ToABGRRow_NEON;
}
}
#endif
-#if defined(HAS_J422TOABGRROW_MIPS_DSPR2)
+#if defined(HAS_I422TOABGRROW_MIPS_DSPR2)
if (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(width, 4) &&
IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&
IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) &&
IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) &&
IS_ALIGNED(dst_abgr, 4) && IS_ALIGNED(dst_stride_abgr, 4)) {
- J422ToABGRRow = J422ToABGRRow_MIPS_DSPR2;
+ I422ToABGRRow = I422ToABGRRow_MIPS_DSPR2;
}
#endif
for (y = 0; y < height; ++y) {
- J422ToABGRRow(src_y, src_u, src_v, dst_abgr, width);
+ I422ToABGRRow(src_y, src_u, src_v, dst_abgr, &kYuvJConstants, width);
dst_abgr += dst_stride_abgr;
src_y += src_stride_y;
if (y & 1) {
@@ -1543,11 +1563,12 @@ int J422ToABGR(const uint8* src_y, int src_stride_y,
uint8* dst_abgr, int dst_stride_abgr,
int width, int height) {
int y;
- void (*J422ToABGRRow)(const uint8* y_buf,
+ void (*I422ToABGRRow)(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
- int width) = J422ToABGRRow_C;
+ struct YuvConstants* yuvconstants,
+ int width) = I422ToABGRRow_C;
if (!src_y || !src_u || !src_v ||
!dst_abgr ||
width <= 0 || height == 0) {
@@ -1568,42 +1589,42 @@ int J422ToABGR(const uint8* src_y, int src_stride_y,
height = 1;
src_stride_y = src_stride_u = src_stride_v = dst_stride_abgr = 0;
}
-#if defined(HAS_J422TOABGRROW_SSSE3)
+#if defined(HAS_I422TOABGRROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
- J422ToABGRRow = J422ToABGRRow_Any_SSSE3;
+ I422ToABGRRow = I422ToABGRRow_Any_SSSE3;
if (IS_ALIGNED(width, 8)) {
- J422ToABGRRow = J422ToABGRRow_SSSE3;
+ I422ToABGRRow = I422ToABGRRow_SSSE3;
}
}
#endif
-#if defined(HAS_J422TOABGRROW_AVX2)
+#if defined(HAS_I422TOABGRROW_AVX2)
if (TestCpuFlag(kCpuHasAVX2)) {
- J422ToABGRRow = J422ToABGRRow_Any_AVX2;
+ I422ToABGRRow = I422ToABGRRow_Any_AVX2;
if (IS_ALIGNED(width, 16)) {
- J422ToABGRRow = J422ToABGRRow_AVX2;
+ I422ToABGRRow = I422ToABGRRow_AVX2;
}
}
#endif
-#if defined(HAS_J422TOABGRROW_NEON)
+#if defined(HAS_I422TOABGRROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) {
- J422ToABGRRow = J422ToABGRRow_Any_NEON;
+ I422ToABGRRow = I422ToABGRRow_Any_NEON;
if (IS_ALIGNED(width, 8)) {
- J422ToABGRRow = J422ToABGRRow_NEON;
+ I422ToABGRRow = I422ToABGRRow_NEON;
}
}
#endif
-#if defined(HAS_J422TOABGRROW_MIPS_DSPR2)
+#if defined(HAS_I422TOABGRROW_MIPS_DSPR2)
if (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(width, 4) &&
IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&
IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) &&
IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) &&
IS_ALIGNED(dst_abgr, 4) && IS_ALIGNED(dst_stride_abgr, 4)) {
- J422ToABGRRow = J422ToABGRRow_MIPS_DSPR2;
+ I422ToABGRRow = I422ToABGRRow_MIPS_DSPR2;
}
#endif
for (y = 0; y < height; ++y) {
- J422ToABGRRow(src_y, src_u, src_v, dst_abgr, width);
+ I422ToABGRRow(src_y, src_u, src_v, dst_abgr, &kYuvJConstants, width);
dst_abgr += dst_stride_abgr;
src_y += src_stride_y;
src_u += src_stride_u;
@@ -1620,11 +1641,12 @@ int H420ToARGB(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb,
int width, int height) {
int y;
- void (*H422ToARGBRow)(const uint8* y_buf,
+ void (*I422ToARGBRow)(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
- int width) = H422ToARGBRow_C;
+ struct YuvConstants* yuvconstants,
+ int width) = I422ToARGBRow_C;
if (!src_y || !src_u || !src_v || !dst_argb ||
width <= 0 || height == 0) {
return -1;
@@ -1635,42 +1657,42 @@ int H420ToARGB(const uint8* src_y, int src_stride_y,
dst_argb = dst_argb + (height - 1) * dst_stride_argb;
dst_stride_argb = -dst_stride_argb;
}
-#if defined(HAS_H422TOARGBROW_SSSE3)
+#if defined(HAS_I422TOARGBROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
- H422ToARGBRow = H422ToARGBRow_Any_SSSE3;
+ I422ToARGBRow = I422ToARGBRow_Any_SSSE3;
if (IS_ALIGNED(width, 8)) {
- H422ToARGBRow = H422ToARGBRow_SSSE3;
+ I422ToARGBRow = I422ToARGBRow_SSSE3;
}
}
#endif
-#if defined(HAS_H422TOARGBROW_AVX2)
+#if defined(HAS_I422TOARGBROW_AVX2)
if (TestCpuFlag(kCpuHasAVX2)) {
- H422ToARGBRow = H422ToARGBRow_Any_AVX2;
+ I422ToARGBRow = I422ToARGBRow_Any_AVX2;
if (IS_ALIGNED(width, 16)) {
- H422ToARGBRow = H422ToARGBRow_AVX2;
+ I422ToARGBRow = I422ToARGBRow_AVX2;
}
}
#endif
-#if defined(HAS_H422TOARGBROW_NEON)
+#if defined(HAS_I422TOARGBROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) {
- H422ToARGBRow = H422ToARGBRow_Any_NEON;
+ I422ToARGBRow = I422ToARGBRow_Any_NEON;
if (IS_ALIGNED(width, 8)) {
- H422ToARGBRow = H422ToARGBRow_NEON;
+ I422ToARGBRow = I422ToARGBRow_NEON;
}
}
#endif
-#if defined(HAS_H422TOARGBROW_MIPS_DSPR2)
+#if defined(HAS_I422TOARGBROW_MIPS_DSPR2)
if (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(width, 4) &&
IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&
IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) &&
IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) &&
IS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride_argb, 4)) {
- H422ToARGBRow = H422ToARGBRow_MIPS_DSPR2;
+ I422ToARGBRow = I422ToARGBRow_MIPS_DSPR2;
}
#endif
for (y = 0; y < height; ++y) {
- H422ToARGBRow(src_y, src_u, src_v, dst_argb, width);
+ I422ToARGBRow(src_y, src_u, src_v, dst_argb, &kYuvHConstants, width);
dst_argb += dst_stride_argb;
src_y += src_stride_y;
if (y & 1) {
@@ -1689,11 +1711,12 @@ int H422ToARGB(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb,
int width, int height) {
int y;
- void (*H422ToARGBRow)(const uint8* y_buf,
+ void (*I422ToARGBRow)(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
- int width) = H422ToARGBRow_C;
+ struct YuvConstants* yuvconstants,
+ int width) = I422ToARGBRow_C;
if (!src_y || !src_u || !src_v ||
!dst_argb ||
width <= 0 || height == 0) {
@@ -1714,42 +1737,42 @@ int H422ToARGB(const uint8* src_y, int src_stride_y,
height = 1;
src_stride_y = src_stride_u = src_stride_v = dst_stride_argb = 0;
}
-#if defined(HAS_H422TOARGBROW_SSSE3)
+#if defined(HAS_I422TOARGBROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
- H422ToARGBRow = H422ToARGBRow_Any_SSSE3;
+ I422ToARGBRow = I422ToARGBRow_Any_SSSE3;
if (IS_ALIGNED(width, 8)) {
- H422ToARGBRow = H422ToARGBRow_SSSE3;
+ I422ToARGBRow = I422ToARGBRow_SSSE3;
}
}
#endif
-#if defined(HAS_H422TOARGBROW_AVX2)
+#if defined(HAS_I422TOARGBROW_AVX2)
if (TestCpuFlag(kCpuHasAVX2)) {
- H422ToARGBRow = H422ToARGBRow_Any_AVX2;
+ I422ToARGBRow = I422ToARGBRow_Any_AVX2;
if (IS_ALIGNED(width, 16)) {
- H422ToARGBRow = H422ToARGBRow_AVX2;
+ I422ToARGBRow = I422ToARGBRow_AVX2;
}
}
#endif
-#if defined(HAS_H422TOARGBROW_NEON)
+#if defined(HAS_I422TOARGBROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) {
- H422ToARGBRow = H422ToARGBRow_Any_NEON;
+ I422ToARGBRow = I422ToARGBRow_Any_NEON;
if (IS_ALIGNED(width, 8)) {
- H422ToARGBRow = H422ToARGBRow_NEON;
+ I422ToARGBRow = I422ToARGBRow_NEON;
}
}
#endif
-#if defined(HAS_H422TOARGBROW_MIPS_DSPR2)
+#if defined(HAS_I422TOARGBROW_MIPS_DSPR2)
if (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(width, 4) &&
IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&
IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) &&
IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) &&
IS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride_argb, 4)) {
- H422ToARGBRow = H422ToARGBRow_MIPS_DSPR2;
+ I422ToARGBRow = I422ToARGBRow_MIPS_DSPR2;
}
#endif
for (y = 0; y < height; ++y) {
- H422ToARGBRow(src_y, src_u, src_v, dst_argb, width);
+ I422ToARGBRow(src_y, src_u, src_v, dst_argb, &kYuvHConstants, width);
dst_argb += dst_stride_argb;
src_y += src_stride_y;
src_u += src_stride_u;
@@ -1766,11 +1789,12 @@ int H420ToABGR(const uint8* src_y, int src_stride_y,
uint8* dst_abgr, int dst_stride_abgr,
int width, int height) {
int y;
- void (*H422ToABGRRow)(const uint8* y_buf,
+ void (*I422ToABGRRow)(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
- int width) = H422ToABGRRow_C;
+ struct YuvConstants* yuvconstants,
+ int width) = I422ToABGRRow_C;
if (!src_y || !src_u || !src_v || !dst_abgr ||
width <= 0 || height == 0) {
return -1;
@@ -1781,42 +1805,42 @@ int H420ToABGR(const uint8* src_y, int src_stride_y,
dst_abgr = dst_abgr + (height - 1) * dst_stride_abgr;
dst_stride_abgr = -dst_stride_abgr;
}
-#if defined(HAS_H422TOABGRROW_SSSE3)
+#if defined(HAS_I422TOABGRROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
- H422ToABGRRow = H422ToABGRRow_Any_SSSE3;
+ I422ToABGRRow = I422ToABGRRow_Any_SSSE3;
if (IS_ALIGNED(width, 8)) {
- H422ToABGRRow = H422ToABGRRow_SSSE3;
+ I422ToABGRRow = I422ToABGRRow_SSSE3;
}
}
#endif
-#if defined(HAS_H422TOABGRROW_AVX2)
+#if defined(HAS_I422TOABGRROW_AVX2)
if (TestCpuFlag(kCpuHasAVX2)) {
- H422ToABGRRow = H422ToABGRRow_Any_AVX2;
+ I422ToABGRRow = I422ToABGRRow_Any_AVX2;
if (IS_ALIGNED(width, 16)) {
- H422ToABGRRow = H422ToABGRRow_AVX2;
+ I422ToABGRRow = I422ToABGRRow_AVX2;
}
}
#endif
-#if defined(HAS_H422TOABGRROW_NEON)
+#if defined(HAS_I422TOABGRROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) {
- H422ToABGRRow = H422ToABGRRow_Any_NEON;
+ I422ToABGRRow = I422ToABGRRow_Any_NEON;
if (IS_ALIGNED(width, 8)) {
- H422ToABGRRow = H422ToABGRRow_NEON;
+ I422ToABGRRow = I422ToABGRRow_NEON;
}
}
#endif
-#if defined(HAS_H422TOABGRROW_MIPS_DSPR2)
+#if defined(HAS_I422TOABGRROW_MIPS_DSPR2)
if (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(width, 4) &&
IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&
IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) &&
IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) &&
IS_ALIGNED(dst_abgr, 4) && IS_ALIGNED(dst_stride_abgr, 4)) {
- H422ToABGRRow = H422ToABGRRow_MIPS_DSPR2;
+ I422ToABGRRow = I422ToABGRRow_MIPS_DSPR2;
}
#endif
for (y = 0; y < height; ++y) {
- H422ToABGRRow(src_y, src_u, src_v, dst_abgr, width);
+ I422ToABGRRow(src_y, src_u, src_v, dst_abgr, &kYuvHConstants, width);
dst_abgr += dst_stride_abgr;
src_y += src_stride_y;
if (y & 1) {
@@ -1835,11 +1859,12 @@ int H422ToABGR(const uint8* src_y, int src_stride_y,
uint8* dst_abgr, int dst_stride_abgr,
int width, int height) {
int y;
- void (*H422ToABGRRow)(const uint8* y_buf,
+ void (*I422ToABGRRow)(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
- int width) = H422ToABGRRow_C;
+ struct YuvConstants* yuvconstants,
+ int width) = I422ToABGRRow_C;
if (!src_y || !src_u || !src_v ||
!dst_abgr ||
width <= 0 || height == 0) {
@@ -1860,42 +1885,42 @@ int H422ToABGR(const uint8* src_y, int src_stride_y,
height = 1;
src_stride_y = src_stride_u = src_stride_v = dst_stride_abgr = 0;
}
-#if defined(HAS_H422TOABGRROW_SSSE3)
+#if defined(HAS_I422TOABGRROW_SSSE3)
if (TestCpuFlag(kCpuHasSSSE3)) {
- H422ToABGRRow = H422ToABGRRow_Any_SSSE3;
+ I422ToABGRRow = I422ToABGRRow_Any_SSSE3;
if (IS_ALIGNED(width, 8)) {
- H422ToABGRRow = H422ToABGRRow_SSSE3;
+ I422ToABGRRow = I422ToABGRRow_SSSE3;
}
}
#endif
-#if defined(HAS_H422TOABGRROW_AVX2)
+#if defined(HAS_I422TOABGRROW_AVX2)
if (TestCpuFlag(kCpuHasAVX2)) {
- H422ToABGRRow = H422ToABGRRow_Any_AVX2;
+ I422ToABGRRow = I422ToABGRRow_Any_AVX2;
if (IS_ALIGNED(width, 16)) {
- H422ToABGRRow = H422ToABGRRow_AVX2;
+ I422ToABGRRow = I422ToABGRRow_AVX2;
}
}
#endif
-#if defined(HAS_H422TOABGRROW_NEON)
+#if defined(HAS_I422TOABGRROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) {
- H422ToABGRRow = H422ToABGRRow_Any_NEON;
+ I422ToABGRRow = I422ToABGRRow_Any_NEON;
if (IS_ALIGNED(width, 8)) {
- H422ToABGRRow = H422ToABGRRow_NEON;
+ I422ToABGRRow = I422ToABGRRow_NEON;
}
}
#endif
-#if defined(HAS_H422TOABGRROW_MIPS_DSPR2)
+#if defined(HAS_I422TOABGRROW_MIPS_DSPR2)
if (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(width, 4) &&
IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&
IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) &&
IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) &&
IS_ALIGNED(dst_abgr, 4) && IS_ALIGNED(dst_stride_abgr, 4)) {
- H422ToABGRRow = H422ToABGRRow_MIPS_DSPR2;
+ I422ToABGRRow = I422ToABGRRow_MIPS_DSPR2;
}
#endif
for (y = 0; y < height; ++y) {
- H422ToABGRRow(src_y, src_u, src_v, dst_abgr, width);
+ I422ToABGRRow(src_y, src_u, src_v, dst_abgr, &kYuvHConstants, width);
dst_abgr += dst_stride_abgr;
src_y += src_stride_y;
src_u += src_stride_u;
« no previous file with comments | « include/libyuv/row.h ('k') | source/convert_from.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698