Merge "Remove Windows-style newlines using dos2unix"
diff --git a/vp9/common/mips/dspr2/vp9_convolve8_avg_dspr2.c b/vp9/common/mips/dspr2/vp9_convolve8_avg_dspr2.c
index da7f0fd..ab18490 100644
--- a/vp9/common/mips/dspr2/vp9_convolve8_avg_dspr2.c
+++ b/vp9/common/mips/dspr2/vp9_convolve8_avg_dspr2.c
@@ -435,7 +435,7 @@
filter_y, y_step_q4,
w, intermediate_height);
- vp9_convolve8_avg_vert(temp + (64*3), 64,
+ vp9_convolve8_avg_vert(temp + 64 * 3, 64,
dst, dst_stride,
filter_x, x_step_q4,
filter_y, y_step_q4,
diff --git a/vp9/common/vp9_common.h b/vp9/common/vp9_common.h
index 1796906..3ac192b 100644
--- a/vp9/common/vp9_common.h
+++ b/vp9/common/vp9_common.h
@@ -40,8 +40,8 @@
vpx_memcpy(dest, src, n * sizeof(*src)); \
}
-#define vp9_zero(dest) vpx_memset(&dest, 0, sizeof(dest));
-#define vp9_zero_array(dest, n) vpx_memset(dest, 0, n * sizeof(*dest));
+#define vp9_zero(dest) vpx_memset(&dest, 0, sizeof(dest))
+#define vp9_zero_array(dest, n) vpx_memset(dest, 0, n * sizeof(*dest))
static INLINE uint8_t clip_pixel(int val) {
return (val > 255) ? 255u : (val < 0) ? 0u : val;
diff --git a/vp9/common/x86/vp9_asm_stubs.c b/vp9/common/x86/vp9_asm_stubs.c
index ba9ceb2..106e6d4 100644
--- a/vp9/common/x86/vp9_asm_stubs.c
+++ b/vp9/common/x86/vp9_asm_stubs.c
@@ -217,7 +217,7 @@
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
int w, int h) {
- DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 64*71);
+ DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 64 * 71);
assert(w <= 64);
assert(h <= 64);
@@ -238,7 +238,7 @@
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
int w, int h) {
- DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 64*71);
+ DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 64 * 71);
assert(w <= 64);
assert(h <= 64);
@@ -428,7 +428,7 @@
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
int w, int h) {
- DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 64*71);
+ DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 64 * 71);
assert(w <= 64);
assert(h <= 64);
@@ -449,7 +449,7 @@
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
int w, int h) {
- DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 64*71);
+ DECLARE_ALIGNED_ARRAY(16, unsigned char, fdata2, 64 * 71);
assert(w <= 64);
assert(h <= 64);
diff --git a/vp9/encoder/vp9_block.h b/vp9/encoder/vp9_block.h
index e5ed0ec..482c50b 100644
--- a/vp9/encoder/vp9_block.h
+++ b/vp9/encoder/vp9_block.h
@@ -26,7 +26,7 @@
// Structure to hold snapshot of coding context during the mode picking process
typedef struct {
MODE_INFO mic;
- unsigned char zcoeff_blk[256];
+ uint8_t zcoeff_blk[256];
int skip;
int_mv best_ref_mv;
int_mv second_best_ref_mv;
@@ -55,8 +55,8 @@
} PICK_MODE_CONTEXT;
struct macroblock_plane {
- DECLARE_ALIGNED(16, int16_t, src_diff[64*64]);
- DECLARE_ALIGNED(16, int16_t, coeff[64*64]);
+ DECLARE_ALIGNED(16, int16_t, src_diff[64 * 64]);
+ DECLARE_ALIGNED(16, int16_t, coeff[64 * 64]);
struct buf_2d src;
// Quantizer setings
@@ -126,7 +126,7 @@
int mv_row_min;
int mv_row_max;
- unsigned char zcoeff_blk[TX_SIZES][256];
+ uint8_t zcoeff_blk[TX_SIZES][256];
int skip;
int encode_breakout;
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 6833217..41bf17a 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -123,7 +123,6 @@
static unsigned int alt_activity_measure(MACROBLOCK *x, int use_dc_pred) {
return vp9_encode_intra(x, use_dc_pred);
}
-DECLARE_ALIGNED(16, static const uint8_t, vp9_64x64_zeros[64*64]) = {0};
// Measure the activity of the current macroblock
// What we measure here is TBD so abstracted to this function
@@ -399,14 +398,6 @@
}
if (cm->frame_type == KEY_FRAME) {
- // Restore the coding modes to that held in the coding context
- // if (mb_mode == I4X4_PRED)
- // for (i = 0; i < 16; i++)
- // {
- // xd->block[i].bmi.as_mode =
- // xd->mode_info_context->bmi[i].as_mode;
- // assert(xd->mode_info_context->bmi[i].as_mode < MB_MODE_COUNT);
- // }
#if CONFIG_INTERNAL_STATS
static const int kf_mode_index[] = {
THR_DC /*DC_PRED*/,
@@ -1839,9 +1830,9 @@
xd->this_mi->mbmi.mode = DC_PRED;
xd->this_mi->mbmi.uv_mode = DC_PRED;
- vp9_zero(cpi->y_mode_count)
- vp9_zero(cpi->y_uv_mode_count)
- vp9_zero(cm->counts.inter_mode)
+ vp9_zero(cpi->y_mode_count);
+ vp9_zero(cpi->y_uv_mode_count);
+ vp9_zero(cm->counts.inter_mode);
vp9_zero(cpi->partition_count);
vp9_zero(cpi->intra_inter_count);
vp9_zero(cpi->comp_inter_count);
diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c
index 0afb35f..28a9050 100644
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -1731,7 +1731,7 @@
cpi->common.error.setjmp = 0;
- vp9_zero(cpi->y_uv_mode_count)
+ vp9_zero(cpi->y_uv_mode_count);
#ifdef MODE_TEST_HIT_STATS
vp9_zero(cpi->mode_test_hits)
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index ba521af..eb7ca6b 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -2231,9 +2231,6 @@
ctx->comp_pred_diff = (int)comp_pred_diff[COMP_PREDICTION_ONLY];
ctx->hybrid_pred_diff = (int)comp_pred_diff[HYBRID_PREDICTION];
- vpx_memcpy(ctx->zcoeff_blk, x->zcoeff_blk[xd->this_mi->mbmi.tx_size],
- sizeof(ctx->zcoeff_blk));
-
vpx_memcpy(ctx->tx_rd_diff, tx_size_diff, sizeof(ctx->tx_rd_diff));
vpx_memcpy(ctx->best_filter_diff, best_filter_diff,
sizeof(*best_filter_diff) * (SWITCHABLE_FILTERS + 1));
@@ -3149,11 +3146,8 @@
const int bws = num_8x8_blocks_wide_lookup[bsize] / 2;
const int bhs = num_8x8_blocks_high_lookup[bsize] / 2;
int best_skip2 = 0;
- unsigned char best_zcoeff_blk[256] = { 0 };
x->skip_encode = cpi->sf.skip_encode_frame && xd->q_index < QIDX_SKIP_THRESH;
- vp9_zero(x->zcoeff_blk);
- vp9_zero(ctx->zcoeff_blk);
// Everywhere the flag is set the error is much higher than its neighbors.
ctx->frames_with_high_error = 0;
@@ -3584,8 +3578,8 @@
best_rd = this_rd;
best_mbmode = *mbmi;
best_skip2 = this_skip2;
- vpx_memcpy(best_zcoeff_blk, x->zcoeff_blk[mbmi->tx_size],
- sizeof(best_zcoeff_blk));
+ vpx_memcpy(ctx->zcoeff_blk, x->zcoeff_blk[mbmi->tx_size],
+ sizeof(ctx->zcoeff_blk));
// TODO(debargha): enhance this test with a better distortion prediction
// based on qp, activity mask and history
@@ -3751,9 +3745,6 @@
*mbmi = best_mbmode;
x->skip |= best_skip2;
- vpx_memcpy(x->zcoeff_blk[mbmi->tx_size], best_zcoeff_blk,
- sizeof(best_zcoeff_blk));
-
for (i = 0; i < NB_PREDICTION_TYPES; ++i) {
if (best_pred_rd[i] == INT64_MAX)
best_pred_diff[i] = INT_MIN;
@@ -3847,11 +3838,9 @@
int_mv seg_mvs[4][MAX_REF_FRAMES];
b_mode_info best_bmodes[4];
int best_skip2 = 0;
- unsigned char best_zcoeff_blk[256] = { 0 };
x->skip_encode = cpi->sf.skip_encode_frame && xd->q_index < QIDX_SKIP_THRESH;
vp9_zero(x->zcoeff_blk);
- vp9_zero(ctx->zcoeff_blk);
for (i = 0; i < 4; i++) {
int j;
@@ -4328,8 +4317,8 @@
RDCOST(x->rdmult, x->rddiv, rate_uv, distortion_uv);
best_mbmode = *mbmi;
best_skip2 = this_skip2;
- vpx_memcpy(best_zcoeff_blk, x->zcoeff_blk[mbmi->tx_size],
- sizeof(best_zcoeff_blk));
+ vpx_memcpy(ctx->zcoeff_blk, x->zcoeff_blk[mbmi->tx_size],
+ sizeof(ctx->zcoeff_blk));
for (i = 0; i < 4; i++)
best_bmodes[i] = xd->this_mi->bmi[i];
@@ -4492,9 +4481,6 @@
mbmi->mv[1].as_int = xd->this_mi->bmi[3].as_mv[1].as_int;
}
- vpx_memcpy(x->zcoeff_blk[mbmi->tx_size], best_zcoeff_blk,
- sizeof(best_zcoeff_blk));
-
for (i = 0; i < NB_PREDICTION_TYPES; ++i) {
if (best_pred_rd[i] == INT64_MAX)
best_pred_diff[i] = INT_MIN;
@@ -4536,4 +4522,3 @@
return best_rd;
}
-