]> git.sesse.net Git - casparcg/commitdiff
Merged changes to 2k and 4k video mode names as well as additions of DCI modes from 2.0
authorHelge Norberg <helge.norberg@svt.se>
Fri, 21 Aug 2015 14:24:16 +0000 (16:24 +0200)
committerHelge Norberg <helge.norberg@svt.se>
Fri, 21 Aug 2015 14:24:16 +0000 (16:24 +0200)
core/video_format.cpp
core/video_format.h
modules/decklink/util/util.h
shell/casparcg.config

index a0bb0647d195febe1b1243378403f52a9db59ab9..61171c2af97db2991c366e7546af0507a9ae54af 100644 (file)
 namespace caspar { namespace core {
        
        const std::vector<video_format_desc> format_descs = {
-               { video_format::pal,        720,  576,  1024, 576,  field_mode::upper,       25,    1,    L"PAL",       { 1920                         } },
-               { video_format::ntsc,       720,  486,  720,  540,  field_mode::lower,       30000, 1001, L"NTSC",      { 1602, 1601, 1602, 1601, 1602 } },
-               { video_format::x576p2500,  720,  576,  1024, 576,  field_mode::progressive, 25,    1,    L"576p2500",  { 1920                         } },
-               { video_format::x720p2398,  1280, 720,  1280, 720,  field_mode::progressive, 24000, 1001, L"720p2398",  { 2002                         } },
-               { video_format::x720p2400,  1280, 720,  1280, 720,  field_mode::progressive, 24,    1,    L"720p2400",  { 2000                         } },
-               { video_format::x720p2500,  1280, 720,  1280, 720,  field_mode::progressive, 25,    1,    L"720p2500",  { 1920                         } },
-               { video_format::x720p5000,  1280, 720,  1280, 720,  field_mode::progressive, 50,    1,    L"720p5000",  { 960                          } },
-               { video_format::x720p2997,  1280, 720,  1280, 720,  field_mode::progressive, 30000, 1001, L"720p2997",  { 1602, 1601, 1602, 1601, 1602 } },
-               { video_format::x720p5994,  1280, 720,  1280, 720,  field_mode::progressive, 60000, 1001, L"720p5994",  { 801,  800,  801,  801,  801  } },
-               { video_format::x720p3000,  1280, 720,  1280, 720,  field_mode::progressive, 30,    1,    L"720p3000",  { 1600                         } },
-               { video_format::x720p6000,  1280, 720,  1280, 720,  field_mode::progressive, 60,    1,    L"720p6000",  { 800                          } },
-               { video_format::x1080p2398, 1920, 1080, 1920, 1080, field_mode::progressive, 24000, 1001, L"1080p2398", { 2002                         } },
-               { video_format::x1080p2400, 1920, 1080, 1920, 1080, field_mode::progressive, 24,    1,    L"1080p2400", { 2000                         } },
-               { video_format::x1080i5000, 1920, 1080, 1920, 1080, field_mode::upper,       25,    1,    L"1080i5000", { 1920                         } },
-               { video_format::x1080i5994, 1920, 1080, 1920, 1080, field_mode::upper,       30000, 1001, L"1080i5994", { 1602, 1601, 1602, 1601, 1602 } },
-               { video_format::x1080i6000, 1920, 1080, 1920, 1080, field_mode::upper,       30,    1,    L"1080i6000", { 1600                         } },
-               { video_format::x1080p2500, 1920, 1080, 1920, 1080, field_mode::progressive, 25,    1,    L"1080p2500", { 1920                         } },
-               { video_format::x1080p2997, 1920, 1080, 1920, 1080, field_mode::progressive, 30000, 1001, L"1080p2997", { 1602, 1601, 1602, 1601, 1602 } },
-               { video_format::x1080p3000, 1920, 1080, 1920, 1080, field_mode::progressive, 30,    1,    L"1080p3000", { 1600                         } },
-               { video_format::x1080p5000, 1920, 1080, 1920, 1080, field_mode::progressive, 50,    1,    L"1080p5000", { 960                          } },
-               { video_format::x1080p5994, 1920, 1080, 1920, 1080, field_mode::progressive, 60000, 1001, L"1080p5994", { 801,  800,  801,  801,  801  } },
-               { video_format::x1080p6000, 1920, 1080, 1920, 1080, field_mode::progressive, 60,    1,    L"1080p6000", { 800                          } },
-               { video_format::x2k2398,    2048, 1556, 2048, 1556, field_mode::progressive, 24000, 1001, L"2k2398",    { 2002                         } },
-               { video_format::x2k2400,    2048, 1556, 2048, 1556, field_mode::progressive, 24,    1,    L"2k2400",    { 2000                         } },
-               { video_format::x2k2500,    2048, 1556, 2048, 1556, field_mode::progressive, 25,    1,    L"2k2500",    { 1920                         } },
-               { video_format::x4k2398,    3840, 2160, 3840, 2160, field_mode::progressive, 24000, 1001, L"4k2398",    { 2002                         } },
-               { video_format::x4k2400,    3840, 2160, 3840, 2160, field_mode::progressive, 24,    1,    L"4k2400",    { 2000                         } },
-               { video_format::x4k2500,    3840, 2160, 3840, 2160, field_mode::progressive, 25,    1,    L"4k2500",    { 1920                         } },
-               { video_format::x4k2997,    3840, 2160, 3840, 2160, field_mode::progressive, 30000, 1001, L"4k2398",    { 1602, 1601, 1602, 1601, 1602 } },
-               { video_format::x4k3000,    3840, 2160, 3840, 2160, field_mode::progressive, 30,    1,    L"4k3000",    { 1600                         } },
-               { video_format::invalid,    0,    0,    0,    0,    field_mode::progressive, 1,     1,    L"invalid",   { 1                            } }
+               { video_format::pal,          720,  576,  1024, 576,  field_mode::upper,       25,    1,    L"PAL",          { 1920                         } },
+               { video_format::ntsc,         720,  486,  720,  540,  field_mode::lower,       30000, 1001, L"NTSC",         { 1602, 1601, 1602, 1601, 1602 } },
+               { video_format::x576p2500,    720,  576,  1024, 576,  field_mode::progressive, 25,    1,    L"576p2500",     { 1920                         } },
+               { video_format::x720p2398,    1280, 720,  1280, 720,  field_mode::progressive, 24000, 1001, L"720p2398",     { 2002                         } },
+               { video_format::x720p2400,    1280, 720,  1280, 720,  field_mode::progressive, 24,    1,    L"720p2400",     { 2000                         } },
+               { video_format::x720p2500,    1280, 720,  1280, 720,  field_mode::progressive, 25,    1,    L"720p2500",     { 1920                         } },
+               { video_format::x720p5000,    1280, 720,  1280, 720,  field_mode::progressive, 50,    1,    L"720p5000",     { 960                          } },
+               { video_format::x720p2997,    1280, 720,  1280, 720,  field_mode::progressive, 30000, 1001, L"720p2997",     { 1602, 1601, 1602, 1601, 1602 } },
+               { video_format::x720p5994,    1280, 720,  1280, 720,  field_mode::progressive, 60000, 1001, L"720p5994",     { 801,  800,  801,  801,  801  } },
+               { video_format::x720p3000,    1280, 720,  1280, 720,  field_mode::progressive, 30,    1,    L"720p3000",     { 1600                         } },
+               { video_format::x720p6000,    1280, 720,  1280, 720,  field_mode::progressive, 60,    1,    L"720p6000",     { 800                          } },
+               { video_format::x1080p2398,   1920, 1080, 1920, 1080, field_mode::progressive, 24000, 1001, L"1080p2398",    { 2002                         } },
+               { video_format::x1080p2400,   1920, 1080, 1920, 1080, field_mode::progressive, 24,    1,    L"1080p2400",    { 2000                         } },
+               { video_format::x1080i5000,   1920, 1080, 1920, 1080, field_mode::upper,       25,    1,    L"1080i5000",    { 1920                         } },
+               { video_format::x1080i5994,   1920, 1080, 1920, 1080, field_mode::upper,       30000, 1001, L"1080i5994",    { 1602, 1601, 1602, 1601, 1602 } },
+               { video_format::x1080i6000,   1920, 1080, 1920, 1080, field_mode::upper,       30,    1,    L"1080i6000",    { 1600                         } },
+               { video_format::x1080p2500,   1920, 1080, 1920, 1080, field_mode::progressive, 25,    1,    L"1080p2500",    { 1920                         } },
+               { video_format::x1080p2997,   1920, 1080, 1920, 1080, field_mode::progressive, 30000, 1001, L"1080p2997",    { 1602, 1601, 1602, 1601, 1602 } },
+               { video_format::x1080p3000,   1920, 1080, 1920, 1080, field_mode::progressive, 30,    1,    L"1080p3000",    { 1600                         } },
+               { video_format::x1080p5000,   1920, 1080, 1920, 1080, field_mode::progressive, 50,    1,    L"1080p5000",    { 960                          } },
+               { video_format::x1080p5994,   1920, 1080, 1920, 1080, field_mode::progressive, 60000, 1001, L"1080p5994",    { 801,  800,  801,  801,  801  } },
+               { video_format::x1080p6000,   1920, 1080, 1920, 1080, field_mode::progressive, 60,    1,    L"1080p6000",    { 800                          } },
+               { video_format::x1556p2398,   2048, 1556, 2048, 1556, field_mode::progressive, 24000, 1001, L"1556p2398",    { 2002                         } },
+               { video_format::x1556p2400,   2048, 1556, 2048, 1556, field_mode::progressive, 24,    1,    L"1556p2400",    { 2000                         } },
+               { video_format::x1556p2500,   2048, 1556, 2048, 1556, field_mode::progressive, 25,    1,    L"1556p2500",    { 1920                         } },
+               { video_format::dci1080p2398, 2048, 1080, 2048, 1080, field_mode::progressive, 24000, 1001, L"dci1080p2398", { 2002                         } },
+               { video_format::dci1080p2400, 2048, 1080, 2048, 1080, field_mode::progressive, 24,    1,    L"dci1080p2400", { 2000                         } },
+               { video_format::dci1080p2500, 2048, 1080, 2048, 1080, field_mode::progressive, 25,    1,    L"dci1080p2500", { 1920                         } },
+               { video_format::x2160p2398,   3840, 2160, 3840, 2160, field_mode::progressive, 24000, 1001, L"2160p2398",    { 2002                         } },
+               { video_format::x2160p2400,   3840, 2160, 3840, 2160, field_mode::progressive, 24,    1,    L"2160p2400",    { 2000                         } },
+               { video_format::x2160p2500,   3840, 2160, 3840, 2160, field_mode::progressive, 25,    1,    L"2160p2500",    { 1920                         } },
+               { video_format::x2160p2997,   3840, 2160, 3840, 2160, field_mode::progressive, 30000, 1001, L"2160p2997",    { 1602, 1601, 1602, 1601, 1602 } },
+               { video_format::x2160p3000,   3840, 2160, 3840, 2160, field_mode::progressive, 30,    1,    L"2160p3000",    { 1600                         } },
+               { video_format::dci2160p2398, 4096, 2160, 4096, 2160, field_mode::progressive, 24000, 1001, L"dci2160p2398", { 2002                         } },
+               { video_format::dci2160p2400, 4096, 2160, 4096, 2160, field_mode::progressive, 24,    1,    L"dci2160p2400", { 2000                         } },
+               { video_format::dci2160p2500, 4096, 2160, 4096, 2160, field_mode::progressive, 25,    1,    L"dci2160p2500", { 1920                         } },
+               { video_format::invalid,      0,    0,    0,    0,    field_mode::progressive, 1,     1,    L"invalid",      { 1                            } }
        };
 
 video_format_desc::video_format_desc(
index cb260480a14b26ba38b860496bbf0ac56bc45740..8e2a781179c29bdcfce667a41a0cbcf565d194a1 100644 (file)
@@ -53,14 +53,20 @@ enum class video_format
        x1080p5000,
        x1080p5994,
        x1080p6000,
-       x2k2398,
-       x2k2400,
-       x2k2500,
-       x4k2398,
-       x4k2400,
-       x4k2500,
-       x4k2997,
-       x4k3000,
+       x1556p2398,
+       x1556p2400,
+       x1556p2500,
+       dci1080p2398,
+       dci1080p2400,
+       dci1080p2500,
+       x2160p2398,
+       x2160p2400,
+       x2160p2500,
+       x2160p2997,
+       x2160p3000,
+       dci2160p2398,
+       dci2160p2400,
+       dci2160p2500,
        invalid,
        count
 };
index 2880c62e841e727cf2cebbf30613d1c7fc07114e..73988088eb3b3c2c29246ad4b0eb620368bfb98e 100644 (file)
@@ -59,14 +59,20 @@ static BMDDisplayMode get_decklink_video_format(core::video_format fmt)
        case core::video_format::x1080p5000:    return bmdModeHD1080p50;
        case core::video_format::x1080p5994:    return bmdModeHD1080p5994;
        case core::video_format::x1080p6000:    return bmdModeHD1080p6000;
-       case core::video_format::x2k2398:               return bmdMode2k2398;
-       case core::video_format::x2k2400:               return bmdMode2k24;
-       case core::video_format::x2k2500:               return bmdMode2k25;
-       case core::video_format::x4k2398:               return bmdMode4K2160p2398;
-       case core::video_format::x4k2400:               return bmdMode4K2160p24;
-       case core::video_format::x4k2500:               return bmdMode4K2160p25;
-       case core::video_format::x4k2997:               return bmdMode4K2160p2997;
-       case core::video_format::x4k3000:               return bmdMode4K2160p30;
+       case core::video_format::x1556p2398:    return bmdMode2k2398;
+       case core::video_format::x1556p2400:    return bmdMode2k24;
+       case core::video_format::x1556p2500:    return bmdMode2k25;
+       case core::video_format::dci1080p2398:  return bmdMode2kDCI2398;
+       case core::video_format::dci1080p2400:  return bmdMode2kDCI24;
+       case core::video_format::dci1080p2500:  return bmdMode2kDCI25;
+       case core::video_format::x2160p2398:    return bmdMode4K2160p2398;
+       case core::video_format::x2160p2400:    return bmdMode4K2160p24;
+       case core::video_format::x2160p2500:    return bmdMode4K2160p25;
+       case core::video_format::x2160p2997:    return bmdMode4K2160p2997;
+       case core::video_format::x2160p3000:    return bmdMode4K2160p30;
+       case core::video_format::dci2160p2398:  return bmdMode4kDCI2398;
+       case core::video_format::dci2160p2400:  return bmdMode4kDCI24;
+       case core::video_format::dci2160p2500:  return bmdMode4kDCI25;
        default:                                                                return (BMDDisplayMode)ULONG_MAX;
        }
 }
