summaryrefslogtreecommitdiff
path: root/test/controls
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2022-07-21 13:13:10 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-09-28 05:41:05 +0300
commit80cfe8f0f7ef77d971f70ba3ced0f267b61bf454 (patch)
treeff572ffcc0074c8e4bc23b167cad07ab1ed9400d /test/controls
parent494662f082932c925c3e7ae4563c4e2d4db9cb35 (diff)
ipa: libipa: algorithm: queueRequest(): Pass frame context
IPA modules have access to incoming Request's controls list and need to store them in the frame context at queueRequest() time. Pass the frame context to the Algorithm::queueRequest() function. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test/controls')
0 files changed, 0 insertions, 0 deletions
'n104' href='#n104'>104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
# SPDX-License-Identifier: CC0-1.0

libcamera_ipa_headers = files([
    'ipa_controls.h',
    'ipa_interface.h',
    'ipa_module_info.h',
])

install_headers(libcamera_ipa_headers,
                subdir: join_paths(libcamera_include_dir, 'ipa'))

libcamera_generated_ipa_headers = []

#
# Prepare IPA/IPC generation components
#

core_mojom_file = 'core.mojom'
ipa_mojom_core = custom_target(core_mojom_file.split('.')[0] + '_mojom_module',
                               input : core_mojom_file,
                               output : core_mojom_file + '-module',
                               command : [
                                   mojom_parser,
                                   '--output-root', meson.build_root(),
                                   '--input-root', meson.source_root(),
                                   '--mojoms', '@INPUT@'
                               ])

# core_ipa_interface.h
libcamera_generated_ipa_headers += custom_target('core_ipa_interface_h',
                  input : ipa_mojom_core,
                  output : 'core_ipa_interface.h',
                  depends : mojom_templates,
                  command : [
                      mojom_generator, 'generate',
                      '-g', 'libcamera',
                      '--bytecode_path', mojom_templates_dir,
                      '--libcamera_generate_core_header',
                      '--libcamera_output_path=@OUTPUT@',
                      './' +'@INPUT@'
                  ])

# core_ipa_serializer.h
libcamera_generated_ipa_headers += custom_target('core_ipa_serializer_h',
                  input : ipa_mojom_core,
                  output : 'core_ipa_serializer.h',
                  depends : mojom_templates,
                  command : [
                      mojom_generator, 'generate',
                      '-g', 'libcamera',
                      '--bytecode_path', mojom_templates_dir,
                      '--libcamera_generate_core_serializer',
                      '--libcamera_output_path=@OUTPUT@',
                      './' +'@INPUT@'
                  ])

ipa_mojom_files = [
    'ipu3.mojom',
    'raspberrypi.mojom',
    'rkisp1.mojom',
    'vimc.mojom',
]

ipa_mojoms = []

#
# Generate headers from templates.
#

# TODO Define per-pipeline ControlInfoMap with yaml?

foreach file : ipa_mojom_files
    name = file.split('.')[0]

    # {pipeline}.mojom-module
    mojom = custom_target(file.split('.')[0] + '_mojom_module',
                          input : file,
                          output : file + '-module',
                          depends : ipa_mojom_core,
                          command : [
                              mojom_parser,
                              '--output-root', meson.build_root(),
                              '--input-root', meson.source_root(),
                              '--mojoms', '@INPUT@'
                          ])

    # {pipeline}_ipa_interface.h
    header = custom_target(name + '_ipa_interface_h',
                           input : mojom,
                           output : name + '_ipa_interface.h',
                           depends : mojom_templates,
                           command : [
                               mojom_generator, 'generate',
                               '-g', 'libcamera',
                               '--bytecode_path', mojom_templates_dir,
                               '--libcamera_generate_header',
                               '--libcamera_output_path=@OUTPUT@',
                               './' +'@INPUT@'
                           ])

    # {pipeline}_ipa_serializer.h
    serializer = custom_target(name + '_ipa_serializer_h',
                               input : mojom,
                               output : name + '_ipa_serializer.h',
                               depends : mojom_templates,
                               command : [
                                   mojom_generator, 'generate',
                                   '-g', 'libcamera',
                                   '--bytecode_path', mojom_templates_dir,
                                   '--libcamera_generate_serializer',