ref: 1e511a539cad871343bd3b583bf0a3d413098e09
parent: 6c417077bee8c0abd0c516ddfb6f0ea112961f9f
parent: 49741fee9feca9695424818a2e63b194696d03b1
author: Tim Kopp <[email protected]>
date: Wed Jul 2 07:35:32 EDT 2014
Merge "Replaced loops with vpx_memcpy()"
--- a/vp9/encoder/vp9_denoiser.c
+++ b/vp9/encoder/vp9_denoiser.c
@@ -81,13 +81,11 @@
return framebuf + (stride * mi_row * 8) + (mi_col * 8);
}
-void copy_block(uint8_t *dest, int dest_stride,
- uint8_t *src, int src_stride, BLOCK_SIZE bs) {
- int r, c;
+static void copy_block(uint8_t *dest, int dest_stride,
+ const uint8_t *src, int src_stride, BLOCK_SIZE bs) {
+ int r;
for (r = 0; r < heights[bs]; ++r) {
- for (c = 0; c < widths[bs]; ++c) {
- dest[c] = src[c];
- }
+ vpx_memcpy(dest, src, widths[bs]);
dest += dest_stride;
src += src_stride;
}
@@ -254,7 +252,7 @@
}
static void copy_frame(YV12_BUFFER_CONFIG dest, const YV12_BUFFER_CONFIG src) {
- int r, c;
+ int r;
const uint8_t *srcbuf = src.y_buffer;
uint8_t *destbuf = dest.y_buffer;
assert(dest.y_width == src.y_width);
@@ -261,9 +259,7 @@
assert(dest.y_height == src.y_height);
for (r = 0; r < dest.y_height; ++r) {
- for (c = 0; c < dest.y_width; ++c) {
- destbuf[c] = srcbuf[c];
- }
+ vpx_memcpy(destbuf, srcbuf, dest.y_width);
destbuf += dest.y_stride;
srcbuf += src.y_stride;
}