{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://www.arri.com/schema/json/art/parameters/v1-0-2",
    "$comment": "Parameters shared by art-cmd and art-qt",
    "title": "Parameters",
    "description": "Parameters for processing ARRIRAW, ARRICORE or RGB video data.",
    "type": "object",
    "properties": {
        "inputCrop": {
            "title": "Input Crop",
            "description": "ARRIRAW and ARRICORE: Rectangle within the sampled area of the input image data to be processed. For ARRIRAW, the minimum area is 10x10.",
            "type": "object",
            "properties": {
                "displayXOffsetOverride": {
                    "type": "integer",
                    "minimum": 0
                },
                "displayYOffsetOverride": {
                    "type": "integer",
                    "minimum": 0
                },
                "displayWidthOverride": {
                    "type": "integer",
                    "minimum": 4
                },
                "displayHeightOverride": {
                    "type": "integer",
                    "minimum": 4
                }
            },
            "required": [
                "displayXOffsetOverride",
                "displayYOffsetOverride",
                "displayWidthOverride",
                "displayHeightOverride"
            ]
        },
        "outputScaling": {
            "title": "Output Scaling",
            "description": "ARRIRAW and ARRICORE: The maximum downscale ratio is 8:1, the maximum upscale ratio is 1:2.",
            "type": "object",
            "properties": {
                "targetWidth": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 8192
                },
                "targetHeight": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 8192
                }
            },
            "required": [
                "targetWidth",
                "targetHeight"
            ]
        },
        "applyFlip": {
            "description": "ARRIRAW and ARRICORE",
            "type": "boolean",
            "default": false
        },
        "applyFlop": {
            "description": "ARRIRAW and ARRICORE",
            "type": "boolean",
            "default": false
        },
        "exposureIndexOverride": {
            "description": "ARRIRAW and ARRICORE: For ARRIRAW recorded by ALEXA Mini LF or older cameras, the maximum value is 3200.",
            "type": "integer",
            "minimum": 160,
            "maximum": 6400
        },
        "colorTemperatureOverride": {
            "description": "ARRIRAW and ARRICORE",
            "type": "integer",
            "minimum": 2000,
            "maximum": 11000
        },
        "tintOverride": {
            "description": "ARRIRAW and ARRICORE",
            "type": "number",
            "minimum": -16.0,
            "maximum": 16.0
        },
        "debayer": {
            "description": "ARRIRAW only: ADA5HW and ADA5SW only allowed for ARRIRAW recorded by ALEXA Mini LF or older cameras (while ADA5SW is default for footage from those cameras). For ALEXA 265 footage, only ADA7SW (which is default since ALEXA 35) and proxy4x4 are allowed.",
            "type": "object",
            "properties": {
                "mode": {
                    "type": "string",
                    "oneOf": [
                        {
                            "const": "ADA5HW"
                        },
                        {
                            "const": "ADA5SW"
                        },
                        {
                            "const": "ADA7HW"
                        },
                        {
                            "const": "ADA7SW"
                        },
                        {
                            "const": "proxy4x4"
                        }
                    ]
                },
                "ada5SwParams": {
                    "type": "object",
                    "properties": {
                        "finetuneRed": {
                            "type": "integer",
                            "default": 100,
                            "minimum": 0,
                            "maximum": 100
                        },
                        "finetuneGreen": {
                            "type": "integer",
                            "default": 100,
                            "minimum": 0,
                            "maximum": 100
                        },
                        "finetuneBlue": {
                            "type": "integer",
                            "default": 50,
                            "minimum": 0,
                            "maximum": 100
                        }
                    },
                    "required": [
                        "finetuneRed",
                        "finetuneGreen",
                        "finetuneBlue"
                    ]
                }
            },
            "required": [
                "mode"
            ]
        },
        "inputBinning": {
            "description": "ARRIRAW only",
            "type": "string",
            "default": "off",
            "oneOf": [
                {
                    "const": "off"
                },
                {
                    "const": "bin2x2"
                },
                {
                    "const": "bin4x4"
                }
            ]
        },
        "userPixelMask": {
            "description": "ARRIRAW only",
            "type": "object",
            "properties": {
                "pixelCoordinate": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "xPos": {
                                "type": "integer",
                                "minimum": 1
                            },
                            "yPos": {
                                "type": "integer",
                                "minimum": 1
                            }
                        },
                        "required": [
                            "xPos",
                            "yPos"
                        ]
                    }
                }
            },
            "required": [
                "pixelCoordinate"
            ]
        },
        "textureGen1Override": {
            "description": "ARRIRAW only: Applicable only for ARRIRAW recorded by ALEXA Mini LF or older cameras. The ranges of the detail- and sharpnessOverride parameters depend on the applied scaling ratio. The stated min/max values are for rendering without 'outputScaling'.",
            "type": "object",
            "properties": {
                "noiseReductionModeOverride": {
                    "type": "string",
                    "default": "off",
                    "oneOf": [
                        {
                            "const": "off"
                        },
                        {
                            "const": "anr1"
                        }
                    ]
                },
                "noiseReductionStrengthOverride": {
                    "type": "number",
                    "minimum": 1.0,
                    "maximum": 3.5
                },
                "sharpnessOverride": {
                    "type": "number",
                    "minimum": -5.0,
                    "maximum": 35.0
                },
                "detailOverride": {
                    "type": "number",
                    "minimum": -5.0,
                    "maximum": 5.0
                }
            }
        },
        "transferCurveOverride": {
            "description": "ARRIRAW only: LogC3 (rendering to AWG3/D65/LogC3 colorspace) is only allowed for ARRIRAW recorded by ALEXA Mini LF or older cameras. LogC4 (rendering to AWG4/D65/LogC4 colorspace) is always possible.",
            "type": "string",
            "oneOf": [
                {
                    "const": "LogC3"
                },
                {
                    "const": "LogC4"
                }
            ]
        },
        "proxyMode": {
            "description": "ARRICORE only",
            "type": "string",
            "default": "none",
            "oneOf": [
                {
                    "const": "none"
                },
                {
                    "const": "fullBase"
                },
                {
                    "const": "halfBase"
                },
                {
                    "const": "quarterBase"
                }
            ]
        }
    },
    "unevaluatedProperties": false,
    "additionalProperties": false
}
