summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian König <[email protected]>2015-04-28 15:31:37 +0200
committerMarek Olšák <[email protected]>2015-08-14 15:02:28 +0200
commitfacba49d839b01da139261e587a05c744cc9a1fa (patch)
treec094fc6842c91c27da903c1504a83c14582b278c /src
parent716a67da12be0656a6dae2a448175946aaf57377 (diff)
vl: add HEVC profiles and defines
Signed-off-by: Christian König <[email protected]> Reviewed-by: Leo Liu <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_video.h7
-rw-r--r--src/gallium/include/pipe/p_video_enums.h10
-rw-r--r--src/gallium/include/pipe/p_video_state.h105
3 files changed, 120 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/util/u_video.h b/src/gallium/auxiliary/util/u_video.h
index 99d0f6e775a..ddc00216105 100644
--- a/src/gallium/auxiliary/util/u_video.h
+++ b/src/gallium/auxiliary/util/u_video.h
@@ -68,6 +68,13 @@ u_reduce_video_profile(enum pipe_video_profile profile)
case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH444:
return PIPE_VIDEO_FORMAT_MPEG4_AVC;
+ case PIPE_VIDEO_PROFILE_HEVC_MAIN:
+ case PIPE_VIDEO_PROFILE_HEVC_MAIN_10:
+ case PIPE_VIDEO_PROFILE_HEVC_MAIN_STILL:
+ case PIPE_VIDEO_PROFILE_HEVC_MAIN_12:
+ case PIPE_VIDEO_PROFILE_HEVC_MAIN_444:
+ return PIPE_VIDEO_FORMAT_HEVC;
+
default:
return PIPE_VIDEO_FORMAT_UNKNOWN;
}
diff --git a/src/gallium/include/pipe/p_video_enums.h b/src/gallium/include/pipe/p_video_enums.h
index feaf1ee9c28..9a20146f43e 100644
--- a/src/gallium/include/pipe/p_video_enums.h
+++ b/src/gallium/include/pipe/p_video_enums.h
@@ -34,7 +34,8 @@ enum pipe_video_format
PIPE_VIDEO_FORMAT_MPEG12, /**< MPEG1, MPEG2 */
PIPE_VIDEO_FORMAT_MPEG4, /**< DIVX, XVID */
PIPE_VIDEO_FORMAT_VC1, /**< WMV */
- PIPE_VIDEO_FORMAT_MPEG4_AVC /**< H.264 */
+ PIPE_VIDEO_FORMAT_MPEG4_AVC,/**< H.264 */
+ PIPE_VIDEO_FORMAT_HEVC /**< H.265 */
};
enum pipe_video_profile
@@ -54,7 +55,12 @@ enum pipe_video_profile
PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH,
PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH10,
PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH422,
- PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH444
+ PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH444,
+ PIPE_VIDEO_PROFILE_HEVC_MAIN,
+ PIPE_VIDEO_PROFILE_HEVC_MAIN_10,
+ PIPE_VIDEO_PROFILE_HEVC_MAIN_STILL,
+ PIPE_VIDEO_PROFILE_HEVC_MAIN_12,
+ PIPE_VIDEO_PROFILE_HEVC_MAIN_444
};
/* Video caps, can be different for each codec/profile */
diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h
index 3713cd91b09..7d13151e643 100644
--- a/src/gallium/include/pipe/p_video_state.h
+++ b/src/gallium/include/pipe/p_video_state.h
@@ -376,6 +376,111 @@ struct pipe_h264_enc_picture_desc
bool not_referenced;
};
+struct pipe_h265_sps
+{
+ uint8_t chroma_format_idc;
+ uint8_t separate_colour_plane_flag;
+ uint32_t pic_width_in_luma_samples;
+ uint32_t pic_height_in_luma_samples;
+ uint8_t bit_depth_luma_minus8;
+ uint8_t bit_depth_chroma_minus8;
+ uint8_t log2_max_pic_order_cnt_lsb_minus4;
+ uint8_t sps_max_dec_pic_buffering_minus1;
+ uint8_t log2_min_luma_coding_block_size_minus3;
+ uint8_t log2_diff_max_min_luma_coding_block_size;
+ uint8_t log2_min_transform_block_size_minus2;
+ uint8_t log2_diff_max_min_transform_block_size;
+ uint8_t max_transform_hierarchy_depth_inter;
+ uint8_t max_transform_hierarchy_depth_intra;
+ uint8_t scaling_list_enabled_flag;
+ uint8_t ScalingList4x4[6][16];
+ uint8_t ScalingList8x8[6][64];
+ uint8_t ScalingList16x16[6][64];
+ uint8_t ScalingList32x32[2][64];
+ uint8_t ScalingListDCCoeff16x16[6];
+ uint8_t ScalingListDCCoeff32x32[2];
+ uint8_t amp_enabled_flag;
+ uint8_t sample_adaptive_offset_enabled_flag;
+ uint8_t pcm_enabled_flag;
+ uint8_t pcm_sample_bit_depth_luma_minus1;
+ uint8_t pcm_sample_bit_depth_chroma_minus1;
+ uint8_t log2_min_pcm_luma_coding_block_size_minus3;
+ uint8_t log2_diff_max_min_pcm_luma_coding_block_size;
+ uint8_t pcm_loop_filter_disabled_flag;
+ uint8_t num_short_term_ref_pic_sets;
+ uint8_t long_term_ref_pics_present_flag;
+ uint8_t num_long_term_ref_pics_sps;
+ uint8_t sps_temporal_mvp_enabled_flag;
+ uint8_t strong_intra_smoothing_enabled_flag;
+};
+
+struct pipe_h265_pps
+{
+ struct pipe_h265_sps *sps;
+
+ uint8_t dependent_slice_segments_enabled_flag;
+ uint8_t output_flag_present_flag;
+ uint8_t num_extra_slice_header_bits;
+ uint8_t sign_data_hiding_enabled_flag;
+ uint8_t cabac_init_present_flag;
+ uint8_t num_ref_idx_l0_default_active_minus1;
+ uint8_t num_ref_idx_l1_default_active_minus1;
+ int8_t init_qp_minus26;
+ uint8_t constrained_intra_pred_flag;
+ uint8_t transform_skip_enabled_flag;
+ uint8_t cu_qp_delta_enabled_flag;
+ uint8_t diff_cu_qp_delta_depth;
+ int8_t pps_cb_qp_offset;
+ int8_t pps_cr_qp_offset;
+ uint8_t pps_slice_chroma_qp_offsets_present_flag;
+ uint8_t weighted_pred_flag;
+ uint8_t weighted_bipred_flag;
+ uint8_t transquant_bypass_enabled_flag;
+ uint8_t tiles_enabled_flag;
+ uint8_t entropy_coding_sync_enabled_flag;
+ uint8_t num_tile_columns_minus1;
+ uint8_t num_tile_rows_minus1;
+ uint8_t uniform_spacing_flag;
+ uint16_t column_width_minus1[20];
+ uint16_t row_height_minus1[22];
+ uint8_t loop_filter_across_tiles_enabled_flag;
+ uint8_t pps_loop_filter_across_slices_enabled_flag;
+ uint8_t deblocking_filter_control_present_flag;
+ uint8_t deblocking_filter_override_enabled_flag;
+ uint8_t pps_deblocking_filter_disabled_flag;
+ int8_t pps_beta_offset_div2;
+ int8_t pps_tc_offset_div2;
+ uint8_t lists_modification_present_flag;
+ uint8_t log2_parallel_merge_level_minus2;
+ uint8_t slice_segment_header_extension_present_flag;
+};
+
+struct pipe_h265_picture_desc
+{
+ struct pipe_picture_desc base;
+
+ struct pipe_h265_pps *pps;
+
+ uint8_t IDRPicFlag;
+ uint8_t RAPPicFlag;
+ uint8_t CurrRpsIdx;
+ uint32_t NumPocTotalCurr;
+ uint32_t NumDeltaPocsOfRefRpsIdx;
+ uint32_t NumShortTermPictureSliceHeaderBits;
+ uint32_t NumLongTermPictureSliceHeaderBits;
+
+ int32_t CurrPicOrderCntVal;
+ struct pipe_video_buffer *ref[16];
+ int32_t PicOrderCntVal[16];
+ uint8_t IsLongTerm[16];
+ uint8_t NumPocStCurrBefore;
+ uint8_t NumPocStCurrAfter;
+ uint8_t NumPocLtCurr;
+ uint8_t RefPicSetStCurrBefore[8];
+ uint8_t RefPicSetStCurrAfter[8];
+ uint8_t RefPicSetLtCurr[8];
+};
+
#ifdef __cplusplus
}
#endif