Lines Matching defs:h264

45 static void resetReferencePictureDesc(struct pipe_h264_picture_desc *h264,
48 struct h264_private *private = h264->priv;
50 h264->ref[i] = NULL;
51 h264->frame_num_list[i] = 0;
52 h264->is_long_term[i] = 0;
53 h264->top_is_reference[i] = 0;
54 h264->bottom_is_reference[i] = 0;
55 h264->field_order_cnt_list[i][0] = 0;
56 h264->field_order_cnt_list[i][1] = 0;
63 VAPictureParameterBufferH264 *h264 = buf->data;
64 struct h264_private *private = &context->h264;
70 context->desc.h264.slice_count = 0;
71 context->desc.h264.priv = private;
73 context->desc.h264.field_order_cnt[0] = h264->CurrPic.TopFieldOrderCnt;
74 context->desc.h264.field_order_cnt[1] = h264->CurrPic.BottomFieldOrderCnt;
78 context->desc.h264.pps->sps->bit_depth_luma_minus8 = h264->bit_depth_luma_minus8;
79 context->desc.h264.pps->sps->bit_depth_chroma_minus8 = h264->bit_depth_chroma_minus8;
80 context->desc.h264.num_ref_frames = h264->num_ref_frames;
81 context->desc.h264.pps->sps->chroma_format_idc = h264->seq_fields.bits.chroma_format_idc;
84 context->desc.h264.pps->sps->frame_mbs_only_flag =
85 h264->seq_fields.bits.frame_mbs_only_flag;
86 context->desc.h264.pps->sps->mb_adaptive_frame_field_flag =
87 h264->seq_fields.bits.mb_adaptive_frame_field_flag;
88 context->desc.h264.pps->sps->direct_8x8_inference_flag =
89 h264->seq_fields.bits.direct_8x8_inference_flag;
90 context->desc.h264.pps->sps->MinLumaBiPredSize8x8 =
91 h264->seq_fields.bits.MinLumaBiPredSize8x8;
92 context->desc.h264.pps->sps->log2_max_frame_num_minus4 =
93 h264->seq_fields.bits.log2_max_frame_num_minus4;
94 context->desc.h264.pps->sps->pic_order_cnt_type =
95 h264->seq_fields.bits.pic_order_cnt_type;
96 context->desc.h264.pps->sps->log2_max_pic_order_cnt_lsb_minus4 =
97 h264->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4;
98 context->desc.h264.pps->sps->delta_pic_order_always_zero_flag =
99 h264->seq_fields.bits.delta_pic_order_always_zero_flag;
103 context->desc.h264.pps->pic_init_qp_minus26 =
104 h264->pic_init_qp_minus26;
105 context->desc.h264.pps->pic_init_qs_minus26 =
106 h264->pic_init_qs_minus26;
107 context->desc.h264.pps->chroma_qp_index_offset =
108 h264->chroma_qp_index_offset;
109 context->desc.h264.pps->second_chroma_qp_index_offset =
110 h264->second_chroma_qp_index_offset;
111 context->desc.h264.pps->entropy_coding_mode_flag =
112 h264->pic_fields.bits.entropy_coding_mode_flag;
113 context->desc.h264.pps->weighted_pred_flag =
114 h264->pic_fields.bits.weighted_pred_flag;
115 context->desc.h264.pps->weighted_bipred_idc =
116 h264->pic_fields.bits.weighted_bipred_idc;
117 context->desc.h264.pps->transform_8x8_mode_flag =
118 h264->pic_fields.bits.transform_8x8_mode_flag;
119 context->desc.h264.field_pic_flag =
120 h264->pic_fields.bits.field_pic_flag;
121 context->desc.h264.pps->constrained_intra_pred_flag =
122 h264->pic_fields.bits.constrained_intra_pred_flag;
123 context->desc.h264.pps->bottom_field_pic_order_in_frame_present_flag =
124 h264->pic_fields.bits.pic_order_present_flag;
125 context->desc.h264.pps->deblocking_filter_control_present_flag =
126 h264->pic_fields.bits.deblocking_filter_control_present_flag;
127 context->desc.h264.pps->redundant_pic_cnt_present_flag =
128 h264->pic_fields.bits.redundant_pic_cnt_present_flag;
130 context->desc.h264.frame_num = h264->frame_num;
131 context->desc.h264.is_reference = h264->pic_fields.bits.reference_pic_flag;
132 context->desc.h264.bottom_field_flag =
133 h264->pic_fields.bits.field_pic_flag &&
134 (h264->CurrPic.flags & VA_PICTURE_H264_BOTTOM_FIELD) != 0;
136 if (context->decoder && (context->templat.max_references != context->desc.h264.num_ref_frames)) {
137 context->templat.max_references = MIN2(context->desc.h264.num_ref_frames, 16);
140 } else if (!context->decoder && context->desc.h264.num_ref_frames > 0)
141 context->templat.max_references = MIN2(context->desc.h264.num_ref_frames, 16);
144 if ((h264->ReferenceFrames[i].flags & VA_PICTURE_H264_INVALID) ||
145 (h264->ReferenceFrames[i].picture_id == VA_INVALID_SURFACE)) {
146 resetReferencePictureDesc(&context->desc.h264, i);
150 vlVaGetReferenceFrame(drv, h264->ReferenceFrames[i].picture_id, &context->desc.h264.ref[i]);
151 vlVaGetPastReferenceFrame(drv, h264->ReferenceFrames[i].picture_id, &private->past_ref[i]);
152 context->desc.h264.frame_num_list[i] = h264->ReferenceFrames[i].frame_idx;
154 top_or_bottom_field = h264->ReferenceFrames[i].flags &
156 is_ref = !!(h264->ReferenceFrames[i].flags &
158 context->desc.h264.is_long_term[i] = !!(h264->ReferenceFrames[i].flags &
160 context->desc.h264.top_is_reference[i] =
161 !!(h264->ReferenceFrames[i].flags & VA_PICTURE_H264_TOP_FIELD) ||
163 context->desc.h264.bottom_is_reference[i] =
164 !!(h264->ReferenceFrames[i].flags & VA_PICTURE_H264_BOTTOM_FIELD) ||
166 context->desc.h264.field_order_cnt_list[i][0] =
168 h264->ReferenceFrames[i].TopFieldOrderCnt: INT_MAX;
169 context->desc.h264.field_order_cnt_list[i][1] =
171 h264->ReferenceFrames[i].BottomFieldOrderCnt: INT_MAX;
176 resetReferencePictureDesc(&context->desc.h264, i);
181 VAIQMatrixBufferH264 *h264 = buf->data;
184 memcpy(&context->desc.h264.pps->ScalingList4x4, h264->ScalingList4x4, 6 * 16);
185 memcpy(&context->desc.h264.pps->ScalingList8x8, h264->ScalingList8x8, 2 * 64);
190 VASliceParameterBufferH264 *h264 = buf->data;
193 context->desc.h264.slice_count += buf->num_elements;
194 context->desc.h264.num_ref_idx_l0_active_minus1 =
195 h264->num_ref_idx_l0_active_minus1;
196 context->desc.h264.num_ref_idx_l1_active_minus1 =
197 h264->num_ref_idx_l1_active_minus1;