Commit dbcabea0 authored by fbarchard@google.com's avatar fbarchard@google.com

move rgb565 wrapper to common so it wont inline

BUG=137
TEST=hammer builds
Review URL: https://webrtc-codereview.appspot.com/930006

git-svn-id: http://libyuv.googlecode.com/svn/trunk@455 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 708a11c2
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 453 Version: 455
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
...@@ -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 453 #define LIBYUV_VERSION 455
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
...@@ -1443,6 +1443,28 @@ void I422ToUYVYRow_C(const uint8* src_y, ...@@ -1443,6 +1443,28 @@ void I422ToUYVYRow_C(const uint8* src_y,
} }
} }
#if defined(__x86_64__) || defined(__i386__)
void I422ToRGB565Row_SSSE3(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
int width) {
SIMD_ALIGNED(uint8 row[kMaxStride]);
I422ToARGBRow_SSSE3(y_buf, u_buf, v_buf, row, width);
ARGBToRGB565Row_SSE2(row, rgb_buf, width);
}
void I422ToRGB565Row_Unaligned_SSSE3(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
int width) {
SIMD_ALIGNED(uint8 row[kMaxStride]);
I422ToARGBRow_SSSE3(y_buf, u_buf, v_buf, row, width);
ARGBToRGB565Row_SSE2(row, rgb_buf, width);
}
#endif // defined(__x86_64__) || defined(__i386__)
#ifdef __cplusplus #ifdef __cplusplus
} // extern "C" } // extern "C"
} // namespace libyuv } // namespace libyuv
......
...@@ -24,10 +24,8 @@ extern "C" { ...@@ -24,10 +24,8 @@ extern "C" {
// TODO(fbarchard): Use static const when gcc 4.2 support is dropped. // TODO(fbarchard): Use static const when gcc 4.2 support is dropped.
#ifdef __APPLE__ #ifdef __APPLE__
#define CONST #define CONST
#define NOINLINE __attribute__ ((noinline))
#else #else
#define CONST static const #define CONST static const
#define NOINLINE
#endif #endif
#ifdef HAS_ARGBTOYROW_SSSE3 #ifdef HAS_ARGBTOYROW_SSSE3
...@@ -575,7 +573,7 @@ void ARGBToRAWRow_SSSE3(const uint8* src, uint8* dst, int pix) { ...@@ -575,7 +573,7 @@ void ARGBToRAWRow_SSSE3(const uint8* src, uint8* dst, int pix) {
); );
} }
void ARGBToRGB565Row_SSE2(const uint8* src, uint8* dst, int pix) NOINLINE { void ARGBToRGB565Row_SSE2(const uint8* src, uint8* dst, int pix) {
asm volatile ( asm volatile (
"pcmpeqb %%xmm3,%%xmm3 \n" "pcmpeqb %%xmm3,%%xmm3 \n"
"psrld $0x1b,%%xmm3 \n" "psrld $0x1b,%%xmm3 \n"
...@@ -1770,7 +1768,7 @@ void OMITFP I422ToARGBRow_SSSE3(const uint8* y_buf, ...@@ -1770,7 +1768,7 @@ void OMITFP I422ToARGBRow_SSSE3(const uint8* y_buf,
const uint8* u_buf, const uint8* u_buf,
const uint8* v_buf, const uint8* v_buf,
uint8* argb_buf, uint8* argb_buf,
int width) NOINLINE { int width) {
asm volatile ( asm volatile (
"sub %[u_buf],%[v_buf] \n" "sub %[u_buf],%[v_buf] \n"
"pcmpeqb %%xmm5,%%xmm5 \n" "pcmpeqb %%xmm5,%%xmm5 \n"
...@@ -4278,26 +4276,6 @@ void I422ToUYVYRow_SSE2(const uint8* src_y, ...@@ -4278,26 +4276,6 @@ void I422ToUYVYRow_SSE2(const uint8* src_y,
); );
} }
void I422ToRGB565Row_SSSE3(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
int width) {
SIMD_ALIGNED(uint8 row[kMaxStride]);
I422ToARGBRow_SSSE3(y_buf, u_buf, v_buf, row, width);
ARGBToRGB565Row_SSE2(row, rgb_buf, width);
}
void I422ToRGB565Row_Unaligned_SSSE3(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
int width) {
SIMD_ALIGNED(uint8 row[kMaxStride]);
I422ToARGBRow_SSSE3(y_buf, u_buf, v_buf, row, width);
ARGBToRGB565Row_SSE2(row, rgb_buf, width);
}
#endif // defined(__x86_64__) || defined(__i386__) #endif // defined(__x86_64__) || defined(__i386__)
#ifdef __cplusplus #ifdef __cplusplus
......
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