summaryrefslogtreecommitdiff
path: root/omx/openmax/NVOMX_CameraExtensions.h
blob: 052c55880d288c81db14acd711f5076d241f1480 (plain)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
/*
 * Copyright (c) 2009-2014, NVIDIA CORPORATION.  All rights reserved.
 *
 * 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
 * <b>NVIDIA Tegra: OpenMAX Camera Extension Interface</b>
 *
 */

/**
 * @defgroup nv_omx_il_camera Camera
 *
 * This is the NVIDIA OpenMAX camera class extension interface.
 *
 * These extensions include auto-focus, auto-exposure, auto-whitebalance, half-press,
 * focus regions, sharpness, hue, framerate, encoder control, edge enhancement and more.
 *
 * @ingroup nvomx_camera_extension
 * @{
 */

#ifndef NVOMX_CameraExtensions_h_
#define NVOMX_CameraExtensions_h_

#include "NVOMX_ColorFormatExtensions.h"

typedef float NVX_F32;

/** Holds a floating point rectangle */
typedef struct NVX_RectF32
{
    NVX_F32 left;
    NVX_F32 top;
    NVX_F32 right;
    NVX_F32 bottom;
} NVX_RectF32;

#define NVX_MAX_FOCUS_REGIONS  8
#define NVX_MAX_EXPOSURE_REGIONS 8
#define NVX_MAX_DIRECT_FOCUSER_CONTROL_LENGTH  16
#define NVX_VIDEOENC_DCI_SIZE 80
#define MAX_NUM_SENSOR_MODES  30
#define NVX_MAX_CAMERACONFIGURATION_LENGTH 64
#define NVX_MAX_FD_OUTPUT_LENGTH 1024
#define NVX_MAX_FUSE_ID_SIZE 16
#define NVX_MAX_EXPOSURE_COUNT 2

typedef enum  NVX_WHITEBALCONTROLTYPE {
   NVX_WhiteBalControlVendorStartUnused  = OMX_WhiteBalControlVendorStartUnused,
   NVX_WhiteBalControlWarmFluorescent,
   NVX_WhiteBalControlTwilight,
   NVX_WhiteBalControlMax = 0x7FFFFFFF
}  NVX_WHITEBALCONTROLTYPE;

typedef enum NVX_VIDEO_ERROR_RESILIENCY_LEVEL_TYPE {
    NVX_VIDEO_ErrorResiliency_None = 0,
    NVX_VIDEO_ErrorResiliency_Low,
    NVX_VIDEO_ErrorResiliency_High,
    NVX_VIDEO_ErrorResiliency_Invalid = 0x7FFFFFFF
} NVX_VIDEO_ERROR_RESILIENCY_LEVEL_TYPE;

typedef enum NVX_VIDEO_APPLICATION_TYPE {
    NVX_VIDEO_Application_Camcorder = 0,    /**< Timestamps set for camcorder */
    NVX_VIDEO_Application_VideoTelephony,   /**< Timestamps set for telephony */
    NVX_VIDEO_Application_Invalid = 0x7FFFFFFF
} NVX_VIDEO_APPLICATION_TYPE;

typedef enum NVX_VIDEO_RATECONTROL_MODE{
    NVX_VIDEO_RateControlMode_CBR = 0,
    NVX_VIDEO_RateControlMode_VBR,
    NVX_VIDEO_RateControlMode_VBR2,
    NVX_VIDEO_RateControlMode_Invalid = 0x7FFFFFFF
}NVX_VIDEO_RATECONTROL_MODE;

/** Param extension index to fine tune video encoder configuration.
 *  See ::NVX_PARAM_VIDENCPROPERTY
 */
#define NVX_INDEX_PARAM_VIDEO_ENCODE_PROPERTY "OMX.Nvidia.index.param.video.encode.prop"
/** Holds data to fine tune video encoder configuration. */
typedef struct NVX_PARAM_VIDENCPROPERTY
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */

    NVX_VIDEO_APPLICATION_TYPE eApplicationType;                    /**< Application Type */
    NVX_VIDEO_ERROR_RESILIENCY_LEVEL_TYPE eErrorResiliencyLevel;    /**< Error Resiliency Level */
    OMX_BOOL bSvcEncodeEnable;                                      /**< Boolean to enable H.264 Scalable Video Codec mode */
    OMX_BOOL bSetMaxEncClock;                                       /**< Set Maximum clock for encoder hardware */
    OMX_BOOL bFrameSkip;                                            /**< Enable skipping of Frames */
    OMX_BOOL bAllIFrames;                                           /**< Encode all frames as I Frame */
    OMX_BOOL bBitBasedPacketization;                                /**< Packet size is based upon Number Of bits */
    OMX_BOOL bInsertSPSPPSAtIDR;                                    /**< Insert SPS/PPS at IDR */
    OMX_BOOL bUseConstrainedBP;                                     /**< Use Constrained BP */
    OMX_BOOL bInsertVUI;                                            /**< Insert VUI in the bitstream */
    OMX_BOOL bInsertAUD;                                            /**< Insert AUD in the bitstream */
    OMX_U32  nPeakBitrate;                                          /**< Peak Bitrate for VBR, if set to 0, encoder derive it from Level Idc */
    OMX_BOOL bEnableStuffing;                                       /**< Enable byte stuffing to maintain bitrate */
    OMX_BOOL bLowLatency;                                           /**< Reduce latency by lowering peak frame size (for both I and P frames) */
    OMX_BOOL bSliceLevelEncode;                                     /**< Reduce latency by delivering packet size based slices (for both I and P frames) */
    OMX_BOOL bSliceIntraRefreshEnable;                              /**< Enable Slice Intra Refresh Wave */
    OMX_U32  SliceIntraRefreshInterval;                             /**< Slice Intra Refresh Interval in number of frames */
    OMX_U32  nVirtualBufferSize;                                    /**< Virtual Buffer Size specified by the app in bits */
    OMX_BOOL bEnableTwopassCBR;                                     /**< Enable two pass cbr mode if RC mode set is CBR*/
} NVX_PARAM_VIDENCPROPERTY;
/** Param extension index to set video encoder rate control mode.
 *  See ::NVX_PARAM_RATECONTROLMODE
 */
 #define NVX_INDEX_PARAM_RATECONTROLMODE "OMX.Nvidia.index.param.ratecontrolmode"
/** Holds data to set video encoder rate control mode.
 * See ::NVX_IndexParamRateControlMode
 */
typedef struct NVX_PARAM_RATECONTROLMODE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */

    NVX_VIDEO_RATECONTROL_MODE eRateCtrlMode;
}NVX_PARAM_RATECONTROLMODE;

/** Holds boolean parameter.
 */
typedef struct NVX_PARAM_BOOLEAN
{
    OMX_U32 nSize;                              /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;                   /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;                         /**< Port that this struct applies to */
    OMX_BOOL enable;                            /**< on/off */
} NVX_PARAM_BOOLEAN;

/** Param extension index to configure the video encode quantization range.
 *  See ::NVX_CONFIG_VIDENC_QUANTIZATION_RANGE
 */
#define NVX_INDEX_CONFIG_VIDEO_ENCODE_QUANTIZATION_RANGE "OMX.Nvidia.index.config.video.encode.quantizationrange"
/**
 * Holds information for configuring video compression quantization parameter limits
 * parameter values. Codecs may support different Min/Max QP values for different
 * frame types. Default value used by all MinQp/MaxQp should be set to some invalid
 * value. So that it will not affect encoder rate control parameter. If some control
 * is required for MinQp or MaxQp or Both, then set valid value for that param.
 */
typedef struct NVX_CONFIG_VIDENC_QUANTIZATION_RANGE {
    OMX_U32 nSize;                /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;     /**< OMX specification version info */
    OMX_U32 nPortIndex;           /**< Port that this structure applies to */
    OMX_U32 nMinQpI;              /**< Minimum QP value to use for index frames */
    OMX_U32 nMaxQpI;              /**< Maximum QP value to use for index frames */
    OMX_U32 nMinQpP;              /**< Minimum QP value to use for P frames */
    OMX_U32 nMaxQpP;              /**< Maximum QP value to use for P frames */
    OMX_U32 nMinQpB;              /**< Minimum QP value to use for B frames */
    OMX_U32 nMaxQpB;              /**< Maximum QP value to use for B frames */
} NVX_CONFIG_VIDENC_QUANTIZATION_RANGE;

/** Param extension index to get the quantization index used for last frame encoding
 *  See ::NVX_INDEX_CONFIG_VIDEO_ENCODE_LAST_FRAME_QP
 **/
#define NVX_INDEX_CONFIG_VIDEO_ENCODE_LAST_FRAME_QP "OMX.Nvidia.index.config.video.encode.lastframeqp"
/** Holds Quantization Index used in last frame encoding.
 */
typedef struct NVX_PARAM_LASTFRAMEQP
{
    OMX_U32 nSize;                              /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;                   /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;                         /**< Port that this struct applies to */
    OMX_U32  LastFrameQP;                            /**< on/off */
} NVX_PARAM_LASTFRAMEQP;

/** Param extension index to configure the h264 encoder quality parameters.
 *  See ::NVX_CONFIG_VIDENC_H264_QUALITY_PARAMS
 */
#define NVX_INDEX_PARAM_VIDENC_H264_QUALITY_PARAMS "OMX.Nvidia.index.param.video.encode.h264qualityparams"
/**
 * Holds information for configuring h264 quality control parameters
 * \a nFavorInterBias is used for giving bias towards Inter macroblocks for Intra/Inter mode decision
 * \a nFavorIntraBias is used for giving bias towards Intra macroblocks for Intra/Inter mode decision.
 * \a nFavorIntraBias_16X16 is used for giving bias towards Intra16x16 macroblocks for I16x16/I4x4 mode decision.
 */
typedef struct NVX_PARAM_VIDENC_H264_QUALITY_PARAMS {
    OMX_U32 nSize;                /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;     /**< OMX specification version info */
    OMX_U32 nPortIndex;           /**< Port that this structure applies to */
    OMX_U32 nFavorInterBias;      /**< To set bias towards Inter Macroblocks for I/P mode decision */
    OMX_U32 nFavorIntraBias;      /**< To set bias towards Intra macroblocks for I/P mode decision */
    OMX_U32 nFavorIntraBias_16X16;              /**< To set bias toward Intra16x16 macroblocks for Intra16x16/Intra4x4 mode decision */
} NVX_PARAM_VIDENC_H264_QUALITY_PARAMS;


