summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Expand)Author
2021-11-23pipeline: raspberrypi: Rework the internal buffer allocation schemeNaushir Patuck
2021-11-23pipeline: raspberrypi: Add const qualifer in isRaw()Naushir Patuck
2021-11-23ipa: ipu3: agc: Saturate the averages when computing relative luminanceLaurent Pinchart
2021-11-23ipa: ipu3: agc: Return the inter-quantile mean from measureBrightness()Laurent Pinchart
2021-11-23ipa: ipu3: agc: Rename currentYGainLaurent Pinchart
2021-11-23ipa: ipu3: agc: Standardize vocabulary on "relative luminance"Laurent Pinchart
2021-11-23ipa: ipu3: agc: Drop kMaxLuminance constantLaurent Pinchart
2021-11-16ipa: ipu3: agc: Remove the threshold for the histogram calculationJean-Michel Hautbois
2021-11-15lc-compliance: Build with gtest in subprojectsHirokazu Honda
2021-11-15ipa: ipu3: Set the AnalogueGain controlJean-Michel Hautbois
2021-11-15ipa: ipu3: Move ExposureTime to IPAJean-Michel Hautbois
2021-11-15ipa: ipu3: Cache line duration at configure callJean-Michel Hautbois
2021-11-15ipa: ipu3: Send color temperature in the metadataJean-Michel Hautbois
2021-11-15ipa: ipu3: awb: Add support for color temperatureJean-Michel Hautbois
2021-11-15ipa: ipu3: agc: Store exposure in units of timeJean-Michel Hautbois
2021-11-15ipa: ipu3: agc: Update previous exposure valueJean-Michel Hautbois
2021-11-15ipa: ipu3: agc: Improve gain calculationJean-Michel Hautbois
2021-11-15ipa: ipu3: agc: Refactor ev gain calculation and testingJean-Michel Hautbois
2021-11-15ipa: ipu3: agc: Compute the gain for each frameJean-Michel Hautbois
2021-11-15ipa: ipu3: agc: Limit the number of saturated cellsJean-Michel Hautbois
2021-11-15ipa: ipu3: Use sensor controls to update frameContextJean-Michel Hautbois
2021-11-15ipu3: ipa: Report effective sensor controls with statistics to IPAHan-Lin Chen
2021-11-15ipa: ipu3: Extend ipu3 ipa interface for sensor controlsHan-Lin Chen
2021-11-11libcamera: pipeline: ipu3: Fix minCrop indentationKieran Bingham
2021-11-08android: Camera3RequestDescriptor: Provide a constructor for StreamBufferUmang Jain
2021-11-08android: mm: Null check for CameraBufferManagerUmang Jain
2021-11-06ipa: ipu3: List the events in their order of callingJean-Michel Hautbois
2021-11-04libcamera: framebuffer: Fix isContiguous log messageKieran Bingham
2021-11-02pipeline: raspberrypi: Fix rounding issue in findBestFormat()Naushir Patuck
2021-11-02libcamera: ipa: raspberrypi: Add support for imx519 sensorArducam info
2021-11-02pipeline: raspberrypi: Account for a missing Unicam embedded data nodeNaushir Patuck
2021-11-02pipeline: raspberrypi: Remove "unpacked" format penalty in mode selectionNaushir Patuck
2021-11-02pipeline: raspberrypi: Convert the pipeline handler to use media controllerNaushir Patuck
2021-11-02pipeline: raspberrypi: Apply sensor flips at the start of configure()Naushir Patuck
2021-11-02libcamera: bayer_format: Add PixelFormat conversion helpers to BayerFormat classNaushir Patuck
2021-11-02libcamera: bayer_format: Add unpacked mono 10-bit format to the conversion tableNaushir Patuck
2021-11-02libcamera: bayer_format: Rework BayerFormat conversion tableNaushir Patuck
2021-11-02libcamera: bayer_format: Turn BayerFormat::Packing into scoped enumLaurent Pinchart
2021-11-02libcamera: formats: Add R10_CSI2P formatNaushir Patuck
2021-11-02libcamera: formats: Add R10 and R12 formatsLaurent Pinchart
2021-10-27libcamera: pixel_format: remove duplicated return documentationKieran Bingham
2021-10-27libcamera: v4l2_videodevice: provide hasMediaController()Kieran Bingham
2021-10-26ipa: ipu3: agc: Clamp shutter speedJean-Michel Hautbois
2021-10-26ipa: ipu3: ipa_context: Fix doxygen warningsKieran Bingham
2021-10-26ipa: ipu3: Implement an empty stop() functionJean-Michel Hautbois
2021-10-26ipa: ipu3: Fix badly documented context variablesJean-Michel Hautbois
2021-10-26ipa: ipu3: Isolate ipa_context documentationKieran Bingham
2021-10-26ipa: ipu3: algorithms: awb: Privatize internal structuresKieran Bingham
2021-10-26ipa: ipu3: Fix the IPU3 AWB doxygen referencesKieran Bingham
2021-10-26ipa: ipu3: ipa_context: Fix file referenceKieran Bingham
pan class="hl opt">= 8; static constexpr unsigned int CAMERA_BUFFER_COUNT = 4; class FrameSink { public: FrameSink() : video_(nullptr) { } int init() { int ret; /* Locate and open the video device. */ std::string videoDeviceName = "vivid-000-vid-out"; std::unique_ptr<DeviceEnumerator> enumerator = DeviceEnumerator::create(); if (!enumerator) { std::cout << "Failed to create device enumerator" << std::endl; return TestFail; } if (enumerator->enumerate()) { std::cout << "Failed to enumerate media devices" << std::endl; return TestFail; } DeviceMatch dm("vivid"); dm.add(videoDeviceName); media_ = enumerator->search(dm); if (!media_) { std::cout << "No vivid output device available" << std::endl; return TestSkip; } video_ = V4L2VideoDevice::fromEntityName(media_.get(), videoDeviceName); if (!video_) { std::cout << "Unable to open " << videoDeviceName << std::endl; return TestFail; } if (video_->open()) return TestFail; /* Configure the format. */ ret = video_->getFormat(&format_); if (ret) { std::cout << "Failed to get format on output device" << std::endl; return ret; } format_.size.width = 1920; format_.size.height = 1080; format_.fourcc = V4L2_PIX_FMT_RGB24; format_.planesCount = 1; format_.planes[0].size = 1920 * 1080 * 3; format_.planes[0].bpl = 1920 * 3; if (video_->setFormat(&format_)) { cleanup(); return TestFail; } /* Export the buffers to a pool. */ pool_.createBuffers(SINK_BUFFER_COUNT); ret = video_->exportBuffers(&pool_); if (ret) { std::cout << "Failed to export buffers" << std::endl; cleanup(); return TestFail; } /* Only use the first CAMERA_BUFFER_COUNT buffers to start with. */ availableBuffers_.resize(CAMERA_BUFFER_COUNT); std::iota(availableBuffers_.begin(), availableBuffers_.end(), 0); /* Connect the buffer ready signal. */ video_->bufferReady.connect(this, &FrameSink::bufferComplete); return TestPass; } void cleanup() { if (video_) { video_->streamOff(); video_->releaseBuffers(); video_->close(); delete video_; video_ = nullptr; } if (media_) media_->release(); } int start() { requestsCount_ = 0; done_ = false; int ret = video_->streamOn(); if (ret < 0) return ret; /* Queue all the initial requests. */ for (unsigned int index = 0; index < CAMERA_BUFFER_COUNT; ++index) queueRequest(index); return 0; } int stop() { return video_->streamOff(); } void requestComplete(uint64_t cookie, const Buffer *metadata) { unsigned int index = cookie; Buffer *buffer = new Buffer(index, metadata); int ret = video_->queueBuffer(buffer); if (ret < 0) std::cout << "Failed to queue buffer to sink" << std::endl; } bool done() const { return done_; } const V4L2DeviceFormat &format() const { return format_; } Signal<uint64_t, int> requestReady; private: void queueRequest(unsigned int index) { auto it = std::find(availableBuffers_.begin(), availableBuffers_.end(), index); availableBuffers_.erase(it); uint64_t cookie = index; BufferMemory &mem = pool_.buffers()[index]; int dmabuf = mem.planes()[0].dmabuf(); requestReady.emit(cookie, dmabuf); requestsCount_++; } void bufferComplete(Buffer *buffer) { availableBuffers_.push_back(buffer->index()); /* * Pick the buffer for the next request among the available * buffers. * * For the first 20 frames, select the buffer that has just * completed to keep the mapping of dmabuf fds to buffers * unchanged in the camera. * * For the next 20 frames, cycle randomly over the available * buffers. The mapping should still be kept unchanged, as the * camera should map using the cached fds. * * For the last 20 frames, cycles through all buffers, which * should trash the mappings. */ unsigned int index = buffer->index(); delete buffer; std::cout << "Completed buffer, request=" << requestsCount_ << ", available buffers=" << availableBuffers_.size() << std::endl; if (requestsCount_ >= 60) { if (availableBuffers_.size() == SINK_BUFFER_COUNT) done_ = true; return; } if (requestsCount_ == 40) { /* Add the remaining of the buffers. */ for (unsigned int i = CAMERA_BUFFER_COUNT; i < SINK_BUFFER_COUNT; ++i) availableBuffers_.push_back(i); } if (requestsCount_ >= 20) { /* * Wait until we have enough buffers to make this * meaningful. Preferably half of the camera buffers, * but no less than 2 in any case. */ const unsigned int min_pool_size =