raspberrypi / libcamera

Other
223 stars 95 forks source link

add new Control #88

Closed Lusifug closed 9 months ago

Lusifug commented 10 months ago

Is there a way to add new values to ControlInfoMap for Camera? I have added new controls to control_ids and ipa_base, but when I try to use them, I receive an error message: ERROR Controls controls.cpp:1069 Control 0x0000000c is not valid for /base/soc/i2c0mux/i2c@1/imx708@1a According to the validation method, it seems like this happens cause Camera ControlInfoMap doesn`t have such controls

naushir commented 10 months ago

Can you expand on what you are trying to do here? The control error above is for a V4L2 control error, not a libcamera control.

Lusifug commented 10 months ago

I`m trying to add a possibility to pass value via controls, to change params for existing contrast algorithm on the fly, such as low level, low histogram...

naushir commented 10 months ago

Unfortunately I am still not sure what you are trying to do. Would you be able to share snippets of source code showing you setting up this new control and how use use it please?

Lusifug commented 10 months ago

I try to add a possibility to change contrast enchancemet algorithm parameters in real-time using a set control method

I`ve added setters to to have then in control_ids.h after build Contrast class:

    void setConfigLoHistogram(double loHistogram) override;
    void setConfigLoLevel(double loLevel) override;
    void setConfigLoMax(double loMax) override;
    void setConfigHiHistogram(double hiHistogram) override;
    void setConfigHiLevel(double hiLevel) override;
    void setConfigHiMax(double hiMax) override;

and interface to ContrastAlgorithm class:

    virtual void setConfigLoHistogram(double loHistogram) = 0;
    virtual void setConfigLoLevel(double loLevel) = 0;
    virtual void setConfigLoMax(double loMax) = 0;
    virtual void setConfigHiHistogram(double hiHistogram) = 0;
    virtual void setConfigHiLevel(double hiLevel) = 0;
    virtual void setConfigHiMax(double hiMax) = 0;

in IpaBase method applyControls I`ve added cases for this new controls:

case controls::CONTRAST_LO_HISTOGRAM: {
            RPiController::ContrastAlgorithm *contrast = dynamic_cast<RPiController::ContrastAlgorithm *>(
                controller_.getAlgorithm("contrast"));
            if (!contrast) {
                LOG(IPARPI, Warning)
                    << "Could not set CONTRAST_LO_HISTOGRAM - no contrast algorithm";
                break;
            }

            contrast->setConfigLoHistogram(ctrl.second.get<float>());
            libcameraMetadata_.set(controls::ContrastLoHistogram,
                           ctrl.second.get<float>());
            break;
        }

        case controls::CONTRAST_LO_LEVEL: {
            RPiController::ContrastAlgorithm *contrast = dynamic_cast<RPiController::ContrastAlgorithm *>(
                controller_.getAlgorithm("contrast"));
            if (!contrast) {
                LOG(IPARPI, Warning)
                    << "Could not set CONTRAST_LO_LEVEL - no contrast algorithm";
                break;
            }

            contrast->setConfigLoLevel(ctrl.second.get<float>());
            libcameraMetadata_.set(controls::ContrastLoLevel,
                           ctrl.second.get<float>());
            break;
        }

        case controls::CONTRAST_LO_MAX: {
            RPiController::ContrastAlgorithm *contrast = dynamic_cast<RPiController::ContrastAlgorithm *>(
                controller_.getAlgorithm("contrast"));
            if (!contrast) {
                LOG(IPARPI, Warning)
                    << "Could not set CONTRAST_LO_MAX - no contrast algorithm";
                break;
            }

            contrast->setConfigLoMax(ctrl.second.get<float>());
            libcameraMetadata_.set(controls::ContrastLoMax,
                           ctrl.second.get<float>());
            break;
        }

        case controls::CONTRAST_HI_HISTOGRAM: {
            RPiController::ContrastAlgorithm *contrast = dynamic_cast<RPiController::ContrastAlgorithm *>(
                controller_.getAlgorithm("contrast"));
            if (!contrast) {
                LOG(IPARPI, Warning)
                    << "Could not set CONTRAST_HI_HISTOGRAM - no contrast algorithm";
                break;
            }

            contrast->setConfigHiHistogram(ctrl.second.get<float>());
            libcameraMetadata_.set(controls::ContrastHiHistogram,
                           ctrl.second.get<float>());
            break;
        }

        case controls::CONTRAST_HI_LEVEL: {
            RPiController::ContrastAlgorithm *contrast = dynamic_cast<RPiController::ContrastAlgorithm *>(
                controller_.getAlgorithm("contrast"));
            if (!contrast) {
                LOG(IPARPI, Warning)
                    << "Could not set CONTRAST_HI_LEVEL - no contrast algorithm";
                break;
            }

            contrast->setConfigHiLevel(ctrl.second.get<float>());
            libcameraMetadata_.set(controls::ContrastHiLevel,
                           ctrl.second.get<float>());
            break;
        }

        case controls::CONTRAST_HI_MAX: {
            RPiController::ContrastAlgorithm *contrast = dynamic_cast<RPiController::ContrastAlgorithm *>(
                controller_.getAlgorithm("contrast"));
            if (!contrast) {
                LOG(IPARPI, Warning)
                    << "Could not set CONTRAST_HI_MAX - no contrast algorithm";
                break;
            }

            contrast->setConfigHiMax(ctrl.second.get<float>());
            libcameraMetadata_.set(controls::ContrastHiMax,
                           ctrl.second.get<float>());
            break;
        }