/** Param extension index to enable/disable stringent bitrate for encoder.
 *  See ::OMX_CONFIG_BOOLEANTYPE
 */
#define NVX_INDEX_PARAM_VIDEO_ENCODE_STRINGENTBITRATE "OMX.Nvidia.index.param.video.encode.stringentbitrate"

/**
 * Config extension index to set/get stereo metadata.
 */
#define NVX_INDEX_CONFIG_VIDEO_STEREOINFO "OMX.Nvidia.index.config.videostereoinfo"

#define NVX_INDEX_CONFIG_VIDEO_MVCINFO "OMX.Nvidia.index.config.videomvcinfo"

// TODO: Need to finalize on the exact defines to expose to the app
// Frame Packing Format
typedef enum _NVX_VIDEO_FRAMEPACK_TYPE {
    NVX_VIDEO_FRAMEPACK_Type_Checker  = 0, // Checkerboard
    NVX_VIDEO_FRAMEPACK_Type_ColInt   = 1, // Column Interleaved
    NVX_VIDEO_FRAMEPACK_Type_RowInt   = 2, // Row Interleaved
    NVX_VIDEO_FRAMEPACK_Type_SbS      = 3, // Side by Side
    NVX_VIDEO_FRAMEPACK_Type_TB       = 4, // Top Bottom
    NVX_VIDEO_FRAMEPACK_Type_FrameInt = 5, // Temporal Frame Interleaved
    NVX_VIDEO_FRAMEPACK_TypeInvalid   = 0x7FFFFFFF
} NVX_VIDEO_FRAMEPACK_TYPE;

// Content Interpretation Type
typedef enum _NVX_VIDEO_CONTENT_TYPE {
    NVX_VIDEO_CONTENT_Type_Undef    = 0, // Undefined
    NVX_VIDEO_CONTENT_Type_LR       = 1, // Left first
    NVX_VIDEO_CONTENT_Type_RL       = 2, // Right first
    NVX_VIDEO_CONTENT_TypeInvalid   = 0x7FFFFFFF
} NVX_VIDEO_CONTENT_TYPE;

// Stereo Metadata structure
typedef struct NVX_CONFIG_VIDEO_STEREOINFO
{
    OMX_U32 nSize;                    /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;         /**< NVX extensions specification version */
    OMX_U32 nPortIndex;               /**< Port that this struct applies to */

    OMX_U32 stereoEnable;             /**< Stereo Enable / Disable for this buffer */
    NVX_VIDEO_FRAMEPACK_TYPE fpType;  /**< Stereo Frame-packing type */
    NVX_VIDEO_CONTENT_TYPE contentType; /**< Stereo Content Type */
} NVX_CONFIG_VIDEO_STEREOINFO;

// Stitch MVC views
typedef struct NVX_CONFIG_VIDEO_MVC_INFO
{
    OMX_U32 nSize;                    /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;         /**< NVX extensions specification version */
    OMX_U32 nPortIndex;               /**< Port that this struct applies to */

    OMX_BOOL stitch_MVCViews_Flag;     /**< Specifies if the 2 MVC views should be  stitched*/
} NVX_CONFIG_VIDEO_MVC_INFO;

/** Param extension index to configure slice level encode.
*   see: NVX_CONFIG_VIDEO_SLICELEVELENCODE
*/
#define NVX_INDEX_CONFIG_VIDEO_SLICELEVELENCODE "OMX.Nvidia.index.config.video.slicelevelencode"
/**   Holds flag to enable/disable slice level encode
*/
typedef struct NVX_CONFIG_VIDEO_SLICELEVELENCODE {
    OMX_U32 nSize; /** Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion; /** NVX extensions specification versions information */
    OMX_U32 nPortIndex; /** Port that this struct applies to */
    OMX_BOOL SliceLevelEncode; /** Slice level encode turn on/off */
} NVX_CONFIG_VIDEO_SLICELEVELENCODE;

/** Param extension index to configure time stamp calculated framerate.
*   see: NVX_CONFIG_VIDEO_TIMESTAMPCALCFRAMERATE
*/
#define NVX_INDEX_CONFIG_VIDEO_TIMESTAMPCALCFRAMERATE "OMX.Nvidia.index.config.video.timestampcalcframerate"
/**   Holds flag to enable/disable time stamp based frame rate calculation
*/
typedef struct NVX_CONFIG_VIDEO_TIMESTAMPCALCFRAMERATE {
    OMX_U32 nSize; /** Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion; /** NVX extensions specification versions information */
    OMX_U32 nPortIndex; /** Port that this struct applies to */
    OMX_BOOL TimeStampCalcFrameRate; /** time stamp based frame rate turn on/off */
} NVX_CONFIG_VIDEO_TIMESTAMPCALCFRAMERATE;

/** Param extension index to enable the video protected mode.
 *  See ::OMX_CONFIG_BOOLEANTYPE
 */
#define NVX_INDEX_CONFIG_VIDEO_PROTECT "OMX.Nvidia.index.config.video.protect"

/** Config extension index to enable camera test pattern.
 *  See ::NVX_CONFIG_CAMERATESTPATTERN
 */
#define NVX_INDEX_CONFIG_CAMERATESTPATTERN "OMX.Nvidia.index.config.cameratestpattern"
/** Holds data to enable camera test pattern. */
typedef struct NVX_CONFIG_CAMERATESTPATTERN
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U32 TestPatternIndex;       /**< Boolean to enable test pattern */
}NVX_CONFIG_CAMERATESTPATTERN;

/** Config extension index to set duration in milliseconds for smooth zooming.
 *  See ::OMX_PARAM_U32TYPE
 */
#define NVX_INDEX_CONFIG_SMOOTHZOOMTIME "OMX.Nvidia.index.config.smoothzoomtime"

/** Config extension index to trigger sensor power up.
 *  See ::OMX_CONFIG_BOOLEANTYPE
 */
#define NVX_INDEX_CONFIG_SENSORPOWERON "OMX.Nvidia.index.config.sensorpoweron"

/** Config extension index to set THS-Settle time for camera connected via MIPI CSI.
 *  See ::OMX_PARAM_U32TYPE
 */
#define NVX_INDEX_CONFIG_CILTHRESHOLD "OMX.Nvidia.index.config.cilthreshold"

/** Config extension index to abort zooming.
 *  See ::OMX_CONFIG_BOOLEANTYPE
 */
#define NVX_INDEX_CONFIG_ZOOMABORT "OMX.Nvidia.index.config.zoomabort"

/** Config extension index to set scale factor multiplier in digital zoom.
 *  See ::NVX_CONFIG_DZSCALEFACTORMULTIPLIER
 */
#define NVX_INDEX_CONFIG_DZSCALEFACTORMULTIPLIER "OMX.Nvidia.index.config.dzscalefactormultiplier"
/** Holds data to set scale factor multiplier in digital zoom. */
typedef struct NVX_CONFIG_DZSCALEFACTORMULTIPLIER
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_S32 ZoomFactorMultiplier;   /**< Scale factor from 100 to 800 (1.0-8.0) up to 8x digital */
}NVX_CONFIG_DZSCALEFACTORMULTIPLIER;

/** Config extension index to enable/disable camera preview.
 *  See ::OMX_CONFIG_BOOLEANTYPE
 */
#define NVX_INDEX_CONFIG_PREVIEWENABLE "OMX.Nvidia.index.config.previewenable"

/** Config extension index to enable/disable force camera postview output.
 *  See ::OMX_CONFIG_BOOLEANTYPE
 */
#define NVX_INDEX_CONFIG_FORCEPOSTVIEW "OMX.Nvidia.index.config.forcepostview"

/** Config extension index to start camera preview without outputing preview
 *  pictures. This allows AE/AWB converge and stay converged as soon as the
 *  preview window appears.
 *  See ::OMX_CONFIG_BOOLEANTYPE
 *
 *  AlgorithmWarmup is a command (not a state change) to start up nvmm
 *  camera. When nvmm camera receives this command, it starts preview
 *  capture and does AE/AWB converging. And it does not output either
 *  buffers or EOS to DZ. Then it puts the nvmm camera into a preview
 *  paused state.
 *
 *  AlgorithmWarmup is independent of PreviewEnable. 1. After Preview is
 *  enabled, there should be no need for AlgorithmWarmup.  2. PreviewEnable
 *  may be sent without preceeded by AlgorithmWarmup. The nvmm camera warms up
 *  AE/AWB by itself.
 *
 */
#define NVX_INDEX_CONFIG_ALGORITHMWARMUP "OMX.Nvidia.index.config.algorithmwarmup"

/** Config extension index to enable/disable capture pause.
 *  See ::OMX_CONFIG_BOOLEANTYPE
 */
#define NVX_INDEX_CONFIG_CAPTUREPAUSE "OMX.Nvidia.index.config.capturepause"


/** Config extension index to setup converge and lock (half-press).
 * When this extension is called, the camera component will start
 * converging (achieving) auto focus, auto exposure, and/or auto
 * white balance. If the camera component achieves one or
 * more of these properties then it will lock settings of those
 * properties. If the camera component was unable to achieve one or
 * more of those properties in a certain time then it times out
 * for that property.
 *
 * The camera component notifies the application about
 * those properties that were achieved and those that timed out
 * using events. The following lists shows the different
 * events that are sent.
 * - Auto focus achieved (See ::NVX_EventCamera_AutoFocusAchieved)
 * - Auto focus timed out (See ::NVX_EventCamera_AutoFocusTimedOut)
 * - Auto exposure achieved (See ::NVX_EventCamera_AutoExposureAchieved)
 * - Auto exposure timed out (See ::NVX_EventCamera_AutoExposureTimedOut)
 * - Auto white balance achieved (See
 *      ::NVX_EventCamera_AutoWhiteBalanceAchieved)
 * - Auto white balance timed out (See
 *      ::NVX_EventCamera_AutoWhiteBalanceTimedOut)
 *
  * Although converge and lock is used with auto focus, auto exposure, and
 * auto white balance properties, an application can choose to
 * enable any one or any combination of these properties. When
 * any of these properties is disabled then half press will not
 * attempt to achieve that property.
 *
 *  See ::NVX_CONFIG_CONVERGEANDLOCK
 */
