Permalink
Browse files

Add "Force BT.601" as a menu item

  • Loading branch information...
1 parent ec337f4 commit 3277a49fc405ab17cff15901560a18d9e051c433 @SAPikachu committed Apr 22, 2012
Showing with 20 additions and 0 deletions.
  1. +19 −0 aegisub/src/command/video.cpp
  2. +1 −0 aegisub/src/libresrc/default_menu.json
@@ -677,6 +677,24 @@ struct video_show_overscan : public validator_video_loaded {
}
};
+/// Show a mask over the video.
+struct video_force_bt601 : public validator_video_loaded {
+ CMD_NAME("video/force_bt601")
+ STR_MENU("Force BT.601")
+ STR_DISP("Force BT.601")
+ STR_HELP("Use BT.601 conversion matrix regardless video resolution")
+ CMD_TYPE(COMMAND_VALIDATE | COMMAND_TOGGLE)
+
+ bool IsActive(const agi::Context *) {
+ return OPT_GET("Video/Force BT.601")->GetBool();
+ }
+
+ void operator()(agi::Context *c) {
+ OPT_SET("Video/Force BT.601")->SetBool(!OPT_GET("Video/Force BT.601")->GetBool());
+ c->videoDisplay->Render();
+ }
+};
+
/// Set zoom to 100%.
class video_zoom_100: public validator_video_attached {
public:
@@ -807,6 +825,7 @@ namespace cmd {
reg(new video_play);
reg(new video_play_line);
reg(new video_show_overscan);
+ reg(new video_force_bt601);
reg(new video_stop);
reg(new video_zoom_100);
reg(new video_zoom_200);
@@ -154,6 +154,7 @@
{ "submenu" : "main/video/set zoom", "text" : "Set &Zoom" },
{ "submenu" : "main/video/override ar", "text" : "Override &AR" },
{ "command" : "video/show_overscan" },
+ { "command" : "video/force_bt601" },
{},
{ "command" : "video/jump" },
{ "command" : "video/jump/start" },

0 comments on commit 3277a49

Please sign in to comment.