and in control_ids.yaml I`ve added new values for new controls:

  - ContrastLoHistogram:
      type: float

  - ContrastLoLevel:
      type: float

  - ContrastLoMax:
      type: float

  - ContrastHiHistogram:
      type: float

  - ContrastHiLevel:
      type: float

  - ContrastHiMax:
      type: float
naushir commented 10 months ago

That all seems reasonable enough. Have you definitely re-compiled all of libcamera and your applications to make sure the new control values are addressed correctly?

On a side note, perhaps you don't need to do this and can adjust the histogram through the camera tuning file instead?

Lusifug commented 10 months ago

for compiling libcamera I used these commands, as described in the manual

meson setup --prefix=/usr build
sudo ninja -C build install

changes in the camera tuning file are not possible in real-time, cause it requires to restart camera app, which takes time. please correct me if I`m wrong

naushir commented 10 months ago

Once you rebuild libcamera, you must rebuild libcamera-apps (or whatever application you are running) otherwise the control enum values will be mismatched between libcamera and the application.

You are correct, we cannot change the tuning file parameters in real-time.

Lusifug commented 10 months ago

I use my own simple testing app, to take pictures via libcamera, i rebuild before every use:

#include <iostream>
#include <iomanip>
#include <memory>
#include <thread>
#include <fstream>
#include <fcntl.h>
#include <sys/mman.h>
#include <libcamera/libcamera.h>

using namespace libcamera;
using namespace std::chrono_literals;

static void requestComplete(Request *request)
{
    if (request->status() == Request::RequestCancelled)
    {
        return;
    }

    const std::map<const Stream *, FrameBuffer *> &buffers = request->buffers();
    for (auto bufferPair : buffers) {
        FrameBuffer *buffer = bufferPair.second;

        const libcamera::FrameBuffer::Plane &plane = buffer->planes().front();
        void *frameData = mmap(nullptr, plane.length, PROT_READ, MAP_SHARED, plane.fd.get(), 0);

        std::string photoFilename = "captured_photo_final.ppm";
        std::ofstream photoFile(photoFilename, std::ios::out | std::ios::binary);

        photoFile << "P6\n";
        photoFile << "1920 1080" << "\n";
        photoFile << "255\n";
        photoFile.write(reinterpret_cast<const char *>(frameData), plane.length);
        photoFile.close();
    }
}

int main()
{
    std::unique_ptr<CameraManager> cm = std::make_unique<CameraManager>();
    cm->start();
    static std::shared_ptr<Camera> camera = cm->cameras()[0];
    camera->acquire();

    std::unique_ptr<CameraConfiguration> config = camera->generateConfiguration( { StreamRole::Raw } );
    StreamConfiguration &streamConfig = config->at(0);
    streamConfig.pixelFormat = libcamera::formats::BGR888;
    streamConfig.size = libcamera::Size(1920, 1080);
    config->validate();
    camera->configure(config.get());

    FrameBufferAllocator *allocator = new FrameBufferAllocator(camera);

    int ret = allocator->allocate(streamConfig.stream());
    if (ret < 0) {
        std::cerr << "Can't allocate buffers" << std::endl;
        return -ENOMEM;
    }

    Stream *stream = streamConfig.stream();
    const std::unique_ptr<FrameBuffer> &buffer = allocator->buffers(stream)[0];

    std::unique_ptr<Request> request = camera->createRequest();
    if (!request)
    {
        std::cerr << "Can't create request" << std::endl;
        return -ENOMEM;
    }

    ret = request->addBuffer(stream, buffer.get());
    if (ret < 0)
    {
        std::cerr << "Can't set buffer for request"
              << std::endl;
        return ret;
    }

    camera->requestCompleted.connect(requestComplete);

    camera->start();
    ControlList &reqcon = request.get()->controls();
    reqcon.set(controls::ContrastLoHistogram, 0.0);
    reqcon.set(controls::ContrastLoLevel, 0.1);
    reqcon.set(controls::ContrastLoMax, 20000);
    reqcon.set(controls::ContrastHiLevel, 1.0);
    reqcon.set(controls::ContrastHiHistogram, 0.9);
    reqcon.set(controls::ContrastHiMax, 10000);
    camera->queueRequest(request.get());
    std::this_thread::sleep_for(1000ms);
    camera->stop();
    allocator->free(stream);
    delete allocator;
    camera->release();
    camera.reset();
    cm->stop();

    return 0;
}

