/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocdecode/checkouts/latest/api/rocdecode.h Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocdecode/checkouts/latest/api/rocdecode.h Source File#

rocDecode: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocdecode/checkouts/latest/api/rocdecode.h Source File
rocdecode.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2023 - 2024 Advanced Micro Devices, Inc. All rights reserved.
3 
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10 
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 THE SOFTWARE.
21 */
22 
23 #ifndef ROCDECAPI
24 #if defined(_WIN32)
25 #define ROCDECAPI __stdcall // for future: only linux is supported in this version
26 #else
27 #define ROCDECAPI
28 #endif
29 #endif
30 
31 #pragma once
32 #include "hip/hip_runtime.h"
33 
42 #if defined(__cplusplus)
43 extern "C" {
44 #endif // __cplusplus
45 
46 /*********************************************************************************/
49 /*********************************************************************************/
50 
51 typedef void *rocDecDecoderHandle;
52 
53 /*********************************************************************************/
58 /*********************************************************************************/
59 typedef enum rocDecStatus_enum {
60  ROCDEC_DEVICE_INVALID = -1,
61  ROCDEC_CONTEXT_INVALID = -2,
62  ROCDEC_RUNTIME_ERROR = -3,
63  ROCDEC_OUTOF_MEMORY = -4,
64  ROCDEC_INVALID_PARAMETER = -5,
65  ROCDEC_NOT_IMPLEMENTED = -6,
66  ROCDEC_NOT_INITIALIZED = -7,
67  ROCDEC_NOT_SUPPORTED = -8,
68  ROCDEC_SUCCESS = 0,
69 } rocDecStatus;
70 
71 /*********************************************************************************/
76 /*********************************************************************************/
77 typedef enum rocDecVideoCodec_enum {
88  // Uncompressed YUV
89  rocDecVideoCodec_YUV420 = (('I' << 24) | ('Y' << 16) | ('U' << 8) | ('V')),
90  rocDecVideoCodec_YV12 = (('Y' << 24) | ('V' << 16) | ('1' << 8) | ('2')),
91  rocDecVideoCodec_NV12 = (('N' << 24) | ('V' << 16) | ('1' << 8) | ('2')),
92  rocDecVideoCodec_YUYV = (('Y' << 24) | ('U' << 16) | ('Y' << 8) | ('V')),
93  rocDecVideoCodec_UYVY = (('U' << 24) | ('Y' << 16) | ('V' << 8) | ('Y'))
94 } rocDecVideoCodec;
95 
96 /*********************************************************************************/
101 /*********************************************************************************/
109 } rocDecVideoSurfaceFormat;
110 
111 /**************************************************************************************************************/
116 /**************************************************************************************************************/
122 } rocDecVideoChromaFormat;
123 
124 /*************************************************************************/
129 /*************************************************************************/
130 typedef enum rocDecodeStatus_enum {
131  rocDecodeStatus_Invalid = 0, // Decode status is not valid
132  rocDecodeStatus_InProgress = 1, // Decode is in progress
133  rocDecodeStatus_Success = 2, // Decode is completed without any errors
134  // 3 to 7 enums are reserved for future use
135  rocDecodeStatus_Error = 8, // Decode is completed with an error (error is not concealed)
136  rocDecodeStatus_Error_Concealed = 9, // Decode is completed with an error and error is concealed
137  rocDecodeStatus_Displaying = 10, // Decode is completed, displaying in progress
138 } rocDecDecodeStatus;
139 
140 /**************************************************************************************************************/
144 /**************************************************************************************************************/
145 typedef struct _RocdecDecodeCaps {
146  uint8_t device_id;
147  rocDecVideoCodec codec_type;
148  rocDecVideoChromaFormat chroma_format;
149  uint32_t bit_depth_minus_8;
150  uint32_t reserved_1[3];
151  uint8_t is_supported;
152  uint8_t num_decoders;
154  uint32_t max_width;
155  uint32_t max_height;
156  uint16_t min_width;
157  uint16_t min_height;
158  uint32_t reserved_2[6];
160 
161 /**************************************************************************************************************/
165 /**************************************************************************************************************/
166 typedef struct _RocDecoderCreateInfo {
167  uint8_t device_id;
169  uint32_t width;
170  uint32_t height;
172  rocDecVideoCodec codec_type;
173  rocDecVideoChromaFormat chroma_format;
174  uint32_t bit_depth_minus_8;
175  uint32_t intra_decode_only;
180  uint32_t max_width;
181  uint32_t max_height;
182  struct {
183  int16_t left;
184  int16_t top;
185  int16_t right;
186  int16_t bottom;
188  rocDecVideoSurfaceFormat output_format;
189  uint32_t target_width;
190  uint32_t target_height;
192  struct {
193  int16_t left;
194  int16_t top;
195  int16_t right;
196  int16_t bottom;
197  } target_rect;
199  uint32_t reserved_2[4];
201 
202 /*********************************************************************************************************/
207 /*********************************************************************************************************/
208 typedef struct _RocdecDecodeStatus {
209  rocDecDecodeStatus decode_status;
210  uint32_t reserved[31];
211  void *p_reserved[8];
213 
214 /****************************************************/
219 /****************************************************/
221  uint32_t width;
222  uint32_t height;
223  uint32_t target_width;
224  uint32_t target_height;
226  uint32_t reserved_1[12];
227  struct {
228  int16_t left;
229  int16_t top;
230  int16_t right;
231  int16_t bottom;
233  struct {
234  int16_t left;
235  int16_t top;
236  int16_t right;
237  int16_t bottom;
238  } target_rect;
240  uint32_t reserved_2[11];
242 
243 /*********************************************************/
248 /*********************************************************/
249 typedef struct _RocdecAvcPicture {
250  int pic_idx;
251  uint32_t frame_idx;
252  uint32_t flags;
255  uint32_t reserved[4];
257 
258 /* flags in RocdecAvcPicture could be OR of the following */
259 #define RocdecAvcPicture_FLAGS_INVALID 0x00000001
260 #define RocdecAvcPicture_FLAGS_TOP_FIELD 0x00000002
261 #define RocdecAvcPicture_FLAGS_BOTTOM_FIELD 0x00000004
262 #define RocdecAvcPicture_FLAGS_SHORT_TERM_REFERENCE 0x00000008
263 #define RocdecAvcPicture_FLAGS_LONG_TERM_REFERENCE 0x00000010
264 #define RocdecAvcPicture_FLAGS_NON_EXISTING 0x00000020
265 
266 /*********************************************************/
271 /*********************************************************/
272 typedef struct _RocdecHevcPicture {
273  int pic_idx;
276 
279  int poc;
280  uint32_t flags;
281  uint32_t reserved[4];
283 
284 /* flags in RocdecHevcPicture could be OR of the following */
285 #define RocdecHevcPicture_INVALID 0x00000001
289 #define RocdecHevcPicture_FIELD_PIC 0x00000002
294 #define RocdecHevcPicture_BOTTOM_FIELD 0x00000004
296 #define RocdecHevcPicture_LONG_TERM_REFERENCE 0x00000008
311 #define RocdecHevcPicture_RPS_ST_CURR_BEFORE 0x00000010
316 #define RocdecHevcPicture_RPS_ST_CURR_AFTER 0x00000020
321 #define RocdecHevcPicture_RPS_LT_CURR 0x00000040
322 
323 /***********************************************************/
328 /***********************************************************/
329 typedef struct _RocdecJPEGPicParams {
330  int reserved;
332 
333 /***********************************************************/
338 /***********************************************************/
339 typedef struct _RocdecMpeg2QMatrix {
340  int32_t load_intra_quantiser_matrix;
341  int32_t load_non_intra_quantiser_matrix;
342  int32_t load_chroma_intra_quantiser_matrix;
343  int32_t load_chroma_non_intra_quantiser_matrix;
344  uint8_t intra_quantiser_matrix[64];
345  uint8_t non_intra_quantiser_matrix[64];
346  uint8_t chroma_intra_quantiser_matrix[64];
347  uint8_t chroma_non_intra_quantiser_matrix[64];
349 
350 /***********************************************************/
355 /***********************************************************/
356 typedef struct _RocdecMpeg2PicParams {
357  uint16_t horizontal_size;
358  uint16_t vertical_size;
359  uint32_t forward_reference_pic; // surface_id for forward reference
360  uint32_t backward_reference_picture; // surface_id for backward reference
361  /* meanings of the following fields are the same as in the standard */
362  int32_t picture_coding_type;
363  int32_t f_code; /* pack all four fcode into this */
364  union {
365  struct {
366  uint32_t intra_dc_precision : 2;
367  uint32_t picture_structure : 2;
368  uint32_t top_field_first : 1;
369  uint32_t frame_pred_frame_dct : 1;
370  uint32_t concealment_motion_vectors : 1;
371  uint32_t q_scale_type : 1;
372  uint32_t intra_vlc_format : 1;
373  uint32_t alternate_scan : 1;
374  uint32_t repeat_first_field : 1;
375  uint32_t progressive_frame : 1;
376  uint32_t is_first_field : 1; // indicate whether the current field is the first field for field picture
377  } bits;
378  uint32_t value;
379  } picture_coding_extension;
380 
381  RocdecMpeg2QMatrix q_matrix;
382  uint32_t reserved[4];
384 
385 /***********************************************************/
390 /***********************************************************/
391 typedef struct _RocdecVc1PicParams {
392  int reserved;
394 
395 /***********************************************************/
401 /***********************************************************/
402 typedef struct _RocdecAvcPicParams {
403  RocdecAvcPicture curr_pic;
404  RocdecAvcPicture ref_frames[16]; /* in DPB */
405  uint16_t picture_width_in_mbs_minus1;
406  uint16_t picture_height_in_mbs_minus1;
407  uint8_t bit_depth_luma_minus8;
408  uint8_t bit_depth_chroma_minus8;
409  uint8_t num_ref_frames;
410  union {
411  struct {
412  uint32_t chroma_format_idc : 2;
413  uint32_t residual_colour_transform_flag : 1;
414  uint32_t gaps_in_frame_num_value_allowed_flag : 1;
415  uint32_t frame_mbs_only_flag : 1;
416  uint32_t mb_adaptive_frame_field_flag : 1;
417  uint32_t direct_8x8_inference_flag : 1;
418  uint32_t MinLumaBiPredSize8x8 : 1; /* see A.3.3.2 */
419  uint32_t log2_max_frame_num_minus4 : 4;
420  uint32_t pic_order_cnt_type : 2;
421  uint32_t log2_max_pic_order_cnt_lsb_minus4 : 4;
422  uint32_t delta_pic_order_always_zero_flag : 1;
423  } bits;
424  uint32_t value;
425  } seq_fields;
426 
427  // FMO/ASO
428  uint8_t num_slice_groups_minus1;
429  uint8_t slice_group_map_type;
430  uint16_t slice_group_change_rate_minus1;
431  int8_t pic_init_qp_minus26;
432  int8_t pic_init_qs_minus26;
433  int8_t chroma_qp_index_offset;
434  int8_t second_chroma_qp_index_offset;
435  union {
436  struct {
437  uint32_t entropy_coding_mode_flag : 1;
438  uint32_t weighted_pred_flag : 1;
439  uint32_t weighted_bipred_idc : 2;
440  uint32_t transform_8x8_mode_flag : 1;
441  uint32_t field_pic_flag : 1;
442  uint32_t constrained_intra_pred_flag : 1;
443  uint32_t pic_order_present_flag : 1;
444  uint32_t deblocking_filter_control_present_flag : 1;
445  uint32_t redundant_pic_cnt_present_flag : 1;
446  uint32_t reference_pic_flag : 1; /* nal_ref_idc != 0 */
447  } bits;
448  uint32_t value;
449  } pic_fields;
450  uint16_t frame_num;
451 
452  uint32_t reserved[8];
454 
455 /***********************************************************/
460 /***********************************************************/
461 typedef struct _RocdecAvcSliceParams {
462  uint32_t slice_data_size; // slice size in bytes
463  uint32_t slice_data_offset; // byte offset of the current slice in the slice data buffer
464  uint32_t slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
476  uint16_t first_mb_in_slice;
477  uint8_t slice_type;
478  uint8_t direct_spatial_mv_pred_flag;
479  uint8_t num_ref_idx_l0_active_minus1;
480  uint8_t num_ref_idx_l1_active_minus1;
481  uint8_t cabac_init_idc;
482  int8_t slice_qp_delta;
483  uint8_t disable_deblocking_filter_idc;
484  int8_t slice_alpha_c0_offset_div2;
485  int8_t slice_beta_offset_div2;
486  RocdecAvcPicture ref_pic_list_0[32]; // 8.2.4.2
487  RocdecAvcPicture ref_pic_list_1[32]; // 8.2.4.2
488  uint8_t luma_log2_weight_denom;
489  uint8_t chroma_log2_weight_denom;
490  uint8_t luma_weight_l0_flag;
491  int16_t luma_weight_l0[32];
492  int16_t luma_offset_l0[32];
493  uint8_t chroma_weight_l0_flag;
494  int16_t chroma_weight_l0[32][2];
495  int16_t chroma_offset_l0[32][2];
496  uint8_t luma_weight_l1_flag;
497  int16_t luma_weight_l1[32];
498  int16_t luma_offset_l1[32];
499  uint8_t chroma_weight_l1_flag;
500  int16_t chroma_weight_l1[32][2];
501  int16_t chroma_offset_l1[32][2];
502  uint32_t reserved[4];
504 
505 /***********************************************************/
510 /***********************************************************/
511 typedef struct _RocdecAvcIQMatrix {
513  uint8_t scaling_list_4x4[6][16];
515  uint8_t scaling_list_8x8[2][64];
517  uint32_t reserved[4];
519 
520 /***********************************************************/
525 /***********************************************************/
526 typedef struct _RocdecHevcPicParams {
527  RocdecHevcPicture curr_pic;
528  RocdecHevcPicture ref_frames[15]; /* reference frame list in DPB */
529  uint16_t picture_width_in_luma_samples;
530  uint16_t picture_height_in_luma_samples;
531  union {
532  struct {
534  uint32_t chroma_format_idc : 2;
535  uint32_t separate_colour_plane_flag : 1;
536  uint32_t pcm_enabled_flag : 1;
537  uint32_t scaling_list_enabled_flag : 1;
538  uint32_t transform_skip_enabled_flag : 1;
539  uint32_t amp_enabled_flag : 1;
540  uint32_t strong_intra_smoothing_enabled_flag : 1;
541  uint32_t sign_data_hiding_enabled_flag : 1;
542  uint32_t constrained_intra_pred_flag : 1;
543  uint32_t cu_qp_delta_enabled_flag : 1;
544  uint32_t weighted_pred_flag : 1;
545  uint32_t weighted_bipred_flag : 1;
546  uint32_t transquant_bypass_enabled_flag : 1;
547  uint32_t tiles_enabled_flag : 1;
548  uint32_t entropy_coding_sync_enabled_flag : 1;
549  uint32_t pps_loop_filter_across_slices_enabled_flag : 1;
550  uint32_t loop_filter_across_tiles_enabled_flag : 1;
551  uint32_t pcm_loop_filter_disabled_flag : 1;
555  uint32_t no_bi_pred_flag : 1;
556  uint32_t reserved_bits : 11;
557  } bits;
558  uint32_t value;
559  } pic_fields;
560 
563  uint8_t bit_depth_luma_minus8;
564  uint8_t bit_depth_chroma_minus8;
565  uint8_t pcm_sample_bit_depth_luma_minus1;
566  uint8_t pcm_sample_bit_depth_chroma_minus1;
567  uint8_t log2_min_luma_coding_block_size_minus3;
568  uint8_t log2_diff_max_min_luma_coding_block_size;
569  uint8_t log2_min_transform_block_size_minus2;
570  uint8_t log2_diff_max_min_transform_block_size;
571  uint8_t log2_min_pcm_luma_coding_block_size_minus3;
572  uint8_t log2_diff_max_min_pcm_luma_coding_block_size;
573  uint8_t max_transform_hierarchy_depth_intra;
574  uint8_t max_transform_hierarchy_depth_inter;
575  int8_t init_qp_minus26;
576  uint8_t diff_cu_qp_delta_depth;
577  int8_t pps_cb_qp_offset;
578  int8_t pps_cr_qp_offset;
579  uint8_t log2_parallel_merge_level_minus2;
580  uint8_t num_tile_columns_minus1;
581  uint8_t num_tile_rows_minus1;
586  uint16_t column_width_minus1[19];
587  uint16_t row_height_minus1[21];
588 
589  union {
590  struct {
593  uint32_t long_term_ref_pics_present_flag : 1;
594  uint32_t sps_temporal_mvp_enabled_flag : 1;
595  uint32_t cabac_init_present_flag : 1;
596  uint32_t output_flag_present_flag : 1;
597  uint32_t dependent_slice_segments_enabled_flag : 1;
598  uint32_t pps_slice_chroma_qp_offsets_present_flag : 1;
599  uint32_t sample_adaptive_offset_enabled_flag : 1;
600  uint32_t deblocking_filter_override_enabled_flag : 1;
601  uint32_t pps_disable_deblocking_filter_flag : 1;
602  uint32_t slice_segment_header_extension_present_flag : 1;
603 
605  uint32_t rap_pic_flag : 1;
607  uint32_t idr_pic_flag : 1;
609  uint32_t intra_pic_flag : 1;
610 
611  uint32_t reserved_bits : 18;
612  } bits;
613  uint32_t value;
614  } slice_parsing_fields;
615 
618  uint8_t num_short_term_ref_pic_sets;
619  uint8_t num_long_term_ref_pic_sps;
620  uint8_t num_ref_idx_l0_default_active_minus1;
621  uint8_t num_ref_idx_l1_default_active_minus1;
622  int8_t pps_beta_offset_div2;
623  int8_t pps_tc_offset_div2;
624  uint8_t num_extra_slice_header_bits;
635  uint32_t st_rps_bits;
636  uint32_t reserved[8];
638 
639 /***********************************************************/
644 /***********************************************************/
645 typedef struct _RocdecHevcSliceParams {
649  uint32_t slice_data_size;
653  uint32_t slice_data_flag;
672  uint8_t ref_pic_list[2][15];
673  union {
674  uint32_t value;
675  struct {
677  uint32_t last_slice_of_pic : 1;
680  uint32_t slice_type : 2;
681  uint32_t color_plane_id : 2;
682  uint32_t slice_sao_luma_flag : 1;
683  uint32_t slice_sao_chroma_flag : 1;
684  uint32_t mvd_l1_zero_flag : 1;
685  uint32_t cabac_init_flag : 1;
686  uint32_t slice_temporal_mvp_enabled_flag : 1;
687  uint32_t slice_deblocking_filter_disabled_flag : 1;
688  uint32_t collocated_from_l0_flag : 1;
689  uint32_t slice_loop_filter_across_slices_enabled_flag : 1;
690  uint32_t reserved : 18;
691  } fields;
692  } long_slice_flags;
693 
696  uint8_t num_ref_idx_l0_active_minus1;
697  uint8_t num_ref_idx_l1_active_minus1;
698  int8_t slice_qp_delta;
699  int8_t slice_cb_qp_offset;
700  int8_t slice_cr_qp_offset;
701  int8_t slice_beta_offset_div2;
702  int8_t slice_tc_offset_div2;
703  uint8_t luma_log2_weight_denom;
704  int8_t delta_chroma_log2_weight_denom;
705  int8_t delta_luma_weight_l0[15];
706  int8_t luma_offset_l0[15];
707  int8_t delta_chroma_weight_l0[15][2];
709  int8_t chroma_offset_l0[15][2];
712  int8_t luma_offset_l1[15];
713  int8_t delta_chroma_weight_l1[15][2];
715  int8_t chroma_offset_l1[15][2];
718  uint16_t num_entry_point_offsets;
719  uint16_t entry_offset_to_subset_array;
722 
723  uint32_t reserved[2];
725 
726 /***********************************************************/
735 /***********************************************************/
736 typedef struct _RocdecHevcIQMatrix {
742  uint8_t scaling_list_4x4[6][16];
748  uint8_t scaling_list_8x8[6][64];
754  uint8_t scaling_list_16x16[6][64];
760  uint8_t scaling_list_32x32[2][64];
775  uint32_t reserved[4];
777 
781  union {
782  struct {
790  uint32_t enabled : 1;
796  uint32_t update_map : 1;
802  uint32_t temporal_update : 1;
808  uint32_t update_data : 1;
809 
811  uint32_t reserved : 28;
812  } bits;
813  uint32_t value;
814  } segment_info_fields;
815 
837  int16_t feature_data[8][8];
838 
844  uint8_t feature_mask[8];
845 
847  uint32_t reserved[4];
849 
853  union {
854  struct {
859  uint32_t apply_grain : 1;
860  uint32_t chroma_scaling_from_luma : 1;
861  uint32_t grain_scaling_minus_8 : 2;
862  uint32_t ar_coeff_lag : 2;
863  uint32_t ar_coeff_shift_minus_6 : 2;
864  uint32_t grain_scale_shift : 2;
865  uint32_t overlap_flag : 1;
866  uint32_t clip_to_restricted_range : 1;
868  uint32_t reserved : 20;
869  } bits;
870  uint32_t value;
871  } film_grain_info_fields;
872 
873  uint16_t grain_seed;
874  /* value range [0..14] */
875  uint8_t num_y_points;
876  uint8_t point_y_value[14];
877  uint8_t point_y_scaling[14];
878  /* value range [0..10] */
879  uint8_t num_cb_points;
880  uint8_t point_cb_value[10];
881  uint8_t point_cb_scaling[10];
882  /* value range [0..10] */
883  uint8_t num_cr_points;
884  uint8_t point_cr_value[10];
885  uint8_t point_cr_scaling[10];
886  /* value range [-128..127] */
887  int8_t ar_coeffs_y[24];
888  int8_t ar_coeffs_cb[25];
889  int8_t ar_coeffs_cr[25];
890  uint8_t cb_mult;
891  uint8_t cb_luma_mult;
892  uint16_t cb_offset;
893  uint8_t cr_mult;
894  uint8_t cr_luma_mult;
895  uint16_t cr_offset;
896 
898  uint32_t reserved[4];
900 
901 typedef enum {
913 
917 
923  int32_t wmmat[8];
924 
925  /* valid or invalid on affine set */
926  uint8_t invalid;
927 
929  uint32_t reserved[4];
931 
932 /***********************************************************/
937 /***********************************************************/
938 typedef struct _RocdecAV1PicParams {
944  uint8_t profile;
945 
946  uint8_t order_hint_bits_minus_1;
947 
954  uint8_t bit_depth_idx;
955 
958 
959  union {
960  struct {
961  uint32_t still_picture : 1;
962  uint32_t use_128x128_superblock : 1;
963  uint32_t enable_filter_intra : 1;
964  uint32_t enable_intra_edge_filter : 1;
965 
968  uint32_t enable_masked_compound : 1;
969 
970  uint32_t enable_dual_filter : 1;
971  uint32_t enable_order_hint : 1;
972  uint32_t enable_jnt_comp : 1;
973  uint32_t enable_cdef : 1;
974  uint32_t mono_chrome : 1;
975  uint32_t color_range : 1;
976  uint32_t subsampling_x : 1;
977  uint32_t subsampling_y : 1;
978  uint32_t chroma_sample_position : 1;
979  uint32_t film_grain_params_present : 1;
981  uint32_t reserved : 16;
982  } fields;
983  uint32_t value;
984  } seq_info_fields;
985 
992 
998 
1004 
1024 
1031  uint16_t frame_height_minus1;
1032 
1038  uint16_t output_frame_height_in_tiles_minus_1;
1039 
1050 
1061  uint8_t ref_frame_idx[7];
1062 
1071  uint8_t order_hint;
1072 
1073  RocdecAv1SegmentationStruct seg_info;
1074  RocdecAv1FilmGrainStruct film_grain_info;
1075 
1081  uint8_t tile_cols;
1082  uint8_t tile_rows;
1083 
1084  /* The width/height of a tile minus 1 in units of superblocks. Though the
1085  * maximum number of tiles is 64, since ones of the last tile are computed
1086  * from ones of the other tiles and frame_width/height, they are not
1087  * necessarily specified.
1088  */
1089  uint16_t width_in_sbs_minus_1[63];
1090  uint16_t height_in_sbs_minus_1[63];
1091 
1097 
1098  /* specify the tile index for context updating */
1099  uint16_t context_update_tile_id;
1100 
1101  union {
1102  struct {
1116  uint32_t frame_type : 2;
1117  uint32_t show_frame : 1;
1118  uint32_t showable_frame : 1;
1119  uint32_t error_resilient_mode : 1;
1120  uint32_t disable_cdf_update : 1;
1121  uint32_t allow_screen_content_tools : 1;
1122  uint32_t force_integer_mv : 1;
1123  uint32_t allow_intrabc : 1;
1124  uint32_t use_superres : 1;
1125  uint32_t allow_high_precision_mv : 1;
1126  uint32_t is_motion_mode_switchable : 1;
1127  uint32_t use_ref_frame_mvs : 1;
1128  /* disable_frame_end_update_cdf is coded as refresh_frame_context. */
1129  uint32_t disable_frame_end_update_cdf : 1;
1130  uint32_t uniform_tile_spacing_flag : 1;
1131  uint32_t allow_warped_motion : 1;
1133  uint32_t large_scale_tile : 1;
1134 
1136  uint32_t reserved : 15;
1137  } bits;
1138  uint32_t value;
1139  } pic_info_fields;
1140 
1146 
1150  uint8_t interp_filter;
1151 
1155  uint8_t filter_level[2];
1156 
1161  uint8_t filter_level_v;
1162 
1163  union {
1164  struct {
1168  uint8_t sharpness_level : 3;
1169  uint8_t mode_ref_delta_enabled : 1;
1170  uint8_t mode_ref_delta_update : 1;
1171 
1173  uint8_t reserved : 3;
1174  } bits;
1175  uint8_t value;
1176  } loop_filter_info_fields;
1177 
1182  int8_t ref_deltas[8];
1183 
1188  int8_t mode_deltas[2];
1189 
1195  uint8_t base_qindex;
1216 
1219  union {
1220  struct {
1221  uint16_t using_qmatrix : 1;
1226  uint16_t qm_y : 4;
1227  uint16_t qm_u : 4;
1228  uint16_t qm_v : 4;
1229 
1231  uint16_t reserved : 3;
1232  } bits;
1233  uint16_t value;
1235 
1236  union {
1237  struct {
1240  uint32_t delta_q_present_flag : 1;
1241  uint32_t log2_delta_q_res : 2;
1242 
1246  uint32_t log2_delta_lf_res : 2;
1247 
1250  uint32_t delta_lf_multi : 1;
1251 
1255  uint32_t tx_mode : 2;
1256 
1257  /* AV1 frame reference mode semantic */
1258  uint32_t reference_select : 1;
1259 
1260  uint32_t reduced_tx_set_used : 1;
1261 
1262  uint32_t skip_mode_present : 1;
1263 
1265  uint32_t reserved : 20;
1266  } bits;
1267  uint32_t value;
1268  } mode_control_fields;
1269 
1272  /* value range [0..3] */
1274  /* value range [0..3] */
1275  uint8_t cdef_bits;
1276 
1291  /* value range [0..63] */
1292  uint8_t cdef_y_strengths[8];
1293  /* value range [0..63] */
1294  uint8_t cdef_uv_strengths[8];
1295 
1298  union {
1299  struct {
1300  uint16_t yframe_restoration_type : 2;
1301  uint16_t cbframe_restoration_type : 2;
1302  uint16_t crframe_restoration_type : 2;
1303  uint16_t lr_unit_shift : 2;
1304  uint16_t lr_uv_shift : 1;
1305 
1307  uint16_t reserved : 7;
1308  } bits;
1309  uint16_t value;
1311 
1315 
1319  uint32_t reserved[8];
1321 
1322 /***********************************************************/
1330 /***********************************************************/
1331 typedef struct _RocdecAv1SliceParams {
1346 
1347  uint16_t tile_row;
1348  uint16_t tile_column;
1349 
1356 
1362 
1364  uint32_t reserved[4];
1366 
1367 /******************************************************************************************/
1373 /******************************************************************************************/
1374 typedef struct _RocdecPicParams {
1381  // Bitstream data
1383  const uint8_t *bitstream_data;
1384  uint32_t num_slices;
1388  uint32_t reserved[30];
1390  // IN: Codec-specific data
1391  union {
1393  RocdecAvcPicParams avc;
1394  RocdecHevcPicParams hevc;
1395  RocdecVc1PicParams vc1;
1396  RocdecJPEGPicParams jpeg;
1397  RocdecAv1PicParams av1;
1398  uint32_t codec_reserved[256];
1399  } pic_params;
1400 
1403  union {
1404  // Todo: Add slice params defines for other codecs.
1405  RocdecAvcSliceParams *avc;
1406  RocdecHevcSliceParams *hevc;
1407  RocdecAv1SliceParams *av1;
1409 
1410  union {
1411  // Todo: Added IQ matrix defines for other codecs.
1412  RocdecAvcIQMatrix avc;
1413  RocdecHevcIQMatrix hevc;
1414  } iq_matrix;
1415 } RocdecPicParams;
1416 
1417 /******************************************************/
1422 /******************************************************/
1423 typedef struct _RocdecProcParams {
1426  uint32_t reserved_flags[2];
1428  // The fields below are used for raw YUV input
1429  uint64_t raw_input_dptr;
1430  uint32_t raw_input_pitch;
1431  uint32_t raw_input_format;
1432  uint64_t raw_output_dptr;
1433  uint32_t raw_output_pitch;
1435  uint32_t reserved[16];
1437 
1438 /*****************************************************************************************************/
1442 /*****************************************************************************************************/
1443 extern rocDecStatus ROCDECAPI rocDecCreateDecoder(rocDecDecoderHandle *decoder_handle, RocDecoderCreateInfo *decoder_create_info);
1444 
1445 /*****************************************************************************************************/
1449 /*****************************************************************************************************/
1450 extern rocDecStatus ROCDECAPI rocDecDestroyDecoder(rocDecDecoderHandle decoder_handle);
1451 
1452 /**********************************************************************************************************************/
1459 /**********************************************************************************************************************/
1460 extern rocDecStatus ROCDECAPI rocDecGetDecoderCaps(RocdecDecodeCaps *decode_caps);
1461 
1462 /*****************************************************************************************************/
1467 /*****************************************************************************************************/
1468 extern rocDecStatus ROCDECAPI rocDecDecodeFrame(rocDecDecoderHandle decoder_handle, RocdecPicParams *pic_params);
1469 
1470 /************************************************************************************************************/
1476 /************************************************************************************************************/
1477 extern rocDecStatus ROCDECAPI rocDecGetDecodeStatus(rocDecDecoderHandle decoder_handle, int pic_idx, RocdecDecodeStatus *decode_status);
1478 
1479 /*********************************************************************************************************/
1484 /*********************************************************************************************************/
1485 extern rocDecStatus ROCDECAPI rocDecReconfigureDecoder(rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params);
1486 
1487 /************************************************************************************************************************/
1494 /************************************************************************************************************************/
1495 extern rocDecStatus ROCDECAPI rocDecGetVideoFrame(rocDecDecoderHandle decoder_handle, int pic_idx,
1496  void *dev_mem_ptr[3], uint32_t (&horizontal_pitch)[3],
1497  RocdecProcParams *vid_postproc_params);
1498 
1499 /*****************************************************************************************************/
1503 /*****************************************************************************************************/
1504 extern const char *ROCDECAPI rocDecGetErrorName(rocDecStatus rocdec_status);
1505 
1506 #ifdef __cplusplus
1507 }
1508 #endif
rocDecStatus ROCDECAPI rocDecCreateDecoder(rocDecDecoderHandle *decoder_handle, RocDecoderCreateInfo *decoder_create_info)
rocDecStatus ROCDECAPI rocDecReconfigureDecoder(rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params)
int poc
picture order count. ! in HEVC, POCs for top and bottom fields of same picture should take different ...
Definition: rocdecode.h:279
rocDecStatus ROCDECAPI rocDecDecodeFrame(rocDecDecoderHandle decoder_handle, RocdecPicParams *pic_params)
rocDecStatus ROCDECAPI rocDecDestroyDecoder(rocDecDecoderHandle decoder_handle)
const char *ROCDECAPI rocDecGetErrorName(rocDecStatus rocdec_status)
rocDecStatus ROCDECAPI rocDecGetDecodeStatus(rocDecDecoderHandle decoder_handle, int pic_idx, RocdecDecodeStatus *decode_status)
rocDecVideoCodec_enum
Definition: rocdecode.h:77
@ rocDecVideoCodec_NV12
Definition: rocdecode.h:91
@ rocDecVideoCodec_YV12
Definition: rocdecode.h:90
@ rocDecVideoCodec_YUV420
Definition: rocdecode.h:89
@ rocDecVideoCodec_UYVY
Definition: rocdecode.h:93
@ rocDecVideoCodec_YUYV
Definition: rocdecode.h:92
@ rocDecVideoCodec_AV1
Definition: rocdecode.h:83
@ rocDecVideoCodec_MPEG4
Definition: rocdecode.h:80
@ rocDecVideoCodec_HEVC
Definition: rocdecode.h:82
@ rocDecVideoCodec_MPEG1
Definition: rocdecode.h:78
@ rocDecVideoCodec_JPEG
Definition: rocdecode.h:86
@ rocDecVideoCodec_VP9
Definition: rocdecode.h:85
@ rocDecVideoCodec_AVC
Definition: rocdecode.h:81
@ rocDecVideoCodec_MPEG2
Definition: rocdecode.h:79
@ rocDecVideoCodec_VP8
Definition: rocdecode.h:84
@ rocDecVideoCodec_NumCodecs
Definition: rocdecode.h:87
struct _RocdecAv1SegmentationStruct RocdecAv1SegmentationStruct
Segmentation Information for AV1.
rocDecVideoSurfaceFormat_enum
Definition: rocdecode.h:102
@ rocDecVideoSurfaceFormat_YUV444_16Bit
Definition: rocdecode.h:107
@ rocDecVideoSurfaceFormat_P016
Definition: rocdecode.h:104
@ rocDecVideoSurfaceFormat_NV12
Definition: rocdecode.h:103
@ rocDecVideoSurfaceFormat_YUV444
Definition: rocdecode.h:106
struct _RocdecAv1FilmGrainStruct RocdecAv1FilmGrainStruct
Film Grain Information for AV1.
void * rocDecDecoderHandle
Definition: rocdecode.h:51
rocDecVideoChromaFormat_enum
Definition: rocdecode.h:117
@ rocDecVideoChromaFormat_422
Definition: rocdecode.h:120
@ rocDecVideoChromaFormat_444
Definition: rocdecode.h:121
@ rocDecVideoChromaFormat_420
Definition: rocdecode.h:119
@ rocDecVideoChromaFormat_Monochrome
Definition: rocdecode.h:118
RocdecAv1TransformationType
Definition: rocdecode.h:901
@ RocdecAv1TransformationTranslation
Definition: rocdecode.h:905
@ RocdecAv1TransformationAffine
Definition: rocdecode.h:909
@ RocdecAv1TransformationCount
Definition: rocdecode.h:911
@ RocdecAv1TransformationRotzoom
Definition: rocdecode.h:907
@ RocdecAv1TransformationIdentity
Definition: rocdecode.h:903
Definition: rocdecode.h:166
uint32_t height
Definition: rocdecode.h:170
uint32_t width
Definition: rocdecode.h:169
uint32_t target_width
Definition: rocdecode.h:189
uint32_t max_height
Definition: rocdecode.h:181
uint32_t bit_depth_minus_8
Definition: rocdecode.h:174
uint32_t num_output_surfaces
Definition: rocdecode.h:191
uint8_t device_id
Definition: rocdecode.h:167
struct _RocDecoderCreateInfo::@1 target_rect
rocDecVideoChromaFormat chroma_format
Definition: rocdecode.h:173
uint32_t num_decode_surfaces
Definition: rocdecode.h:171
rocDecVideoCodec codec_type
Definition: rocdecode.h:172
uint32_t max_width
Definition: rocdecode.h:180
rocDecVideoSurfaceFormat output_format
Definition: rocdecode.h:188
uint32_t target_height
Definition: rocdecode.h:190
struct _RocDecoderCreateInfo::@0 display_rect
uint32_t intra_decode_only
Definition: rocdecode.h:175
uint32_t reserved_2[4]
Definition: rocdecode.h:199
Definition: rocdecode.h:938
int8_t u_ac_delta_q
U AC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1207
uint8_t filter_level_u
chroma loop filter levels. value range [0..63].
Definition: rocdecode.h:1160
int ref_frame_map[8]
Surface indices of reference frames in DPB.
Definition: rocdecode.h:1049
uint8_t tile_cols
tile structure When uniform_tile_spacing_flag == 1, width_in_sbs_minus_1[] and height_in_sbs_minus_1[...
Definition: rocdecode.h:1081
uint8_t matrix_coefficients
corresponds to AV1 spec variable of the same name.
Definition: rocdecode.h:957
uint8_t sharpness_level
flags for reference pictures same syntax and semantic as those in AV1 code
Definition: rocdecode.h:1168
int8_t u_dc_delta_q
U DC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1203
uint16_t qm_y
qm level value range [0..15] Invalid if using_qmatrix equals 0.
Definition: rocdecode.h:1226
int8_t ref_deltas[8]
The adjustment needed for the filter level based on the chosen reference frame. value range [-64....
Definition: rocdecode.h:1182
uint8_t bit_depth_idx
bit depth index value range [0..2] 0 - bit depth 8; 1 - bit depth 10; 2 - bit depth 12;
Definition: rocdecode.h:954
uint32_t tx_mode
read_tx_mode value range [0..2]
Definition: rocdecode.h:1255
uint16_t frame_width_minus1
Picture resolution minus 1 Picture original resolution. If SuperRes is enabled, this is the upscaled ...
Definition: rocdecode.h:1030
union _RocdecAV1PicParams::@25 loop_restoration_fields
loop restoration parameters
uint8_t anchor_frames_num
number of anchor frames for large scale tile This parameter gives the number of entries of anchor_fra...
Definition: rocdecode.h:1003
uint8_t cdef_y_strengths[8]
Definition: rocdecode.h:1292
int8_t v_ac_delta_q
V AC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1215
int8_t v_dc_delta_q
V DC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1211
uint8_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1173
uint8_t primary_ref_frame
primary reference frame index Index into ref_frame_idx[], specifying which reference frame contains p...
Definition: rocdecode.h:1070
uint32_t enable_interintra_compound
Definition: rocdecode.h:967
int current_frame
Picture level information.
Definition: rocdecode.h:991
uint8_t cdef_damping_minus_3
CDEF parameters.
Definition: rocdecode.h:1273
uint8_t profile
sequence level information
Definition: rocdecode.h:944
uint8_t ref_frame_idx[7]
Reference frame indices.
Definition: rocdecode.h:1061
uint8_t filter_level[2]
luma loop filter levels. value range [0..63].
Definition: rocdecode.h:1155
uint16_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1231
union _RocdecAV1PicParams::@23 qmatrix_fields
quantization_matrix
uint32_t delta_q_present_flag
delta_q parameters
Definition: rocdecode.h:1240
uint16_t output_frame_width_in_tiles_minus_1
Output frame buffer size in unit of tiles Valid only when large_scale_tile equals 1....
Definition: rocdecode.h:1037
uint32_t large_scale_tile
indicate if current frame in large scale tile mode
Definition: rocdecode.h:1133
int8_t mode_deltas[2]
The adjustment needed for the filter level based on the chosen mode. value range [-64....
Definition: rocdecode.h:1188
uint8_t superres_scale_denominator
Supper resolution scale denominator. When use_superres=1, superres_scale_denominator must be in the r...
Definition: rocdecode.h:1145
uint32_t frame_type
flags for current picture same syntax and semantic as those in AV1 code
Definition: rocdecode.h:1116
uint32_t delta_lf_multi
CONFIG_LOOPFILTER_LEVEL.
Definition: rocdecode.h:1250
uint32_t delta_lf_present_flag
delta_lf parameters
Definition: rocdecode.h:1245
uint8_t base_qindex
quantization
Definition: rocdecode.h:1195
RocdecAv1WarpedMotionParams wm[7]
global motion
Definition: rocdecode.h:1314
int8_t y_dc_delta_q
Y DC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1199
int current_display_picture
display buffer of current picture Used for film grain applied decoded picture. Valid only when apply_...
Definition: rocdecode.h:997
uint8_t interp_filter
Interpolation filter. value range [0..4].
Definition: rocdecode.h:1150
int * anchor_frames_list
anchor frame list for large scale tile For large scale tile applications, the anchor frames could com...
Definition: rocdecode.h:1023
uint16_t tile_count_minus_1
number of tiles minus 1 in large scale tile list Same as AV1 semantic element. Valid only when large_...
Definition: rocdecode.h:1096
uint32_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:981
Film Grain Information for AV1.
Definition: rocdecode.h:852
uint32_t apply_grain
Specify whether or not film grain is applied on current frame. If set to 0, all the rest parameters s...
Definition: rocdecode.h:859
uint32_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:868
Segmentation Information for AV1.
Definition: rocdecode.h:780
uint32_t enabled
Definition: rocdecode.h:790
uint32_t temporal_update
Definition: rocdecode.h:802
int16_t feature_data[8][8]
Segmentation parameters for current frame. feature_data[segment_id][feature_id] where segment_id has ...
Definition: rocdecode.h:837
uint32_t update_map
Definition: rocdecode.h:796
uint32_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:811
uint32_t update_data
Definition: rocdecode.h:808
uint8_t feature_mask[8]
indicates if a feature is enabled or not. Each bit field itself is the feature_id....
Definition: rocdecode.h:844
Definition: rocdecode.h:1331
uint32_t slice_data_flag
Definition: rocdecode.h:1345
uint8_t anchor_frame_idx
anchor frame index for large scale tile. index into an array AnchorFrames of the frames that the tile...
Definition: rocdecode.h:1355
uint32_t slice_data_size
The byte count of current tile in the bitstream buffer, starting from first byte of the buffer....
Definition: rocdecode.h:1337
uint16_t tile_idx_in_tile_list
tile index in the tile list. Valid only when large_scale_tile is enabled. Driver uses this field to d...
Definition: rocdecode.h:1361
uint32_t slice_data_offset
Definition: rocdecode.h:1341
uint32_t reserved[4]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1364
Definition: rocdecode.h:914
RocdecAv1TransformationType wmtype
Specify the type of warped motion.
Definition: rocdecode.h:916
int32_t wmmat[8]
Specify warp motion parameters wm.wmmat[] corresponds to gm_params[][] in spec. Details in AV1 spec s...
Definition: rocdecode.h:923
uint32_t reserved[4]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:929
Definition: rocdecode.h:511
uint8_t scaling_list_8x8[2][64]
8x8 scaling list, in raster scan order.
Definition: rocdecode.h:515
uint32_t reserved[4]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:517
uint8_t scaling_list_4x4[6][16]
4x4 scaling list, in raster scan order.
Definition: rocdecode.h:513
Definition: rocdecode.h:402
Definition: rocdecode.h:249
int32_t top_field_order_cnt
Definition: rocdecode.h:253
int pic_idx
Definition: rocdecode.h:250
uint32_t flags
Definition: rocdecode.h:252
int32_t bottom_field_order_cnt
Definition: rocdecode.h:254
uint32_t frame_idx
Definition: rocdecode.h:251
Definition: rocdecode.h:461
uint16_t slice_data_bit_offset
Bit offset from NAL Header Unit to the begining of slice_data().
Definition: rocdecode.h:475
Definition: rocdecode.h:145
uint16_t min_width
Definition: rocdecode.h:156
uint32_t reserved_1[3]
Definition: rocdecode.h:150
uint32_t reserved_2[6]
Definition: rocdecode.h:158
uint8_t num_decoders
Definition: rocdecode.h:152
rocDecVideoCodec codec_type
Definition: rocdecode.h:147
uint8_t device_id
Definition: rocdecode.h:146
uint16_t min_height
Definition: rocdecode.h:157
uint32_t max_width
Definition: rocdecode.h:154
rocDecVideoChromaFormat chroma_format
Definition: rocdecode.h:148
uint16_t output_format_mask
Definition: rocdecode.h:153
uint8_t is_supported
Definition: rocdecode.h:151
uint32_t max_height
Definition: rocdecode.h:155
uint32_t bit_depth_minus_8
Definition: rocdecode.h:149
Definition: rocdecode.h:208
Definition: rocdecode.h:736
uint8_t scaling_list_8x8[6][64]
8x8 scaling, correspongs i = 1, MatrixID is in the range of 0 to 5, inclusive. And j is in the range ...
Definition: rocdecode.h:748
uint8_t scaling_list_4x4[6][16]
4x4 scaling, correspongs i = 0, MatrixID is in the range of 0 to 5, inclusive. And j is in the range ...
Definition: rocdecode.h:742
uint8_t scaling_list_dc_32x32[2]
DC values of the 32x32 scaling lists, corresponds to HEVC spec syntax scaling_list_dc_coef_minus8[ si...
Definition: rocdecode.h:774
uint8_t scaling_list_16x16[6][64]
16x16 scaling, correspongs i = 2, MatrixID is in the range of 0 to 5, inclusive. And j is in the rang...
Definition: rocdecode.h:754
uint8_t scaling_list_dc_16x16[6]
DC values of the 16x16 scaling lists, corresponds to HEVC spec syntax scaling_list_dc_coef_minus8[ si...
Definition: rocdecode.h:767
uint8_t scaling_list_32x32[2][64]
32x32 scaling, correspongs i = 3, MatrixID is in the range of 0 to 1, inclusive. And j is in the rang...
Definition: rocdecode.h:760
Definition: rocdecode.h:526
uint16_t column_width_minus1[19]
Definition: rocdecode.h:586
uint32_t idr_pic_flag
Definition: rocdecode.h:607
uint32_t chroma_format_idc
Definition: rocdecode.h:534
uint32_t st_rps_bits
number of bits that structure short_term_ref_pic_set( num_short_term_ref_pic_sets ) takes in slice se...
Definition: rocdecode.h:635
uint32_t no_bi_pred_flag
Definition: rocdecode.h:555
uint32_t intra_pic_flag
Definition: rocdecode.h:609
uint8_t sps_max_dec_pic_buffering_minus1
Definition: rocdecode.h:562
uint32_t no_pic_reordering_flag
Definition: rocdecode.h:553
uint32_t lists_modification_present_flag
Definition: rocdecode.h:592
uint32_t rap_pic_flag
Definition: rocdecode.h:605
uint8_t log2_max_pic_order_cnt_lsb_minus4
Definition: rocdecode.h:617
Definition: rocdecode.h:272
uint32_t flags
Definition: rocdecode.h:280
int pic_idx
Definition: rocdecode.h:273
uint32_t reserved[4]
Definition: rocdecode.h:281
Definition: rocdecode.h:645
uint32_t slice_segment_address
Definition: rocdecode.h:666
uint32_t slice_data_flag
Slice data buffer flags. See VA_SLICE_DATA_FLAG_XXX.
Definition: rocdecode.h:653
uint8_t five_minus_max_num_merge_cand
Definition: rocdecode.h:717
uint32_t slice_data_offset
The offset to the NAL unit header for this slice.
Definition: rocdecode.h:651
uint32_t last_slice_of_pic
Definition: rocdecode.h:677
uint32_t slice_data_size
Number of bytes in the slice data buffer for this slice counting from and including NAL unit header.
Definition: rocdecode.h:649
int8_t delta_luma_weight_l1[15]
Definition: rocdecode.h:711
int8_t chroma_offset_l1[15][2]
Definition: rocdecode.h:715
int8_t chroma_offset_l0[15][2]
Definition: rocdecode.h:709
uint16_t slice_data_num_emu_prevn_bytes
Number of emulation prevention bytes in slice header.
Definition: rocdecode.h:721
uint8_t collocated_ref_idx
Definition: rocdecode.h:695
uint8_t ref_pic_list[2][15]
index into ReferenceFrames[] ref_pic_list[0][] corresponds to RefPicList0[] of HEVC variable....
Definition: rocdecode.h:672
uint32_t dependent_slice_segment_flag
Definition: rocdecode.h:679
uint32_t slice_data_byte_offset
Byte offset from NAL unit header to the begining of slice_data().
Definition: rocdecode.h:664
Definition: rocdecode.h:329
Definition: rocdecode.h:356
Definition: rocdecode.h:339
Definition: rocdecode.h:1374
uint32_t reserved[30]
Definition: rocdecode.h:1388
RocdecMpeg2PicParams mpeg2
Definition: rocdecode.h:1392
int bottom_field_flag
Definition: rocdecode.h:1379
int intra_pic_flag
Definition: rocdecode.h:1387
int pic_height
Definition: rocdecode.h:1376
union _RocdecPicParams::@33 slice_params
Variable size array. The user should allocate one slice param struct for each slice.
int ref_pic_flag
Definition: rocdecode.h:1386
const uint8_t * bitstream_data
Definition: rocdecode.h:1383
uint32_t num_slices
Definition: rocdecode.h:1384
int curr_pic_idx
Definition: rocdecode.h:1377
int field_pic_flag
Definition: rocdecode.h:1378
uint32_t bitstream_data_len
Definition: rocdecode.h:1382
int second_field
Definition: rocdecode.h:1380
int pic_width
Definition: rocdecode.h:1375
Definition: rocdecode.h:1423
uint32_t raw_input_format
Definition: rocdecode.h:1431
uint64_t raw_output_dptr
Definition: rocdecode.h:1432
uint32_t raw_output_pitch
Definition: rocdecode.h:1433
int progressive_frame
Definition: rocdecode.h:1424
uint64_t raw_input_dptr
Definition: rocdecode.h:1429
uint32_t reserved_flags[2]
Definition: rocdecode.h:1426
uint32_t raw_input_pitch
Definition: rocdecode.h:1430
uint32_t raw_output_format
Definition: rocdecode.h:1434
uint32_t reserved[16]
Definition: rocdecode.h:1435
int top_field_first
Definition: rocdecode.h:1425
Definition: rocdecode.h:220
uint32_t target_width
Definition: rocdecode.h:223
struct _RocdecReconfigureDecoderInfo::@3 target_rect
uint32_t num_decode_surfaces
Definition: rocdecode.h:225
uint32_t height
Definition: rocdecode.h:222
uint32_t width
Definition: rocdecode.h:221
struct _RocdecReconfigureDecoderInfo::@2 display_rect
uint32_t reserved_1[12]
Definition: rocdecode.h:226
uint32_t reserved_2[11]
Definition: rocdecode.h:240
uint32_t target_height
Definition: rocdecode.h:224
Definition: rocdecode.h:391