H265/HEVC using Gstreamer on Snapdragon 820 (Linux)

If you’ve been doing any Linux development recently on the Qualcomm Snapdragon 820, then you’re probably using the Linux kernel that Linaro are looking after on behalf of Qualcomm.

Linaro’s development is progressing well but I still occasionally come across something that hasn’t yet been implemented in the 820’s Linux kernel, particularly in the Venus codec driver. The Venus codec driver does generally work well but I have occasionally needed to patch it to support more advanced codec settings, for example to support a more specific configuration of I-frames / IDR frames than the default.

One such area lacking at the moment in the Venus codec driver is support for H265/HEVC from Gstreamer via the new v4l2h265enc interface. If you would like to make use of that then you can use my patch here which adds support for two controls which are required by the Gstreamer HEVC module (HEVC profile and HEVC level). After patching your kernel with my patch you can perform an H265/HEVC encode from Gstreamer as follows:

gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! v4l2h265enc extra-controls=”controls,hevc_profile=0,hevc_level=0;” ! queue ! filesink location=enc.h265

Do remember that you will need to be using a relatively recent version of gstreamer in order to have support for the new v4l2h265enc module. If you would like to build the latest gstreamer code then I would recommend using the gst-build system described here.

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , | Comments Off on H265/HEVC using Gstreamer on Snapdragon 820 (Linux)

ADC3101 and miniDSP Firmware

I recently added audio capture support to an Atomthreads-based product. I used a Texas Instruments audio codec, the TLV320ADC3101, for which I wrote a device driver from scratch for the Atomthreads real time operating system.

The ADC3101 contains an embedded programmable DSP called the “miniDSP”, which you can build your own firmware for and upload to the device at startup. One thing that is not entirely clear from the ADC3101 datasheet is whether one is actually required to create and upload firmware to the miniDSP or if it can be used without. From the datasheet we can read:

The fully programmable algorithms for the miniDSP must be loaded into the device after power up.

In fact it is not necessary to upload firmware to the miniDSP (unless you need the flexibility of writing your own processing blocks). The ADC3101 contains default processing blocks which can be found in the “ADC Decimation Filtering and Signal Processing” section of the datasheet, e.g. Filter A.

This means that one does not need to install TI’s PurePath Studio or write any custom miniDSP firmware, and can achieve a functioning audio device driver from the ADC3101 with relatively few instructions.

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in HowTo | Tagged , , , , , , | Comments Off on ADC3101 and miniDSP Firmware

Travis CI for Embedded Software Builds

Travis CI now allows you to run your own Docker containers to perform automated builds. This means embedded software developers making use of unusual toolchains can take advantage of cloud-based CI tools which previously frequently only offered a selection of “standard” toolchains: ruby, JS etc.travis

Continue reading

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in HowTo | Tagged , , , , | Comments Off on Travis CI for Embedded Software Builds

Asymmetric VLANs with Linux

Asymmetric VLANs can be useful under certain circumstances, for example to isolate some class of ports from each other while allowing them to talk to a central server. One example of that might be a hotel network, where the network endpoints in each customer’s hotel room should not be able to talk to each other, but all rooms need to talk to a central hotel server.

Continue reading

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in HowTo | Tagged , , , , | Comments Off on Asymmetric VLANs with Linux

RawTI Image Converter

Now up on my Github account is a tool for working with the .rawTI image format: https://github.com/kelvinlawson/rawti-tools. When tuning image sensors on the DaVinci DM365 and DM368 processors, you frequently need to generate raw image files in Texas Instruments’ proprietary .rawTI file format. These are raw Bayer images that are taken before most of the image pipeline has done any work on it (for example CFA interpolation, white balance gains etc). You use these .rawTIs file together with TI’s Image Tuning Tool to train features like the Auto White Balance algorithm, but you are limited in what you can you do to analyse the image yourself.

 

ufraw-scaled

Continue reading

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in Projects, Uncategorized | Tagged , , , | Comments Off on RawTI Image Converter

RTOS for DaVinci DM365/DM368

Atomthreads RTOS now supports DaVinci DM365/DM368, the digital media processor from Texas Instruments.

dm368

The ARM9-based device comes with a wide range of source code and libraries for Linux, but there was previously no open source RTOS alternative for customers who would prefer to use a more lightweight scheduler. One of the major benefits of using an RTOS on the DM36x SoCs is to significantly reduce the startup time, from power-on to video recording. Continue reading

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in Projects | Tagged , , , , , , | Comments Off on RTOS for DaVinci DM365/DM368

OpenEmbedded for Marvell Kirkwood

