From: Leo Liu Date: Tue, 13 Mar 2018 13:39:20 +0000 (-0400) Subject: vl: add VP9 picture description X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ca1646db89142f717997ee202440706ec9374d70;p=mesa.git vl: add VP9 picture description Signed-off-by: Leo Liu Acked-by: Christian König --- diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h index 2533ba4fabc..05855a36e23 100644 --- a/src/gallium/include/pipe/p_video_state.h +++ b/src/gallium/include/pipe/p_video_state.h @@ -677,6 +677,100 @@ struct pipe_mjpeg_picture_desc } slice_parameter; }; +struct vp9_segment_parameter +{ + struct { + uint16_t segment_reference_enabled:1; + uint16_t segment_reference:2; + uint16_t segment_reference_skipped:1; + } segment_flags; + + bool alt_quant_enabled; + int16_t alt_quant; + + bool alt_lf_enabled; + int16_t alt_lf; + + uint8_t filter_level[4][2]; + + int16_t luma_ac_quant_scale; + int16_t luma_dc_quant_scale; + + int16_t chroma_ac_quant_scale; + int16_t chroma_dc_quant_scale; +}; + +struct pipe_vp9_picture_desc +{ + struct pipe_picture_desc base; + + struct pipe_video_buffer *ref[16]; + + struct { + uint16_t frame_width; + uint16_t frame_height; + + struct { + uint32_t subsampling_x:1; + uint32_t subsampling_y:1; + uint32_t frame_type:1; + uint32_t show_frame:1; + uint32_t error_resilient_mode:1; + uint32_t intra_only:1; + uint32_t allow_high_precision_mv:1; + uint32_t mcomp_filter_type:3; + uint32_t frame_parallel_decoding_mode:1; + uint32_t reset_frame_context:2; + uint32_t refresh_frame_context:1; + uint32_t frame_context_idx:2; + uint32_t segmentation_enabled:1; + uint32_t segmentation_temporal_update:1; + uint32_t segmentation_update_map:1; + uint32_t last_ref_frame:3; + uint32_t last_ref_frame_sign_bias:1; + uint32_t golden_ref_frame:3; + uint32_t golden_ref_frame_sign_bias:1; + uint32_t alt_ref_frame:3; + uint32_t alt_ref_frame_sign_bias:1; + uint32_t lossless_flag:1; + } pic_fields; + + uint8_t filter_level; + uint8_t sharpness_level; + + uint8_t log2_tile_rows; + uint8_t log2_tile_columns; + + uint8_t frame_header_length_in_bytes; + + uint16_t first_partition_size; + + uint8_t mb_segment_tree_probs[7]; + uint8_t segment_pred_probs[3]; + + uint8_t profile; + + uint8_t bit_depth; + + bool mode_ref_delta_enabled; + bool mode_ref_delta_update; + + uint8_t base_qindex; + int8_t y_dc_delta_q; + int8_t uv_ac_delta_q; + int8_t uv_dc_delta_q; + } picture_parameter; + + struct { + uint32_t slice_data_size; + uint32_t slice_data_offset; + + uint32_t slice_data_flag; + + struct vp9_segment_parameter seg_param[8]; + } slice_parameter; +}; + #ifdef __cplusplus } #endif