assert(decode_state->pic_param && decode_state->pic_param->buffer);
pic_param = (VAPictureParameterBufferVC1 *)decode_state->pic_param->buffer;
+ gen7_vc1_current_surface = (struct gen7_vc1_surface *)(decode_state->render_object->private_data);
if (!pic_param->sequence_fields.bits.interlace ||
(pic_param->picture_fields.bits.frame_coding_mode < 2)) { /* Progressive or Frame-Interlace */
pic_param->sequence_fields.bits.rangered) {
obj_surface = decode_state->reference_objects[0];
- gen7_vc1_current_surface = (struct gen7_vc1_surface *)(decode_state->render_object->private_data);
-
if (pic_param->forward_reference_picture != VA_INVALID_ID &&
obj_surface)
gen7_vc1_reference_surface = (struct gen7_vc1_surface *)(obj_surface->private_data);
assert(pic_param->picture_fields.bits.frame_coding_mode < 3);
+ gen7_vc1_current_surface->frame_coding_mode = pic_param->picture_fields.bits.frame_coding_mode;
if (pic_param->sequence_fields.bits.interlace) {
if (pic_param->picture_fields.bits.frame_coding_mode < 2)
fcm = pic_param->picture_fields.bits.frame_coding_mode;
pic_param->picture_fields.bits.frame_coding_mode == 2) { /* Field-Interlace */
if (picture_type == GEN7_VC1_I_PICTURE ||
picture_type == GEN7_VC1_P_PICTURE) {
- gen7_vc1_current_surface = (struct gen7_vc1_surface *)(decode_state->render_object->private_data);
if (is_first_field)
gen7_vc1_current_surface->reference_distance = pic_param->reference_fields.bits.reference_distance;
lumscale1_double_fwd = gen7_vc1_top_surface->luma_scale_top[1];
lumshift1_double_fwd = gen7_vc1_top_surface->luma_shift_top[1];
}
+ replication_mode |= !!gen7_vc1_top_surface->frame_coding_mode;
}
if (pic_param->sequence_fields.bits.interlace &&
lumscale2_double_fwd = gen7_vc1_bottom_surface->luma_scale_bottom[1];
lumshift2_double_fwd = gen7_vc1_bottom_surface->luma_shift_bottom[1];
}
+ replication_mode |= !!gen7_vc1_bottom_surface->frame_coding_mode << 2;
}
}
}
intensitycomp_single_bwd = !!gen7_vc1_top_surface->intensity_compensation_top;
lumscale1_single_bwd = gen7_vc1_top_surface->luma_scale_top[0];
lumshift1_single_bwd = gen7_vc1_top_surface->luma_shift_top[0];
+ replication_mode |= !!gen7_vc1_top_surface->frame_coding_mode << 1;
}
if (pic_param->sequence_fields.bits.interlace &&
intensitycomp_single_bwd |= !!gen7_vc1_bottom_surface->intensity_compensation_bottom << 1;
lumscale2_single_bwd = gen7_vc1_bottom_surface->luma_scale_bottom[0];
lumshift2_single_bwd = gen7_vc1_bottom_surface->luma_shift_bottom[0];
+ replication_mode |= !!gen7_vc1_bottom_surface->frame_coding_mode << 3;
}
}
}
- if (pic_param->sequence_fields.bits.interlace &&
- pic_param->picture_fields.bits.frame_coding_mode > 0) { /* Frame-Interlace or Field-Interlace */
- if (picture_type == GEN7_VC1_P_PICTURE)
- replication_mode = 0x5;
- else if (picture_type == GEN7_VC1_B_PICTURE)
- replication_mode = 0xf;
- }
-
BEGIN_BCS_BATCH(batch, 6);
OUT_BCS_BATCH(batch, MFX_VC1_PRED_PIPE_STATE | (6 - 2));
OUT_BCS_BATCH(batch,
assert(decode_state->pic_param && decode_state->pic_param->buffer);
pic_param = (VAPictureParameterBufferVC1 *)decode_state->pic_param->buffer;
+ gen7_vc1_current_surface = (struct gen7_vc1_surface *)(decode_state->render_object->private_data);
if (!pic_param->sequence_fields.bits.interlace ||
(pic_param->picture_fields.bits.frame_coding_mode < 2)) { /* Progressive or Frame-Interlace */
pic_param->sequence_fields.bits.rangered) {
obj_surface = decode_state->reference_objects[0];
- gen7_vc1_current_surface = (struct gen7_vc1_surface *)(decode_state->render_object->private_data);
-
if (pic_param->forward_reference_picture != VA_INVALID_ID &&
obj_surface)
gen7_vc1_reference_surface = (struct gen7_vc1_surface *)(obj_surface->private_data);
assert(pic_param->picture_fields.bits.frame_coding_mode < 3);
+ gen7_vc1_current_surface->frame_coding_mode = pic_param->picture_fields.bits.frame_coding_mode;
if (pic_param->sequence_fields.bits.interlace) {
if (pic_param->picture_fields.bits.frame_coding_mode < 2)
fcm = pic_param->picture_fields.bits.frame_coding_mode;
pic_param->picture_fields.bits.frame_coding_mode == 2) { /* Field-Interlace */
if (picture_type == GEN7_VC1_I_PICTURE ||
picture_type == GEN7_VC1_P_PICTURE) {
- gen7_vc1_current_surface = (struct gen7_vc1_surface *)(decode_state->render_object->private_data);
if (is_first_field)
gen7_vc1_current_surface->reference_distance = pic_param->reference_fields.bits.reference_distance;
lumscale1_double_fwd = gen7_vc1_top_surface->luma_scale_top[1];
lumshift1_double_fwd = gen7_vc1_top_surface->luma_shift_top[1];
}
+ replication_mode |= !!gen7_vc1_top_surface->frame_coding_mode;
}
if (pic_param->sequence_fields.bits.interlace &&
lumscale2_double_fwd = gen7_vc1_bottom_surface->luma_scale_bottom[1];
lumshift2_double_fwd = gen7_vc1_bottom_surface->luma_shift_bottom[1];
}
+ replication_mode |= !!gen7_vc1_bottom_surface->frame_coding_mode << 2;
}
}
}
intensitycomp_single_bwd = !!gen7_vc1_top_surface->intensity_compensation_top;
lumscale1_single_bwd = gen7_vc1_top_surface->luma_scale_top[0];
lumshift1_single_bwd = gen7_vc1_top_surface->luma_shift_top[0];
+ replication_mode |= !!gen7_vc1_top_surface->frame_coding_mode << 1;
}
if (pic_param->sequence_fields.bits.interlace &&
intensitycomp_single_bwd |= !!gen7_vc1_bottom_surface->intensity_compensation_bottom << 1;
lumscale2_single_bwd = gen7_vc1_bottom_surface->luma_scale_bottom[0];
lumshift2_single_bwd = gen7_vc1_bottom_surface->luma_shift_bottom[0];
+ replication_mode |= !!gen7_vc1_bottom_surface->frame_coding_mode << 3;
}
}
}
- if (pic_param->sequence_fields.bits.interlace &&
- pic_param->picture_fields.bits.frame_coding_mode > 0) { /* Frame-Interlace or Field-Interlace */
- if (picture_type == GEN7_VC1_P_PICTURE)
- replication_mode = 0x5;
- else if (picture_type == GEN7_VC1_B_PICTURE)
- replication_mode = 0xf;
- }
-
BEGIN_BCS_BATCH(batch, 6);
OUT_BCS_BATCH(batch, MFX_VC1_PRED_PIPE_STATE | (6 - 2));
OUT_BCS_BATCH(batch,
struct gen7_vc1_surface {
dri_bo *dmv_top;
dri_bo *dmv_bottom;
+ int frame_coding_mode;
int picture_type_top;
int picture_type_bottom;
int range_reduction_frame;
assert(decode_state->pic_param && decode_state->pic_param->buffer);
pic_param = (VAPictureParameterBufferVC1 *)decode_state->pic_param->buffer;
+ gen7_vc1_current_surface = (struct gen7_vc1_surface *)(decode_state->render_object->private_data);
if (!pic_param->sequence_fields.bits.interlace ||
(pic_param->picture_fields.bits.frame_coding_mode < 2)) { /* Progressive or Frame-Interlace */
pic_param->sequence_fields.bits.rangered) {
obj_surface = decode_state->reference_objects[0];
- gen7_vc1_current_surface = (struct gen7_vc1_surface *)(decode_state->render_object->private_data);
-
if (pic_param->forward_reference_picture != VA_INVALID_ID &&
obj_surface)
gen7_vc1_reference_surface = (struct gen7_vc1_surface *)(obj_surface->private_data);
assert(pic_param->picture_fields.bits.frame_coding_mode < 3);
+ gen7_vc1_current_surface->frame_coding_mode = pic_param->picture_fields.bits.frame_coding_mode;
if (pic_param->sequence_fields.bits.interlace) {
if (pic_param->picture_fields.bits.frame_coding_mode < 2)
fcm = pic_param->picture_fields.bits.frame_coding_mode;
pic_param->picture_fields.bits.frame_coding_mode == 2) { /* Field-Interlace */
if (picture_type == GEN7_VC1_I_PICTURE ||
picture_type == GEN7_VC1_P_PICTURE) {
- gen7_vc1_current_surface = (struct gen7_vc1_surface *)(decode_state->render_object->private_data);
if (is_first_field)
gen7_vc1_current_surface->reference_distance = pic_param->reference_fields.bits.reference_distance;
lumscale1_double_fwd = gen7_vc1_top_surface->luma_scale_top[1];
lumshift1_double_fwd = gen7_vc1_top_surface->luma_shift_top[1];
}
+ replication_mode |= !!gen7_vc1_top_surface->frame_coding_mode;
}
if (pic_param->sequence_fields.bits.interlace &&
lumscale2_double_fwd = gen7_vc1_bottom_surface->luma_scale_bottom[1];
lumshift2_double_fwd = gen7_vc1_bottom_surface->luma_shift_bottom[1];
}
+ replication_mode |= !!gen7_vc1_bottom_surface->frame_coding_mode << 2;
}
}
}
intensitycomp_single_bwd = !!gen7_vc1_top_surface->intensity_compensation_top;
lumscale1_single_bwd = gen7_vc1_top_surface->luma_scale_top[0];
lumshift1_single_bwd = gen7_vc1_top_surface->luma_shift_top[0];
+ replication_mode |= !!gen7_vc1_top_surface->frame_coding_mode << 1;
}
if (pic_param->sequence_fields.bits.interlace &&
intensitycomp_single_bwd |= !!gen7_vc1_bottom_surface->intensity_compensation_bottom << 1;
lumscale2_single_bwd = gen7_vc1_bottom_surface->luma_scale_bottom[0];
lumshift2_single_bwd = gen7_vc1_bottom_surface->luma_shift_bottom[0];
+ replication_mode |= !!gen7_vc1_bottom_surface->frame_coding_mode << 3;
}
}
}
- if (pic_param->sequence_fields.bits.interlace &&
- pic_param->picture_fields.bits.frame_coding_mode > 0) { /* Frame-Interlace or Field-Interlace */
- if (picture_type == GEN7_VC1_P_PICTURE)
- replication_mode = 0x5;
- else if (picture_type == GEN7_VC1_B_PICTURE)
- replication_mode = 0xf;
- }
-
BEGIN_BCS_BATCH(batch, 6);
OUT_BCS_BATCH(batch, MFX_VC1_PRED_PIPE_STATE | (6 - 2));
OUT_BCS_BATCH(batch,