Commit 1db5a9ce authored by Jonathan Matthews's avatar Jonathan Matthews

Make AVERAGE_TILE_CDFS macro safe

BUG=aomedia:1078

Change-Id: I23b11b17f11c0319862211a54cd26fe1a99b67c2
parent feca25a5
......@@ -1599,12 +1599,14 @@ static void av1_average_cdf(aom_cdf_prob *cdf_ptr[], aom_cdf_prob *fc_cdf_ptr,
}
}
#define AVERAGE_TILE_CDFS(cname) \
for (i = 0; i < num_tiles; ++i) \
cdf_ptr[i] = (aom_cdf_prob *)&ec_ctxs[i]->cname; \
fc_cdf_ptr = (aom_cdf_prob *)&fc->cname; \
cdf_size = (int)sizeof(fc->cname) / sizeof(aom_cdf_prob); \
av1_average_cdf(cdf_ptr, fc_cdf_ptr, cdf_size, num_tiles);
#define AVERAGE_TILE_CDFS(cname) \
do { \
for (i = 0; i < num_tiles; ++i) \
cdf_ptr[i] = (aom_cdf_prob *)&ec_ctxs[i]->cname; \
fc_cdf_ptr = (aom_cdf_prob *)&fc->cname; \
cdf_size = (int)sizeof(fc->cname) / sizeof(aom_cdf_prob); \
av1_average_cdf(cdf_ptr, fc_cdf_ptr, cdf_size, num_tiles); \
} while (0);
void av1_average_tile_coef_cdfs(FRAME_CONTEXT *fc, FRAME_CONTEXT *ec_ctxs[],
aom_cdf_prob *cdf_ptr[], int num_tiles) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment