FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dynlink_cuviddec.h
Go to the documentation of this file.
1 /*
2  * This copyright notice applies to this header file only:
3  *
4  * Copyright (c) 2010-2017 NVIDIA Corporation
5  *
6  * Permission is hereby granted, free of charge, to any person
7  * obtaining a copy of this software and associated documentation
8  * files (the "Software"), to deal in the Software without
9  * restriction, including without limitation the rights to use,
10  * copy, modify, merge, publish, distribute, sublicense, and/or sell
11  * copies of the software, and to permit persons to whom the
12  * software is furnished to do so, subject to the following
13  * conditions:
14  *
15  * The above copyright notice and this permission notice shall be
16  * included in all copies or substantial portions of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  */
27 
28 /*****************************************************************************************************/
29 //! \file cuviddec.h
30 //! NVDECODE API provides video decoding interface to NVIDIA GPU devices.
31 //! \date 2015-2017
32 //! This file contains constants, structure definitions and function prototypes used for decoding.
33 /*****************************************************************************************************/
34 
35 #if !defined(__CUDA_VIDEO_H__)
36 #define __CUDA_VIDEO_H__
37 
38 #if defined(_WIN64) || defined(__LP64__) || defined(__x86_64) || defined(AMD64) || defined(_M_AMD64)
39 #if (CUDA_VERSION >= 3020) && (!defined(CUDA_FORCE_API_VERSION) || (CUDA_FORCE_API_VERSION >= 3020))
40 #define __CUVID_DEVPTR64
41 #endif
42 #endif
43 
44 #if defined(__cplusplus)
45 extern "C" {
46 #endif /* __cplusplus */
47 
48 #if defined(__CYGWIN__)
49 typedef unsigned int tcu_ulong;
50 #else
51 typedef unsigned long tcu_ulong;
52 #endif
53 
54 typedef void *CUvideodecoder;
55 typedef struct _CUcontextlock_st *CUvideoctxlock;
56 
57 /*********************************************************************************/
58 //! \enum cudaVideoCodec
59 //! Video codec enums
60 //! These enums are used in CUVIDDECODECREATEINFO and CUVIDDECODECAPS structures
61 /*********************************************************************************/
62 typedef enum cudaVideoCodec_enum {
63  cudaVideoCodec_MPEG1=0, /**< MPEG1 */
64  cudaVideoCodec_MPEG2, /**< MPEG2 */
65  cudaVideoCodec_MPEG4, /**< MPEG4 */
66  cudaVideoCodec_VC1, /**< VC1 */
67  cudaVideoCodec_H264, /**< H264 */
68  cudaVideoCodec_JPEG, /**< JPEG */
69  cudaVideoCodec_H264_SVC, /**< H264-SVC */
70  cudaVideoCodec_H264_MVC, /**< H264-MVC */
71  cudaVideoCodec_HEVC, /**< HEVC */
72  cudaVideoCodec_VP8, /**< VP8 */
73  cudaVideoCodec_VP9, /**< VP9 */
74  cudaVideoCodec_NumCodecs, /**< Max codecs */
75  // Uncompressed YUV
76  cudaVideoCodec_YUV420 = (('I'<<24)|('Y'<<16)|('U'<<8)|('V')), /**< Y,U,V (4:2:0) */
77  cudaVideoCodec_YV12 = (('Y'<<24)|('V'<<16)|('1'<<8)|('2')), /**< Y,V,U (4:2:0) */
78  cudaVideoCodec_NV12 = (('N'<<24)|('V'<<16)|('1'<<8)|('2')), /**< Y,UV (4:2:0) */
79  cudaVideoCodec_YUYV = (('Y'<<24)|('U'<<16)|('Y'<<8)|('V')), /**< YUYV/YUY2 (4:2:2) */
80  cudaVideoCodec_UYVY = (('U'<<24)|('Y'<<16)|('V'<<8)|('Y')) /**< UYVY (4:2:2) */
82 
83 /*********************************************************************************/
84 //! \enum cudaVideoSurfaceFormat
85 //! Video surface format enums used for output format of decoded output
86 //! These enums are used in CUVIDDECODECREATEINFO structure
87 /*********************************************************************************/
88 typedef enum cudaVideoSurfaceFormat_enum {
89  cudaVideoSurfaceFormat_NV12=0, /**< NV12 format */
90  cudaVideoSurfaceFormat_P016=1 /**< 16 bit semiplaner format. Can be used for 10 bit(6LSB bits 0),
91  12 bit (4LSB bits 0) */
93 
94 /******************************************************************************************************************/
95 //! \enum cudaVideoDeinterlaceMode
96 //! Deinterlacing mode enums
97 //! These enums are used in CUVIDDECODECREATEINFO structure
98 //! Use cudaVideoDeinterlaceMode_Weave for progressive content and for content that doesn't need deinterlacing
99 //! cudaVideoDeinterlaceMode_Adaptive needs more video memory than other DImodes
100 /******************************************************************************************************************/
101 typedef enum cudaVideoDeinterlaceMode_enum {
102  cudaVideoDeinterlaceMode_Weave=0, /**< Weave both fields (no deinterlacing) */
103  cudaVideoDeinterlaceMode_Bob, /**< Drop one field */
104  cudaVideoDeinterlaceMode_Adaptive /**< Adaptive deinterlacing */
106 
107 /**************************************************************************************************************/
108 //! \enum cudaVideoChromaFormat
109 //! Chroma format enums
110 //! These enums are used in CUVIDDECODECREATEINFO and CUVIDDECODECAPS structures
111 //! JPEG supports Monochrome, YUV 4:2:0, YUV 4:2:2 and YUV 4:4:4 chroma formats.
112 //! H264, HEVC, VP9, VP8, VC1, MPEG1, MPEG2 and MPEG4 support YUV 4:2:0 chroma format only.
113 /**************************************************************************************************************/
114 typedef enum cudaVideoChromaFormat_enum {
115  cudaVideoChromaFormat_Monochrome=0, /**< MonoChrome */
116  cudaVideoChromaFormat_420, /**< YUV 4:2:0 */
117  cudaVideoChromaFormat_422, /**< YUV 4:2:2 */
118  cudaVideoChromaFormat_444 /**< YUV 4:4:4 */
120 
121 /*************************************************************************************************************/
122 //! \enum cudaVideoCreateFlags
123 //! Decoder flag enums to select preferred decode path
124 //! cudaVideoCreate_Default and cudaVideoCreate_PreferCUVID are most optimized, use these whenever possible
125 /*************************************************************************************************************/
126 typedef enum cudaVideoCreateFlags_enum {
127  cudaVideoCreate_Default = 0x00, /**< Default operation mode: use dedicated video engines */
128  cudaVideoCreate_PreferCUDA = 0x01, /**< Use CUDA-based decoder (requires valid vidLock object for multi-threading) */
129  cudaVideoCreate_PreferDXVA = 0x02, /**< Go through DXVA internally if possible (requires D3D9 interop) */
130  cudaVideoCreate_PreferCUVID = 0x04 /**< Use dedicated video engines directly */
132 
133 
134 /**************************************************************************************************************/
135 //! \struct CUVIDDECODECAPS;
136 //! This structure is used in cuvidGetDecoderCaps API
137 /**************************************************************************************************************/
138 typedef struct _CUVIDDECODECAPS
139 {
140  cudaVideoCodec eCodecType; /**< IN: cudaVideoCodec_XXX */
141  cudaVideoChromaFormat eChromaFormat; /**< IN: cudaVideoChromaFormat_XXX */
142  unsigned int nBitDepthMinus8; /**< IN: The Value "BitDepth minus 8" */
143  unsigned int reserved1[3]; /**< Reserved for future use - set to zero */
144 
145  unsigned char bIsSupported; /**< OUT: 1 if codec supported, 0 if not supported */
146  unsigned char reserved2[3]; /**< Reserved for future use - set to zero */
147  unsigned int nMaxWidth; /**< OUT: Max supported coded width in pixels */
148  unsigned int nMaxHeight; /**< OUT: Max supported coded height in pixels */
149  unsigned int nMaxMBCount; /**< OUT: Max supported macroblock count
150  CodedWidth*CodedHeight/256 must be <= nMaxMBCount */
151  unsigned short nMinWidth; /**< OUT: Min supported coded width in pixels */
152  unsigned short nMinHeight; /**< OUT: Min supported coded height in pixels */
153  unsigned int reserved3[11]; /**< Reserved for future use - set to zero */
155 
156 /**************************************************************************************************************/
157 //! \struct CUVIDDECODECREATEINFO
158 //! This structure is used in cuvidCreateDecoder API
159 /**************************************************************************************************************/
160 typedef struct _CUVIDDECODECREATEINFO
161 {
162  tcu_ulong ulWidth; /**< IN: Coded sequence width in pixels */
163  tcu_ulong ulHeight; /**< IN: Coded sequence height in pixels */
164  tcu_ulong ulNumDecodeSurfaces; /**< IN: Maximum number of internal decode surfaces */
165  cudaVideoCodec CodecType; /**< IN: cudaVideoCodec_XXX */
166  cudaVideoChromaFormat ChromaFormat; /**< IN: cudaVideoChromaFormat_XXX */
167  tcu_ulong ulCreationFlags; /**< IN: Decoder creation flags (cudaVideoCreateFlags_XXX) */
168  tcu_ulong bitDepthMinus8; /**< IN: The value "BitDepth minus 8" */
169  tcu_ulong ulIntraDecodeOnly; /**< IN: Set 1 only if video has all intra frames (default value is 0). This will
170  optimize video memory for Intra frames only decoding. The support is limited
171  to specific codecs(H264 rightnow), the flag will be ignored for codecs which
172  are not supported. However decoding might fail if the flag is enabled in case
173  of supported codecs for regular bit streams having P and/or B frames. */
174  tcu_ulong Reserved1[3]; /**< Reserved for future use - set to zero */
175  /**
176  * IN: area of the frame that should be displayed
177  */
178  struct {
179  short left;
180  short top;
181  short right;
182  short bottom;
183  } display_area;
184 
185  cudaVideoSurfaceFormat OutputFormat; /**< IN: cudaVideoSurfaceFormat_XXX */
186  cudaVideoDeinterlaceMode DeinterlaceMode; /**< IN: cudaVideoDeinterlaceMode_XXX */
187  tcu_ulong ulTargetWidth; /**< IN: Post-processed output width (Should be aligned to 2) */
188  tcu_ulong ulTargetHeight; /**< IN: Post-processed output height (Should be aligbed to 2) */
189  tcu_ulong ulNumOutputSurfaces; /**< IN: Maximum number of output surfaces simultaneously mapped */
190  CUvideoctxlock vidLock; /**< IN: If non-NULL, context lock used for synchronizing ownership of
191  the cuda context. Needed for cudaVideoCreate_PreferCUDA decode */
192  /**
193  * IN: target rectangle in the output frame (for aspect ratio conversion)
194  * if a null rectangle is specified, {0,0,ulTargetWidth,ulTargetHeight} will be used
195  */
196  struct {
197  short left;
198  short top;
199  short right;
200  short bottom;
201  } target_rect;
202  tcu_ulong Reserved2[5]; /**< Reserved for future use - set to zero */
204 
205 /*********************************************************/
206 //! \struct CUVIDH264DPBENTRY
207 //! H.264 DPB entry
208 //! This structure is used in CUVIDH264PICPARAMS structure
209 /*********************************************************/
210 typedef struct _CUVIDH264DPBENTRY
211 {
212  int PicIdx; /**< picture index of reference frame */
213  int FrameIdx; /**< frame_num(short-term) or LongTermFrameIdx(long-term) */
214  int is_long_term; /**< 0=short term reference, 1=long term reference */
215  int not_existing; /**< non-existing reference frame (corresponding PicIdx should be set to -1) */
216  int used_for_reference; /**< 0=unused, 1=top_field, 2=bottom_field, 3=both_fields */
217  int FieldOrderCnt[2]; /**< field order count of top and bottom fields */
219 
220 /************************************************************/
221 //! \struct CUVIDH264MVCEXT
222 //! H.264 MVC picture parameters ext
223 //! This structure is used in CUVIDH264PICPARAMS structure
224 /************************************************************/
225 typedef struct _CUVIDH264MVCEXT
226 {
227  int num_views_minus1; /**< Max number of coded views minus 1 in video : Range - 0 to 1023 */
228  int view_id; /**< view identifier */
229  unsigned char inter_view_flag; /**< 1 if used for inter-view prediction, 0 if not */
230  unsigned char num_inter_view_refs_l0; /**< number of inter-view ref pics in RefPicList0 */
231  unsigned char num_inter_view_refs_l1; /**< number of inter-view ref pics in RefPicList1 */
232  unsigned char MVCReserved8Bits; /**< Reserved bits */
233  int InterViewRefsL0[16]; /**< view id of the i-th view component for inter-view prediction in RefPicList0 */
234  int InterViewRefsL1[16]; /**< view id of the i-th view component for inter-view prediction in RefPicList1 */
236 
237 /*********************************************************/
238 //! \struct CUVIDH264SVCEXT
239 //! H.264 SVC picture parameters ext
240 //! This structure is used in CUVIDH264PICPARAMS structure
241 /*********************************************************/
242 typedef struct _CUVIDH264SVCEXT
243 {
244  unsigned char profile_idc;
245  unsigned char level_idc;
246  unsigned char DQId;
247  unsigned char DQIdMax;
252 
253  unsigned short DPBEntryValidFlag;
259  unsigned char chroma_phase_y_plus1;
260 
264  unsigned char store_ref_base_pic_flag;
265  unsigned char Reserved8BitsA;
266  unsigned char Reserved8BitsB;
267 
272  unsigned short Reserved16Bits;
273  struct _CUVIDPICPARAMS *pNextLayer; /**< Points to the picparams for the next layer to be decoded.
274  Linked list ends at the target layer. */
275  int bRefBaseLayer; /**< whether to store ref base pic */
277 
278 /******************************************************/
279 //! \struct CUVIDH264PICPARAMS
280 //! H.264 picture parameters
281 //! This structure is used in CUVIDPICPARAMS structure
282 /******************************************************/
283 typedef struct _CUVIDH264PICPARAMS
284 {
285  // SPS
292  int num_ref_frames; // NOTE: shall meet level 4.1 restrictions
294  unsigned char bit_depth_luma_minus8; // Must be 0 (only 8-bit supported)
295  unsigned char bit_depth_chroma_minus8; // Must be 0 (only 8-bit supported)
297  // PPS
314  int CurrFieldOrderCnt[2];
315  // DPB
316  CUVIDH264DPBENTRY dpb[16]; // List of reference frames within the DPB
317  // Quantization Matrices (raster-order)
318  unsigned char WeightScale4x4[6][16];
319  unsigned char WeightScale8x8[2][64];
320  // FMO/ASO
321  unsigned char fmo_aso_enable;
322  unsigned char num_slice_groups_minus1;
323  unsigned char slice_group_map_type;
324  signed char pic_init_qs_minus26;
326  union
327  {
328  unsigned long long slice_group_map_addr;
329  const unsigned char *pMb2SliceGroupMap;
330  } fmo;
331  unsigned int Reserved[12];
332  // SVC/MVC
333  union
334  {
337  };
339 
340 
341 /********************************************************/
342 //! \struct CUVIDMPEG2PICPARAMS
343 //! MPEG-2 picture parameters
344 //! This structure is used in CUVIDPICPARAMS structure
345 /********************************************************/
346 typedef struct _CUVIDMPEG2PICPARAMS
347 {
348  int ForwardRefIdx; // Picture index of forward reference (P/B-frames)
349  int BackwardRefIdx; // Picture index of backward reference (B-frames)
353  int f_code[2][2];
361  // Quantization matrices (raster order)
362  unsigned char QuantMatrixIntra[64];
363  unsigned char QuantMatrixInter[64];
365 
366 // MPEG-4 has VOP types instead of Picture types
367 #define I_VOP 0
368 #define P_VOP 1
369 #define B_VOP 2
370 #define S_VOP 3
371 
372 /*******************************************************/
373 //! \struct CUVIDMPEG4PICPARAMS
374 //! MPEG-4 picture parameters
375 //! This structure is used in CUVIDPICPARAMS structure
376 /*******************************************************/
377 typedef struct _CUVIDMPEG4PICPARAMS
378 {
379  int ForwardRefIdx; // Picture index of forward reference (P/B-frames)
380  int BackwardRefIdx; // Picture index of backward reference (B-frames)
381  // VOL
391  // VOP
399  int trd[2];
400  int trb[2];
401  // Quantization matrices (raster order)
402  unsigned char QuantMatrixIntra[64];
403  unsigned char QuantMatrixInter[64];
406 
407 /********************************************************/
408 //! \struct CUVIDVC1PICPARAMS
409 //! VC1 picture parameters
410 //! This structure is used in CUVIDPICPARAMS structure
411 /********************************************************/
412 typedef struct _CUVIDVC1PICPARAMS
413 {
414  int ForwardRefIdx; /**< Picture index of forward reference (P/B-frames) */
415  int BackwardRefIdx; /**< Picture index of backward reference (B-frames) */
416  int FrameWidth; /**< Actual frame width */
417  int FrameHeight; /**< Actual frame height */
418  // PICTURE
419  int intra_pic_flag; /**< Set to 1 for I,BI frames */
420  int ref_pic_flag; /**< Set to 1 for I,P frames */
421  int progressive_fcm; /**< Progressive frame */
422  // SEQUENCE
423  int profile;
425  int pulldown;
429  int psf;
430  int multires;
432  int rangered;
434  // ENTRYPOINT
438  int dquant;
441  int fastuvmc;
442  int overlap;
449  int rangeredfrm; // range reduction state
451 
452 /***********************************************************/
453 //! \struct CUVIDJPEGPICPARAMS
454 //! JPEG picture parameters
455 //! This structure is used in CUVIDPICPARAMS structure
456 /***********************************************************/
457 typedef struct _CUVIDJPEGPICPARAMS
458 {
459  int Reserved;
461 
462 
463 /*******************************************************/
464 //! \struct CUVIDHEVCPICPARAMS
465 //! HEVC picture parameters
466 //! This structure is used in CUVIDPICPARAMS structure
467 /*******************************************************/
468 typedef struct _CUVIDHEVCPICPARAMS
469 {
470  // sps
477  unsigned char pcm_enabled_flag;
481 
487  unsigned char amp_enabled_flag;
490 
497  unsigned char IrapPicFlag;
498  unsigned char IdrPicFlag;
499 
500  unsigned char bit_depth_luma_minus8;
501  unsigned char bit_depth_chroma_minus8;
502  unsigned char reserved1[14];
503 
504  // pps
509  unsigned char diff_cu_qp_delta_depth;
510  signed char init_qp_minus26;
511  signed char pps_cb_qp_offset;
512  signed char pps_cr_qp_offset;
513 
515  unsigned char weighted_pred_flag;
516  unsigned char weighted_bipred_flag;
522 
529  unsigned char cabac_init_present_flag;
531 
534  signed char pps_beta_offset_div2;
535  signed char pps_tc_offset_div2;
536  unsigned char tiles_enabled_flag;
537  unsigned char uniform_spacing_flag;
538  unsigned char num_tile_columns_minus1;
539  unsigned char num_tile_rows_minus1;
540 
541  unsigned short column_width_minus1[21];
542  unsigned short row_height_minus1[21];
543  unsigned int reserved3[15];
544 
545  // RefPicSets
553  int RefPicIdx[16]; // [refpic] Indices of valid reference pictures (-1 if unused for reference)
554  int PicOrderCntVal[16]; // [refpic]
555  unsigned char IsLongTerm[16]; // [refpic] 0=not a long-term reference, 1=long-term reference
556  unsigned char RefPicSetStCurrBefore[8]; // [0..NumPocStCurrBefore-1] -> refpic (0..15)
557  unsigned char RefPicSetStCurrAfter[8]; // [0..NumPocStCurrAfter-1] -> refpic (0..15)
558  unsigned char RefPicSetLtCurr[8]; // [0..NumPocLtCurr-1] -> refpic (0..15)
559  unsigned char RefPicSetInterLayer0[8];
560  unsigned char RefPicSetInterLayer1[8];
561  unsigned int reserved4[12];
562 
563  // scaling lists (diag order)
564  unsigned char ScalingList4x4[6][16]; // [matrixId][i]
565  unsigned char ScalingList8x8[6][64]; // [matrixId][i]
566  unsigned char ScalingList16x16[6][64]; // [matrixId][i]
567  unsigned char ScalingList32x32[2][64]; // [matrixId][i]
568  unsigned char ScalingListDCCoeff16x16[6]; // [matrixId]
569  unsigned char ScalingListDCCoeff32x32[2]; // [matrixId]
571 
572 
573 /***********************************************************/
574 //! \struct CUVIDVP8PICPARAMS
575 //! VP8 picture parameters
576 //! This structure is used in CUVIDPICPARAMS structure
577 /***********************************************************/
578 typedef struct _CUVIDVP8PICPARAMS
579 {
580  int width;
581  int height;
582  unsigned int first_partition_size;
583  //Frame Indexes
584  unsigned char LastRefIdx;
585  unsigned char GoldenRefIdx;
586  unsigned char AltRefIdx;
587  union {
588  struct {
589  unsigned char frame_type : 1; /**< 0 = KEYFRAME, 1 = INTERFRAME */
590  unsigned char version : 3;
591  unsigned char show_frame : 1;
592  unsigned char update_mb_segmentation_data : 1; /**< Must be 0 if segmentation is not enabled */
593  unsigned char Reserved2Bits : 2;
594  };
595  unsigned char wFrameTagFlags;
596  };
597  unsigned char Reserved1[4];
598  unsigned int Reserved2[3];
600 
601 /***********************************************************/
602 //! \struct CUVIDVP9PICPARAMS
603 //! VP9 picture parameters
604 //! This structure is used in CUVIDPICPARAMS structure
605 /***********************************************************/
606 typedef struct _CUVIDVP9PICPARAMS
607 {
608  unsigned int width;
609  unsigned int height;
610 
611  //Frame Indices
612  unsigned char LastRefIdx;
613  unsigned char GoldenRefIdx;
614  unsigned char AltRefIdx;
615  unsigned char colorSpace;
616 
617  unsigned short profile : 3;
618  unsigned short frameContextIdx : 2;
619  unsigned short frameType : 1;
620  unsigned short showFrame : 1;
621  unsigned short errorResilient : 1;
622  unsigned short frameParallelDecoding : 1;
623  unsigned short subSamplingX : 1;
624  unsigned short subSamplingY : 1;
625  unsigned short intraOnly : 1;
626  unsigned short allow_high_precision_mv : 1;
627  unsigned short refreshEntropyProbs : 1;
628  unsigned short reserved2Bits : 2;
629 
630  unsigned short reserved16Bits;
631 
632  unsigned char refFrameSignBias[4];
633 
634  unsigned char bitDepthMinus8Luma;
635  unsigned char bitDepthMinus8Chroma;
636  unsigned char loopFilterLevel;
637  unsigned char loopFilterSharpness;
638 
639  unsigned char modeRefLfEnabled;
640  unsigned char log2_tile_columns;
641  unsigned char log2_tile_rows;
642 
643  unsigned char segmentEnabled : 1;
644  unsigned char segmentMapUpdate : 1;
645  unsigned char segmentMapTemporalUpdate : 1;
646  unsigned char segmentFeatureMode : 1;
647  unsigned char reserved4Bits : 4;
648 
649 
650  unsigned char segmentFeatureEnable[8][4];
651  short segmentFeatureData[8][4];
652  unsigned char mb_segment_tree_probs[7];
653  unsigned char segment_pred_probs[3];
654  unsigned char reservedSegment16Bits[2];
655 
656  int qpYAc;
657  int qpYDc;
658  int qpChDc;
659  int qpChAc;
660 
661  unsigned int activeRefIdx[3];
662  unsigned int resetFrameContext;
663  unsigned int mcomp_filter_type;
664  unsigned int mbRefLfDelta[4];
665  unsigned int mbModeLfDelta[2];
666  unsigned int frameTagSize;
667  unsigned int offsetToDctParts;
668  unsigned int reserved128Bits[4];
669 
671 
672 
673 /******************************************************************************************/
674 //! \struct CUVIDPICPARAMS
675 //! Picture parameters for decoding
676 //! This structure is used in cuvidDecodePicture API
677 //! IN for cuvidDecodePicture
678 /******************************************************************************************/
679 typedef struct _CUVIDPICPARAMS
680 {
681  int PicWidthInMbs; /**< IN: Coded frame size in macroblocks */
682  int FrameHeightInMbs; /**< IN: Coded frame height in macroblocks */
683  int CurrPicIdx; /**< IN: Output index of the current picture */
684  int field_pic_flag; /**< IN: 0=frame picture, 1=field picture */
685  int bottom_field_flag; /**< IN: 0=top field, 1=bottom field (ignored if field_pic_flag=0) */
686  int second_field; /**< IN: Second field of a complementary field pair */
687  // Bitstream data
688  unsigned int nBitstreamDataLen; /**< IN: Number of bytes in bitstream data buffer */
689  const unsigned char *pBitstreamData; /**< IN: Ptr to bitstream data for this picture (slice-layer) */
690  unsigned int nNumSlices; /**< IN: Number of slices in this picture */
691  const unsigned int *pSliceDataOffsets; /**< IN: nNumSlices entries, contains offset of each slice within
692  the bitstream data buffer */
693  int ref_pic_flag; /**< IN: This picture is a reference picture */
694  int intra_pic_flag; /**< IN: This picture is entirely intra coded */
695  unsigned int Reserved[30]; /**< Reserved for future use */
696  // IN: Codec-specific data
697  union {
698  CUVIDMPEG2PICPARAMS mpeg2; /**< Also used for MPEG-1 */
706  unsigned int CodecReserved[1024];
707  } CodecSpecific;
709 
710 
711 /******************************************************/
712 //! \struct CUVIDPROCPARAMS
713 //! Picture parameters for postprocessing
714 //! This structure is used in cuvidMapVideoFrame API
715 /******************************************************/
716 typedef struct _CUVIDPROCPARAMS
717 {
718  int progressive_frame; /**< IN: Input is progressive (deinterlace_mode will be ignored) */
719  int second_field; /**< IN: Output the second field (ignored if deinterlace mode is Weave) */
720  int top_field_first; /**< IN: Input frame is top field first (1st field is top, 2nd field is bottom) */
721  int unpaired_field; /**< IN: Input only contains one field (2nd field is invalid) */
722  // The fields below are used for raw YUV input
723  unsigned int reserved_flags; /**< Reserved for future use (set to zero) */
724  unsigned int reserved_zero; /**< Reserved (set to zero) */
725  unsigned long long raw_input_dptr; /**< IN: Input CUdeviceptr for raw YUV extensions */
726  unsigned int raw_input_pitch; /**< IN: pitch in bytes of raw YUV input (should be aligned appropriately) */
727  unsigned int raw_input_format; /**< IN: Input YUV format (cudaVideoCodec_enum) */
728  unsigned long long raw_output_dptr; /**< IN: Output CUdeviceptr for raw YUV extensions */
729  unsigned int raw_output_pitch; /**< IN: pitch in bytes of raw YUV output (should be aligned appropriately) */
730  unsigned int Reserved1; /**< Reserved for future use (set to zero) */
731  CUstream output_stream; /**< IN: stream object used by cuvidMapVideoFrame */
732  unsigned int Reserved[46]; /**< Reserved for future use (set to zero) */
733  void *Reserved2[2]; /**< Reserved for future use (set to zero) */
735 
736 
737 /***********************************************************************************************************/
738 //! VIDEO_DECODER
739 //!
740 //! In order to minimize decode latencies, there should be always at least 2 pictures in the decode
741 //! queue at any time, in order to make sure that all decode engines are always busy.
742 //!
743 //! Overall data flow:
744 //! - cuvidGetDecoderCaps(...)
745 //! - cuvidCreateDecoder(...)
746 //! - For each picture:
747 //! + cuvidDecodePicture(N)
748 //! + cuvidMapVideoFrame(N-4)
749 //! + do some processing in cuda
750 //! + cuvidUnmapVideoFrame(N-4)
751 //! + cuvidDecodePicture(N+1)
752 //! + cuvidMapVideoFrame(N-3)
753 //! + ...
754 //! - cuvidDestroyDecoder(...)
755 //!
756 //! NOTE:
757 //! - When the cuda context is created from a D3D device, the D3D device must also be created
758 //! with the D3DCREATE_MULTITHREADED flag.
759 //! - There is a limit to how many pictures can be mapped simultaneously (ulNumOutputSurfaces)
760 //! - cuvidDecodePicture may block the calling thread if there are too many pictures pending
761 //! in the decode queue
762 /***********************************************************************************************************/
763 
764 
765 /**********************************************************************************************************************/
766 //! \fn CUresult CUDAAPI cuvidGetDecoderCaps(CUVIDDECODECAPS *pdc)
767 //! Queries decode capabilities of NVDEC-HW based on CodecType, ChromaFormat and BitDepthMinus8 parameters.
768 //! 1. Application fills IN parameters CodecType, ChromaFormat and BitDepthMinus8 of CUVIDDECODECAPS structure
769 //! 2. On calling cuvidGetDecoderCaps, driver fills OUT parameters if the IN parameters are supported
770 //! If IN parameters passed to the driver are not supported by NVDEC-HW, then all OUT params are set to 0.
771 //! E.g. on Geforce GTX 960:
772 //! App fills - eCodecType = cudaVideoCodec_H264; eChromaFormat = cudaVideoChromaFormat_420; nBitDepthMinus8 = 0;
773 //! Given IN parameters are supported, hence driver fills: bIsSupported = 1; nMinWidth = 48; nMinHeight = 16;
774 //! nMaxWidth = 4096; nMaxHeight = 4096; nMaxMBCount = 65536;
775 //! CodedWidth*CodedHeight/256 must be less than or equal to nMaxMBCount
776 /**********************************************************************************************************************/
778 
779 /********************************************************************************************************************/
780 //! \fn CUresult CUDAAPI cuvidCreateDecoder(CUvideodecoder *phDecoder, CUVIDDECODECREATEINFO *pdci)
781 //! Create the decoder object based on pdci. A handle to the created decoder is returned
782 /********************************************************************************************************************/
783 typedef CUresult CUDAAPI tcuvidCreateDecoder(CUvideodecoder *phDecoder, CUVIDDECODECREATEINFO *pdci);
784 /********************************************************************************************************************/
785 //! \fn CUresult CUDAAPI cuvidDestroyDecoder(CUvideodecoder hDecoder)
786 //! Destroy the decoder object.
787 /********************************************************************************************************************/
788 typedef CUresult CUDAAPI tcuvidDestroyDecoder(CUvideodecoder hDecoder);
789 
790 /********************************************************************************************************************/
791 //! \fn CUresult CUDAAPI cuvidDecodePicture(CUvideodecoder hDecoder, CUVIDPICPARAMS *pPicParams)
792 //! Decode a single picture (field or frame)
793 //! Kicks off HW decoding
794 /********************************************************************************************************************/
795 typedef CUresult CUDAAPI tcuvidDecodePicture(CUvideodecoder hDecoder, CUVIDPICPARAMS *pPicParams);
796 
797 
798 #if !defined(__CUVID_DEVPTR64) || defined(__CUVID_INTERNAL)
799 /************************************************************************************************************************/
800 //! \fn CUresult CUDAAPI cuvidMapVideoFrame(CUvideodecoder hDecoder, int nPicIdx, unsigned int *pDevPtr,
801 //! unsigned int *pPitch, CUVIDPROCPARAMS *pVPP);
802 //! Post-process and map video frame corresponding to nPicIdx for use in cuda. Returns cuda device pointer and associated
803 //! pitch of the video frame
804 /************************************************************************************************************************/
805 typedef CUresult CUDAAPI tcuvidMapVideoFrame(CUvideodecoder hDecoder, int nPicIdx,
806  unsigned int *pDevPtr, unsigned int *pPitch,
807  CUVIDPROCPARAMS *pVPP);
808 
809 /********************************************************************************************************************/
810 //! \fn CUresult CUDAAPI cuvidUnmapVideoFrame(CUvideodecoder hDecoder, unsigned int DevPtr)
811 //! Unmap a previously mapped video frame
812 /********************************************************************************************************************/
813 typedef CUresult CUDAAPI tcuvidUnmapVideoFrame(CUvideodecoder hDecoder, unsigned int DevPtr);
814 #endif
815 
816 #if defined(_WIN64) || defined(__LP64__) || defined(__x86_64) || defined(AMD64) || defined(_M_AMD64)
817 /************************************************************************************************************************/
818 //! \fn CUresult CUDAAPI cuvidMapVideoFrame64(CUvideodecoder hDecoder, int nPicIdx, unsigned long long *pDevPtr,
819 //! unsigned int *pPitch, CUVIDPROCPARAMS *pVPP);
820 //! Post-process and map video frame corresponding to nPicIdx for use in cuda. Returns cuda device pointer and associated
821 //! pitch of the video frame
822 /************************************************************************************************************************/
823 typedef CUresult CUDAAPI tcuvidMapVideoFrame64(CUvideodecoder hDecoder, int nPicIdx, unsigned long long *pDevPtr,
824  unsigned int *pPitch, CUVIDPROCPARAMS *pVPP);
825 
826 /********************************************************************************************************************/
827 //! \fn CUresult CUDAAPI cuvidUnmapVideoFrame64(CUvideodecoder hDecoder, unsigned long long DevPtr);
828 //! Unmap a previously mapped video frame
829 /********************************************************************************************************************/
830 typedef CUresult CUDAAPI tcuvidUnmapVideoFrame64(CUvideodecoder hDecoder, unsigned long long DevPtr);
831 
832 #if defined(__CUVID_DEVPTR64) && !defined(__CUVID_INTERNAL)
833 #define tcuvidMapVideoFrame tcuvidMapVideoFrame64
834 #define tcuvidUnmapVideoFrame tcuvidUnmapVideoFrame64
835 #endif
836 #endif
837 
838 
839 
840 /********************************************************************************************************************/
841 //!
842 //! Context-locking: to facilitate multi-threaded implementations, the following 4 functions
843 //! provide a simple mutex-style host synchronization. If a non-NULL context is specified
844 //! in CUVIDDECODECREATEINFO, the codec library will acquire the mutex associated with the given
845 //! context before making any cuda calls.
846 //! A multi-threaded application could create a lock associated with a context handle so that
847 //! multiple threads can safely share the same cuda context:
848 //! - use cuCtxPopCurrent immediately after context creation in order to create a 'floating' context
849 //! that can be passed to cuvidCtxLockCreate.
850 //! - When using a floating context, all cuda calls should only be made within a cuvidCtxLock/cuvidCtxUnlock section.
851 //!
852 //! NOTE: This is a safer alternative to cuCtxPushCurrent and cuCtxPopCurrent, and is not related to video
853 //! decoder in any way (implemented as a critical section associated with cuCtx{Push|Pop}Current calls).
854 /********************************************************************************************************************/
855 
856 /********************************************************************************************************************/
857 //! \fn CUresult CUDAAPI cuvidCtxLockCreate(CUvideoctxlock *pLock, CUcontext ctx)
858 //! This API is used to create CtxLock object
859 /********************************************************************************************************************/
860 typedef CUresult CUDAAPI tcuvidCtxLockCreate(CUvideoctxlock *pLock, CUcontext ctx);
861 
862 /********************************************************************************************************************/
863 //! \fn CUresult CUDAAPI cuvidCtxLockDestroy(CUvideoctxlock lck)
864 //! This API is used to free CtxLock object
865 /********************************************************************************************************************/
866 typedef CUresult CUDAAPI tcuvidCtxLockDestroy(CUvideoctxlock lck);
867 
868 /********************************************************************************************************************/
869 //! \fn CUresult CUDAAPI cuvidCtxLock(CUvideoctxlock lck, unsigned int reserved_flags)
870 //! This API is used to acquire ctxlock
871 /********************************************************************************************************************/
872 typedef CUresult CUDAAPI tcuvidCtxLock(CUvideoctxlock lck, unsigned int reserved_flags);
873 
874 /********************************************************************************************************************/
875 //! \fn CUresult CUDAAPI cuvidCtxUnlock(CUvideoctxlock lck, unsigned int reserved_flags)
876 //! This API is used to release ctxlock
877 /********************************************************************************************************************/
878 typedef CUresult CUDAAPI tcuvidCtxUnlock(CUvideoctxlock lck, unsigned int reserved_flags);
879 
880 /**********************************************************************************************/
881 
882 #if defined(__cplusplus)
883 }
884 #endif /* __cplusplus */
885 
886 #endif // __CUDA_VIDEO_H__
short scaled_ref_layer_bottom_offset
unsigned char loop_filter_across_tiles_enabled_flag
int ref_pic_flag
Set to 1 for I,P frames.
int PicWidthInMbs
IN: Coded frame size in macroblocks.
tcu_ulong bitDepthMinus8
IN: The value "BitDepth minus 8".
unsigned char bitDepthMinus8Luma
unsigned char deblocking_filter_override_enabled_flag
int view_id
view identifier
short scaled_ref_layer_right_offset
unsigned int Reserved1
Reserved for future use (set to zero)
int unpaired_field
IN: Input only contains one field (2nd field is invalid)
signed char pps_tc_offset_div2
unsigned int raw_input_format
IN: Input YUV format (cudaVideoCodec_enum)
H.264 SVC picture parameters ext This structure is used in CUVIDH264PICPARAMS structure.
tcu_ulong ulNumOutputSurfaces
IN: Maximum number of output surfaces simultaneously mapped.
unsigned char num_tile_columns_minus1
short scaled_ref_layer_top_offset
unsigned char log2_max_pic_order_cnt_lsb_minus4
unsigned char uniform_spacing_flag
unsigned char num_ref_idx_l0_default_active_minus1
unsigned char bit_depth_chroma_minus8
CUVIDH264SVCEXT svcext
unsigned char diff_cu_qp_delta_depth
unsigned char num_long_term_ref_pics_sps
int is_long_term
0=short term reference, 1=long term reference
unsigned short Reserved16Bits
unsigned char pcm_enabled_flag
struct _CUVIDPICPARAMS * pNextLayer
Points to the picparams for the next layer to be decoded.
unsigned char IrapPicFlag
VP8 picture parameters This structure is used in CUVIDPICPARAMS structure.
unsigned char inter_view_flag
1 if used for inter-view prediction, 0 if not
This structure is used in cuvidGetDecoderCaps API.
H.264 MVC picture parameters ext This structure is used in CUVIDH264PICPARAMS structure.
int FrameIdx
frame_num(short-term) or LongTermFrameIdx(long-term)
int version
Definition: avisynth_c.h:766
unsigned char dependent_slice_segments_enabled_flag
int field_pic_flag
IN: 0=frame picture, 1=field picture.
static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream, AVFormatContext *fmt_ctx)
Definition: ffprobe.c:2108
unsigned char chroma_phase_y_plus1
unsigned char residual_colour_transform_flag
unsigned char GoldenRefIdx
unsigned char LastRefIdx
const unsigned char * pMb2SliceGroupMap
unsigned char loop_filter_across_slices_enabled_flag
unsigned char wFrameTagFlags
unsigned char pcm_sample_bit_depth_luma_minus1
CUVIDH264MVCEXT mvcext
VP9 picture parameters This structure is used in CUVIDPICPARAMS structure.
cudaVideoDeinterlaceMode DeinterlaceMode
IN: cudaVideoDeinterlaceMode_XXX.
unsigned char bit_depth_luma_minus8
signed char pps_cr_qp_offset
unsigned char log2_min_luma_coding_block_size_minus3
CUVIDH264PICPARAMS h264
unsigned char tcoeff_level_prediction_flag
cudaVideoCodec CodecType
IN: cudaVideoCodec_XXX.
unsigned char bit_depth_chroma_minus8
unsigned char modeRefLfEnabled
cudaVideoSurfaceFormat OutputFormat
IN: cudaVideoSurfaceFormat_XXX.
unsigned char constrained_intra_pred_flag
int ForwardRefIdx
Picture index of forward reference (P/B-frames)
HEVC picture parameters This structure is used in CUVIDPICPARAMS structure.
int BackwardRefIdx
Picture index of backward reference (B-frames)
unsigned char AltRefIdx
int num_views_minus1
Max number of coded views minus 1 in video : Range - 0 to 1023.
tcu_ulong ulTargetWidth
IN: Post-processed output width (Should be aligned to 2)
Picture parameters for postprocessing This structure is used in cuvidMapVideoFrame API...
int PicIdx
picture index of reference frame
int intra_pic_flag
Set to 1 for I,BI frames.
unsigned char store_ref_base_pic_flag
signed char pic_init_qs_minus26
unsigned char num_inter_view_refs_l1
number of inter-view ref pics in RefPicList1
unsigned char pcm_loop_filter_disabled_flag
unsigned int first_partition_size
CUvideoctxlock vidLock
IN: If non-NULL, context lock used for synchronizing ownership of the cuda context.
JPEG picture parameters This structure is used in CUVIDPICPARAMS structure.
unsigned char log2_tile_columns
unsigned char num_ref_idx_l1_default_active_minus1
unsigned short nMinWidth
OUT: Min supported coded width in pixels.
unsigned char slice_group_map_type
unsigned char fmo_aso_enable
unsigned long long slice_group_map_addr
unsigned int frameTagSize
int bRefBaseLayer
whether to store ref base pic
This structure is used in cuvidCreateDecoder API.
H.264 DPB entry This structure is used in CUVIDH264PICPARAMS structure.
unsigned int raw_output_pitch
IN: pitch in bytes of raw YUV output (should be aligned appropriately)
unsigned char log2_parallel_merge_level_minus2
unsigned char LastRefIdx
int not_existing
non-existing reference frame (corresponding PicIdx should be set to -1)
int deblocking_filter_control_present_flag
Picture parameters for decoding This structure is used in cuvidDecodePicture API IN for cuvidDecodePi...
unsigned char MVCReserved8Bits
Reserved bits.
int CurrPicIdx
IN: Output index of the current picture.
unsigned char sample_adaptive_offset_enabled_flag
unsigned char weighted_pred_flag
unsigned char colorSpace
unsigned char pcm_sample_bit_depth_chroma_minus1
unsigned char long_term_ref_pics_present_flag
unsigned char extended_spatial_scalability_idc
unsigned char profile_idc
unsigned char transform_skip_enabled_flag
unsigned int nNumSlices
IN: Number of slices in this picture.
int FrameHeightInMbs
IN: Coded frame height in macroblocks.
unsigned short reserved16Bits
unsigned char separate_colour_plane_flag
unsigned char bIsSupported
OUT: 1 if codec supported, 0 if not supported.
unsigned char entropy_coding_sync_enabled_flag
unsigned char loopFilterLevel
int intra_pic_flag
IN: This picture is entirely intra coded.
unsigned char bitDepthMinus8Chroma
int progressive_frame
IN: Input is progressive (deinterlace_mode will be ignored)
unsigned char scaling_list_enable_flag
int FrameHeight
Actual frame height.
tcu_ulong ulCreationFlags
IN: Decoder creation flags (cudaVideoCreateFlags_XXX)
tcu_ulong ulIntraDecodeOnly
IN: Set 1 only if video has all intra frames (default value is 0).
int second_field
IN: Output the second field (ignored if deinterlace mode is Weave)
unsigned int mcomp_filter_type
unsigned char log2_diff_max_min_pcm_luma_coding_block_size
unsigned char num_tile_rows_minus1
unsigned int reserved_zero
Reserved (set to zero)
unsigned char IdrPicFlag
int ref_pic_flag
IN: This picture is a reference picture.
signed char pps_beta_offset_div2
int top_field_first
IN: Input frame is top field first (1st field is top, 2nd field is bottom)
int progressive_fcm
Progressive frame.
AVFormatContext * ctx
Definition: movenc.c:48
const unsigned int * pSliceDataOffsets
IN: nNumSlices entries, contains offset of each slice within the bitstream data buffer.
unsigned short DPBEntryValidFlag
int bottom_field_flag
IN: 0=top field, 1=bottom field (ignored if field_pic_flag=0)
unsigned char slice_header_restriction_flag
unsigned long long raw_output_dptr
IN: Output CUdeviceptr for raw YUV extensions.
unsigned int nMaxHeight
OUT: Max supported coded height in pixels.
unsigned short nMinHeight
OUT: Min supported coded height in pixels.
unsigned char num_extra_slice_header_bits
unsigned char tiles_enabled_flag
short scaled_ref_layer_left_offset
unsigned int nBitDepthMinus8
IN: The Value "BitDepth minus 8".
unsigned char log2_min_pcm_luma_coding_block_size_minus3
unsigned char qpprime_y_zero_transform_bypass_flag
tcu_ulong ulNumDecodeSurfaces
IN: Maximum number of internal decode surfaces.
MPEG-4 picture parameters This structure is used in CUVIDPICPARAMS structure.
unsigned char inter_layer_deblocking_filter_control_present_flag
unsigned int nMaxMBCount
OUT: Max supported macroblock count CodedWidth*CodedHeight/256 must be <= nMaxMBCount.
signed char inter_layer_slice_alpha_c0_offset_div2
CUVIDVC1PICPARAMS vc1
CUVIDVP9PICPARAMS vp9
unsigned int resetFrameContext
unsigned char slice_segment_header_extension_present_flag
CUstream output_stream
IN: stream object used by cuvidMapVideoFrame.
unsigned char pps_deblocking_filter_disabled_flag
unsigned char Reserved8BitsA
unsigned char amp_enabled_flag
unsigned char sps_temporal_mvp_enabled_flag
const unsigned char * pBitstreamData
IN: Ptr to bitstream data for this picture (slice-layer)
unsigned int slice_group_change_rate_minus1
unsigned char log2_tile_rows
unsigned char loopFilterSharpness
unsigned char lists_modification_present_flag
unsigned char log2_diff_max_min_transform_block_size
unsigned char Reserved8BitsB
CUVIDVP8PICPARAMS vp8
unsigned char num_inter_view_refs_l0
number of inter-view ref pics in RefPicList0
unsigned char level_idc
unsigned char DQIdMax
unsigned char max_transform_hierarchy_depth_inter
unsigned char pps_slice_chroma_qp_offsets_present_flag
tcu_ulong ulWidth
IN: Coded sequence width in pixels.
mfxU16 profile
Definition: qsvenc.c:44
cudaVideoCodec eCodecType
IN: cudaVideoCodec_XXX.
unsigned char num_slice_groups_minus1
CUVIDJPEGPICPARAMS jpeg
unsigned char output_flag_present_flag
signed char pps_cb_qp_offset
CUVIDMPEG2PICPARAMS mpeg2
Also used for MPEG-1.
int used_for_reference
0=unused, 1=top_field, 2=bottom_field, 3=both_fields
unsigned char bit_depth_luma_minus8
signed char init_qp_minus26
unsigned char weighted_bipred_flag
unsigned int offsetToDctParts
unsigned char adaptive_tcoeff_level_prediction_flag
unsigned char chroma_phase_x_plus1_flag
cudaVideoChromaFormat eChromaFormat
IN: cudaVideoChromaFormat_XXX.
unsigned char transquant_bypass_enabled_flag
CUVIDMPEG4PICPARAMS mpeg4
unsigned char AltRefIdx
unsigned int reserved_flags
Reserved for future use (set to zero)
unsigned char log2_diff_max_min_luma_coding_block_size
tcu_ulong ulHeight
IN: Coded sequence height in pixels.
unsigned char cabac_init_present_flag
MPEG-2 picture parameters This structure is used in CUVIDPICPARAMS structure.
unsigned char cu_qp_delta_enabled_flag
unsigned char max_transform_hierarchy_depth_intra
cudaVideoChromaFormat ChromaFormat
IN: cudaVideoChromaFormat_XXX.
tcu_ulong ulTargetHeight
IN: Post-processed output height (Should be aligbed to 2)
VC1 picture parameters This structure is used in CUVIDPICPARAMS structure.
unsigned char GoldenRefIdx
unsigned char disable_inter_layer_deblocking_filter_idc
int second_field
IN: Second field of a complementary field pair.
unsigned char sign_data_hiding_enabled_flag
unsigned char strong_intra_smoothing_enabled_flag
unsigned long long raw_input_dptr
IN: Input CUdeviceptr for raw YUV extensions.
CUVIDHEVCPICPARAMS hevc
unsigned char ref_layer_chroma_phase_y_plus1
H.264 picture parameters This structure is used in CUVIDPICPARAMS structure.
int FrameWidth
Actual frame width.
unsigned int nBitstreamDataLen
IN: Number of bytes in bitstream data buffer.
unsigned char DQId
unsigned char log2_min_transform_block_size_minus2
unsigned char ref_layer_chroma_phase_x_plus1_flag
unsigned char constrained_intra_resampling_flag
unsigned char num_short_term_ref_pic_sets
signed char inter_layer_slice_beta_offset_div2
unsigned int nMaxWidth
OUT: Max supported coded width in pixels.
unsigned int raw_input_pitch
IN: pitch in bytes of raw YUV input (should be aligned appropriately)