libavcodec: v4l2: add support for v4l2 mem2mem codecs
authorJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Thu, 21 Sep 2017 01:55:40 +0000 (18:55 -0700)
committerwm4 <nfxjfg@googlemail.com>
Sat, 23 Sep 2017 06:47:52 +0000 (08:47 +0200)
commit1ef7752d64cbe9af2f27cc65aba3a2ca3831c128
treee92366f2b4d6fce0859341e6e7547c12a12b81f3
parentafe674734bbe71ef6c32f96a98f5f84d007eea1c
libavcodec: v4l2: add support for v4l2 mem2mem codecs

    This patchset enhances Alexis Ballier's original patch and validates
    it using Qualcomm's Venus hardware (driver recently landed upstream
    [1]).

    This has been tested on Qualcomm's DragonBoard 410c and 820c
    Configure/make scripts have been validated on Ubuntu 10.04 and
    16.04.

    Tested decoders:
           - h264
           - h263
           - mpeg4
           - vp8
           - vp9
           - hevc

    Tested encoders:
           - h264
           - h263
           - mpeg4

    Tested transcoding (concurrent encoding/decoding)

    Some of the changes introduced:
        - v4l2: code cleanup and abstractions added
        - v4l2: follow the new encode/decode api.
        - v4l2: fix display size for NV12 output pool.
        - v4l2: handle EOS (EPIPE and draining)
        - v4l2: vp8 and mpeg4 decoding and encoding.
        - v4l2: hevc and vp9 support.
        - v4l2: generate EOF on dequeue errors.
        - v4l2: h264_mp4toannexb filtering.
        - v4l2: fixed make install and fate issues.
        - v4l2: codecs enabled/disabled depending on pixfmt defined
        - v4l2: pass timebase/framerate to the context
        - v4l2: runtime decoder reconfiguration.
        - v4l2: add more frame information
        - v4l2: free hardware resources on last reference being released
        - v4l2: encoding: disable b-frames for upstreaming (patch required)

    [1] https://lwn.net/Articles/697956/

    System Level view:
        v42l_m2m_enc/dec --> v4l2_m2m --> v4l2_context --> v4l2_buffers

Reviewed-by: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>
Reviewed-by: Alexis Ballier <aballier@gentoo.org>
Tested-by: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
14 files changed:
Changelog
configure
libavcodec/Makefile
libavcodec/allcodecs.c
libavcodec/v4l2_buffers.c [new file with mode: 0644]
libavcodec/v4l2_buffers.h [new file with mode: 0644]
libavcodec/v4l2_context.c [new file with mode: 0644]
libavcodec/v4l2_context.h [new file with mode: 0644]
libavcodec/v4l2_fmt.c [new file with mode: 0644]
libavcodec/v4l2_fmt.h [new file with mode: 0644]
libavcodec/v4l2_m2m.c [new file with mode: 0644]
libavcodec/v4l2_m2m.h [new file with mode: 0644]
libavcodec/v4l2_m2m_dec.c [new file with mode: 0644]
libavcodec/v4l2_m2m_enc.c [new file with mode: 0644]