when I set standard controls, it works perfectly, but when I`m trying same with new controls, I receive error, and even if disable this error, nothing changes on the photo

naushir commented 10 months ago

Are you able to run under gdb and put a breakpoint on the line that caused the error and share a callstack?

Lusifug commented 10 months ago
Thread 2 "capture" hit Breakpoint 2, libcamera::ControlList::find (this=0x7ff65ffbd8, id=9963796) at ../src/libcamera/controls.cpp:1070
1070        if (validator_ && !validator_->validate(id)) {
(gdb) backtrace
#0  libcamera::ControlList::find (this=0x7ff65ffbd8, id=9963796) at ../src/libcamera/controls.cpp:1070
#1  0x0000007ff7d3e4c0 in libcamera::ControlList::set (this=0x7ff65ffbd8, id=9963796, value=...) at ../src/libcamera/controls.cpp:1030
#2  0x0000007ff7d22ba4 in libcamera::CameraSensor::init (this=0x7ff0003eb0) at ../src/libcamera/camera_sensor.cpp:117
#3  0x0000007ff7e25ad0 in libcamera::RPi::PipelineHandlerBase::registerCamera (this=0x7ff000a780, cameraData=std::unique_ptr<libcamera::RPi::CameraData> = {...}, frontend=0x7ff000dfd0, frontendName="unicam-image", backend=0x7ff0008e50, 
    sensorEntity=0x7ff000a930) at ../src/libcamera/pipeline/rpi/common/pipeline_base.cpp:804
#4  0x0000007ff7e3dd54 in libcamera::PipelineHandlerVc4::match (this=0x7ff000a780, enumerator=0x7ff0000dd0) at ../src/libcamera/pipeline/rpi/vc4/vc4.cpp:215
#5  0x0000007ff7d1b08c in libcamera::CameraManager::Private::createPipelineHandlers (this=0x55555b21b0) at ../src/libcamera/camera_manager.cpp:122
#6  0x0000007ff7d1af20 in libcamera::CameraManager::Private::init (this=0x55555b21b0) at ../src/libcamera/camera_manager.cpp:94
#7  0x0000007ff7d1adf0 in libcamera::CameraManager::Private::run (this=0x55555b21b0) at ../src/libcamera/camera_manager.cpp:71
#8  0x0000007ff787c07c in libcamera::Thread::startThread (this=0x55555b21c0) at ../src/libcamera/base/thread.cpp:319
#9  0x0000007ff78800b4 in std::__invoke_impl<void, void (libcamera::Thread::*)(), libcamera::Thread*> (__f=@0x55555b37a0: (void (libcamera::Thread::*)(libcamera::Thread * const)) 0x7ff787bf7c <libcamera::Thread::startThread()>, 
    __t=@0x55555b3798: 0x55555b21c0) at /usr/include/c++/10/bits/invoke.h:73
#10 0x0000007ff787ffcc in std::__invoke<void (libcamera::Thread::*)(), libcamera::Thread*> (__fn=@0x55555b37a0: (void (libcamera::Thread::*)(libcamera::Thread * const)) 0x7ff787bf7c <libcamera::Thread::startThread()>)
    at /usr/include/c++/10/bits/invoke.h:95
#11 0x0000007ff787ff30 in std::thread::_Invoker<std::tuple<void (libcamera::Thread::*)(), libcamera::Thread*> >::_M_invoke<0ul, 1ul> (this=0x55555b3798) at /usr/include/c++/10/thread:264
#12 0x0000007ff787fee8 in std::thread::_Invoker<std::tuple<void (libcamera::Thread::*)(), libcamera::Thread*> >::operator() (this=0x55555b3798) at /usr/include/c++/10/thread:271
#13 0x0000007ff787fec8 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (libcamera::Thread::*)(), libcamera::Thread*> > >::_M_run (this=0x55555b3790) at /usr/include/c++/10/thread:215
#14 0x0000007ff76cdcac in ?? () from /lib/aarch64-linux-gnu/libstdc++.so.6
#15 0x0000007ff77e3648 in start_thread (arg=0x7ff6601a40) at pthread_create.c:477
#16 0x0000007ff753dfdc in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
Lusifug commented 10 months ago

thread was replaces with 🧵, not sure how to fix this

naushir commented 10 months ago

If you look at frame 2 and frame 1, can you see the line of code and what control is trying to be set?

Lusifug commented 10 months ago

not sure what you mean by frame 1 and frame 2, do you mean this line of code? 1070 if (validator && !validator->validate(id)) {

this control - reqcon.set(controls::ContrastLoHistogram, 0.0);

naushir commented 10 months ago

In gdb, when you hit the error, type frame 1 and look at the output line, then do the same for frame 2.

Lusifug commented 10 months ago
(gdb) frame 1
#1  0x0000007ff7d3e450 in libcamera::ControlList::get (this=0x7ff65ffbd8, id=9963796) at ../src/libcamera/controls.cpp:1009
1009        const ControlValue *val = find(id);
(gdb) frame 2
#2  0x0000007ff7d93b7c in libcamera::V4L2Device::updateControls (this=0x7ff000e0b0, ctrls=0x7ff65ffbd8, v4l2Ctrls=...) at ../src/libcamera/v4l2_device.cpp:708
708         ControlValue value = ctrls->get(id);
naushir commented 10 months ago

If you have a branch that I could try out (libcamera + application) perhaps I can give it a try and see if I can help. Otherwise it's going to be impossible for me to say what could be going wrong with your changes.

Lusifug commented 10 months ago

I`ve created repo, with my changes. my test program and make file for it is inside "test app" dir https://github.com/Lusifug/libcamera/tree/CE_controls

