33 switch (
s->intra_dc_threshold) {
51 VAPictureParameterBufferMPEG4 pic_param;
56 pic_param = (VAPictureParameterBufferMPEG4) {
57 .vop_width =
s->width,
58 .vop_height =
s->height,
59 .forward_reference_picture = VA_INVALID_ID,
60 .backward_reference_picture = VA_INVALID_ID,
64 .interlaced = !
s->progressive_sequence,
66 .sprite_enable =
ctx->vol_sprite_usage,
67 .sprite_warping_accuracy =
s->sprite_warping_accuracy,
68 .quant_type =
s->mpeg_quant,
69 .quarter_sample =
s->quarter_sample,
70 .data_partitioned =
s->data_partitioning,
71 .reversible_vlc =
ctx->rvlc,
72 .resync_marker_disable = !
ctx->resync_marker,
74 .no_of_sprite_warping_points =
ctx->num_sprite_warping_points,
75 .quant_precision =
s->quant_precision,
78 .backward_reference_vop_coding_type =
80 .vop_rounding_type =
s->no_rounding,
82 .top_field_first =
s->top_field_first,
83 .alternate_vertical_scan_flag =
s->alternate_scan,
85 .vop_fcode_forward =
s->f_code,
86 .vop_fcode_backward =
s->b_code,
95 for (
i = 0;
i <
ctx->num_sprite_warping_points &&
i < 3;
i++) {
96 pic_param.sprite_trajectory_du[
i] =
ctx->sprite_traj[
i][0];
97 pic_param.sprite_trajectory_dv[
i] =
ctx->sprite_traj[
i][1];
106 VAPictureParameterBufferType,
107 &pic_param,
sizeof(pic_param));
112 if (pic_param.vol_fields.bits.quant_type) {
113 VAIQMatrixBufferMPEG4 iq_matrix;
115 iq_matrix.load_intra_quant_mat = 1;
116 iq_matrix.load_non_intra_quant_mat = 1;
118 for (
i = 0;
i < 64;
i++) {
120 iq_matrix.intra_quant_mat[
i] =
s->intra_matrix[
n];
121 iq_matrix.non_intra_quant_mat[
i] =
s->inter_matrix[
n];
125 VAIQMatrixBufferType,
126 &iq_matrix,
sizeof(iq_matrix));
157 VASliceParameterBufferMPEG4 slice_param;
160 slice_param = (VASliceParameterBufferMPEG4) {
161 .slice_data_size =
size,
162 .slice_data_offset = 0,
163 .slice_data_flag = VA_SLICE_DATA_FLAG_ALL,
165 .macroblock_number = 0,
166 .quant_scale =
s->qscale,
170 &slice_param,
sizeof(slice_param),
180 #if CONFIG_MPEG4_VAAPI_HWACCEL
182 .
name =
"mpeg4_vaapi",
198 #if CONFIG_H263_VAAPI_HWACCEL
200 .
name =
"h263_vaapi",