summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Grange <agrange@google.com>2011-01-14 15:04:39 +0000
committerAdrian Grange <agrange@google.com>2011-01-14 15:04:39 +0000
commit2c1b06e67213d5e7375d911f326810dbf086f9e6 (patch)
tree9cee3a0e45a45e65897e48fb451bd1673113072d
parentb082790c7d1e16dde329f1baea153c0fe86112d5 (diff)
downloadlibvpx-2c1b06e67213d5e7375d911f326810dbf086f9e6.tar
libvpx-2c1b06e67213d5e7375d911f326810dbf086f9e6.tar.gz
libvpx-2c1b06e67213d5e7375d911f326810dbf086f9e6.tar.bz2
libvpx-2c1b06e67213d5e7375d911f326810dbf086f9e6.zip
ARNR filter pointer update bug fix
In cases where the frame width is not a multiple of 16 the ARNR filter would go wrong. In vp8_temporal_filter_iterate_c when updating pointers at the end of a row of MBs, the image size was incorrectly used rather than using Num_MBs_In_Row times 16 (Y) or 8 (U,V). This worked when width is multiple of 16 but failed otherwise. Change-Id: I008919062715bd3d17c7aa2562ab58d1cb37053a
-rw-r--r--vp8/encoder/temporal_filter.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/vp8/encoder/temporal_filter.c b/vp8/encoder/temporal_filter.c
index 396e3390d..f28daaff9 100644
--- a/vp8/encoder/temporal_filter.c
+++ b/vp8/encoder/temporal_filter.c
@@ -290,8 +290,8 @@ static void vp8_temporal_filter_iterate_c
int mb_col, mb_row;
unsigned int filter_weight[MAX_LAG_BUFFERS];
unsigned char *mm_ptr = cpi->fp_motion_map;
- int cols = cpi->common.mb_cols;
- int rows = cpi->common.mb_rows;
+ int mb_cols = cpi->common.mb_cols;
+ int mb_rows = cpi->common.mb_rows;
int MBs = cpi->common.MBs;
int mb_y_offset = 0;
int mb_uv_offset = 0;
@@ -314,7 +314,7 @@ static void vp8_temporal_filter_iterate_c
filter_weight[frame] = 1;
}
- for (mb_row = 0; mb_row < rows; mb_row++)
+ for (mb_row = 0; mb_row < mb_rows; mb_row++)
{
#if ALT_REF_MC_ENABLED
// Reduced search extent by 3 for 6-tap filter & smaller UMV border
@@ -323,7 +323,7 @@ static void vp8_temporal_filter_iterate_c
+ (VP8BORDERINPIXELS - 19);
#endif
- for (mb_col = 0; mb_col < cols; mb_col++)
+ for (mb_col = 0; mb_col < mb_cols; mb_col++)
{
int i, j, k, w;
int weight_cap;
@@ -497,8 +497,8 @@ static void vp8_temporal_filter_iterate_c
mb_uv_offset += 8;
}
- mb_y_offset += 16*f->y_stride-f->y_width;
- mb_uv_offset += 8*f->uv_stride-f->uv_width;
+ mb_y_offset += 16*(f->y_stride-mb_cols);
+ mb_uv_offset += 8*(f->uv_stride-mb_cols);
}
// Restore input state