naushir commented 10 months ago

I'm afraid I get compile errors with that tree:

[40/200] Generating src/ipa-priv-key with a custom command
....+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...+..+.+..+...+.......+...+.....+.+.....+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...+......+......+...............+....+.........+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
..............+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*...+.......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.............+...+..+...+.......+..+.............+........+................+........+.......+......+..+...+..........+..+...............+............+.+.....+....+.........+..+.............+...........+...+......+.+........+.+..+.......+..+.+...+......+.........+.........+.....+...+...+......+.............+............+..............+.+...+...+.....+.......+..+.........+.........+.....................+......+....+..+.......+..+....+...........+...+.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[42/200] Generating src/libcamera/ipa_pub_key_cpp with a custom command
writing RSA key
[43/200] Generating src/libcamera/control_ids_cpp with a custom command
FAILED: src/libcamera/control_ids.cpp
/home/pi/libcamera-lusifug/utils/gen-controls.py -o src/libcamera/control_ids.cpp ../src/libcamera/control_ids.yaml ../src/libcamera/control_ids.cpp.in
Traceback (most recent call last):
  File "/home/pi/libcamera-lusifug/utils/gen-controls.py", line 313, in <module>
    sys.exit(main(sys.argv))
             ^^^^^^^^^^^^^^
  File "/home/pi/libcamera-lusifug/utils/gen-controls.py", line 294, in main
    data = generate_cpp(controls)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/libcamera-lusifug/utils/gen-controls.py", line 160, in generate_cpp
    'description': format_description(ctrl.description),
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pi/libcamera-lusifug/utils/gen-controls.py", line 125, in format_description
    description = description.strip('\n').split('\n')
                  ^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'strip'
[48/200] Generating include/libcamera/ipa/core_ipa_serializer_h with a custom command
ninja: build stopped: subcommand failed.
Lusifug commented 10 months ago
pi@sb-dev:~$ git clone https://github.com/Lusifug/libcamera.git
Cloning into 'libcamera'...
remote: Enumerating objects: 39341, done.
remote: Counting objects: 100% (6231/6231), done.
remote: Compressing objects: 100% (1432/1432), done.
remote: Total 39341 (delta 4971), reused 5923 (delta 4792), pack-reused 33110
Receiving objects: 100% (39341/39341), 8.11 MiB | 873.00 KiB/s, done.
Resolving deltas: 100% (30349/30349), done.
pi@sb-dev:~$ cd libcamera
pi@sb-dev:~/libcamera$ meson setup --prefix=/usr build
The Meson build system
Version: 1.0.0
Source dir: /home/pi/libcamera
Build dir: /home/pi/libcamera/build
Build type: native build
Project name: libcamera
Project version: 0.1.0
C compiler for the host machine: cc (gcc 10.2.1 "cc (Debian 10.2.1-6) 10.2.1 20210110")
C linker for the host machine: cc ld.bfd 2.35.2
C++ compiler for the host machine: c++ (gcc 10.2.1 "c++ (Debian 10.2.1-6) 10.2.1 20210110")
C++ linker for the host machine: c++ ld.bfd 2.35.2
Host machine cpu family: aarch64
Host machine cpu: aarch64
Header "unistd.h" has symbol "issetugid" : NO 
Header "locale.h" has symbol "locale_t" : YES 
Header "stdlib.h" has symbol "secure_getenv" : YES 
Compiler for C supports arguments -Wno-c99-designator: NO 
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Found CMake: /usr/bin/cmake (3.18.4)
Run-time dependency lttng-ust found: NO (tried pkgconfig and cmake)
Program ./parser.py found: YES (/home/pi/libcamera/utils/ipc/./parser.py)
Program ./generate.py found: YES (/home/pi/libcamera/utils/ipc/./generate.py)
Program ./extract-docs.py found: YES (/home/pi/libcamera/utils/ipc/./extract-docs.py)
Program ./gen-tp-header.py found: YES (/home/pi/libcamera/utils/tracepoints/./gen-tp-header.py)
Configuring version.h using configuration
Program openssl found: YES (/usr/bin/openssl)
Library atomic found: YES
Run-time dependency threads found: YES
Run-time dependency libdw found: YES 0.183
Run-time dependency libunwind found: YES 1.3.2
Header "execinfo.h" has symbol "backtrace" : YES 
Library rt found: YES
Run-time dependency libpisp found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency libpisp
Cloning into 'libpisp'...
remote: Enumerating objects: 82, done.
remote: Counting objects: 100% (82/82), done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 82 (delta 5), reused 41 (delta 5), pack-reused 0
Receiving objects: 100% (82/82), 80.76 KiB | 1.12 MiB/s, done.
Resolving deltas: 100% (5/5), done.

Executing subproject libpisp 

