summaryrefslogtreecommitdiff
path: root/include/android/system/core
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-21 13:13:10 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-09-28 05:41:07 +0300
commit6349cf6ea5a6641476e0e85e93442a87dbe56909 (patch)
treec3ec214895f5b09cb11578a7dcdec7267d49ebe2 /include/android/system/core
parent85c5c47325ab7e5017e6e98421be0e18fcf69be2 (diff)
ipa: ipu3: Pass controls to algorithm's queueRequest() handler
Call the Algorithm::queueRequest() function of all algorithms when a request is queued, to pass the request controls to the algorithms. We can now drop the copy of the control list stored in IPAFrameContext as it isn't used anymore. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include/android/system/core')
0 files changed, 0 insertions, 0 deletions
href='#n106'>106 107 108 109 110 111 112 113 114 115 116
#!/usr/bin/env python3
#
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright 2022 Raspberry Pi Ltd
#
# Script to pretty print a Raspberry Pi tuning config JSON structure in
# version 2.0 and later formats.

import argparse
import json
import textwrap


class Encoder(json.JSONEncoder):

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.indentation_level = 0
        self.hard_break = 120
        self.custom_elems = {
            'table': 16,
            'luminance_lut': 16,
            'ct_curve': 3,
            'ccm': 3,
            'gamma_curve': 2,
            'y_target': 2,
            'prior': 2
        }

    def encode(self, o, node_key=None):
        if isinstance(o, (list, tuple)):
            # Check if we are a flat list of numbers.
            if not any(isinstance(el, (list, tuple, dict)) for el in o):
                s = ', '.join(json.dumps(el) for el in o)
                if node_key in self.custom_elems.keys():
                    # Special case handling to specify number of elements in a row for tables, ccm, etc.
                    self.indentation_level += 1
                    sl = s.split(', ')
                    num = self.custom_elems[node_key]