GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
GstAV1FrameHeaderOBU *frame_header = &picture->frame_hdr;
GstAV1SequenceHeaderOBU *seq_header = &self->seq;
- VADecPictureParameterBufferAV1 pic_param = { };
+ VADecPictureParameterBufferAV1 pic_param = { 0, };
GstVaDecodePicture *va_pic;
guint i;
GstAV1TileGroupOBU *tile_group = &tile->tile_group;
GstVaDecodePicture *va_pic;
guint i;
- VASliceParameterBufferAV1 slice_param[GST_AV1_MAX_TILE_COUNT];
+ VASliceParameterBufferAV1 slice_param[GST_AV1_MAX_TILE_COUNT] = { 0, };
GST_TRACE_OBJECT (self, "-");
for (i = 0; i < tile_group->tg_end - tile_group->tg_start + 1; i++) {
- slice_param[i] = (VASliceParameterBufferAV1) {
- };
slice_param[i].slice_data_size =
tile_group->entry[tile_group->tg_start + i].tile_size;
slice_param[i].slice_data_offset =
_insert_ref_pic_list_modification (GstH264SliceHdr * slice_hdr,
GstVaH264EncFrame * list[16], guint list_num, gboolean is_asc)
{
- GstVaH264EncFrame *list_by_pic_num[16] = { };
+ GstVaH264EncFrame *list_by_pic_num[16] = { NULL, };
guint modification_num, i;
GstH264RefPicListModification *ref_pic_list_modification = NULL;
gint pic_num_diff, pic_num_lx_pred;
_add_aud (GstVaH264Enc * self, GstVaH264EncFrame * frame)
{
GstVaBaseEnc *base = GST_VA_BASE_ENC (self);
- guint8 aud_data[8] = { };
+ guint8 aud_data[8] = { 0, };
guint size;
guint8 primary_pic_type = 0;
.profile_space = 0,
.tier_flag = sequence->general_tier_flag,
.profile_idc = sequence->general_profile_idc,
- .profile_compatibility_flag = { },
+ .profile_compatibility_flag = { 0, },
.progressive_source_flag = 1,
.interlaced_source_flag = 0,
.non_packed_constraint_flag = 0,
.delta_palette_max_predictor_size = 32,
.sps_palette_predictor_initializers_present_flag = 0,
.sps_num_palette_predictor_initializer_minus1 = 0,
- .sps_palette_predictor_initializer = { },
+ .sps_palette_predictor_initializer = {{ 0, }},
.motion_vector_resolution_control_idc = 0,
.intra_boundary_filtering_disabled_flag = 0,
},
.collocated_ref_idx = (slice_param->slice_type == GST_H265_I_SLICE ?
0xFF : self->features.collocated_ref_idx),
/* not used now. */
- .pred_weight_table = { },
+ .pred_weight_table = { 0, },
.five_minus_max_num_merge_cand = 5 - slice_param->max_num_merge_cand,
.use_integer_mv_flag = 0,
.qp_delta = slice_param->slice_qp_delta,
_h265_add_aud (GstVaH265Enc * self, GstVaH265EncFrame * frame)
{
GstVaBaseEnc *base = GST_VA_BASE_ENC (self);
- guint8 aud_data[8] = { };
+ guint8 aud_data[8] = { 0, };
guint size;
guint8 pic_type = 0;
.delta_chroma_log2_weight_denom = 0,
.delta_luma_weight_l0 = { 0, },
.luma_offset_l0 = { 0, },
- .delta_chroma_weight_l0 = { },
- .chroma_offset_l0 = { },
- .delta_luma_weight_l1 = { },
- .luma_offset_l1 = { },
- .delta_chroma_weight_l1 = { },
- .chroma_offset_l1 = { },
+ .delta_chroma_weight_l0 = {{ 0, }},
+ .chroma_offset_l0 = {{ 0, }},
+ .delta_luma_weight_l1 = { 0, },
+ .luma_offset_l1 = { 0, },
+ .delta_chroma_weight_l1 = {{ 0, }},
+ .chroma_offset_l1 = {{ 0, }},
.max_num_merge_cand = 5,
.slice_qp_delta = slice_qp_delta,
guint list_forward_num = 0;
GstVaH265EncFrame *list_backward[16] = { NULL, };
guint list_backward_num = 0;
- gint negative_pocs[16] = { };
+ gint negative_pocs[16] = { 0, };
guint num_negative_pics = 0;
- gint positive_pocs[16] = { };
+ gint positive_pocs[16] = { 0, };
guint num_positive_pics = 0;
gint collocated_poc = -1;
gint i;
GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
GstVp8FrameHdr const *frame_hdr = &picture->frame_hdr;
GstVp8Segmentation *const seg = &parser->segmentation;
- VAIQMatrixBufferVP8 iq_matrix = { };
+ VAIQMatrixBufferVP8 iq_matrix = { 0, };
const gint8 QI_MAX = 127;
gint16 qi, qi_base;
gint i;
{
GstVaBaseDec *base = GST_VA_BASE_DEC (decoder);
GstVp8FrameHdr const *frame_hdr = &picture->frame_hdr;
- VAProbabilityDataBufferVP8 prob_table = { };
+ VAProbabilityDataBufferVP8 prob_table = { 0, };
/* Fill in VAProbabilityDataBufferVP8 */
memcpy (prob_table.dct_coeff_probs, frame_hdr->token_probs.prob,
#define GST_VA_VPP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G_TYPE_FROM_INSTANCE (obj), GstVaVppClass))
#define GST_VA_VPP_CLASS(klass) ((GstVaVppClass *) klass)
-#define SWAP(a, b) do { const __typeof__ (a) t = a; a = b; b = t; } while (0)
+#define SWAP_INT(a, b) G_STMT_START { \
+ gint __tmp = a; \
+ a = b; \
+ b = __tmp; \
+} G_STMT_END
typedef struct _GstVaVpp GstVaVpp;
typedef struct _GstVaVppClass GstVaVppClass;
case GST_VIDEO_ORIENTATION_90L:
case GST_VIDEO_ORIENTATION_UL_LR:
case GST_VIDEO_ORIENTATION_UR_LL:
- SWAP (from_dar_n, from_dar_d);
+ SWAP_INT (from_dar_n, from_dar_d);
break;
default:
break;
case GST_VIDEO_ORIENTATION_90L:
case GST_VIDEO_ORIENTATION_UL_LR:
case GST_VIDEO_ORIENTATION_UR_LL:
- SWAP (from_w, from_h);
- SWAP (from_par_n, from_par_d);
+ SWAP_INT (from_w, from_h);
+ SWAP_INT (from_par_n, from_par_d);
break;
default:
break;