#define NVX_INDEX_CONFIG_CONVERGEANDLOCK "OMX.Nvidia.index.config.convergeandlock"


/** Algorithm subtypes
 *  Has subtype of the algorithm that is used.
 */
#define NvxAlgSubType_None            0         /**<  Algorithm does nothave subtype */
#define NvxAlgSubType_AFFullRange     (1 << 0)   /**<  AF that uses entire range */
#define NvxAlgSubType_AFInfMode       (1 << 1)   /**<  AF only in the Infinity range */
#define NvxAlgSubType_AFMacroMode     (1 << 2)   /**<  AF only in the Macro range */
#define NvxAlgSubType_TorchDisable    (1 << 3)   /**<  Disable torch */

/** Holds data to setup converge and lock. */
typedef struct NVX_CONFIG_CONVERGEANDLOCK
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_BOOL bUnlock;               /**< Boolean to unlock AF, AE, AWB settings */
    OMX_BOOL bAutoFocus;            /**< Boolean to enable auto focus */
    OMX_BOOL bAutoExposure;         /**< Boolean to enable auto exposure */
    OMX_BOOL bAutoWhiteBalance;     /**< Boolean to enable auto white balance */
    OMX_U32  nTimeOutMS;            /**< Timeout in milliseconds */
    OMX_BOOL bRelock;               /**< Boolean hint to restore previous alg settings during lock */
    OMX_U32 algSubType;
} NVX_CONFIG_CONVERGEANDLOCK;

/** Config extension index to setup pre-capture converge.
 *  @deprecated This index is deprecated.
 */
#define NVX_INDEX_CONFIG_PRECAPTURECONVERGE "OMX.Nvidia.index.config.precaptureconverge"
/** Holds data to setup pre-capture converge. */
typedef struct NVX_CONFIG_PRECAPTURECONVERGE
{
    OMX_U32 nSize;                      /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;           /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;                 /**< Port that this struct applies to */
    OMX_BOOL bPrecaptureConverge;       /**< Boolean to enable pre-capture converge */
    OMX_BOOL bContinueDuringCapture;    /**< Boolean to enable continous converge during capture */
    OMX_U32  nTimeOutMS;                /**< Timeout in milliseconds */
} NVX_CONFIG_PRECAPTURECONVERGE;

#define NVX_INDEX_CONFIG_AEOVERRIDE "OMX.Nvidia.index.config.aeoverride"
/** Holds data to specify exposure time ratio for camera AOHDR. */
typedef struct NVX_CONFIG_AEOVERRIDE
{
    OMX_U32  nSize;                        /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;              /**< NVX extensions specification version information */
    OMX_U32  nPortIndex;                   /**< Port that this struct applies to */
    OMX_BOOL analog_gains_en;              /**< Indicates we are setting analog bayer gains */
    NVX_F32  analog_gains[4];              /**< Specifies per-channel analog gains
                                                [0]: gain for R, [1]: gain for GR,
                                                [2]: gain for GB, [3]: gain for B. */
    OMX_BOOL digital_gains_en;             /**< Indicates we are setting digital bayer gains */
    NVX_F32  digital_gains[4];             /**< Specifies per-channel digital gains
                                                [0]: gain for R, [1]: gain for GR,
                                                [2]: gain for GB, [3]: gain for B. */
    OMX_BOOL exposure_en;                  /**< Indicates we are setting exposure time(s) */
    OMX_U32  no_of_exposures;              /**< Number of exposures passed > */
    NVX_F32  exposures[NVX_MAX_EXPOSURE_COUNT]; /**< Exposure Times */
} NVX_CONFIG_AEOVERRIDE;

/** Config extension index to setup min and max frame rate for camera.
 *  See ::NVX_CONFIG_AUTOFRAMERATE
 */
#define NVX_INDEX_CONFIG_AUTOFRAMERATE "OMX.Nvidia.index.config.autoframerate"
/** Holds data to setup auto frame rate for camera. */
typedef struct NVX_CONFIG_AUTOFRAMERATE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_BOOL bEnabled;              /**< Boolean to enable auto frame rate */
    OMX_S32  low;                   /**< Lowest frame rate allowed */
    OMX_S32  high;                  /**< Highest frame rate allowed */
} NVX_CONFIG_AUTOFRAMERATE;

/** Config extension index to setup burst skip count.
 */
#define NVX_INDEX_CONFIG_BURSTSKIPCOUNT "OMX.Nvidia.index.config.burstskipcount"

/** Config extension index to control exposure regions.
 * The rectangle coordinates are normalized to -1.0 to 1.0 on the
 * X and Y axis, and given in fixed-point representation.
 * The weights should be positive floating-point values.
 * Auto exposure region will work only when auto exposure is enabled.
 * Setting nRegions to 0 will clear out any existing exposure regions
 * and restore the driver's default exposure algorithm.
 *
 *  See ::NVX_CONFIG_ExposureRegionsRect
 */
#define NVX_INDEX_CONFIG_EXPOSUREREGIONSRECT "OMX.Nvidia.index.config.exposureregionsrect"
/** Holds data to control exposure regions. */

typedef struct NVX_CONFIG_ExposureRegionsRect
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32      nRegions;                          /**< Number of regions */
    NVX_RectF32  regions[NVX_MAX_EXPOSURE_REGIONS];  /**< Array of NVX_RectF32 to specify each exposure region */
    NVX_F32      weights[NVX_MAX_EXPOSURE_REGIONS];  /**< Array of the relative weightings to apply to each exposure region */
} NVX_CONFIG_ExposureRegionsRect;

/** Config extension index to specify exposure time range for camera.
 *
 * Sets the minimum and maximum exposure time or ISO sensitivty from which the
 * capture component's auto exposure picks values.
 *
 * The camera component supports auto exposure, where it
 * dynamically changes exposure time and sensor's sensitivty between a
 * minimum value and a maximum value specified
 * by config property data structure.
 * Minimum and maximum possible exposure times and ISO gains are dependent
 * on the camera sensor. Values above the maximum and below the minimum
 * supported by the camera sensor are clipped.
 *
 * Values are in units of milliseconds. To limit the exposure to nothing
 * slower than 1/30 second, a setting like {0, 33} would be used. 0 would
 * be replaced with the sensors fastest exposure limit by the driver.
 *
 * To limit the exposure to nothing faster than 1/30 second, set the
 * range to {33, 0}. The 0 for "high" would be replaced with the
 * sensor's slowest exposer limit.
 *
 *  See ::NVX_CONFIG_EXPOSURETIME_RANGE
 */
#define NVX_INDEX_CONFIG_EXPOSURETIMERANGE "OMX.Nvidia.index.config.exposuretimerange"
/** Holds data to specify exposure time range for camera. */
typedef struct NVX_CONFIG_EXPOSURETIME_RANGE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U32  low;                   /**< Shortest exposure time allowed */
    OMX_U32  high;                  /**< Longest exposure time allowed */
} NVX_CONFIG_EXPOSURETIME_RANGE;

#define NVX_INDEX_CONFIG_SENSORETRANGE "OMX.Nvidia.index.config.sensoretrange"
typedef struct NVX_CONFIG_SENSOR_ET_RANGE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    NVX_F32  low;                   /**< Shortest exposure time allowed */
    NVX_F32  high;                  /**< Longest exposure time allowed */
} NVX_CONFIG_SENSOR_ET_RANGE;

/** Config extension index to set/get exposure time in float seconds. */
#define NVX_INDEX_CONFIG_EXPOSURETIME "OMX.Nvidia.index.config.exposuretime"
typedef struct NVX_CONFIG_EXPOSURETIME
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    NVX_F32 nExposureTime;          /**< Exposure time in seconds */
    OMX_BOOL bAutoShutterSpeed;     /**< Whether shutter speed is defined automatically */
} NVX_CONFIG_EXPOSURETIME;

#define NVX_INDEX_CONFIG_FUSEID "OMX.Nvidia.index.config.fuseid"
typedef struct NVX_CONFIG_SENSOR_FUSE_ID
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U32 fidSize;                /**< Number of fuse ID bytes populated */
    OMX_U8 fidBytes[NVX_MAX_FUSE_ID_SIZE];  /**< Fuse ID bytes */
} NVX_CONFIG_SENSOR_FUSE_ID;

/** Config extension index to set/get focus postion. */
#define NVX_INDEX_CONFIG_FOCUSPOSITION "OMX.Nvidia.index.config.focusposition"

/** Config extension index to set/get color correction matrix. */
#define NVX_INDEX_CONFIG_COLORCORRECTIONMATRIX "OMX.Nvidia.index.config.colorcorrectionmatrix"
typedef struct NVX_CONFIG_COLORCORRECTIONMATRIX
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    float ccMatrix[16];             /**< Color Correction Matrix */
} NVX_CONFIG_COLORCORRECTIONMATRIX;

/** Config extension index to specify ISO sensitivity range for camera.
 *
 * Sets the minimum and maximum exposure time or ISO sensitivty from which the
 * capture component's auto exposure picks values.
 *
 * The camera component supports auto exposure, where it
 * dynamically changes exposure time and sensor's sensitivty between a
 * minimum value and a maximum value specified
 * by config property data structure.
 * Minimum and maximum possible exposure times and ISO gains are dependent
 * on the camera sensor. Values above the maximum and below the minimum
 * supported by the camera sensor are clipped.
 *
 * Values are in units of ISO. To limit the ISO gain to nothing more
 * than ISO400, a setting like {0, 400} would be used. 0 would be
 * replaced with the sensor's lowest supported gain limit by the
 * driver. To limit the ISO gain to nothing less than ISO400, a
 * setting like {400, 0} would be used. 0 would be replaced with the
 * sensor's highest supported gain limit by the driver. To reset to
 * initialization value, set to {0, 0}.
 *
 * Since the Auto exposure algorithm is 'exposure time priority', limiting
 * the ISO range will only dim the image if the ISO is limited by setting
 * the range. The exposure time is not recalculated based off of the
 * ISO range limit.
 *
 *  See ::NVX_CONFIG_ISOSENSITIVITY_RANGE
 */