@@ -75,31 +81,37 @@ static core::video_format get_caspar_video_format(BMDDisplayMode fmt)
 {
        switch(fmt)
        {
-       case bmdModePAL:                                                return core::video_format::pal;         
-       case bmdModeNTSC:                                               return core::video_format::ntsc;                
-       case bmdModeHD720p50:                                   return core::video_format::x720p5000;   
-       case bmdModeHD720p5994:                                 return core::video_format::x720p5994;   
-       case bmdModeHD720p60:                                   return core::video_format::x720p6000;   
-       case bmdModeHD1080p2398:                                return core::video_format::x1080p2398;  
-       case bmdModeHD1080p24:                                  return core::video_format::x1080p2400;  
-       case bmdModeHD1080i50:                                  return core::video_format::x1080i5000;  
-       case bmdModeHD1080i5994:                                return core::video_format::x1080i5994;  
-       case bmdModeHD1080i6000:                                return core::video_format::x1080i6000;  
+       case bmdModePAL:                                                return core::video_format::pal;
+       case bmdModeNTSC:                                               return core::video_format::ntsc;
+       case bmdModeHD720p50:                                   return core::video_format::x720p5000;
+       case bmdModeHD720p5994:                                 return core::video_format::x720p5994;
+       case bmdModeHD720p60:                                   return core::video_format::x720p6000;
+       case bmdModeHD1080p2398:                                return core::video_format::x1080p2398;
+       case bmdModeHD1080p24:                                  return core::video_format::x1080p2400;
+       case bmdModeHD1080i50:                                  return core::video_format::x1080i5000;
+       case bmdModeHD1080i5994:                                return core::video_format::x1080i5994;
+       case bmdModeHD1080i6000:                                return core::video_format::x1080i6000;
        case bmdModeHD1080p25:                                  return core::video_format::x1080p2500;
        case bmdModeHD1080p2997:                                return core::video_format::x1080p2997;
        case bmdModeHD1080p30:                                  return core::video_format::x1080p3000;
        case bmdModeHD1080p50:                                  return core::video_format::x1080p5000;
        case bmdModeHD1080p5994:                                return core::video_format::x1080p5994;
        case bmdModeHD1080p6000:                                return core::video_format::x1080p6000;
-       case bmdMode2k2398:                                             return core::video_format::x2k2398;  
-       case bmdMode2k24:                                               return core::video_format::x2k2400;  
-       case bmdMode2k25:                                               return core::video_format::x2k2500;  
-       case bmdMode4K2160p2398:                                return core::video_format::x4k2398;  
-       case bmdMode4K2160p24:                                  return core::video_format::x4k2400;  
-       case bmdMode4K2160p25:                                  return core::video_format::x4k2500;  
-       case bmdMode4K2160p2997:                                return core::video_format::x4k2997;  
-       case bmdMode4K2160p30:                                  return core::video_format::x4k3000;  
-       default:                                                                return core::video_format::invalid;     
+       case bmdMode2k2398:                                             return core::video_format::x1556p2398;
+       case bmdMode2k24:                                               return core::video_format::x1556p2400;
+       case bmdMode2k25:                                               return core::video_format::x1556p2500;
+       case bmdMode2kDCI2398:                                  return core::video_format::dci1080p2398;
+       case bmdMode2kDCI24:                                    return core::video_format::dci1080p2400;
+       case bmdMode2kDCI25:                                    return core::video_format::dci1080p2500;
+       case bmdMode4K2160p2398:                                return core::video_format::x2160p2398;
+       case bmdMode4K2160p24:                                  return core::video_format::x2160p2400;
+       case bmdMode4K2160p25:                                  return core::video_format::x2160p2500;
+       case bmdMode4K2160p2997:                                return core::video_format::x2160p2997;
+       case bmdMode4K2160p30:                                  return core::video_format::x2160p3000;
+       case bmdMode4kDCI2398:                                  return core::video_format::dci2160p2398;
+       case bmdMode4kDCI24:                                    return core::video_format::dci2160p2400;
+       case bmdMode4kDCI25:                                    return core::video_format::dci2160p2500;
+       default:                                                                return core::video_format::invalid;
        }
 }
 
