MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / parse_command_line

Function parse_command_line

Test/astc_profile_valgrind.py:178–208  ·  view source on GitHub ↗

Parse the command line. Return: The parsed command line.

()

Source from the content-addressed store, hash-verified

176
177
178def parse_command_line() -> argparse.Namespace:
179 '''
180 Parse the command line.
181
182 Return:
183 The parsed command line.
184 '''
185 parser = argparse.ArgumentParser()
186
187 parser.add_argument('img', type=argparse.FileType('r'),
188 help='the image file to compress')
189
190 encoders = ['sse2', 'sse4.1', 'avx2']
191 parser.add_argument('--encoder', dest='encoder', default='avx2',
192 choices=encoders,
193 help='the encoder variant to profile')
194
195 testquant = [str(x) for x in range(0, 101, 10)]
196 testqual = ['-fastest', '-fast', '-medium', '-thorough', '-exhaustive']
197 qualities = testqual + testquant
198 parser.add_argument('--test-quality', dest='quality', default='medium',
199 choices=qualities,
200 help='the compression quality to profile')
201
202 parser.add_argument('--show-cli', dest='show_cli', default=False,
203 action='store_true',
204 help='enable CLI wrapper nodes in call graph')
205
206 args = parser.parse_args()
207
208 return args
209
210
211def main() -> int:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected