Do not use nonstandard extension for struct initialization.

This commit is contained in:
Ari Lemmetti 2021-03-05 18:50:00 +02:00
parent e38219e489
commit d8e7aac380
3 changed files with 42 additions and 24 deletions

View file

@ -497,12 +497,15 @@ unsigned kvz_image_calc_satd(const kvz_picture *pic,
.pad_r = 0,
.pad_t = 0,
.pad_b = 0,
.buf = ext_buffer,
.ext = &ext,
.ext_origin = &ext_origin,
.ext_s = &ext_s
};
// Initialize separately. Gets rid of warning
// about using nonstandard extension.
epol_args.buf = ext_buffer;
epol_args.ext = &ext;
epol_args.ext_origin = &ext_origin;
epol_args.ext_s = &ext_s;
kvz_get_extended_block(&epol_args);
const kvz_pixel *pic_data = &pic->y[pic_y * pic->stride + pic_x];

View file

@ -72,12 +72,15 @@ static void inter_recon_frac_luma(const encoder_state_t *const state,
.pad_r = KVZ_EXT_PADDING_LUMA - KVZ_LUMA_FILTER_OFFSET,
.pad_t = KVZ_LUMA_FILTER_OFFSET,
.pad_b = KVZ_EXT_PADDING_LUMA - KVZ_LUMA_FILTER_OFFSET + 1, // One row for AVX2
.buf = ext_buffer,
.ext = &ext,
.ext_origin = &ext_origin,
.ext_s = &ext_s
};
// Initialize separately. Gets rid of warning
// about using nonstandard extension.
epol_args.buf = ext_buffer;
epol_args.ext = &ext;
epol_args.ext_origin = &ext_origin;
epol_args.ext_s = &ext_s;
kvz_get_extended_block(&epol_args);
kvz_sample_quarterpel_luma(state->encoder_control,
ext_origin,
@ -123,12 +126,15 @@ static void inter_recon_14bit_frac_luma(const encoder_state_t *const state,
.pad_r = KVZ_EXT_PADDING_LUMA - KVZ_LUMA_FILTER_OFFSET,
.pad_t = KVZ_LUMA_FILTER_OFFSET,
.pad_b = KVZ_EXT_PADDING_LUMA - KVZ_LUMA_FILTER_OFFSET + 1, // One row for AVX2
.buf = ext_buffer,
.ext = &ext,
.ext_origin = &ext_origin,
.ext_s = &ext_s
};
// Initialize separately. Gets rid of warning
// about using nonstandard extension.
epol_args.buf = ext_buffer;
epol_args.ext = &ext;
epol_args.ext_origin = &ext_origin;
epol_args.ext_s = &ext_s;
kvz_get_extended_block(&epol_args);
kvz_sample_14bit_quarterpel_luma(state->encoder_control,
ext_origin,
@ -177,12 +183,15 @@ static void inter_recon_frac_chroma(const encoder_state_t *const state,
.pad_r = KVZ_EXT_PADDING_CHROMA - KVZ_CHROMA_FILTER_OFFSET,
.pad_t = KVZ_CHROMA_FILTER_OFFSET,
.pad_b = KVZ_EXT_PADDING_CHROMA - KVZ_CHROMA_FILTER_OFFSET + 3, // Three rows for AVX2
.buf = ext_buffer,
.ext = &ext,
.ext_origin = &ext_origin,
.ext_s = &ext_s
};
// Initialize separately. Gets rid of warning
// about using nonstandard extension.
epol_args.buf = ext_buffer;
epol_args.ext = &ext;
epol_args.ext_origin = &ext_origin;
epol_args.ext_s = &ext_s;
kvz_get_extended_block(&epol_args);
kvz_sample_octpel_chroma(state->encoder_control,
ext_origin,
@ -245,12 +254,15 @@ static void inter_recon_14bit_frac_chroma(const encoder_state_t *const state,
.pad_r = KVZ_EXT_PADDING_CHROMA - KVZ_CHROMA_FILTER_OFFSET,
.pad_t = KVZ_CHROMA_FILTER_OFFSET,
.pad_b = KVZ_EXT_PADDING_CHROMA - KVZ_CHROMA_FILTER_OFFSET + 3, // Three rows for AVX2
.buf = ext_buffer,
.ext = &ext,
.ext_origin = &ext_origin,
.ext_s = &ext_s
};
// Initialize separately. Gets rid of warning
// about using nonstandard extension.
epol_args.buf = ext_buffer;
epol_args.ext = &ext;
epol_args.ext_origin = &ext_origin;
epol_args.ext_s = &ext_s;
kvz_get_extended_block(&epol_args);
kvz_sample_14bit_octpel_chroma(state->encoder_control,
ext_origin,

View file

@ -1032,12 +1032,15 @@ static void search_frac(inter_search_info_t *info)
.pad_r = KVZ_EXT_PADDING_LUMA - KVZ_LUMA_FILTER_OFFSET,
.pad_t = KVZ_LUMA_FILTER_OFFSET,
.pad_b = KVZ_EXT_PADDING_LUMA - KVZ_LUMA_FILTER_OFFSET + 1, // One row for AVX2
.buf = ext_buffer,
.ext = &ext,
.ext_origin = &ext_origin,
.ext_s = &ext_s
};
// Initialize separately. Gets rid of warning
// about using nonstandard extension.
epol_args.buf = ext_buffer;
epol_args.ext = &ext;
epol_args.ext_origin = &ext_origin;
epol_args.ext_s = &ext_s;
kvz_get_extended_block(&epol_args);
kvz_pixel *tmp_pic = pic->y + orig.y * pic->stride + orig.x;