Index: source/libvpx/vp9/encoder/vp9_denoiser.c |
diff --git a/source/libvpx/vp9/encoder/vp9_denoiser.c b/source/libvpx/vp9/encoder/vp9_denoiser.c |
index f1d73790a773146dc757daee4d9db97b7bf6ab65..bf6c533ce2d5fb88ddcb3db91578285ea2596444 100644 |
--- a/source/libvpx/vp9/encoder/vp9_denoiser.c |
+++ b/source/libvpx/vp9/encoder/vp9_denoiser.c |
@@ -63,10 +63,6 @@ static int sse_diff_thresh(BLOCK_SIZE bs, int increase_denoising, |
} |
} |
-int total_adj_strong_thresh(BLOCK_SIZE bs, int increase_denoising) { |
- return (1 << num_pels_log2_lookup[bs]) * (increase_denoising ? 3 : 2); |
-} |
- |
static int total_adj_weak_thresh(BLOCK_SIZE bs, int increase_denoising) { |
return (1 << num_pels_log2_lookup[bs]) * (increase_denoising ? 3 : 2); |
} |
@@ -124,10 +120,10 @@ int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, |
adj = adj_val[2]; |
} |
if (diff > 0) { |
- avg[c] = MIN(UINT8_MAX, sig[c] + adj); |
+ avg[c] = VPXMIN(UINT8_MAX, sig[c] + adj); |
total_adj += adj; |
} else { |
- avg[c] = MAX(0, sig[c] - adj); |
+ avg[c] = VPXMAX(0, sig[c] - adj); |
total_adj -= adj; |
} |
} |
@@ -164,13 +160,13 @@ int vp9_denoiser_filter_c(const uint8_t *sig, int sig_stride, |
// Diff positive means we made positive adjustment above |
// (in first try/attempt), so now make negative adjustment to bring |
// denoised signal down. |
- avg[c] = MAX(0, avg[c] - adj); |
+ avg[c] = VPXMAX(0, avg[c] - adj); |
total_adj -= adj; |
} else { |
// Diff negative means we made negative adjustment above |
// (in first try/attempt), so now make positive adjustment to bring |
// denoised signal up. |
- avg[c] = MIN(UINT8_MAX, avg[c] + adj); |
+ avg[c] = VPXMIN(UINT8_MAX, avg[c] + adj); |
total_adj += adj; |
} |
} |
@@ -435,7 +431,7 @@ int vp9_denoiser_alloc(VP9_DENOISER *denoiser, int width, int height, |
assert(denoiser != NULL); |
for (i = 0; i < MAX_REF_FRAMES; ++i) { |
- fail = vp9_alloc_frame_buffer(&denoiser->running_avg_y[i], width, height, |
+ fail = vpx_alloc_frame_buffer(&denoiser->running_avg_y[i], width, height, |
ssx, ssy, |
#if CONFIG_VP9_HIGHBITDEPTH |
use_highbitdepth, |
@@ -450,7 +446,7 @@ int vp9_denoiser_alloc(VP9_DENOISER *denoiser, int width, int height, |
#endif |
} |
- fail = vp9_alloc_frame_buffer(&denoiser->mc_running_avg_y, width, height, |
+ fail = vpx_alloc_frame_buffer(&denoiser->mc_running_avg_y, width, height, |
ssx, ssy, |
#if CONFIG_VP9_HIGHBITDEPTH |
use_highbitdepth, |
@@ -476,9 +472,9 @@ void vp9_denoiser_free(VP9_DENOISER *denoiser) { |
return; |
} |
for (i = 0; i < MAX_REF_FRAMES; ++i) { |
- vp9_free_frame_buffer(&denoiser->running_avg_y[i]); |
+ vpx_free_frame_buffer(&denoiser->running_avg_y[i]); |
} |
- vp9_free_frame_buffer(&denoiser->mc_running_avg_y); |
+ vpx_free_frame_buffer(&denoiser->mc_running_avg_y); |
} |
#ifdef OUTPUT_YUV_DENOISED |