examples: Add layers group command line parameter
authorDjordje Senicic <x0157990@ti.com>
Wed, 24 Oct 2018 06:06:42 +0000 (02:06 -0400)
committerAjay Jayaraj <ajayj@ti.com>
Thu, 1 Nov 2018 14:49:47 +0000 (09:49 -0500)
Signed-off-by: Djordje Senicic <x0157990@ti.com>
examples/common/video_utils.cpp
examples/common/video_utils.h

index bfb7642497936e2058273c4d30516bacaae86644..059381d55acc3c6b8fa8e2555f522f47f9031859 100644 (file)
@@ -47,6 +47,7 @@ bool ProcessArgs(int argc, char *argv[], cmdline_opts_t& opts)
         {"config",       required_argument, 0, 'c'},
         {"num_dsps",     required_argument, 0, 'd'},
         {"num_eves",     required_argument, 0, 'e'},
+        {"num_layers_groups", required_argument, 0, 'g'},
         {"num_frames",   required_argument, 0, 'f'},
         {"input_file",   required_argument, 0, 'i'},
         {"output_width", required_argument, 0, 'w'},
@@ -59,7 +60,7 @@ bool ProcessArgs(int argc, char *argv[], cmdline_opts_t& opts)
 
     while (true)
     {
-        int c = getopt_long(argc, argv, "c:d:e:f:i:w:hv", long_options,
+        int c = getopt_long(argc, argv, "c:d:e:g:f:i:w:hv", long_options,
                             &option_index);
 
         if (c == -1)
@@ -80,6 +81,10 @@ bool ProcessArgs(int argc, char *argv[], cmdline_opts_t& opts)
                                      Executor::GetNumDevices(DeviceType::EVE));
                       break;
 
+            case 'g': opts.num_layers_groups = atoi(optarg);
+                      assert((opts.num_layers_groups == 1) || (opts.num_layers_groups == 2) || (opts.num_layers_groups == 22));
+                      break;
+
             case 'f': opts.num_frames = atoi(optarg);
                       assert (opts.num_frames > 0);
                       break;
index 124eed6d4dc4c0e11a1be7f0ea73dc33a37b1070..c117f1155663d7db2a39d671abd4f6d10a97b481 100644 (file)
@@ -40,6 +40,7 @@ typedef struct cmdline_opts_t_ {
   uint32_t    num_dsps;
   uint32_t    num_eves;
   uint32_t    num_frames;
+  uint32_t    num_layers_groups;
   std::string input_file;
   uint32_t    output_width;
   bool        verbose;