#define NVX_INDEX_CONFIG_ISOSENSITIVITYRANGE "OMX.Nvidia.index.config.isosensitivityrange"
/** Holds data to specify ISO sensitivity range for camera. */
typedef struct NVX_CONFIG_ISOSENSITIVITY_RANGE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U32  low;                   /**< Lowest ISO value allowed */
    OMX_U32  high;                  /**< Highest ISO value allowed */
} NVX_CONFIG_ISOSENSITIVITY_RANGE;

/** Config extension index to specify white balance correlated color
 * temperature (CCT) range for camera.
 *
 * Auto white balance will normally search a large set of illuminants to
 * estimate the CCT of a scene. This range can be limited to a subset
 * of the defined illuminants by setting this parameter.
 * The config property's low and high values in the range
 * specify the minimum and maximum CCT values to be searched. Legal values
 * are integers in units of degrees K. To select a specific illuminant,
 * the low and high members should be set to identical values. By default,
 * the low range value is 0, and the high value is MAX_INT.
 *
 *  See ::NVX_CONFIG_CCTWHITEBALANCE_RANGE
 */
#define NVX_INDEX_CONFIG_CCTWHITEBALANCERANGE "OMX.Nvidia.index.config.cctwhitebalancerange"
/** Holds data to specify whitebalance CCT range for camera. */
typedef struct NVX_CONFIG_CCTWHITEBALANCE_RANGE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U32  low;                   /**< Low CCT range value */
    OMX_U32  high;                  /**< High CCT range value */
} NVX_CONFIG_CCTWHITEBALANCE_RANGE;

/** Config extension index to setup raw capture.
 *  See ::NVX_CONFIG_CAMERARAWCAPTURE
 */
#define NVX_INDEX_CONFIG_CAMERARAWCAPTURE "OMX.Nvidia.index.config.camera.rawcapture"
/** Holds data to setup raw capture. */
typedef struct NVX_CONFIG_CAMERARAWCAPTURE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U32 nCaptureCount;          /**< Number of frames to capture */
    OMX_STRING Filename;            /**< File name to store into */
} NVX_CONFIG_CAMERARAWCAPTURE;

/** Config extension index to enable/disable concurrent raw dump.
 *  See ::OMX_CONFIG_BOOLEANTYPE
 */
#define NVX_INDEX_CONFIG_CONCURRENTRAWDUMPFLAG "OMX.Nvidia.index.config.concurrentrawdumflag"

typedef enum
{
    NvxFlicker_Off,
    NvxFlicker_Auto,
    NvxFlicker_50HZ,
    NvxFlicker_60HZ
} ENvxFlickerType;

/** Config extension index to setup flicker.
 *  See ::NVX_CONFIG_FLICKER
 */
#define NVX_INDEX_CONFIG_FLICKER "OMX.Nvidia.index.config.flicker"
/** Holds data to setup flicker. */
typedef struct NVX_CONFIG_FLICKER
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    ENvxFlickerType eFlicker;       /**< Flicker type */
} NVX_CONFIG_FLICKER;

typedef enum NVX_IMAGEFILTERTYPE {
    NVX_ImageFilterPosterize = 0x30000000,
    NVX_ImageFilterSepia,
    NVX_ImageFilterBW,
    NVX_ImageFilterManual,
    NVX_ImageFilterAqua,
    NVX_ImageFilterMax = 0x7FFFFFFF
} NVX_IMAGEFILTERTYPE;

/** Config extension index to setup hue.
 *  See ::NVX_CONFIG_HUETYPE
 */
#define NVX_INDEX_CONFIG_HUE "OMX.Nvidia.index.config.hue"
/** Holds data to setup hue. */
typedef struct NVX_CONFIG_HUETYPE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_S32 nHue;                   /**< Hue in degrees, 0 to 359 */
} NVX_CONFIG_HUETYPE;


/** Config extension index to control focus regions.
 * The rectangle coordinates are normalized to -1.0 to 1.0 on the
 * X and Y axis.
 * Auto focus region will work only when auto focus is enabled.
 *
 *  See ::NVX_CONFIG_FocusRegionsRect
 */
#define NVX_INDEX_CONFIG_FOCUSREGIONSRECT "OMX.Nvidia.index.config.focusregionsrect"
/** Holds data to control focus regions. */
typedef struct NVX_CONFIG_FocusRegionsRect
{
    OMX_U32     nRegions;                          /**< Number of regions */
    NVX_RectF32   regions[NVX_MAX_FOCUS_REGIONS];  /**< Array of NVX_RectF32 to specify each focus region */
} NVX_CONFIG_FocusRegionsRect;

/** Config extension index to control camera focusing regions sharpness values.
 *  You can use this interface to measure focus sharpness in manual mode.
 *  This interface fills in an ::NVX_CONFIG_FOCUSREGIONS_SHARPNESS structure.
 *  @note NVIDIA currently supports only one region, so the value of interest will be in:
 *  ::NVX_CONFIG_FOCUSREGIONS_SHARPNESS.nSharpness[0]
 */
#define NVX_INDEX_CONFIG_FOCUSREGIONSSHARPNESS "OMX.Nvidia.index.config.focusregionssharpness"
/** Holds data to control camera focusing regions sharpness values.
 * @sa NVX_INDEX_CONFIG_FOCUSREGIONSSHARPNESS
 */
typedef struct NVX_CONFIG_FOCUSREGIONS_SHARPNESS
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U32           nRegions;                             /**< Number of currently active focusing regions */
    NVX_F32           nSharpness[NVX_MAX_FOCUS_REGIONS];    /**< Sharpness values for active focusing regions. @note Currently, NVIDIA supports only one region, so the value of interest will be in \c NVX_CONFIG_FOCUSREGIONS_SHARPNESS.nSharpness[0]. You can use the ::NVX_INDEX_CONFIG_FOCUSREGIONSSHARPNESS interface to measure focus sharpness in manual mode.  This interface fills in an ::NVX_CONFIG_FOCUSREGIONS_SHARPNESS structure.  */
} NVX_CONFIG_FOCUSREGIONS_SHARPNESS;

/** Config extension index for direct focuser control.
 *  @note This extension is deprecated. What you probably want is
 *  OMX_IndexConfigFocusControl.
 */
#define NVX_INDEX_CONFIG_DIRECTFOCUSERCONTROL "OMX.Nvidia.index.config.directfocusercontrol"
/** Holds a direct focuser control. */
typedef struct NVX_CONFIG_DIRECT_FOCUSERCONTROL
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U32           nLength;                                              /**< Length of focuser control sequence */
    OMX_U32           nControl[NVX_MAX_DIRECT_FOCUSER_CONTROL_LENGTH];      /**< Focuser control sequence */
} NVX_CONFIG_DIRECT_FOCUSERCONTROL;

/** Config extension for querying camera focusing parameters.
 *
 *  See ::NVX_CONFIG_FOCUSER_PARAMETERS
 */
#define NVX_INDEX_CONFIG_FOCUSERPARAMETERS "OMX.Nvidia.index.config.focuserparameters"

typedef struct NVX_CONFIG_FOCUSER_PARAMETERS
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_S32           minPosition;          /**< Minimum focus position supported by Camera */
    OMX_S32           maxPosition;          /**< Maximum focus position supported by Camera */
    OMX_S32           hyperfocal;           /**< Hyperfocal focus position */
    OMX_S32           macro;                /**< Macro focus position */
    OMX_S32           powerSaving;          /**< Most power-efficient focus position */
                                            /**< (-1) if any position is good */
    OMX_BOOL sensorispAFsupport;
    OMX_BOOL          infModeAF;            /**< AF support in Infinity mode */
    OMX_BOOL          macroModeAF;          /**< AF support in Macro mode */
} NVX_CONFIG_FOCUSER_PARAMETERS;

/** Config extension for querying camera focusing parameters.
 *  Following variables map to the coresponding variables in structure NvIspAfConfigParams
 *  File camera/core/camera/alg/af/autofocus_common.h
 *
 *  See ::NVX_CONFIG_FOCUSER_INFO
 */
#define NVX_INDEX_CONFIG_FOCUSER_INFO "OMX.Nvidia.index.config.focuserinfo"

typedef struct NVX_CONFIG_FOCUSER_INFO
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_S32 positionPhysicalLow;
    OMX_S32 positionPhysicalHigh;
    OMX_S32 positionInf;
    OMX_S32 positionInfOffset;
    OMX_S32 positionMacro;
    OMX_S32 positionMacroOffset;
    OMX_S32 positionHyperFocal;
    OMX_S32 positionResting;
    OMX_S32 infMin;                 /**< Percentage value of the working range */
    OMX_S32 macroMax;               /**< Percentage value of the working range */
    OMX_S32 infInitSearch;          /**< Percentage value of the working range */
    OMX_S32 macroInitSearch;        /**< Percentage value of the working range */
    OMX_BOOL rangeEndsReversed;
    OMX_S32 hysteresis;
    OMX_S32 slewRate;
    OMX_S32 settleTime;
} NVX_CONFIG_FOCUSER_INFO;

/** Config extension for querying camera flash parameters.
 *
 *  See ::NVX_CONFIG_FLASH_PARAMETERS
 */
#define NVX_INDEX_CONFIG_FLASHPARAMETERS "OMX.Nvidia.index.config.flashparameters"

typedef struct NVX_CONFIG_FLASH_PARAMETERS
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_BOOL bPresent;              /**< Flash available for this sensor. */
} NVX_CONFIG_FLASH_PARAMETERS;

/** Config extension for querying camera low-level focuser device capabilities.
 *  See ::NVX_CONFIG_FOCUSER_CAPABILITIES
 */
#define NVX_INDEX_CONFIG_FOCUSERCAPABILITIES "OMX.Nvidia.index.config.focusercapabilities"
/** Holds a querying focuser capabilities. */
typedef struct NVX_CONFIG_FOCUSER_CAPABILITIES
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U32           nRange;               /**< Range of focuser movement in device-dependent steps */
    NVX_F32           directionFactor;      /**< Scaling factor for focuser device movement in "infinity" and "macro" directions */
    OMX_U32           nSettleTime;          /**< Guaranteed settling time in millisecs */
} NVX_CONFIG_FOCUSER_CAPABILITIES;

