diff options
author | Ronald S. Bultje <rbultje@google.com> | 2013-05-02 10:34:37 -0700 |
---|---|---|
committer | Ronald S. Bultje <rbultje@google.com> | 2013-05-02 10:40:53 -0700 |
commit | 4aad30a3cf4c4c82bc72e79c43a59d993f1b409e (patch) | |
tree | 9a096ad2b2efb4868e32b62bb49fe06c9ab2fc80 /vp9/encoder | |
parent | 704fb4866ebf88639f750c748cc54c5ba2955ba7 (diff) | |
download | libvpx-4aad30a3cf4c4c82bc72e79c43a59d993f1b409e.tar libvpx-4aad30a3cf4c4c82bc72e79c43a59d993f1b409e.tar.gz libvpx-4aad30a3cf4c4c82bc72e79c43a59d993f1b409e.tar.bz2 libvpx-4aad30a3cf4c4c82bc72e79c43a59d993f1b409e.zip |
Always initialize values in sb/mb_partitioning.
This doesn't affect the output, because in previous cases where the
values were uninitialized, this was because the mb_row/col is outside
the codable area, and thus encode_sb will test them for the next
decomposition-level, but return right after that on size-check. All
this does is prevent a warning in valgrind.
Change-Id: I90d8a29e6f8ebb2b0143684e08fe77ae3a0816b1
Diffstat (limited to 'vp9/encoder')
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 2586d4458..975004c72 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -1013,6 +1013,7 @@ static void encode_sb_row(VP9_COMP *cpi, int j; ENTROPY_CONTEXT l2[8 * MAX_MB_PLANE], a2[8 * MAX_MB_PLANE]; + sb_partitioning[i] = BLOCK_SIZE_MB16X16; if (mi_row + y_idx >= cm->mi_rows || mi_col + x_idx >= cm->mi_cols) continue; @@ -1033,7 +1034,6 @@ static void encode_sb_row(VP9_COMP *cpi, } /* Encode MBs in raster order within the SB */ - sb_partitioning[i] = BLOCK_SIZE_MB16X16; for (j = 0; j < 4; j++) { const int x_idx_m = x_idx + ((j & 1) << CONFIG_SB8X8); const int y_idx_m = y_idx + ((j >> 1) << CONFIG_SB8X8); @@ -1041,6 +1041,8 @@ static void encode_sb_row(VP9_COMP *cpi, #if CONFIG_SB8X8 int r2, d2, mb16_rate = 0, mb16_dist = 0, k; ENTROPY_CONTEXT l3[4 * MAX_MB_PLANE], a3[4 * MAX_MB_PLANE]; + + mb_partitioning[i][j] = BLOCK_SIZE_SB8X8; #endif if (mi_row + y_idx_m >= cm->mi_rows || @@ -1066,7 +1068,6 @@ static void encode_sb_row(VP9_COMP *cpi, sizeof(ENTROPY_CONTEXT) * 4 >> xd->plane[p].subsampling_x); } - mb_partitioning[i][j] = BLOCK_SIZE_SB8X8; for (k = 0; k < 4; k++) { xd->b_index = k; |