mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-10-28 18:07:12 +08:00
scale warning fixes for unused parameters
BUG=libyuv:680 TEST=builds and runs with no warnings Change-Id: I7d60ef44292fa6ad4f7c4e2e2657359b864d2dab Reviewed-on: https://chromium-review.googlesource.com/442670 Commit-Queue: Frank Barchard <fbarchard@google.com> Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
This commit is contained in:
parent
3eccf7f1d2
commit
bbe8c233f2
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 1643
|
||||
Version: 1644
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 1643
|
||||
#define LIBYUV_VERSION 1644
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
@ -455,8 +455,9 @@ void ErrorHandler(j_common_ptr cinfo) {
|
||||
longjmp(mgr->setjmp_buffer, 1);
|
||||
}
|
||||
|
||||
// Suppress fprintf warnings.
|
||||
void OutputHandler(j_common_ptr cinfo) {
|
||||
// Suppress fprintf warnings.
|
||||
(void)cinfo;
|
||||
}
|
||||
|
||||
#endif // HAVE_SETJMP
|
||||
|
||||
@ -50,6 +50,8 @@ static void ScalePlaneDown2(int src_width,
|
||||
: (filtering == kFilterLinear ? ScaleRowDown2Linear_C
|
||||
: ScaleRowDown2Box_C);
|
||||
int row_stride = src_stride << 1;
|
||||
(void)src_width;
|
||||
(void)src_height;
|
||||
if (!filtering) {
|
||||
src_ptr += src_stride; // Point to odd rows.
|
||||
src_stride = 0;
|
||||
@ -152,6 +154,8 @@ static void ScalePlaneDown2_16(int src_width,
|
||||
: (filtering == kFilterLinear ? ScaleRowDown2Linear_16_C
|
||||
: ScaleRowDown2Box_16_C);
|
||||
int row_stride = src_stride << 1;
|
||||
(void)src_width;
|
||||
(void)src_height;
|
||||
if (!filtering) {
|
||||
src_ptr += src_stride; // Point to odd rows.
|
||||
src_stride = 0;
|
||||
@ -210,6 +214,8 @@ static void ScalePlaneDown4(int src_width,
|
||||
uint8* dst_ptr, int dst_width) =
|
||||
filtering ? ScaleRowDown4Box_C : ScaleRowDown4_C;
|
||||
int row_stride = src_stride << 2;
|
||||
(void)src_width;
|
||||
(void)src_height;
|
||||
if (!filtering) {
|
||||
src_ptr += src_stride * 2; // Point to row 2.
|
||||
src_stride = 0;
|
||||
@ -282,6 +288,8 @@ static void ScalePlaneDown4_16(int src_width,
|
||||
uint16* dst_ptr, int dst_width) =
|
||||
filtering ? ScaleRowDown4Box_16_C : ScaleRowDown4_16_C;
|
||||
int row_stride = src_stride << 2;
|
||||
(void)src_width;
|
||||
(void)src_height;
|
||||
if (!filtering) {
|
||||
src_ptr += src_stride * 2; // Point to row 2.
|
||||
src_stride = 0;
|
||||
@ -318,7 +326,6 @@ static void ScalePlaneDown4_16(int src_width,
|
||||
}
|
||||
|
||||
// Scale plane down, 3/4
|
||||
|
||||
static void ScalePlaneDown34(int src_width,
|
||||
int src_height,
|
||||
int dst_width,
|
||||
@ -334,6 +341,8 @@ static void ScalePlaneDown34(int src_width,
|
||||
void (*ScaleRowDown34_1)(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
const int filter_stride = (filtering == kFilterLinear) ? 0 : src_stride;
|
||||
(void)src_width;
|
||||
(void)src_height;
|
||||
assert(dst_width % 3 == 0);
|
||||
if (!filtering) {
|
||||
ScaleRowDown34_0 = ScaleRowDown34_C;
|
||||
@ -434,6 +443,8 @@ static void ScalePlaneDown34_16(int src_width,
|
||||
void (*ScaleRowDown34_1)(const uint16* src_ptr, ptrdiff_t src_stride,
|
||||
uint16* dst_ptr, int dst_width);
|
||||
const int filter_stride = (filtering == kFilterLinear) ? 0 : src_stride;
|
||||
(void)src_width;
|
||||
(void)src_height;
|
||||
assert(dst_width % 3 == 0);
|
||||
if (!filtering) {
|
||||
ScaleRowDown34_0 = ScaleRowDown34_16_C;
|
||||
@ -532,6 +543,8 @@ static void ScalePlaneDown38(int src_width,
|
||||
uint8* dst_ptr, int dst_width);
|
||||
const int filter_stride = (filtering == kFilterLinear) ? 0 : src_stride;
|
||||
assert(dst_width % 3 == 0);
|
||||
(void)src_width;
|
||||
(void)src_height;
|
||||
if (!filtering) {
|
||||
ScaleRowDown38_3 = ScaleRowDown38_C;
|
||||
ScaleRowDown38_2 = ScaleRowDown38_C;
|
||||
@ -651,6 +664,8 @@ static void ScalePlaneDown38_16(int src_width,
|
||||
void (*ScaleRowDown38_2)(const uint16* src_ptr, ptrdiff_t src_stride,
|
||||
uint16* dst_ptr, int dst_width);
|
||||
const int filter_stride = (filtering == kFilterLinear) ? 0 : src_stride;
|
||||
(void)src_width;
|
||||
(void)src_height;
|
||||
assert(dst_width % 3 == 0);
|
||||
if (!filtering) {
|
||||
ScaleRowDown38_3 = ScaleRowDown38_16_C;
|
||||
|
||||
@ -51,6 +51,9 @@ static void ScaleARGBDown2(int src_width,
|
||||
? ScaleARGBRowDown2_C
|
||||
: (filtering == kFilterLinear ? ScaleARGBRowDown2Linear_C
|
||||
: ScaleARGBRowDown2Box_C);
|
||||
(void)src_width;
|
||||
(void)src_height;
|
||||
(void)dx;
|
||||
assert(dx == 65536 * 2); // Test scale factor of 2.
|
||||
assert((dy & 0x1ffff) == 0); // Test vertical scale is multiple of 2.
|
||||
// Advance to odd row, even column.
|
||||
@ -144,6 +147,9 @@ static void ScaleARGBDown4Box(int src_width,
|
||||
ScaleARGBRowDown2Box_C;
|
||||
// Advance to odd row, even column.
|
||||
src_argb += (y >> 16) * src_stride + (x >> 16) * 4;
|
||||
(void)src_width;
|
||||
(void)src_height;
|
||||
(void)dx;
|
||||
assert(dx == 65536 * 4); // Test scale factor of 4.
|
||||
assert((dy & 0x3ffff) == 0); // Test vertical scale is multiple of 4.
|
||||
#if defined(HAS_SCALEARGBROWDOWN2_SSE2)
|
||||
@ -196,6 +202,8 @@ static void ScaleARGBDownEven(int src_width,
|
||||
void (*ScaleARGBRowDownEven)(const uint8* src_argb, ptrdiff_t src_stride,
|
||||
int src_step, uint8* dst_argb, int dst_width) =
|
||||
filtering ? ScaleARGBRowDownEvenBox_C : ScaleARGBRowDownEven_C;
|
||||
(void)src_width;
|
||||
(void)src_height;
|
||||
assert(IS_ALIGNED(src_width, 2));
|
||||
assert(IS_ALIGNED(src_height, 2));
|
||||
src_argb += (y >> 16) * src_stride + (x >> 16) * 4;
|
||||
@ -733,6 +741,7 @@ static void ScaleARGBSimple(int src_width,
|
||||
void (*ScaleARGBCols)(uint8 * dst_argb, const uint8* src_argb, int dst_width,
|
||||
int x, int dx) =
|
||||
(src_width >= 32768) ? ScaleARGBCols64_C : ScaleARGBCols_C;
|
||||
(void)src_height;
|
||||
#if defined(HAS_SCALEARGBCOLS_SSE2)
|
||||
if (TestCpuFlag(kCpuHasSSE2) && src_width < 32768) {
|
||||
ScaleARGBCols = ScaleARGBCols_SSE2;
|
||||
@ -941,6 +950,8 @@ int YUVToARGBScaleClip(const uint8* src_y,
|
||||
enum FilterMode filtering) {
|
||||
uint8* argb_buffer = (uint8*)malloc(src_width * src_height * 4);
|
||||
int r;
|
||||
(void)src_fourcc; // TODO(fbarchard): implement and/or assert.
|
||||
(void)dst_fourcc;
|
||||
I420ToARGB(src_y, src_stride_y, src_u, src_stride_u, src_v, src_stride_v,
|
||||
argb_buffer, src_width * 4, src_width, src_height);
|
||||
|
||||
|
||||
@ -33,6 +33,7 @@ void ScaleRowDown2_C(const uint8* src_ptr,
|
||||
uint8* dst,
|
||||
int dst_width) {
|
||||
int x;
|
||||
(void)src_stride;
|
||||
for (x = 0; x < dst_width - 1; x += 2) {
|
||||
dst[0] = src_ptr[1];
|
||||
dst[1] = src_ptr[3];
|
||||
@ -49,6 +50,7 @@ void ScaleRowDown2_16_C(const uint16* src_ptr,
|
||||
uint16* dst,
|
||||
int dst_width) {
|
||||
int x;
|
||||
(void)src_stride;
|
||||
for (x = 0; x < dst_width - 1; x += 2) {
|
||||
dst[0] = src_ptr[1];
|
||||
dst[1] = src_ptr[3];
|
||||
@ -66,6 +68,7 @@ void ScaleRowDown2Linear_C(const uint8* src_ptr,
|
||||
int dst_width) {
|
||||
const uint8* s = src_ptr;
|
||||
int x;
|
||||
(void)src_stride;
|
||||
for (x = 0; x < dst_width - 1; x += 2) {
|
||||
dst[0] = (s[0] + s[1] + 1) >> 1;
|
||||
dst[1] = (s[2] + s[3] + 1) >> 1;
|
||||
@ -83,6 +86,7 @@ void ScaleRowDown2Linear_16_C(const uint16* src_ptr,
|
||||
int dst_width) {
|
||||
const uint16* s = src_ptr;
|
||||
int x;
|
||||
(void)src_stride;
|
||||
for (x = 0; x < dst_width - 1; x += 2) {
|
||||
dst[0] = (s[0] + s[1] + 1) >> 1;
|
||||
dst[1] = (s[2] + s[3] + 1) >> 1;
|
||||
@ -161,6 +165,7 @@ void ScaleRowDown4_C(const uint8* src_ptr,
|
||||
uint8* dst,
|
||||
int dst_width) {
|
||||
int x;
|
||||
(void)src_stride;
|
||||
for (x = 0; x < dst_width - 1; x += 2) {
|
||||
dst[0] = src_ptr[2];
|
||||
dst[1] = src_ptr[6];
|
||||
@ -177,6 +182,7 @@ void ScaleRowDown4_16_C(const uint16* src_ptr,
|
||||
uint16* dst,
|
||||
int dst_width) {
|
||||
int x;
|
||||
(void)src_stride;
|
||||
for (x = 0; x < dst_width - 1; x += 2) {
|
||||
dst[0] = src_ptr[2];
|
||||
dst[1] = src_ptr[6];
|
||||
@ -269,6 +275,7 @@ void ScaleRowDown34_C(const uint8* src_ptr,
|
||||
uint8* dst,
|
||||
int dst_width) {
|
||||
int x;
|
||||
(void)src_stride;
|
||||
assert((dst_width % 3 == 0) && (dst_width > 0));
|
||||
for (x = 0; x < dst_width; x += 3) {
|
||||
dst[0] = src_ptr[0];
|
||||
@ -284,6 +291,7 @@ void ScaleRowDown34_16_C(const uint16* src_ptr,
|
||||
uint16* dst,
|
||||
int dst_width) {
|
||||
int x;
|
||||
(void)src_stride;
|
||||
assert((dst_width % 3 == 0) && (dst_width > 0));
|
||||
for (x = 0; x < dst_width; x += 3) {
|
||||
dst[0] = src_ptr[0];
|
||||
@ -436,6 +444,8 @@ void ScaleColsUp2_C(uint8* dst_ptr,
|
||||
int x,
|
||||
int dx) {
|
||||
int j;
|
||||
(void)x;
|
||||
(void)dx;
|
||||
for (j = 0; j < dst_width - 1; j += 2) {
|
||||
dst_ptr[1] = dst_ptr[0] = src_ptr[0];
|
||||
src_ptr += 1;
|
||||
@ -452,6 +462,8 @@ void ScaleColsUp2_16_C(uint16* dst_ptr,
|
||||
int x,
|
||||
int dx) {
|
||||
int j;
|
||||
(void)x;
|
||||
(void)dx;
|
||||
for (j = 0; j < dst_width - 1; j += 2) {
|
||||
dst_ptr[1] = dst_ptr[0] = src_ptr[0];
|
||||
src_ptr += 1;
|
||||
@ -593,6 +605,7 @@ void ScaleRowDown38_C(const uint8* src_ptr,
|
||||
uint8* dst,
|
||||
int dst_width) {
|
||||
int x;
|
||||
(void)src_stride;
|
||||
assert(dst_width % 3 == 0);
|
||||
for (x = 0; x < dst_width; x += 3) {
|
||||
dst[0] = src_ptr[0];
|
||||
@ -608,6 +621,7 @@ void ScaleRowDown38_16_C(const uint16* src_ptr,
|
||||
uint16* dst,
|
||||
int dst_width) {
|
||||
int x;
|
||||
(void)src_stride;
|
||||
assert(dst_width % 3 == 0);
|
||||
for (x = 0; x < dst_width; x += 3) {
|
||||
dst[0] = src_ptr[0];
|
||||
@ -764,8 +778,8 @@ void ScaleARGBRowDown2_C(const uint8* src_argb,
|
||||
int dst_width) {
|
||||
const uint32* src = (const uint32*)(src_argb);
|
||||
uint32* dst = (uint32*)(dst_argb);
|
||||
|
||||
int x;
|
||||
(void)src_stride;
|
||||
for (x = 0; x < dst_width - 1; x += 2) {
|
||||
dst[0] = src[1];
|
||||
dst[1] = src[3];
|
||||
@ -782,6 +796,7 @@ void ScaleARGBRowDown2Linear_C(const uint8* src_argb,
|
||||
uint8* dst_argb,
|
||||
int dst_width) {
|
||||
int x;
|
||||
(void)src_stride;
|
||||
for (x = 0; x < dst_width; ++x) {
|
||||
dst_argb[0] = (src_argb[0] + src_argb[4] + 1) >> 1;
|
||||
dst_argb[1] = (src_argb[1] + src_argb[5] + 1) >> 1;
|
||||
@ -822,7 +837,7 @@ void ScaleARGBRowDownEven_C(const uint8* src_argb,
|
||||
int dst_width) {
|
||||
const uint32* src = (const uint32*)(src_argb);
|
||||
uint32* dst = (uint32*)(dst_argb);
|
||||
|
||||
(void)src_stride;
|
||||
int x;
|
||||
for (x = 0; x < dst_width - 1; x += 2) {
|
||||
dst[0] = src[0];
|
||||
@ -910,6 +925,8 @@ void ScaleARGBColsUp2_C(uint8* dst_argb,
|
||||
const uint32* src = (const uint32*)(src_argb);
|
||||
uint32* dst = (uint32*)(dst_argb);
|
||||
int j;
|
||||
(void)x;
|
||||
(void)dx;
|
||||
for (j = 0; j < dst_width - 1; j += 2) {
|
||||
dst[1] = dst[0] = src[0];
|
||||
src += 1;
|
||||
|
||||
@ -96,6 +96,7 @@ void ScaleRowDown2_SSSE3(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
LABELALIGN
|
||||
"1: \n"
|
||||
@ -120,6 +121,7 @@ void ScaleRowDown2Linear_SSSE3(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"pcmpeqb %%xmm4,%%xmm4 \n"
|
||||
"psrlw $0xf,%%xmm4 \n"
|
||||
@ -193,6 +195,7 @@ void ScaleRowDown2_AVX2(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
LABELALIGN
|
||||
"1: \n"
|
||||
@ -219,6 +222,7 @@ void ScaleRowDown2Linear_AVX2(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"vpcmpeqb %%ymm4,%%ymm4,%%ymm4 \n"
|
||||
"vpsrlw $0xf,%%ymm4,%%ymm4 \n"
|
||||
@ -296,6 +300,7 @@ void ScaleRowDown4_SSSE3(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"pcmpeqb %%xmm5,%%xmm5 \n"
|
||||
"psrld $0x18,%%xmm5 \n"
|
||||
@ -383,6 +388,7 @@ void ScaleRowDown4_AVX2(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"vpcmpeqb %%ymm5,%%ymm5,%%ymm5 \n"
|
||||
"vpsrld $0x18,%%ymm5,%%ymm5 \n"
|
||||
@ -472,6 +478,7 @@ void ScaleRowDown34_SSSE3(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile(
|
||||
"movdqa %0,%%xmm3 \n"
|
||||
"movdqa %1,%%xmm4 \n"
|
||||
@ -645,6 +652,7 @@ void ScaleRowDown38_SSSE3(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"movdqa %3,%%xmm4 \n"
|
||||
"movdqa %4,%%xmm5 \n"
|
||||
@ -952,6 +960,8 @@ void ScaleColsUp2_SSE2(uint8* dst_ptr,
|
||||
int dst_width,
|
||||
int x,
|
||||
int dx) {
|
||||
(void)x;
|
||||
(void)dx;
|
||||
asm volatile (
|
||||
LABELALIGN
|
||||
"1: \n"
|
||||
@ -977,6 +987,7 @@ void ScaleARGBRowDown2_SSE2(const uint8* src_argb,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_argb,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
LABELALIGN
|
||||
"1: \n"
|
||||
@ -999,6 +1010,7 @@ void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_argb,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
LABELALIGN
|
||||
"1: \n"
|
||||
@ -1060,6 +1072,7 @@ void ScaleARGBRowDownEven_SSE2(const uint8* src_argb,
|
||||
int dst_width) {
|
||||
intptr_t src_stepx_x4 = (intptr_t)(src_stepx);
|
||||
intptr_t src_stepx_x12;
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"lea " MEMLEA3(0x00,1,4) ",%1 \n"
|
||||
"lea " MEMLEA4(0x00,1,1,2) ",%4 \n"
|
||||
@ -1212,6 +1225,8 @@ void ScaleARGBColsUp2_SSE2(uint8* dst_argb,
|
||||
int dst_width,
|
||||
int x,
|
||||
int dx) {
|
||||
(void)x;
|
||||
(void)dx;
|
||||
asm volatile (
|
||||
LABELALIGN
|
||||
"1: \n"
|
||||
|
||||
@ -27,6 +27,7 @@ void ScaleARGBRowDown2_MSA(const uint8_t* src_argb,
|
||||
int dst_width) {
|
||||
int x;
|
||||
v16u8 src0, src1, dst0;
|
||||
(void)src_stride;
|
||||
|
||||
for (x = 0; x < dst_width; x += 4) {
|
||||
src0 = (v16u8)__msa_ld_b((v16i8*)src_argb, 0);
|
||||
@ -44,6 +45,7 @@ void ScaleARGBRowDown2Linear_MSA(const uint8_t* src_argb,
|
||||
int dst_width) {
|
||||
int x;
|
||||
v16u8 src0, src1, vec0, vec1, dst0;
|
||||
(void)src_stride;
|
||||
|
||||
for (x = 0; x < dst_width; x += 4) {
|
||||
src0 = (v16u8)__msa_ld_b((v16i8*)src_argb, 0);
|
||||
@ -101,6 +103,7 @@ void ScaleARGBRowDownEven_MSA(const uint8_t* src_argb,
|
||||
int x;
|
||||
int32_t stepx = src_stepx * 4;
|
||||
int32_t data0, data1, data2, data3;
|
||||
(void)src_stride;
|
||||
|
||||
for (x = 0; x < dst_width; x += 4) {
|
||||
data0 = LW(src_argb);
|
||||
@ -177,6 +180,7 @@ void ScaleRowDown2_MSA(const uint8_t* src_ptr,
|
||||
int dst_width) {
|
||||
int x;
|
||||
v16u8 src0, src1, src2, src3, dst0, dst1;
|
||||
(void)src_stride;
|
||||
|
||||
for (x = 0; x < dst_width; x += 32) {
|
||||
src0 = (v16u8)__msa_ld_b((v16i8*)src_ptr, 0);
|
||||
@ -197,6 +201,7 @@ void ScaleRowDown2Linear_MSA(const uint8_t* src_ptr,
|
||||
int dst_width) {
|
||||
int x;
|
||||
v16u8 src0, src1, src2, src3, vec0, vec1, vec2, vec3, dst0, dst1;
|
||||
(void)src_stride;
|
||||
|
||||
for (x = 0; x < dst_width; x += 32) {
|
||||
src0 = (v16u8)__msa_ld_b((v16i8*)src_ptr, 0);
|
||||
@ -261,6 +266,7 @@ void ScaleRowDown4_MSA(const uint8_t* src_ptr,
|
||||
int dst_width) {
|
||||
int x;
|
||||
v16u8 src0, src1, src2, src3, vec0, vec1, dst0;
|
||||
(void)src_stride;
|
||||
|
||||
for (x = 0; x < dst_width; x += 16) {
|
||||
src0 = (v16u8)__msa_ld_b((v16i8*)src_ptr, 0);
|
||||
@ -351,6 +357,7 @@ void ScaleRowDown38_MSA(const uint8_t* src_ptr,
|
||||
uint32_t dst1;
|
||||
v16u8 src0, src1, vec0;
|
||||
v16i8 mask = {0, 3, 6, 8, 11, 14, 16, 19, 22, 24, 27, 30, 0, 0, 0, 0};
|
||||
(void)src_stride;
|
||||
|
||||
assert(dst_width % 3 == 0);
|
||||
width = dst_width / 3;
|
||||
|
||||
@ -27,6 +27,7 @@ void ScaleRowDown2_NEON(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"1: \n"
|
||||
// load even pixels into q0, odd into q1
|
||||
@ -49,6 +50,7 @@ void ScaleRowDown2Linear_NEON(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"1: \n"
|
||||
MEMACCESS(0)
|
||||
@ -105,6 +107,7 @@ void ScaleRowDown4_NEON(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"1: \n"
|
||||
MEMACCESS(0)
|
||||
@ -167,6 +170,7 @@ void ScaleRowDown34_NEON(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"1: \n"
|
||||
MEMACCESS(0)
|
||||
@ -300,6 +304,7 @@ void ScaleRowDown38_NEON(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
MEMACCESS(3)
|
||||
"vld1.8 {q3}, [%3] \n"
|
||||
@ -764,6 +769,7 @@ void ScaleARGBRowDown2_NEON(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"1: \n"
|
||||
// load even pixels into q0, odd into q1
|
||||
@ -789,6 +795,7 @@ void ScaleARGBRowDown2Linear_NEON(const uint8* src_argb,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_argb,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"1: \n"
|
||||
MEMACCESS(0)
|
||||
@ -863,6 +870,7 @@ void ScaleARGBRowDownEven_NEON(const uint8* src_argb,
|
||||
int src_stepx,
|
||||
uint8* dst_argb,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"mov r12, %3, lsl #2 \n"
|
||||
"1: \n"
|
||||
|
||||
@ -25,6 +25,7 @@ void ScaleRowDown2_NEON(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"1: \n"
|
||||
// load even pixels into v0, odd into v1
|
||||
@ -47,6 +48,7 @@ void ScaleRowDown2Linear_NEON(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"1: \n"
|
||||
MEMACCESS(0)
|
||||
@ -103,6 +105,7 @@ void ScaleRowDown4_NEON(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"1: \n"
|
||||
MEMACCESS(0)
|
||||
@ -164,14 +167,15 @@ void ScaleRowDown34_NEON(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"1: \n"
|
||||
MEMACCESS(0)
|
||||
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // src line 0
|
||||
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // src line 0
|
||||
"subs %w2, %w2, #24 \n"
|
||||
"orr v2.16b, v3.16b, v3.16b \n" // order v0, v1, v2
|
||||
MEMACCESS(1)
|
||||
"st3 {v0.8b,v1.8b,v2.8b}, [%1], #24 \n"
|
||||
"st3 {v0.8b,v1.8b,v2.8b}, [%1], #24 \n"
|
||||
"b.gt 1b \n"
|
||||
: "+r"(src_ptr), // %0
|
||||
"+r"(dst_ptr), // %1
|
||||
@ -190,9 +194,9 @@ void ScaleRowDown34_0_Box_NEON(const uint8* src_ptr,
|
||||
"add %3, %3, %0 \n"
|
||||
"1: \n"
|
||||
MEMACCESS(0)
|
||||
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // src line 0
|
||||
"ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // src line 0
|
||||
MEMACCESS(3)
|
||||
"ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%3], #32 \n" // src line 1
|
||||
"ld4 {v4.8b,v5.8b,v6.8b,v7.8b}, [%3], #32 \n" // src line 1
|
||||
"subs %w2, %w2, #24 \n"
|
||||
|
||||
// filter src line 0 with src line 1
|
||||
@ -299,14 +303,15 @@ void ScaleRowDown38_NEON(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_ptr,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
MEMACCESS(3)
|
||||
"ld1 {v3.16b}, [%3] \n"
|
||||
"1: \n"
|
||||
MEMACCESS(0)
|
||||
"ld1 {v0.16b,v1.16b}, [%0], #32 \n"
|
||||
"ld1 {v0.16b,v1.16b}, [%0], #32 \n"
|
||||
"subs %w2, %w2, #12 \n"
|
||||
"tbl v2.16b, {v0.16b,v1.16b}, v3.16b \n"
|
||||
"tbl v2.16b, {v0.16b,v1.16b}, v3.16b \n"
|
||||
MEMACCESS(1)
|
||||
"st1 {v2.8b}, [%1], #8 \n"
|
||||
MEMACCESS(1)
|
||||
@ -783,6 +788,7 @@ void ScaleARGBRowDown2_NEON(const uint8* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"1: \n"
|
||||
// load even pixels into q0, odd into q1
|
||||
@ -808,6 +814,7 @@ void ScaleARGBRowDown2Linear_NEON(const uint8* src_argb,
|
||||
ptrdiff_t src_stride,
|
||||
uint8* dst_argb,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"1: \n"
|
||||
MEMACCESS (0)
|
||||
@ -877,6 +884,7 @@ void ScaleARGBRowDownEven_NEON(const uint8* src_argb,
|
||||
int src_stepx,
|
||||
uint8* dst_argb,
|
||||
int dst_width) {
|
||||
(void)src_stride;
|
||||
asm volatile (
|
||||
"1: \n"
|
||||
MEMACCESS(0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user