/** Config extension to set the AF auto focusing speed. Fast is potentially
 *  less accurate; not fast is accurate but potentially quite slow.
 */
#define NVX_INDEX_CONFIG_AUTOFOCUS_SPEED "OMX.Nvidia.index.config.autofocusspeed"
typedef struct  {
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_BOOL bFast;                 /**< OMX_TRUE if you want fast focusing mode
                                         @note Slow mode may take several seconds
                                         to settle. */
} NVX_CONFIG_AUTOFOCUS_SPEED;

/** Holds a sensor mode configuration. */
typedef struct NVX_SENSORMODE
{
    OMX_S32 width;
    OMX_S32 height;
    NVX_F32 FrameRate;
} NVX_SENSORMODE;

/** Config extension index to control sensor mode list of supported resolution and frame rate.
 *  See ::NVX_CONFIG_SENSORMODELIST
 */
#define NVX_INDEX_CONFIG_SENSORMODELIST "OMX.Nvidia.index.config.sensormodelist"
/** Holds sensor modes. */
typedef struct NVX_CONFIG_SENSORMODELIST
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */

    OMX_U32 nSensorModes;                                   /**< Number of sensor modes */
    NVX_SENSORMODE SensorModeList[MAX_NUM_SENSOR_MODES];    /**< Array of sensor modes */
} NVX_CONFIG_SENSORMODELIST;

#define NVX_INDEX_CONFIG_CAPTUREMODE "OMX.Nvidia.index.config.capturemode"
/** Holds Capture Sensor Mode . */
typedef struct NVX_CONFIG_CAPTUREMODE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */

    NVX_SENSORMODE mMode;           /** Sensor Mode */
} NVX_CONFIG_CAPTUREMODE;

#define NVX_INDEX_PARAM_PREVIEWMODE "OMX.Nvidia.index.param.previewmode"
/** Holds Preview Sensor Mode . */
typedef struct NVX_PARAM_PREVIEWMODE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */

    NVX_SENSORMODE mMode;           /** Sensor Mode */
} NVX_PARAM_PREVIEWMODE;

/** Config extension index to get sensor ID.
 *  See ::OMX_PARAM_U32TYPE
 */
#define NVX_INDEX_PARAM_SENSORID "OMX.Nvidia.index.config.sensorid"

/** Param extension index to set full 64-bit sensor GUID
 * See ::NVX_PARAM_SENSOR_GUID
 */
#define NVX_INDEX_PARAM_SENSOR_GUID "OMX.Nvidia.index.param.sensorguid"

/** Config/Param extension index to get number of available sensors on current platform.
 *   (Read-only)
 *  See ::OMX_PARAM_U32TYPE
 */
#define NVX_INDEX_PARAM_AVAILABLESENSORS "OMX.Nvidia.index.param.availablesensors"

/** Param extension index to set sensor mode.
 *  Sets the user-selected sensor mode (width, height, and frame rate).
 *  The default sensor mode is auto, i.e., \a WxHxFramerate is 0x0x0.
 *  The default auto mode (0x0x0) basically implies that the camera
 *  driver picks up the correct sensor mode using its own justification.
 *  Once the user-selected sensor mode is set using this interface,
 *  the default auto mode can be achieved again by setting 0x0x0 as
 *  sensor mode.
 *  See ::NVX_PARAM_SENSORMODE
 */
#define NVX_INDEX_PARAM_SENSORMODE "OMX.Nvidia.index.config.sensormode"

/** Holds the data for sensor mode setting. */
typedef struct NVX_PARAM_SENSORMODE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    NVX_SENSORMODE SensorMode;      /**< Sensor mode */
}NVX_PARAM_SENSORMODE;

/** Param extension index to set the video speed on camera component.
 *  Sets the user-selected video speed (0.25x/0.5x/1x/2x/3x/4x).
 *  The default speed on the video port of camera is 1.
 *  See ::NVX_PARAM_VIDEOSPEED
 */
#define NVX_INDEX_CONFIG_VIDEOSPEED "OMX.Nvidia.index.config.videospeed"

/** Holds the data for camera frame speed setting on video port. */
typedef struct NVX_PARAM_VIDEOSPEED
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_BOOL bEnable;               /**< Boolean to enable/disable recording speed */
    NVX_F32 nVideoSpeed;            /**< Video speed*/
}NVX_PARAM_VIDEOSPEED;

/** Config extension index to enable custom postview processing.
 *  See ::OMX_PARAM_U32TYPE
 */
#define NVX_INDEX_CONFIG_CUSTOMPOSTVIEW "OMX.Nvidia.index.config.custompostview"
typedef struct NVX_PARAM_CUSTOMPOSTVIEW
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_BOOL bEnable;               /**< Boolean to enable/disable recording speed */
}NVX_PARAM_CUSTOMPOSTVIEW;


/**
 * Defines the stereo camera modes.
 */
typedef enum {
    NvxLeftOnly = 0x01,                         /**< Only the sensor on the left is on. */
    NvxRightOnly = 0x02,                        /**< Only the sensor on the right is on. */
    NvxStereo = (NvxLeftOnly | NvxRightOnly),   /**< Sets the stereo camera to stereo mode. */
    NvxStereoCameraForce32 = 0x7FFFFFFF
} ENvxCameraStereoCameraMode;

/** Param extension index to set camera mode, if the camera is stereo.
    Must be set before sensor power on.
    Has no effect for non-stereo cameras.
*/
#define NVX_INDEX_PARAM_STEREOCAMERAMODE "OMX.Nvidia.index.param.stereocameramode"
/** Holds the data for stereo mode setting. */
typedef struct NVX_PARAM_STEREOCAMERAMODE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    ENvxCameraStereoCameraMode StereoCameraMode;      /**< ENvxCameraStereoCameraMode to select stereo camera mode */
}NVX_PARAM_STEREOCAMERAMODE;

/**
 * Defines the stereo camera capture type.
 */
typedef enum {
    NvxCameraCaptureType_None,              // No capture.
    NvxCameraCaptureType_Video,             // Video capture.
    NvxCameraCaptureType_Still,             // Photo capture.
    NvxCameraCaptureType_StillBurst,        // Photo burst capture.
    NvxCameraCaptureType_VideoSquashed,     // Video capture (Sqashed frame).
    NvxCameraCaptureType_Force32 = 0x7FFFFFFFL
} ENvxCameraCaptureType;

/**
 * Defines the stereo camera type.
 */
typedef enum {
     Nvx_BufferFlag_Stereo_None,
     Nvx_BufferFlag_Stereo_LeftRight,
     Nvx_BufferFlag_Stereo_RightLeft,
     Nvx_BufferFlag_Stereo_TopBottom,
     Nvx_BufferFlag_Stereo_BottomTop,
     Nvx_BufferFlag_Stereo_SeparateLR,
     Nvx_BufferFlag_Stereo_SeparateRL
} ENvxCameraStereoType;

/** Holds the stereo camera information. */
typedef struct NVX_STEREOCAPTUREINFO
{
    ENvxCameraCaptureType CameraCaptureType;
    ENvxCameraStereoType CameraStereoType;
} NVX_STEREOCAPTUREINFO;

/** Param extension index to set camera mode, if the camera is stereo.
    Must be set before sensor power on.
    Has no effect for non-stereo cameras.
*/
#define NVX_INDEX_PARAM_STEREOCAPTUREINFO "OMX.Nvidia.index.param.stereocaptureinfo"
/** Holds the data for stereo info setting. */
typedef struct NVX_PARAM_STEREOCAPTUREINFO
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    NVX_STEREOCAPTUREINFO StCaptureInfo;
} NVX_PARAM_STEREOCAPTUREINFO;

/** Param extension index to set use native handle (for camera preview)
*/
#define NVX_INDEX_PARAM_USE_NBH "OMX.Nvidia.index.param.useNativeBufferHandles"
/** Holds the data for stereo mode setting. */
typedef struct NVX_PARAM_USENATIVEBUFFERHANDLE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_BUFFERHEADERTYPE **bufferHeader;
    OMX_PTR oNativeBufferHandlePtr; /**< pointer to native buffer handle */
}NVX_PARAM_USENATIVEBUFFERHANDLE;


/** Config extension index to setup edge enhancement.
 * Edge enhancement increases the apparent sharpness of full
 * resolution images. It has no effect on downscaled images.
 *
 *  See ::NVX_CONFIG_EDGEENHANCEMENT
 */
#define NVX_INDEX_CONFIG_EDGEENHANCEMENT "OMX.Nvidia.index.config.edgeenhancement"
/** Holds data to setup edge enhancement. */
typedef struct NVX_CONFIG_EDGEENHANCEMENT
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */

    OMX_BOOL bEnable;               /**< Boolean to enable/disable edge enhancement */
    NVX_F32 strengthBias;               /**< Bias the Strength of edge enhancement (float: -1 to 1) */
} NVX_CONFIG_EDGEENHANCEMENT;

/** Config extension index for ISP data dump.
 *  @deprecated This index is deprecated.
 */
#define NVX_INDEX_CONFIG_ISPDATA "OMX.Nvidia.index.config.ispdata"
/** @deprecated This structure is deprecated. */
typedef struct NVX_CONFIG_ISPDATA
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    NVX_F32 ilData;                 /**< ilData */
    NVX_F32 ilData2;                /**< ilData2 */
} NVX_CONFIG_ISPDATA;

/** Config extension index to set temporal tradeoff level for video encoder.
 *
 * For example:
 *  - 0 = Encoder delivers frames as fast as possible
 *  - 1 = Encoder drops 1 in 5 frames
 *  - 2 = Encoder drops 1 in 3 frames
 *  - 3 = Encoder drops 1 in 2 frames
 *  - 4 = Encoder drops 2 in 3 frames
 *
 *  See ::NVX_ENCODE_VIDEOTEMPORALTRADEOFF for values for video encode
 *       temporal tradeoff level.
 *
 *  @sa ::NVX_CONFIG_TEMPORALTRADEOFF
 */
