Skip to content

Commit

Permalink
add formats
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Jan 17, 2017
1 parent 5c43379 commit 8045a33
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
30 changes: 25 additions & 5 deletions ofxsFormatResolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@
#define kParamFormatNTSCLabel "NTSC 720x486 0.91"
#define kParamFormatPAL "PAL"
#define kParamFormatPALLabel "PAL 720x576 1.09"
#define kParamFormatHD "HD"
#define kParamFormatHDLabel "HD 1920x1080"
#define kParamFormatNTSC169 "NTSC_16:9"
#define kParamFormatNTSC169Label "NTSC_16:9 720x486 1.21"
#define kParamFormatPAL169 "PAL_16:9"
#define kParamFormatPAL169Label "PAL_16:9 720x576 1.46"
#define kParamFormatHD720 "HD_720"
#define kParamFormatHD720Label "HD_720 1280x1720"
#define kParamFormatHD "HD"
#define kParamFormatHDLabel "HD 1920x1080"
#define kParamFormatUHD4K "UHD_4K"
#define kParamFormatUHD4KLabel "UHD_4K 3840x2160"
#define kParamFormat1kSuper35 "1K_Super35(full-ap)"
#define kParamFormat1kSuper35Label "1K_Super35(full-ap) 1024x778"
#define kParamFormat1kCinemascope "1K_Cinemascope"
Expand All @@ -43,10 +47,14 @@
#define kParamFormat2kSuper35Label "2K_Super35(full-ap) 2048x1556"
#define kParamFormat2kCinemascope "2K_Cinemascope"
#define kParamFormat2kCinemascopeLabel "2K_Cinemascope 1828x1556 2"
#define kParamFormat2kDCP "2K_DCP"
#define kParamFormat2kDCPLabel "2K_DCP 2048x1080"
#define kParamFormat4kSuper35 "4K_Super35(full-ap)"
#define kParamFormat4kSuper35Label "4K_Super35(full-ap) 4096x3112"
#define kParamFormat4kCinemascope "4K_Cinemascope"
#define kParamFormat4kCinemascopeLabel "4K_Cinemascope 3656x3112 2"
#define kParamFormat4kDCP "4K_DCP"
#define kParamFormat4kDCPLabel "4K_DCP 4096x2160"
#define kParamFormatSquare256 "square_256"
#define kParamFormatSquare256Label "square_256 256x256"
#define kParamFormatSquare512 "square_512"
Expand All @@ -62,15 +70,19 @@ enum EParamFormat
eParamFormatPCVideo,
eParamFormatNTSC,
eParamFormatPAL,
eParamFormatHD,
eParamFormatNTSC169,
eParamFormatPAL169,
eParamFormatHD720,
eParamFormatHD,
eParamFormatUHD4K,
eParamFormat1kSuper35,
eParamFormat1kCinemascope,
eParamFormat2kSuper35,
eParamFormat2kCinemascope,
eParamFormat2kDCP,
eParamFormat4kSuper35,
eParamFormat4kCinemascope,
eParamFormat4kDCP,
eParamFormatSquare256,
eParamFormatSquare512,
eParamFormatSquare1k,
Expand All @@ -91,12 +103,16 @@ getFormatResolution(const EParamFormat format,
*width = 720; *height = 486; *par = 0.91; break;
case eParamFormatPAL:
*width = 720; *height = 576; *par = 1.09; break;
case eParamFormatHD:
*width = 1920; *height = 1080; *par = 1.; break;
case eParamFormatNTSC169:
*width = 720; *height = 486; *par = 1.21; break;
case eParamFormatPAL169:
*width = 720; *height = 576; *par = 1.46; break;
case eParamFormatHD720:
*width = 1280; *height = 720; *par = 1.; break;
case eParamFormatHD:
*width = 1920; *height = 1080; *par = 1.; break;
case eParamFormatUHD4K:
*width = 3840; *height = 2160; *par = 1.; break;
case eParamFormat1kSuper35:
*width = 1024; *height = 778; *par = 1.; break;
case eParamFormat1kCinemascope:
Expand All @@ -105,10 +121,14 @@ getFormatResolution(const EParamFormat format,
*width = 2048; *height = 1556; *par = 1.; break;
case eParamFormat2kCinemascope:
*width = 1828; *height = 1556; *par = 2.; break;
case eParamFormat2kDCP:
*width = 2048; *height = 1080; *par = 1.; break;
case eParamFormat4kSuper35:
*width = 4096; *height = 3112; *par = 1.; break;
case eParamFormat4kCinemascope:
*width = 3656; *height = 3112; *par = 2.; break;
case eParamFormat4kDCP:
*width = 4096; *height = 2160; *par = 1.; break;
case eParamFormatSquare256:
*width = 256; *height = 256; *par = 1.; break;
case eParamFormatSquare512:
Expand Down
12 changes: 10 additions & 2 deletions ofxsGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,12 +558,16 @@ generatorDescribeInContext(PageParamDescriptor *page,
param->appendOption(kParamFormatNTSCLabel);
assert(param->getNOptions() == eParamFormatPAL);
param->appendOption(kParamFormatPALLabel);
assert(param->getNOptions() == eParamFormatHD);
param->appendOption(kParamFormatHDLabel);
assert(param->getNOptions() == eParamFormatNTSC169);
param->appendOption(kParamFormatNTSC169Label);
assert(param->getNOptions() == eParamFormatPAL169);
param->appendOption(kParamFormatPAL169Label);
assert(param->getNOptions() == eParamFormatHD720);
param->appendOption(kParamFormatHD720Label);
assert(param->getNOptions() == eParamFormatHD);
param->appendOption(kParamFormatHDLabel);
assert(param->getNOptions() == eParamFormatUHD4K);
param->appendOption(kParamFormatUHD4KLabel);
assert(param->getNOptions() == eParamFormat1kSuper35);
param->appendOption(kParamFormat1kSuper35Label);
assert(param->getNOptions() == eParamFormat1kCinemascope);
Expand All @@ -572,10 +576,14 @@ generatorDescribeInContext(PageParamDescriptor *page,
param->appendOption(kParamFormat2kSuper35Label);
assert(param->getNOptions() == eParamFormat2kCinemascope);
param->appendOption(kParamFormat2kCinemascopeLabel);
assert(param->getNOptions() == eParamFormat2kDCP);
param->appendOption(kParamFormat2kDCPLabel);
assert(param->getNOptions() == eParamFormat4kSuper35);
param->appendOption(kParamFormat4kSuper35Label);
assert(param->getNOptions() == eParamFormat4kCinemascope);
param->appendOption(kParamFormat4kCinemascopeLabel);
assert(param->getNOptions() == eParamFormat4kDCP);
param->appendOption(kParamFormat4kDCPLabel);
assert(param->getNOptions() == eParamFormatSquare256);
param->appendOption(kParamFormatSquare256Label);
assert(param->getNOptions() == eParamFormatSquare512);
Expand Down

0 comments on commit 8045a33

Please sign in to comment.