Code Monkey home page Code Monkey logo

userland's Introduction

This repository contains the source code for the ARM side libraries used on Raspberry Pi. These typically are installed in /opt/vc/lib and includes source for the ARM side code to interface to: EGL, mmal, GLESv2, vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG.

Use buildme to build. It requires cmake to be installed and an ARM cross compiler. For 32-bit cross compilation it is set up to use this one: https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian

Whilst 64-bit userspace is not officially supported, some of the libraries will work for it. To cross compile, install gcc-aarch64-linux-gnu and g++-aarch64-linux-gnu first. For both native and cross compiles, add the option --aarch64 to the buildme command.

Note that this repository does not contain the source for the edidparser and vcdbg binaries due to licensing restrictions.

userland's People

Contributors

6by9 avatar adamheinrich avatar andya avatar chinasaur avatar dmopalmer avatar electron752 avatar ethanol100 avatar fullergalway avatar gamaral avatar ghollingworth avatar jamesh65 avatar jasaw avatar jsonn avatar julianscheel avatar kraj avatar ledazul avatar luked99 avatar lurch avatar maxnet avatar mthuurne avatar naushir avatar pelwell avatar popcornmix avatar rfinnie avatar terminus-imrc avatar thesin- avatar timgover avatar tvjon avatar xecdesign avatar zboobzor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

userland's Issues

hello_mmal_jpeg fails with images from USB webcam

Describe the bug
Sometimes, perfectly valid jpeg images fail to decode. They come from a USB webcam.

$ ./hello_mmal_jpeg.bin frame.jpeg
vc.ril.image_decode:out:0(I420)
 type: 3, fourcc: I420
 bitrate: 0, framed: 0
 extra data: 0, (nil)
 width: 736, height: 368, (0,0,724,362)
start decoding
stop decoding

For reference, a typical successful run of the program looks like this:

$ ./hello_mmal_jpeg.bin test-image.jpg 
vc.ril.image_decode:out:0(I420)
 type: 3, fourcc: I420
 bitrate: 0, framed: 0
 extra data: 0, (nil)
 width: 736, height: 368, (0,0,724,362)
start decoding
received event length 96, EFCH
----------Port format changed----------
vc.ril.image_decode:out:0type: video, fourcc: I420
 bitrate: 0, framed: 0
 extra data: 0, (nil)
 width: 736, height: 368, (0,0,724,362)
 pixel aspect ratio: 0/0, frame rate: 0/0
 buffers num: 1(opt 1, min 1), size: 406272(opt 406272, min: 406272), align: 0
-----------------to---------------------
type: video, fourcc: I420
 bitrate: 0, framed: 0
 extra data: 0, 0x173e330
 width: 1248, height: 1104, (0,0,1244,1096)
 pixel aspect ratio: 0/0, frame rate: 0/0
 buffers num (opt 1, min 1), size (opt 2066688, min: 2066688)
----------------------------------------
Retrieved buffer 0x177c1b8
decoded frame (flags 1, size 2066688) count 0
stop decoding

To reproduce
Image directly from webcam
The above image isn't viewable with most programs. It can be fixed with this ffmpeg command, which turns a Motion JPEG frame into a full JFIF image file:
ffmpeg -i frame-og.jpg -c:v copy -bsf:v mjpeg2jpeg frame-fixed.jpg
Result
Both of them fail when inputted to hello_mmal_jpeg.bin. Other images work fine.

System

System Information
------------------

Raspberry Pi 4 Model B Rev 1.1
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"

Raspberry Pi reference 2019-09-26
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 80d486687ea77d31fc3fc13cf3a2f8b464e129be, stage4

Linux team5708pi 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux
Revision	: b03111
Serial		: 100000000e728cb2
Model		: Raspberry Pi 4 Model B Rev 1.1
Throttled flag  : throttled=0x0
Camera          : supported=0 detected=0

Videocore information
---------------------

Sep 24 2019 17:34:30 
Copyright (c) 2012 Broadcom
version cd3add54955f8fa065b414d8fc07c525e7ddffc8 (clean) (release) (start)

alloc failures:     0
compactions:        0
legacy block fails: 0

raspivid locks up above 202 fps for unclear reasons

You state that in this posting:
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=204775#p1270144

This is major blocker of bringing over raspiraw high framerate features from raspiraw (v2 camera can do easily 640x480 at 240fps with raspiraw, and even 640x215 at 420fps with very few frame skips; v1 camera can do 640x64 at 665fps with raspiraw without frameskips).

I would expect raspivid to show >500fps with v1 camera at least if this blocker issue will be fixed.

error building arm64 mmal

[ 41%] Building C object host_applications/linux/libs/bcm_host/CMakeFiles/bcm_host.dir/////interface/vmcs_host/linux/vcfilesys.c.o
In file included from /home/ubiq22/userland/build/inc/interface/vcos/vcos.h:144,
from /home/ubiq22/userland/interface/vmcs_host/linux/vcfilesys.c:56:
/home/ubiq22/userland/interface/vmcs_host/linux/vcfilesys.c: In function ‘vc_hostfs_totalspace64’:
/home/ubiq22/userland/build/inc/interface/vcos/vcos_logging.h:234:88: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
234 | _level, fmt...) do { if (vcos_is_log_enabled(cat,_level)) vcos_log_impl(cat,_level,fmt); } while (0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.