From f054618ec557df435df17047f6d72b5d36e4b496 Mon Sep 17 00:00:00 2001 From: Ronag Date: Sat, 27 Aug 2011 08:57:41 +0000 Subject: [PATCH] git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@1300 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d --- core/video_format.cpp | 38 ++++++++++++++++++++------------------ core/video_format.h | 2 ++ 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/core/video_format.cpp b/core/video_format.cpp index c7ed5ccaf..8101abf0a 100644 --- a/core/video_format.cpp +++ b/core/video_format.cpp @@ -24,11 +24,13 @@ #include -#define DEFINE_VIDEOFORMATDESC(fmt, w, h, m, scale, duration, name) \ +#define DEFINE_VIDEOFORMATDESC(fmt, w, h, sw, sh, m, scale, duration, name) \ { \ (fmt), \ (w), \ (h), \ + (sw),\ + (sh),\ (m), \ ((double)scale/(double)duration),\ (scale),\ @@ -46,23 +48,23 @@ namespace caspar { namespace core { const video_format_desc format_descs[video_format::count] = { - DEFINE_VIDEOFORMATDESC(video_format::pal ,720, 576, field_mode::upper, 25, 1, L"PAL"), - DEFINE_VIDEOFORMATDESC(video_format::ntsc ,720, 486, field_mode::lower, 30000, 1001, L"NTSC"), - DEFINE_VIDEOFORMATDESC(video_format::x576p2500 ,720, 576, field_mode::progressive, 25, 1, L"576p2500"), - DEFINE_VIDEOFORMATDESC(video_format::x720p2500 ,1280, 720, field_mode::progressive, 25, 1, L"720p2500"), - DEFINE_VIDEOFORMATDESC(video_format::x720p5000 ,1280, 720, field_mode::progressive, 50, 1, L"720p5000"), - DEFINE_VIDEOFORMATDESC(video_format::x720p5994 ,1280, 720, field_mode::progressive, 60000, 1001, L"720p5994"), - DEFINE_VIDEOFORMATDESC(video_format::x720p6000 ,1280, 720, field_mode::progressive, 60, 1, L"720p6000"), - DEFINE_VIDEOFORMATDESC(video_format::x1080p2397 ,1920, 1080, field_mode::progressive, 24000, 1001, L"1080p2398"), - DEFINE_VIDEOFORMATDESC(video_format::x1080p2400 ,1920, 1080, field_mode::progressive, 24, 1, L"1080p2400"), - DEFINE_VIDEOFORMATDESC(video_format::x1080i5000 ,1920, 1080, field_mode::upper, 25, 1, L"1080i5000"), - DEFINE_VIDEOFORMATDESC(video_format::x1080i5994 ,1920, 1080, field_mode::upper, 30000, 1001, L"1080i5994"), - DEFINE_VIDEOFORMATDESC(video_format::x1080i6000 ,1920, 1080, field_mode::upper, 30, 1, L"1080i6000"), - DEFINE_VIDEOFORMATDESC(video_format::x1080p2500 ,1920, 1080, field_mode::progressive, 25, 1, L"1080p2500"), - DEFINE_VIDEOFORMATDESC(video_format::x1080p2997 ,1920, 1080, field_mode::progressive, 30000, 1001, L"1080p2997"), - DEFINE_VIDEOFORMATDESC(video_format::x1080p3000 ,1920, 1080, field_mode::progressive, 30, 1, L"1080p3000"), - DEFINE_VIDEOFORMATDESC(video_format::x1080p5000 ,1920, 1080, field_mode::progressive, 50, 1, L"1080p5000"), - DEFINE_VIDEOFORMATDESC(video_format::invalid ,0, 0, field_mode::progressive, 1, 1, L"invalid") + DEFINE_VIDEOFORMATDESC(video_format::pal ,720, 576, 1024, 576, field_mode::upper, 25, 1, L"PAL"), + DEFINE_VIDEOFORMATDESC(video_format::ntsc ,720, 486, 864, 486, field_mode::lower, 30000, 1001, L"NTSC"), + DEFINE_VIDEOFORMATDESC(video_format::x576p2500 ,720, 576, 720, 576, field_mode::progressive, 25, 1, L"576p2500"), + DEFINE_VIDEOFORMATDESC(video_format::x720p2500 ,1280, 720, 1280, 720, field_mode::progressive, 25, 1, L"720p2500"), + DEFINE_VIDEOFORMATDESC(video_format::x720p5000 ,1280, 720, 1280, 720, field_mode::progressive, 50, 1, L"720p5000"), + DEFINE_VIDEOFORMATDESC(video_format::x720p5994 ,1280, 720, 1280, 720, field_mode::progressive, 60000, 1001, L"720p5994"), + DEFINE_VIDEOFORMATDESC(video_format::x720p6000 ,1280, 720, 1280, 720, field_mode::progressive, 60, 1, L"720p6000"), + DEFINE_VIDEOFORMATDESC(video_format::x1080p2397 ,1920, 1080, 1920, 1080, field_mode::progressive, 24000, 1001, L"1080p2398"), + DEFINE_VIDEOFORMATDESC(video_format::x1080p2400 ,1920, 1080, 1920, 1080, field_mode::progressive, 24, 1, L"1080p2400"), + DEFINE_VIDEOFORMATDESC(video_format::x1080i5000 ,1920, 1080, 1920, 1080, field_mode::upper, 25, 1, L"1080i5000"), + DEFINE_VIDEOFORMATDESC(video_format::x1080i5994 ,1920, 1080, 1920, 1080, field_mode::upper, 30000, 1001, L"1080i5994"), + DEFINE_VIDEOFORMATDESC(video_format::x1080i6000 ,1920, 1080, 1920, 1080, field_mode::upper, 30, 1, L"1080i6000"), + DEFINE_VIDEOFORMATDESC(video_format::x1080p2500 ,1920, 1080, 1920, 1080, field_mode::progressive, 25, 1, L"1080p2500"), + DEFINE_VIDEOFORMATDESC(video_format::x1080p2997 ,1920, 1080, 1920, 1080, field_mode::progressive, 30000, 1001, L"1080p2997"), + DEFINE_VIDEOFORMATDESC(video_format::x1080p3000 ,1920, 1080, 1920, 1080, field_mode::progressive, 30, 1, L"1080p3000"), + DEFINE_VIDEOFORMATDESC(video_format::x1080p5000 ,1920, 1080, 1920, 1080, field_mode::progressive, 50, 1, L"1080p5000"), + DEFINE_VIDEOFORMATDESC(video_format::invalid ,0, 0, 0, 0, field_mode::progressive, 1, 1, L"invalid") }; const video_format_desc& video_format_desc::get(video_format::type format) diff --git a/core/video_format.h b/core/video_format.h index 2d8250c5b..fdbe1bd3e 100644 --- a/core/video_format.h +++ b/core/video_format.h @@ -83,6 +83,8 @@ struct video_format_desc size_t width; // output frame width size_t height; // output frame height + size_t square_width; + size_t square_height; field_mode::type field_mode; // progressive, interlaced upper field first, interlaced lower field first double fps; // actual framerate, e.g. i50 = 25 fps, p50 = 50 fps size_t time_scale; -- 2.39.2