libpisp| Project name: libpisp
libpisp| Project version: 1.0.1
libpisp| C compiler for the host machine: cc (gcc 10.2.1 "cc (Debian 10.2.1-6) 10.2.1 20210110")
libpisp| C linker for the host machine: cc ld.bfd 2.35.2
libpisp| C++ compiler for the host machine: c++ (gcc 10.2.1 "c++ (Debian 10.2.1-6) 10.2.1 20210110")
libpisp| C++ linker for the host machine: c++ ld.bfd 2.35.2
libpisp| Configuring pisp_build_config.h using configuration
libpisp| Run-time dependency nlohmann_json found: NO (tried pkgconfig and cmake)
libpisp| Looking for a fallback subproject for the dependency nlohmann_json
libpisp| Using subprojects/libpisp/subprojects/nlohmann_json.wrap
libpisp| Downloading nlohmann_json source from https://github.com/nlohmann/json/releases/download/v3.11.2/include.zip
Download size: 293810
Downloading: ..........

Executing subproject libpisp:nlohmann_json

nlohmann_json| Project name: nlohmann_json
nlohmann_json| Project version: 3.11.2
nlohmann_json| C++ compiler for the host machine: c++ (gcc 10.2.1 "c++ (Debian 10.2.1-6) 10.2.1 20210110")
nlohmann_json| C++ linker for the host machine: c++ ld.bfd 2.35.2
nlohmann_json| Build targets in project: 26
nlohmann_json| Subproject nlohmann_json finished.

libpisp| Dependency nlohmann_json from subproject subprojects/nlohmann_json-3.11.2 found: YES 3.11.2
libpisp| Dependency threads found: YES unknown (cached)
libpisp| Run-time dependency Boost (found: log, log_setup, system, thread) found: YES 1.74.0 (/usr)
libpisp| Build targets in project: 28
libpisp| Subproject libpisp finished.

Dependency libpisp from subproject subprojects/libpisp found: YES 1.0.1
Checking for function "dlopen" : NO 
Library dl found: YES
Run-time dependency libudev found: NO (tried pkgconfig and cmake)
Run-time dependency yaml-0.1 found: NO (tried pkgconfig and cmake)
Run-time dependency gnutls found: NO (tried pkgconfig and cmake)
Run-time dependency libcrypto found: NO (tried pkgconfig, system and cmake)
src/libcamera/meson.build:95: WARNING: Neither gnutls nor libcrypto found, all IPA modules will be isolated
Cloning into 'libyaml'...
remote: Enumerating objects: 2192, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 2192 (delta 3), reused 21 (delta 3), pack-reused 2169
Receiving objects: 100% (2192/2192), 1.43 MiB | 1.26 MiB/s, done.
Resolving deltas: 100% (1291/1291), done.
HEAD is now at 2c891fc Changes for v0.2.5 release

Executing subproject libyaml method cmake 

libyaml| Found CMake: /usr/bin/cmake (3.18.4)

| Configuring the build directory with CMake version 3.18.4
| Running CMake with: -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_POSITION_INDEPENDENT_CODE=ON
|   - build directory:          /home/pi/libcamera/build/subprojects/libyaml/__CMake_build
|   - source directory:         /home/pi/libcamera/subprojects/libyaml
|   - toolchain file:           /home/pi/libcamera/build/subprojects/libyaml/__CMake_build/CMakeMesonToolchainFile.cmake
|   - preload file:             /usr/lib/python3/dist-packages/mesonbuild/cmake/data/preload.cmake
|   - trace args:               --trace-expand --trace-format=json-v1 --no-warn-unused-cli --trace-redirect=cmake_trace.txt
|   - disabled policy warnings: [CMP0025, CMP0047, CMP0056, CMP0060, CMP0065, CMP0066, CMP0067, CMP0082, CMP0089, CMP0102]

| Running with expanded trace output on.
| Not searching for unused variables given on the command line.
| Trace will be written to cmake_trace.txt
| -- The C compiler identification is GNU 10.2.1
| -- Detecting C compiler ABI info
| -- Detecting C compiler ABI info - done
| -- Check for working C compiler: /usr/bin/cc - skipped
| -- Detecting C compile features
| -- Detecting C compile features - done
| -- Configuring done
| -- Generating done
| -- Build files have been written to: /home/pi/libcamera/build/subprojects/libyaml/__CMake_build

libyaml| CMake configuration: SUCCEEDED
libyaml| CMake project yaml has 42 build targets.

cmake-ast| Processing generated meson AST
cmake-ast| Build file: /home/pi/libcamera/build/subprojects/libyaml/meson.build

libyaml| Project name: yaml
libyaml| Project version: undefined
libyaml| C compiler for the host machine: cc (gcc 10.2.1 "cc (Debian 10.2.1-6) 10.2.1 20210110")
libyaml| C linker for the host machine: cc ld.bfd 2.35.2
libyaml| Build targets in project: 72
libyaml| Subproject libyaml finished.