I recently published a BSP layer to add support for Marvell Kirkwood devices to OpenEmbedded, the build framework for embedded Linux. The Kirkwood SoC is used in several common products including plug computers like the Sheevaplug, and the BSP allows you to run OpenEmbedded-based distributions such as Angstrom on these devices.

Continue reading

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in HowTo | Tagged , , , , , , | Comments Off on OpenEmbedded for Marvell Kirkwood

Using DaVinci DM365 Codecs Without Linux

Developers making Linux-based products with the Texas Instruments DaVinci DM365 or DM368 will find a plethora of example source code and libraries that allow you to easily build your own applications. However if you want to build a non-Linux product (to use your existing RTOS for example) you will find little guidance on where to start. Continue reading

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in HowTo | Tagged , , , , , , , , , | Leave a comment

IPv4LL Compliance Testing

I’ve been working on a compliance test suite for implementations of RFC3927 IPv4 Link-Local Address Selection, also known as AutoIP. It should prove useful to anyone implementing IP4vLL address selection on an embedded device by simulating a network environment with existing IPv4LL devices which the device will need to interoperate with in terms of address selection and conflict resolution.

Continue reading

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in Projects | Tagged , , , , , , , , | Leave a comment

Universal Device Driver Framework for Embedded Systems

Recently I’ve been considering how useful it would be if the embedded systems world had something similar to Perl’s CPAN: an open repository of software modules useful for embedded systems and portable across any RTOS. This was partly triggered by a thread on StackOverflow from someone who wanted to know why he couldn’t find a ready-rolled device driver to interface his CPU with a peripheral device.

Continue reading

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in Uncategorized | Tagged , , , , , | Comments Off on Universal Device Driver Framework for Embedded Systems

RTOS for Raisonance RCSTM8

Atomthreads now contains support for Raisonance’s STM8 compiler RCSTM8. We now support all three available STM8 compilers (Cosmic, IAR and Raisonance) so you can choose to use Atomthreads for a project safe in the knowledge that switching compilers will be pain-free.

Continue reading

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in Uncategorized | Tagged , , , , , , , , | Comments Off on RTOS for Raisonance RCSTM8

STM8 RTOS for IAR Embedded Workbench

This week Atomthreads became the first RTOS to support Embedded Workbench (EWSTM8), the STM8 compiler launched by IAR last month. EWSTM8 provides a full professional-grade development and debug environment with support for hardware debuggers including the low cost STM8S Discovery platform. IAR offer a 30-day evaluation of the full version, as well as a time-unlimited 8KB “Kickstart” edition (with a few non-core features disabled).

Continue reading

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in Projects | Tagged , , , , , , , , | Leave a comment

Atomthreads: Open Source RTOS

Last week I released Atomthreads, a free RTOS for embedded systems. This project grew from a task scheduler I created some time ago and subsequently extended with semaphore, mutex, queue and timer modules. The result was a lightweight and portable set of kernel sources which can be dropped in to any embedded systems project to add a thread scheduler. It has been useful to me so I decided to open source it in case it proves useful to anyone else.

Continue reading

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in Projects | Tagged , , | 1 Comment

STM8S Discovery Evaluation Board

I came across the STM8S Discovery board today, which is selling at the notable price of just £4.25 from Farnell (also £4.22 from Future Electronics). With this pricing, ST are clearly trying to stimulate interest in the STM8 architecture by appealing to the tinkerer market. It will be interesting to see whether they can convert this into any serious design wins.STM8S Discovery Continue reading

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in News | Tagged , , | Leave a comment

What is Kelvin’s Thunderstorm?

If you arrived here while looking for information on Kelvin’s Thunderstorm, you can read a great introduction at Electropaedia. From the article:

Kelvin’s Thunderstorm is an amazing water powered electrostatic generator, which can be made from simple materials at home or school, capable of generating a potential of tens of thousands of volts at its terminals. It was invented by Lord Kelvin (William Thomson) in 1867 and has no moving parts, depending on electrostatic induction and positive feedback for its operation. He called the device his water-dropping condenser.

Kelvin's Electrostatic Generator

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in HowTo | Tagged | Leave a comment

Omnima/OpenWRT and Xbee

I have recently connected up an Omnima Embedded Board to an Xbee device, using it as a low-cost and low-power controller for a home Xbee network. This article explains how to configure an Omnima with OpenWRT/Linux such that is capable of talking to an Xbee device using Python and Pyserial.

Continue reading

Bookmark and Share This Article
[del.icio.us] [Digg] [Google] [Reddit] [Slashdot] [StumbleUpon] [Technorati] [Twitter] [Yahoo!] [Email]
Posted in HowTo | Tagged , , , , , , , , | Leave a comment