#define NVX_INDEX_CONFIG_VIDEO_ENCODE_TEMPORALTRADEOFF "OMX.Nvidia.index.config.video.encode.temporaltradeoff"
/** Holds data to set temporal tradeoff. */
typedef struct NVX_CONFIG_TEMPORALTRADEOFF
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U32 TemporalTradeOffLevel;  /**< Temporal tradeoff level */
} NVX_CONFIG_TEMPORALTRADEOFF;

/** Defines the encode video temporal tradeoff types used to
  * set the video temporal tradeoff level.
  * @sa ::NVX_CONFIG_TEMPORALTRADEOFF
  */
typedef enum NVX_ENCODE_VIDEOTEMPORALTRADEOFF{
    NVX_ENCODE_VideoEncTemporalTradeoffLevel_DropNone= 0,
    NVX_ENCODE_VideoEncTemporalTradeoffLevel_Drop1in5,
    NVX_ENCODE_VideoEncTemporalTradeoffLevel_Drop1in3,
    NVX_ENCODE_VideoEncTemporalTradeoffLevel_Drop1in2,
    NVX_ENCODE_VideoEncTemporalTradeoffLevel_Drop2in3,
    NVX_ENCODE_VideoEncTemporalTradeoffLevel_Force32 = 0x7FFFFFFF
} NVX_ENCODE_VIDEOTEMPORALTRADEOFF;

/** Config extension index to get decoder configartion information from video encoder.
 *  See ::NVX_CONFIG_DecoderConfigInfo
 */
#define NVX_INDEX_CONFIG_VIDEO_ENCODE_DCI "OMX.Nvidia.index.config.video.encode.dci"
/** Holds data to get decoder configuration. */
typedef struct NVX_CONFIG_DecoderConfigInfo
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U8 DecoderConfigInfo[NVX_VIDEOENC_DCI_SIZE];    /**< Decoder configuration info*/
    OMX_U8 SizeOfDecoderConfigInfo;                     /**< Size of decoder configuration info*/
}NVX_CONFIG_DecoderConfigInfo;


/** Config extension index for enabling per-frame user-space copies of the preview buffer.
 *
 *  See ::NVX_CONFIG_PREVIEW_FRAME_COPY
 */
#define NVX_INDEX_CONFIG_PREVIEW_FRAME_COPY "OMX.Nvidia.index.config.previewframecopy"
/** Holds data to enable/disable copying of preview frames */
typedef struct NVX_CONFIG_PREVIEW_FRAME_COPY
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_BOOL enable;                /**< enable/disable bit */
    OMX_U32 skipCount;            /**<  skipcount : Number of frame to be skip for preview frame copy */
} NVX_CONFIG_PREVIEW_FRAME_COPY;

/** Config extension index for enabling per-still user-space copies of the
 *  still confirmation buffer.
 *
 *  See ::NVX_CONFIG_STILL_CONFIRMATION_FRAME_COPY
 */
#define NVX_INDEX_CONFIG_STILL_CONFIRMATION_FRAME_COPY "OMX.Nvidia.index.config.stillconfirmationframecopy"
/** Holds data to enable/disable copying of still-confirmation frames */
typedef struct NVX_CONFIG_STILL_CONFIRMATION_FRAME_COPY
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_BOOL enable;                /**< enable/disable bit */
} NVX_CONFIG_STILL_CONFIRMATION_FRAME_COPY;

/** Config extension index to set the camera configuration
 *
 * The ConfigString can be one of the below specified strings:
 *
 * - "ae.ConvergeSpeed=%f"
 * - "awb.ConvergeSpeed=%f"
 * - "ispFunction.lensShading=%s"
 *
 * where:
 * - %f is a float value
 * - %s is a string
 *
 * The float value for
 * - ae.ConvergeSpeed must be [0.01-1.0]
 * - awb.ConvergeSpeed must be [0.01-1.0]
 *
 * The string value for ispFunction.lensShading must be:
 * - TRUE/true to enable lens shading
 * - FALSE/false to disable lens shading
 * For ex : "ispFunction.lensShading=TRUE"
 *          "ispFunction.lensShading=FALSE"
 *
 * If the ConfigString passed does not "EXACTLY" match any of the above three strings, then
 * an error is returned.
 *
 * See ::NVX_CONFIG_CAMERACONFIGURATION
 */
#define NVX_INDEX_CONFIG_CAMERACONFIGURATION "OMX.Nvidia.index.config.cameraconfiguration"
/** Holds camera configuration string */
typedef struct NVX_CONFIG_CAMERACONFIGURATION
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_STRING ConfigString;        /**< Camera Configuration string */
} NVX_CONFIG_CAMERACONFIGURATION;

/** Config extension index for enabling per-still, user-space copies of the
 *  still YUV.
 *
 *  See ::NVX_CONFIG_STILL_YUV_FRAME_COPY
 */
#define NVX_INDEX_CONFIG_STILL_YUV_FRAME_COPY "OMX.Nvidia.index.config.stillYUVframecopy"
/** Holds data to enable/disable copying of still YUV frames. */
typedef struct NVX_CONFIG_STILL_YUV_FRAME_COPY
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_BOOL enable;                /**< Enable/disable bit */
} NVX_CONFIG_STILL_YUV_FRAME_COPY;

/** Config extension index to querying if the camera is stereo.
 */
#define NVX_INDEX_CONFIG_STEREOCAPABLE "OMX.Nvidia.index.config.stereocapable"
/** Holds the data from stereo capability query. */
typedef struct NVX_CONFIG_STEREOCAPABLE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_BOOL StereoCapable;         /**< Boolean to indicate if this is a stereo camera */
} NVX_CONFIG_STEREOCAPABLE;

/** Config extension index for querying the scene brightness.
  * The brightness of the scene is the average scene luminance divided by the exposure value.
  * The higher the value, the brighter the scene.
  *
  * Read-only
 */
#define NVX_INDEX_CONFIG_SCENEBRIGHTNESS "OMX.Nvidia.index.config.scenebrightness"
/** Holds the data from scene brightness query. */
typedef struct NVX_CONFIG_SCENEBRIGHTNESS
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    NVX_F32 SceneBrightness;        /**< Scene brightness level */
    OMX_BOOL FlashNeeded;             /**< If flash light is needed for next capture */
} NVX_CONFIG_SCENEBRIGHTNESS;

/** Holds the custom block info from imager.  */
typedef struct NVX_CUSTOMINFO
{
  OMX_U32 SizeofData;
  OMX_STRING Data;
} NVX_CUSTOMINFO;

/** Config extension index to query custom block info from imager.
 */
#define NVX_INDEX_CONFIG_CUSTOMIZEDBLOCKINFO "OMX.Nvidia.index.config.customizedblockinfo"
/** Holds custom block info from imager. */
typedef struct NVX_CONFIG_CUSTOMIZEDBLOCKINFO
{
    OMX_U32 nSize;               /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;    /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;          /**< Port that this struct applies to */
    NVX_CUSTOMINFO CustomInfo;   /**< Custom info from imager */
} NVX_CONFIG_CUSTOMIZEDBLOCKINFO;

/** Config extension index for enabling advanced noise reduction.
 *
 *  See ::NVX_CONFIG_ADVANCED_NOISE_REDUCTION
 */
#define NVX_INDEX_CONFIG_ADVANCED_NOISE_REDUCTION "OMX.Nvidia.index.config.advancedNoiseReduction"
/** Holds data to control advanced noise reduction.

    The thresholds below are used to control the shape of the data
    Gaussian use to measure similarity between colors. Useful values
    will be between 0 and 0.2. The smaller the value, the more picky
    we are about considering something similar. The value of 0 means
    to disable filtering altogether for the corresponding channels.

    For each of luma, chroma:
      threshold[0] is used for horizontal filtering
      threshold[1] is used for vertical filtering
 */
typedef struct NVX_CONFIG_ADVANCED_NOISE_REDUCTION {
    OMX_U32 nSize;                      /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;           /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;                 /**< Port that this struct applies to */
    OMX_BOOL enable;                    /**< Enable/disable bit */
    NVX_F32  lumaThreshold[2];          /**< Filter parameters for luma */
    NVX_F32  chromaThreshold[2];        /**< Filter parameters for chroma */
    OMX_U32  lumaIsoThreshold;          /**< Disable luma filtering if ISO below this thresh */
    OMX_U32  chromaIsoThreshold;        /**< Disable chroma filtering if ISO below this thresh */
} NVX_CONFIG_ADVANCED_NOISE_REDUCTION;

// Post-processing noise reduction stuff

#define NVX_INDEX_CONFIG_NOISE_REDUCTION_V1 "OMX.Nvidia.index.config.nr.V1"
#define NVX_INDEX_CONFIG_NOISE_REDUCTION_V2 "OMX.Nvidia.index.config.nr.V2"

enum { NVX_NR_V2_PRESET_LEVELS   = 5 };
enum { NVX_NR_V2_GAIN_INDEX_SIZE = 16 };
enum { NVX_NR_V2_REDUCTION_DEPTH = 3 }; // Pyramid depth (not counting top band)
enum { NVX_NR_V2_DOWNSCALE_TAPS  = 2 };

typedef struct {
    OMX_U32 nSize;                      /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;           /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;                 /**< Port that this struct applies to */

    // Enables the Bilateral Noise reduction
    OMX_BOOL lumaEnable;
    OMX_BOOL chromaEnable;

    // Turns on the noise reduction only above specified ISO
    OMX_U32 lumaIsoThreshold;
    OMX_U32 chromaIsoThreshold;

    // Threshold parameters used to control how picky we are about
    // what a similar pixel is. Used to control the width of the
    // gaussian tent function. Useful values will be between 0 and 0.2.
    // If 0, then the corresponding planes will not be filtered.
    // Only the horizontal (1st pass) filtering is specified;
    // the vertical (2nd pass) is now forced to 0.58 * horizontal
    NVX_F32 lumaThreshold;
    NVX_F32 chromaThreshold;

    // Controls how we increase the thresholds as a function of the
    // gain applied by AE. Thresholds specified above apply when the
    // gain = 1.0, and increase with gain according to these values.
    NVX_F32 lumaSlope;
    NVX_F32 chromaSlope;
} NVX_CONFIG_NOISE_REDUCTION_V1;