Dependency libexif skipped: feature android disabled
Dependency libjpeg skipped: feature android disabled
Run-time dependency libevent_pthreads found: YES 2.1.12-stable
Run-time dependency libtiff-4 found: YES 4.2.0
Run-time dependency GTest found: NO (tried pkgconfig and system)
Looking for a fallback subproject for the dependency gtest
Downloading gtest source from https://github.com/google/googletest/archive/release-1.11.0.zip
Download size: 1121369
Downloading: ..........
Downloading gtest patch from https://wrapdb.mesonbuild.com/v2/gtest_1.11.0-1/get_patch
Download size: 2521
Downloading: ..........

Executing subproject gtest 

gtest| Project name: gtest
gtest| Project version: 1.11.0
gtest| C++ compiler for the host machine: c++ (gcc 10.2.1 "c++ (Debian 10.2.1-6) 10.2.1 20210110")
gtest| C++ linker for the host machine: c++ ld.bfd 2.35.2
gtest| Dependency threads found: YES unknown (cached)
gtest| Dependency threads found: YES unknown (cached)
gtest| Dependency threads found: YES unknown (cached)
gtest| Dependency threads found: YES unknown (cached)
gtest| Build targets in project: 92
gtest| Subproject gtest finished.

Dependency gtest from subproject subprojects/googletest-release-1.11.0 found: YES 1.11.0
Run-time dependency libdrm found: NO (tried pkgconfig and cmake)
Run-time dependency libjpeg found: YES 2.0.6
sdl2-config found: NO
Run-time dependency sdl2 found: NO (tried pkgconfig and config-tool)
Run-time dependency qt5 (modules: Core, Gui, Widgets) found: NO (tried pkgconfig)
Run-time dependency glib-2.0 found: YES 2.66.8
Run-time dependency gstreamer-video-1.0 found: YES 1.18.4
Run-time dependency gstreamer-allocators-1.0 found: YES 1.18.4
Dependency python3 skipped: feature pycamera disabled
Program doxygen found: NO
Program dot found: NO
Program sphinx-build-3 found: NO
Program sphinx-build found: NO
Configuring config.h using configuration
Program python3 (jinja2, ply, jinja2, yaml) found: YES (/usr/bin/python3) modules: jinja2, ply, jinja2, yaml
Build targets in project: 96

libcamera 0.1.0

  Versions
    Sources                  : 0.1.0+117-99b177b3

  Paths
    LIBCAMERA_DATA_DIR       : "/usr/share/libcamera"
    LIBCAMERA_SYSCONF_DIR    : "/etc/libcamera"
    IPA_PROXY_DIR            : "/usr/libexec/libcamera"
    IPA_CONFIG_DIR           : "/etc/libcamera/ipa:/usr/share/libcamera/ipa"
    IPA_MODULE_DIR           : "/usr/lib/aarch64-linux-gnu/libcamera"

  Configuration
    IPA modules signed with  : None (modules will run isolated)
    Enabled pipelines        : imx8-isi
                               rkisp1
                               rpi/pisp
                               rpi/vc4
                               simple
                               uvcvideo
    Enabled IPA modules      : rkisp1
                               rpi/pisp
                               rpi/vc4
    Hotplug support          : NO
    Tracing support          : NO
    Android support          : NO
    GStreamer support        : YES
    Python bindings          : NO
    V4L2 emulation support   : NO
    cam application          : YES
    qcam application         : NO
    lc-compliance application: YES
    Unit tests               : NO

  Subprojects
    gtest                    : YES
    libpisp                  : YES
    libyaml                  : YES
    nlohmann_json            : YES

  User defined options
    prefix                   : /usr