index 5c1c4096cd4da446a85ce1903297fd2d1a4bf24c..79689da7ce22842e959edb913573616627c0db69 100644 (file)
@@ -65,7 +65,7 @@
 </thumbnails>\r
 <channels>\r
     <channel>\r
-        <video-mode> PAL [PAL|NTSC|576p2500|720p2398|720p2400|720p2500|720p5000|720p2997|720p5994|720p3000|720p6000|1080p2398|1080p2400|1080i5000|1080i5994|1080i6000|1080p2500|1080p2997|1080p3000|1080p5000|1080p5994|1080p6000|2k2398|2k2400|2k2500|4k2398|4k2400|4k2500|4k2997|4k3000] </video-mode>\r
+        <video-mode> PAL [PAL|NTSC|576p2500|720p2398|720p2400|720p2500|720p5000|720p2997|720p5994|720p3000|720p6000|1080p2398|1080p2400|1080i5000|1080i5994|1080i6000|1080p2500|1080p2997|1080p3000|1080p5000|1080p5994|1080p6000|1556p2398|1556p2400|1556p2500|dci1080p2398|dci1080p2400|dci1080p2500|2160p2398|2160p2400|2160p2500|2160p2997|2160p3000|dci2160p2398|dci2160p2400|dci2160p2500] </video-mode>\r
         <consumers>\r
             <decklink>\r
                 <device>[1..]</device>\r