137
147
PIPE_H2645_ENC_PICTURE_TYPE_SKIP = 0x04
150
enum pipe_av1_enc_frame_type
152
PIPE_AV1_ENC_FRAME_TYPE_KEY = 0x00,
153
PIPE_AV1_ENC_FRAME_TYPE_INTER = 0x01,
154
PIPE_AV1_ENC_FRAME_TYPE_INTRA_ONLY = 0x02,
155
PIPE_AV1_ENC_FRAME_TYPE_SWITCH = 0x03,
156
PIPE_AV1_ENC_FRAME_TYPE_SHOW_EXISTING = 0x04
140
159
enum pipe_h2645_enc_rate_control_method
142
161
PIPE_H2645_ENC_RATE_CONTROL_METHOD_DISABLE = 0x00,
143
162
PIPE_H2645_ENC_RATE_CONTROL_METHOD_CONSTANT_SKIP = 0x01,
144
163
PIPE_H2645_ENC_RATE_CONTROL_METHOD_VARIABLE_SKIP = 0x02,
145
164
PIPE_H2645_ENC_RATE_CONTROL_METHOD_CONSTANT = 0x03,
146
PIPE_H2645_ENC_RATE_CONTROL_METHOD_VARIABLE = 0x04
165
PIPE_H2645_ENC_RATE_CONTROL_METHOD_VARIABLE = 0x04,
166
PIPE_H2645_ENC_RATE_CONTROL_METHOD_QUALITY_VARIABLE = 0x05
149
169
enum pipe_slice_buffer_placement_type
639
680
struct h265_slice_descriptor slices_descriptors[128];
683
struct pipe_av1_enc_rate_control
685
enum pipe_h2645_enc_rate_control_method rate_ctrl_method;
686
unsigned target_bitrate;
687
unsigned peak_bitrate;
688
unsigned frame_rate_num;
689
unsigned frame_rate_den;
690
unsigned vbv_buffer_size;
692
unsigned vbv_buf_initial_size;
693
bool app_requested_hrd_buffer;
694
unsigned target_bits_picture;
695
unsigned peak_bits_picture_integer;
696
unsigned peak_bits_picture_fraction;
697
unsigned fill_data_enable;
698
unsigned skip_frame_enable;
699
unsigned enforce_hrd;
700
unsigned max_au_size;
701
unsigned qp; /* Initial QP */
704
bool app_requested_qp_range;
705
bool app_requested_initial_qp;
707
/* Used with PIPE_H2645_ENC_RATE_CONTROL_METHOD_QUALITY_VARIABLE */
708
unsigned vbr_quality_factor;
711
struct pipe_av1_enc_decoder_model_info
713
uint32_t buffer_delay_length_minus1;
714
uint32_t num_units_in_decoding_tick;
715
uint32_t buffer_removal_time_length_minus1;
716
uint32_t frame_presentation_time_length_minus1;
719
struct pipe_av1_enc_color_description
721
uint32_t color_primaries;
722
uint32_t transfer_characteristics;
723
uint32_t matrix_coefficients;
724
uint32_t color_range;
725
uint32_t chroma_sample_position;
727
struct pipe_av1_enc_seq_param
732
uint32_t num_temporal_layers;
733
uint32_t intra_period;
735
uint32_t bit_depth_minus8;
736
uint32_t pic_width_in_luma_samples;
737
uint32_t pic_height_in_luma_samples;
740
uint32_t use_128x128_superblock:1;
741
uint32_t enable_filter_intra :1;
742
uint32_t enable_intra_edge_filter :1;
743
uint32_t enable_interintra_compound :1;
744
uint32_t enable_masked_compound :1;
745
uint32_t enable_warped_motion :1;
746
uint32_t enable_dual_filter :1;
747
uint32_t enable_cdef:1;
748
uint32_t enable_restoration:1;
749
uint32_t enable_superres:1;
750
uint32_t enable_order_hint:1;
751
uint32_t enable_jnt_comp:1;
752
uint32_t color_description_present_flag:1;
753
uint32_t enable_ref_frame_mvs:1;
754
uint32_t frame_id_number_present_flag:1;
755
uint32_t disable_screen_content_tools:1;
756
uint32_t timing_info_present_flag:1;
757
uint32_t equal_picture_interval:1;
758
uint32_t decoder_model_info_present_flag:1;
759
uint32_t force_screen_content_tools:2;
760
uint32_t force_integer_mv:2;
763
/* timing info params */
764
uint32_t num_units_in_display_tick;
766
uint32_t num_tick_per_picture_minus1;
767
uint32_t delta_frame_id_length;
768
uint32_t additional_frame_id_length;
769
uint32_t order_hint_bits;
770
struct pipe_av1_enc_decoder_model_info decoder_model_info;
771
struct pipe_av1_enc_color_description color_config;
772
uint16_t frame_width_bits_minus1;
773
uint16_t frame_height_bits_minus1;
774
uint16_t operating_point_idc[32];
775
uint8_t decoder_model_present_for_this_op[32];
778
struct pipe_av1_tile_group {
779
uint8_t tile_group_start;
780
uint8_t tile_group_end;
783
struct pipe_av1_enc_picture_desc
785
struct pipe_picture_desc base;
786
enum pipe_av1_enc_frame_type frame_type;
787
struct pipe_av1_enc_seq_param seq;
788
struct pipe_av1_enc_rate_control rc[4];
790
uint32_t enable_frame_obu:1;
791
uint32_t error_resilient_mode:1;
792
uint32_t disable_cdf_update:1;
793
uint32_t frame_size_override_flag:1;
794
uint32_t allow_screen_content_tools:1;
795
uint32_t allow_intrabc:1;
796
uint32_t force_integer_mv:1;
797
uint32_t disable_frame_end_update_cdf:1;
798
uint32_t palette_mode_enable:1;
799
uint32_t allow_high_precision_mv:1;
800
uint32_t use_ref_frame_mvs;
801
uint32_t show_existing_frame:1;
802
uint32_t enable_render_size:1;
803
uint32_t use_superres:1;
804
uint32_t reduced_tx_set:1;
805
uint32_t skip_mode_present:1;
807
struct pipe_enc_quality_modes quality_modes;
808
uint32_t num_tiles_in_pic; /* [1, 32], */
811
unsigned num_tile_groups;
812
struct pipe_av1_tile_group tile_groups[256];
813
uint32_t context_update_tile_id;
814
uint16_t width_in_sbs_minus_1[63];
815
uint16_t height_in_sbs_minus_1[63];
817
uint32_t last_key_frame_num;
818
uint32_t number_of_skips;
819
uint32_t temporal_id;
821
uint16_t frame_width;
822
uint16_t frame_height;
823
uint16_t frame_width_sb;
824
uint16_t frame_height_sb;
825
uint16_t upscaled_width;
826
uint16_t render_width;
827
uint16_t render_height;
828
uint32_t interpolation_filter;
830
uint8_t compound_reference_mode;
832
uint8_t superres_scale_denominator;
833
uint32_t primary_ref_frame;
834
uint8_t refresh_frame_flags;
835
uint8_t ref_frame_idx[7];
838
uint8_t cdef_damping_minus_3;
840
uint8_t cdef_y_strengths[8];
841
uint8_t cdef_uv_strengths[8];
845
uint8_t yframe_restoration_type;
846
uint8_t cbframe_restoration_type;
847
uint8_t crframe_restoration_type;
848
uint8_t lr_unit_shift;
853
uint8_t filter_level[2];
854
uint8_t filter_level_u;
855
uint8_t filter_level_v;
856
uint8_t sharpness_level;
857
uint8_t mode_ref_delta_enabled;
858
uint8_t mode_ref_delta_update;
859
int8_t ref_deltas[8];
860
int8_t mode_deltas[2];
861
uint8_t delta_lf_present;
862
uint8_t delta_lf_res;
863
uint8_t delta_lf_multi;
873
uint8_t min_base_qindex;
874
uint8_t max_base_qindex;
875
uint8_t using_qmatrix;
879
uint8_t delta_q_present;
884
uint8_t obu_extension_flag;
885
uint8_t obu_has_size_field;
642
891
struct pipe_h265_sps
644
893
uint8_t chroma_format_idc;
1347
1589
uint32_t value;
1592
union pipe_av1_enc_cap_features {
1595
* Use 128x128 superblock.
1597
* Allows setting use_128x128_superblock in the SPS.
1599
uint32_t support_128x128_superblock : 2;
1602
* Allows setting enable_filter_intra in the SPS.
1604
uint32_t support_filter_intra : 2;
1606
* Intra edge filter.
1607
* Allows setting enable_intra_edge_filter in the SPS.
1609
uint32_t support_intra_edge_filter : 2;
1611
* Interintra compound.
1612
* Allows setting enable_interintra_compound in the SPS.
1614
uint32_t support_interintra_compound : 2;
1617
* Allows setting enable_masked_compound in the SPS.
1619
uint32_t support_masked_compound : 2;
1622
* Allows setting enable_warped_motion in the SPS.
1624
uint32_t support_warped_motion : 2;
1627
* Allows setting palette_mode in the PPS.
1629
uint32_t support_palette_mode : 2;
1632
* Allows setting enable_dual_filter in the SPS.
1634
uint32_t support_dual_filter : 2;
1637
* Allows setting enable_jnt_comp in the SPS.
1639
uint32_t support_jnt_comp : 2;
1641
* Refrence frame mvs.
1642
* Allows setting enable_ref_frame_mvs in the SPS.
1644
uint32_t support_ref_frame_mvs : 2;
1647
* Allows setting enable_superres in the SPS.
1649
uint32_t support_superres : 2;
1652
* Allows setting enable_restoration in the SPS.
1654
uint32_t support_restoration : 2;
1657
* Allows setting allow_intrabc in the PPS.
1659
uint32_t support_allow_intrabc : 2;
1661
* Cdef channel strength.
1662
* Allows setting cdef_y_strengths and cdef_uv_strengths in PPS.
1664
uint32_t support_cdef_channel_strength : 2;
1665
/** Reserved bits for future, must be zero. */
1666
uint32_t reserved : 4;
1671
union pipe_av1_enc_cap_features_ext1 {
1674
* Fields indicate which types of interpolation filter are supported.
1675
* (interpolation_filter & 0x01) == 1: eight_tap filter is supported, 0: not.
1676
* (interpolation_filter & 0x02) == 1: eight_tap_smooth filter is supported, 0: not.
1677
* (interpolation_filter & 0x04) == 1: eight_sharp filter is supported, 0: not.
1678
* (interpolation_filter & 0x08) == 1: bilinear filter is supported, 0: not.
1679
* (interpolation_filter & 0x10) == 1: switchable filter is supported, 0: not.
1681
uint32_t interpolation_filter : 5;
1683
* Min segmentId block size accepted.
1684
* Application need to send seg_id_block_size in PPS equal or larger than this value.
1686
uint32_t min_segid_block_size_accepted : 8;
1688
* Type of segment feature supported.
1689
* (segment_feature_support & 0x01) == 1: SEG_LVL_ALT_Q is supported, 0: not.
1690
* (segment_feature_support & 0x02) == 1: SEG_LVL_ALT_LF_Y_V is supported, 0: not.
1691
* (segment_feature_support & 0x04) == 1: SEG_LVL_ALT_LF_Y_H is supported, 0: not.
1692
* (segment_feature_support & 0x08) == 1: SEG_LVL_ALT_LF_U is supported, 0: not.
1693
* (segment_feature_support & 0x10) == 1: SEG_LVL_ALT_LF_V is supported, 0: not.
1694
* (segment_feature_support & 0x20) == 1: SEG_LVL_REF_FRAME is supported, 0: not.
1695
* (segment_feature_support & 0x40) == 1: SEG_LVL_SKIP is supported, 0: not.
1696
* (segment_feature_support & 0x80) == 1: SEG_LVL_GLOBALMV is supported, 0: not.
1698
uint32_t segment_feature_support : 8;
1699
/** Reserved bits for future, must be zero. */
1700
uint32_t reserved : 11;
1705
union pipe_av1_enc_cap_features_ext2 {
1708
* Tile size bytes minus1.
1709
* Specify the number of bytes needed to code tile size supported.
1710
* This value need to be set in frame header obu.
1712
uint32_t tile_size_bytes_minus1 : 2;
1714
* Tile size bytes minus1.
1715
* Specify the fixed number of bytes needed to code syntax obu_size.
1717
uint32_t obu_size_bytes_minus1 : 2;
1719
* tx_mode supported.
1720
* (tx_mode_support & 0x01) == 1: ONLY_4X4 is supported, 0: not.
1721
* (tx_mode_support & 0x02) == 1: TX_MODE_LARGEST is supported, 0: not.
1722
* (tx_mode_support & 0x04) == 1: TX_MODE_SELECT is supported, 0: not.
1724
uint32_t tx_mode_support : 3;
1726
* Max tile num minus1.
1727
* Specify the max number of tile supported by driver.
1729
uint32_t max_tile_num_minus1 : 13;
1730
/** Reserved bits for future, must be zero. */
1731
uint32_t reserved : 12;
1350
1736
#ifdef __cplusplus