]> git.sesse.net Git - vlc/blobdiff - src/misc/fourcc.c
Do not compare arrays against NULL (always true)
[vlc] / src / misc / fourcc.c
index ee6b48d078ec203d8a8cb30c6027191d6e521c67..3af6e50220344fa7223084df45c7fd8cf80d088a 100644 (file)
@@ -115,6 +115,7 @@ static const staticentry_t p_list_video[] = {
         E("xdve", "XDCAM EX 1080p25 50Mb/s CBR"),
         E("xdvf", "XDCAM EX 1080p30 50Mb/s CBR"),
 
+        E("xd51", "XDCAM HD422 720p30 50Mb/s CBR"),
         E("xd54", "XDCAM HD422 720p24 50Mb/s CBR"),
         E("xd55", "XDCAM HD422 720p25 50Mb/s CBR"),
         E("xd59", "XDCAM HD422 720p60 50Mb/s CBR"),
@@ -618,11 +619,6 @@ static const staticentry_t p_list_video[] = {
     B(VLC_CODEC_TRUEMOTION2, "Duck TrueMotion v2.0 Video"),
         A("TM20"),
 
-    /* FFMPEG's SNOW wavelet codec */
-    B(VLC_CODEC_SNOW, "FFMpeg SNOW wavelet Video"),
-        A("SNOW"),
-        A("snow"),
-
     B(VLC_CODEC_QTRLE, "Apple QuickTime RLE Video"),
         A("rle "),
 
@@ -711,6 +707,18 @@ static const staticentry_t p_list_video[] = {
         E("ap4c", "Apple ProRes 4444"),
         E("ap4h", "Apple ProRes 4444"),
 
+    B(VLC_CODEC_ICOD, "Apple Intermediate Codec"),
+        A("icod"),
+
+    B(VLC_CODEC_G2M2, "GoTo Meeting Codec 2"),
+        A("G2M2"),
+
+    B(VLC_CODEC_G2M3, "GoTo Meeting Codec 3"),
+        A("G2M3"),
+
+    B(VLC_CODEC_G2M4, "GoTo Meeting Codec 4"),
+        A("G2M4"),
+
     /* */
     B(VLC_CODEC_YV12, "Planar 4:2:0 YVU"),
         A("YV12"),
@@ -816,6 +824,10 @@ static const staticentry_t p_list_video[] = {
         A("NV16"),
     B(VLC_CODEC_NV61, "Biplanar 4:2:2 Y/VU"),
         A("NV61"),
+    B(VLC_CODEC_NV24, "Biplanar 4:4:4 Y/UV"),
+        A("NV24"),
+    B(VLC_CODEC_NV42, "Biplanar 4:4:4 Y/VU"),
+        A("NV42"),
 
     B(VLC_CODEC_I420_9L, "Planar 4:2:0 YUV 9-bit LE"),
         A("I09L"),
@@ -1203,9 +1215,6 @@ static const staticentry_t p_list_audio[] = {
         A("atrc"),
         A("\x70\x02\x00\x00"),
 
-    B(VLC_CODEC_SONIC, "Sonic"),
-        A("SONC"),
-
     B(VLC_CODEC_IMC, "IMC" ),
         A("\x01\x04\x00\x00"),
 
@@ -1454,7 +1463,7 @@ static entry_t Lookup( const staticentry_t p_list[], vlc_fourcc_t i_fourcc )
 
             memcpy( e.p_class, p_class, 4 );
             memcpy( e.p_fourcc, p->p_fourcc, 4 );
-            e.psz_description = p->psz_description ?
+            e.psz_description = p->psz_description[0] != '\0' ?
                                 p->psz_description : psz_description;
             break;
         }
@@ -1521,8 +1530,7 @@ vlc_fourcc_t vlc_fourcc_GetCodecAudio( vlc_fourcc_t i_fourcc, int i_bits )
             return 0;
         }
     }
-    else if( i_fourcc == VLC_FOURCC( 'a', 'r', 'a', 'w' ) ||
-             i_fourcc == VLC_FOURCC( 'p', 'c', 'm', ' ' ) )
+    else if( i_fourcc == VLC_FOURCC( 'a', 'r', 'a', 'w' ) )
     {
         switch( i_bytes )
         {
@@ -1602,6 +1610,9 @@ const char *vlc_fourcc_GetDescription( int i_cat, vlc_fourcc_t i_fourcc )
 #define VLC_CODEC_YUV_PLANAR_422 \
     VLC_CODEC_I422, VLC_CODEC_J422
 
+#define VLC_CODEC_YUV_SEMIPLANAR_422 \
+    VLC_CODEC_NV16, VLC_CODEC_NV61
+
 #define VLC_CODEC_YUV_PLANAR_422_16 \
     VLC_CODEC_I422_10L, VLC_CODEC_I422_10B, VLC_CODEC_I422_9L, VLC_CODEC_I422_9B
 
@@ -1611,6 +1622,9 @@ const char *vlc_fourcc_GetDescription( int i_cat, vlc_fourcc_t i_fourcc )
 #define VLC_CODEC_YUV_PLANAR_444 \
     VLC_CODEC_I444, VLC_CODEC_J444
 
+#define VLC_CODEC_YUV_SEMIPLANAR_444 \
+    VLC_CODEC_NV24, VLC_CODEC_NV42
+
 #define VLC_CODEC_YUV_PLANAR_444_16 \
     VLC_CODEC_I444_10L, VLC_CODEC_I444_10B, VLC_CODEC_I444_9L, VLC_CODEC_I444_9B
 
@@ -1782,13 +1796,18 @@ static const vlc_fourcc_t p_list_YUV[] = {
     VLC_CODEC_YUV_PLANAR_420,
     VLC_CODEC_YUV_SEMIPLANAR_420,
     VLC_CODEC_YUV_PLANAR_422,
+    VLC_CODEC_YUV_SEMIPLANAR_422,
     VLC_CODEC_YUV_PLANAR_440,
     VLC_CODEC_YUV_PLANAR_444,
+    VLC_CODEC_YUV_SEMIPLANAR_444,
     VLC_CODEC_YUV_PACKED,
     VLC_CODEC_I411, VLC_CODEC_YUV_PLANAR_410, VLC_CODEC_Y211,
     VLC_CODEC_YUV_PLANAR_420_16,
     VLC_CODEC_YUV_PLANAR_422_16,
     VLC_CODEC_YUV_PLANAR_444_16,
+    VLC_CODEC_VDPAU_VIDEO_420,
+    VLC_CODEC_VDPAU_VIDEO_422,
+    VLC_CODEC_VDPAU_VIDEO_444,
     0,
 };
 
@@ -1920,6 +1939,13 @@ bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
       .pixel_size = size, \
       .pixel_bits = bits }
 
+/* Zero planes for hardware picture handles. Cannot be manipulated directly. */
+#define FAKE_FMT() \
+    { .plane_count = 0, \
+      .p = { {.w = {1,1}, .h = {1,1}} }, \
+      .pixel_size = 0, \
+      .pixel_bits = 0 }
+
 static const struct
 {
     vlc_fourcc_t             p_fourcc[6];
@@ -1930,6 +1956,7 @@ static const struct
     { { VLC_CODEC_YUV_PLANAR_420, 0 },         PLANAR_8(3, 2, 2) },
     { { VLC_CODEC_NV12, VLC_CODEC_NV21, 0 },   PLANAR_8(2, 1, 2) },
     { { VLC_CODEC_YUV_PLANAR_422, 0 },         PLANAR_8(3, 2, 1) },
+    { { VLC_CODEC_NV16, VLC_CODEC_NV61, 0 },   PLANAR_8(2, 1, 1) },
     { { VLC_CODEC_YUV_PLANAR_440, 0 },         PLANAR_8(3, 1, 2) },
     { { VLC_CODEC_YUV_PLANAR_444, 0 },         PLANAR_8(3, 1, 1) },
     { { VLC_CODEC_YUVA, 0 },                   PLANAR_8(4, 1, 1) },
@@ -1964,6 +1991,10 @@ static const struct
     { { VLC_CODEC_Y211, 0 },                   { 1, { {{1,4}, {1,1}} }, 4, 32 } },
     { { VLC_CODEC_XYZ12,  0 },                 PACKED_FMT(6, 48) },
 
+    { { VLC_CODEC_VDPAU_VIDEO_420, VLC_CODEC_VDPAU_VIDEO_422,
+        VLC_CODEC_VDPAU_VIDEO_444,
+        VLC_CODEC_VDPAU_OUTPUT, 0 },           FAKE_FMT() },
+
     { {0}, { 0, {}, 0, 0 } }
 };