-
Notifications
You must be signed in to change notification settings - Fork 1
/
nvEncodeAPI.h
3844 lines (3502 loc) · 235 KB
/
nvEncodeAPI.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* This copyright notice applies to this header file only:
*
* Copyright (c) 2010-2020 NVIDIA Corporation
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the software, and to permit persons to whom the
* software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* \file nvEncodeAPI.h
* NVIDIA GPUs - beginning with the Kepler generation - contain a hardware-based encoder
* (referred to as NVENC) which provides fully-accelerated hardware-based video encoding.
* NvEncodeAPI provides the interface for NVIDIA video encoder (NVENC).
* \date 2011-2020
* This file contains the interface constants, structure definitions and function prototypes.
*/
#ifndef _NV_ENCODEAPI_H_
#define _NV_ENCODEAPI_H_
#include <stdlib.h>
#ifdef _WIN32
#include <windows.h>
#endif
#ifdef _MSC_VER
#ifndef _STDINT
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
#endif
#else
#include <stdint.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* \addtogroup ENCODER_STRUCTURE NvEncodeAPI Data structures
* @{
*/
#ifdef _WIN32
#define NVENCAPI __stdcall
typedef RECT NVENC_RECT;
#else
#define NVENCAPI
// =========================================================================================
#if !defined(GUID) && !defined(GUID_DEFINED)
/*!
* \struct GUID
* Abstracts the GUID structure for non-windows platforms.
*/
// =========================================================================================
typedef struct
{
uint32_t Data1; /**< [in]: Specifies the first 8 hexadecimal digits of the GUID. */
uint16_t Data2; /**< [in]: Specifies the first group of 4 hexadecimal digits. */
uint16_t Data3; /**< [in]: Specifies the second group of 4 hexadecimal digits. */
uint8_t Data4[8]; /**< [in]: Array of 8 bytes. The first 2 bytes contain the third group of 4 hexadecimal digits.
The remaining 6 bytes contain the final 12 hexadecimal digits. */
} GUID;
#endif // GUID
/**
* \struct _NVENC_RECT
* Defines a Rectangle. Used in ::NV_ENC_PREPROCESS_FRAME.
*/
typedef struct _NVENC_RECT
{
uint32_t left; /**< [in]: X coordinate of the upper left corner of rectangular area to be specified. */
uint32_t top; /**< [in]: Y coordinate of the upper left corner of the rectangular area to be specified. */
uint32_t right; /**< [in]: X coordinate of the bottom right corner of the rectangular area to be specified. */
uint32_t bottom; /**< [in]: Y coordinate of the bottom right corner of the rectangular area to be specified. */
} NVENC_RECT;
#endif // _WIN32
/** @} */ /* End of GUID and NVENC_RECT structure grouping*/
typedef void* NV_ENC_INPUT_PTR; /**< NVENCODE API input buffer */
typedef void* NV_ENC_OUTPUT_PTR; /**< NVENCODE API output buffer*/
typedef void* NV_ENC_REGISTERED_PTR; /**< A Resource that has been registered with NVENCODE API*/
typedef void* NV_ENC_CUSTREAM_PTR; /**< Pointer to CUstream*/
#define NVENCAPI_MAJOR_VERSION 11
#define NVENCAPI_MINOR_VERSION 0
#define NVENCAPI_VERSION (NVENCAPI_MAJOR_VERSION | (NVENCAPI_MINOR_VERSION << 24))
/**
* Macro to generate per-structure version for use with API.
*/
#define NVENCAPI_STRUCT_VERSION(ver) ((uint32_t)NVENCAPI_VERSION | ((ver)<<16) | (0x7 << 28))
#define NVENC_INFINITE_GOPLENGTH 0xffffffff
#define NV_MAX_SEQ_HDR_LEN (512)
#ifdef __GNUC__
#define NV_ENC_DEPRECATED __attribute__ ((deprecated("WILL BE REMOVED IN A FUTURE VIDEO CODEC SDK VERSION")))
#elif defined(_MSC_VER)
#define NV_ENC_DEPRECATED __declspec(deprecated("WILL BE REMOVED IN A FUTURE VIDEO CODEC SDK VERSION"))
#endif
// =========================================================================================
// Encode Codec GUIDS supported by the NvEncodeAPI interface.
// =========================================================================================
// {6BC82762-4E63-4ca4-AA85-1E50F321F6BF}
static const GUID NV_ENC_CODEC_H264_GUID =
{ 0x6bc82762, 0x4e63, 0x4ca4, { 0xaa, 0x85, 0x1e, 0x50, 0xf3, 0x21, 0xf6, 0xbf } };
// {790CDC88-4522-4d7b-9425-BDA9975F7603}
static const GUID NV_ENC_CODEC_HEVC_GUID =
{ 0x790cdc88, 0x4522, 0x4d7b, { 0x94, 0x25, 0xbd, 0xa9, 0x97, 0x5f, 0x76, 0x3 } };
// =========================================================================================
// * Encode Profile GUIDS supported by the NvEncodeAPI interface.
// =========================================================================================
// {BFD6F8E7-233C-4341-8B3E-4818523803F4}
static const GUID NV_ENC_CODEC_PROFILE_AUTOSELECT_GUID =
{ 0xbfd6f8e7, 0x233c, 0x4341, { 0x8b, 0x3e, 0x48, 0x18, 0x52, 0x38, 0x3, 0xf4 } };
// {0727BCAA-78C4-4c83-8C2F-EF3DFF267C6A}
static const GUID NV_ENC_H264_PROFILE_BASELINE_GUID =
{ 0x727bcaa, 0x78c4, 0x4c83, { 0x8c, 0x2f, 0xef, 0x3d, 0xff, 0x26, 0x7c, 0x6a } };
// {60B5C1D4-67FE-4790-94D5-C4726D7B6E6D}
static const GUID NV_ENC_H264_PROFILE_MAIN_GUID =
{ 0x60b5c1d4, 0x67fe, 0x4790, { 0x94, 0xd5, 0xc4, 0x72, 0x6d, 0x7b, 0x6e, 0x6d } };
// {E7CBC309-4F7A-4b89-AF2A-D537C92BE310}
static const GUID NV_ENC_H264_PROFILE_HIGH_GUID =
{ 0xe7cbc309, 0x4f7a, 0x4b89, { 0xaf, 0x2a, 0xd5, 0x37, 0xc9, 0x2b, 0xe3, 0x10 } };
// {7AC663CB-A598-4960-B844-339B261A7D52}
static const GUID NV_ENC_H264_PROFILE_HIGH_444_GUID =
{ 0x7ac663cb, 0xa598, 0x4960, { 0xb8, 0x44, 0x33, 0x9b, 0x26, 0x1a, 0x7d, 0x52 } };
// {40847BF5-33F7-4601-9084-E8FE3C1DB8B7}
static const GUID NV_ENC_H264_PROFILE_STEREO_GUID =
{ 0x40847bf5, 0x33f7, 0x4601, { 0x90, 0x84, 0xe8, 0xfe, 0x3c, 0x1d, 0xb8, 0xb7 } };
// {B405AFAC-F32B-417B-89C4-9ABEED3E5978}
static const GUID NV_ENC_H264_PROFILE_PROGRESSIVE_HIGH_GUID =
{ 0xb405afac, 0xf32b, 0x417b, { 0x89, 0xc4, 0x9a, 0xbe, 0xed, 0x3e, 0x59, 0x78 } };
// {AEC1BD87-E85B-48f2-84C3-98BCA6285072}
static const GUID NV_ENC_H264_PROFILE_CONSTRAINED_HIGH_GUID =
{ 0xaec1bd87, 0xe85b, 0x48f2, { 0x84, 0xc3, 0x98, 0xbc, 0xa6, 0x28, 0x50, 0x72 } };
// {B514C39A-B55B-40fa-878F-F1253B4DFDEC}
static const GUID NV_ENC_HEVC_PROFILE_MAIN_GUID =
{ 0xb514c39a, 0xb55b, 0x40fa, { 0x87, 0x8f, 0xf1, 0x25, 0x3b, 0x4d, 0xfd, 0xec } };
// {fa4d2b6c-3a5b-411a-8018-0a3f5e3c9be5}
static const GUID NV_ENC_HEVC_PROFILE_MAIN10_GUID =
{ 0xfa4d2b6c, 0x3a5b, 0x411a, { 0x80, 0x18, 0x0a, 0x3f, 0x5e, 0x3c, 0x9b, 0xe5 } };
// For HEVC Main 444 8 bit and HEVC Main 444 10 bit profiles only
// {51ec32b5-1b4c-453c-9cbd-b616bd621341}
static const GUID NV_ENC_HEVC_PROFILE_FREXT_GUID =
{ 0x51ec32b5, 0x1b4c, 0x453c, { 0x9c, 0xbd, 0xb6, 0x16, 0xbd, 0x62, 0x13, 0x41 } };
// =========================================================================================
// * Preset GUIDS supported by the NvEncodeAPI interface.
// =========================================================================================
// {B2DFB705-4EBD-4C49-9B5F-24A777D3E587}
NV_ENC_DEPRECATED static const GUID NV_ENC_PRESET_DEFAULT_GUID =
{ 0xb2dfb705, 0x4ebd, 0x4c49, { 0x9b, 0x5f, 0x24, 0xa7, 0x77, 0xd3, 0xe5, 0x87 } };
// {60E4C59F-E846-4484-A56D-CD45BE9FDDF6}
NV_ENC_DEPRECATED static const GUID NV_ENC_PRESET_HP_GUID =
{ 0x60e4c59f, 0xe846, 0x4484, { 0xa5, 0x6d, 0xcd, 0x45, 0xbe, 0x9f, 0xdd, 0xf6 } };
// {34DBA71D-A77B-4B8F-9C3E-B6D5DA24C012}
NV_ENC_DEPRECATED static const GUID NV_ENC_PRESET_HQ_GUID =
{ 0x34dba71d, 0xa77b, 0x4b8f, { 0x9c, 0x3e, 0xb6, 0xd5, 0xda, 0x24, 0xc0, 0x12 } };
// {82E3E450-BDBB-4e40-989C-82A90DF9EF32}
NV_ENC_DEPRECATED static const GUID NV_ENC_PRESET_BD_GUID =
{ 0x82e3e450, 0xbdbb, 0x4e40, { 0x98, 0x9c, 0x82, 0xa9, 0xd, 0xf9, 0xef, 0x32 } };
// {49DF21C5-6DFA-4feb-9787-6ACC9EFFB726}
NV_ENC_DEPRECATED static const GUID NV_ENC_PRESET_LOW_LATENCY_DEFAULT_GUID =
{ 0x49df21c5, 0x6dfa, 0x4feb, { 0x97, 0x87, 0x6a, 0xcc, 0x9e, 0xff, 0xb7, 0x26 } };
// {C5F733B9-EA97-4cf9-BEC2-BF78A74FD105}
NV_ENC_DEPRECATED static const GUID NV_ENC_PRESET_LOW_LATENCY_HQ_GUID =
{ 0xc5f733b9, 0xea97, 0x4cf9, { 0xbe, 0xc2, 0xbf, 0x78, 0xa7, 0x4f, 0xd1, 0x5 } };
// {67082A44-4BAD-48FA-98EA-93056D150A58}
NV_ENC_DEPRECATED static const GUID NV_ENC_PRESET_LOW_LATENCY_HP_GUID =
{ 0x67082a44, 0x4bad, 0x48fa, { 0x98, 0xea, 0x93, 0x5, 0x6d, 0x15, 0xa, 0x58 } };
// {D5BFB716-C604-44e7-9BB8-DEA5510FC3AC}
NV_ENC_DEPRECATED static const GUID NV_ENC_PRESET_LOSSLESS_DEFAULT_GUID =
{ 0xd5bfb716, 0xc604, 0x44e7, { 0x9b, 0xb8, 0xde, 0xa5, 0x51, 0xf, 0xc3, 0xac } };
// {149998E7-2364-411d-82EF-179888093409}
NV_ENC_DEPRECATED static const GUID NV_ENC_PRESET_LOSSLESS_HP_GUID =
{ 0x149998e7, 0x2364, 0x411d, { 0x82, 0xef, 0x17, 0x98, 0x88, 0x9, 0x34, 0x9 } };
// Performance degrades and quality improves as we move from P1 to P7. Presets P3 to P7 for H264 and Presets P2 to P7 for HEVC have B frames enabled by default
// for HIGH_QUALITY and LOSSLESS tuning info, and will not work with Weighted Prediction enabled. In case Weighted Prediction is required, disable B frames by
// setting frameIntervalP = 1
// {FC0A8D3E-45F8-4CF8-80C7-298871590EBF}
static const GUID NV_ENC_PRESET_P1_GUID =
{ 0xfc0a8d3e, 0x45f8, 0x4cf8, { 0x80, 0xc7, 0x29, 0x88, 0x71, 0x59, 0xe, 0xbf } };
// {F581CFB8-88D6-4381-93F0-DF13F9C27DAB}
static const GUID NV_ENC_PRESET_P2_GUID =
{ 0xf581cfb8, 0x88d6, 0x4381, { 0x93, 0xf0, 0xdf, 0x13, 0xf9, 0xc2, 0x7d, 0xab } };
// {36850110-3A07-441F-94D5-3670631F91F6}
static const GUID NV_ENC_PRESET_P3_GUID =
{ 0x36850110, 0x3a07, 0x441f, { 0x94, 0xd5, 0x36, 0x70, 0x63, 0x1f, 0x91, 0xf6 } };
// {90A7B826-DF06-4862-B9D2-CD6D73A08681}
static const GUID NV_ENC_PRESET_P4_GUID =
{ 0x90a7b826, 0xdf06, 0x4862, { 0xb9, 0xd2, 0xcd, 0x6d, 0x73, 0xa0, 0x86, 0x81 } };
// {21C6E6B4-297A-4CBA-998F-B6CBDE72ADE3}
static const GUID NV_ENC_PRESET_P5_GUID =
{ 0x21c6e6b4, 0x297a, 0x4cba, { 0x99, 0x8f, 0xb6, 0xcb, 0xde, 0x72, 0xad, 0xe3 } };
// {8E75C279-6299-4AB6-8302-0B215A335CF5}
static const GUID NV_ENC_PRESET_P6_GUID =
{ 0x8e75c279, 0x6299, 0x4ab6, { 0x83, 0x2, 0xb, 0x21, 0x5a, 0x33, 0x5c, 0xf5 } };
// {84848C12-6F71-4C13-931B-53E283F57974}
static const GUID NV_ENC_PRESET_P7_GUID =
{ 0x84848c12, 0x6f71, 0x4c13, { 0x93, 0x1b, 0x53, 0xe2, 0x83, 0xf5, 0x79, 0x74 } };
/**
* \addtogroup ENCODER_STRUCTURE NvEncodeAPI Data structures
* @{
*/
/**
* Input frame encode modes
*/
typedef enum _NV_ENC_PARAMS_FRAME_FIELD_MODE
{
NV_ENC_PARAMS_FRAME_FIELD_MODE_FRAME = 0x01, /**< Frame mode */
NV_ENC_PARAMS_FRAME_FIELD_MODE_FIELD = 0x02, /**< Field mode */
NV_ENC_PARAMS_FRAME_FIELD_MODE_MBAFF = 0x03 /**< MB adaptive frame/field */
} NV_ENC_PARAMS_FRAME_FIELD_MODE;
/**
* Rate Control Modes
*/
typedef enum _NV_ENC_PARAMS_RC_MODE
{
NV_ENC_PARAMS_RC_CONSTQP = 0x0, /**< Constant QP mode */
NV_ENC_PARAMS_RC_VBR = 0x1, /**< Variable bitrate mode */
NV_ENC_PARAMS_RC_CBR = 0x2, /**< Constant bitrate mode */
NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ = 0x8, /**< Deprecated, use NV_ENC_PARAMS_RC_CBR + NV_ENC_TWO_PASS_QUARTER_RESOLUTION / NV_ENC_TWO_PASS_FULL_RESOLUTION +
lowDelayKeyFrameScale=1 */
NV_ENC_PARAMS_RC_CBR_HQ = 0x10, /**< Deprecated, use NV_ENC_PARAMS_RC_CBR + NV_ENC_TWO_PASS_QUARTER_RESOLUTION / NV_ENC_TWO_PASS_FULL_RESOLUTION */
NV_ENC_PARAMS_RC_VBR_HQ = 0x20 /**< Deprecated, use NV_ENC_PARAMS_RC_VBR + NV_ENC_TWO_PASS_QUARTER_RESOLUTION / NV_ENC_TWO_PASS_FULL_RESOLUTION */
} NV_ENC_PARAMS_RC_MODE;
/**
* Multi Pass encoding
*/
typedef enum _NV_ENC_MULTI_PASS
{
NV_ENC_MULTI_PASS_DISABLED = 0x0, /**< Single Pass */
NV_ENC_TWO_PASS_QUARTER_RESOLUTION = 0x1, /**< Two Pass encoding is enabled where first Pass is quarter resolution */
NV_ENC_TWO_PASS_FULL_RESOLUTION = 0x2, /**< Two Pass encoding is enabled where first Pass is full resolution */
} NV_ENC_MULTI_PASS;
/**
* Emphasis Levels
*/
typedef enum _NV_ENC_EMPHASIS_MAP_LEVEL
{
NV_ENC_EMPHASIS_MAP_LEVEL_0 = 0x0, /**< Emphasis Map Level 0, for zero Delta QP value */
NV_ENC_EMPHASIS_MAP_LEVEL_1 = 0x1, /**< Emphasis Map Level 1, for very low Delta QP value */
NV_ENC_EMPHASIS_MAP_LEVEL_2 = 0x2, /**< Emphasis Map Level 2, for low Delta QP value */
NV_ENC_EMPHASIS_MAP_LEVEL_3 = 0x3, /**< Emphasis Map Level 3, for medium Delta QP value */
NV_ENC_EMPHASIS_MAP_LEVEL_4 = 0x4, /**< Emphasis Map Level 4, for high Delta QP value */
NV_ENC_EMPHASIS_MAP_LEVEL_5 = 0x5 /**< Emphasis Map Level 5, for very high Delta QP value */
} NV_ENC_EMPHASIS_MAP_LEVEL;
/**
* QP MAP MODE
*/
typedef enum _NV_ENC_QP_MAP_MODE
{
NV_ENC_QP_MAP_DISABLED = 0x0, /**< Value in NV_ENC_PIC_PARAMS::qpDeltaMap have no effect. */
NV_ENC_QP_MAP_EMPHASIS = 0x1, /**< Value in NV_ENC_PIC_PARAMS::qpDeltaMap will be treated as Emphasis level. Currently this is only supported for H264 */
NV_ENC_QP_MAP_DELTA = 0x2, /**< Value in NV_ENC_PIC_PARAMS::qpDeltaMap will be treated as QP delta map. */
NV_ENC_QP_MAP = 0x3, /**< Currently This is not supported. Value in NV_ENC_PIC_PARAMS::qpDeltaMap will be treated as QP value. */
} NV_ENC_QP_MAP_MODE;
#define NV_ENC_PARAMS_RC_VBR_MINQP (NV_ENC_PARAMS_RC_MODE)0x4 /**< Deprecated */
#define NV_ENC_PARAMS_RC_2_PASS_QUALITY NV_ENC_PARAMS_RC_CBR_LOWDELAY_HQ /**< Deprecated */
#define NV_ENC_PARAMS_RC_2_PASS_FRAMESIZE_CAP NV_ENC_PARAMS_RC_CBR_HQ /**< Deprecated */
#define NV_ENC_PARAMS_RC_2_PASS_VBR NV_ENC_PARAMS_RC_VBR_HQ /**< Deprecated */
#define NV_ENC_PARAMS_RC_CBR2 NV_ENC_PARAMS_RC_CBR /**< Deprecated */
/**
* Input picture structure
*/
typedef enum _NV_ENC_PIC_STRUCT
{
NV_ENC_PIC_STRUCT_FRAME = 0x01, /**< Progressive frame */
NV_ENC_PIC_STRUCT_FIELD_TOP_BOTTOM = 0x02, /**< Field encoding top field first */
NV_ENC_PIC_STRUCT_FIELD_BOTTOM_TOP = 0x03 /**< Field encoding bottom field first */
} NV_ENC_PIC_STRUCT;
/**
* Input picture type
*/
typedef enum _NV_ENC_PIC_TYPE
{
NV_ENC_PIC_TYPE_P = 0x0, /**< Forward predicted */
NV_ENC_PIC_TYPE_B = 0x01, /**< Bi-directionally predicted picture */
NV_ENC_PIC_TYPE_I = 0x02, /**< Intra predicted picture */
NV_ENC_PIC_TYPE_IDR = 0x03, /**< IDR picture */
NV_ENC_PIC_TYPE_BI = 0x04, /**< Bi-directionally predicted with only Intra MBs */
NV_ENC_PIC_TYPE_SKIPPED = 0x05, /**< Picture is skipped */
NV_ENC_PIC_TYPE_INTRA_REFRESH = 0x06, /**< First picture in intra refresh cycle */
NV_ENC_PIC_TYPE_NONREF_P = 0x07, /**< Non reference P picture */
NV_ENC_PIC_TYPE_UNKNOWN = 0xFF /**< Picture type unknown */
} NV_ENC_PIC_TYPE;
/**
* Motion vector precisions
*/
typedef enum _NV_ENC_MV_PRECISION
{
NV_ENC_MV_PRECISION_DEFAULT = 0x0, /**< Driver selects Quarter-Pel motion vector precision by default */
NV_ENC_MV_PRECISION_FULL_PEL = 0x01, /**< Full-Pel motion vector precision */
NV_ENC_MV_PRECISION_HALF_PEL = 0x02, /**< Half-Pel motion vector precision */
NV_ENC_MV_PRECISION_QUARTER_PEL = 0x03 /**< Quarter-Pel motion vector precision */
} NV_ENC_MV_PRECISION;
/**
* Input buffer formats
*/
typedef enum _NV_ENC_BUFFER_FORMAT
{
NV_ENC_BUFFER_FORMAT_UNDEFINED = 0x00000000, /**< Undefined buffer format */
NV_ENC_BUFFER_FORMAT_NV12 = 0x00000001, /**< Semi-Planar YUV [Y plane followed by interleaved UV plane] */
NV_ENC_BUFFER_FORMAT_YV12 = 0x00000010, /**< Planar YUV [Y plane followed by V and U planes] */
NV_ENC_BUFFER_FORMAT_IYUV = 0x00000100, /**< Planar YUV [Y plane followed by U and V planes] */
NV_ENC_BUFFER_FORMAT_YUV444 = 0x00001000, /**< Planar YUV [Y plane followed by U and V planes] */
NV_ENC_BUFFER_FORMAT_YUV420_10BIT = 0x00010000, /**< 10 bit Semi-Planar YUV [Y plane followed by interleaved UV plane]. Each pixel of size 2 bytes. Most Significant 10 bits contain pixel data. */
NV_ENC_BUFFER_FORMAT_YUV444_10BIT = 0x00100000, /**< 10 bit Planar YUV444 [Y plane followed by U and V planes]. Each pixel of size 2 bytes. Most Significant 10 bits contain pixel data. */
NV_ENC_BUFFER_FORMAT_ARGB = 0x01000000, /**< 8 bit Packed A8R8G8B8. This is a word-ordered format
where a pixel is represented by a 32-bit word with B
in the lowest 8 bits, G in the next 8 bits, R in the
8 bits after that and A in the highest 8 bits. */
NV_ENC_BUFFER_FORMAT_ARGB10 = 0x02000000, /**< 10 bit Packed A2R10G10B10. This is a word-ordered format
where a pixel is represented by a 32-bit word with B
in the lowest 10 bits, G in the next 10 bits, R in the
10 bits after that and A in the highest 2 bits. */
NV_ENC_BUFFER_FORMAT_AYUV = 0x04000000, /**< 8 bit Packed A8Y8U8V8. This is a word-ordered format
where a pixel is represented by a 32-bit word with V
in the lowest 8 bits, U in the next 8 bits, Y in the
8 bits after that and A in the highest 8 bits. */
NV_ENC_BUFFER_FORMAT_ABGR = 0x10000000, /**< 8 bit Packed A8B8G8R8. This is a word-ordered format
where a pixel is represented by a 32-bit word with R
in the lowest 8 bits, G in the next 8 bits, B in the
8 bits after that and A in the highest 8 bits. */
NV_ENC_BUFFER_FORMAT_ABGR10 = 0x20000000, /**< 10 bit Packed A2B10G10R10. This is a word-ordered format
where a pixel is represented by a 32-bit word with R
in the lowest 10 bits, G in the next 10 bits, B in the
10 bits after that and A in the highest 2 bits. */
NV_ENC_BUFFER_FORMAT_U8 = 0x40000000, /**< Buffer format representing one-dimensional buffer.
This format should be used only when registering the
resource as output buffer, which will be used to write
the encoded bit stream or H.264 ME only mode output. */
} NV_ENC_BUFFER_FORMAT;
#define NV_ENC_BUFFER_FORMAT_NV12_PL NV_ENC_BUFFER_FORMAT_NV12
#define NV_ENC_BUFFER_FORMAT_YV12_PL NV_ENC_BUFFER_FORMAT_YV12
#define NV_ENC_BUFFER_FORMAT_IYUV_PL NV_ENC_BUFFER_FORMAT_IYUV
#define NV_ENC_BUFFER_FORMAT_YUV444_PL NV_ENC_BUFFER_FORMAT_YUV444
/**
* Encoding levels
*/
typedef enum _NV_ENC_LEVEL
{
NV_ENC_LEVEL_AUTOSELECT = 0,
NV_ENC_LEVEL_H264_1 = 10,
NV_ENC_LEVEL_H264_1b = 9,
NV_ENC_LEVEL_H264_11 = 11,
NV_ENC_LEVEL_H264_12 = 12,
NV_ENC_LEVEL_H264_13 = 13,
NV_ENC_LEVEL_H264_2 = 20,
NV_ENC_LEVEL_H264_21 = 21,
NV_ENC_LEVEL_H264_22 = 22,
NV_ENC_LEVEL_H264_3 = 30,
NV_ENC_LEVEL_H264_31 = 31,
NV_ENC_LEVEL_H264_32 = 32,
NV_ENC_LEVEL_H264_4 = 40,
NV_ENC_LEVEL_H264_41 = 41,
NV_ENC_LEVEL_H264_42 = 42,
NV_ENC_LEVEL_H264_5 = 50,
NV_ENC_LEVEL_H264_51 = 51,
NV_ENC_LEVEL_H264_52 = 52,
NV_ENC_LEVEL_H264_60 = 60,
NV_ENC_LEVEL_H264_61 = 61,
NV_ENC_LEVEL_H264_62 = 62,
NV_ENC_LEVEL_HEVC_1 = 30,
NV_ENC_LEVEL_HEVC_2 = 60,
NV_ENC_LEVEL_HEVC_21 = 63,
NV_ENC_LEVEL_HEVC_3 = 90,
NV_ENC_LEVEL_HEVC_31 = 93,
NV_ENC_LEVEL_HEVC_4 = 120,
NV_ENC_LEVEL_HEVC_41 = 123,
NV_ENC_LEVEL_HEVC_5 = 150,
NV_ENC_LEVEL_HEVC_51 = 153,
NV_ENC_LEVEL_HEVC_52 = 156,
NV_ENC_LEVEL_HEVC_6 = 180,
NV_ENC_LEVEL_HEVC_61 = 183,
NV_ENC_LEVEL_HEVC_62 = 186,
NV_ENC_TIER_HEVC_MAIN = 0,
NV_ENC_TIER_HEVC_HIGH = 1
} NV_ENC_LEVEL;
/**
* Error Codes
*/
typedef enum _NVENCSTATUS
{
/**
* This indicates that API call returned with no errors.
*/
NV_ENC_SUCCESS,
/**
* This indicates that no encode capable devices were detected.
*/
NV_ENC_ERR_NO_ENCODE_DEVICE,
/**
* This indicates that devices pass by the client is not supported.
*/
NV_ENC_ERR_UNSUPPORTED_DEVICE,
/**
* This indicates that the encoder device supplied by the client is not
* valid.
*/
NV_ENC_ERR_INVALID_ENCODERDEVICE,
/**
* This indicates that device passed to the API call is invalid.
*/
NV_ENC_ERR_INVALID_DEVICE,
/**
* This indicates that device passed to the API call is no longer available and
* needs to be reinitialized. The clients need to destroy the current encoder
* session by freeing the allocated input output buffers and destroying the device
* and create a new encoding session.
*/
NV_ENC_ERR_DEVICE_NOT_EXIST,
/**
* This indicates that one or more of the pointers passed to the API call
* is invalid.
*/
NV_ENC_ERR_INVALID_PTR,
/**
* This indicates that completion event passed in ::NvEncEncodePicture() call
* is invalid.
*/
NV_ENC_ERR_INVALID_EVENT,
/**
* This indicates that one or more of the parameter passed to the API call
* is invalid.
*/
NV_ENC_ERR_INVALID_PARAM,
/**
* This indicates that an API call was made in wrong sequence/order.
*/
NV_ENC_ERR_INVALID_CALL,
/**
* This indicates that the API call failed because it was unable to allocate
* enough memory to perform the requested operation.
*/
NV_ENC_ERR_OUT_OF_MEMORY,
/**
* This indicates that the encoder has not been initialized with
* ::NvEncInitializeEncoder() or that initialization has failed.
* The client cannot allocate input or output buffers or do any encoding
* related operation before successfully initializing the encoder.
*/
NV_ENC_ERR_ENCODER_NOT_INITIALIZED,
/**
* This indicates that an unsupported parameter was passed by the client.
*/
NV_ENC_ERR_UNSUPPORTED_PARAM,
/**
* This indicates that the ::NvEncLockBitstream() failed to lock the output
* buffer. This happens when the client makes a non blocking lock call to
* access the output bitstream by passing NV_ENC_LOCK_BITSTREAM::doNotWait flag.
* This is not a fatal error and client should retry the same operation after
* few milliseconds.
*/
NV_ENC_ERR_LOCK_BUSY,
/**
* This indicates that the size of the user buffer passed by the client is
* insufficient for the requested operation.
*/
NV_ENC_ERR_NOT_ENOUGH_BUFFER,
/**
* This indicates that an invalid struct version was used by the client.
*/
NV_ENC_ERR_INVALID_VERSION,
/**
* This indicates that ::NvEncMapInputResource() API failed to map the client
* provided input resource.
*/
NV_ENC_ERR_MAP_FAILED,
/**
* This indicates encode driver requires more input buffers to produce an output
* bitstream. If this error is returned from ::NvEncEncodePicture() API, this
* is not a fatal error. If the client is encoding with B frames then,
* ::NvEncEncodePicture() API might be buffering the input frame for re-ordering.
*
* A client operating in synchronous mode cannot call ::NvEncLockBitstream()
* API on the output bitstream buffer if ::NvEncEncodePicture() returned the
* ::NV_ENC_ERR_NEED_MORE_INPUT error code.
* The client must continue providing input frames until encode driver returns
* ::NV_ENC_SUCCESS. After receiving ::NV_ENC_SUCCESS status the client can call
* ::NvEncLockBitstream() API on the output buffers in the same order in which
* it has called ::NvEncEncodePicture().
*/
NV_ENC_ERR_NEED_MORE_INPUT,
/**
* This indicates that the HW encoder is busy encoding and is unable to encode
* the input. The client should call ::NvEncEncodePicture() again after few
* milliseconds.
*/
NV_ENC_ERR_ENCODER_BUSY,
/**
* This indicates that the completion event passed in ::NvEncEncodePicture()
* API has not been registered with encoder driver using ::NvEncRegisterAsyncEvent().
*/
NV_ENC_ERR_EVENT_NOT_REGISTERD,
/**
* This indicates that an unknown internal error has occurred.
*/
NV_ENC_ERR_GENERIC,
/**
* This indicates that the client is attempting to use a feature
* that is not available for the license type for the current system.
*/
NV_ENC_ERR_INCOMPATIBLE_CLIENT_KEY,
/**
* This indicates that the client is attempting to use a feature
* that is not implemented for the current version.
*/
NV_ENC_ERR_UNIMPLEMENTED,
/**
* This indicates that the ::NvEncRegisterResource API failed to register the resource.
*/
NV_ENC_ERR_RESOURCE_REGISTER_FAILED,
/**
* This indicates that the client is attempting to unregister a resource
* that has not been successfully registered.
*/
NV_ENC_ERR_RESOURCE_NOT_REGISTERED,
/**
* This indicates that the client is attempting to unmap a resource
* that has not been successfully mapped.
*/
NV_ENC_ERR_RESOURCE_NOT_MAPPED,
} NVENCSTATUS;
/**
* Encode Picture encode flags.
*/
typedef enum _NV_ENC_PIC_FLAGS
{
NV_ENC_PIC_FLAG_FORCEINTRA = 0x1, /**< Encode the current picture as an Intra picture */
NV_ENC_PIC_FLAG_FORCEIDR = 0x2, /**< Encode the current picture as an IDR picture.
This flag is only valid when Picture type decision is taken by the Encoder
[_NV_ENC_INITIALIZE_PARAMS::enablePTD == 1]. */
NV_ENC_PIC_FLAG_OUTPUT_SPSPPS = 0x4, /**< Write the sequence and picture header in encoded bitstream of the current picture */
NV_ENC_PIC_FLAG_EOS = 0x8, /**< Indicates end of the input stream */
} NV_ENC_PIC_FLAGS;
/**
* Memory heap to allocate input and output buffers.
*/
typedef enum _NV_ENC_MEMORY_HEAP
{
NV_ENC_MEMORY_HEAP_AUTOSELECT = 0, /**< Memory heap to be decided by the encoder driver based on the usage */
NV_ENC_MEMORY_HEAP_VID = 1, /**< Memory heap is in local video memory */
NV_ENC_MEMORY_HEAP_SYSMEM_CACHED = 2, /**< Memory heap is in cached system memory */
NV_ENC_MEMORY_HEAP_SYSMEM_UNCACHED = 3 /**< Memory heap is in uncached system memory */
} NV_ENC_MEMORY_HEAP;
/**
* B-frame used as reference modes
*/
typedef enum _NV_ENC_BFRAME_REF_MODE
{
NV_ENC_BFRAME_REF_MODE_DISABLED = 0x0, /**< B frame is not used for reference */
NV_ENC_BFRAME_REF_MODE_EACH = 0x1, /**< Each B-frame will be used for reference. currently not supported for H.264 */
NV_ENC_BFRAME_REF_MODE_MIDDLE = 0x2, /**< Only(Number of B-frame)/2 th B-frame will be used for reference */
} NV_ENC_BFRAME_REF_MODE;
/**
* H.264 entropy coding modes.
*/
typedef enum _NV_ENC_H264_ENTROPY_CODING_MODE
{
NV_ENC_H264_ENTROPY_CODING_MODE_AUTOSELECT = 0x0, /**< Entropy coding mode is auto selected by the encoder driver */
NV_ENC_H264_ENTROPY_CODING_MODE_CABAC = 0x1, /**< Entropy coding mode is CABAC */
NV_ENC_H264_ENTROPY_CODING_MODE_CAVLC = 0x2 /**< Entropy coding mode is CAVLC */
} NV_ENC_H264_ENTROPY_CODING_MODE;
/**
* H.264 specific BDirect modes
*/
typedef enum _NV_ENC_H264_BDIRECT_MODE
{
NV_ENC_H264_BDIRECT_MODE_AUTOSELECT = 0x0, /**< BDirect mode is auto selected by the encoder driver */
NV_ENC_H264_BDIRECT_MODE_DISABLE = 0x1, /**< Disable BDirect mode */
NV_ENC_H264_BDIRECT_MODE_TEMPORAL = 0x2, /**< Temporal BDirect mode */
NV_ENC_H264_BDIRECT_MODE_SPATIAL = 0x3 /**< Spatial BDirect mode */
} NV_ENC_H264_BDIRECT_MODE;
/**
* H.264 specific FMO usage
*/
typedef enum _NV_ENC_H264_FMO_MODE
{
NV_ENC_H264_FMO_AUTOSELECT = 0x0, /**< FMO usage is auto selected by the encoder driver */
NV_ENC_H264_FMO_ENABLE = 0x1, /**< Enable FMO */
NV_ENC_H264_FMO_DISABLE = 0x2, /**< Disable FMO */
} NV_ENC_H264_FMO_MODE;
/**
* H.264 specific Adaptive Transform modes
*/
typedef enum _NV_ENC_H264_ADAPTIVE_TRANSFORM_MODE
{
NV_ENC_H264_ADAPTIVE_TRANSFORM_AUTOSELECT = 0x0, /**< Adaptive Transform 8x8 mode is auto selected by the encoder driver*/
NV_ENC_H264_ADAPTIVE_TRANSFORM_DISABLE = 0x1, /**< Adaptive Transform 8x8 mode disabled */
NV_ENC_H264_ADAPTIVE_TRANSFORM_ENABLE = 0x2, /**< Adaptive Transform 8x8 mode should be used */
} NV_ENC_H264_ADAPTIVE_TRANSFORM_MODE;
/**
* Stereo frame packing modes.
*/
typedef enum _NV_ENC_STEREO_PACKING_MODE
{
NV_ENC_STEREO_PACKING_MODE_NONE = 0x0, /**< No Stereo packing required */
NV_ENC_STEREO_PACKING_MODE_CHECKERBOARD = 0x1, /**< Checkerboard mode for packing stereo frames */
NV_ENC_STEREO_PACKING_MODE_COLINTERLEAVE = 0x2, /**< Column Interleave mode for packing stereo frames */
NV_ENC_STEREO_PACKING_MODE_ROWINTERLEAVE = 0x3, /**< Row Interleave mode for packing stereo frames */
NV_ENC_STEREO_PACKING_MODE_SIDEBYSIDE = 0x4, /**< Side-by-side mode for packing stereo frames */
NV_ENC_STEREO_PACKING_MODE_TOPBOTTOM = 0x5, /**< Top-Bottom mode for packing stereo frames */
NV_ENC_STEREO_PACKING_MODE_FRAMESEQ = 0x6 /**< Frame Sequential mode for packing stereo frames */
} NV_ENC_STEREO_PACKING_MODE;
/**
* Input Resource type
*/
typedef enum _NV_ENC_INPUT_RESOURCE_TYPE
{
NV_ENC_INPUT_RESOURCE_TYPE_DIRECTX = 0x0, /**< input resource type is a directx9 surface*/
NV_ENC_INPUT_RESOURCE_TYPE_CUDADEVICEPTR = 0x1, /**< input resource type is a cuda device pointer surface*/
NV_ENC_INPUT_RESOURCE_TYPE_CUDAARRAY = 0x2, /**< input resource type is a cuda array surface.
This array must be a 2D array and the CUDA_ARRAY3D_SURFACE_LDST
flag must have been specified when creating it. */
NV_ENC_INPUT_RESOURCE_TYPE_OPENGL_TEX = 0x3 /**< input resource type is an OpenGL texture */
} NV_ENC_INPUT_RESOURCE_TYPE;
/**
* Buffer usage
*/
typedef enum _NV_ENC_BUFFER_USAGE
{
NV_ENC_INPUT_IMAGE = 0x0, /**< Registered surface will be used for input image */
NV_ENC_OUTPUT_MOTION_VECTOR = 0x1, /**< Registered surface will be used for output of H.264 ME only mode.
This buffer usage type is not supported for HEVC ME only mode. */
NV_ENC_OUTPUT_BITSTREAM = 0x2 /**< Registered surface will be used for output bitstream in encoding */
} NV_ENC_BUFFER_USAGE;
/**
* Encoder Device type
*/
typedef enum _NV_ENC_DEVICE_TYPE
{
NV_ENC_DEVICE_TYPE_DIRECTX = 0x0, /**< encode device type is a directx9 device */
NV_ENC_DEVICE_TYPE_CUDA = 0x1, /**< encode device type is a cuda device */
NV_ENC_DEVICE_TYPE_OPENGL = 0x2 /**< encode device type is an OpenGL device.
Use of this device type is supported only on Linux */
} NV_ENC_DEVICE_TYPE;
/**
* Number of reference frames
*/
typedef enum _NV_ENC_NUM_REF_FRAMES
{
NV_ENC_NUM_REF_FRAMES_AUTOSELECT = 0x0, /**< Number of reference frames is auto selected by the encoder driver */
NV_ENC_NUM_REF_FRAMES_1 = 0x1, /**< Number of reference frames equal to 1 */
NV_ENC_NUM_REF_FRAMES_2 = 0x2, /**< Number of reference frames equal to 2 */
NV_ENC_NUM_REF_FRAMES_3 = 0x3, /**< Number of reference frames equal to 3 */
NV_ENC_NUM_REF_FRAMES_4 = 0x4, /**< Number of reference frames equal to 4 */
NV_ENC_NUM_REF_FRAMES_5 = 0x5, /**< Number of reference frames equal to 5 */
NV_ENC_NUM_REF_FRAMES_6 = 0x6, /**< Number of reference frames equal to 6 */
NV_ENC_NUM_REF_FRAMES_7 = 0x7 /**< Number of reference frames equal to 7 */
} NV_ENC_NUM_REF_FRAMES;
/**
* Encoder capabilities enumeration.
*/
typedef enum _NV_ENC_CAPS
{
/**
* Maximum number of B-Frames supported.
*/
NV_ENC_CAPS_NUM_MAX_BFRAMES,
/**
* Rate control modes supported.
* \n The API return value is a bitmask of the values in NV_ENC_PARAMS_RC_MODE.
*/
NV_ENC_CAPS_SUPPORTED_RATECONTROL_MODES,
/**
* Indicates HW support for field mode encoding.
* \n 0 : Interlaced mode encoding is not supported.
* \n 1 : Interlaced field mode encoding is supported.
* \n 2 : Interlaced frame encoding and field mode encoding are both supported.
*/
NV_ENC_CAPS_SUPPORT_FIELD_ENCODING,
/**
* Indicates HW support for monochrome mode encoding.
* \n 0 : Monochrome mode not supported.
* \n 1 : Monochrome mode supported.
*/
NV_ENC_CAPS_SUPPORT_MONOCHROME,
/**
* Indicates HW support for FMO.
* \n 0 : FMO not supported.
* \n 1 : FMO supported.
*/
NV_ENC_CAPS_SUPPORT_FMO,
/**
* Indicates HW capability for Quarter pel motion estimation.
* \n 0 : Quarter-Pel Motion Estimation not supported.
* \n 1 : Quarter-Pel Motion Estimation supported.
*/
NV_ENC_CAPS_SUPPORT_QPELMV,
/**
* H.264 specific. Indicates HW support for BDirect modes.
* \n 0 : BDirect mode encoding not supported.
* \n 1 : BDirect mode encoding supported.
*/
NV_ENC_CAPS_SUPPORT_BDIRECT_MODE,
/**
* H264 specific. Indicates HW support for CABAC entropy coding mode.
* \n 0 : CABAC entropy coding not supported.
* \n 1 : CABAC entropy coding supported.
*/
NV_ENC_CAPS_SUPPORT_CABAC,
/**
* Indicates HW support for Adaptive Transform.
* \n 0 : Adaptive Transform not supported.
* \n 1 : Adaptive Transform supported.
*/
NV_ENC_CAPS_SUPPORT_ADAPTIVE_TRANSFORM,
/**
* Indicates HW support for Multi View Coding.
* \n 0 : Multi View Coding not supported.
* \n 1 : Multi View Coding supported.
*/
NV_ENC_CAPS_SUPPORT_STEREO_MVC,
/**
* Indicates HW support for encoding Temporal layers.
* \n 0 : Encoding Temporal layers not supported.
* \n 1 : Encoding Temporal layers supported.
*/
NV_ENC_CAPS_NUM_MAX_TEMPORAL_LAYERS,
/**
* Indicates HW support for Hierarchical P frames.
* \n 0 : Hierarchical P frames not supported.
* \n 1 : Hierarchical P frames supported.
*/
NV_ENC_CAPS_SUPPORT_HIERARCHICAL_PFRAMES,
/**
* Indicates HW support for Hierarchical B frames.
* \n 0 : Hierarchical B frames not supported.
* \n 1 : Hierarchical B frames supported.
*/
NV_ENC_CAPS_SUPPORT_HIERARCHICAL_BFRAMES,
/**
* Maximum Encoding level supported (See ::NV_ENC_LEVEL for details).
*/
NV_ENC_CAPS_LEVEL_MAX,
/**
* Minimum Encoding level supported (See ::NV_ENC_LEVEL for details).
*/
NV_ENC_CAPS_LEVEL_MIN,
/**
* Indicates HW support for separate colour plane encoding.
* \n 0 : Separate colour plane encoding not supported.
* \n 1 : Separate colour plane encoding supported.
*/
NV_ENC_CAPS_SEPARATE_COLOUR_PLANE,
/**
* Maximum output width supported.
*/
NV_ENC_CAPS_WIDTH_MAX,
/**
* Maximum output height supported.
*/
NV_ENC_CAPS_HEIGHT_MAX,
/**
* Indicates Temporal Scalability Support.
* \n 0 : Temporal SVC encoding not supported.
* \n 1 : Temporal SVC encoding supported.
*/
NV_ENC_CAPS_SUPPORT_TEMPORAL_SVC,
/**
* Indicates Dynamic Encode Resolution Change Support.
* Support added from NvEncodeAPI version 2.0.
* \n 0 : Dynamic Encode Resolution Change not supported.
* \n 1 : Dynamic Encode Resolution Change supported.
*/
NV_ENC_CAPS_SUPPORT_DYN_RES_CHANGE,
/**
* Indicates Dynamic Encode Bitrate Change Support.
* Support added from NvEncodeAPI version 2.0.
* \n 0 : Dynamic Encode bitrate change not supported.
* \n 1 : Dynamic Encode bitrate change supported.
*/
NV_ENC_CAPS_SUPPORT_DYN_BITRATE_CHANGE,
/**
* Indicates Forcing Constant QP On The Fly Support.
* Support added from NvEncodeAPI version 2.0.
* \n 0 : Forcing constant QP on the fly not supported.
* \n 1 : Forcing constant QP on the fly supported.
*/
NV_ENC_CAPS_SUPPORT_DYN_FORCE_CONSTQP,
/**
* Indicates Dynamic rate control mode Change Support.
* \n 0 : Dynamic rate control mode change not supported.
* \n 1 : Dynamic rate control mode change supported.
*/
NV_ENC_CAPS_SUPPORT_DYN_RCMODE_CHANGE,
/**
* Indicates Subframe readback support for slice-based encoding. If this feature is supported, it can be enabled by setting enableSubFrameWrite = 1.
* \n 0 : Subframe readback not supported.
* \n 1 : Subframe readback supported.
*/
NV_ENC_CAPS_SUPPORT_SUBFRAME_READBACK,
/**
* Indicates Constrained Encoding mode support.
* Support added from NvEncodeAPI version 2.0.
* \n 0 : Constrained encoding mode not supported.
* \n 1 : Constrained encoding mode supported.
* If this mode is supported client can enable this during initialization.
* Client can then force a picture to be coded as constrained picture where
* in-loop filtering is disabled across slice boundaries and prediction vectors for inter
* macroblocks in each slice will be restricted to the slice region.
*/
NV_ENC_CAPS_SUPPORT_CONSTRAINED_ENCODING,
/**
* Indicates Intra Refresh Mode Support.
* Support added from NvEncodeAPI version 2.0.
* \n 0 : Intra Refresh Mode not supported.
* \n 1 : Intra Refresh Mode supported.
*/
NV_ENC_CAPS_SUPPORT_INTRA_REFRESH,
/**
* Indicates Custom VBV Buffer Size support. It can be used for capping frame size.
* Support added from NvEncodeAPI version 2.0.
* \n 0 : Custom VBV buffer size specification from client, not supported.
* \n 1 : Custom VBV buffer size specification from client, supported.
*/
NV_ENC_CAPS_SUPPORT_CUSTOM_VBV_BUF_SIZE,
/**
* Indicates Dynamic Slice Mode Support.
* Support added from NvEncodeAPI version 2.0.
* \n 0 : Dynamic Slice Mode not supported.
* \n 1 : Dynamic Slice Mode supported.
*/
NV_ENC_CAPS_SUPPORT_DYNAMIC_SLICE_MODE,
/**
* Indicates Reference Picture Invalidation Support.
* Support added from NvEncodeAPI version 2.0.
* \n 0 : Reference Picture Invalidation not supported.
* \n 1 : Reference Picture Invalidation supported.
*/
NV_ENC_CAPS_SUPPORT_REF_PIC_INVALIDATION,
/**
* Indicates support for Pre-Processing.
* The API return value is a bitmask of the values defined in ::NV_ENC_PREPROC_FLAGS
*/
NV_ENC_CAPS_PREPROC_SUPPORT,
/**
* Indicates support Async mode.
* \n 0 : Async Encode mode not supported.
* \n 1 : Async Encode mode supported.
*/
NV_ENC_CAPS_ASYNC_ENCODE_SUPPORT,
/**
* Maximum MBs per frame supported.
*/