typedef struct {
    OMX_U32 nSize;                      /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;           /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;                 /**< Port that this struct applies to */

    // Enables the Pyramid Noise reduction
    OMX_BOOL chromaEnable;

    // Turns on the chroma noise reduction only above specified ISO
    OMX_U32 chromaIsoThreshold;

    // Adjusts for sensor gain for gain index computation
    NVX_F32 chromaThreshold;
    NVX_F32 chromaSlope;

    // chromaSpeed == FALSE then disable 3x3 downsampler and use averaging downsampler
    OMX_BOOL chromaSpeed;

    // Enables the 5x5 luma convolution
    OMX_BOOL lumaConvolutionEnable;
} NVX_CONFIG_NOISE_REDUCTION_V2;

#define NVX_INDEX_CONFIG_BAYERGAINS "OMX.Nvidia.index.config.bayergains"
/** Reserved. Adjusts the per-channel bayer gains. */
typedef struct NVX_CONFIG_BAYERGAINS
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    NVX_F32 gains[4];                 /**< Gains per Bayer channel */
} NVX_CONFIG_BAYERGAINS;

/** Config extension index to get gain range of sensor mode. */
#define NVX_INDEX_CONFIG_GAINRANGE "OMX.Nvidia.index.config.gainrange"
typedef struct NVX_CONFIG_GAINRANGE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    NVX_F32 low;                    /**< Minimum gain of mode */
    NVX_F32 high;                   /**< Maximum gain of mode */
} NVX_CONFIG_GAINRANGE;

#define NVX_INDEX_CONFIG_VIDEOFRAME_CONVERSION "OMX.Nvidia.index.config.videoframeconversion"
/** Reserved. Produces video frame data in user-specified format from OMX buffer. */

typedef enum NVX_VIDEOFRAME_FORMAT {
    NVX_VIDEOFRAME_FormatYUV420 = 0,
    NVX_VIDEOFRAME_FormatNV21,
    NVX_VIDEOFRAME_FormatInvalid = 0x7FFFFFFF
} NVX_VIDEOFRAME_FORMAT;

typedef struct NVX_CONFIG_VIDEOFRAME_CONVERSION
{
    OMX_U32 nSize;                    /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;         /**< NVX extensions specification version */
    OMX_U32 nPortIndex;               /**< Port that this struct applies to */
    NVX_VIDEOFRAME_FORMAT userFormat; /**< Requested YUV data format */
    OMX_PTR omxBuffer;                /**< OMX buffer to take data from */
    OMX_U32 nDataSize;                /**< Converted data size in bytes */
    OMX_PTR data;                     /**< Pointer to data */
} NVX_CONFIG_VIDEOFRAME_CONVERSION;

/** Config extension index for enabling capture priority.
 *  In capture priority mode, still/video capture has a higher priority than
 *  preview, so still/video frame rate may increase while preview frame rate
 *  may decrease.
 */
#define NVX_INDEX_CONFIG_CAPTURE_PRIORITY "OMX.Nvidia.index.config.capturepriority"
/** Holds data to enable/disable capture priority. */
typedef struct NVX_CONFIG_CAPTURE_PRIORITY
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_BOOL Enable;                /**< Enable/disable bit */
} NVX_CONFIG_CAPTURE_PRIORITY;

#define NVX_INDEX_CONFIG_LENS_PHYSICAL_ATTR "OMX.Nvidia.index.config.lensPhysicalAttr"
/** Config extension index for getting focal length. */
typedef struct NVX_CONFIG_LENS_PHYSICAL_ATTR
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    NVX_F32 eFocalLength;           /**< Focal length */
    NVX_F32 eHorizontalAngle;       /**< Horizontal view angle */
    NVX_F32 eVerticalAngle;         /**< Vertical view angle */
} NVX_CONFIG_LENS_PHYSICAL_ATTR;

/** Config extension index to get focus distances.
 *  Gets the distances from the camera to where an object appears to be
 *  in focus. The object is sharpest at the optimal focus distance. The
 *  depth of field is the far focus distance minus near focus distance.
 *  See ::NVX_CONFIG_FOCUSDISTANCES
 */
#define NVX_INDEX_CONFIG_FOCUSDISTANCES "OMX.Nvidia.index.config.focusdistances"
/** Holds data to setup focus distance. */
typedef struct NVX_CONFIG_FOCUSDISTANCES
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version
                                         information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    NVX_F32 NearDistance;           /**< Near distance */
    NVX_F32 OptimalDistance;        /**< Optimal distance */
    NVX_F32 FarDistance;            /**< Far distance */
} NVX_CONFIG_FOCUSDISTANCES;

/** Config extension index to set a exposure bracket capture.
 *  This capture returns a burst of images each with a specified
 *  AE adjustment.  The avaliable range is (-3.0, +3.0)
 *  See ::NVX_INDEX_CONFIG_BRACKETCAPTURE
 */
#define NVX_INDEX_CONFIG_BRACKETCAPTURE "OMX.Nvidia.index.config.bracketcapture"
/** Holds data to setup focus distance. */
typedef struct NVX_CONFIG_EXPOSUREBRACKETCAPTURE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version
                                         information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U32 NumberOfCaptures;       /**< Number of valid adjustments */
    NVX_F32 FStopAdjustments[32];      /**< Array of adjustments*/
} NVX_CONFIG_EXPOSUREBRACKETCAPTURE;

/** Config extension index to set a continuous autofocus.
 *  See ::OMX_CONFIG_BOOLEANTYPE
 */
#define NVX_INDEX_CONFIG_CONTINUOUSAUTOFOCUS "OMX.Nvidia.index.config.continuousautofocus"

/** Config extension index to set a face-assisted (continuous) autofocus.
 *  See ::NVX_INDEX_CONFIG_FACEAUTOFOCUS
 */
#define NVX_INDEX_CONFIG_FACEAUTOFOCUS "OMX.Nvidia.index.config.faceautofocus"

/** Config extension index to pause continuous autofocus.
 *  See ::OMX_CONFIG_BOOLEANTYPE
 */
#define NVX_INDEX_CONFIG_CONTINUOUSAUTOFOCUS_PAUSE "OMX.Nvidia.index.config.continuousautofocuspause"

/** Config extension index to query the continuous autofocus alg state.
 *  See ::NVX_CONFIG_CONTINUOUSAUTOFOCUS_STATE
 */
#define NVX_INDEX_CONFIG_CONTINUOUSAUTOFOCUS_STATE "OMX.Nvidia.index.config.continuousautofocusstate"
/** Holds information about the CAF alg state */
typedef struct NVX_CONFIG_CONTINUOUSAUTOFOCUS_STATE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version
                                         information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_BOOL bConverged;            /**< Tells whether the alg is converged */
} NVX_CONFIG_CONTINUOUSAUTOFOCUS_STATE;

#define NVX_INDEX_CONFIG_MANUALTORCHAMOUNT  "OMX.Nvidia.index.config.manualtorchamount"
#define NVX_INDEX_CONFIG_MANUALFLASHAMOUNT  "OMX.Nvidia.index.config.manualflashamount"
#define NVX_INDEX_CONFIG_AUTOFLASHAMOUNT    "OMX.Nvidia.index.config.autoflashamount"

/** Holds data to specify the amount of manual torch, manual flash, or auto flash for camera. */
typedef struct NVX_CONFIG_FLASHTORCHAMOUNT
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    NVX_F32  value;                 /**< Flash/torch value */
} NVX_CONFIG_FLASHTORCHAMOUNT;

/**
 * Defines the Camera ScaleTypes
 */
typedef enum NVX_CAMERA_SCALETYPE
{
    /**
     * Don't preserve aspect ratio. Output may be stretched if input does
     * not have the same aspect ratio as output.
     */
    NVX_CAMERA_ScaleType_Normal=0x1,

    /**
     * Preserve aspect ratio. Stretch the input image to the center
     * of output surface. Pad black color on output surface outside the
     * stretched input image.
     */
    NVX_CAMERA_ScaleType_Pad,

    /**
     * Preserve aspect ratio. Crop input image to fit output surface so
     * the whole output surface will be filled with cropped input image.
     */
    NVX_CAMERA_ScaleType_Crop,

    /**
     * Don't preserve aspect ratio. Output may be stretched if input does
     * not have the same aspect ratio as output. For rotation involving
     * XY swap like 90/270, the output surface doesn't get transformed.
     */
    NVX_CAMERA_ScaleType_Stretched,

    NVX_CAMERA_ScaleType_Force32 = 0x7FFFFFFF
}NVX_CAMERA_SCALETYPE;

#define NVX_INDEX_CONFIG_COMMONSCALETYPE  "OMX.Nvidia.index.config.commonscaletype"

/** Holds scale type for preview, still and video output. */
typedef struct NVX_CONFIG_COMMONSCALETYPE
{
    OMX_U32 nSize;                       /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;            /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;                  /**< Port that this struct applies to */
    NVX_CAMERA_SCALETYPE type;           /**< NVX_CAMERA_SCALETYPE */
} NVX_CONFIG_COMMONSCALETYPE;

/** Param extension index to enable/disable VI/ISP pre-scaling in camera for
 *  capture output.
 *  Several of the Tegra ISP features need to be disabled when pre-scaling is
 *  ON. For instance, EdgeEnhancement and Emboss.
 *  By default, pre-scaling is turned ON.
 */
#define NVX_INDEX_PARAM_PRESCALER_ENABLE_FOR_CAPTURE "OMX.Nvidia.index.param.prescalerenableforcapture"

/** Holds data to enable/disable VI/ISP pre-scaling in camera for capture output. */
typedef struct NVX_PARAM_PRESCALER_ENABLE_FOR_CAPTURE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_BOOL Enable;                /**< Enable/disable bit */
} NVX_PARAM_PRESCALER_ENABLE_FOR_CAPTURE;

/** Param extension index to fine tune video encoder and decoder buffer configuration.
 *  See ::NVX_PARAM_USELOWBUFFER
 */
