ref: 3a986eac5734d15c24fb4e2421aaebf5f558a0f6
parent: 2580e7d63e30349f2d357ddfb2cd3a10b7cd9a1c
author: paulwilkins <[email protected]>
date: Mon Jul 11 07:45:52 EDT 2016
Sample points to reduce encode overhead. Only noise filter sampled points in first pass to reduce any first pass speed overhead. Change-Id: Ic80d4400e59146d1c3332336c4350faf28ff8b17
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -689,8 +689,9 @@
int stride = x->plane[0].src.stride;
int block_noise = 0;
- for (h = 0; h < height; ++h) {
- for (w = 0; w < width; ++w) {
+ // Sampled points to reduce cost overhead.
+ for (h = 0; h < height; h += 2) {
+ for (w = 0; w < width; w += 2) {
#if CONFIG_VP9_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
block_noise += fp_highbd_estimate_point_noise(src_ptr, stride);
@@ -703,7 +704,7 @@
}
src_ptr += (stride - width);
}
- return block_noise;
+ return block_noise << 2; // Scale << 2 to account for sampling.
}
#define INVALID_ROW -1