PeterBee97 commented on code in PR #7687:
URL: https://github.com/apache/nuttx/pull/7687#discussion_r1033064588


##########
include/nuttx/video/video.h:
##########
@@ -305,6 +630,136 @@ struct v4l2_selection
   struct v4l2_rect r;  /* The selection rectangle. */
 };
 
+typedef u_int64_t v4l2_std_id;
+
+/* one bit for each */
+#define V4L2_STD_PAL_B          ((v4l2_std_id)0x00000001)
+#define V4L2_STD_PAL_B1         ((v4l2_std_id)0x00000002)
+#define V4L2_STD_PAL_G          ((v4l2_std_id)0x00000004)
+#define V4L2_STD_PAL_H          ((v4l2_std_id)0x00000008)
+#define V4L2_STD_PAL_I          ((v4l2_std_id)0x00000010)
+#define V4L2_STD_PAL_D          ((v4l2_std_id)0x00000020)
+#define V4L2_STD_PAL_D1         ((v4l2_std_id)0x00000040)
+#define V4L2_STD_PAL_K          ((v4l2_std_id)0x00000080)
+
+#define V4L2_STD_PAL_M          ((v4l2_std_id)0x00000100)
+#define V4L2_STD_PAL_N          ((v4l2_std_id)0x00000200)
+#define V4L2_STD_PAL_Nc         ((v4l2_std_id)0x00000400)
+#define V4L2_STD_PAL_60         ((v4l2_std_id)0x00000800)
+
+#define V4L2_STD_NTSC_M         ((v4l2_std_id)0x00001000)    /* BTSC */
+#define V4L2_STD_NTSC_M_JP      ((v4l2_std_id)0x00002000)    /* EIA-J */
+#define V4L2_STD_NTSC_443       ((v4l2_std_id)0x00004000)
+#define V4L2_STD_NTSC_M_KR      ((v4l2_std_id)0x00008000)    /* FM A2 */
+
+#define V4L2_STD_SECAM_B        ((v4l2_std_id)0x00010000)
+#define V4L2_STD_SECAM_D        ((v4l2_std_id)0x00020000)
+#define V4L2_STD_SECAM_G        ((v4l2_std_id)0x00040000)
+#define V4L2_STD_SECAM_H        ((v4l2_std_id)0x00080000)
+#define V4L2_STD_SECAM_K        ((v4l2_std_id)0x00100000)
+#define V4L2_STD_SECAM_K1       ((v4l2_std_id)0x00200000)
+#define V4L2_STD_SECAM_L        ((v4l2_std_id)0x00400000)
+#define V4L2_STD_SECAM_LC       ((v4l2_std_id)0x00800000)
+
+/* ATSC/HDTV */
+#define V4L2_STD_ATSC_8_VSB     ((v4l2_std_id)0x01000000)
+#define V4L2_STD_ATSC_16_VSB    ((v4l2_std_id)0x02000000)
+
+/* Some macros to merge video standards in order to make live easier for the
+ * drivers and V4L2 applications
+ */
+
+/* "Common" NTSC/M - It should be noticed that V4L2_STD_NTSC_443 is
+ * Missing here.
+ */
+#define V4L2_STD_NTSC           (V4L2_STD_NTSC_M    |\
+                 V4L2_STD_NTSC_M_JP     |\
+                 V4L2_STD_NTSC_M_KR)
+/* Secam macros */
+#define V4L2_STD_SECAM_DK          (V4L2_STD_SECAM_D    |\
+                 V4L2_STD_SECAM_K    |\
+                 V4L2_STD_SECAM_K1)
+/* All Secam Standards */
+#define V4L2_STD_SECAM        (V4L2_STD_SECAM_B    |\
+                 V4L2_STD_SECAM_G    |\
+                 V4L2_STD_SECAM_H    |\
+                 V4L2_STD_SECAM_DK    |\
+                 V4L2_STD_SECAM_L       |\
+                 V4L2_STD_SECAM_LC)
+/* PAL macros */
+#define V4L2_STD_PAL_BG        (V4L2_STD_PAL_B        |\
+                 V4L2_STD_PAL_B1    |\
+                 V4L2_STD_PAL_G)
+#define V4L2_STD_PAL_DK        (V4L2_STD_PAL_D        |\
+                 V4L2_STD_PAL_D1    |\
+                 V4L2_STD_PAL_K)
+
+/* "Common" PAL - This macro is there to be compatible with the old
+ * V4L1 concept of "PAL": /BGDKHI.
+ * Several PAL standards are missing here: /M, /N and /Nc
+ */
+
+#define V4L2_STD_PAL        (V4L2_STD_PAL_BG    |\
+                 V4L2_STD_PAL_DK    |\
+                 V4L2_STD_PAL_H        |\
+                 V4L2_STD_PAL_I)
+
+/* Chroma "agnostic" standards */
+
+#define V4L2_STD_B        (V4L2_STD_PAL_B        |\
+                 V4L2_STD_PAL_B1    |\
+                 V4L2_STD_SECAM_B)
+#define V4L2_STD_G        (V4L2_STD_PAL_G        |\
+                 V4L2_STD_SECAM_G)
+#define V4L2_STD_H        (V4L2_STD_PAL_H        |\
+                 V4L2_STD_SECAM_H)
+#define V4L2_STD_L        (V4L2_STD_SECAM_L    |\
+                 V4L2_STD_SECAM_LC)
+#define V4L2_STD_GH        (V4L2_STD_G        |\
+                 V4L2_STD_H)
+#define V4L2_STD_DK        (V4L2_STD_PAL_DK    |\
+                 V4L2_STD_SECAM_DK)
+#define V4L2_STD_BG        (V4L2_STD_B        |\
+                 V4L2_STD_G)
+#define V4L2_STD_MN        (V4L2_STD_PAL_M        |\
+                 V4L2_STD_PAL_N        |\
+                 V4L2_STD_PAL_Nc    |\
+                 V4L2_STD_NTSC)
+
+/* Standards where MTS/BTSC stereo could be found */
+#define V4L2_STD_MTS        (V4L2_STD_NTSC_M    |\
+                 V4L2_STD_PAL_M        |\
+                 V4L2_STD_PAL_N        |\
+                 V4L2_STD_PAL_Nc)
+
+/* Standards for Countries with 60Hz Line frequency */
+#define V4L2_STD_525_60        (V4L2_STD_PAL_M        |\
+                 V4L2_STD_PAL_60    |\
+                 V4L2_STD_NTSC        |\
+                 V4L2_STD_NTSC_443)
+/* Standards for Countries with 50Hz Line frequency */
+#define V4L2_STD_625_50        (V4L2_STD_PAL        |\
+                 V4L2_STD_PAL_N        |\
+                 V4L2_STD_PAL_Nc    |\
+                 V4L2_STD_SECAM)
+
+#define V4L2_STD_ATSC           (V4L2_STD_ATSC_8_VSB    |\
+                 V4L2_STD_ATSC_16_VSB)
+/* Macros with none and all analog standards */
+#define V4L2_STD_UNKNOWN        0
+#define V4L2_STD_ALL            (V4L2_STD_525_60    |\
+                 V4L2_STD_625_50)
+
+struct v4l2_standard
+{
+    u_int32_t             index;
+    v4l2_std_id           id;
+    u_int8_t              name[24];
+    struct v4l2_fract     frameperiod; /* Frames, not fields */
+    u_int32_t             framelines;
+    u_int32_t             reserved[4];

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to