Commit 1f923e3e authored by fbarchard@google.com's avatar fbarchard@google.com

Declare parameters that are unused, since C does not let you give a type without name.

BUG=303
TEST=compile -x c

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@954 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent db73518b
...@@ -80,7 +80,8 @@ typedef signed char int8; ...@@ -80,7 +80,8 @@ typedef signed char int8;
(reinterpret_cast<uint8*>(((reinterpret_cast<uintptr_t>(p) + \ (reinterpret_cast<uint8*>(((reinterpret_cast<uintptr_t>(p) + \
((t) - 1)) & ~((t) - 1)))) ((t) - 1)) & ~((t) - 1))))
#else #else
#define ALIGNP(p, t) ((uint8*)((((uintptr_t)(p) + ((t) - 1)) & ~((t) - 1)))) #define ALIGNP(p, t) \
((uint8*)((((uintptr_t)(p) + ((t) - 1)) & ~((t) - 1)))) /* NOLINT */
#endif #endif
#endif #endif
......
...@@ -82,9 +82,9 @@ int UYVYToI422(const uint8* src_uyvy, int src_stride_uyvy, ...@@ -82,9 +82,9 @@ int UYVYToI422(const uint8* src_uyvy, int src_stride_uyvy,
// 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,
const uint8* src_u, int src_stride_u,
const uint8* src_v, int src_stride_v,
uint8* dst_y, int dst_stride_y, uint8* dst_y, int dst_stride_y,
uint8* dst_u, int dst_stride_u,
uint8* dst_v, int dst_stride_v,
int width, int height); int width, int height);
// Alias // Alias
......
...@@ -90,17 +90,17 @@ void ScaleSlope(int src_width, int src_height, ...@@ -90,17 +90,17 @@ void ScaleSlope(int src_width, int src_height,
enum FilterMode filtering, enum FilterMode filtering,
int* x, int* y, int* dx, int* dy); int* x, int* y, int* dx, int* dy);
void ScaleRowDown2_C(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown2_C(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown2Linear_C(const uint8* src_ptr, ptrdiff_t src_stride, void ScaleRowDown2Linear_C(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown2Box_C(const uint8* src_ptr, ptrdiff_t src_stride, void ScaleRowDown2Box_C(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown4_C(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown4_C(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown4Box_C(const uint8* src_ptr, ptrdiff_t src_stride, void ScaleRowDown4Box_C(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown34_C(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown34_C(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown34_0_Box_C(const uint8* src_ptr, ptrdiff_t src_stride, void ScaleRowDown34_0_Box_C(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* d, int dst_width); uint8* d, int dst_width);
...@@ -114,7 +114,7 @@ void ScaleFilterCols_C(uint8* dst_ptr, const uint8* src_ptr, ...@@ -114,7 +114,7 @@ void ScaleFilterCols_C(uint8* dst_ptr, const uint8* src_ptr,
int dst_width, int x, int dx); int dst_width, int x, int dx);
void ScaleFilterCols64_C(uint8* dst_ptr, const uint8* src_ptr, void ScaleFilterCols64_C(uint8* dst_ptr, const uint8* src_ptr,
int dst_width, int x, int dx); int dst_width, int x, int dx);
void ScaleRowDown38_C(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown38_C(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown38_3_Box_C(const uint8* src_ptr, void ScaleRowDown38_3_Box_C(const uint8* src_ptr,
ptrdiff_t src_stride, ptrdiff_t src_stride,
...@@ -124,14 +124,14 @@ void ScaleRowDown38_2_Box_C(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -124,14 +124,14 @@ void ScaleRowDown38_2_Box_C(const uint8* src_ptr, ptrdiff_t src_stride,
void ScaleAddRows_C(const uint8* src_ptr, ptrdiff_t src_stride, void ScaleAddRows_C(const uint8* src_ptr, ptrdiff_t src_stride,
uint16* dst_ptr, int src_width, int src_height); uint16* dst_ptr, int src_width, int src_height);
void ScaleARGBRowDown2_C(const uint8* src_argb, void ScaleARGBRowDown2_C(const uint8* src_argb,
ptrdiff_t /* src_stride */, ptrdiff_t src_stride,
uint8* dst_argb, int dst_width); uint8* dst_argb, int dst_width);
void ScaleARGBRowDown2Linear_C(const uint8* src_argb, void ScaleARGBRowDown2Linear_C(const uint8* src_argb,
ptrdiff_t /* src_stride */, ptrdiff_t src_stride,
uint8* dst_argb, int dst_width); uint8* dst_argb, int dst_width);
void ScaleARGBRowDown2Box_C(const uint8* src_argb, ptrdiff_t src_stride, void ScaleARGBRowDown2Box_C(const uint8* src_argb, ptrdiff_t src_stride,
uint8* dst_argb, int dst_width); uint8* dst_argb, int dst_width);
void ScaleARGBRowDownEven_C(const uint8* src_argb, ptrdiff_t /* src_stride */, void ScaleARGBRowDownEven_C(const uint8* src_argb, ptrdiff_t src_stride,
int src_stepx, int src_stepx,
uint8* dst_argb, int dst_width); uint8* dst_argb, int dst_width);
void ScaleARGBRowDownEvenBox_C(const uint8* src_argb, void ScaleARGBRowDownEvenBox_C(const uint8* src_argb,
...@@ -158,7 +158,8 @@ void ScaleRowDown2Box_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -158,7 +158,8 @@ void ScaleRowDown2Box_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
void ScaleRowDown2_Unaligned_SSE2(const uint8* src_ptr, void ScaleRowDown2_Unaligned_SSE2(const uint8* src_ptr,
ptrdiff_t src_stride, ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width); uint8* dst_ptr, int dst_width);
void ScaleRowDown2Linear_Unaligned_SSE2(const uint8* src_ptr, ptrdiff_t, void ScaleRowDown2Linear_Unaligned_SSE2(const uint8* src_ptr,
ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width); uint8* dst_ptr, int dst_width);
void ScaleRowDown2Box_Unaligned_SSE2(const uint8* src_ptr, void ScaleRowDown2Box_Unaligned_SSE2(const uint8* src_ptr,
ptrdiff_t src_stride, ptrdiff_t src_stride,
...@@ -189,12 +190,12 @@ void ScaleAddRows_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -189,12 +190,12 @@ void ScaleAddRows_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr, void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
int dst_width, int x, int dx); int dst_width, int x, int dx);
void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr, void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr,
int dst_width, int /* x */, int /* dx */); int dst_width, int x, int dx);
void ScaleARGBRowDown2_SSE2(const uint8* src_argb, void ScaleARGBRowDown2_SSE2(const uint8* src_argb,
ptrdiff_t /* src_stride */, ptrdiff_t src_stride,
uint8* dst_argb, int dst_width); uint8* dst_argb, int dst_width);
void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb, void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb,
ptrdiff_t /* src_stride */, ptrdiff_t src_stride,
uint8* dst_argb, int dst_width); uint8* dst_argb, int dst_width);
void ScaleARGBRowDown2Box_SSE2(const uint8* src_argb, void ScaleARGBRowDown2Box_SSE2(const uint8* src_argb,
ptrdiff_t src_stride, ptrdiff_t src_stride,
...@@ -211,7 +212,7 @@ void ScaleARGBCols_SSE2(uint8* dst_argb, const uint8* src_argb, ...@@ -211,7 +212,7 @@ void ScaleARGBCols_SSE2(uint8* dst_argb, const uint8* src_argb,
void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb, void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb,
int dst_width, int x, int dx); int dst_width, int x, int dx);
void ScaleARGBColsUp2_SSE2(uint8* dst_argb, const uint8* src_argb, void ScaleARGBColsUp2_SSE2(uint8* dst_argb, const uint8* src_argb,
int dst_width, int /* x */, int /* dx */); int dst_width, int x, int dx);
// Row functions. // Row functions.
void ScaleARGBRowDownEven_NEON(const uint8* src_argb, int src_stride, void ScaleARGBRowDownEven_NEON(const uint8* src_argb, int src_stride,
int src_stepx, int src_stepx,
...@@ -219,7 +220,7 @@ void ScaleARGBRowDownEven_NEON(const uint8* src_argb, int src_stride, ...@@ -219,7 +220,7 @@ void ScaleARGBRowDownEven_NEON(const uint8* src_argb, int src_stride,
void ScaleARGBRowDownEvenBox_NEON(const uint8* src_argb, int src_stride, void ScaleARGBRowDownEvenBox_NEON(const uint8* src_argb, int src_stride,
int src_stepx, int src_stepx,
uint8* dst_argb, int dst_width); uint8* dst_argb, int dst_width);
void ScaleARGBRowDown2_NEON(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleARGBRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
...@@ -228,13 +229,13 @@ void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -228,13 +229,13 @@ void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
// NEON downscalers with interpolation. // NEON downscalers with interpolation.
// Note - not static due to reuse in convert for 444 to 420. // Note - not static due to reuse in convert for 444 to 420.
void ScaleRowDown2_NEON(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, void ScaleRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown4_NEON(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown4_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width); uint8* dst_ptr, int dst_width);
void ScaleRowDown4Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, void ScaleRowDown4Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width); uint8* dst_ptr, int dst_width);
...@@ -243,7 +244,7 @@ void ScaleRowDown4Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -243,7 +244,7 @@ void ScaleRowDown4Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
// to load up the every 4th pixel into a 4 different registers. // to load up the every 4th pixel into a 4 different registers.
// Point samples 32 pixels to 24 pixels. // Point samples 32 pixels to 24 pixels.
void ScaleRowDown34_NEON(const uint8* src_ptr, void ScaleRowDown34_NEON(const uint8* src_ptr,
ptrdiff_t /* src_stride */, ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width); uint8* dst_ptr, int dst_width);
void ScaleRowDown34_0_Box_NEON(const uint8* src_ptr, void ScaleRowDown34_0_Box_NEON(const uint8* src_ptr,
ptrdiff_t src_stride, ptrdiff_t src_stride,
...@@ -254,7 +255,7 @@ void ScaleRowDown34_1_Box_NEON(const uint8* src_ptr, ...@@ -254,7 +255,7 @@ void ScaleRowDown34_1_Box_NEON(const uint8* src_ptr,
// 32 -> 12 // 32 -> 12
void ScaleRowDown38_NEON(const uint8* src_ptr, void ScaleRowDown38_NEON(const uint8* src_ptr,
ptrdiff_t /* src_stride */, ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width); uint8* dst_ptr, int dst_width);
// 32x3 -> 12x1 // 32x3 -> 12x1
void ScaleRowDown38_3_Box_NEON(const uint8* src_ptr, void ScaleRowDown38_3_Box_NEON(const uint8* src_ptr,
...@@ -265,21 +266,21 @@ void ScaleRowDown38_2_Box_NEON(const uint8* src_ptr, ...@@ -265,21 +266,21 @@ void ScaleRowDown38_2_Box_NEON(const uint8* src_ptr,
ptrdiff_t src_stride, ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width); uint8* dst_ptr, int dst_width);
void ScaleRowDown2_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown2_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown2Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, void ScaleRowDown2Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown4_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown4_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown4Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, void ScaleRowDown4Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown34_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown34_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown34_0_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, void ScaleRowDown34_0_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* d, int dst_width); uint8* d, int dst_width);
void ScaleRowDown34_1_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, void ScaleRowDown34_1_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* d, int dst_width); uint8* d, int dst_width);
void ScaleRowDown38_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown38_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width); uint8* dst, int dst_width);
void ScaleRowDown38_2_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, void ScaleRowDown38_2_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width); uint8* dst_ptr, int dst_width);
......
...@@ -66,7 +66,7 @@ int ConvertToARGB(const uint8* sample, size_t sample_size, ...@@ -66,7 +66,7 @@ int ConvertToARGB(const uint8* sample, size_t sample_size,
int abs_crop_height = (crop_height < 0) ? -crop_height : crop_height; int abs_crop_height = (crop_height < 0) ? -crop_height : crop_height;
if (need_buf) { if (need_buf) {
int argb_size = crop_width * abs_crop_height * 4; int argb_size = crop_width * abs_crop_height * 4;
rotate_buffer = new uint8[argb_size]; rotate_buffer = malloc(argb_size);
if (!rotate_buffer) { if (!rotate_buffer) {
return 1; // Out of memory runtime error. return 1; // Out of memory runtime error.
} }
...@@ -313,7 +313,7 @@ int ConvertToARGB(const uint8* sample, size_t sample_size, ...@@ -313,7 +313,7 @@ int ConvertToARGB(const uint8* sample, size_t sample_size,
tmp_argb, tmp_argb_stride, tmp_argb, tmp_argb_stride,
crop_width, abs_crop_height, rotation); crop_width, abs_crop_height, rotation);
} }
delete [] rotate_buffer; free(rotate_buffer);
} }
return r; return r;
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include <stdlib.h>
#include "libyuv/convert.h" #include "libyuv/convert.h"
#include "libyuv/format_conversion.h" #include "libyuv/format_conversion.h"
...@@ -25,11 +27,7 @@ extern "C" { ...@@ -25,11 +27,7 @@ extern "C" {
// With MJPEG it is the compressed size of the frame. // With MJPEG it is the compressed size of the frame.
LIBYUV_API LIBYUV_API
int ConvertToI420(const uint8* sample, int ConvertToI420(const uint8* sample,
#ifdef HAVE_JPEG
size_t sample_size, size_t sample_size,
#else
size_t /* sample_size */,
#endif
uint8* y, int y_stride, uint8* y, int y_stride,
uint8* u, int u_stride, uint8* u, int u_stride,
uint8* v, int v_stride, uint8* v, int v_stride,
...@@ -73,7 +71,7 @@ int ConvertToI420(const uint8* sample, ...@@ -73,7 +71,7 @@ int ConvertToI420(const uint8* sample,
if (need_buf) { if (need_buf) {
int y_size = crop_width * abs_crop_height; int y_size = crop_width * abs_crop_height;
int uv_size = ((crop_width + 1) / 2) * ((abs_crop_height + 1) / 2); int uv_size = ((crop_width + 1) / 2) * ((abs_crop_height + 1) / 2);
rotate_buffer = new uint8[y_size + uv_size * 2]; rotate_buffer = malloc(y_size + uv_size * 2);
if (!rotate_buffer) { if (!rotate_buffer) {
return 1; // Out of memory runtime error. return 1; // Out of memory runtime error.
} }
...@@ -372,7 +370,7 @@ int ConvertToI420(const uint8* sample, ...@@ -372,7 +370,7 @@ int ConvertToI420(const uint8* sample,
tmp_v, tmp_v_stride, tmp_v, tmp_v_stride,
crop_width, abs_crop_height, rotation); crop_width, abs_crop_height, rotation);
} }
delete [] rotate_buffer; free(rotate_buffer);
} }
return r; return r;
......
...@@ -155,8 +155,8 @@ int I400ToI400(const uint8* src_y, int src_stride_y, ...@@ -155,8 +155,8 @@ int I400ToI400(const uint8* src_y, int src_stride_y,
// Convert I420 to I400. // Convert I420 to I400.
LIBYUV_API LIBYUV_API
int I420ToI400(const uint8* src_y, int src_stride_y, int I420ToI400(const uint8* src_y, int src_stride_y,
uint8*, int, // src_u const uint8* src_u, int src_stride_u,
uint8*, int, // src_v const uint8* src_v, int src_stride_v,
uint8* dst_y, int dst_stride_y, uint8* dst_y, int dst_stride_y,
int width, int height) { int width, int height) {
if (!src_y || !dst_y || width <= 0 || height == 0) { if (!src_y || !dst_y || width <= 0 || height == 0) {
......
...@@ -1858,7 +1858,7 @@ void ARGBToBayerRow_C(const uint8* src_argb, ...@@ -1858,7 +1858,7 @@ void ARGBToBayerRow_C(const uint8* src_argb,
// Select G channel from ARGB. e.g. GGGGGGGG // Select G channel from ARGB. e.g. GGGGGGGG
void ARGBToBayerGGRow_C(const uint8* src_argb, void ARGBToBayerGGRow_C(const uint8* src_argb,
uint8* dst_bayer, uint32 /*selector*/, int pix) { uint8* dst_bayer, uint32 selector, int pix) {
// Copy a row of G. // Copy a row of G.
for (int x = 0; x < pix - 1; x += 2) { for (int x = 0; x < pix - 1; x += 2) {
dst_bayer[0] = src_argb[1]; dst_bayer[0] = src_argb[1];
......
...@@ -36,7 +36,7 @@ static __inline int Abs(int v) { ...@@ -36,7 +36,7 @@ static __inline int Abs(int v) {
// This is an optimized version for scaling down a plane to 1/2 of // This is an optimized version for scaling down a plane to 1/2 of
// its original size. // its original size.
static void ScalePlaneDown2(int /* src_width */, int /* src_height */, static void ScalePlaneDown2(int src_width, int src_height,
int dst_width, int dst_height, int dst_width, int dst_height,
int src_stride, int dst_stride, int src_stride, int dst_stride,
const uint8* src_ptr, uint8* dst_ptr, const uint8* src_ptr, uint8* dst_ptr,
...@@ -93,7 +93,7 @@ static void ScalePlaneDown2(int /* src_width */, int /* src_height */, ...@@ -93,7 +93,7 @@ static void ScalePlaneDown2(int /* src_width */, int /* src_height */,
// This is an optimized version for scaling down a plane to 1/4 of // This is an optimized version for scaling down a plane to 1/4 of
// its original size. // its original size.
static void ScalePlaneDown4(int /* src_width */, int /* src_height */, static void ScalePlaneDown4(int src_width, int src_height,
int dst_width, int dst_height, int dst_width, int dst_height,
int src_stride, int dst_stride, int src_stride, int dst_stride,
const uint8* src_ptr, uint8* dst_ptr, const uint8* src_ptr, uint8* dst_ptr,
...@@ -137,7 +137,7 @@ static void ScalePlaneDown4(int /* src_width */, int /* src_height */, ...@@ -137,7 +137,7 @@ static void ScalePlaneDown4(int /* src_width */, int /* src_height */,
// Scale plane down, 3/4 // Scale plane down, 3/4
static void ScalePlaneDown34(int /* src_width */, int /* src_height */, static void ScalePlaneDown34(int src_width, int src_height,
int dst_width, int dst_height, int dst_width, int dst_height,
int src_stride, int dst_stride, int src_stride, int dst_stride,
const uint8* src_ptr, uint8* dst_ptr, const uint8* src_ptr, uint8* dst_ptr,
...@@ -232,7 +232,7 @@ static void ScalePlaneDown34(int /* src_width */, int /* src_height */, ...@@ -232,7 +232,7 @@ static void ScalePlaneDown34(int /* src_width */, int /* src_height */,
// ggghhhii // ggghhhii
// Boxes are 3x3, 2x3, 3x2 and 2x2 // Boxes are 3x3, 2x3, 3x2 and 2x2
static void ScalePlaneDown38(int /* src_width */, int /* src_height */, static void ScalePlaneDown38(int src_width, int src_height,
int dst_width, int dst_height, int dst_width, int dst_height,
int src_stride, int dst_stride, int src_stride, int dst_stride,
const uint8* src_ptr, uint8* dst_ptr, const uint8* src_ptr, uint8* dst_ptr,
......
...@@ -30,7 +30,7 @@ static __inline int Abs(int v) { ...@@ -30,7 +30,7 @@ static __inline int Abs(int v) {
// ScaleARGB ARGB, 1/2 // ScaleARGB ARGB, 1/2
// This is an optimized version for scaling down a ARGB to 1/2 of // This is an optimized version for scaling down a ARGB to 1/2 of
// its original size. // its original size.
static void ScaleARGBDown2(int /* src_width */, int /* src_height */, static void ScaleARGBDown2(int src_width, int src_height,
int dst_width, int dst_height, int dst_width, int dst_height,
int src_stride, int dst_stride, int src_stride, int dst_stride,
const uint8* src_argb, uint8* dst_argb, const uint8* src_argb, uint8* dst_argb,
...@@ -79,7 +79,7 @@ static void ScaleARGBDown2(int /* src_width */, int /* src_height */, ...@@ -79,7 +79,7 @@ static void ScaleARGBDown2(int /* src_width */, int /* src_height */,
// ScaleARGB ARGB, 1/4 // ScaleARGB ARGB, 1/4
// This is an optimized version for scaling down a ARGB to 1/4 of // This is an optimized version for scaling down a ARGB to 1/4 of
// its original size. // its original size.
static void ScaleARGBDown4Box(int /* src_width */, int /* src_height */, static void ScaleARGBDown4Box(int src_width, int src_height,
int dst_width, int dst_height, int dst_width, int dst_height,
int src_stride, int dst_stride, int src_stride, int dst_stride,
const uint8* src_argb, uint8* dst_argb, const uint8* src_argb, uint8* dst_argb,
......
...@@ -28,7 +28,7 @@ static __inline int Abs(int v) { ...@@ -28,7 +28,7 @@ static __inline int Abs(int v) {
} }
// CPU agnostic row functions // CPU agnostic row functions
void ScaleRowDown2_C(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown2_C(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width) { uint8* dst, int dst_width) {
for (int x = 0; x < dst_width - 1; x += 2) { for (int x = 0; x < dst_width - 1; x += 2) {
dst[0] = src_ptr[1]; dst[0] = src_ptr[1];
...@@ -71,7 +71,7 @@ void ScaleRowDown2Box_C(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -71,7 +71,7 @@ void ScaleRowDown2Box_C(const uint8* src_ptr, ptrdiff_t src_stride,
} }
} }
void ScaleRowDown4_C(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown4_C(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width) { uint8* dst, int dst_width) {
for (int x = 0; x < dst_width - 1; x += 2) { for (int x = 0; x < dst_width - 1; x += 2) {
dst[0] = src_ptr[2]; dst[0] = src_ptr[2];
...@@ -119,7 +119,7 @@ void ScaleRowDown4Box_C(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -119,7 +119,7 @@ void ScaleRowDown4Box_C(const uint8* src_ptr, ptrdiff_t src_stride,
} }
} }
void ScaleRowDown34_C(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown34_C(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width) { uint8* dst, int dst_width) {
assert((dst_width % 3 == 0) && (dst_width > 0)); assert((dst_width % 3 == 0) && (dst_width > 0));
for (int x = 0; x < dst_width; x += 3) { for (int x = 0; x < dst_width; x += 3) {
...@@ -192,7 +192,7 @@ void ScaleCols_C(uint8* dst_ptr, const uint8* src_ptr, ...@@ -192,7 +192,7 @@ void ScaleCols_C(uint8* dst_ptr, const uint8* src_ptr,
// Scales a single row of pixels up by 2x using point sampling. // Scales a single row of pixels up by 2x using point sampling.
void ScaleColsUp2_C(uint8* dst_ptr, const uint8* src_ptr, void ScaleColsUp2_C(uint8* dst_ptr, const uint8* src_ptr,
int dst_width, int, int) { int dst_width, int x, int dx) {
for (int j = 0; j < dst_width - 1; j += 2) { for (int j = 0; j < dst_width - 1; j += 2) {
dst_ptr[1] = dst_ptr[0] = src_ptr[0]; dst_ptr[1] = dst_ptr[0] = src_ptr[0];
src_ptr += 1; src_ptr += 1;
...@@ -255,7 +255,7 @@ void ScaleFilterCols64_C(uint8* dst_ptr, const uint8* src_ptr, ...@@ -255,7 +255,7 @@ void ScaleFilterCols64_C(uint8* dst_ptr, const uint8* src_ptr,
} }
#undef BLENDER #undef BLENDER
void ScaleRowDown38_C(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown38_C(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width) { uint8* dst, int dst_width) {
assert(dst_width % 3 == 0); assert(dst_width % 3 == 0);
for (int x = 0; x < dst_width; x += 3) { for (int x = 0; x < dst_width; x += 3) {
...@@ -330,7 +330,7 @@ void ScaleAddRows_C(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -330,7 +330,7 @@ void ScaleAddRows_C(const uint8* src_ptr, ptrdiff_t src_stride,
} }
void ScaleARGBRowDown2_C(const uint8* src_argb, void ScaleARGBRowDown2_C(const uint8* src_argb,
ptrdiff_t /* src_stride */, ptrdiff_t src_stride,
uint8* dst_argb, int dst_width) { uint8* dst_argb, int dst_width) {
const uint32* src = (const uint32*)(src_argb); const uint32* src = (const uint32*)(src_argb);
uint32* dst = (uint32*)(dst_argb); uint32* dst = (uint32*)(dst_argb);
...@@ -347,7 +347,7 @@ void ScaleARGBRowDown2_C(const uint8* src_argb, ...@@ -347,7 +347,7 @@ void ScaleARGBRowDown2_C(const uint8* src_argb,
} }
void ScaleARGBRowDown2Linear_C(const uint8* src_argb, void ScaleARGBRowDown2Linear_C(const uint8* src_argb,
ptrdiff_t /* src_stride */, ptrdiff_t src_stride,
uint8* dst_argb, int dst_width) { uint8* dst_argb, int dst_width) {
for (int x = 0; x < dst_width; ++x) { for (int x = 0; x < dst_width; ++x) {
dst_argb[0] = (src_argb[0] + src_argb[4] + 1) >> 1; dst_argb[0] = (src_argb[0] + src_argb[4] + 1) >> 1;
...@@ -375,7 +375,7 @@ void ScaleARGBRowDown2Box_C(const uint8* src_argb, ptrdiff_t src_stride, ...@@ -375,7 +375,7 @@ void ScaleARGBRowDown2Box_C(const uint8* src_argb, ptrdiff_t src_stride,
} }
} }
void ScaleARGBRowDownEven_C(const uint8* src_argb, ptrdiff_t /* src_stride */, void ScaleARGBRowDownEven_C(const uint8* src_argb, ptrdiff_t src_stride,
int src_stepx, int src_stepx,
uint8* dst_argb, int dst_width) { uint8* dst_argb, int dst_width) {
const uint32* src = (const uint32*)(src_argb); const uint32* src = (const uint32*)(src_argb);
...@@ -446,7 +446,7 @@ void ScaleARGBCols64_C(uint8* dst_argb, const uint8* src_argb, ...@@ -446,7 +446,7 @@ void ScaleARGBCols64_C(uint8* dst_argb, const uint8* src_argb,
// Scales a single row of pixels up by 2x using point sampling. // Scales a single row of pixels up by 2x using point sampling.
void ScaleARGBColsUp2_C(uint8* dst_argb, const uint8* src_argb, void ScaleARGBColsUp2_C(uint8* dst_argb, const uint8* src_argb,
int dst_width, int, int) { int dst_width, int x, int dx) {
const uint32* src = (const uint32*)(src_argb); const uint32* src = (const uint32*)(src_argb);
uint32* dst = (uint32*)(dst_argb); uint32* dst = (uint32*)(dst_argb);
for (int j = 0; j < dst_width - 1; j += 2) { for (int j = 0; j < dst_width - 1; j += 2) {
......
...@@ -20,7 +20,7 @@ extern "C" { ...@@ -20,7 +20,7 @@ extern "C" {
#if !defined(LIBYUV_DISABLE_MIPS) && \ #if !defined(LIBYUV_DISABLE_MIPS) && \
defined(__mips_dsp) && (__mips_dsp_rev >= 2) defined(__mips_dsp) && (__mips_dsp_rev >= 2)
void ScaleRowDown2_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown2_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width) { uint8* dst, int dst_width) {
__asm__ __volatile__( __asm__ __volatile__(
".set push \n" ".set push \n"
...@@ -177,7 +177,7 @@ void ScaleRowDown2Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -177,7 +177,7 @@ void ScaleRowDown2Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
); );
} }
void ScaleRowDown4_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown4_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width) { uint8* dst, int dst_width) {
__asm__ __volatile__ ( __asm__ __volatile__ (
".set push \n" ".set push \n"
...@@ -313,7 +313,7 @@ void ScaleRowDown4Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -313,7 +313,7 @@ void ScaleRowDown4Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
); );
} }
void ScaleRowDown34_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown34_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width) { uint8* dst, int dst_width) {
__asm__ __volatile__ ( __asm__ __volatile__ (
".set push \n" ".set push \n"
...@@ -470,7 +470,7 @@ void ScaleRowDown34_1_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -470,7 +470,7 @@ void ScaleRowDown34_1_Box_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
); );
} }
void ScaleRowDown38_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown38_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width) { uint8* dst, int dst_width) {
__asm__ __volatile__ ( __asm__ __volatile__ (
".set push \n" ".set push \n"
......
...@@ -22,7 +22,7 @@ extern "C" { ...@@ -22,7 +22,7 @@ extern "C" {
// Provided by Fritz Koenig // Provided by Fritz Koenig
// Read 32x1 throw away even pixels, and write 16x1. // Read 32x1 throw away even pixels, and write 16x1.
void ScaleRowDown2_NEON(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width) { uint8* dst, int dst_width) {
asm volatile ( asm volatile (
".p2align 2 \n" ".p2align 2 \n"
...@@ -68,7 +68,7 @@ void ScaleRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -68,7 +68,7 @@ void ScaleRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
); );
} }
void ScaleRowDown4_NEON(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleRowDown4_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width) { uint8* dst_ptr, int dst_width) {
asm volatile ( asm volatile (
".p2align 2 \n" ".p2align 2 \n"
...@@ -119,7 +119,7 @@ void ScaleRowDown4Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -119,7 +119,7 @@ void ScaleRowDown4Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
// to load up the every 4th pixel into a 4 different registers. // to load up the every 4th pixel into a 4 different registers.
// Point samples 32 pixels to 24 pixels. // Point samples 32 pixels to 24 pixels.
void ScaleRowDown34_NEON(const uint8* src_ptr, void ScaleRowDown34_NEON(const uint8* src_ptr,
ptrdiff_t /* src_stride */, ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width) { uint8* dst_ptr, int dst_width) {
asm volatile ( asm volatile (
".p2align 2 \n" ".p2align 2 \n"
...@@ -247,7 +247,7 @@ static vec16 kMult38_Div9 = ...@@ -247,7 +247,7 @@ static vec16 kMult38_Div9 =
// 32 -> 12 // 32 -> 12
void ScaleRowDown38_NEON(const uint8* src_ptr, void ScaleRowDown38_NEON(const uint8* src_ptr,
ptrdiff_t /* src_stride */, ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width) { uint8* dst_ptr, int dst_width) {
asm volatile ( asm volatile (
"vld1.8 {q3}, [%3] \n" "vld1.8 {q3}, [%3] \n"
...@@ -558,7 +558,7 @@ void ScaleFilterRows_NEON(uint8* dst_ptr, ...@@ -558,7 +558,7 @@ void ScaleFilterRows_NEON(uint8* dst_ptr,
); );
} }
void ScaleARGBRowDown2_NEON(const uint8* src_ptr, ptrdiff_t /* src_stride */, void ScaleARGBRowDown2_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst, int dst_width) { uint8* dst, int dst_width) {
asm volatile ( asm volatile (
".p2align 2 \n" ".p2align 2 \n"
...@@ -615,8 +615,8 @@ void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -615,8 +615,8 @@ void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, ptrdiff_t src_stride,
// Reads 4 pixels at a time. // Reads 4 pixels at a time.
// Alignment requirement: src_argb 4 byte aligned. // Alignment requirement: src_argb 4 byte aligned.
void ScaleARGBRowDownEven_NEON(const uint8* src_argb, ptrdiff_t, int src_stepx, void ScaleARGBRowDownEven_NEON(const uint8* src_argb, ptrdiff_t src_stride,
uint8* dst_argb, int dst_width) { int src_stepx, uint8* dst_argb, int dst_width) {
asm volatile ( asm volatile (
"mov r12, %3, lsl #2 \n" "mov r12, %3, lsl #2 \n"
".p2align 2 \n" ".p2align 2 \n"
......
...@@ -122,7 +122,7 @@ void ScaleRowDown2_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -122,7 +122,7 @@ void ScaleRowDown2_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
); );
} }
void ScaleRowDown2Linear_SSE2(const uint8* src_ptr, ptrdiff_t, void ScaleRowDown2Linear_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width) { uint8* dst_ptr, int dst_width) {
asm volatile ( asm volatile (
"pcmpeqb %%xmm5,%%xmm5 \n" "pcmpeqb %%xmm5,%%xmm5 \n"
...@@ -200,8 +200,7 @@ void ScaleRowDown2Box_SSE2(const uint8* src_ptr, ptrdiff_t src_stride, ...@@ -200,8 +200,7 @@ void ScaleRowDown2Box_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
); );
} }
void ScaleRowDown2_Unaligned_SSE2(const uint8* src_ptr, void ScaleRowDown2_Unaligned_SSE2(const uint8* src_ptr, ptrdiff_t src_stride,
ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width) { uint8* dst_ptr, int dst_width) {
asm volatile ( asm volatile (
LABELALIGN LABELALIGN
...@@ -227,7 +226,8 @@ void ScaleRowDown2_Unaligned_SSE2(const uint8* src_ptr, ...@@ -227,7 +226,8 @@ void ScaleRowDown2_Unaligned_SSE2(const uint8* src_ptr,
); );
} }
void ScaleRowDown2Linear_Unaligned_SSE2(const uint8* src_ptr, ptrdiff_t, void ScaleRowDown2Linear_Unaligned_SSE2(const uint8* src_ptr,
ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width) { uint8* dst_ptr, int dst_width) {
asm volatile ( asm volatile (
"pcmpeqb %%xmm5,%%xmm5 \n" "pcmpeqb %%xmm5,%%xmm5 \n"
...@@ -866,7 +866,7 @@ void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr, ...@@ -866,7 +866,7 @@ void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
// Reads 4 pixels, duplicates them and writes 8 pixels. // Reads 4 pixels, duplicates them and writes 8 pixels.
// Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned. // Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned.
void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr, void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr,
int dst_width, int /* x */, int /* dx */) { int dst_width, int x, int dx) {
asm volatile ( asm volatile (
LABELALIGN LABELALIGN
"1: \n" "1: \n"
...@@ -893,7 +893,7 @@ void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr, ...@@ -893,7 +893,7 @@ void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr,
} }
void ScaleARGBRowDown2_SSE2(const uint8* src_argb, void ScaleARGBRowDown2_SSE2(const uint8* src_argb,
ptrdiff_t /* src_stride */, ptrdiff_t src_stride,
uint8* dst_argb, int dst_width) { uint8* dst_argb, int dst_width) {
asm volatile ( asm volatile (
LABELALIGN LABELALIGN
...@@ -918,7 +918,7 @@ void ScaleARGBRowDown2_SSE2(const uint8* src_argb, ...@@ -918,7 +918,7 @@ void ScaleARGBRowDown2_SSE2(const uint8* src_argb,
} }
void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb, void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb,
ptrdiff_t /* src_stride */, ptrdiff_t src_stride,
uint8* dst_argb, int dst_width) { uint8* dst_argb, int dst_width) {
asm volatile ( asm volatile (
LABELALIGN LABELALIGN
...@@ -1152,7 +1152,7 @@ void ScaleARGBCols_SSE2(uint8* dst_argb, const uint8* src_argb, ...@@ -1152,7 +1152,7 @@ void ScaleARGBCols_SSE2(uint8* dst_argb, const uint8* src_argb,
// Reads 4 pixels, duplicates them and writes 8 pixels. // Reads 4 pixels, duplicates them and writes 8 pixels.
// Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned. // Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned.
void ScaleARGBColsUp2_SSE2(uint8* dst_argb, const uint8* src_argb, void ScaleARGBColsUp2_SSE2(uint8* dst_argb, const uint8* src_argb,
int dst_width, int /* x */, int /* dx */) { int dst_width, int x, int dx) {
asm volatile ( asm volatile (
LABELALIGN LABELALIGN
"1: \n" "1: \n"
......
...@@ -234,7 +234,8 @@ void ScaleRowDown2_Unaligned_SSE2(const uint8* src_ptr, ...@@ -234,7 +234,8 @@ void ScaleRowDown2_Unaligned_SSE2(const uint8* src_ptr,
// Blends 32x1 rectangle to 16x1. // Blends 32x1 rectangle to 16x1.
// Alignment requirement: src_ptr 16 byte aligned, dst_ptr 16 byte aligned. // Alignment requirement: src_ptr 16 byte aligned, dst_ptr 16 byte aligned.
__declspec(naked) __declspec(align(16)) __declspec(naked) __declspec(align(16))
void ScaleRowDown2Linear_Unaligned_SSE2(const uint8* src_ptr, ptrdiff_t, void ScaleRowDown2Linear_Unaligned_SSE2(const uint8* src_ptr,
ptrdiff_t src_stride,
uint8* dst_ptr, int dst_width) { uint8* dst_ptr, int dst_width) {
__asm { __asm {
mov eax, [esp + 4] // src_ptr mov eax, [esp + 4] // src_ptr
...@@ -882,7 +883,7 @@ void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr, ...@@ -882,7 +883,7 @@ void ScaleFilterCols_SSSE3(uint8* dst_ptr, const uint8* src_ptr,
// Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned. // Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned.
__declspec(naked) __declspec(align(16)) __declspec(naked) __declspec(align(16))
void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr, void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr,
int dst_width, int /* x */, int /* dx */) { int dst_width, int x, int dx) {
__asm { __asm {
mov edx, [esp + 4] // dst_ptr mov edx, [esp + 4] // dst_ptr
mov eax, [esp + 8] // src_ptr mov eax, [esp + 8] // src_ptr
...@@ -909,7 +910,7 @@ void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr, ...@@ -909,7 +910,7 @@ void ScaleColsUp2_SSE2(uint8* dst_ptr, const uint8* src_ptr,
// Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned. // Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned.
__declspec(naked) __declspec(align(16)) __declspec(naked) __declspec(align(16))
void ScaleARGBRowDown2_SSE2(const uint8* src_argb, void ScaleARGBRowDown2_SSE2(const uint8* src_argb,
ptrdiff_t /* src_stride */, ptrdiff_t src_stride,
uint8* dst_argb, int dst_width) { uint8* dst_argb, int dst_width) {
__asm { __asm {
mov eax, [esp + 4] // src_argb mov eax, [esp + 4] // src_argb
...@@ -936,7 +937,7 @@ void ScaleARGBRowDown2_SSE2(const uint8* src_argb, ...@@ -936,7 +937,7 @@ void ScaleARGBRowDown2_SSE2(const uint8* src_argb,
// Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned. // Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned.
__declspec(naked) __declspec(align(16)) __declspec(naked) __declspec(align(16))
void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb, void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb,
ptrdiff_t /* src_stride */, ptrdiff_t src_stride,
uint8* dst_argb, int dst_width) { uint8* dst_argb, int dst_width) {
__asm { __asm {
mov eax, [esp + 4] // src_argb mov eax, [esp + 4] // src_argb
...@@ -1258,7 +1259,7 @@ void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb, ...@@ -1258,7 +1259,7 @@ void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, const uint8* src_argb,
// Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned. // Alignment requirement: src_argb 16 byte aligned, dst_argb 16 byte aligned.
__declspec(naked) __declspec(align(16)) __declspec(naked) __declspec(align(16))
void ScaleARGBColsUp2_SSE2(uint8* dst_argb, const uint8* src_argb, void ScaleARGBColsUp2_SSE2(uint8* dst_argb, const uint8* src_argb,
int dst_width, int /* x */, int /* dx */) { int dst_width, int x, int dx) {
__asm { __asm {
mov edx, [esp + 4] // dst_argb mov edx, [esp + 4] // dst_argb
mov eax, [esp + 8] // src_argb mov eax, [esp + 8] // src_argb
......
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