blob: be241c084a0a278ad58d5eb97c5a94632b9bfe50 [file] [log] [blame]
Harish Mahendrakar0d8951c2014-05-16 10:31:13 -07001/******************************************************************************
2*
3* Copyright (C) 2012 Ittiam Systems Pvt Ltd, Bangalore
4*
5* Licensed under the Apache License, Version 2.0 (the "License");
6* you may not use this file except in compliance with the License.
7* You may obtain a copy of the License at:
8*
9* http://www.apache.org/licenses/LICENSE-2.0
10*
11* Unless required by applicable law or agreed to in writing, software
12* distributed under the License is distributed on an "AS IS" BASIS,
13* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14* See the License for the specific language governing permissions and
15* limitations under the License.
16*
17******************************************************************************/
18/**
19*******************************************************************************
20* @file
21* ihevcd_cxa.h
22*
23* @brief
24* This file contains all the necessary structure and enumeration
25* definitions needed for the Application Program Interface(API) of the
26* Ittiam HEVC decoder on Cortex Ax
27*
28* @author
29* Harish
30*
31* @remarks
32* None
33*
34*******************************************************************************
35*/
36#ifndef __IHEVCD_CXA_H__
37#define __IHEVCD_CXA_H__
38#ifdef __cplusplus
39extern "C" {
40#endif
41#include "iv.h"
42#include "ivd.h"
43
44
45/*****************************************************************************/
46/* Constant Macros */
47/*****************************************************************************/
48
49/*****************************************************************************/
50/* Function Macros */
51/*****************************************************************************/
52#define IS_IVD_CONCEALMENT_APPLIED(x) (x & (1 << IVD_APPLIEDCONCEALMENT))
53#define IS_IVD_INSUFFICIENTDATA_ERROR(x) (x & (1 << IVD_INSUFFICIENTDATA))
54#define IS_IVD_CORRUPTEDDATA_ERROR(x) (x & (1 << IVD_CORRUPTEDDATA))
55#define IS_IVD_CORRUPTEDHEADER_ERROR(x) (x & (1 << IVD_CORRUPTEDHEADER))
56#define IS_IVD_UNSUPPORTEDINPUT_ERROR(x) (x & (1 << IVD_UNSUPPORTEDINPUT))
57#define IS_IVD_UNSUPPORTEDPARAM_ERROR(x) (x & (1 << IVD_UNSUPPORTEDPARAM))
58#define IS_IVD_FATAL_ERROR(x) (x & (1 << IVD_FATALERROR))
59#define IS_IVD_INVALID_BITSTREAM_ERROR(x) (x & (1 << IVD_INVALID_BITSTREAM))
60#define IS_IVD_INCOMPLETE_BITSTREAM_ERROR(x) (x & (1 << IVD_INCOMPLETE_BITSTREAM))
61
62
63/*****************************************************************************/
64/* API Function Prototype */
65/*****************************************************************************/
66IV_API_CALL_STATUS_T ihevcd_cxa_api_function(iv_obj_t *ps_handle,
67 void *pv_api_ip,
68 void *pv_api_op);
69
70/*****************************************************************************/
71/* Enums */
72/*****************************************************************************/
73/* Codec Error codes for HEVC Decoder */
74
75
76typedef enum {
77 /**
78 * No error
79 */
80 IHEVCD_SUCCESS = 0,
81
82 /**
83 * Codec calls done without successful init
84 */
85 IHEVCD_INIT_NOT_DONE = IVD_DUMMY_ELEMENT_FOR_CODEC_EXTENSIONS,
86
87
88 IHEVCD_CXA_VID_HDR_DEC_NUM_FRM_BUF_NOT_SUFFICIENT,
89
90 /**
91 * Unsupported level passed as an argument
92 */
93 IHEVCD_LEVEL_UNSUPPORTED,
94 /**
95 * Unsupported number of reference pictures passed as an argument
96 */
97 IHEVCD_NUM_REF_UNSUPPORTED,
98 /**
99 * Unsupported number of reorder pictures passed as an argument
100 */
101 IHEVCD_NUM_REORDER_UNSUPPORTED,
102 /**
103 * Unsupported number of extra display pictures passed as an argument
104 */
105 IHEVCD_NUM_EXTRA_DISP_UNSUPPORTED,
106 /**
107 * Invalid display stride requested.
108 */
109 IHEVCD_INVALID_DISP_STRD,
110
111 /**
112 * Reached end of sequence
113 */
114 IHEVCD_END_OF_SEQUENCE,
115
116 /**
117 * Width/height greater than max width and max height
118 */
119 IHEVCD_UNSUPPORTED_DIMENSIONS,
120
121 /**
122 * Buffer size to hold version string is not sufficient
123 * Allocate more to hold version string
124 */
125 IHEVCD_CXA_VERS_BUF_INSUFFICIENT,
126 /**
127 * Stream chroma format other than YUV420
128 */
129 IHEVCD_UNSUPPORTED_CHROMA_FMT_IDC,
130
131 /**
132 * Generic failure
133 */
134 IHEVCD_FAIL = 0x7FFFFFFF
135
136
137}IHEVCD_CXA_ERROR_CODES_T;
138
139/*****************************************************************************/
140/* Extended Structures */
141/*****************************************************************************/
142
143/*****************************************************************************/
144/* Get Number of Memory Records */
145/*****************************************************************************/
146
147
148typedef struct {
149
150 /**
151 * ivd_num_mem_rec_ip_t
152 */
153 iv_num_mem_rec_ip_t s_ivd_num_mem_rec_ip_t;
154}ihevcd_cxa_num_mem_rec_ip_t;
155
156
157typedef struct {
158
159 /**
160 * ivd_num_mem_rec_op_t
161 */
162 iv_num_mem_rec_op_t s_ivd_num_mem_rec_op_t;
163}ihevcd_cxa_num_mem_rec_op_t;
164
165
166/*****************************************************************************/
167/* Fill Memory Records */
168/*****************************************************************************/
169
170
171typedef struct {
172 /**
173 * ivd_fill_mem_rec_ip_t
174 */
175 iv_fill_mem_rec_ip_t s_ivd_fill_mem_rec_ip_t;
176
177 /**
178 * level
179 */
180 WORD32 i4_level;
181
182 /**
183 * num_reorder_frames
184 */
185 UWORD32 u4_num_reorder_frames;
186
187 /**
188 * num_ref_frames
189 */
190 UWORD32 u4_num_ref_frames;
191
192 /**
193 * share_disp_buf
194 */
195 UWORD32 u4_share_disp_buf;
196
197 /**
198 * format in which codec has to give out frame data for display
199 */
200 IV_COLOR_FORMAT_T e_output_format;
201
202 /**
203 * Number of extra display buffers that will be allocated to handle display pipeline depth
204 */
205 UWORD32 u4_num_extra_disp_buf;
206
207}ihevcd_cxa_fill_mem_rec_ip_t;
208
209
210typedef struct {
211
212 /**
213 * ivd_fill_mem_rec_op_t
214 */
215
216 iv_fill_mem_rec_op_t s_ivd_fill_mem_rec_op_t;
217
218}ihevcd_cxa_fill_mem_rec_op_t;
219
220/*****************************************************************************/
221/* Retrieve Memory Records */
222/*****************************************************************************/
223
224
225typedef struct {
226
227 /**
228 * ivd_retrieve_mem_rec_ip_t
229 */
230 iv_retrieve_mem_rec_ip_t s_ivd_retrieve_mem_rec_ip_t;
231}ihevcd_cxa_retrieve_mem_rec_ip_t;
232
233
234typedef struct {
235
236 /**
237 * ivd_retrieve_mem_rec_op_t
238 */
239 iv_retrieve_mem_rec_op_t s_ivd_retrieve_mem_rec_op_t;
240}ihevcd_cxa_retrieve_mem_rec_op_t;
241
242
243/*****************************************************************************/
244/* Initialize decoder */
245/*****************************************************************************/
246
247
248typedef struct {
249
250 /**
251 * ivd_init_ip_t
252 */
253 ivd_init_ip_t s_ivd_init_ip_t;
254
255 /**
256 * level
257 */
258 WORD32 i4_level;
259
260 /**
261 * num_reorder_frames
262 */
263 UWORD32 u4_num_reorder_frames;
264
265 /**
266 * num_ref_frames
267 */
268 UWORD32 u4_num_ref_frames;
269
270 /**
271 * share_disp_buf
272 */
273 UWORD32 u4_share_disp_buf;
274
275 /**
276 * Number of extra display buffers that will be allocated to handle display pipeline depth
277 */
278 UWORD32 u4_num_extra_disp_buf;
279}ihevcd_cxa_init_ip_t;
280
281
282typedef struct {
283
284 /**
285 * ivd_init_op_t
286 */
287 ivd_init_op_t s_ivd_init_op_t;
288}ihevcd_cxa_init_op_t;
289
290
291/*****************************************************************************/
292/* Video Decode */
293/*****************************************************************************/
294
295
296typedef struct {
297
298 /**
299 * ivd_video_decode_ip_t
300 */
301 ivd_video_decode_ip_t s_ivd_video_decode_ip_t;
302}ihevcd_cxa_video_decode_ip_t;
303
304
305typedef struct {
306
307 /**
308 * ivd_video_decode_op_t
309 */
310 ivd_video_decode_op_t s_ivd_video_decode_op_t;
311}ihevcd_cxa_video_decode_op_t;
312
313
314/*****************************************************************************/
315/* Get Display Frame */
316/*****************************************************************************/
317
318
319typedef struct
320{
321 /**
322 * ivd_get_display_frame_ip_t
323 */
324 ivd_get_display_frame_ip_t s_ivd_get_display_frame_ip_t;
325}ihevcd_cxa_get_display_frame_ip_t;
326
327
328typedef struct
329{
330 /**
331 * ivd_get_display_frame_op_t
332 */
333 ivd_get_display_frame_op_t s_ivd_get_display_frame_op_t;
334}ihevcd_cxa_get_display_frame_op_t;
335
336/*****************************************************************************/
337/* Set Display Frame */
338/*****************************************************************************/
339
340
341typedef struct
342{
343 /**
344 * ivd_set_display_frame_ip_t
345 */
346 ivd_set_display_frame_ip_t s_ivd_set_display_frame_ip_t;
347}ihevcd_cxa_set_display_frame_ip_t;
348
349
350typedef struct
351{
352 /**
353 * ivd_set_display_frame_op_t
354 */
355 ivd_set_display_frame_op_t s_ivd_set_display_frame_op_t;
356}ihevcd_cxa_set_display_frame_op_t;
357
358/*****************************************************************************/
359/* Release Display Buffers */
360/*****************************************************************************/
361
362
363typedef struct
364{
365 /**
366 * ivd_rel_display_frame_ip_t
367 */
368
369 ivd_rel_display_frame_ip_t s_ivd_rel_display_frame_ip_t;
370}ihevcd_cxa_rel_display_frame_ip_t;
371
372
373typedef struct
374{
375 /**
376 * ivd_rel_display_frame_op_t
377 */
378 ivd_rel_display_frame_op_t s_ivd_rel_display_frame_op_t;
379}ihevcd_cxa_rel_display_frame_op_t;
380
381
382typedef enum
383{
384 /** Set number of cores/threads to be used */
385 IHEVCD_CXA_CMD_CTL_SET_NUM_CORES = IVD_CMD_CTL_CODEC_SUBCMD_START,
386
387 /** Set processor details */
388 IHEVCD_CXA_CMD_CTL_SET_PROCESSOR = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x001,
389
390 /** Get display buffer dimensions */
391 IHEVCD_CXA_CMD_CTL_GET_BUFFER_DIMENSIONS = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x100,
392
393 /** Get VUI parameters */
394 IHEVCD_CXA_CMD_CTL_GET_VUI_PARAMS = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x101,
395
396 /** Enable/disable GPU, supported on select platforms */
397 IHEVCD_CXA_CMD_CTL_GPU_ENABLE_DISABLE = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x200,
398
399 /** Set degrade level */
400 IHEVCD_CXA_CMD_CTL_DEGRADE = IVD_CMD_CTL_CODEC_SUBCMD_START + 0x300
401}IHEVCD_CXA_CMD_CTL_SUB_CMDS;
402/*****************************************************************************/
403/* Video control Flush */
404/*****************************************************************************/
405
406
407typedef struct {
408
409 /**
410 * ivd_ctl_flush_ip_t
411 */
412 ivd_ctl_flush_ip_t s_ivd_ctl_flush_ip_t;
413}ihevcd_cxa_ctl_flush_ip_t;
414
415
416typedef struct {
417
418 /**
419 * ivd_ctl_flush_op_t
420 */
421 ivd_ctl_flush_op_t s_ivd_ctl_flush_op_t;
422}ihevcd_cxa_ctl_flush_op_t;
423
424/*****************************************************************************/
425/* Video control reset */
426/*****************************************************************************/
427
428
429typedef struct {
430
431 /**
432 * ivd_ctl_reset_ip_t
433 */
434 ivd_ctl_reset_ip_t s_ivd_ctl_reset_ip_t;
435}ihevcd_cxa_ctl_reset_ip_t;
436
437
438typedef struct {
439
440 /**
441 * ivd_ctl_reset_op_t
442 */
443 ivd_ctl_reset_op_t s_ivd_ctl_reset_op_t;
444}ihevcd_cxa_ctl_reset_op_t;
445
446
447/*****************************************************************************/
448/* Video control Set Params */
449/*****************************************************************************/
450
451
452typedef struct {
453
454 /**
455 * ivd_ctl_set_config_ip_t
456 */
457 ivd_ctl_set_config_ip_t s_ivd_ctl_set_config_ip_t;
458}ihevcd_cxa_ctl_set_config_ip_t;
459
460
461typedef struct {
462
463 /**
464 * ivd_ctl_set_config_op_t
465 */
466 ivd_ctl_set_config_op_t s_ivd_ctl_set_config_op_t;
467}ihevcd_cxa_ctl_set_config_op_t;
468
469/*****************************************************************************/
470/* Video control:Get Buf Info */
471/*****************************************************************************/
472
473
474typedef struct {
475
476 /**
477 * ivd_ctl_getbufinfo_ip_t
478 */
479 ivd_ctl_getbufinfo_ip_t s_ivd_ctl_getbufinfo_ip_t;
480}ihevcd_cxa_ctl_getbufinfo_ip_t;
481
482
483
484typedef struct {
485
486 /**
487 * ivd_ctl_getbufinfo_op_t
488 */
489 ivd_ctl_getbufinfo_op_t s_ivd_ctl_getbufinfo_op_t;
490}ihevcd_cxa_ctl_getbufinfo_op_t;
491
492
493/*****************************************************************************/
494/* Video control:Getstatus Call */
495/*****************************************************************************/
496
497
498typedef struct {
499
500 /**
501 * ivd_ctl_getstatus_ip_t
502 */
503 ivd_ctl_getstatus_ip_t s_ivd_ctl_getstatus_ip_t;
504}ihevcd_cxa_ctl_getstatus_ip_t;
505
506
507
508typedef struct {
509
510 /**
511 * ivd_ctl_getstatus_op_t
512 */
513 ivd_ctl_getstatus_op_t s_ivd_ctl_getstatus_op_t;
514}ihevcd_cxa_ctl_getstatus_op_t;
515
516
517/*****************************************************************************/
518/* Video control:Get Version Info */
519/*****************************************************************************/
520
521
522typedef struct {
523
524 /**
525 * ivd_ctl_getversioninfo_ip_t
526 */
527 ivd_ctl_getversioninfo_ip_t s_ivd_ctl_getversioninfo_ip_t;
528}ihevcd_cxa_ctl_getversioninfo_ip_t;
529
530
531
532typedef struct {
533
534 /**
535 * ivd_ctl_getversioninfo_op_t
536 */
537 ivd_ctl_getversioninfo_op_t s_ivd_ctl_getversioninfo_op_t;
538}ihevcd_cxa_ctl_getversioninfo_op_t;
539
540
541typedef struct {
542
543 /**
544 * u4_size
545 */
546 UWORD32 u4_size;
547
548 /**
549 * cmd
550 */
551 IVD_API_COMMAND_TYPE_T e_cmd;
552
553 /**
554 * sub_cmd
555 */
556 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd;
557
558 /**
559 * Pictures that are are degraded
560 * 0 : No degrade
561 * 1 : Only on non-reference frames
562 * 2 : Use interval specified by u4_nondegrade_interval
563 * 3 : All non-key frames
564 * 4 : All frames
565 */
566 WORD32 i4_degrade_pics;
567
568 /**
569 * Interval for pictures which are completely decoded without any degradation
570 */
571 WORD32 i4_nondegrade_interval;
572
573 /**
574 * bit position (lsb is zero): Type of degradation
575 * 0 : Disable SAO
576 * 1 : Disable deblocking
577 * 2 : Faster inter prediction filters
578 * 3 : Fastest inter prediction filters
579 */
580 WORD32 i4_degrade_type;
581
582}ihevcd_cxa_ctl_degrade_ip_t;
583
584typedef struct
585{
586 /**
587 * u4_size
588 */
589 UWORD32 u4_size;
590
591 /**
592 * error_code
593 */
594 UWORD32 u4_error_code;
595}ihevcd_cxa_ctl_degrade_op_t;
596
597typedef struct
598{
599
600 /**
601 * size
602 */
603 UWORD32 u4_size;
604
605 /**
606 * cmd
607 */
608 IVD_API_COMMAND_TYPE_T e_cmd;
609
610 /**
611 * sub_cmd
612 */
613 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd;
614
615 /**
616 * num_cores
617 */
618 UWORD32 u4_num_cores;
619}ihevcd_cxa_ctl_set_num_cores_ip_t;
620
621typedef struct
622{
623
624 /**
625 * size
626 */
627 UWORD32 u4_size;
628
629 /**
630 * error_code
631 */
632 UWORD32 u4_error_code;
633}ihevcd_cxa_ctl_set_num_cores_op_t;
634
635typedef struct
636{
637 /**
638 * size
639 */
640 UWORD32 u4_size;
641 /**
642 * cmd
643 */
644 IVD_API_COMMAND_TYPE_T e_cmd;
645 /**
646 * sub cmd
647 */
648 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd;
649 /**
650 * Processor type
651 */
652 UWORD32 u4_arch;
653 /**
654 * SOC type
655 */
656 UWORD32 u4_soc;
657
658 /**
659 * num_cores
660 */
661 UWORD32 u4_num_cores;
662
663}ihevcd_cxa_ctl_set_processor_ip_t;
664
665typedef struct
666{
667 /**
668 * size
669 */
670 UWORD32 u4_size;
671 /**
672 * error_code
673 */
674 UWORD32 u4_error_code;
675}ihevcd_cxa_ctl_set_processor_op_t;
676
677typedef struct
678{
679
680 /**
681 * size
682 */
683 UWORD32 u4_size;
684
685 /**
686 * cmd
687 */
688 IVD_API_COMMAND_TYPE_T e_cmd;
689
690 /**
691 * sub cmd
692 */
693 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd;
694}ihevcd_cxa_ctl_get_frame_dimensions_ip_t;
695
696
697typedef struct {
698
699 /**
700 * size
701 */
702 UWORD32 u4_size;
703
704 /**
705 * error_code
706 */
707 UWORD32 u4_error_code;
708
709 /**
710 * x_offset[3]
711 */
712 UWORD32 u4_x_offset[3];
713
714 /**
715 * y_offset[3]
716 */
717 UWORD32 u4_y_offset[3];
718
719 /**
720 * disp_wd[3]
721 */
722 UWORD32 u4_disp_wd[3];
723
724 /**
725 * disp_ht[3]
726 */
727 UWORD32 u4_disp_ht[3];
728
729 /**
730 * buffer_wd[3]
731 */
732 UWORD32 u4_buffer_wd[3];
733
734 /**
735 * buffer_ht[3]
736 */
737 UWORD32 u4_buffer_ht[3];
738}ihevcd_cxa_ctl_get_frame_dimensions_op_t;
739
740typedef struct {
741 UWORD32 u4_size;
742 IVD_API_COMMAND_TYPE_T e_cmd;
743 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd;
744}ihevcd_cxa_ctl_get_vui_params_ip_t;
745
746typedef struct {
747 UWORD32 u4_size;
748 UWORD32 u4_error_code;
749
750 /**
751 * indicates the presence of aspect_ratio
752 */
753 UWORD8 u1_aspect_ratio_info_present_flag;
754
755 /**
756 * specifies the aspect ratio of the luma samples
757 */
758 UWORD8 u1_aspect_ratio_idc;
759
760 /**
761 * width of the luma samples. user dependent
762 */
763 UWORD16 u2_sar_width;
764
765 /**
766 * hieght of the luma samples. user dependent
767 */
768 UWORD16 u2_sar_height;
769
770 /**
771 * if 1, specifies that the overscan_appropriate_flag is present
772 * if 0, the preferred display method for the video signal is unspecified
773 */
774 UWORD8 u1_overscan_info_present_flag;
775
776 /**
777 * if 1,indicates that the cropped decoded pictures output
778 * are suitable for display using overscan
779 */
780 UWORD8 u1_overscan_appropriate_flag;
781
782 /**
783 * if 1 specifies that video_format, video_full_range_flag and
784 * colour_description_present_flag are present
785 */
786 UWORD8 u1_video_signal_type_present_flag;
787
788 /**
789 *
790 */
791 UWORD8 u1_video_format;
792
793 /**
794 * indicates the black level and range of the luma and chroma signals
795 */
796 UWORD8 u1_video_full_range_flag;
797
798 /**
799 * if 1,to 1 specifies that colour_primaries, transfer_characteristics
800 * and matrix_coefficients are present
801 */
802 UWORD8 u1_colour_description_present_flag;
803
804 /**
805 * indicates the chromaticity coordinates of the source primaries
806 */
807 UWORD8 u1_colour_primaries;
808
809 /**
810 * indicates the opto-electronic transfer characteristic of the source picture
811 */
812 UWORD8 u1_transfer_characteristics;
813
814 /**
815 * the matrix coefficients used in deriving luma and chroma signals
816 * from the green, blue, and red primaries
817 */
818 UWORD8 u1_matrix_coefficients;
819
820 /**
821 * if 1, specifies that chroma_sample_loc_type_top_field and
822 * chroma_sample_loc_type_bottom_field are present
823 */
824 UWORD8 u1_chroma_loc_info_present_flag;
825
826 /**
827 * location of chroma samples
828 */
829 UWORD8 u1_chroma_sample_loc_type_top_field;
830
831 UWORD8 u1_chroma_sample_loc_type_bottom_field;
832
833 /**
834 * if 1, indicates that the value of all decoded chroma samples is
835 * equal to 1 << ( BitDepthC - 1 )
836 */
837 UWORD8 u1_neutral_chroma_indication_flag;
838
839 /**
840 * 1 indicates that the coded video sequence conveys pictures that represent fields
841 * 0 indicates the pictures that represents field
842 */
843 UWORD8 u1_field_seq_flag;
844
845 /**
846 * specifies that picture timing SEI messages are present for every picture
847 */
848 UWORD8 u1_frame_field_info_present_flag;
849
850 /**
851 * 1 indicates that the default display window parameters follow next in the VUI
852 */
853 UWORD8 u1_default_display_window_flag;
854
855 /**
856 * specify the samples of the pictures in the coded video sequence
857 * that are within the default display window,
858 * in terms of a rectangular region specified in picture coordinates for display
859 */
860 UWORD32 u4_def_disp_win_left_offset;
861
862 UWORD32 u4_def_disp_win_right_offset;
863
864 UWORD32 u4_def_disp_win_top_offset;
865
866 UWORD32 u4_def_disp_win_bottom_offset;
867
868 /**
869 * to 1 specifies that the syntax structure hrd_parameters is present in the vui_parameters syntax structue
870 */
871 UWORD8 u1_vui_hrd_parameters_present_flag;
872
873 /**
874 * Indicates the presence of the
875 * num_units_in_ticks, time_scale flag
876 */
877 UWORD8 u1_vui_timing_info_present_flag;
878
879 /**
880 * Number of units that
881 * correspond to one increment of the
882 * clock. Indicates the resolution
883 */
884 UWORD32 u4_vui_num_units_in_tick;
885
886 /**
887 * The number of time units that pass in one second
888 */
889 UWORD32 u4_vui_time_scale;
890 /**
891 * if 1, indicates that the POC for each picture in the coded video sequence (cvs) (not the first picture), in decoding order,
892 * is proportional to the output time of the picture relative to that of the first picture in the cvs
893 */
894 UWORD8 u1_poc_proportional_to_timing_flag;
895
896 /**
897 * num_ticks_poc_diff_one_minus1 plus 1 specifies the number of clock ticks
898 * corresponding to a difference of poc values equal to 1
899 */
900 UWORD8 u1_num_ticks_poc_diff_one_minus1;
901
902 /**
903 * 1, specifies that the following cvs bitstream restriction parameters are present
904 */
905 UWORD8 u1_bitstream_restriction_flag;
906
907 /**
908 * if 1, indicates that each pps that is active in the cvs has
909 * the same value of the tile syntax elements
910 */
911 UWORD8 u1_tiles_fixed_structure_flag;
912
913 /**
914 * if 0, indicates that no pel outside the pic boundaries and
915 * no sub-pels derived using pels outside the pic boundaries is used for inter prediction
916 */
917 UWORD8 u1_motion_vectors_over_pic_boundaries_flag;
918
919 /**
920 * if 1, indicates
921 * all P/B slices belonging to the same pic have an identical refpic list0,
922 * all B slices that belong to the same picture have an identical refpic list1.
923 */
924 UWORD8 u1_restricted_ref_pic_lists_flag;
925
926 /**
927 *
928 */
929 UWORD8 u4_min_spatial_segmentation_idc;
930 /**
931 * Indicates a number of bytes not exceeded by the sum of the sizes of the VCL NAL units
932 * associated with any coded picture
933 */
934 UWORD8 u1_max_bytes_per_pic_denom;
935
936 /**
937 * Indicates an upper bound for the number of bits of coding_unit() data
938 */
939 UWORD8 u1_max_bits_per_mincu_denom;
940
941 /**
942 * Indicate the maximum absolute value of a decoded horizontal MV component
943 * in quarter-pel luma units
944 */
945 UWORD8 u1_log2_max_mv_length_horizontal;
946
947 /**
948 * Indicate the maximum absolute value of a decoded vertical MV component
949 * in quarter-pel luma units
950 */
951 UWORD8 u1_log2_max_mv_length_vertical;
952
953 /**
954 * HRD parameters
955 */
956
957
958 /**
959 * Indicates the presence of the
960 * num_units_in_ticks, time_scale flag
961 */
962 UWORD8 u1_timing_info_present_flag;
963
964 /**
965 * Number of units that
966 * correspond to one increment of the
967 * clock. Indicates the resolution
968 */
969 UWORD32 u4_num_units_in_tick;
970
971 /**
972 * The number of time units that pass in one second
973 */
974 UWORD32 u4_time_scale;
975
976 /**
977 * Nal- hrd parameters flag
978 */
979 UWORD8 u1_nal_hrd_parameters_present_flag;
980
981 /**
982 * VCL- hrd parameters flag
983 */
984 UWORD8 u1_vcl_hrd_parameters_present_flag;
985
986 /**
987 * Indicates the presence of NAL-HRD params or VCL_HRD params
988 * in the bitstream
989 */
990 UWORD8 u1_cpbdpb_delays_present_flag;
991
992 /**
993 * specifies that sub-picture level CPB removal delay parameters are
994 * present in picture timing SEI messages
995 */
996 UWORD8 u1_sub_pic_cpb_params_present_flag;
997
998 /**
999 * specify the clock sub-tick
1000 * (the minimum interval of time that can be represented in the coded data when sub_pic_cpb_params_present_flag is equal to 1)
1001 */
1002 UWORD8 u1_tick_divisor_minus2;
1003
1004 /**
1005 * specifies the length, in bits for the du cpb delay syntax in pt_sei
1006 */
1007 UWORD8 u1_du_cpb_removal_delay_increment_length_minus1;
1008
1009 /**
1010 * Indicates presence of sub_pic_cpb_params in pic timing sei
1011 */
1012 UWORD8 u1_sub_pic_cpb_params_in_pic_timing_sei_flag;
1013
1014 /**
1015 * Indicates dpb output delay for the du
1016 */
1017 UWORD8 u1_dpb_output_delay_du_length_minus1;
1018
1019 /**
1020 * (together with bit_rate_value_minus1) specifies the
1021 * maximum input bit rate of the i-th CPB
1022 */
1023 UWORD8 u4_bit_rate_scale;
1024
1025 /**
1026 * (together with cpb_size_du_value_minus1) specfies
1027 * CPB size of the i-th CPB when the CPB operates
1028 * at the access unit level
1029 */
1030 UWORD8 u4_cpb_size_scale;
1031
1032 /**
1033 * (together with cpb_size_du_value_minus1) specfies
1034 * CPB size of the i-th CPB when the CPB operates
1035 * at the sub-picture level
1036 */
1037 UWORD8 u4_cpb_size_du_scale;
1038
1039
1040 /**
1041 * specifies the length, in bits for initial cpb delay (nal/vcl)sysntax in bp sei
1042 */
1043 UWORD8 u1_initial_cpb_removal_delay_length_minus1;
1044
1045 /**
1046 * specifies the length, in bits for the au cpb delay syntax in pt_sei
1047 */
1048 UWORD8 u1_au_cpb_removal_delay_length_minus1;
1049
1050 /**
1051 * specifies the length, in bits, of the pic_dpb_output_delay syntax element in the pt SEI message
1052 */
1053 UWORD8 u1_dpb_output_delay_length_minus1;
1054
1055 /**
1056 * if 1, , for the highest temporal sub-layers, the temporal distance between the HRD output times
1057 * of consecutive pictures in output order is constrained refer to Table E-6
1058 */
1059 UWORD8 au1_fixed_pic_rate_general_flag[6];
1060
1061 UWORD8 au1_fixed_pic_rate_within_cvs_flag[6];
1062
1063 /**
1064 * if 1, , for the highest temporal sub-layers, the temporal distance (in clock ticks) between the
1065 * element units that specify HRD output times of consecutive pictures in output order is constrained
1066 * refer to Table E-6
1067 */
1068 UWORD8 au1_elemental_duration_in_tc_minus1[6];
1069
1070 /**
1071 * specifies the HRD operational mode
1072 */
1073 UWORD8 au1_low_delay_hrd_flag[6];
1074
1075 /**
1076 * 1 specifies the number of alternative CPB specifications in the
1077 * bitstream of the cvs when HighestTid is equal to i
1078 */
1079 UWORD8 au1_cpb_cnt_minus1[6];
1080}ihevcd_cxa_ctl_get_vui_params_op_t;
1081
1082#ifdef GPU_BUILD
1083typedef struct {
1084 UWORD32 u4_size;
1085 IVD_API_COMMAND_TYPE_T e_cmd;
1086 IVD_CONTROL_API_COMMAND_TYPE_T e_sub_cmd;
1087 UWORD32 u4_gpu_enable_diable; // 1 - Enable 0 - Diable
1088}ihevcd_cxa_ctl_gpu_enable_diable_ip_t;
1089
1090typedef struct {
1091 UWORD32 u4_size;
1092 UWORD32 u4_error_code;
1093}ihevcd_cxa_ctl_gpu_enable_diable_op_t;
1094#endif
1095#ifdef __cplusplus
1096} /* closing brace for extern "C" */
1097#endif
1098#endif /* __IHEVCD_CXA_H__ */