docs-7.0.0/api/rocdecode/rocdecode.h Source File

docs-7.0.0/api/rocdecode/rocdecode.h Source File#

rocDecode: docs-7.0.0/api/rocdecode/rocdecode.h Source File
rocdecode.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2023 - 2025 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 /*********************************************************************************/
115 } rocDecVideoSurfaceFormat;
116 
117 /**************************************************************************************************************/
122 /**************************************************************************************************************/
128 } rocDecVideoChromaFormat;
129 
130 /*************************************************************************/
135 /*************************************************************************/
136 typedef enum rocDecodeStatus_enum {
137  rocDecodeStatus_Invalid = 0, // Decode status is not valid
138  rocDecodeStatus_InProgress = 1, // Decode is in progress
139  rocDecodeStatus_Success = 2, // Decode is completed without any errors
140  // 3 to 7 enums are reserved for future use
141  rocDecodeStatus_Error = 8, // Decode is completed with an error (error is not concealed)
142  rocDecodeStatus_Error_Concealed = 9, // Decode is completed with an error and error is concealed
143  rocDecodeStatus_Displaying = 10, // Decode is completed, displaying in progress
144 } rocDecDecodeStatus;
145 
146 /**************************************************************************************************************/
150 /**************************************************************************************************************/
151 typedef struct _RocdecDecodeCaps {
152  uint8_t device_id;
153  rocDecVideoCodec codec_type;
154  rocDecVideoChromaFormat chroma_format;
155  uint32_t bit_depth_minus_8;
156  uint32_t reserved_1[3];
157  uint8_t is_supported;
158  uint8_t num_decoders;
160  uint32_t max_width;
161  uint32_t max_height;
162  uint16_t min_width;
163  uint16_t min_height;
164  uint32_t reserved_2[6];
166 
167 /**************************************************************************************************************/
171 /**************************************************************************************************************/
172 typedef struct _RocDecoderCreateInfo {
173  uint8_t device_id;
175  uint32_t width;
176  uint32_t height;
178  rocDecVideoCodec codec_type;
179  rocDecVideoChromaFormat chroma_format;
180  uint32_t bit_depth_minus_8;
181  uint32_t intra_decode_only;
186  uint32_t max_width;
187  uint32_t max_height;
188  struct {
189  int16_t left;
190  int16_t top;
191  int16_t right;
192  int16_t bottom;
194  rocDecVideoSurfaceFormat output_format;
195  uint32_t target_width;
196  uint32_t target_height;
198  struct {
199  int16_t left;
200  int16_t top;
201  int16_t right;
202  int16_t bottom;
203  } target_rect;
205  uint32_t reserved_2[4];
207 
208 /*********************************************************************************************************/
213 /*********************************************************************************************************/
214 typedef struct _RocdecDecodeStatus {
215  rocDecDecodeStatus decode_status;
216  uint32_t reserved[31];
217  void *p_reserved[8];
219 
220 /****************************************************/
225 /****************************************************/
227  uint32_t width;
228  uint32_t height;
229  uint32_t target_width;
230  uint32_t target_height;
232  uint32_t bit_depth_minus_8;
233  uint32_t reserved_1[11];
234  struct {
235  int16_t left;
236  int16_t top;
237  int16_t right;
238  int16_t bottom;
240  struct {
241  int16_t left;
242  int16_t top;
243  int16_t right;
244  int16_t bottom;
245  } target_rect;
247  uint32_t reserved_2[11];
249 
250 /*********************************************************/
255 /*********************************************************/
256 typedef struct _RocdecAvcPicture {
257  int pic_idx;
258  uint32_t frame_idx;
259  uint32_t flags;
262  uint32_t reserved[4];
264 
265 /* flags in RocdecAvcPicture could be OR of the following */
266 #define RocdecAvcPicture_FLAGS_INVALID 0x00000001
267 #define RocdecAvcPicture_FLAGS_TOP_FIELD 0x00000002
268 #define RocdecAvcPicture_FLAGS_BOTTOM_FIELD 0x00000004
269 #define RocdecAvcPicture_FLAGS_SHORT_TERM_REFERENCE 0x00000008
270 #define RocdecAvcPicture_FLAGS_LONG_TERM_REFERENCE 0x00000010
271 #define RocdecAvcPicture_FLAGS_NON_EXISTING 0x00000020
272 
273 /*********************************************************/
278 /*********************************************************/
279 typedef struct _RocdecHevcPicture {
280  int pic_idx;
283 
286  int poc;
287  uint32_t flags;
288  uint32_t reserved[4];
290 
291 /* flags in RocdecHevcPicture could be OR of the following */
292 #define RocdecHevcPicture_INVALID 0x00000001
296 #define RocdecHevcPicture_FIELD_PIC 0x00000002
301 #define RocdecHevcPicture_BOTTOM_FIELD 0x00000004
303 #define RocdecHevcPicture_LONG_TERM_REFERENCE 0x00000008
318 #define RocdecHevcPicture_RPS_ST_CURR_BEFORE 0x00000010
323 #define RocdecHevcPicture_RPS_ST_CURR_AFTER 0x00000020
328 #define RocdecHevcPicture_RPS_LT_CURR 0x00000040
329 
330 /***********************************************************/
335 /***********************************************************/
336 typedef struct _RocdecJPEGPicParams {
337  int reserved;
339 
340 /***********************************************************/
345 /***********************************************************/
346 typedef struct _RocdecMpeg2QMatrix {
347  int32_t load_intra_quantiser_matrix;
348  int32_t load_non_intra_quantiser_matrix;
349  int32_t load_chroma_intra_quantiser_matrix;
350  int32_t load_chroma_non_intra_quantiser_matrix;
351  uint8_t intra_quantiser_matrix[64];
352  uint8_t non_intra_quantiser_matrix[64];
353  uint8_t chroma_intra_quantiser_matrix[64];
354  uint8_t chroma_non_intra_quantiser_matrix[64];
356 
357 /***********************************************************/
362 /***********************************************************/
363 typedef struct _RocdecMpeg2PicParams {
364  uint16_t horizontal_size;
365  uint16_t vertical_size;
366  uint32_t forward_reference_pic; // surface_id for forward reference
367  uint32_t backward_reference_picture; // surface_id for backward reference
368  /* meanings of the following fields are the same as in the standard */
369  int32_t picture_coding_type;
370  int32_t f_code; /* pack all four fcode into this */
371  union {
372  struct {
373  uint32_t intra_dc_precision : 2;
374  uint32_t picture_structure : 2;
375  uint32_t top_field_first : 1;
376  uint32_t frame_pred_frame_dct : 1;
377  uint32_t concealment_motion_vectors : 1;
378  uint32_t q_scale_type : 1;
379  uint32_t intra_vlc_format : 1;
380  uint32_t alternate_scan : 1;
381  uint32_t repeat_first_field : 1;
382  uint32_t progressive_frame : 1;
383  uint32_t is_first_field : 1; // indicate whether the current field is the first field for field picture
384  } bits;
385  uint32_t value;
386  } picture_coding_extension;
387 
388  RocdecMpeg2QMatrix q_matrix;
389  uint32_t reserved[4];
391 
392 /***********************************************************/
397 /***********************************************************/
398 typedef struct _RocdecVc1PicParams {
399  int reserved;
401 
402 /***********************************************************/
408 /***********************************************************/
409 typedef struct _RocdecAvcPicParams {
410  RocdecAvcPicture curr_pic;
411  RocdecAvcPicture ref_frames[16]; /* in DPB */
412  uint16_t picture_width_in_mbs_minus1;
413  uint16_t picture_height_in_mbs_minus1;
414  uint8_t bit_depth_luma_minus8;
415  uint8_t bit_depth_chroma_minus8;
416  uint8_t num_ref_frames;
417  union {
418  struct {
419  uint32_t chroma_format_idc : 2;
420  uint32_t residual_colour_transform_flag : 1;
421  uint32_t gaps_in_frame_num_value_allowed_flag : 1;
422  uint32_t frame_mbs_only_flag : 1;
423  uint32_t mb_adaptive_frame_field_flag : 1;
424  uint32_t direct_8x8_inference_flag : 1;
425  uint32_t MinLumaBiPredSize8x8 : 1; /* see A.3.3.2 */
426  uint32_t log2_max_frame_num_minus4 : 4;
427  uint32_t pic_order_cnt_type : 2;
428  uint32_t log2_max_pic_order_cnt_lsb_minus4 : 4;
429  uint32_t delta_pic_order_always_zero_flag : 1;
430  } bits;
431  uint32_t value;
432  } seq_fields;
433 
434  // FMO/ASO
435  uint8_t num_slice_groups_minus1;
436  uint8_t slice_group_map_type;
437  uint16_t slice_group_change_rate_minus1;
438  int8_t pic_init_qp_minus26;
439  int8_t pic_init_qs_minus26;
440  int8_t chroma_qp_index_offset;
441  int8_t second_chroma_qp_index_offset;
442  union {
443  struct {
444  uint32_t entropy_coding_mode_flag : 1;
445  uint32_t weighted_pred_flag : 1;
446  uint32_t weighted_bipred_idc : 2;
447  uint32_t transform_8x8_mode_flag : 1;
448  uint32_t field_pic_flag : 1;
449  uint32_t constrained_intra_pred_flag : 1;
450  uint32_t pic_order_present_flag : 1;
451  uint32_t deblocking_filter_control_present_flag : 1;
452  uint32_t redundant_pic_cnt_present_flag : 1;
453  uint32_t reference_pic_flag : 1; /* nal_ref_idc != 0 */
454  } bits;
455  uint32_t value;
456  } pic_fields;
457  uint16_t frame_num;
458 
459  uint32_t reserved[8];
461 
462 /***********************************************************/
467 /***********************************************************/
468 typedef struct _RocdecAvcSliceParams {
469  uint32_t slice_data_size; // slice size in bytes
470  uint32_t slice_data_offset; // byte offset of the current slice in the slice data buffer
471  uint32_t slice_data_flag; /* see VA_SLICE_DATA_FLAG_XXX defintions */
483  uint16_t first_mb_in_slice;
484  uint8_t slice_type;
485  uint8_t direct_spatial_mv_pred_flag;
486  uint8_t num_ref_idx_l0_active_minus1;
487  uint8_t num_ref_idx_l1_active_minus1;
488  uint8_t cabac_init_idc;
489  int8_t slice_qp_delta;
490  uint8_t disable_deblocking_filter_idc;
491  int8_t slice_alpha_c0_offset_div2;
492  int8_t slice_beta_offset_div2;
493  RocdecAvcPicture ref_pic_list_0[32]; // 8.2.4.2
494  RocdecAvcPicture ref_pic_list_1[32]; // 8.2.4.2
495  uint8_t luma_log2_weight_denom;
496  uint8_t chroma_log2_weight_denom;
497  uint8_t luma_weight_l0_flag;
498  int16_t luma_weight_l0[32];
499  int16_t luma_offset_l0[32];
500  uint8_t chroma_weight_l0_flag;
501  int16_t chroma_weight_l0[32][2];
502  int16_t chroma_offset_l0[32][2];
503  uint8_t luma_weight_l1_flag;
504  int16_t luma_weight_l1[32];
505  int16_t luma_offset_l1[32];
506  uint8_t chroma_weight_l1_flag;
507  int16_t chroma_weight_l1[32][2];
508  int16_t chroma_offset_l1[32][2];
509  uint32_t reserved[4];
511 
512 /***********************************************************/
517 /***********************************************************/
518 typedef struct _RocdecAvcIQMatrix {
520  uint8_t scaling_list_4x4[6][16];
522  uint8_t scaling_list_8x8[2][64];
524  uint32_t reserved[4];
526 
527 /***********************************************************/
532 /***********************************************************/
533 typedef struct _RocdecHevcPicParams {
534  RocdecHevcPicture curr_pic;
535  RocdecHevcPicture ref_frames[15]; /* reference frame list in DPB */
536  uint16_t picture_width_in_luma_samples;
537  uint16_t picture_height_in_luma_samples;
538  union {
539  struct {
541  uint32_t chroma_format_idc : 2;
542  uint32_t separate_colour_plane_flag : 1;
543  uint32_t pcm_enabled_flag : 1;
544  uint32_t scaling_list_enabled_flag : 1;
545  uint32_t transform_skip_enabled_flag : 1;
546  uint32_t amp_enabled_flag : 1;
547  uint32_t strong_intra_smoothing_enabled_flag : 1;
548  uint32_t sign_data_hiding_enabled_flag : 1;
549  uint32_t constrained_intra_pred_flag : 1;
550  uint32_t cu_qp_delta_enabled_flag : 1;
551  uint32_t weighted_pred_flag : 1;
552  uint32_t weighted_bipred_flag : 1;
553  uint32_t transquant_bypass_enabled_flag : 1;
554  uint32_t tiles_enabled_flag : 1;
555  uint32_t entropy_coding_sync_enabled_flag : 1;
556  uint32_t pps_loop_filter_across_slices_enabled_flag : 1;
557  uint32_t loop_filter_across_tiles_enabled_flag : 1;
558  uint32_t pcm_loop_filter_disabled_flag : 1;
562  uint32_t no_bi_pred_flag : 1;
563  uint32_t reserved_bits : 11;
564  } bits;
565  uint32_t value;
566  } pic_fields;
567 
570  uint8_t bit_depth_luma_minus8;
571  uint8_t bit_depth_chroma_minus8;
572  uint8_t pcm_sample_bit_depth_luma_minus1;
573  uint8_t pcm_sample_bit_depth_chroma_minus1;
574  uint8_t log2_min_luma_coding_block_size_minus3;
575  uint8_t log2_diff_max_min_luma_coding_block_size;
576  uint8_t log2_min_luma_transform_block_size_minus2;
577  uint8_t log2_diff_max_min_luma_transform_block_size;
578  uint8_t log2_min_pcm_luma_coding_block_size_minus3;
579  uint8_t log2_diff_max_min_pcm_luma_coding_block_size;
580  uint8_t max_transform_hierarchy_depth_intra;
581  uint8_t max_transform_hierarchy_depth_inter;
582  int8_t init_qp_minus26;
583  uint8_t diff_cu_qp_delta_depth;
584  int8_t pps_cb_qp_offset;
585  int8_t pps_cr_qp_offset;
586  uint8_t log2_parallel_merge_level_minus2;
587  uint8_t num_tile_columns_minus1;
588  uint8_t num_tile_rows_minus1;
593  uint16_t column_width_minus1[19];
594  uint16_t row_height_minus1[21];
595 
596  union {
597  struct {
600  uint32_t long_term_ref_pics_present_flag : 1;
601  uint32_t sps_temporal_mvp_enabled_flag : 1;
602  uint32_t cabac_init_present_flag : 1;
603  uint32_t output_flag_present_flag : 1;
604  uint32_t dependent_slice_segments_enabled_flag : 1;
605  uint32_t pps_slice_chroma_qp_offsets_present_flag : 1;
606  uint32_t sample_adaptive_offset_enabled_flag : 1;
607  uint32_t deblocking_filter_override_enabled_flag : 1;
608  uint32_t pps_disable_deblocking_filter_flag : 1;
609  uint32_t slice_segment_header_extension_present_flag : 1;
610 
612  uint32_t rap_pic_flag : 1;
614  uint32_t idr_pic_flag : 1;
616  uint32_t intra_pic_flag : 1;
617 
618  uint32_t reserved_bits : 18;
619  } bits;
620  uint32_t value;
621  } slice_parsing_fields;
622 
625  uint8_t num_short_term_ref_pic_sets;
626  uint8_t num_long_term_ref_pic_sps;
627  uint8_t num_ref_idx_l0_default_active_minus1;
628  uint8_t num_ref_idx_l1_default_active_minus1;
629  int8_t pps_beta_offset_div2;
630  int8_t pps_tc_offset_div2;
631  uint8_t num_extra_slice_header_bits;
642  uint32_t st_rps_bits;
643  uint32_t reserved[8];
645 
646 /***********************************************************/
651 /***********************************************************/
652 typedef struct _RocdecHevcSliceParams {
656  uint32_t slice_data_size;
660  uint32_t slice_data_flag;
679  uint8_t ref_pic_list[2][15];
680  union {
681  uint32_t value;
682  struct {
684  uint32_t last_slice_of_pic : 1;
687  uint32_t slice_type : 2;
688  uint32_t color_plane_id : 2;
689  uint32_t slice_sao_luma_flag : 1;
690  uint32_t slice_sao_chroma_flag : 1;
691  uint32_t mvd_l1_zero_flag : 1;
692  uint32_t cabac_init_flag : 1;
693  uint32_t slice_temporal_mvp_enabled_flag : 1;
694  uint32_t slice_deblocking_filter_disabled_flag : 1;
695  uint32_t collocated_from_l0_flag : 1;
696  uint32_t slice_loop_filter_across_slices_enabled_flag : 1;
697  uint32_t reserved : 18;
698  } fields;
699  } long_slice_flags;
700 
703  uint8_t num_ref_idx_l0_active_minus1;
704  uint8_t num_ref_idx_l1_active_minus1;
705  int8_t slice_qp_delta;
706  int8_t slice_cb_qp_offset;
707  int8_t slice_cr_qp_offset;
708  int8_t slice_beta_offset_div2;
709  int8_t slice_tc_offset_div2;
710  uint8_t luma_log2_weight_denom;
711  int8_t delta_chroma_log2_weight_denom;
712  int8_t delta_luma_weight_l0[15];
713  int8_t luma_offset_l0[15];
714  int8_t delta_chroma_weight_l0[15][2];
716  int8_t chroma_offset_l0[15][2];
719  int8_t luma_offset_l1[15];
720  int8_t delta_chroma_weight_l1[15][2];
722  int8_t chroma_offset_l1[15][2];
725  uint16_t num_entry_point_offsets;
726  uint16_t entry_offset_to_subset_array;
729 
730  uint32_t reserved[2];
732 
733 /***********************************************************/
742 /***********************************************************/
743 typedef struct _RocdecHevcIQMatrix {
749  uint8_t scaling_list_4x4[6][16];
755  uint8_t scaling_list_8x8[6][64];
761  uint8_t scaling_list_16x16[6][64];
767  uint8_t scaling_list_32x32[2][64];
782  uint32_t reserved[4];
784 
785 /***********************************************************/
790 /***********************************************************/
791 typedef struct _RocdecVp9PicParams {
795  uint16_t frame_width;
799  uint16_t frame_height;
800 
809  uint32_t reference_frames[8];
810 
811  union {
812  struct {
816  uint32_t subsampling_x : 1;
817  uint32_t subsampling_y : 1;
818  uint32_t frame_type : 1;
819  uint32_t show_frame : 1;
820  uint32_t error_resilient_mode : 1;
821  uint32_t intra_only : 1;
822  uint32_t allow_high_precision_mv : 1;
823  uint32_t mcomp_filter_type : 3;
824  uint32_t frame_parallel_decoding_mode : 1;
825  uint32_t reset_frame_context : 2;
826  uint32_t refresh_frame_context : 1;
827  uint32_t frame_context_idx : 2;
828  uint32_t segmentation_enabled : 1;
829 
837 
842  uint32_t last_ref_frame : 3;
851  uint32_t golden_ref_frame : 3;
860  uint32_t alt_ref_frame : 3;
873  uint32_t lossless_flag : 1;
874  } bits;
875  uint32_t value;
876  } pic_fields;
877 
878  /* following parameters have same syntax with those in VP9 code */
879  uint8_t filter_level;
880  uint8_t sharpness_level;
881 
885  uint8_t log2_tile_rows;
899 
904 
910  uint8_t segment_pred_probs[3];
911 
915  uint8_t profile;
916 
920  uint8_t bit_depth;
921 
923  uint32_t va_reserved[8];
924 
926 
932  union {
933  struct {
948  uint16_t segment_reference : 2;
954  } fields;
955  uint16_t value;
956  } segment_flags;
957 
962  uint8_t filter_level[4][2];
983 
985  uint32_t va_reserved[4];
986 
988 
989 /***********************************************************/
994 /***********************************************************/
995 typedef struct _RocdecVp9SliceParams {
1010 
1015 
1017  uint32_t va_reserved[4];
1018 
1020 
1024  union {
1025  struct {
1033  uint32_t enabled : 1;
1039  uint32_t update_map : 1;
1045  uint32_t temporal_update : 1;
1051  uint32_t update_data : 1;
1052 
1054  uint32_t reserved : 28;
1055  } bits;
1056  uint32_t value;
1057  } segment_info_fields;
1058 
1080  int16_t feature_data[8][8];
1081 
1087  uint8_t feature_mask[8];
1088 
1090  uint32_t reserved[4];
1092 
1096  union {
1097  struct {
1102  uint32_t apply_grain : 1;
1103  uint32_t chroma_scaling_from_luma : 1;
1104  uint32_t grain_scaling_minus_8 : 2;
1105  uint32_t ar_coeff_lag : 2;
1106  uint32_t ar_coeff_shift_minus_6 : 2;
1107  uint32_t grain_scale_shift : 2;
1108  uint32_t overlap_flag : 1;
1109  uint32_t clip_to_restricted_range : 1;
1111  uint32_t reserved : 20;
1112  } bits;
1113  uint32_t value;
1114  } film_grain_info_fields;
1115 
1116  uint16_t grain_seed;
1117  /* value range [0..14] */
1118  uint8_t num_y_points;
1119  uint8_t point_y_value[14];
1120  uint8_t point_y_scaling[14];
1121  /* value range [0..10] */
1122  uint8_t num_cb_points;
1123  uint8_t point_cb_value[10];
1124  uint8_t point_cb_scaling[10];
1125  /* value range [0..10] */
1126  uint8_t num_cr_points;
1127  uint8_t point_cr_value[10];
1128  uint8_t point_cr_scaling[10];
1129  /* value range [-128..127] */
1130  int8_t ar_coeffs_y[24];
1131  int8_t ar_coeffs_cb[25];
1132  int8_t ar_coeffs_cr[25];
1133  uint8_t cb_mult;
1134  uint8_t cb_luma_mult;
1135  uint16_t cb_offset;
1136  uint8_t cr_mult;
1137  uint8_t cr_luma_mult;
1138  uint16_t cr_offset;
1139 
1141  uint32_t reserved[4];
1143 
1144 typedef enum {
1156 
1160 
1166  int32_t wmmat[8];
1167 
1168  /* valid or invalid on affine set */
1169  uint8_t invalid;
1170 
1172  uint32_t reserved[4];
1174 
1175 /***********************************************************/
1180 /***********************************************************/
1181 typedef struct _RocdecAV1PicParams {
1187  uint8_t profile;
1188 
1189  uint8_t order_hint_bits_minus_1;
1190 
1197  uint8_t bit_depth_idx;
1198 
1201 
1202  union {
1203  struct {
1204  uint32_t still_picture : 1;
1205  uint32_t use_128x128_superblock : 1;
1206  uint32_t enable_filter_intra : 1;
1207  uint32_t enable_intra_edge_filter : 1;
1208 
1211  uint32_t enable_masked_compound : 1;
1212 
1213  uint32_t enable_dual_filter : 1;
1214  uint32_t enable_order_hint : 1;
1215  uint32_t enable_jnt_comp : 1;
1216  uint32_t enable_cdef : 1;
1217  uint32_t mono_chrome : 1;
1218  uint32_t color_range : 1;
1219  uint32_t subsampling_x : 1;
1220  uint32_t subsampling_y : 1;
1221  uint32_t chroma_sample_position : 1;
1222  uint32_t film_grain_params_present : 1;
1224  uint32_t reserved : 16;
1225  } fields;
1226  uint32_t value;
1227  } seq_info_fields;
1228 
1235 
1241 
1247 
1267 
1274  uint16_t frame_height_minus1;
1275 
1281  uint16_t output_frame_height_in_tiles_minus_1;
1282 
1293 
1304  uint8_t ref_frame_idx[7];
1305 
1314  uint8_t order_hint;
1315 
1316  RocdecAv1SegmentationStruct seg_info;
1317  RocdecAv1FilmGrainStruct film_grain_info;
1318 
1324  uint8_t tile_cols;
1325  uint8_t tile_rows;
1326 
1327  /* The width/height of a tile minus 1 in units of superblocks. Though the
1328  * maximum number of tiles is 64, since ones of the last tile are computed
1329  * from ones of the other tiles and frame_width/height, they are not
1330  * necessarily specified.
1331  */
1332  uint16_t width_in_sbs_minus_1[63];
1333  uint16_t height_in_sbs_minus_1[63];
1334 
1340 
1341  /* specify the tile index for context updating */
1342  uint16_t context_update_tile_id;
1343 
1344  union {
1348  struct {
1358  uint32_t frame_type : 2;
1359  uint32_t show_frame : 1;
1360  uint32_t showable_frame : 1;
1361  uint32_t error_resilient_mode : 1;
1362  uint32_t disable_cdf_update : 1;
1363  uint32_t allow_screen_content_tools : 1;
1364  uint32_t force_integer_mv : 1;
1365  uint32_t allow_intrabc : 1;
1366  uint32_t use_superres : 1;
1367  uint32_t allow_high_precision_mv : 1;
1368  uint32_t is_motion_mode_switchable : 1;
1369  uint32_t use_ref_frame_mvs : 1;
1370  /* disable_frame_end_update_cdf is coded as refresh_frame_context. */
1371  uint32_t disable_frame_end_update_cdf : 1;
1372  uint32_t uniform_tile_spacing_flag : 1;
1373  uint32_t allow_warped_motion : 1;
1375  uint32_t large_scale_tile : 1;
1376 
1378  uint32_t reserved : 15;
1379  } bits;
1380  uint32_t value;
1381  } pic_info_fields;
1382 
1388 
1392  uint8_t interp_filter;
1393 
1397  uint8_t filter_level[2];
1398 
1403  uint8_t filter_level_v;
1404 
1405  union {
1406  struct {
1410  uint8_t sharpness_level : 3;
1411  uint8_t mode_ref_delta_enabled : 1;
1412  uint8_t mode_ref_delta_update : 1;
1413 
1415  uint8_t reserved : 3;
1416  } bits;
1417  uint8_t value;
1418  } loop_filter_info_fields;
1419 
1424  int8_t ref_deltas[8];
1425 
1430  int8_t mode_deltas[2];
1431 
1437  uint8_t base_qindex;
1458 
1461  union {
1462  struct {
1463  uint16_t using_qmatrix : 1;
1468  uint16_t qm_y : 4;
1469  uint16_t qm_u : 4;
1470  uint16_t qm_v : 4;
1471 
1473  uint16_t reserved : 3;
1474  } bits;
1475  uint16_t value;
1477 
1478  union {
1479  struct {
1482  uint32_t delta_q_present_flag : 1;
1483  uint32_t log2_delta_q_res : 2;
1484 
1488  uint32_t log2_delta_lf_res : 2;
1489 
1492  uint32_t delta_lf_multi : 1;
1493 
1497  uint32_t tx_mode : 2;
1498 
1499  /* AV1 frame reference mode semantic */
1500  uint32_t reference_select : 1;
1501 
1502  uint32_t reduced_tx_set_used : 1;
1503 
1504  uint32_t skip_mode_present : 1;
1505 
1507  uint32_t reserved : 20;
1508  } bits;
1509  uint32_t value;
1510  } mode_control_fields;
1511 
1514  /* value range [0..3] */
1516  /* value range [0..3] */
1517  uint8_t cdef_bits;
1518 
1533  /* value range [0..63] */
1534  uint8_t cdef_y_strengths[8];
1535  /* value range [0..63] */
1536  uint8_t cdef_uv_strengths[8];
1537 
1540  union {
1541  struct {
1542  uint16_t yframe_restoration_type : 2;
1543  uint16_t cbframe_restoration_type : 2;
1544  uint16_t crframe_restoration_type : 2;
1545  uint16_t lr_unit_shift : 2;
1546  uint16_t lr_uv_shift : 1;
1547 
1549  uint16_t reserved : 7;
1550  } bits;
1551  uint16_t value;
1553 
1557 
1561  uint32_t reserved[8];
1563 
1564 /***********************************************************/
1572 /***********************************************************/
1573 typedef struct _RocdecAv1SliceParams {
1588 
1589  uint16_t tile_row;
1590  uint16_t tile_column;
1591 
1592  uint16_t tg_start;
1593  uint16_t tg_end;
1594 
1601 
1607 
1609  uint32_t reserved[4];
1611 
1612 /******************************************************************************************/
1618 /******************************************************************************************/
1619 typedef struct _RocdecPicParams {
1626  // Bitstream data
1628  const uint8_t *bitstream_data;
1629  uint32_t num_slices;
1633  uint32_t reserved[30];
1635  // IN: Codec-specific data
1636  union {
1638  RocdecAvcPicParams avc;
1639  RocdecHevcPicParams hevc;
1640  RocdecVc1PicParams vc1;
1641  RocdecJPEGPicParams jpeg;
1642  RocdecVp9PicParams vp9;
1643  RocdecAv1PicParams av1;
1644  uint32_t codec_reserved[256];
1645  } pic_params;
1646 
1649  union {
1650  // Todo: Add slice params defines for other codecs.
1651  RocdecAvcSliceParams *avc;
1652  RocdecHevcSliceParams *hevc;
1653  RocdecVp9SliceParams *vp9;
1654  RocdecAv1SliceParams *av1;
1656 
1657  union {
1658  // Todo: Added IQ matrix defines for other codecs.
1659  RocdecAvcIQMatrix avc;
1660  RocdecHevcIQMatrix hevc;
1661  } iq_matrix;
1662 } RocdecPicParams;
1663 
1664 /******************************************************/
1669 /******************************************************/
1670 typedef struct _RocdecProcParams {
1673  uint32_t reserved_flags[2];
1675  // The fields below are used for raw YUV input
1676  uint64_t raw_input_dptr;
1677  uint32_t raw_input_pitch;
1678  uint32_t raw_input_format;
1679  uint64_t raw_output_dptr;
1680  uint32_t raw_output_pitch;
1682  uint32_t reserved[16];
1684 
1685 /*****************************************************************************************************/
1689 /*****************************************************************************************************/
1690 extern rocDecStatus ROCDECAPI rocDecCreateDecoder(rocDecDecoderHandle *decoder_handle, RocDecoderCreateInfo *decoder_create_info);
1691 
1692 /*****************************************************************************************************/
1696 /*****************************************************************************************************/
1697 extern rocDecStatus ROCDECAPI rocDecDestroyDecoder(rocDecDecoderHandle decoder_handle);
1698 
1699 /**********************************************************************************************************************/
1706 /**********************************************************************************************************************/
1707 extern rocDecStatus ROCDECAPI rocDecGetDecoderCaps(RocdecDecodeCaps *decode_caps);
1708 
1709 /*****************************************************************************************************/
1714 /*****************************************************************************************************/
1715 extern rocDecStatus ROCDECAPI rocDecDecodeFrame(rocDecDecoderHandle decoder_handle, RocdecPicParams *pic_params);
1716 
1717 /************************************************************************************************************/
1724 /************************************************************************************************************/
1725 extern rocDecStatus ROCDECAPI rocDecGetDecodeStatus(rocDecDecoderHandle decoder_handle, int pic_idx, RocdecDecodeStatus *decode_status);
1726 
1727 /*********************************************************************************************************/
1732 /*********************************************************************************************************/
1733 extern rocDecStatus ROCDECAPI rocDecReconfigureDecoder(rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params);
1734 
1735 /************************************************************************************************************************/
1745 /************************************************************************************************************************/
1746 extern rocDecStatus ROCDECAPI rocDecGetVideoFrame(rocDecDecoderHandle decoder_handle, int pic_idx,
1747  void *dev_mem_ptr[3], uint32_t *horizontal_pitch,
1748  RocdecProcParams *vid_postproc_params);
1749 
1750 /*****************************************************************************************************/
1754 /*****************************************************************************************************/
1755 extern const char *ROCDECAPI rocDecGetErrorName(rocDecStatus rocdec_status);
1756 
1757 #ifdef __cplusplus
1758 }
1759 #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:286
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_YUV420
Definition: rocdecode.h:109
@ rocDecVideoSurfaceFormat_YUV422
Definition: rocdecode.h:112
@ rocDecVideoSurfaceFormat_YUV444_16Bit
Definition: rocdecode.h:107
@ rocDecVideoSurfaceFormat_YUV420_16Bit
Definition: rocdecode.h:110
@ rocDecVideoSurfaceFormat_P016
Definition: rocdecode.h:104
@ rocDecVideoSurfaceFormat_NV12
Definition: rocdecode.h:103
@ rocDecVideoSurfaceFormat_YUV422_16Bit
Definition: rocdecode.h:113
@ 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:123
@ rocDecVideoChromaFormat_422
Definition: rocdecode.h:126
@ rocDecVideoChromaFormat_444
Definition: rocdecode.h:127
@ rocDecVideoChromaFormat_420
Definition: rocdecode.h:125
@ rocDecVideoChromaFormat_Monochrome
Definition: rocdecode.h:124
struct _RocdecVp9SegmentParameter RocdecVp9SegmentParameter
VP9 Segmentation Parameter Data Structure This structure is configured to be the same as VA-API VASeg...
RocdecAv1TransformationType
Definition: rocdecode.h:1144
@ RocdecAv1TransformationTranslation
Definition: rocdecode.h:1148
@ RocdecAv1TransformationAffine
Definition: rocdecode.h:1152
@ RocdecAv1TransformationCount
Definition: rocdecode.h:1154
@ RocdecAv1TransformationRotzoom
Definition: rocdecode.h:1150
@ RocdecAv1TransformationIdentity
Definition: rocdecode.h:1146
Definition: rocdecode.h:172
uint32_t height
Definition: rocdecode.h:176
uint32_t width
Definition: rocdecode.h:175
uint32_t target_width
Definition: rocdecode.h:195
uint32_t max_height
Definition: rocdecode.h:187
uint32_t bit_depth_minus_8
Definition: rocdecode.h:180
uint32_t num_output_surfaces
Definition: rocdecode.h:197
uint8_t device_id
Definition: rocdecode.h:173
struct _RocDecoderCreateInfo::@1 target_rect
rocDecVideoChromaFormat chroma_format
Definition: rocdecode.h:179
uint32_t num_decode_surfaces
Definition: rocdecode.h:177
rocDecVideoCodec codec_type
Definition: rocdecode.h:178
uint32_t max_width
Definition: rocdecode.h:186
rocDecVideoSurfaceFormat output_format
Definition: rocdecode.h:194
uint32_t target_height
Definition: rocdecode.h:196
struct _RocDecoderCreateInfo::@0 display_rect
uint32_t intra_decode_only
Definition: rocdecode.h:181
uint32_t reserved_2[4]
Definition: rocdecode.h:205
Definition: rocdecode.h:1181
union _RocdecAV1PicParams::@29 loop_restoration_fields
loop restoration parameters
int8_t u_ac_delta_q
U AC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1449
uint8_t filter_level_u
chroma loop filter levels. value range [0..63].
Definition: rocdecode.h:1402
int ref_frame_map[8]
Surface indices of reference frames in DPB.
Definition: rocdecode.h:1292
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:1324
uint8_t matrix_coefficients
corresponds to AV1 spec variable of the same name.
Definition: rocdecode.h:1200
uint8_t sharpness_level
flags for reference pictures same syntax and semantic as those in AV1 code
Definition: rocdecode.h:1410
int8_t u_dc_delta_q
U DC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1445
uint16_t qm_y
qm level value range [0..15] Invalid if using_qmatrix equals 0.
Definition: rocdecode.h:1468
int8_t ref_deltas[8]
The adjustment needed for the filter level based on the chosen reference frame. value range [-64....
Definition: rocdecode.h:1424
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:1197
uint32_t tx_mode
read_tx_mode value range [0..2]
Definition: rocdecode.h:1497
uint16_t frame_width_minus1
Picture resolution minus 1 Picture original resolution. If SuperRes is enabled, this is the upscaled ...
Definition: rocdecode.h:1273
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:1246
uint8_t cdef_y_strengths[8]
Definition: rocdecode.h:1534
int8_t v_ac_delta_q
V AC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1457
int8_t v_dc_delta_q
V DC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1453
uint8_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1415
uint8_t primary_ref_frame
primary reference frame index Index into ref_frame_idx[], specifying which reference frame contains p...
Definition: rocdecode.h:1313
uint32_t enable_interintra_compound
Definition: rocdecode.h:1210
int current_frame
Picture level information.
Definition: rocdecode.h:1234
uint8_t cdef_damping_minus_3
CDEF parameters.
Definition: rocdecode.h:1515
uint8_t profile
sequence level information
Definition: rocdecode.h:1187
uint8_t ref_frame_idx[7]
Reference frame indices.
Definition: rocdecode.h:1304
uint8_t filter_level[2]
luma loop filter levels. value range [0..63].
Definition: rocdecode.h:1397
uint16_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1473
uint32_t delta_q_present_flag
delta_q parameters
Definition: rocdecode.h:1482
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:1280
uint32_t large_scale_tile
indicate if current frame in large scale tile mode
Definition: rocdecode.h:1375
union _RocdecAV1PicParams::@27 qmatrix_fields
quantization_matrix
int8_t mode_deltas[2]
The adjustment needed for the filter level based on the chosen mode. value range [-64....
Definition: rocdecode.h:1430
uint8_t superres_scale_denominator
Supper resolution scale denominator. When use_superres=1, superres_scale_denominator must be in the r...
Definition: rocdecode.h:1387
uint32_t frame_type
Frame Type: 0: KEY_FRAME; 1: INTER_FRAME; 2: INTRA_ONLY_FRAME; 3: SWITCH_FRAME For SWITCH_FRAME,...
Definition: rocdecode.h:1358
uint32_t delta_lf_multi
CONFIG_LOOPFILTER_LEVEL.
Definition: rocdecode.h:1492
uint32_t delta_lf_present_flag
delta_lf parameters
Definition: rocdecode.h:1487
uint8_t base_qindex
quantization
Definition: rocdecode.h:1437
RocdecAv1WarpedMotionParams wm[7]
global motion
Definition: rocdecode.h:1556
struct _RocdecAV1PicParams::@25::@31 bits
flags for current picture same syntax and semantic as those in AV1 code
int8_t y_dc_delta_q
Y DC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1441
int current_display_picture
display buffer of current picture Used for film grain applied decoded picture. Valid only when apply_...
Definition: rocdecode.h:1240
uint8_t interp_filter
Interpolation filter. value range [0..4].
Definition: rocdecode.h:1392
int * anchor_frames_list
anchor frame list for large scale tile For large scale tile applications, the anchor frames could com...
Definition: rocdecode.h:1266
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:1339
uint32_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1224
Film Grain Information for AV1.
Definition: rocdecode.h:1095
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:1102
uint32_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1111
Segmentation Information for AV1.
Definition: rocdecode.h:1023
uint32_t enabled
Definition: rocdecode.h:1033
uint32_t temporal_update
Definition: rocdecode.h:1045
int16_t feature_data[8][8]
Segmentation parameters for current frame. feature_data[segment_id][feature_id] where segment_id has ...
Definition: rocdecode.h:1080
uint32_t update_map
Definition: rocdecode.h:1039
uint32_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1054
uint32_t update_data
Definition: rocdecode.h:1051
uint8_t feature_mask[8]
indicates if a feature is enabled or not. Each bit field itself is the feature_id....
Definition: rocdecode.h:1087
Definition: rocdecode.h:1573
uint32_t slice_data_flag
Definition: rocdecode.h:1587
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:1600
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:1579
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:1606
uint32_t slice_data_offset
Definition: rocdecode.h:1583
uint32_t reserved[4]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1609
Definition: rocdecode.h:1157
RocdecAv1TransformationType wmtype
Specify the type of warped motion.
Definition: rocdecode.h:1159
int32_t wmmat[8]
Specify warp motion parameters wm.wmmat[] corresponds to gm_params[][] in spec. Details in AV1 spec s...
Definition: rocdecode.h:1166
uint32_t reserved[4]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1172
Definition: rocdecode.h:518
uint8_t scaling_list_8x8[2][64]
8x8 scaling list, in raster scan order.
Definition: rocdecode.h:522
uint32_t reserved[4]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:524
uint8_t scaling_list_4x4[6][16]
4x4 scaling list, in raster scan order.
Definition: rocdecode.h:520
Definition: rocdecode.h:409
Definition: rocdecode.h:256
int32_t top_field_order_cnt
Definition: rocdecode.h:260
int pic_idx
Definition: rocdecode.h:257
uint32_t flags
Definition: rocdecode.h:259
int32_t bottom_field_order_cnt
Definition: rocdecode.h:261
uint32_t frame_idx
Definition: rocdecode.h:258
Definition: rocdecode.h:468
uint16_t slice_data_bit_offset
Bit offset from NAL Header Unit to the begining of slice_data().
Definition: rocdecode.h:482
Definition: rocdecode.h:151
uint16_t min_width
Definition: rocdecode.h:162
uint32_t reserved_1[3]
Definition: rocdecode.h:156
uint32_t reserved_2[6]
Definition: rocdecode.h:164
uint8_t num_decoders
Definition: rocdecode.h:158
rocDecVideoCodec codec_type
Definition: rocdecode.h:153
uint8_t device_id
Definition: rocdecode.h:152
uint16_t min_height
Definition: rocdecode.h:163
uint32_t max_width
Definition: rocdecode.h:160
rocDecVideoChromaFormat chroma_format
Definition: rocdecode.h:154
uint16_t output_format_mask
Definition: rocdecode.h:159
uint8_t is_supported
Definition: rocdecode.h:157
uint32_t max_height
Definition: rocdecode.h:161
uint32_t bit_depth_minus_8
Definition: rocdecode.h:155
Definition: rocdecode.h:214
Definition: rocdecode.h:743
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:755
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:749
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:781
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:761
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:774
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:767
Definition: rocdecode.h:533
uint16_t column_width_minus1[19]
Definition: rocdecode.h:593
uint32_t idr_pic_flag
Definition: rocdecode.h:614
uint32_t chroma_format_idc
Definition: rocdecode.h:541
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:642
uint32_t no_bi_pred_flag
Definition: rocdecode.h:562
uint32_t intra_pic_flag
Definition: rocdecode.h:616
uint8_t sps_max_dec_pic_buffering_minus1
Definition: rocdecode.h:569
uint32_t no_pic_reordering_flag
Definition: rocdecode.h:560
uint32_t lists_modification_present_flag
Definition: rocdecode.h:599
uint32_t rap_pic_flag
Definition: rocdecode.h:612
uint8_t log2_max_pic_order_cnt_lsb_minus4
Definition: rocdecode.h:624
Definition: rocdecode.h:279
uint32_t flags
Definition: rocdecode.h:287
int pic_idx
Definition: rocdecode.h:280
uint32_t reserved[4]
Definition: rocdecode.h:288
Definition: rocdecode.h:652
uint32_t slice_segment_address
Definition: rocdecode.h:673
uint32_t slice_data_flag
Slice data buffer flags. See VA_SLICE_DATA_FLAG_XXX.
Definition: rocdecode.h:660
uint8_t five_minus_max_num_merge_cand
Definition: rocdecode.h:724
uint32_t slice_data_offset
The offset to the NAL unit header for this slice.
Definition: rocdecode.h:658
uint32_t last_slice_of_pic
Definition: rocdecode.h:684
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:656
int8_t delta_luma_weight_l1[15]
Definition: rocdecode.h:718
int8_t chroma_offset_l1[15][2]
Definition: rocdecode.h:722
int8_t chroma_offset_l0[15][2]
Definition: rocdecode.h:716
uint16_t slice_data_num_emu_prevn_bytes
Number of emulation prevention bytes in slice header.
Definition: rocdecode.h:728
uint8_t collocated_ref_idx
Definition: rocdecode.h:702
uint8_t ref_pic_list[2][15]
index into ReferenceFrames[] ref_pic_list[0][] corresponds to RefPicList0[] of HEVC variable....
Definition: rocdecode.h:679
uint32_t dependent_slice_segment_flag
Definition: rocdecode.h:686
uint32_t slice_data_byte_offset
Byte offset from NAL unit header to the begining of slice_data().
Definition: rocdecode.h:671
Definition: rocdecode.h:336
Definition: rocdecode.h:363
Definition: rocdecode.h:346
Definition: rocdecode.h:1619
uint32_t reserved[30]
Definition: rocdecode.h:1633
union _RocdecPicParams::@37 slice_params
Variable size array. The user should allocate one slice param struct for each slice.
RocdecMpeg2PicParams mpeg2
Definition: rocdecode.h:1637
int bottom_field_flag
Definition: rocdecode.h:1624
int intra_pic_flag
Definition: rocdecode.h:1632
int pic_height
Definition: rocdecode.h:1621
int ref_pic_flag
Definition: rocdecode.h:1631
const uint8_t * bitstream_data
Definition: rocdecode.h:1628
uint32_t num_slices
Definition: rocdecode.h:1629
int curr_pic_idx
Definition: rocdecode.h:1622
int field_pic_flag
Definition: rocdecode.h:1623
uint32_t bitstream_data_len
Definition: rocdecode.h:1627
int second_field
Definition: rocdecode.h:1625
int pic_width
Definition: rocdecode.h:1620
Definition: rocdecode.h:1670
uint32_t raw_input_format
Definition: rocdecode.h:1678
uint64_t raw_output_dptr
Definition: rocdecode.h:1679
uint32_t raw_output_pitch
Definition: rocdecode.h:1680
int progressive_frame
Definition: rocdecode.h:1671
uint64_t raw_input_dptr
Definition: rocdecode.h:1676
uint32_t reserved_flags[2]
Definition: rocdecode.h:1673
uint32_t raw_input_pitch
Definition: rocdecode.h:1677
uint32_t raw_output_format
Definition: rocdecode.h:1681
uint32_t reserved[16]
Definition: rocdecode.h:1682
int top_field_first
Definition: rocdecode.h:1672
Definition: rocdecode.h:226
uint32_t target_width
Definition: rocdecode.h:229
struct _RocdecReconfigureDecoderInfo::@3 target_rect
uint32_t num_decode_surfaces
Definition: rocdecode.h:231
uint32_t height
Definition: rocdecode.h:228
uint32_t bit_depth_minus_8
Definition: rocdecode.h:232
uint32_t width
Definition: rocdecode.h:227
struct _RocdecReconfigureDecoderInfo::@2 display_rect
uint32_t reserved_1[11]
Definition: rocdecode.h:233
uint32_t reserved_2[11]
Definition: rocdecode.h:247
uint32_t target_height
Definition: rocdecode.h:230
Definition: rocdecode.h:398
Definition: rocdecode.h:791
uint32_t reference_frames[8]
Surface indices of reference frames in DPB.
Definition: rocdecode.h:809
uint32_t last_ref_frame_sign_bias
Sign Bias of the LAST reference frame. It corresponds to ref_frame_sign_bias[LAST_FRAME] in VP9 code.
Definition: rocdecode.h:846
uint32_t segmentation_update_map
corresponds to variable update_mb_segmentation_map in VP9 code.
Definition: rocdecode.h:836
uint16_t frame_width
picture width Picture original resolution. The value may not be multiple of 8.
Definition: rocdecode.h:795
uint8_t profile
VP9 Profile definition value range [0..3].
Definition: rocdecode.h:915
uint8_t log2_tile_rows
number of tile rows specified by (1 << log2_tile_rows). It corresponds the variable with same name in...
Definition: rocdecode.h:885
uint32_t golden_ref_frame
Index of reference_frames[] and points to the GOLDERN reference frame. It corresponds to active_ref_i...
Definition: rocdecode.h:851
uint32_t last_ref_frame
Index of reference_frames[] and points to the LAST reference frame. It corresponds to active_ref_idx[...
Definition: rocdecode.h:842
uint32_t segmentation_temporal_update
corresponds to variable temporal_update in VP9 code.
Definition: rocdecode.h:832
uint8_t mb_segment_tree_probs[7]
Definition: rocdecode.h:909
uint32_t alt_ref_frame_sign_bias
Sign Bias of the ALTERNATE reference frame. Corresponds to ref_frame_sign_bias[ALTREF_FRAME] in VP9 c...
Definition: rocdecode.h:864
uint8_t log2_tile_columns
number of tile columns specified by (1 << log2_tile_columns). It corresponds the variable with same n...
Definition: rocdecode.h:889
uint32_t alt_ref_frame
Index of reference_frames[] and points to the ALTERNATE reference frame. Corresponds to active_ref_id...
Definition: rocdecode.h:860
uint32_t lossless_flag
Lossless Mode LosslessFlag = base_qindex == 0 && y_dc_delta_q == 0 && uv_dc_delta_q == 0 && uv_ac_del...
Definition: rocdecode.h:873
uint32_t subsampling_x
flags for current picture same syntax and semantic as those in VP9 code
Definition: rocdecode.h:816
uint32_t va_reserved[8]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:923
uint32_t golden_ref_frame_sign_bias
Sign Bias of the GOLDERN reference frame. Corresponds to ref_frame_sign_bias[GOLDERN_FRAME] in VP9 co...
Definition: rocdecode.h:855
uint8_t bit_depth
VP9 bit depth per sample same for both luma and chroma samples.
Definition: rocdecode.h:920
uint8_t frame_header_length_in_bytes
Number of bytes taken up by the uncompressed frame header, which corresponds to byte length of functi...
Definition: rocdecode.h:898
uint16_t first_partition_size
The byte count of compressed header the bitstream buffer, which corresponds to syntax first_partition...
Definition: rocdecode.h:903
uint16_t frame_height
picture height Picture original resolution. The value may not be multiple of 8.
Definition: rocdecode.h:799
VP9 Segmentation Parameter Data Structure This structure is configured to be the same as VA-API VASeg...
Definition: rocdecode.h:931
uint8_t filter_level[4][2]
Specifies the filter level information per segment. The value corresponds to variable lfi->lvl[seg][r...
Definition: rocdecode.h:962
int16_t luma_dc_quant_scale
Specifies per segment Luma DC quantization scale. Corresponding to y_dequant[qindex][0] in vp9_mb_ini...
Definition: rocdecode.h:972
uint32_t va_reserved[4]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:985
uint16_t segment_reference
Specifies per segment reference indication. 0: reserved 1: Last ref 2: golden 3: altref Value can be ...
Definition: rocdecode.h:948
int16_t chroma_dc_quant_scale
Specifies per segment Chroma DC quantization scale. Corresponding to uv_dequant[qindex][0] in vp9_mb_...
Definition: rocdecode.h:982
int16_t luma_ac_quant_scale
Specifies per segment Luma AC quantization scale. Corresponding to y_dequant[qindex][1] in vp9_mb_ini...
Definition: rocdecode.h:967
uint16_t segment_reference_skipped
Indicates if per segment skip feature is enabled. Corresponding to variable feature_enabled when j ==...
Definition: rocdecode.h:953
int16_t chroma_ac_quant_scale
Specifies per segment Chroma AC quantization scale. Corresponding to uv_dequant[qindex][1] in vp9_mb_...
Definition: rocdecode.h:977
uint16_t segment_reference_enabled
Indicates if per segment reference frame indicator is enabled. Corresponding to variable feature_enab...
Definition: rocdecode.h:939
Definition: rocdecode.h:995
uint32_t slice_data_size
The byte count of current frame in the bitstream buffer, starting from first byte of the buffer....
Definition: rocdecode.h:1001
RocdecVp9SegmentParameter seg_param[8]
per segment information
Definition: rocdecode.h:1014
uint32_t slice_data_flag
Definition: rocdecode.h:1009
uint32_t va_reserved[4]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1017
uint32_t slice_data_offset
Definition: rocdecode.h:1005