Path: blob/21.2-virgl/src/gallium/include/pipe/p_video_state.h
4565 views
/**************************************************************************1*2* Copyright 2009 Younes Manton.3* All Rights Reserved.4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the7* "Software"), to deal in the Software without restriction, including8* without limitation the rights to use, copy, modify, merge, publish,9* distribute, sub license, and/or sell copies of the Software, and to10* permit persons to whom the Software is furnished to do so, subject to11* the following conditions:12*13* The above copyright notice and this permission notice (including the14* next paragraph) shall be included in all copies or substantial portions15* of the Software.16*17* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS18* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF19* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.20* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR21* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,22* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE23* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.24*25**************************************************************************/2627#ifndef PIPE_VIDEO_STATE_H28#define PIPE_VIDEO_STATE_H2930#include "pipe/p_defines.h"31#include "pipe/p_format.h"32#include "pipe/p_state.h"33#include "pipe/p_screen.h"34#include "util/u_hash_table.h"35#include "util/u_inlines.h"3637#ifdef __cplusplus38extern "C" {39#endif4041/*42* see table 6-12 in the spec43*/44enum pipe_mpeg12_picture_coding_type45{46PIPE_MPEG12_PICTURE_CODING_TYPE_I = 0x01,47PIPE_MPEG12_PICTURE_CODING_TYPE_P = 0x02,48PIPE_MPEG12_PICTURE_CODING_TYPE_B = 0x03,49PIPE_MPEG12_PICTURE_CODING_TYPE_D = 0x0450};5152/*53* see table 6-14 in the spec54*/55enum pipe_mpeg12_picture_structure56{57PIPE_MPEG12_PICTURE_STRUCTURE_RESERVED = 0x00,58PIPE_MPEG12_PICTURE_STRUCTURE_FIELD_TOP = 0x01,59PIPE_MPEG12_PICTURE_STRUCTURE_FIELD_BOTTOM = 0x02,60PIPE_MPEG12_PICTURE_STRUCTURE_FRAME = 0x0361};6263/*64* flags for macroblock_type, see section 6.3.17.1 in the spec65*/66enum pipe_mpeg12_macroblock_type67{68PIPE_MPEG12_MB_TYPE_QUANT = 0x01,69PIPE_MPEG12_MB_TYPE_MOTION_FORWARD = 0x02,70PIPE_MPEG12_MB_TYPE_MOTION_BACKWARD = 0x04,71PIPE_MPEG12_MB_TYPE_PATTERN = 0x08,72PIPE_MPEG12_MB_TYPE_INTRA = 0x1073};7475/*76* flags for motion_type, see table 6-17 and 6-18 in the spec77*/78enum pipe_mpeg12_motion_type79{80PIPE_MPEG12_MO_TYPE_RESERVED = 0x00,81PIPE_MPEG12_MO_TYPE_FIELD = 0x01,82PIPE_MPEG12_MO_TYPE_FRAME = 0x02,83PIPE_MPEG12_MO_TYPE_16x8 = 0x02,84PIPE_MPEG12_MO_TYPE_DUAL_PRIME = 0x0385};8687/*88* see section 6.3.17.1 and table 6-19 in the spec89*/90enum pipe_mpeg12_dct_type91{92PIPE_MPEG12_DCT_TYPE_FRAME = 0,93PIPE_MPEG12_DCT_TYPE_FIELD = 194};9596enum pipe_mpeg12_field_select97{98PIPE_MPEG12_FS_FIRST_FORWARD = 0x01,99PIPE_MPEG12_FS_FIRST_BACKWARD = 0x02,100PIPE_MPEG12_FS_SECOND_FORWARD = 0x04,101PIPE_MPEG12_FS_SECOND_BACKWARD = 0x08102};103104enum pipe_h264_slice_type105{106PIPE_H264_SLICE_TYPE_P = 0x0,107PIPE_H264_SLICE_TYPE_B = 0x1,108PIPE_H264_SLICE_TYPE_I = 0x2,109PIPE_H264_SLICE_TYPE_SP = 0x3,110PIPE_H264_SLICE_TYPE_SI = 0x4111};112113/* Same enum for h264/h265 */114enum pipe_h2645_enc_picture_type115{116PIPE_H2645_ENC_PICTURE_TYPE_P = 0x00,117PIPE_H2645_ENC_PICTURE_TYPE_B = 0x01,118PIPE_H2645_ENC_PICTURE_TYPE_I = 0x02,119PIPE_H2645_ENC_PICTURE_TYPE_IDR = 0x03,120PIPE_H2645_ENC_PICTURE_TYPE_SKIP = 0x04121};122123enum pipe_h2645_enc_rate_control_method124{125PIPE_H2645_ENC_RATE_CONTROL_METHOD_DISABLE = 0x00,126PIPE_H2645_ENC_RATE_CONTROL_METHOD_CONSTANT_SKIP = 0x01,127PIPE_H2645_ENC_RATE_CONTROL_METHOD_VARIABLE_SKIP = 0x02,128PIPE_H2645_ENC_RATE_CONTROL_METHOD_CONSTANT = 0x03,129PIPE_H2645_ENC_RATE_CONTROL_METHOD_VARIABLE = 0x04130};131132struct pipe_picture_desc133{134enum pipe_video_profile profile;135enum pipe_video_entrypoint entry_point;136bool protected_playback;137uint8_t *decrypt_key;138};139140struct pipe_quant_matrix141{142enum pipe_video_format codec;143};144145struct pipe_macroblock146{147enum pipe_video_format codec;148};149150struct pipe_mpeg12_picture_desc151{152struct pipe_picture_desc base;153154unsigned picture_coding_type;155unsigned picture_structure;156unsigned frame_pred_frame_dct;157unsigned q_scale_type;158unsigned alternate_scan;159unsigned intra_vlc_format;160unsigned concealment_motion_vectors;161unsigned intra_dc_precision;162unsigned f_code[2][2];163unsigned top_field_first;164unsigned full_pel_forward_vector;165unsigned full_pel_backward_vector;166unsigned num_slices;167168const uint8_t *intra_matrix;169const uint8_t *non_intra_matrix;170171struct pipe_video_buffer *ref[2];172};173174struct pipe_mpeg12_macroblock175{176struct pipe_macroblock base;177178/* see section 6.3.17 in the spec */179unsigned short x, y;180181/* see section 6.3.17.1 in the spec */182unsigned char macroblock_type;183184union {185struct {186/* see table 6-17 in the spec */187unsigned int frame_motion_type:2;188189/* see table 6-18 in the spec */190unsigned int field_motion_type:2;191192/* see table 6-19 in the spec */193unsigned int dct_type:1;194} bits;195unsigned int value;196} macroblock_modes;197198/* see section 6.3.17.2 in the spec */199unsigned char motion_vertical_field_select;200201/* see Table 7-7 in the spec */202short PMV[2][2][2];203204/* see figure 6.10-12 in the spec */205unsigned short coded_block_pattern;206207/* see figure 6.10-12 in the spec */208short *blocks;209210/* Number of skipped macroblocks after this macroblock */211unsigned short num_skipped_macroblocks;212};213214struct pipe_mpeg4_picture_desc215{216struct pipe_picture_desc base;217218int32_t trd[2];219int32_t trb[2];220uint16_t vop_time_increment_resolution;221uint8_t vop_coding_type;222uint8_t vop_fcode_forward;223uint8_t vop_fcode_backward;224uint8_t resync_marker_disable;225uint8_t interlaced;226uint8_t quant_type;227uint8_t quarter_sample;228uint8_t short_video_header;229uint8_t rounding_control;230uint8_t alternate_vertical_scan_flag;231uint8_t top_field_first;232233const uint8_t *intra_matrix;234const uint8_t *non_intra_matrix;235236struct pipe_video_buffer *ref[2];237};238239struct pipe_vc1_picture_desc240{241struct pipe_picture_desc base;242243uint32_t slice_count;244uint8_t picture_type;245uint8_t frame_coding_mode;246uint8_t postprocflag;247uint8_t pulldown;248uint8_t interlace;249uint8_t tfcntrflag;250uint8_t finterpflag;251uint8_t psf;252uint8_t dquant;253uint8_t panscan_flag;254uint8_t refdist_flag;255uint8_t quantizer;256uint8_t extended_mv;257uint8_t extended_dmv;258uint8_t overlap;259uint8_t vstransform;260uint8_t loopfilter;261uint8_t fastuvmc;262uint8_t range_mapy_flag;263uint8_t range_mapy;264uint8_t range_mapuv_flag;265uint8_t range_mapuv;266uint8_t multires;267uint8_t syncmarker;268uint8_t rangered;269uint8_t maxbframes;270uint8_t deblockEnable;271uint8_t pquant;272273struct pipe_video_buffer *ref[2];274};275276struct pipe_h264_sps277{278uint8_t level_idc;279uint8_t chroma_format_idc;280uint8_t separate_colour_plane_flag;281uint8_t bit_depth_luma_minus8;282uint8_t bit_depth_chroma_minus8;283uint8_t seq_scaling_matrix_present_flag;284uint8_t ScalingList4x4[6][16];285uint8_t ScalingList8x8[6][64];286uint8_t log2_max_frame_num_minus4;287uint8_t pic_order_cnt_type;288uint8_t log2_max_pic_order_cnt_lsb_minus4;289uint8_t delta_pic_order_always_zero_flag;290int32_t offset_for_non_ref_pic;291int32_t offset_for_top_to_bottom_field;292uint8_t num_ref_frames_in_pic_order_cnt_cycle;293int32_t offset_for_ref_frame[256];294uint8_t max_num_ref_frames;295uint8_t frame_mbs_only_flag;296uint8_t mb_adaptive_frame_field_flag;297uint8_t direct_8x8_inference_flag;298};299300struct pipe_h264_pps301{302struct pipe_h264_sps *sps;303304uint8_t entropy_coding_mode_flag;305uint8_t bottom_field_pic_order_in_frame_present_flag;306uint8_t num_slice_groups_minus1;307uint8_t slice_group_map_type;308uint8_t slice_group_change_rate_minus1;309uint8_t num_ref_idx_l0_default_active_minus1;310uint8_t num_ref_idx_l1_default_active_minus1;311uint8_t weighted_pred_flag;312uint8_t weighted_bipred_idc;313int8_t pic_init_qp_minus26;314int8_t chroma_qp_index_offset;315uint8_t deblocking_filter_control_present_flag;316uint8_t constrained_intra_pred_flag;317uint8_t redundant_pic_cnt_present_flag;318uint8_t ScalingList4x4[6][16];319uint8_t ScalingList8x8[6][64];320uint8_t transform_8x8_mode_flag;321int8_t second_chroma_qp_index_offset;322};323324struct pipe_h264_picture_desc325{326struct pipe_picture_desc base;327328struct pipe_h264_pps *pps;329330/* slice header */331uint32_t frame_num;332uint8_t field_pic_flag;333uint8_t bottom_field_flag;334uint8_t num_ref_idx_l0_active_minus1;335uint8_t num_ref_idx_l1_active_minus1;336337uint32_t slice_count;338int32_t field_order_cnt[2];339bool is_reference;340uint8_t num_ref_frames;341342bool is_long_term[16];343bool top_is_reference[16];344bool bottom_is_reference[16];345uint32_t field_order_cnt_list[16][2];346uint32_t frame_num_list[16];347348struct pipe_video_buffer *ref[16];349};350351struct pipe_h264_enc_rate_control352{353enum pipe_h2645_enc_rate_control_method rate_ctrl_method;354unsigned target_bitrate;355unsigned peak_bitrate;356unsigned frame_rate_num;357unsigned frame_rate_den;358unsigned vbv_buffer_size;359unsigned vbv_buf_lv;360unsigned target_bits_picture;361unsigned peak_bits_picture_integer;362unsigned peak_bits_picture_fraction;363unsigned fill_data_enable;364unsigned enforce_hrd;365};366367struct pipe_h264_enc_motion_estimation368{369unsigned motion_est_quarter_pixel;370unsigned enc_disable_sub_mode;371unsigned lsmvert;372unsigned enc_en_ime_overw_dis_subm;373unsigned enc_ime_overw_dis_subm_no;374unsigned enc_ime2_search_range_x;375unsigned enc_ime2_search_range_y;376};377378struct pipe_h264_enc_pic_control379{380unsigned enc_cabac_enable;381unsigned enc_constraint_set_flags;382unsigned enc_frame_cropping_flag;383unsigned enc_frame_crop_left_offset;384unsigned enc_frame_crop_right_offset;385unsigned enc_frame_crop_top_offset;386unsigned enc_frame_crop_bottom_offset;387};388389struct pipe_h264_enc_picture_desc390{391struct pipe_picture_desc base;392393struct pipe_h264_enc_rate_control rate_ctrl;394395struct pipe_h264_enc_motion_estimation motion_est;396struct pipe_h264_enc_pic_control pic_ctrl;397398unsigned quant_i_frames;399unsigned quant_p_frames;400unsigned quant_b_frames;401402enum pipe_h2645_enc_picture_type picture_type;403unsigned frame_num;404unsigned frame_num_cnt;405unsigned p_remain;406unsigned i_remain;407unsigned idr_pic_id;408unsigned gop_cnt;409unsigned pic_order_cnt;410unsigned pic_order_cnt_type;411unsigned ref_idx_l0;412unsigned ref_idx_l1;413unsigned gop_size;414unsigned ref_pic_mode;415416bool not_referenced;417bool enable_vui;418struct hash_table *frame_idx;419420};421422struct pipe_h265_enc_seq_param423{424uint8_t general_profile_idc;425uint8_t general_level_idc;426uint8_t general_tier_flag;427uint32_t intra_period;428uint16_t pic_width_in_luma_samples;429uint16_t pic_height_in_luma_samples;430uint32_t chroma_format_idc;431uint32_t bit_depth_luma_minus8;432uint32_t bit_depth_chroma_minus8;433bool strong_intra_smoothing_enabled_flag;434bool amp_enabled_flag;435bool sample_adaptive_offset_enabled_flag;436bool pcm_enabled_flag;437bool sps_temporal_mvp_enabled_flag;438uint8_t log2_min_luma_coding_block_size_minus3;439uint8_t log2_diff_max_min_luma_coding_block_size;440uint8_t log2_min_transform_block_size_minus2;441uint8_t log2_diff_max_min_transform_block_size;442uint8_t max_transform_hierarchy_depth_inter;443uint8_t max_transform_hierarchy_depth_intra;444uint8_t conformance_window_flag;445uint16_t conf_win_left_offset;446uint16_t conf_win_right_offset;447uint16_t conf_win_top_offset;448uint16_t conf_win_bottom_offset;449};450451struct pipe_h265_enc_pic_param452{453uint8_t log2_parallel_merge_level_minus2;454uint8_t nal_unit_type;455bool constrained_intra_pred_flag;456};457458struct pipe_h265_enc_slice_param459{460uint8_t max_num_merge_cand;461int8_t slice_cb_qp_offset;462int8_t slice_cr_qp_offset;463int8_t slice_beta_offset_div2;464int8_t slice_tc_offset_div2;465bool cabac_init_flag;466uint32_t slice_deblocking_filter_disabled_flag;467bool slice_loop_filter_across_slices_enabled_flag;468};469470struct pipe_h265_enc_rate_control471{472enum pipe_h2645_enc_rate_control_method rate_ctrl_method;473unsigned target_bitrate;474unsigned peak_bitrate;475unsigned frame_rate_num;476unsigned frame_rate_den;477unsigned quant_i_frames;478unsigned vbv_buffer_size;479unsigned vbv_buf_lv;480unsigned target_bits_picture;481unsigned peak_bits_picture_integer;482unsigned peak_bits_picture_fraction;483unsigned fill_data_enable;484unsigned enforce_hrd;485};486487struct pipe_h265_enc_picture_desc488{489struct pipe_picture_desc base;490491struct pipe_h265_enc_seq_param seq;492struct pipe_h265_enc_pic_param pic;493struct pipe_h265_enc_slice_param slice;494struct pipe_h265_enc_rate_control rc;495496enum pipe_h2645_enc_picture_type picture_type;497unsigned decoded_curr_pic;498unsigned reference_frames[16];499unsigned frame_num;500unsigned pic_order_cnt;501unsigned pic_order_cnt_type;502unsigned ref_idx_l0;503unsigned ref_idx_l1;504bool not_referenced;505struct hash_table *frame_idx;506};507508struct pipe_h265_sps509{510uint8_t chroma_format_idc;511uint8_t separate_colour_plane_flag;512uint32_t pic_width_in_luma_samples;513uint32_t pic_height_in_luma_samples;514uint8_t bit_depth_luma_minus8;515uint8_t bit_depth_chroma_minus8;516uint8_t log2_max_pic_order_cnt_lsb_minus4;517uint8_t sps_max_dec_pic_buffering_minus1;518uint8_t log2_min_luma_coding_block_size_minus3;519uint8_t log2_diff_max_min_luma_coding_block_size;520uint8_t log2_min_transform_block_size_minus2;521uint8_t log2_diff_max_min_transform_block_size;522uint8_t max_transform_hierarchy_depth_inter;523uint8_t max_transform_hierarchy_depth_intra;524uint8_t scaling_list_enabled_flag;525uint8_t ScalingList4x4[6][16];526uint8_t ScalingList8x8[6][64];527uint8_t ScalingList16x16[6][64];528uint8_t ScalingList32x32[2][64];529uint8_t ScalingListDCCoeff16x16[6];530uint8_t ScalingListDCCoeff32x32[2];531uint8_t amp_enabled_flag;532uint8_t sample_adaptive_offset_enabled_flag;533uint8_t pcm_enabled_flag;534uint8_t pcm_sample_bit_depth_luma_minus1;535uint8_t pcm_sample_bit_depth_chroma_minus1;536uint8_t log2_min_pcm_luma_coding_block_size_minus3;537uint8_t log2_diff_max_min_pcm_luma_coding_block_size;538uint8_t pcm_loop_filter_disabled_flag;539uint8_t num_short_term_ref_pic_sets;540uint8_t long_term_ref_pics_present_flag;541uint8_t num_long_term_ref_pics_sps;542uint8_t sps_temporal_mvp_enabled_flag;543uint8_t strong_intra_smoothing_enabled_flag;544};545546struct pipe_h265_pps547{548struct pipe_h265_sps *sps;549550uint8_t dependent_slice_segments_enabled_flag;551uint8_t output_flag_present_flag;552uint8_t num_extra_slice_header_bits;553uint8_t sign_data_hiding_enabled_flag;554uint8_t cabac_init_present_flag;555uint8_t num_ref_idx_l0_default_active_minus1;556uint8_t num_ref_idx_l1_default_active_minus1;557int8_t init_qp_minus26;558uint8_t constrained_intra_pred_flag;559uint8_t transform_skip_enabled_flag;560uint8_t cu_qp_delta_enabled_flag;561uint8_t diff_cu_qp_delta_depth;562int8_t pps_cb_qp_offset;563int8_t pps_cr_qp_offset;564uint8_t pps_slice_chroma_qp_offsets_present_flag;565uint8_t weighted_pred_flag;566uint8_t weighted_bipred_flag;567uint8_t transquant_bypass_enabled_flag;568uint8_t tiles_enabled_flag;569uint8_t entropy_coding_sync_enabled_flag;570uint8_t num_tile_columns_minus1;571uint8_t num_tile_rows_minus1;572uint8_t uniform_spacing_flag;573uint16_t column_width_minus1[20];574uint16_t row_height_minus1[22];575uint8_t loop_filter_across_tiles_enabled_flag;576uint8_t pps_loop_filter_across_slices_enabled_flag;577uint8_t deblocking_filter_control_present_flag;578uint8_t deblocking_filter_override_enabled_flag;579uint8_t pps_deblocking_filter_disabled_flag;580int8_t pps_beta_offset_div2;581int8_t pps_tc_offset_div2;582uint8_t lists_modification_present_flag;583uint8_t log2_parallel_merge_level_minus2;584uint8_t slice_segment_header_extension_present_flag;585uint16_t st_rps_bits;586};587588struct pipe_h265_picture_desc589{590struct pipe_picture_desc base;591592struct pipe_h265_pps *pps;593594uint8_t IDRPicFlag;595uint8_t RAPPicFlag;596uint8_t CurrRpsIdx;597uint32_t NumPocTotalCurr;598uint32_t NumDeltaPocsOfRefRpsIdx;599uint32_t NumShortTermPictureSliceHeaderBits;600uint32_t NumLongTermPictureSliceHeaderBits;601602int32_t CurrPicOrderCntVal;603struct pipe_video_buffer *ref[16];604int32_t PicOrderCntVal[16];605uint8_t IsLongTerm[16];606uint8_t NumPocStCurrBefore;607uint8_t NumPocStCurrAfter;608uint8_t NumPocLtCurr;609uint8_t RefPicSetStCurrBefore[8];610uint8_t RefPicSetStCurrAfter[8];611uint8_t RefPicSetLtCurr[8];612uint8_t RefPicList[2][15];613bool UseRefPicList;614bool UseStRpsBits;615};616617struct pipe_mjpeg_picture_desc618{619struct pipe_picture_desc base;620621struct622{623uint16_t picture_width;624uint16_t picture_height;625626struct {627uint8_t component_id;628uint8_t h_sampling_factor;629uint8_t v_sampling_factor;630uint8_t quantiser_table_selector;631} components[255];632633uint8_t num_components;634} picture_parameter;635636struct637{638uint8_t load_quantiser_table[4];639uint8_t quantiser_table[4][64];640} quantization_table;641642struct643{644uint8_t load_huffman_table[2];645646struct {647uint8_t num_dc_codes[16];648uint8_t dc_values[12];649uint8_t num_ac_codes[16];650uint8_t ac_values[162];651uint8_t pad[2];652} table[2];653} huffman_table;654655struct656{657unsigned slice_data_size;658unsigned slice_data_offset;659unsigned slice_data_flag;660unsigned slice_horizontal_position;661unsigned slice_vertical_position;662663struct {664uint8_t component_selector;665uint8_t dc_table_selector;666uint8_t ac_table_selector;667} components[4];668669uint8_t num_components;670671uint16_t restart_interval;672unsigned num_mcus;673} slice_parameter;674};675676struct vp9_segment_parameter677{678struct {679uint16_t segment_reference_enabled:1;680uint16_t segment_reference:2;681uint16_t segment_reference_skipped:1;682} segment_flags;683684bool alt_quant_enabled;685int16_t alt_quant;686687bool alt_lf_enabled;688int16_t alt_lf;689690uint8_t filter_level[4][2];691692int16_t luma_ac_quant_scale;693int16_t luma_dc_quant_scale;694695int16_t chroma_ac_quant_scale;696int16_t chroma_dc_quant_scale;697};698699struct pipe_vp9_picture_desc700{701struct pipe_picture_desc base;702703struct pipe_video_buffer *ref[16];704705struct {706uint16_t frame_width;707uint16_t frame_height;708709struct {710uint32_t subsampling_x:1;711uint32_t subsampling_y:1;712uint32_t frame_type:1;713uint32_t show_frame:1;714uint32_t error_resilient_mode:1;715uint32_t intra_only:1;716uint32_t allow_high_precision_mv:1;717uint32_t mcomp_filter_type:3;718uint32_t frame_parallel_decoding_mode:1;719uint32_t reset_frame_context:2;720uint32_t refresh_frame_context:1;721uint32_t frame_context_idx:2;722uint32_t segmentation_enabled:1;723uint32_t segmentation_temporal_update:1;724uint32_t segmentation_update_map:1;725uint32_t last_ref_frame:3;726uint32_t last_ref_frame_sign_bias:1;727uint32_t golden_ref_frame:3;728uint32_t golden_ref_frame_sign_bias:1;729uint32_t alt_ref_frame:3;730uint32_t alt_ref_frame_sign_bias:1;731uint32_t lossless_flag:1;732} pic_fields;733734uint8_t filter_level;735uint8_t sharpness_level;736737uint8_t log2_tile_rows;738uint8_t log2_tile_columns;739740uint8_t frame_header_length_in_bytes;741742uint16_t first_partition_size;743744uint8_t mb_segment_tree_probs[7];745uint8_t segment_pred_probs[3];746747uint8_t profile;748749uint8_t bit_depth;750751bool mode_ref_delta_enabled;752bool mode_ref_delta_update;753754uint8_t base_qindex;755int8_t y_dc_delta_q;756int8_t uv_ac_delta_q;757int8_t uv_dc_delta_q;758uint8_t abs_delta;759} picture_parameter;760761struct {762uint32_t slice_data_size;763uint32_t slice_data_offset;764765uint32_t slice_data_flag;766767struct vp9_segment_parameter seg_param[8];768} slice_parameter;769};770771struct pipe_av1_picture_desc772{773struct pipe_picture_desc base;774775struct pipe_video_buffer *ref[16];776777struct {778uint8_t profile;779uint8_t order_hint_bits_minus_1;780uint8_t bit_depth_idx;781782struct {783uint32_t use_128x128_superblock:1;784uint32_t enable_filter_intra:1;785uint32_t enable_intra_edge_filter:1;786uint32_t enable_interintra_compound:1;787uint32_t enable_masked_compound:1;788uint32_t enable_dual_filter:1;789uint32_t enable_order_hint:1;790uint32_t enable_jnt_comp:1;791uint32_t mono_chrome:1;792uint32_t ref_frame_mvs:1;793} seq_info_fields;794795uint32_t current_frame_id;796797uint16_t frame_width;798uint16_t frame_height;799uint16_t max_width;800uint16_t max_height;801802uint8_t ref_frame_idx[7];803uint8_t primary_ref_frame;804uint8_t order_hint;805806struct {807struct {808uint32_t enabled:1;809uint32_t update_map:1;810uint32_t temporal_update:1;811} segment_info_fields;812813int16_t feature_data[8][8];814uint8_t feature_mask[8];815} seg_info;816817struct {818struct {819uint32_t apply_grain:1;820uint32_t chroma_scaling_from_luma:1;821uint32_t grain_scaling_minus_8:2;822uint32_t ar_coeff_lag:2;823uint32_t ar_coeff_shift_minus_6:2;824uint32_t grain_scale_shift:2;825uint32_t overlap_flag:1;826uint32_t clip_to_restricted_range:1;827} film_grain_info_fields;828829uint16_t grain_seed;830uint8_t num_y_points;831uint8_t point_y_value[14];832uint8_t point_y_scaling[14];833uint8_t num_cb_points;834uint8_t point_cb_value[10];835uint8_t point_cb_scaling[10];836uint8_t num_cr_points;837uint8_t point_cr_value[10];838uint8_t point_cr_scaling[10];839int8_t ar_coeffs_y[24];840int8_t ar_coeffs_cb[25];841int8_t ar_coeffs_cr[25];842uint8_t cb_mult;843uint8_t cb_luma_mult;844uint16_t cb_offset;845uint8_t cr_mult;846uint8_t cr_luma_mult;847uint16_t cr_offset;848} film_grain_info;849850uint8_t tile_cols;851uint8_t tile_rows;852uint32_t tile_col_start_sb[65];853uint32_t tile_row_start_sb[65];854uint16_t context_update_tile_id;855856struct {857uint32_t frame_type:2;858uint32_t show_frame:1;859uint32_t error_resilient_mode:1;860uint32_t disable_cdf_update:1;861uint32_t allow_screen_content_tools:1;862uint32_t force_integer_mv:1;863uint32_t allow_intrabc:1;864uint32_t use_superres:1;865uint32_t allow_high_precision_mv:1;866uint32_t is_motion_mode_switchable:1;867uint32_t use_ref_frame_mvs:1;868uint32_t disable_frame_end_update_cdf:1;869uint32_t allow_warped_motion:1;870} pic_info_fields;871872uint8_t superres_scale_denominator;873874uint8_t interp_filter;875uint8_t filter_level[2];876uint8_t filter_level_u;877uint8_t filter_level_v;878struct {879uint8_t sharpness_level:3;880uint8_t mode_ref_delta_enabled:1;881uint8_t mode_ref_delta_update:1;882} loop_filter_info_fields;883884int8_t ref_deltas[8];885int8_t mode_deltas[2];886887uint8_t base_qindex;888int8_t y_dc_delta_q;889int8_t u_dc_delta_q;890int8_t u_ac_delta_q;891int8_t v_dc_delta_q;892int8_t v_ac_delta_q;893894struct {895uint16_t qm_y:4;896uint16_t qm_u:4;897uint16_t qm_v:4;898} qmatrix_fields;899900struct {901uint32_t delta_q_present_flag:1;902uint32_t log2_delta_q_res:2;903uint32_t delta_lf_present_flag:1;904uint32_t log2_delta_lf_res:2;905uint32_t delta_lf_multi:1;906uint32_t tx_mode:2;907uint32_t reference_select:1;908uint32_t reduced_tx_set_used:1;909uint32_t skip_mode_present:1;910} mode_control_fields;911912uint8_t cdef_damping_minus_3;913uint8_t cdef_bits;914uint8_t cdef_y_strengths[8];915uint8_t cdef_uv_strengths[8];916917struct {918uint16_t yframe_restoration_type:2;919uint16_t cbframe_restoration_type:2;920uint16_t crframe_restoration_type:2;921} loop_restoration_fields;922923uint16_t lr_unit_size[3];924925struct {926uint32_t wmtype;927int32_t wmmat[8];928} wm[7];929930uint32_t refresh_frame_flags;931} picture_parameter;932933struct {934uint32_t slice_data_size[256];935uint32_t slice_data_offset[256];936} slice_parameter;937};938939#ifdef __cplusplus940}941#endif942943#endif /* PIPE_VIDEO_STATE_H */944945946