mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-01-01 03:12:16 +08:00
Fix x86 windows build error
Correct rule for marking relevant functions as available. Fix some clang-tidy issues. R=fbarchard@chromium.org Change-Id: I66fa0d7ae5a681356f94bfc1bc82b7f1f407d5df Bug: libyuv:884, libyuv:885 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2738414 Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
parent
ba033a11e3
commit
d47031c0d4
@ -175,8 +175,6 @@ extern "C" {
|
||||
defined(_MSC_VER)
|
||||
// TODO(fbarchard): fix build error on android_full_debug=1
|
||||
// https://code.google.com/p/libyuv/issues/detail?id=517
|
||||
#define HAS_I210ALPHATOARGBROW_SSSE3
|
||||
#define HAS_I410ALPHATOARGBROW_SSSE3
|
||||
#define HAS_I422ALPHATOARGBROW_SSSE3
|
||||
#define HAS_I444ALPHATOARGBROW_SSSE3
|
||||
#endif
|
||||
@ -242,8 +240,6 @@ extern "C" {
|
||||
defined(_MSC_VER)
|
||||
// TODO(fbarchard): fix build error on android_full_debug=1
|
||||
// https://code.google.com/p/libyuv/issues/detail?id=517
|
||||
#define HAS_I210ALPHATOARGBROW_AVX2
|
||||
#define HAS_I410ALPHATOARGBROW_AVX2
|
||||
#define HAS_I422ALPHATOARGBROW_AVX2
|
||||
#define HAS_I444ALPHATOARGBROW_AVX2
|
||||
#endif
|
||||
@ -302,6 +298,13 @@ extern "C" {
|
||||
#define HAS_SPLITARGBROW_SSSE3
|
||||
#define HAS_SPLITRGBROW_SSSE3
|
||||
#define HAS_SWAPUVROW_SSSE3
|
||||
|
||||
#if defined(__x86_64__) || !defined(__pic__)
|
||||
// TODO(fbarchard): fix build error on android_full_debug=1
|
||||
// https://code.google.com/p/libyuv/issues/detail?id=517
|
||||
#define HAS_I210ALPHATOARGBROW_SSSE3
|
||||
#define HAS_I410ALPHATOARGBROW_SSSE3
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// The following are available for AVX2 gcc/clang x86 platforms:
|
||||
@ -343,6 +346,13 @@ extern "C" {
|
||||
#define HAS_SWAPUVROW_AVX2
|
||||
// TODO(fbarchard): Fix AVX2 version of YUV24
|
||||
// #define HAS_NV21TOYUV24ROW_AVX2
|
||||
|
||||
#if defined(__x86_64__) || !defined(__pic__)
|
||||
// TODO(fbarchard): fix build error on android_full_debug=1
|
||||
// https://code.google.com/p/libyuv/issues/detail?id=517
|
||||
#define HAS_I210ALPHATOARGBROW_AVX2
|
||||
#define HAS_I410ALPHATOARGBROW_AVX2
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// The following are available for AVX512 clang x86 platforms:
|
||||
@ -2690,23 +2700,23 @@ void UYVYToARGBRow_C(const uint8_t* src_uyvy,
|
||||
uint8_t* rgb_buf,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void P210ToARGBRow_C(const uint16_t* y_buf,
|
||||
const uint16_t* uv_buf,
|
||||
void P210ToARGBRow_C(const uint16_t* src_y,
|
||||
const uint16_t* src_uv,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void P410ToARGBRow_C(const uint16_t* y_buf,
|
||||
const uint16_t* uv_buf,
|
||||
void P410ToARGBRow_C(const uint16_t* src_y,
|
||||
const uint16_t* src_uv,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void P210ToAR30Row_C(const uint16_t* y_buf,
|
||||
const uint16_t* uv_buf,
|
||||
void P210ToAR30Row_C(const uint16_t* src_y,
|
||||
const uint16_t* src_uv,
|
||||
uint8_t* dst_ar30,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void P410ToAR30Row_C(const uint16_t* y_buf,
|
||||
const uint16_t* uv_buf,
|
||||
void P410ToAR30Row_C(const uint16_t* src_y,
|
||||
const uint16_t* src_uv,
|
||||
uint8_t* dst_ar30,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
@ -2802,30 +2812,30 @@ void I212ToARGBRow_SSSE3(const uint16_t* y_buf,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I410ToAR30Row_SSSE3(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
uint8_t* rgb_buf,
|
||||
void I410ToAR30Row_SSSE3(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
uint8_t* dst_ar30,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I410ToARGBRow_SSSE3(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
uint8_t* rgb_buf,
|
||||
void I410ToARGBRow_SSSE3(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I210AlphaToARGBRow_SSSE3(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
const uint16_t* src_a,
|
||||
uint8_t* rgb_buf,
|
||||
void I210AlphaToARGBRow_SSSE3(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
const uint16_t* a_buf,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I410AlphaToARGBRow_SSSE3(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
const uint16_t* src_a,
|
||||
uint8_t* rgb_buf,
|
||||
void I410AlphaToARGBRow_SSSE3(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
const uint16_t* a_buf,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I422ToAR30Row_AVX2(const uint8_t* y_buf,
|
||||
@ -2858,30 +2868,30 @@ void I212ToAR30Row_AVX2(const uint16_t* y_buf,
|
||||
uint8_t* dst_ar30,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I410ToAR30Row_AVX2(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
uint8_t* rgb_buf,
|
||||
void I410ToAR30Row_AVX2(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
uint8_t* dst_ar30,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I410ToARGBRow_AVX2(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
uint8_t* rgb_buf,
|
||||
void I410ToARGBRow_AVX2(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I210AlphaToARGBRow_AVX2(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
const uint16_t* src_a,
|
||||
uint8_t* rgb_buf,
|
||||
void I210AlphaToARGBRow_AVX2(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
const uint16_t* a_buf,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I410AlphaToARGBRow_AVX2(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
const uint16_t* src_a,
|
||||
uint8_t* rgb_buf,
|
||||
void I410AlphaToARGBRow_AVX2(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
const uint16_t* a_buf,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I444AlphaToARGBRow_SSSE3(const uint8_t* y_buf,
|
||||
@ -3138,30 +3148,30 @@ void I212ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I410ToAR30Row_Any_SSSE3(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
uint8_t* rgb_buf,
|
||||
void I410ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I410ToARGBRow_Any_SSSE3(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
uint8_t* rgb_buf,
|
||||
void I410ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I210AlphaToARGBRow_Any_SSSE3(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
const uint16_t* src_a,
|
||||
uint8_t* rgb_buf,
|
||||
void I210AlphaToARGBRow_Any_SSSE3(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
const uint16_t* a_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I410AlphaToARGBRow_Any_SSSE3(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
const uint16_t* src_a,
|
||||
uint8_t* rgb_buf,
|
||||
void I410AlphaToARGBRow_Any_SSSE3(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
const uint16_t* a_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I422ToAR30Row_Any_AVX2(const uint8_t* y_buf,
|
||||
@ -3194,30 +3204,30 @@ void I212ToAR30Row_Any_AVX2(const uint16_t* y_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I410ToAR30Row_Any_AVX2(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
uint8_t* rgb_buf,
|
||||
void I410ToAR30Row_Any_AVX2(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I410ToARGBRow_Any_AVX2(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
uint8_t* rgb_buf,
|
||||
void I410ToARGBRow_Any_AVX2(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I210AlphaToARGBRow_Any_AVX2(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
const uint16_t* src_a,
|
||||
uint8_t* rgb_buf,
|
||||
void I210AlphaToARGBRow_Any_AVX2(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
const uint16_t* a_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I410AlphaToARGBRow_Any_AVX2(const uint16_t* src_y,
|
||||
const uint16_t* src_u,
|
||||
const uint16_t* src_v,
|
||||
const uint16_t* src_a,
|
||||
uint8_t* rgb_buf,
|
||||
void I410AlphaToARGBRow_Any_AVX2(const uint16_t* y_buf,
|
||||
const uint16_t* u_buf,
|
||||
const uint16_t* v_buf,
|
||||
const uint16_t* a_buf,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I444AlphaToARGBRow_Any_SSSE3(const uint8_t* y_buf,
|
||||
@ -3320,42 +3330,42 @@ void UYVYToARGBRow_Any_AVX2(const uint8_t* src_ptr,
|
||||
int width);
|
||||
void P210ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
|
||||
const uint16_t* uv_buf,
|
||||
uint8_t* dst_argb,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void P410ToARGBRow_Any_SSSE3(const uint16_t* y_buf,
|
||||
const uint16_t* uv_buf,
|
||||
uint8_t* dst_argb,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void P210ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
|
||||
const uint16_t* uv_buf,
|
||||
uint8_t* dst_ar30,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void P410ToAR30Row_Any_SSSE3(const uint16_t* y_buf,
|
||||
const uint16_t* uv_buf,
|
||||
uint8_t* dst_ar30,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void P210ToARGBRow_Any_AVX2(const uint16_t* y_buf,
|
||||
const uint16_t* uv_buf,
|
||||
uint8_t* dst_argb,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void P410ToARGBRow_Any_AVX2(const uint16_t* y_buf,
|
||||
const uint16_t* uv_buf,
|
||||
uint8_t* dst_argb,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void P210ToAR30Row_Any_AVX2(const uint16_t* y_buf,
|
||||
const uint16_t* uv_buf,
|
||||
uint8_t* dst_ar30,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void P410ToAR30Row_Any_AVX2(const uint16_t* y_buf,
|
||||
const uint16_t* uv_buf,
|
||||
uint8_t* dst_ar30,
|
||||
uint8_t* dst_ptr,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width);
|
||||
void I422ToRGBARow_Any_SSSE3(const uint8_t* y_buf,
|
||||
|
||||
@ -2221,47 +2221,47 @@ void I410ToAR30Row_C(const uint16_t* src_y,
|
||||
// P210 has 10 bits in msb of 16 bit NV12 style layout.
|
||||
void P210ToARGBRow_C(const uint16_t* src_y,
|
||||
const uint16_t* src_uv,
|
||||
uint8_t* rgb_buf,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width) {
|
||||
int x;
|
||||
for (x = 0; x < width - 1; x += 2) {
|
||||
YuvPixel16_8(src_y[0], src_uv[0], src_uv[1], rgb_buf + 0, rgb_buf + 1,
|
||||
rgb_buf + 2, yuvconstants);
|
||||
rgb_buf[3] = 255;
|
||||
YuvPixel16_8(src_y[1], src_uv[0], src_uv[1], rgb_buf + 4, rgb_buf + 5,
|
||||
rgb_buf + 6, yuvconstants);
|
||||
rgb_buf[7] = 255;
|
||||
YuvPixel16_8(src_y[0], src_uv[0], src_uv[1], dst_argb + 0, dst_argb + 1,
|
||||
dst_argb + 2, yuvconstants);
|
||||
dst_argb[3] = 255;
|
||||
YuvPixel16_8(src_y[1], src_uv[0], src_uv[1], dst_argb + 4, dst_argb + 5,
|
||||
dst_argb + 6, yuvconstants);
|
||||
dst_argb[7] = 255;
|
||||
src_y += 2;
|
||||
src_uv += 2;
|
||||
rgb_buf += 8; // Advance 2 pixels.
|
||||
dst_argb += 8; // Advance 2 pixels.
|
||||
}
|
||||
if (width & 1) {
|
||||
YuvPixel16_8(src_y[0], src_uv[0], src_uv[1], rgb_buf + 0, rgb_buf + 1,
|
||||
rgb_buf + 2, yuvconstants);
|
||||
rgb_buf[3] = 255;
|
||||
YuvPixel16_8(src_y[0], src_uv[0], src_uv[1], dst_argb + 0, dst_argb + 1,
|
||||
dst_argb + 2, yuvconstants);
|
||||
dst_argb[3] = 255;
|
||||
}
|
||||
}
|
||||
|
||||
void P410ToARGBRow_C(const uint16_t* src_y,
|
||||
const uint16_t* src_uv,
|
||||
uint8_t* rgb_buf,
|
||||
uint8_t* dst_argb,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width) {
|
||||
int x;
|
||||
for (x = 0; x < width; ++x) {
|
||||
YuvPixel16_8(src_y[0], src_uv[0], src_uv[1], rgb_buf + 0, rgb_buf + 1,
|
||||
rgb_buf + 2, yuvconstants);
|
||||
rgb_buf[3] = 255;
|
||||
YuvPixel16_8(src_y[0], src_uv[0], src_uv[1], dst_argb + 0, dst_argb + 1,
|
||||
dst_argb + 2, yuvconstants);
|
||||
dst_argb[3] = 255;
|
||||
src_y += 1;
|
||||
src_uv += 2;
|
||||
rgb_buf += 4; // Advance 1 pixels.
|
||||
dst_argb += 4; // Advance 1 pixels.
|
||||
}
|
||||
}
|
||||
|
||||
void P210ToAR30Row_C(const uint16_t* src_y,
|
||||
const uint16_t* src_uv,
|
||||
uint8_t* rgb_buf,
|
||||
uint8_t* dst_ar30,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width) {
|
||||
int x;
|
||||
@ -2270,22 +2270,22 @@ void P210ToAR30Row_C(const uint16_t* src_y,
|
||||
int r;
|
||||
for (x = 0; x < width - 1; x += 2) {
|
||||
YuvPixel16_16(src_y[0], src_uv[0], src_uv[1], &b, &g, &r, yuvconstants);
|
||||
StoreAR30(rgb_buf, b, g, r);
|
||||
StoreAR30(dst_ar30, b, g, r);
|
||||
YuvPixel16_16(src_y[1], src_uv[0], src_uv[1], &b, &g, &r, yuvconstants);
|
||||
StoreAR30(rgb_buf + 4, b, g, r);
|
||||
StoreAR30(dst_ar30 + 4, b, g, r);
|
||||
src_y += 2;
|
||||
src_uv += 2;
|
||||
rgb_buf += 8; // Advance 2 pixels.
|
||||
dst_ar30 += 8; // Advance 2 pixels.
|
||||
}
|
||||
if (width & 1) {
|
||||
YuvPixel16_16(src_y[0], src_uv[0], src_uv[1], &b, &g, &r, yuvconstants);
|
||||
StoreAR30(rgb_buf, b, g, r);
|
||||
StoreAR30(dst_ar30, b, g, r);
|
||||
}
|
||||
}
|
||||
|
||||
void P410ToAR30Row_C(const uint16_t* src_y,
|
||||
const uint16_t* src_uv,
|
||||
uint8_t* rgb_buf,
|
||||
uint8_t* dst_ar30,
|
||||
const struct YuvConstants* yuvconstants,
|
||||
int width) {
|
||||
int x;
|
||||
@ -2294,10 +2294,10 @@ void P410ToAR30Row_C(const uint16_t* src_y,
|
||||
int r;
|
||||
for (x = 0; x < width; ++x) {
|
||||
YuvPixel16_16(src_y[0], src_uv[0], src_uv[1], &b, &g, &r, yuvconstants);
|
||||
StoreAR30(rgb_buf, b, g, r);
|
||||
StoreAR30(dst_ar30, b, g, r);
|
||||
src_y += 1;
|
||||
src_uv += 2;
|
||||
rgb_buf += 4; // Advance 1 pixel.
|
||||
dst_ar30 += 4; // Advance 1 pixel.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user