From 11a84b25b56c01f4516c560712c370d7a3c40f37 Mon Sep 17 00:00:00 2001 From: Johann Date: Mon, 3 Dec 2012 15:08:17 -0800 Subject: [PATCH] Remove last duck_ functions Change-Id: I5fbcd2006d05bfe841f3c7af9c1aeb2cb83b3149 --- vpx_mem/vpx_mem.h | 9 +-------- vpx_scale/generic/vpx_scale.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/vpx_mem/vpx_mem.h b/vpx_mem/vpx_mem.h index 3246e9298..c7321a95e 100644 --- a/vpx_mem/vpx_mem.h +++ b/vpx_mem/vpx_mem.h @@ -101,14 +101,7 @@ extern "C" { /* some defines for backward compatibility */ #define DMEM_GENERAL 0 -#define duck_memalign(X,Y,Z) vpx_memalign(X,Y) -#define duck_malloc(X,Y) vpx_malloc(X) -#define duck_calloc(X,Y,Z) vpx_calloc(X,Y) -#define duck_realloc vpx_realloc -#define duck_free vpx_free -#define duck_memcpy vpx_memcpy -#define duck_memmove vpx_memmove -#define duck_memset vpx_memset +// (*)< #if REPLACE_BUILTIN_FUNCTIONS # ifndef __VPX_MEM_C__ diff --git a/vpx_scale/generic/vpx_scale.c b/vpx_scale/generic/vpx_scale.c index 49cdb7bc7..c83c3b68f 100644 --- a/vpx_scale/generic/vpx_scale.c +++ b/vpx_scale/generic/vpx_scale.c @@ -432,7 +432,7 @@ void Scale2D temp_area + i * dest_pitch, 1, hratio, dest_width); } else { /* Duplicate the last row */ /* copy temp_area row 0 over from last row in the past */ - duck_memcpy(temp_area + i * dest_pitch, temp_area + (i - 1)*dest_pitch, dest_pitch); + vpx_memcpy(temp_area + i * dest_pitch, temp_area + (i - 1)*dest_pitch, dest_pitch); } } @@ -443,7 +443,7 @@ void Scale2D } /* copy temp_area row 0 over from last row in the past */ - duck_memcpy(temp_area, temp_area + source_band_height * dest_pitch, dest_pitch); + vpx_memcpy(temp_area, temp_area + source_band_height * dest_pitch, dest_pitch); /* move to the next band */ source += source_band_height * source_pitch; @@ -498,11 +498,11 @@ void vp8_scale_frame if (dw < (int)dst->y_width) for (i = 0; i < dh; i++) - duck_memset(dst->y_buffer + i * dst->y_stride + dw - 1, dst->y_buffer[i * dst->y_stride + dw - 2], dst->y_width - dw + 1); + vpx_memset(dst->y_buffer + i * dst->y_stride + dw - 1, dst->y_buffer[i * dst->y_stride + dw - 2], dst->y_width - dw + 1); if (dh < (int)dst->y_height) for (i = dh - 1; i < (int)dst->y_height; i++) - duck_memcpy(dst->y_buffer + i * dst->y_stride, dst->y_buffer + (dh - 2) * dst->y_stride, dst->y_width + 1); + vpx_memcpy(dst->y_buffer + i * dst->y_stride, dst->y_buffer + (dh - 2) * dst->y_stride, dst->y_width + 1); Scale2D((unsigned char *) src->u_buffer, src->uv_stride, src->uv_width, src->uv_height, (unsigned char *) dst->u_buffer, dst->uv_stride, dw / 2, dh / 2, @@ -510,11 +510,11 @@ void vp8_scale_frame if (dw / 2 < (int)dst->uv_width) for (i = 0; i < dst->uv_height; i++) - duck_memset(dst->u_buffer + i * dst->uv_stride + dw / 2 - 1, dst->u_buffer[i * dst->uv_stride + dw / 2 - 2], dst->uv_width - dw / 2 + 1); + vpx_memset(dst->u_buffer + i * dst->uv_stride + dw / 2 - 1, dst->u_buffer[i * dst->uv_stride + dw / 2 - 2], dst->uv_width - dw / 2 + 1); if (dh / 2 < (int)dst->uv_height) for (i = dh / 2 - 1; i < (int)dst->y_height / 2; i++) - duck_memcpy(dst->u_buffer + i * dst->uv_stride, dst->u_buffer + (dh / 2 - 2)*dst->uv_stride, dst->uv_width); + vpx_memcpy(dst->u_buffer + i * dst->uv_stride, dst->u_buffer + (dh / 2 - 2)*dst->uv_stride, dst->uv_width); Scale2D((unsigned char *) src->v_buffer, src->uv_stride, src->uv_width, src->uv_height, (unsigned char *) dst->v_buffer, dst->uv_stride, dw / 2, dh / 2, @@ -522,9 +522,9 @@ void vp8_scale_frame if (dw / 2 < (int)dst->uv_width) for (i = 0; i < dst->uv_height; i++) - duck_memset(dst->v_buffer + i * dst->uv_stride + dw / 2 - 1, dst->v_buffer[i * dst->uv_stride + dw / 2 - 2], dst->uv_width - dw / 2 + 1); + vpx_memset(dst->v_buffer + i * dst->uv_stride + dw / 2 - 1, dst->v_buffer[i * dst->uv_stride + dw / 2 - 2], dst->uv_width - dw / 2 + 1); if (dh / 2 < (int) dst->uv_height) for (i = dh / 2 - 1; i < (int)dst->y_height / 2; i++) - duck_memcpy(dst->v_buffer + i * dst->uv_stride, dst->v_buffer + (dh / 2 - 2)*dst->uv_stride, dst->uv_width); + vpx_memcpy(dst->v_buffer + i * dst->uv_stride, dst->v_buffer + (dh / 2 - 2)*dst->uv_stride, dst->uv_width); }