User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

BARE METAL VC 4 Video Decoding

Tue Jul 02, 2019 4:21 pm

Ok I am just beginning to wrap my head around how to get some stuff done using VC 4 with GL on bare metal, though that is only a beginning.

Though at the same time I would like to play with some of the VC 4 HW decoding of video formats that does not require a license. So like H264 and other no-extra-license repuired formats.

I am looking at this for two reasons,
  • ONE: To implement a streaming video player (both without an OS and in my play OS's).
  • TWO: To convert existing video to a more convenient to play format (as we have learned a lot from the 8-Bitter projects in recent years [since 2000]).
So is there some good information that I have missed somewhere? I can not seem to find anything about how to implement this kind of video decoding anywhere. I found one thread though it only leads to links to information on doing this in Linux or using GL on bare metal, nothing about what it takes to do HW video decoding.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: BARE METAL VC 4 Video Decoding

Tue Jul 02, 2019 5:28 pm

Or is there some other good information on this somewhere.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

pik33
Posts: 170
Joined: Thu Sep 10, 2015 4:26 pm

Re: BARE METAL VC 4 Video Decoding

Tue Jul 02, 2019 5:31 pm

There is a programming environment called Ultibo. It has support for a lot of libraries including OpenMax library. I didn't try to run a decoder from it, but I succesfully got an uncompressed stream from the camera.

We also have an OpenGL ES and dispmanx support.

It is maybe not a "very" bare metal, but what you get after compilation is the "kernel7.img" file and there is no operating system. You have an unlimited access to all the RPi have on it

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: BARE METAL VC 4 Video Decoding

Tue Jul 02, 2019 5:37 pm

pik33 wrote:
Tue Jul 02, 2019 5:31 pm
There is a programming environment called Ultibo. It has support for a lot of libraries including OpenMax library. I didn't try to run a decoder from it, but I succesfully got an uncompressed stream from the camera.

We also have an OpenGL ES and dispmanx support.

It is maybe not a "very" bare metal, but what you get after compilation is the "kernel7.img" file and there is no operating system. You have an unlimited access to all the RPi have on it
I played with the Ultibo Operating System some time back, it is to much of a complete OS for bare metal work, at least in my personal view.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

User avatar
Gavinmc42
Posts: 3424
Joined: Wed Aug 28, 2013 3:31 am

Re: BARE METAL VC 4 Video Decoding

Sun Jul 14, 2019 7:08 am

They have gone for software decoding on the Pi4 as the ARM core are now fast enough.
Look in the source of ffmpeg/VLC?

VC4 uses the hardware but you could try software decoding on a 3B+?
Might be ok for 480 line res?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: BARE METAL VC 4 Video Decoding

Sat Jul 20, 2019 8:19 pm

Gavinmc42 wrote:
Sun Jul 14, 2019 7:08 am
They have gone for software decoding on the Pi4 as the ARM core are now fast enough.
Look in the source of ffmpeg/VLC?

VC4 uses the hardware but you could try software decoding on a 3B+?
Might be ok for 480 line res?
Actually I already know that software decoding can do up to 1080p on a RPi 3B (has already been demonstrated), and 720i on a RPi 1B.

Though I would still like to figure out how to use HW decoding without having to dig through the Linux sources.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

pik33
Posts: 170
Joined: Thu Sep 10, 2015 4:26 pm

Re: BARE METAL VC 4 Video Decoding

Tue Jul 23, 2019 7:19 pm

I played with the Ultibo Operating System some time back, it is to much of a complete OS for bare metal work, at least in my personal view.
This is not an operating system! The OS is a program which allows to run another program by accessing its API via system calls. The Ultibo doesn't allow this. It is a programming environment only. You cannot write a program to run "on Ultibo": you can write a program with Ultibo, which runs itself without any OS, starts fast and allows you to use any hardware resources you want to.

Yes, it has a lot of things which normal OS has: a scheduler, threads, etc, but it still is not OS. Maybe someone will write an OS based on it (I only wrote an early alpha version of GUI)..
Though I would still like to figure out how to use HW decoding without having to dig through the Linux sources.
The Ultibo way to do this was to recompile "userland" C libraries to make them usable for Ultibo. (.a static linkable format, delete/replace Linux dependencies). Maybe they can be useful without the rest of the environment. Maybe not.

Return to “Bare metal, Assembly language”