Found ninja-1.10.1 at /usr/bin/ninja
pi@sb-dev:~/libcamera$ sudo ninja -C build install
ninja: Entering directory `build'
[15/246] Generating src/ipa-priv-key with a custom command
................................................................+++++
...........................................................................................................+++++
[74/246] Generating src/libcamera/ipa_pub_key_cpp with a custom command
writing RSA key
[245/246] Installing files.
Installing include/libcamera/ipa/core_ipa_interface.h to /usr/include/libcamera/libcamera/ipa
Installing include/libcamera/ipa/rkisp1_ipa_interface.h to /usr/include/libcamera/libcamera/ipa
Installing include/libcamera/ipa/raspberrypi_ipa_interface.h to /usr/include/libcamera/libcamera/ipa
Installing include/libcamera/control_ids.h to /usr/include/libcamera/libcamera
Installing include/libcamera/property_ids.h to /usr/include/libcamera/libcamera
Installing include/libcamera/formats.h to /usr/include/libcamera/libcamera
Installing include/libcamera/libcamera.h to /usr/include/libcamera/libcamera
Installing src/libcamera/base/libcamera-base.so.0.1.0 to /usr/lib/aarch64-linux-gnu
Installing subprojects/libpisp/src/libpisp.so.1.0 to /usr/lib/aarch64-linux-gnu
Installing subprojects/libyaml/libyaml.a to /usr/lib
Installing src/libcamera/libcamera.so.0.1.0 to /usr/lib/aarch64-linux-gnu
Installing src/libcamera/proxy/worker/rkisp1_ipa_proxy to /usr/libexec/libcamera
Installing src/libcamera/proxy/worker/raspberrypi_ipa_proxy to /usr/libexec/libcamera
Installing src/ipa/rkisp1/ipa_rkisp1.so to /usr/lib/aarch64-linux-gnu/libcamera
Installing src/ipa/rpi/pisp/ipa_rpi_pisp.so to /usr/lib/aarch64-linux-gnu/libcamera
Installing src/ipa/rpi/vc4/ipa_rpi_vc4.so to /usr/lib/aarch64-linux-gnu/libcamera
Installing src/apps/lc-compliance/lc-compliance to /usr/bin
Installing src/apps/cam/cam to /usr/bin
Installing src/gstreamer/libgstlibcamera.so to /usr/lib/aarch64-linux-gnu/gstreamer-1.0
Installing /home/pi/libcamera/include/libcamera/base/bound_method.h to /usr/include/libcamera/libcamera/base
Installing /home/pi/libcamera/include/libcamera/base/class.h to /usr/include/libcamera/libcamera/base
Installing /home/pi/libcamera/include/libcamera/base/compiler.h to /usr/include/libcamera/libcamera/base
Installing /home/pi/libcamera/include/libcamera/base/flags.h to /usr/include/libcamera/libcamera/base
Installing /home/pi/libcamera/include/libcamera/base/object.h to /usr/include/libcamera/libcamera/base
Installing /home/pi/libcamera/include/libcamera/base/shared_fd.h to /usr/include/libcamera/libcamera/base
Installing /home/pi/libcamera/include/libcamera/base/signal.h to /usr/include/libcamera/libcamera/base
Installing /home/pi/libcamera/include/libcamera/base/span.h to /usr/include/libcamera/libcamera/base
Installing /home/pi/libcamera/include/libcamera/base/unique_fd.h to /usr/include/libcamera/libcamera/base
Installing /home/pi/libcamera/include/libcamera/ipa/ipa_controls.h to /usr/include/libcamera/libcamera/ipa
Installing /home/pi/libcamera/include/libcamera/ipa/ipa_interface.h to /usr/include/libcamera/libcamera/ipa
Installing /home/pi/libcamera/include/libcamera/ipa/ipa_module_info.h to /usr/include/libcamera/libcamera/ipa
Installing /home/pi/libcamera/include/libcamera/camera.h to /usr/include/libcamera/libcamera
Installing /home/pi/libcamera/include/libcamera/camera_manager.h to /usr/include/libcamera/libcamera
Installing /home/pi/libcamera/include/libcamera/color_space.h to /usr/include/libcamera/libcamera
Installing /home/pi/libcamera/include/libcamera/controls.h to /usr/include/libcamera/libcamera
Installing /home/pi/libcamera/include/libcamera/fence.h to /usr/include/libcamera/libcamera
Installing /home/pi/libcamera/include/libcamera/framebuffer.h to /usr/include/libcamera/libcamera
Installing /home/pi/libcamera/include/libcamera/framebuffer_allocator.h to /usr/include/libcamera/libcamera
Installing /home/pi/libcamera/include/libcamera/geometry.h to /usr/include/libcamera/libcamera
Installing /home/pi/libcamera/include/libcamera/logging.h to /usr/include/libcamera/libcamera
Installing /home/pi/libcamera/include/libcamera/orientation.h to /usr/include/libcamera/libcamera/
Installing /home/pi/libcamera/include/libcamera/pixel_format.h to /usr/include/libcamera/libcamera
Installing /home/pi/libcamera/include/libcamera/request.h to /usr/include/libcamera/libcamera
Installing /home/pi/libcamera/include/libcamera/stream.h to /usr/include/libcamera/libcamera
Installing /home/pi/libcamera/include/libcamera/transform.h to /usr/include/libcamera/libcamera
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/common/pisp_common.h to /usr/include/libpisp/common/
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/common/logging.hpp to /usr/include/libpisp/common/
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/common/pisp_types.h to /usr/include/libpisp/common/
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/common/shm_mutex.hpp to /usr/include/libpisp/common/
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/common/utils.hpp to /usr/include/libpisp/common/
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/common/version.hpp to /usr/include/libpisp/common/
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/variants/variant.hpp to /usr/include/libpisp/variants/
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/frontend/frontend.hpp to /usr/include/libpisp/frontend/
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/frontend/pisp_fe_config.h to /usr/include/libpisp/frontend/
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/frontend/pisp_statistics.h to /usr/include/libpisp/frontend/
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/backend/backend.hpp to /usr/include/libpisp/backend/
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/backend/pisp_be_config.h to /usr/include/libpisp/backend/
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/backend/tiling/pisp_tiling.hpp to /usr/include/libpisp/backend/tiling/
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/backend/tiling/types.hpp to /usr/include/libpisp/backend/tiling/
Installing /home/pi/libcamera/build/include/libcamera/version.h to /usr/include/libcamera/libcamera
Installing /home/pi/libcamera/build/meson-private/libcamera-base.pc to /usr/lib/aarch64-linux-gnu/pkgconfig
Installing /home/pi/libcamera/subprojects/libpisp/src/libpisp/backend/backend_default_config.json to /usr/share/libpisp
Installing /home/pi/libcamera/build/meson-private/libpisp.pc to /usr/lib/aarch64-linux-gnu/pkgconfig
Installing /home/pi/libcamera/src/libcamera/pipeline/rpi/pisp/data/example.yaml to /usr/share/libcamera/pipeline/rpi/pisp
Installing /home/pi/libcamera/src/libcamera/pipeline/rpi/vc4/data/example.yaml to /usr/share/libcamera/pipeline/rpi/vc4
Installing /home/pi/libcamera/src/libcamera/pipeline/rpi/vc4/data/rpi_apps.yaml to /usr/share/libcamera/pipeline/rpi/vc4
Installing /home/pi/libcamera/build/meson-private/libcamera.pc to /usr/lib/aarch64-linux-gnu/pkgconfig
Installing /home/pi/libcamera/src/ipa/rkisp1/data/imx219.yaml to /usr/share/libcamera/ipa/rkisp1
Installing /home/pi/libcamera/src/ipa/rkisp1/data/ov4689.yaml to /usr/share/libcamera/ipa/rkisp1
Installing /home/pi/libcamera/src/ipa/rkisp1/data/ov5640.yaml to /usr/share/libcamera/ipa/rkisp1
Installing /home/pi/libcamera/src/ipa/rkisp1/data/uncalibrated.yaml to /usr/share/libcamera/ipa/rkisp1
Installing /home/pi/libcamera/src/ipa/rpi/pisp/data/imx219.json to /usr/share/libcamera/ipa/rpi/pisp
Installing /home/pi/libcamera/src/ipa/rpi/pisp/data/imx219_noir.json to /usr/share/libcamera/ipa/rpi/pisp
Installing /home/pi/libcamera/src/ipa/rpi/pisp/data/imx296.json to /usr/share/libcamera/ipa/rpi/pisp
Installing /home/pi/libcamera/src/ipa/rpi/pisp/data/imx296_noir.json to /usr/share/libcamera/ipa/rpi/pisp
Installing /home/pi/libcamera/src/ipa/rpi/pisp/data/imx477.json to /usr/share/libcamera/ipa/rpi/pisp
Installing /home/pi/libcamera/src/ipa/rpi/pisp/data/imx477_noir.json to /usr/share/libcamera/ipa/rpi/pisp
Installing /home/pi/libcamera/src/ipa/rpi/pisp/data/imx708.json to /usr/share/libcamera/ipa/rpi/pisp
Installing /home/pi/libcamera/src/ipa/rpi/pisp/data/imx708_noir.json to /usr/share/libcamera/ipa/rpi/pisp
Installing /home/pi/libcamera/src/ipa/rpi/pisp/data/imx708_wide.json to /usr/share/libcamera/ipa/rpi/pisp
Installing /home/pi/libcamera/src/ipa/rpi/pisp/data/imx708_wide_noir.json to /usr/share/libcamera/ipa/rpi/pisp
Installing /home/pi/libcamera/src/ipa/rpi/pisp/data/ov5647.json to /usr/share/libcamera/ipa/rpi/pisp
Installing /home/pi/libcamera/src/ipa/rpi/pisp/data/ov5647_noir.json to /usr/share/libcamera/ipa/rpi/pisp
Installing /home/pi/libcamera/src/ipa/rpi/pisp/data/uncalibrated.json to /usr/share/libcamera/ipa/rpi/pisp
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/imx219.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/imx219_noir.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/imx290.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/imx296.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/imx296_mono.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/imx378.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/imx477.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/imx477_noir.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/imx477_scientific.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/imx519.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/imx708.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/imx708_noir.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/imx708_wide.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/imx708_wide_noir.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/ov5647.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/ov5647_noir.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/ov9281_mono.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/se327m12.json to /usr/share/libcamera/ipa/rpi/vc4
Installing /home/pi/libcamera/src/ipa/rpi/vc4/data/uncalibrated.json to /usr/share/libcamera/ipa/rpi/vc4
Installing symlink pointing to libcamera-base.so.0.1.0 to /usr/lib/aarch64-linux-gnu/libcamera-base.so.0.1
Installing symlink pointing to libcamera-base.so.0.1 to /usr/lib/aarch64-linux-gnu/libcamera-base.so
Installing symlink pointing to libpisp.so.1.0 to /usr/lib/aarch64-linux-gnu/libpisp.so
Installing symlink pointing to libcamera.so.0.1.0 to /usr/lib/aarch64-linux-gnu/libcamera.so.0.1
Installing symlink pointing to libcamera.so.0.1 to /usr/lib/aarch64-linux-gnu/libcamera.so
Running custom install script '/home/pi/libcamera/src/ipa/ipa-sign-install.sh /home/pi/libcamera/build/src/ipa-priv-key.pem lib/aarch64-linux-gnu/libcamera/ipa_rkisp1.so lib/aarch64-linux-gnu/libcamera/ipa_rpi_pisp.so lib/aarch64-linux-gnu/libcamera/ipa_rpi_vc4.so'
naushir commented 10 months ago

Are you using the CE_controls branch or the main branch for your build above? From what I gather, the main branch does not have your new controls.

naushir commented 10 months ago

Any updates on this? If not, I'll close it down shortly.