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

Unified Diff: source/libvpx/vp9/common/vp9_subpelvar.h

Issue 23600008: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 4 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/vp9/common/vp9_scale.c ('k') | source/libvpx/vp9/common/vp9_tile_common.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/common/vp9_subpelvar.h
===================================================================
--- source/libvpx/vp9/common/vp9_subpelvar.h (revision 219822)
+++ source/libvpx/vp9/common/vp9_subpelvar.h (working copy)
@@ -11,7 +11,8 @@
#ifndef VP9_COMMON_VP9_SUBPELVAR_H_
#define VP9_COMMON_VP9_SUBPELVAR_H_
-#include "vp9/common/vp9_filter.h"
+#include "vp9/common/vp9_common.h"
+#include "vp9/common/vp9_convolve.h"
static void variance(const uint8_t *src_ptr,
int source_stride,
@@ -78,10 +79,10 @@
for (i = 0; i < output_height; i++) {
for (j = 0; j < output_width; j++) {
- // Apply bilinear filter
- output_ptr[j] = (((int)src_ptr[0] * vp9_filter[0]) +
- ((int)src_ptr[pixel_step] * vp9_filter[1]) +
- (VP9_FILTER_WEIGHT / 2)) >> VP9_FILTER_SHIFT;
+ output_ptr[j] = ROUND_POWER_OF_TWO((int)src_ptr[0] * vp9_filter[0] +
+ (int)src_ptr[pixel_step] * vp9_filter[1],
+ FILTER_BITS);
+
src_ptr++;
}
@@ -127,20 +128,16 @@
unsigned int output_width,
const int16_t *vp9_filter) {
unsigned int i, j;
- int Temp;
for (i = 0; i < output_height; i++) {
for (j = 0; j < output_width; j++) {
- // Apply filter
- Temp = ((int)src_ptr[0] * vp9_filter[0]) +
- ((int)src_ptr[pixel_step] * vp9_filter[1]) +
- (VP9_FILTER_WEIGHT / 2);
- output_ptr[j] = (unsigned int)(Temp >> VP9_FILTER_SHIFT);
+ output_ptr[j] = ROUND_POWER_OF_TWO((int)src_ptr[0] * vp9_filter[0] +
+ (int)src_ptr[pixel_step] * vp9_filter[1],
+ FILTER_BITS);
src_ptr++;
}
- // Next row...
- src_ptr += src_pixels_per_line - output_width;
+ src_ptr += src_pixels_per_line - output_width;
output_ptr += output_width;
}
}
« no previous file with comments | « source/libvpx/vp9/common/vp9_scale.c ('k') | source/libvpx/vp9/common/vp9_tile_common.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698