Loading scripts/parse_commands.py +20 −10 Original line number Diff line number Diff line Loading @@ -103,22 +103,32 @@ if __name__ == '__main__': absolute_out = re.search(r"\s(([\S]+)(.wav))$", cmd) args = [] input_set = False for arg in cmd.split(): # Adjust file arguments, pass other arguments as they are if path.exists(arg): arg = path.relpath(arg).replace('\\','/') arg = re.sub('IVAS_dec_ref(.exe)?', '$CUT_DEC_BIN', arg) arg = re.sub('scripts', TESTV_PATH, arg) arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) # For .fer cases the bitstream is in ref arg = re.sub('tests/split_rendering/renderer_configs', REF_PATH + r'/split_rendering/renderer_configs', arg) if re.search("^tests.*192$",arg): arg = re.sub('tests/split_rendering/ref', REF_PATH + r'/split_rendering/ref', arg) if re.search("\.wav$",arg): arg = re.sub('tests', CUT_PATH, arg) # Output argument for decoder ends with .wav if 'dectrace' in arg: arg = re.sub('tests', CUT_PATH, arg) # dectrace output files occur before the input file if 'tests' in arg: if not input_set: arg = re.sub('tests', REF_PATH, arg) # First occurence of tests/* is the input file input_set = True else: arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) # Input argument if re.search("^tests.*bit$",arg): arg = re.sub('tests', CUT_PATH, arg) # Output argument for decoder ends with .wav arg = re.sub('tests', CUT_PATH, arg) # Remaining occurences of tests/* are output files #arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) # For .fer cases the bitstream is in ref # arg = re.sub('tests/split_rendering/renderer_configs', REF_PATH + r'/split_rendering/renderer_configs', arg) # if re.search("^tests.*192$",arg): # arg = re.sub('tests/split_rendering/ref', REF_PATH + r'/split_rendering/ref', arg) # if re.search("\.wav$",arg): # arg = re.sub('tests', CUT_PATH, arg) # Output argument for decoder ends with .wav # else: # arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) # Input argument # if re.search("^tests.*bit$",arg): # arg = re.sub('tests', CUT_PATH, arg) # Output argument for decoder ends with .wav args.append(arg) cmd = ' '.join(args) Loading Loading
scripts/parse_commands.py +20 −10 Original line number Diff line number Diff line Loading @@ -103,22 +103,32 @@ if __name__ == '__main__': absolute_out = re.search(r"\s(([\S]+)(.wav))$", cmd) args = [] input_set = False for arg in cmd.split(): # Adjust file arguments, pass other arguments as they are if path.exists(arg): arg = path.relpath(arg).replace('\\','/') arg = re.sub('IVAS_dec_ref(.exe)?', '$CUT_DEC_BIN', arg) arg = re.sub('scripts', TESTV_PATH, arg) arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) # For .fer cases the bitstream is in ref arg = re.sub('tests/split_rendering/renderer_configs', REF_PATH + r'/split_rendering/renderer_configs', arg) if re.search("^tests.*192$",arg): arg = re.sub('tests/split_rendering/ref', REF_PATH + r'/split_rendering/ref', arg) if re.search("\.wav$",arg): arg = re.sub('tests', CUT_PATH, arg) # Output argument for decoder ends with .wav if 'dectrace' in arg: arg = re.sub('tests', CUT_PATH, arg) # dectrace output files occur before the input file if 'tests' in arg: if not input_set: arg = re.sub('tests', REF_PATH, arg) # First occurence of tests/* is the input file input_set = True else: arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) # Input argument if re.search("^tests.*bit$",arg): arg = re.sub('tests', CUT_PATH, arg) # Output argument for decoder ends with .wav arg = re.sub('tests', CUT_PATH, arg) # Remaining occurences of tests/* are output files #arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) # For .fer cases the bitstream is in ref # arg = re.sub('tests/split_rendering/renderer_configs', REF_PATH + r'/split_rendering/renderer_configs', arg) # if re.search("^tests.*192$",arg): # arg = re.sub('tests/split_rendering/ref', REF_PATH + r'/split_rendering/ref', arg) # if re.search("\.wav$",arg): # arg = re.sub('tests', CUT_PATH, arg) # Output argument for decoder ends with .wav # else: # arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) # Input argument # if re.search("^tests.*bit$",arg): # arg = re.sub('tests', CUT_PATH, arg) # Output argument for decoder ends with .wav args.append(arg) cmd = ' '.join(args) Loading