Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: source/libvpx/vp8/common/postproc.c

Issue 592203002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp8/common/postproc.h ('k') | source/libvpx/vp8/common/rtcd_defs.pl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp8/common/postproc.c
===================================================================
--- source/libvpx/vp8/common/postproc.c (revision 292072)
+++ source/libvpx/vp8/common/postproc.c (working copy)
@@ -214,6 +214,7 @@
x = 50 + (x - 50) * 10 / 8;
return x * x / 3;
}
+
void vp8_mbpost_proc_across_ip_c(unsigned char *src, int pitch, int rows, int cols, int flimit)
{
int r, c, i;
@@ -226,14 +227,14 @@
int sumsq = 0;
int sum = 0;
- for (i = -8; i<0; i++)
+ for (i = -8; i < 0; i++)
s[i]=s[0];
/* 17 avoids valgrind warning - we buffer values in c in d
* and only write them when we've read 8 ahead...
*/
- for (i = cols; i<cols+17; i++)
- s[i]=s[cols-1];
+ for (i = 0; i < 17; i++)
+ s[i+cols]=s[cols-1];
for (i = -8; i <= 6; i++)
{
@@ -264,7 +265,6 @@
}
}
-
void vp8_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols, int flimit)
{
int r, c, i;
@@ -284,8 +284,8 @@
/* 17 avoids valgrind warning - we buffer values in c in d
* and only write them when we've read 8 ahead...
*/
- for (i = rows; i < rows+17; i++)
- s[i*pitch]=s[(rows-1)*pitch];
+ for (i = 0; i < 17; i++)
+ s[(i+rows)*pitch]=s[(rows-1)*pitch];
for (i = -8; i <= 6; i++)
{
@@ -385,13 +385,13 @@
}
#endif
-#if !(CONFIG_TEMPORAL_DENOISING)
void vp8_de_noise(VP8_COMMON *cm,
YV12_BUFFER_CONFIG *source,
YV12_BUFFER_CONFIG *post,
int q,
int low_var_thresh,
- int flag)
+ int flag,
+ int uvfilter)
{
int mbr;
double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065;
@@ -412,18 +412,20 @@
source->y_buffer + 16 * mbr * source->y_stride,
source->y_buffer + 16 * mbr * source->y_stride,
source->y_stride, source->y_stride, source->y_width, limits, 16);
-
- vp8_post_proc_down_and_across_mb_row(
- source->u_buffer + 8 * mbr * source->uv_stride,
- source->u_buffer + 8 * mbr * source->uv_stride,
- source->uv_stride, source->uv_stride, source->uv_width, limits, 8);
- vp8_post_proc_down_and_across_mb_row(
- source->v_buffer + 8 * mbr * source->uv_stride,
- source->v_buffer + 8 * mbr * source->uv_stride,
- source->uv_stride, source->uv_stride, source->uv_width, limits, 8);
+ if (uvfilter == 1) {
+ vp8_post_proc_down_and_across_mb_row(
+ source->u_buffer + 8 * mbr * source->uv_stride,
+ source->u_buffer + 8 * mbr * source->uv_stride,
+ source->uv_stride, source->uv_stride, source->uv_width, limits,
+ 8);
+ vp8_post_proc_down_and_across_mb_row(
+ source->v_buffer + 8 * mbr * source->uv_stride,
+ source->v_buffer + 8 * mbr * source->uv_stride,
+ source->uv_stride, source->uv_stride, source->uv_width, limits,
+ 8);
+ }
}
}
-#endif
double vp8_gaussian(double sigma, double mu, double x)
{
« no previous file with comments | « source/libvpx/vp8/common/postproc.h ('k') | source/libvpx/vp8/common/rtcd_defs.pl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698