Commit 92f7f421 authored by fbarchard@google.com's avatar fbarchard@google.com

rename I400 to J400 and I400 reference to I400. J400 is a simple replication of…

rename I400 to J400 and I400 reference to I400.  J400 is a simple replication of values to convert to RGB, which is what the old I400 was.  I400 reference is the Y part of the YUV formula, so renaming that to I400.
BUG=none
TESTED=libyuvTest (5925 ms total)
R=tpsiaki@google.com

Review URL: https://webrtc-codereview.appspot.com/50369005

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1333 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 35f0add6
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 1330 Version: 1333
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
...@@ -71,6 +71,8 @@ int I400ToI420(const uint8* src_y, int src_stride_y, ...@@ -71,6 +71,8 @@ int I400ToI420(const uint8* src_y, int src_stride_y,
uint8* dst_v, int dst_stride_v, uint8* dst_v, int dst_stride_v,
int width, int height); int width, int height);
#define J400ToJ420 I400ToI420
// Convert NV12 to I420. // Convert NV12 to I420.
LIBYUV_API LIBYUV_API
int NV12ToI420(const uint8* src_y, int src_stride_y, int NV12ToI420(const uint8* src_y, int src_stride_y,
......
...@@ -68,20 +68,20 @@ int I411ToARGB(const uint8* src_y, int src_stride_y, ...@@ -68,20 +68,20 @@ int I411ToARGB(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb, uint8* dst_argb, int dst_stride_argb,
int width, int height); int width, int height);
// Convert I400 (grey) to ARGB. // Convert I400 (grey) to ARGB. Reverse of ARGBToI400.
LIBYUV_API LIBYUV_API
int I400ToARGB(const uint8* src_y, int src_stride_y, int I400ToARGB(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb, uint8* dst_argb, int dst_stride_argb,
int width, int height); int width, int height);
// Alias. // Convert J400 (jpeg grey) to ARGB.
#define YToARGB I400ToARGB_Reference
// Convert I400 to ARGB. Reverse of ARGBToI400.
LIBYUV_API LIBYUV_API
int I400ToARGB_Reference(const uint8* src_y, int src_stride_y, int J400ToARGB(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb, uint8* dst_argb, int dst_stride_argb,
int width, int height); int width, int height);
// Alias.
#define YToARGB I400ToARGB
// Convert NV12 to ARGB. // Convert NV12 to ARGB.
LIBYUV_API LIBYUV_API
......
...@@ -45,6 +45,7 @@ int I400ToI400(const uint8* src_y, int src_stride_y, ...@@ -45,6 +45,7 @@ int I400ToI400(const uint8* src_y, int src_stride_y,
uint8* dst_y, int dst_stride_y, uint8* dst_y, int dst_stride_y,
int width, int height); int width, int height);
#define J400ToJ400 I400ToI400
// Copy I422 to I422. // Copy I422 to I422.
#define I422ToI422 I422Copy #define I422ToI422 I422Copy
...@@ -84,6 +85,7 @@ int UYVYToI422(const uint8* src_uyvy, int src_stride_uyvy, ...@@ -84,6 +85,7 @@ int UYVYToI422(const uint8* src_uyvy, int src_stride_uyvy,
uint8* dst_v, int dst_stride_v, uint8* dst_v, int dst_stride_v,
int width, int height); int width, int height);
// Convert I420 to I400. (calls CopyPlane ignoring u/v). // Convert I420 to I400. (calls CopyPlane ignoring u/v).
LIBYUV_API LIBYUV_API
int I420ToI400(const uint8* src_y, int src_stride_y, int I420ToI400(const uint8* src_y, int src_stride_y,
...@@ -93,6 +95,7 @@ int I420ToI400(const uint8* src_y, int src_stride_y, ...@@ -93,6 +95,7 @@ int I420ToI400(const uint8* src_y, int src_stride_y,
int width, int height); int width, int height);
// Alias // Alias
#define J420ToJ400 I420ToI400
#define I420ToI420Mirror I420Mirror #define I420ToI420Mirror I420Mirror
// I420 mirror. // I420 mirror.
......
...@@ -81,7 +81,7 @@ extern "C" { ...@@ -81,7 +81,7 @@ extern "C" {
#define HAS_BGRATOYROW_SSSE3 #define HAS_BGRATOYROW_SSSE3
#define HAS_COPYROW_ERMS #define HAS_COPYROW_ERMS
#define HAS_COPYROW_SSE2 #define HAS_COPYROW_SSE2
#define HAS_I400TOARGBROW_SSE2 #define HAS_J400TOARGBROW_SSE2
#define HAS_I411TOARGBROW_SSSE3 #define HAS_I411TOARGBROW_SSSE3
#define HAS_I422TOABGRROW_SSSE3 #define HAS_I422TOABGRROW_SSSE3
#define HAS_I422TOARGB1555ROW_SSSE3 #define HAS_I422TOARGB1555ROW_SSSE3
...@@ -119,7 +119,7 @@ extern "C" { ...@@ -119,7 +119,7 @@ extern "C" {
#define HAS_UYVYTOUV422ROW_SSE2 #define HAS_UYVYTOUV422ROW_SSE2
#define HAS_UYVYTOUVROW_SSE2 #define HAS_UYVYTOUVROW_SSE2
#define HAS_UYVYTOYROW_SSE2 #define HAS_UYVYTOYROW_SSE2
#define HAS_YTOARGBROW_SSE2 #define HAS_I400TOARGBROW_SSE2
#define HAS_YUY2TOARGBROW_SSSE3 #define HAS_YUY2TOARGBROW_SSSE3
#define HAS_YUY2TOUV422ROW_SSE2 #define HAS_YUY2TOUV422ROW_SSE2
#define HAS_YUY2TOUVROW_SSE2 #define HAS_YUY2TOUVROW_SSE2
...@@ -199,7 +199,7 @@ extern "C" { ...@@ -199,7 +199,7 @@ extern "C" {
#define HAS_I422TOARGB4444ROW_AVX2 #define HAS_I422TOARGB4444ROW_AVX2
#define HAS_I444TOARGBROW_AVX2 #define HAS_I444TOARGBROW_AVX2
#define HAS_I411TOARGBROW_AVX2 #define HAS_I411TOARGBROW_AVX2
#define HAS_I400TOARGBROW_AVX2 #define HAS_J400TOARGBROW_AVX2
// TODO(fbarchard): Port to Neon // TODO(fbarchard): Port to Neon
#define HAS_ARGBTORGB565DITHERROW_SSE2 #define HAS_ARGBTORGB565DITHERROW_SSE2
#define HAS_ARGBTORGB565DITHERROW_AVX2 #define HAS_ARGBTORGB565DITHERROW_AVX2
...@@ -228,7 +228,7 @@ extern "C" { ...@@ -228,7 +228,7 @@ extern "C" {
#define HAS_UYVYTOUV422ROW_AVX2 #define HAS_UYVYTOUV422ROW_AVX2
#define HAS_UYVYTOUVROW_AVX2 #define HAS_UYVYTOUVROW_AVX2
#define HAS_UYVYTOYROW_AVX2 #define HAS_UYVYTOYROW_AVX2
#define HAS_YTOARGBROW_AVX2 #define HAS_I400TOARGBROW_AVX2
#define HAS_YUY2TOUV422ROW_AVX2 #define HAS_YUY2TOUV422ROW_AVX2
#define HAS_YUY2TOUVROW_AVX2 #define HAS_YUY2TOUVROW_AVX2
#define HAS_YUY2TOYROW_AVX2 #define HAS_YUY2TOYROW_AVX2
...@@ -299,7 +299,7 @@ extern "C" { ...@@ -299,7 +299,7 @@ extern "C" {
#define HAS_BGRATOUVROW_NEON #define HAS_BGRATOUVROW_NEON
#define HAS_BGRATOYROW_NEON #define HAS_BGRATOYROW_NEON
#define HAS_COPYROW_NEON #define HAS_COPYROW_NEON
#define HAS_I400TOARGBROW_NEON #define HAS_J400TOARGBROW_NEON
#define HAS_I411TOARGBROW_NEON #define HAS_I411TOARGBROW_NEON
#define HAS_I422TOABGRROW_NEON #define HAS_I422TOABGRROW_NEON
#define HAS_I422TOARGB1555ROW_NEON #define HAS_I422TOARGB1555ROW_NEON
...@@ -338,7 +338,7 @@ extern "C" { ...@@ -338,7 +338,7 @@ extern "C" {
#define HAS_UYVYTOUV422ROW_NEON #define HAS_UYVYTOUV422ROW_NEON
#define HAS_UYVYTOUVROW_NEON #define HAS_UYVYTOUVROW_NEON
#define HAS_UYVYTOYROW_NEON #define HAS_UYVYTOYROW_NEON
#define HAS_YTOARGBROW_NEON #define HAS_I400TOARGBROW_NEON
#define HAS_YUY2TOARGBROW_NEON #define HAS_YUY2TOARGBROW_NEON
#define HAS_YUY2TOUV422ROW_NEON #define HAS_YUY2TOUV422ROW_NEON
#define HAS_YUY2TOUVROW_NEON #define HAS_YUY2TOUVROW_NEON
...@@ -936,13 +936,13 @@ void ARGBToRGB565Row_C(const uint8* src_argb, uint8* dst_rgb, int pix); ...@@ -936,13 +936,13 @@ void ARGBToRGB565Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
void ARGBToARGB1555Row_C(const uint8* src_argb, uint8* dst_rgb, int pix); void ARGBToARGB1555Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
void ARGBToARGB4444Row_C(const uint8* src_argb, uint8* dst_rgb, int pix); void ARGBToARGB4444Row_C(const uint8* src_argb, uint8* dst_rgb, int pix);
void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix); void J400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix);
void I400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int pix); void J400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int pix);
void I400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int pix); void J400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int pix);
void I400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int pix); void J400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int pix);
void I400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int pix); void J400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int pix);
void I400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int pix); void J400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int pix);
void I400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int pix); void J400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int pix);
void I444ToARGBRow_C(const uint8* src_y, void I444ToARGBRow_C(const uint8* src_y,
const uint8* src_u, const uint8* src_u,
...@@ -1335,27 +1335,13 @@ void I422ToRAWRow_Any_SSSE3(const uint8* src_y, ...@@ -1335,27 +1335,13 @@ void I422ToRAWRow_Any_SSSE3(const uint8* src_y,
uint8* dst_argb, uint8* dst_argb,
int width); int width);
void YToARGBRow_C(const uint8* src_y, void I400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int width);
uint8* dst_argb, void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int width);
int width); void I400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int width);
void YToARGBRow_SSE2(const uint8* src_y, void I400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int width);
uint8* dst_argb, void I400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width);
int width); void I400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width);
void YToARGBRow_AVX2(const uint8* src_y, void I400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width);
uint8* dst_argb,
int width);
void YToARGBRow_NEON(const uint8* src_y,
uint8* dst_argb,
int width);
void YToARGBRow_Any_SSE2(const uint8* src_y,
uint8* dst_argb,
int width);
void YToARGBRow_Any_AVX2(const uint8* src_y,
uint8* dst_argb,
int width);
void YToARGBRow_Any_NEON(const uint8* src_y,
uint8* dst_argb,
int width);
// ARGB preattenuated alpha blend. // ARGB preattenuated alpha blend.
void ARGBBlendRow_SSSE3(const uint8* src_argb, const uint8* src_argb1, void ARGBBlendRow_SSSE3(const uint8* src_argb, const uint8* src_argb1,
......
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 1330 #define LIBYUV_VERSION 1333
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
...@@ -259,13 +259,13 @@ int I411ToARGB(const uint8* src_y, int src_stride_y, ...@@ -259,13 +259,13 @@ int I411ToARGB(const uint8* src_y, int src_stride_y,
// Convert I400 to ARGB. // Convert I400 to ARGB.
LIBYUV_API LIBYUV_API
int I400ToARGB_Reference(const uint8* src_y, int src_stride_y, int I400ToARGB(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb, uint8* dst_argb, int dst_stride_argb,
int width, int height) { int width, int height) {
int y; int y;
void (*YToARGBRow)(const uint8* y_buf, void (*I400ToARGBRow)(const uint8* y_buf,
uint8* rgb_buf, uint8* rgb_buf,
int width) = YToARGBRow_C; int width) = I400ToARGBRow_C;
if (!src_y || !dst_argb || if (!src_y || !dst_argb ||
width <= 0 || height == 0) { width <= 0 || height == 0) {
return -1; return -1;
...@@ -283,47 +283,47 @@ int I400ToARGB_Reference(const uint8* src_y, int src_stride_y, ...@@ -283,47 +283,47 @@ int I400ToARGB_Reference(const uint8* src_y, int src_stride_y,
height = 1; height = 1;
src_stride_y = dst_stride_argb = 0; src_stride_y = dst_stride_argb = 0;
} }
#if defined(HAS_YTOARGBROW_SSE2) #if defined(HAS_I400TOARGBROW_SSE2)
if (TestCpuFlag(kCpuHasSSE2)) { if (TestCpuFlag(kCpuHasSSE2)) {
YToARGBRow = YToARGBRow_Any_SSE2; I400ToARGBRow = I400ToARGBRow_Any_SSE2;
if (IS_ALIGNED(width, 8)) { if (IS_ALIGNED(width, 8)) {
YToARGBRow = YToARGBRow_SSE2; I400ToARGBRow = I400ToARGBRow_SSE2;
} }
} }
#endif #endif
#if defined(HAS_YTOARGBROW_AVX2) #if defined(HAS_I400TOARGBROW_AVX2)
if (TestCpuFlag(kCpuHasAVX2)) { if (TestCpuFlag(kCpuHasAVX2)) {
YToARGBRow = YToARGBRow_Any_AVX2; I400ToARGBRow = I400ToARGBRow_Any_AVX2;
if (IS_ALIGNED(width, 16)) { if (IS_ALIGNED(width, 16)) {
YToARGBRow = YToARGBRow_AVX2; I400ToARGBRow = I400ToARGBRow_AVX2;
} }
} }
#endif #endif
#if defined(HAS_YTOARGBROW_NEON) #if defined(HAS_I400TOARGBROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) { if (TestCpuFlag(kCpuHasNEON)) {
YToARGBRow = YToARGBRow_Any_NEON; I400ToARGBRow = I400ToARGBRow_Any_NEON;
if (IS_ALIGNED(width, 8)) { if (IS_ALIGNED(width, 8)) {
YToARGBRow = YToARGBRow_NEON; I400ToARGBRow = I400ToARGBRow_NEON;
} }
} }
#endif #endif
for (y = 0; y < height; ++y) { for (y = 0; y < height; ++y) {
YToARGBRow(src_y, dst_argb, width); I400ToARGBRow(src_y, dst_argb, width);
dst_argb += dst_stride_argb; dst_argb += dst_stride_argb;
src_y += src_stride_y; src_y += src_stride_y;
} }
return 0; return 0;
} }
// Convert I400 to ARGB. // Convert J400 to ARGB.
LIBYUV_API LIBYUV_API
int I400ToARGB(const uint8* src_y, int src_stride_y, int J400ToARGB(const uint8* src_y, int src_stride_y,
uint8* dst_argb, int dst_stride_argb, uint8* dst_argb, int dst_stride_argb,
int width, int height) { int width, int height) {
int y; int y;
void (*I400ToARGBRow)(const uint8* src_y, uint8* dst_argb, int pix) = void (*J400ToARGBRow)(const uint8* src_y, uint8* dst_argb, int pix) =
I400ToARGBRow_C; J400ToARGBRow_C;
if (!src_y || !dst_argb || if (!src_y || !dst_argb ||
width <= 0 || height == 0) { width <= 0 || height == 0) {
return -1; return -1;
...@@ -341,32 +341,32 @@ int I400ToARGB(const uint8* src_y, int src_stride_y, ...@@ -341,32 +341,32 @@ int I400ToARGB(const uint8* src_y, int src_stride_y,
height = 1; height = 1;
src_stride_y = dst_stride_argb = 0; src_stride_y = dst_stride_argb = 0;
} }
#if defined(HAS_I400TOARGBROW_SSE2) #if defined(HAS_J400TOARGBROW_SSE2)
if (TestCpuFlag(kCpuHasSSE2)) { if (TestCpuFlag(kCpuHasSSE2)) {
I400ToARGBRow = I400ToARGBRow_Any_SSE2; J400ToARGBRow = J400ToARGBRow_Any_SSE2;
if (IS_ALIGNED(width, 8)) { if (IS_ALIGNED(width, 8)) {
I400ToARGBRow = I400ToARGBRow_SSE2; J400ToARGBRow = J400ToARGBRow_SSE2;
} }
} }
#endif #endif
#if defined(HAS_I400TOARGBROW_AVX2) #if defined(HAS_J400TOARGBROW_AVX2)
if (TestCpuFlag(kCpuHasAVX2)) { if (TestCpuFlag(kCpuHasAVX2)) {
I400ToARGBRow = I400ToARGBRow_Any_AVX2; J400ToARGBRow = J400ToARGBRow_Any_AVX2;
if (IS_ALIGNED(width, 16)) { if (IS_ALIGNED(width, 16)) {
I400ToARGBRow = I400ToARGBRow_AVX2; J400ToARGBRow = J400ToARGBRow_AVX2;
} }
} }
#endif #endif
#if defined(HAS_I400TOARGBROW_NEON) #if defined(HAS_J400TOARGBROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) { if (TestCpuFlag(kCpuHasNEON)) {
I400ToARGBRow = I400ToARGBRow_Any_NEON; J400ToARGBRow = J400ToARGBRow_Any_NEON;
if (IS_ALIGNED(width, 8)) { if (IS_ALIGNED(width, 8)) {
I400ToARGBRow = I400ToARGBRow_NEON; J400ToARGBRow = J400ToARGBRow_NEON;
} }
} }
#endif #endif
for (y = 0; y < height; ++y) { for (y = 0; y < height; ++y) {
I400ToARGBRow(src_y, dst_argb, width); J400ToARGBRow(src_y, dst_argb, width);
src_y += src_stride_y; src_y += src_stride_y;
dst_argb += dst_stride_argb; dst_argb += dst_stride_argb;
} }
......
...@@ -191,18 +191,18 @@ RGBANY(ARGBToARGB4444Row_Any_AVX2, ARGBToARGB4444Row_AVX2, ARGBToARGB4444Row_C, ...@@ -191,18 +191,18 @@ RGBANY(ARGBToARGB4444Row_Any_AVX2, ARGBToARGB4444Row_AVX2, ARGBToARGB4444Row_C,
4, 2, 7) 4, 2, 7)
#endif #endif
#if defined(HAS_J400TOARGBROW_SSE2)
RGBANY(J400ToARGBRow_Any_SSE2, J400ToARGBRow_SSE2, J400ToARGBRow_C, 1, 4, 7)
#endif
#if defined(HAS_J400TOARGBROW_AVX2)
RGBANY(J400ToARGBRow_Any_AVX2, J400ToARGBRow_AVX2, J400ToARGBRow_C, 1, 4, 15)
#endif
#if defined(HAS_I400TOARGBROW_SSE2) #if defined(HAS_I400TOARGBROW_SSE2)
RGBANY(I400ToARGBRow_Any_SSE2, I400ToARGBRow_SSE2, I400ToARGBRow_C, 1, 4, 7) RGBANY(I400ToARGBRow_Any_SSE2, I400ToARGBRow_SSE2, I400ToARGBRow_C, 1, 4, 7)
#endif #endif
#if defined(HAS_I400TOARGBROW_AVX2) #if defined(HAS_I400TOARGBROW_AVX2)
RGBANY(I400ToARGBRow_Any_AVX2, I400ToARGBRow_AVX2, I400ToARGBRow_C, 1, 4, 15) RGBANY(I400ToARGBRow_Any_AVX2, I400ToARGBRow_AVX2, I400ToARGBRow_C, 1, 4, 15)
#endif #endif
#if defined(HAS_YTOARGBROW_SSE2)
RGBANY(YToARGBRow_Any_SSE2, YToARGBRow_SSE2, YToARGBRow_C, 1, 4, 7)
#endif
#if defined(HAS_YTOARGBROW_AVX2)
RGBANY(YToARGBRow_Any_AVX2, YToARGBRow_AVX2, YToARGBRow_C, 1, 4, 15)
#endif
#if defined(HAS_YUY2TOARGBROW_SSSE3) #if defined(HAS_YUY2TOARGBROW_SSSE3)
RGBANY(YUY2ToARGBRow_Any_SSSE3, YUY2ToARGBRow_SSSE3, YUY2ToARGBRow_C, 2, 4, 15) RGBANY(YUY2ToARGBRow_Any_SSSE3, YUY2ToARGBRow_SSSE3, YUY2ToARGBRow_C, 2, 4, 15)
RGBANY(UYVYToARGBRow_Any_SSSE3, UYVYToARGBRow_SSSE3, UYVYToARGBRow_C, 2, 4, 15) RGBANY(UYVYToARGBRow_Any_SSSE3, UYVYToARGBRow_SSSE3, UYVYToARGBRow_C, 2, 4, 15)
...@@ -229,8 +229,8 @@ RGBANY(ARGBToARGB1555Row_Any_NEON, ARGBToARGB1555Row_NEON, ARGBToARGB1555Row_C, ...@@ -229,8 +229,8 @@ RGBANY(ARGBToARGB1555Row_Any_NEON, ARGBToARGB1555Row_NEON, ARGBToARGB1555Row_C,
4, 2, 7) 4, 2, 7)
RGBANY(ARGBToARGB4444Row_Any_NEON, ARGBToARGB4444Row_NEON, ARGBToARGB4444Row_C, RGBANY(ARGBToARGB4444Row_Any_NEON, ARGBToARGB4444Row_NEON, ARGBToARGB4444Row_C,
4, 2, 7) 4, 2, 7)
RGBANY(J400ToARGBRow_Any_NEON, J400ToARGBRow_NEON, J400ToARGBRow_C, 1, 4, 7)
RGBANY(I400ToARGBRow_Any_NEON, I400ToARGBRow_NEON, I400ToARGBRow_C, 1, 4, 7) RGBANY(I400ToARGBRow_Any_NEON, I400ToARGBRow_NEON, I400ToARGBRow_C, 1, 4, 7)
RGBANY(YToARGBRow_Any_NEON, YToARGBRow_NEON, YToARGBRow_C, 1, 4, 7)
RGBANY(YUY2ToARGBRow_Any_NEON, YUY2ToARGBRow_NEON, YUY2ToARGBRow_C, 2, 4, 7) RGBANY(YUY2ToARGBRow_Any_NEON, YUY2ToARGBRow_NEON, YUY2ToARGBRow_C, 2, 4, 7)
RGBANY(UYVYToARGBRow_Any_NEON, UYVYToARGBRow_NEON, UYVYToARGBRow_C, 2, 4, 7) RGBANY(UYVYToARGBRow_Any_NEON, UYVYToARGBRow_NEON, UYVYToARGBRow_C, 2, 4, 7)
#endif #endif
......
...@@ -982,7 +982,7 @@ void SobelXYRow_C(const uint8* src_sobelx, const uint8* src_sobely, ...@@ -982,7 +982,7 @@ void SobelXYRow_C(const uint8* src_sobelx, const uint8* src_sobely,
} }
} }
void I400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int width) { void J400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int width) {
// Copy a Y to RGB. // Copy a Y to RGB.
int x; int x;
for (x = 0; x < width; ++x) { for (x = 0; x < width; ++x) {
...@@ -1612,7 +1612,7 @@ void I422ToRGBARow_C(const uint8* src_y, ...@@ -1612,7 +1612,7 @@ void I422ToRGBARow_C(const uint8* src_y,
} }
} }
void YToARGBRow_C(const uint8* src_y, uint8* rgb_buf, int width) { void I400ToARGBRow_C(const uint8* src_y, uint8* rgb_buf, int width) {
int x; int x;
for (x = 0; x < width - 1; x += 2) { for (x = 0; x < width - 1; x += 2) {
YPixel(src_y[0], rgb_buf + 0, rgb_buf + 1, rgb_buf + 2); YPixel(src_y[0], rgb_buf + 0, rgb_buf + 1, rgb_buf + 2);
......
...@@ -531,9 +531,9 @@ void I422ToARGB4444Row_NEON(const uint8* src_y, ...@@ -531,9 +531,9 @@ void I422ToARGB4444Row_NEON(const uint8* src_y,
); );
} }
void YToARGBRow_NEON(const uint8* src_y, void I400ToARGBRow_NEON(const uint8* src_y,
uint8* dst_argb, uint8* dst_argb,
int width) { int width) {
asm volatile ( asm volatile (
YUV422TORGB_SETUP_REG YUV422TORGB_SETUP_REG
".p2align 2 \n" ".p2align 2 \n"
...@@ -557,12 +557,12 @@ void YToARGBRow_NEON(const uint8* src_y, ...@@ -557,12 +557,12 @@ void YToARGBRow_NEON(const uint8* src_y,
); );
} }
void I400ToARGBRow_NEON(const uint8* src_y, void J400ToARGBRow_NEON(const uint8* src_y,
uint8* dst_argb, uint8* dst_argb,
int width) { int width) {
asm volatile ( asm volatile (
".p2align 2 \n"
"vmov.u8 d23, #255 \n" "vmov.u8 d23, #255 \n"
".p2align 2 \n"
"1: \n" "1: \n"
MEMACCESS(0) MEMACCESS(0)
"vld1.8 {d20}, [%0]! \n" "vld1.8 {d20}, [%0]! \n"
......
...@@ -513,10 +513,10 @@ void I422ToARGB4444Row_NEON(const uint8* src_y, ...@@ -513,10 +513,10 @@ void I422ToARGB4444Row_NEON(const uint8* src_y,
} }
#endif // HAS_I422TOARGB4444ROW_NEON #endif // HAS_I422TOARGB4444ROW_NEON
#ifdef HAS_YTOARGBROW_NEON #ifdef HAS_I400TOARGBROW_NEON
void YToARGBRow_NEON(const uint8* src_y, void I400ToARGBRow_NEON(const uint8* src_y,
uint8* dst_argb, uint8* dst_argb,
int width) { int width) {
asm volatile ( asm volatile (
YUV422TORGB_SETUP_REG YUV422TORGB_SETUP_REG
"1: \n" "1: \n"
...@@ -536,10 +536,10 @@ void YToARGBRow_NEON(const uint8* src_y, ...@@ -536,10 +536,10 @@ void YToARGBRow_NEON(const uint8* src_y,
"v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30" "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30"
); );
} }
#endif // HAS_YTOARGBROW_NEON #endif // HAS_I400TOARGBROW_NEON
#ifdef HAS_I400TOARGBROW_NEON #ifdef HAS_J400TOARGBROW_NEON
void I400ToARGBRow_NEON(const uint8* src_y, void J400ToARGBRow_NEON(const uint8* src_y,
uint8* dst_argb, uint8* dst_argb,
int width) { int width) {
asm volatile ( asm volatile (
...@@ -560,7 +560,7 @@ void I400ToARGBRow_NEON(const uint8* src_y, ...@@ -560,7 +560,7 @@ void I400ToARGBRow_NEON(const uint8* src_y,
: "cc", "memory", "v20", "v21", "v22", "v23" : "cc", "memory", "v20", "v21", "v22", "v23"
); );
} }
#endif // HAS_I400TOARGBROW_NEON #endif // HAS_J400TOARGBROW_NEON
#ifdef HAS_NV12TOARGBROW_NEON #ifdef HAS_NV12TOARGBROW_NEON
void NV12ToARGBRow_NEON(const uint8* src_y, void NV12ToARGBRow_NEON(const uint8* src_y,
......
...@@ -236,8 +236,8 @@ void TestRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix) { ...@@ -236,8 +236,8 @@ void TestRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix) {
} }
#endif // TESTING #endif // TESTING
#ifdef HAS_I400TOARGBROW_SSE2 #ifdef HAS_J400TOARGBROW_SSE2
void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix) { void J400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix) {
asm volatile ( asm volatile (
"pcmpeqb %%xmm5,%%xmm5 \n" "pcmpeqb %%xmm5,%%xmm5 \n"
"pslld $0x18,%%xmm5 \n" "pslld $0x18,%%xmm5 \n"
...@@ -262,7 +262,7 @@ void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix) { ...@@ -262,7 +262,7 @@ void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix) {
:: "memory", "cc", "xmm0", "xmm1", "xmm5" :: "memory", "cc", "xmm0", "xmm1", "xmm5"
); );
} }
#endif // HAS_I400TOARGBROW_SSE2 #endif // HAS_J400TOARGBROW_SSE2
#ifdef HAS_RGB24TOARGBROW_SSSE3 #ifdef HAS_RGB24TOARGBROW_SSSE3
void RGB24ToARGBRow_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int pix) { void RGB24ToARGBRow_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int pix) {
...@@ -2066,8 +2066,8 @@ void OMITFP I422ToRGBARow_AVX2(const uint8* y_buf, ...@@ -2066,8 +2066,8 @@ void OMITFP I422ToRGBARow_AVX2(const uint8* y_buf,
} }
#endif // HAS_I422TORGBAROW_AVX2 #endif // HAS_I422TORGBAROW_AVX2
#ifdef HAS_YTOARGBROW_SSE2 #ifdef HAS_I400TOARGBROW_SSE2
void YToARGBRow_SSE2(const uint8* y_buf, uint8* dst_argb, int width) { void I400ToARGBRow_SSE2(const uint8* y_buf, uint8* dst_argb, int width) {
asm volatile ( asm volatile (
"mov $0x4a354a35,%%eax \n" // 4a35 = 18997 = 1.164 "mov $0x4a354a35,%%eax \n" // 4a35 = 18997 = 1.164
"movd %%eax,%%xmm2 \n" "movd %%eax,%%xmm2 \n"
...@@ -2109,12 +2109,12 @@ void YToARGBRow_SSE2(const uint8* y_buf, uint8* dst_argb, int width) { ...@@ -2109,12 +2109,12 @@ void YToARGBRow_SSE2(const uint8* y_buf, uint8* dst_argb, int width) {
, "xmm0", "xmm1", "xmm2", "xmm3", "xmm4" , "xmm0", "xmm1", "xmm2", "xmm3", "xmm4"
); );
} }
#endif // HAS_YTOARGBROW_SSE2 #endif // HAS_I400TOARGBROW_SSE2
#ifdef HAS_YTOARGBROW_AVX2 #ifdef HAS_I400TOARGBROW_AVX2
// 16 pixels of Y converted to 16 pixels of ARGB (64 bytes). // 16 pixels of Y converted to 16 pixels of ARGB (64 bytes).
// note: vpunpcklbw mutates and vpackuswb unmutates. // note: vpunpcklbw mutates and vpackuswb unmutates.
void YToARGBRow_AVX2(const uint8* y_buf, uint8* dst_argb, int width) { void I400ToARGBRow_AVX2(const uint8* y_buf, uint8* dst_argb, int width) {
asm volatile ( asm volatile (
"mov $0x4a354a35,%%eax \n" // 0488 = 1160 = 1.164 * 16 "mov $0x4a354a35,%%eax \n" // 0488 = 1160 = 1.164 * 16
"vmovd %%eax,%%xmm2 \n" "vmovd %%eax,%%xmm2 \n"
...@@ -2156,7 +2156,7 @@ void YToARGBRow_AVX2(const uint8* y_buf, uint8* dst_argb, int width) { ...@@ -2156,7 +2156,7 @@ void YToARGBRow_AVX2(const uint8* y_buf, uint8* dst_argb, int width) {
, "xmm0", "xmm1", "xmm2", "xmm3", "xmm4" , "xmm0", "xmm1", "xmm2", "xmm3", "xmm4"
); );
} }
#endif // HAS_YTOARGBROW_AVX2 #endif // HAS_I400TOARGBROW_AVX2
#ifdef HAS_MIRRORROW_SSSE3 #ifdef HAS_MIRRORROW_SSSE3
// Shuffle table for reversing the bytes. // Shuffle table for reversing the bytes.
......
...@@ -324,7 +324,7 @@ static const uvec8 kShuffleMaskARGBToRAW_0 = { ...@@ -324,7 +324,7 @@ static const uvec8 kShuffleMaskARGBToRAW_0 = {
// Duplicates gray value 3 times and fills in alpha opaque. // Duplicates gray value 3 times and fills in alpha opaque.
__declspec(naked) __declspec(align(16)) __declspec(naked) __declspec(align(16))
void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix) { void J400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix) {
__asm { __asm {
mov eax, [esp + 4] // src_y mov eax, [esp + 4] // src_y
mov edx, [esp + 8] // dst_argb mov edx, [esp + 8] // dst_argb
...@@ -350,10 +350,10 @@ void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix) { ...@@ -350,10 +350,10 @@ void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int pix) {
} }
} }
#ifdef HAS_I400TOARGBROW_AVX2 #ifdef HAS_J400TOARGBROW_AVX2
// Duplicates gray value 3 times and fills in alpha opaque. // Duplicates gray value 3 times and fills in alpha opaque.
__declspec(naked) __declspec(align(16)) __declspec(naked) __declspec(align(16))
void I400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int pix) { void J400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int pix) {
__asm { __asm {
mov eax, [esp + 4] // src_y mov eax, [esp + 4] // src_y
mov edx, [esp + 8] // dst_argb mov edx, [esp + 8] // dst_argb
...@@ -380,7 +380,7 @@ void I400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int pix) { ...@@ -380,7 +380,7 @@ void I400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int pix) {
ret ret
} }
} }
#endif // HAS_I400TOARGBROW_AVX2 #endif // HAS_J400TOARGBROW_AVX2
__declspec(naked) __declspec(align(16)) __declspec(naked) __declspec(align(16))
void RGB24ToARGBRow_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int pix) { void RGB24ToARGBRow_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int pix) {
...@@ -2787,12 +2787,12 @@ void I422ToRGBARow_SSSE3(const uint8* y_buf, ...@@ -2787,12 +2787,12 @@ void I422ToRGBARow_SSSE3(const uint8* y_buf,
#endif // HAS_I422TOARGBROW_SSSE3 #endif // HAS_I422TOARGBROW_SSSE3
#ifdef HAS_YTOARGBROW_SSE2 #ifdef HAS_I400TOARGBROW_SSE2
// 8 pixels of Y converted to 8 pixels of ARGB (32 bytes). // 8 pixels of Y converted to 8 pixels of ARGB (32 bytes).
__declspec(naked) __declspec(align(16)) __declspec(naked) __declspec(align(16))
void YToARGBRow_SSE2(const uint8* y_buf, void I400ToARGBRow_SSE2(const uint8* y_buf,
uint8* rgb_buf, uint8* rgb_buf,
int width) { int width) {
__asm { __asm {
mov eax, 0x4a354a35 // 4a35 = 18997 = round(1.164 * 64 * 256) mov eax, 0x4a354a35 // 4a35 = 18997 = round(1.164 * 64 * 256)
movd xmm2, eax movd xmm2, eax
...@@ -2832,15 +2832,15 @@ void YToARGBRow_SSE2(const uint8* y_buf, ...@@ -2832,15 +2832,15 @@ void YToARGBRow_SSE2(const uint8* y_buf,
ret ret
} }
} }
#endif // HAS_YTOARGBROW_SSE2 #endif // HAS_I400TOARGBROW_SSE2
#ifdef HAS_YTOARGBROW_AVX2 #ifdef HAS_I400TOARGBROW_AVX2
// 16 pixels of Y converted to 16 pixels of ARGB (64 bytes). // 16 pixels of Y converted to 16 pixels of ARGB (64 bytes).
// note: vpunpcklbw mutates and vpackuswb unmutates. // note: vpunpcklbw mutates and vpackuswb unmutates.
__declspec(naked) __declspec(align(16)) __declspec(naked) __declspec(align(16))
void YToARGBRow_AVX2(const uint8* y_buf, void I400ToARGBRow_AVX2(const uint8* y_buf,
uint8* rgb_buf, uint8* rgb_buf,
int width) { int width) {
__asm { __asm {
mov eax, 0x4a354a35 // 4a35 = 18997 = round(1.164 * 64 * 256) mov eax, 0x4a354a35 // 4a35 = 18997 = round(1.164 * 64 * 256)
vmovd xmm2, eax vmovd xmm2, eax
...@@ -2883,7 +2883,7 @@ void YToARGBRow_AVX2(const uint8* y_buf, ...@@ -2883,7 +2883,7 @@ void YToARGBRow_AVX2(const uint8* y_buf,
ret ret
} }
} }
#endif // HAS_YTOARGBROW_AVX2 #endif // HAS_I400TOARGBROW_AVX2
#ifdef HAS_MIRRORROW_SSSE3 #ifdef HAS_MIRRORROW_SSSE3
// Shuffle table for reversing the bytes. // Shuffle table for reversing the bytes.
......
...@@ -196,7 +196,7 @@ static void YToRGB(int y, int* r, int* g, int* b) { ...@@ -196,7 +196,7 @@ static void YToRGB(int y, int* r, int* g, int* b) {
memset(orig_y, y, kPixels); memset(orig_y, y, kPixels);
/* YUV converted to ARGB. */ /* YUV converted to ARGB. */
YToARGB(orig_y, kWidth, orig_pixels, kWidth * 4, kWidth, kHeight); I400ToARGB(orig_y, kWidth, orig_pixels, kWidth * 4, kWidth, kHeight);
*b = orig_pixels[0]; *b = orig_pixels[0];
*g = orig_pixels[1]; *g = orig_pixels[1];
...@@ -213,7 +213,7 @@ static void YJToRGB(int y, int* r, int* g, int* b) { ...@@ -213,7 +213,7 @@ static void YJToRGB(int y, int* r, int* g, int* b) {
memset(orig_y, y, kPixels); memset(orig_y, y, kPixels);
/* YUV converted to ARGB. */ /* YUV converted to ARGB. */
I400ToARGB(orig_y, kWidth, orig_pixels, kWidth * 4, kWidth, kHeight); J400ToARGB(orig_y, kWidth, orig_pixels, kWidth * 4, kWidth, kHeight);
*b = orig_pixels[0]; *b = orig_pixels[0];
*g = orig_pixels[1]; *g = orig_pixels[1];
......
...@@ -518,6 +518,7 @@ TESTPLANARTOB(I420, 2, 2, UYVY, 2, 4, 1, 1, ARGB, 4) ...@@ -518,6 +518,7 @@ TESTPLANARTOB(I420, 2, 2, UYVY, 2, 4, 1, 1, ARGB, 4)
TESTPLANARTOB(I422, 2, 1, YUY2, 2, 4, 1, 0, ARGB, 4) TESTPLANARTOB(I422, 2, 1, YUY2, 2, 4, 1, 0, ARGB, 4)
TESTPLANARTOB(I422, 2, 1, UYVY, 2, 4, 1, 0, ARGB, 4) TESTPLANARTOB(I422, 2, 1, UYVY, 2, 4, 1, 0, ARGB, 4)
TESTPLANARTOB(I420, 2, 2, I400, 1, 1, 1, 0, ARGB, 4) TESTPLANARTOB(I420, 2, 2, I400, 1, 1, 1, 0, ARGB, 4)
TESTPLANARTOB(J420, 2, 2, J400, 1, 1, 1, 0, ARGB, 4)
#define TESTBIPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \ #define TESTBIPLANARTOBI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \
W1280, DIFF, N, NEG, OFF) \ W1280, DIFF, N, NEG, OFF) \
...@@ -716,6 +717,7 @@ TESTATOPLANAR(UYVY, 2, 1, I420, 2, 2, 2) ...@@ -716,6 +717,7 @@ TESTATOPLANAR(UYVY, 2, 1, I420, 2, 2, 2)
TESTATOPLANAR(YUY2, 2, 1, I422, 2, 1, 2) TESTATOPLANAR(YUY2, 2, 1, I422, 2, 1, 2)
TESTATOPLANAR(UYVY, 2, 1, I422, 2, 1, 2) TESTATOPLANAR(UYVY, 2, 1, I422, 2, 1, 2)
TESTATOPLANAR(I400, 1, 1, I420, 2, 2, 2) TESTATOPLANAR(I400, 1, 1, I420, 2, 2, 2)
TESTATOPLANAR(J400, 1, 1, J420, 2, 2, 2)
#define TESTATOBIPLANARI(FMT_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \ #define TESTATOBIPLANARI(FMT_A, BPP_A, FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, \
W1280, N, NEG, OFF) \ W1280, N, NEG, OFF) \
...@@ -927,9 +929,10 @@ TESTATOB(ARGB4444, 2, 2, 1, ARGB, 4, 4, 1, 0) ...@@ -927,9 +929,10 @@ TESTATOB(ARGB4444, 2, 2, 1, ARGB, 4, 4, 1, 0)
TESTATOB(YUY2, 2, 4, 1, ARGB, 4, 4, 1, 4) TESTATOB(YUY2, 2, 4, 1, ARGB, 4, 4, 1, 4)
TESTATOB(UYVY, 2, 4, 1, ARGB, 4, 4, 1, 4) TESTATOB(UYVY, 2, 4, 1, ARGB, 4, 4, 1, 4)
TESTATOB(I400, 1, 1, 1, ARGB, 4, 4, 1, 0) TESTATOB(I400, 1, 1, 1, ARGB, 4, 4, 1, 0)
TESTATOB(J400, 1, 1, 1, ARGB, 4, 4, 1, 0)
TESTATOB(I400, 1, 1, 1, I400, 1, 1, 1, 0) TESTATOB(I400, 1, 1, 1, I400, 1, 1, 1, 0)
TESTATOB(J400, 1, 1, 1, J400, 1, 1, 1, 0)
TESTATOB(I400, 1, 1, 1, I400Mirror, 1, 1, 1, 0) TESTATOB(I400, 1, 1, 1, I400Mirror, 1, 1, 1, 0)
TESTATOB(Y, 1, 1, 1, ARGB, 4, 4, 1, 0)
TESTATOB(ARGB, 4, 4, 1, ARGBMirror, 4, 4, 1, 0) TESTATOB(ARGB, 4, 4, 1, ARGBMirror, 4, 4, 1, 0)
#define TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, \ #define TESTATOBDI(FMT_A, BPP_A, STRIDE_A, HEIGHT_A, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment