Commit 563e0e35 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

fix MASA modes

parent 0c4456f3
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -118,7 +118,17 @@ def main(args):

    FORMAT_2_FILE = {CFG_TO_PROC_FMT[k]: Path(v) for k, v in config.items()}

    args.formats = [f.upper() for f in args.formats]
    # mono and stereo are only accepted as lowercase for runIvasCodec.py modes
    # further, MASA1_TC and MASA_2TC are accepted, but the config.json contains them without the underscore
    # so patch everything for compatibility
    replacements = {
        "mono": "MONO",
        "stereo": "STEREO",
        "MASA_1TC": "MASA1TC",
        "MASA_2TC": "MASA2TC",
    }
    args.formats = [replacements.get(f, f).upper() for f in args.formats]

    valid_formats = [f for f in args.formats if f in CFG_TO_PROC_FMT]
    invalid_formats = [f for f in args.formats if f not in CFG_TO_PROC_FMT]
    if invalid_formats: