v4l2codecs: vp8: add webp image support
Add WebP image decoding support to stateless V4L2 VP8 decoder.
WebP image is composed of a 20 bytes RIFF header followed by a standard VP8 chunk, so VP8 decoder has been enhanced to support "image/webp" format and parsing to ensure that enough data has been collected prior to call decoder (code resued from gstwebpdec.c).
Kernel media uAPI change is required for signaling of WebP image content to hantro driver, pushed here: https://www.spinics.net/lists/linux-media/msg261995.html
Tests made:
- Display of a single WebP file:
wget https://www.gstatic.com/webp/gallery/1.webp gst-launch-1.0 filesrc location= 1.webp ! typefind ! v4l2slvp8dec ! imagefreeze num-buffers=20 ! waylandsink fullscreen=true
- Slideshow of a set of WebP pictures and WebM video files:
wget https://www.gstatic.com/webp/gallery/2.webp wget https://www.gstatic.com/webp/gallery/3.webp wget https://www.gstatic.com/webp/gallery/4.webp wget https://www.gstatic.com/webp/gallery/5.webp wget https://samplemedia.linaro.org/VP8/big_buck_bunny_480p_VP8_VORBIS_25fps_1900K_short.WebM gst-play-1.0 *.webp *.webm *.WebM --wait-on-eos #hit key > to display next file
Edited by Hugues Fruchet