Fix msvc 2015 build BUG=aomedia:900 Change-Id: I9ca596f677e174ccd12a6e4eb927733d25e76f58
diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c index d7e39b4..a1a22a0 100644 --- a/av1/common/reconinter.c +++ b/av1/common/reconinter.c
@@ -1728,9 +1728,9 @@ av1_build_inter_predictors_sbuv(cm, xd, mi_row, mi_col, ctx, bsize); } -void av1_setup_dst_planes(struct macroblockd_plane planes[MAX_MB_PLANE], - BLOCK_SIZE bsize, const YV12_BUFFER_CONFIG *src, - int mi_row, int mi_col) { +void av1_setup_dst_planes(struct macroblockd_plane *planes, BLOCK_SIZE bsize, + const YV12_BUFFER_CONFIG *src, int mi_row, + int mi_col) { const int widths[MAX_MB_PLANE] = { src->y_crop_width, src->uv_crop_width, src->uv_crop_width }; const int heights[MAX_MB_PLANE] = { src->y_crop_height, src->uv_crop_height,
diff --git a/av1/common/reconinter.h b/av1/common/reconinter.h index fd69f9d..0c33333 100644 --- a/av1/common/reconinter.h +++ b/av1/common/reconinter.h
@@ -446,9 +446,9 @@ dst->stride = stride; } -void av1_setup_dst_planes(struct macroblockd_plane planes[MAX_MB_PLANE], - BLOCK_SIZE bsize, const YV12_BUFFER_CONFIG *src, - int mi_row, int mi_col); +void av1_setup_dst_planes(struct macroblockd_plane *planes, BLOCK_SIZE bsize, + const YV12_BUFFER_CONFIG *src, int mi_row, + int mi_col); void av1_setup_pre_planes(MACROBLOCKD *xd, int idx, const YV12_BUFFER_CONFIG *src, int mi_row, int mi_col,
diff --git a/av1/common/thread_common.c b/av1/common/thread_common.c index eec8629..d515912 100644 --- a/av1/common/thread_common.c +++ b/av1/common/thread_common.c
@@ -286,10 +286,9 @@ #endif // CONFIG_PARALLEL_DEBLOCKING static void loop_filter_rows_mt(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm, - struct macroblockd_plane planes[MAX_MB_PLANE], - int start, int stop, int y_only, - AVxWorker *workers, int nworkers, - AV1LfSync *lf_sync) { + struct macroblockd_plane *planes, int start, + int stop, int y_only, AVxWorker *workers, + int nworkers, AV1LfSync *lf_sync) { #if CONFIG_EXT_PARTITION printf( "STOPPING: This code has not been modified to work with the " @@ -415,7 +414,7 @@ } void av1_loop_filter_frame_mt(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm, - struct macroblockd_plane planes[MAX_MB_PLANE], + struct macroblockd_plane *planes, int frame_filter_level, #if CONFIG_LOOPFILTER_LEVEL int frame_filter_level_r,
diff --git a/av1/common/thread_common.h b/av1/common/thread_common.h index 6d118e6..7eddc66 100644 --- a/av1/common/thread_common.h +++ b/av1/common/thread_common.h
@@ -49,7 +49,7 @@ // Multi-threaded loopfilter that uses the tile threads. void av1_loop_filter_frame_mt(YV12_BUFFER_CONFIG *frame, struct AV1Common *cm, - struct macroblockd_plane planes[MAX_MB_PLANE], + struct macroblockd_plane *planes, int frame_filter_level, #if CONFIG_LOOPFILTER_LEVEL int frame_filter_level_r,
diff --git a/av1/common/x86/selfguided_sse4.c b/av1/common/x86/selfguided_sse4.c index 4006b85..9de9177 100644 --- a/av1/common/x86/selfguided_sse4.c +++ b/av1/common/x86/selfguided_sse4.c
@@ -10,9 +10,11 @@ av1_selfguided_restoration) */ static void calc_block(__m128i sum, __m128i sum_sq, __m128i n, - __m128i one_over_n, __m128i s, int bit_depth, int idx, - int32_t *A, int32_t *B) { + __m128i *one_over_n_, __m128i *s_, int bit_depth, + int idx, int32_t *A, int32_t *B) { __m128i a, b, p; + __m128i one_over_n = *one_over_n_; + __m128i s = *s_; #if CONFIG_HIGHBITDEPTH if (bit_depth > 8) { __m128i rounding_a = _mm_set1_epi32((1 << (2 * (bit_depth - 8))) >> 1); @@ -147,7 +149,7 @@ __m128i s = _mm_set_epi32( sgrproj_mtable[eps - 1][3 * h - 1], sgrproj_mtable[eps - 1][3 * h - 1], sgrproj_mtable[eps - 1][3 * h - 1], sgrproj_mtable[eps - 1][2 * h - 1]); - calc_block(sum_, sum_sq_, n, one_over_n, s, bit_depth, i * buf_stride, A, + calc_block(sum_, sum_sq_, n, &one_over_n, &s, bit_depth, i * buf_stride, A, B); n = _mm_set1_epi32(3 * h); @@ -178,8 +180,8 @@ _mm_alignr_epi8(b2, b1, 8))); sum_sq_ = _mm_add_epi32(a1, _mm_add_epi32(_mm_alignr_epi8(a2, a1, 4), _mm_alignr_epi8(a2, a1, 8))); - calc_block(sum_, sum_sq_, n, one_over_n, s, bit_depth, i * buf_stride + j, - A, B); + calc_block(sum_, sum_sq_, n, &one_over_n, &s, bit_depth, + i * buf_stride + j, A, B); } __m128i a3 = _mm_loadu_si128((__m128i *)&A[i * buf_stride + j + 3]); __m128i b3 = _mm_loadu_si128((__m128i *)&B[i * buf_stride + j + 3]); @@ -227,7 +229,7 @@ s = _mm_set_epi32( sgrproj_mtable[eps - 1][2 * h - 1], sgrproj_mtable[eps - 1][3 * h - 1], sgrproj_mtable[eps - 1][3 * h - 1], sgrproj_mtable[eps - 1][3 * h - 1]); - calc_block(sum_, sum_sq_, n, one_over_n, s, bit_depth, i * buf_stride + j, + calc_block(sum_, sum_sq_, n, &one_over_n, &s, bit_depth, i * buf_stride + j, A, B); } } @@ -342,7 +344,7 @@ __m128i s = _mm_set_epi32( sgrproj_mtable[eps - 1][5 * h - 1], sgrproj_mtable[eps - 1][5 * h - 1], sgrproj_mtable[eps - 1][4 * h - 1], sgrproj_mtable[eps - 1][3 * h - 1]); - calc_block(sum_, sum_sq_, n, one_over_n, s, bit_depth, i * buf_stride, A, + calc_block(sum_, sum_sq_, n, &one_over_n, &s, bit_depth, i * buf_stride, A, B); // Re-align a1 and b1 so that they start at index i * buf_stride + 2 @@ -372,8 +374,8 @@ _mm_alignr_epi8(a2, a1, 8))), _mm_add_epi32(_mm_alignr_epi8(a2, a1, 12), a2)); - calc_block(sum_, sum_sq_, n, one_over_n, s, bit_depth, i * buf_stride + j, - A, B); + calc_block(sum_, sum_sq_, n, &one_over_n, &s, bit_depth, + i * buf_stride + j, A, B); } // If the width is not a multiple of 4, we need to reset j to width - 4 // and adjust a1, a2, b1, b2 so that the loop invariant above is maintained @@ -428,7 +430,7 @@ s = _mm_set_epi32( sgrproj_mtable[eps - 1][3 * h - 1], sgrproj_mtable[eps - 1][4 * h - 1], sgrproj_mtable[eps - 1][5 * h - 1], sgrproj_mtable[eps - 1][5 * h - 1]); - calc_block(sum_, sum_sq_, n, one_over_n, s, bit_depth, i * buf_stride + j, + calc_block(sum_, sum_sq_, n, &one_over_n, &s, bit_depth, i * buf_stride + j, A, B); } } @@ -562,7 +564,7 @@ __m128i s = _mm_set_epi32( sgrproj_mtable[eps - 1][7 * h - 1], sgrproj_mtable[eps - 1][6 * h - 1], sgrproj_mtable[eps - 1][5 * h - 1], sgrproj_mtable[eps - 1][4 * h - 1]); - calc_block(sum_, sum_sq_, n, one_over_n, s, bit_depth, i * buf_stride, A, + calc_block(sum_, sum_sq_, n, &one_over_n, &s, bit_depth, i * buf_stride, A, B); // Re-align a1 and b1 so that they start at index i * buf_stride + 1 @@ -599,8 +601,8 @@ _mm_add_epi32(_mm_add_epi32(a2, _mm_alignr_epi8(a3, a2, 4)), _mm_alignr_epi8(a3, a2, 8))); - calc_block(sum_, sum_sq_, n, one_over_n, s, bit_depth, i * buf_stride + j, - A, B); + calc_block(sum_, sum_sq_, n, &one_over_n, &s, bit_depth, + i * buf_stride + j, A, B); } __m128i a3 = _mm_loadu_si128((__m128i *)&A[i * buf_stride + j + 1]); __m128i b3 = _mm_loadu_si128((__m128i *)&B[i * buf_stride + j + 1]); @@ -657,7 +659,7 @@ s = _mm_set_epi32( sgrproj_mtable[eps - 1][4 * h - 1], sgrproj_mtable[eps - 1][5 * h - 1], sgrproj_mtable[eps - 1][6 * h - 1], sgrproj_mtable[eps - 1][7 * h - 1]); - calc_block(sum_, sum_sq_, n, one_over_n, s, bit_depth, i * buf_stride + j, + calc_block(sum_, sum_sq_, n, &one_over_n, &s, bit_depth, i * buf_stride + j, A, B); } }