#define NVX_INDEX_PARAM_USELOWBUFFER "OMX.Nvidia.index.param.uselowbuffer"
/** Holds data to fine tune video encoder and decoder buffer configuration. */
typedef struct NVX_PARAM_USELOWBUFFER
{
    OMX_U32 nSize;                 /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;      /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;            /**< Port that this struct applies to */
    OMX_BOOL bUseLowBuffer;         /**< Boolean to enable low buffer configuration */
} NVX_PARAM_USELOWBUFFER;

#define NVX_INDEX_CONFIG_FRAME_COPY_COLOR_FORMAT "OMX.Nvidia.index.config.framecopycolorformat"

/** Holds data to specify the color formats of preview, still confirmation,
 *  and still raw frame copies
 */
typedef struct NVX_CONFIG_FRAME_COPY_COLOR_FORMAT
{
    OMX_U32 nSize;                 /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;      /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;            /**< Port that this struct applies to */
    NVX_IMAGE_COLOR_FORMATTYPE PreviewFrameCopy;           /**< preview frame copy format */
    NVX_IMAGE_COLOR_FORMATTYPE StillConfirmationFrameCopy; /**< still confirmation frame copy format */
    NVX_IMAGE_COLOR_FORMATTYPE StillFrameCopy;             /**< still frame copy format */
} NVX_CONFIG_FRAME_COPY_COLOR_FORMAT;

#define NVX_INDEX_CONFIG_NSLBUFFERS "OMX.Nvidia.index.config.nslbuffers"
/** Holds data to specify the number of buffers to use for negative shutter lag */
typedef struct NVX_CONFIG_NSLBUFFERS
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U32 numBuffers;             /**< Number of buffers to use for NSL */
} NVX_CONFIG_NSLBUFFERS;

#define NVX_INDEX_CONFIG_NSLSKIPCOUNT "OMX.Nvidia.index.config.nslskipcount"
/** Holds data to specify the number of buffers to skip between each buffer that
 *  is saved to the NSL buffer list.
 */
typedef struct NVX_CONFIG_NSLSKIPCOUNT
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U32 skipCount;              /**< Number of buffers to skip before the next saved buffer */
} NVX_CONFIG_NSLSKIPCOUNT;


#define NVX_INDEX_CONFIG_COMBINEDCAPTURE "OMX.Nvidia.index.config.combinedcapture"
/** Holds data to specify the capture request parameters */
typedef struct NVX_CONFIG_COMBINEDCAPTURE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_U32 nNslImages;             /**< Number of images to pull from NSL buffer.
                                         Only applies to still port.*/
    OMX_U32 nNslPreFrames;          /**< Number of most-recent NSL frames to discard
                                         before sending frames to encoder.
                                         Only applies to still port.*/
    OMX_U32 nNslSkipCount;          /**< Number of NSL frames to skip between frames
                                         that are sent to encoder.  THIS FIELD IS
                                         DEPRECATED, NVX_CONFIG_NSLSKIPCOUNT should be
                                         used instead.*/
    OMX_U64 nNslTimestamp;          /**< Latest "valid" NSL capture time.  Driver
                                         will never give a frame that is newer
                                         than this as part of the NSL capture.
                                         Units of microseconds.
                                         Only applies to still port.*/
    OMX_U32 nImages;                /**< When this config is set on the still port, this
                                         sets the number of burst frames to capture and send
                                         to the encoder. When this config is set on the
                                         video port, a nonzero value will start capture,
                                         and a zero value will stop capture.*/
    OMX_U32 nSkipCount;             /**< Number of frames to skip between frames
                                         that are sent to encoder.
                                         Only applies to still port.*/

} NVX_CONFIG_COMBINEDCAPTURE;

#define NVX_INDEX_CONFIG_SENSORISPSUPPORT "OMX.Nvidia.index.config.sensorispsupport"
/** Config extension for querying sensor ISP support */
typedef struct NVX_CONFIG_SENSORISPSUPPORT
{
    OMX_U32 nSize;               /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;    /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;          /**< Port that this struct applies to */
    OMX_BOOL bIspSupport;        /**< Boolean to signify whether the sensor uses ISP */
} NVX_CONFIG_SENSORISPSUPPORT;

#define NVX_INDEX_CONFIG_THUMBNAILENABLE "OMX.Nvidia.index.config.thumnailenable"
/** Holds data to enable and to disable thumbnails */
typedef struct NVX_CONFIG_THUMBNAILENABLE
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */

    OMX_BOOL bThumbnailEnabled;      /**< Boolean to enable/disable thumbnails */
} NVX_CONFIG_THUMBNAILENABLE;

#define NVX_INDEX_CONFIG_REMAININGSTILLIMAGES "OMX.Nvidia.index.config.remainingstillimages"

#define NVX_INDEX_CONFIG_LOWLIGHTTHRESHOLD "OMX.Nvidia.index.config.lowlightthreshold"
typedef struct NVX_CONFIG_LOWLIGHTTHRESHOLD
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_S32 nLowLightThreshold;     /**< Low light threshold in microseconds (exposure time) */
} NVX_CONFIG_LOWLIGHTTHRESHOLD;

#define NVX_INDEX_CONFIG_MACROMODETHRESHOLD "OMX.Nvidia.index.config.macromodethreshold"
typedef struct NVX_CONFIG_MACROMODETHRESHOLD
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_S32 nMacroModeThreshold;     /**< macro mode threshold in percents */
} NVX_CONFIG_MACROMODETHRESHOLD;

#define NVX_INDEX_CONFIG_FOCUSMOVEMSG "OMX.Nvidia.index.config.focusmovemsg"

typedef struct NVX_CONFIG_FDLIMIT
{
    OMX_U32 nSize;                  /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;       /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;             /**< Port that this struct applies to */
    OMX_S32 limit;                  /**< Number of faces FD can detect at most */
} NVX_CONFIG_FDLIMIT;
#define NVX_INDEX_CONFIG_FDLIMIT "OMX.Nvidia.index.config.fdlimit"
#define NVX_INDEX_CONFIG_FDMAXLIMIT "OMX.Nvidia.index.config.fdmaxlimit"

typedef struct NVX_CONFIG_FDRESULT
{
    OMX_U32 nSize;                              /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;                   /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;                         /**< Port that this struct applies to */
    OMX_S32 num;                                /**< Tell how many faces are detected. */
    OMX_S8  fdResult[NVX_MAX_FD_OUTPUT_LENGTH]; /**< FD results will be copied here. */
} NVX_CONFIG_FDRESULT;
#define NVX_INDEX_CONFIG_FDRESULT "OMX.Nvidia.index.config.fdresult"

typedef struct NVX_CONFIG_BOOLEAN
{
    OMX_U32 nSize;                              /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;                   /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;                         /**< Port that this struct applies to */
    OMX_BOOL enable;                            /**< on/off */
} NVX_CONFIG_BOOLEAN;

typedef NVX_CONFIG_BOOLEAN NVX_CONFIG_FDDEBUG;
#define NVX_INDEX_CONFIG_FDDEBUG "OMX.Nvidia.index.config.fddebug"


/** Config extension index for bypassing Dz.
 *  See ::OMX_CONFIG_BOOLEANTYPE
 */
#define NVX_INDEX_CONFIG_STILLPASSTHROUGH "OMX.Nvidia.index.config.stillpassthrough"

/** Config extension index for giving preference to capture mode.
*  See ::OMX_CONFIG_BOOLEANTYPE
*/
#define NVX_INDEX_CONFIG_CAPTURESENSORMODEPREF "OMX.Nvidia.index.config.capturesensormodepref"

typedef struct NVX_CONFIG_FASTBURSTEN
{
    OMX_U32 nSize;                              /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion;                   /**< NVX extensions specification version information */
    OMX_U32 nPortIndex;                         /**< Port that this struct applies to */
    OMX_BOOL enable;
} NVX_CONFIG_FASTBURSTEN;
#define NVX_INDEX_CONFIG_FASTBURSTEN "OMX.Nvidia.index.config.fastburst"

#define NVX_INDEX_CONFIG_CAMERAMODE "OMX.Nvidia.index.config.cameramode"
/** Param extension index to enable/disable RAW output.
 *  When RAW ouput is enabled preview port should be disabled.
 *  See ::OMX_CONFIG_BOOLEANTYPE
 */
#define NVX_INDEX_PARAM_RAWOUTPUT "OMX.Nvidia.index.param.rawoutput"

/** Config extension index for programming device rotation.  Write-only.
 *
 *  See: OMX_CONFIG_ROTATIONTYPE
 */
#define NVX_INDEX_CONFIG_DEVICEROTATE "OMX.Nvidia.index.config.devicerotate"

/** Config extension index for to set concurrent capture requests sent to VI HW.
* Must not be called when capture is active. Call only when camera component is in idle state.
* See ::OMX_PARAM_U32TYPE
*/
#define NVX_INDEX_CONFIG_CONCURRENTCAPTUREREQUESTS "OMX.Nvidia.index.config.concurrentcapturerequests"

/**Config extension index for allocating remaining buffers during runtime
*  @deprecated This index is deprecated.
*/
#define NVX_INDEX_CONFIG_ALLOCATEREMAININGBUFFERS "OMX.Nvidia.index.config.allocateremainingbuffers"
typedef struct NVX_CONFIG_REMAININGBUFFERTYPE
{
    OMX_U32 nSize; /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion; /**< NVX extensions specification version information */
    OMX_U32 nPortIndex; /**< Port that this struct applies to */
    OMX_BOOL enableAllocateBuffers; /**< Flag to enable or disable */
    OMX_U32 numBuffers; /**< number of remaining Buffers to be allocated */
} NVX_CONFIG_REMAININGBUFFERTYPE;

typedef struct NVX_CONFIG_STILLPASSTHROUGH
{
    OMX_U32 nSize; /**< Size of the structure in bytes */
    OMX_VERSIONTYPE nVersion; /**< NVX extensions specification version information */
    OMX_U32 nPortIndex; /**< Port that this struct applies to */
    OMX_BOOL enablePassThrough; /**< Still Pass Through mode on/off */
} NVX_CONFIG_STILLPASSTHROUGH;

#endif

/** @} */
/* File EOF */