Page 1 of 1

using the VDEC on SAMA5D4

Posted: Tue Nov 27, 2018 11:22 am
by CortexAlex
hello,

Documentation states that the SAMA5D4 has a hardware video decoder that can decode MPEG4, JPEG, H263 ,H264 and more. Yet, the documentation does not lay out the user interface of that component. How do I get started with the hardware decoder if I wanted to decode say JPEGs for starters ? I have Linux running with no UI/X11 and want to stay as low level as possible. I took a look at this page linux4sam/bin/view/Linux4SAM/SAM9M10Gstreamer but does it still apply to the SAMA5D4 ?

Regards
Alex

Re: using the VDEC on SAMA5D4

Posted: Wed Nov 28, 2018 1:32 am
by blue_z
Support for the Hantro video decoder has been spotty in the past.
IIRC the conversion from fbdev to DRM (Direct Rendering Manager) caused vdec support to lapse.
The Linux4SAM 5.7 demo claims (restored) support for various video streams using the vdec, and subsequent versions of the demo claim retention of all previous features.

Besides drivers in the kernel for the vdec, you need userspace code which I've only seen as a GStreamer plugin and a library.

CortexAlex wrote: I have Linux running with no UI/X11 and want to stay as low level as possible.
No problem, X11 or any windowing system is not required to render/display graphics.

Regards

Re: using the VDEC on SAMA5D4

Posted: Wed Nov 28, 2018 12:01 pm
by CortexAlex
thanks for looking into this,
Besides drivers in the kernel for the vdec
besides the AT91_VDEC_G1 driver, is there anything else I need to enable in the kernel ?

Regards
Alex

Re: using the VDEC on SAMA5D4

Posted: Thu Nov 29, 2018 3:17 am
by blue_z
In the arch/arm/mach-at91/Makefile CONFIG_AT91_VDEC_G1 will build both memalloc.c and vdec_g1.c drivers.
You'll also need to enable the display-related drivers (e.g. DRM/LCD, backlight, HDMI), but if you use the kernel config file from the Linux4SAM demo (e.g. linux4sam/meta-atmel/blob/sumo/recipes-kernel/linux/linux-at91-4.14/sama5d4/defconfig), the salient config parameters will be enabled.

Regards