[FFmpeg-devel] [RFC/PATCH 0/8] ffmpeg: add tidsp hwaccel support to avcodec

Felipe Contreras felipe.contreras at gmail.com
Mon Sep 6 00:15:27 CEST 2010


This patch series is a first try of implementing support for TI's OMAP3 DSP
algorithms. These algorithms are privided officially by TI and distributed in
many products like the Nokia N900, and also publicly for non-commercial
purposes[1]. The interface to access then is through tidspbridge driver is is
linux's staging area[2].

This code comes directly out of gst-dsp, which is a project I started to
replace gst-openmax+libomxil-ti+libdspbridge and it's the main codec interface
used in Maemo/MeeGo.

Now it seems clear to me that it would make sense to have separate library
(libtidsp-ng or something) that both gst-dsp and libavcodec could use in order
to access these codecs, however, for now I'm putting all that code inside the
'tidsp' directory.

I only implemented support for MPEG-4, since it's the most straight-forward
(H.264 and WVC1 require modifications on the data-stream). I tested this on a
Nokia N900 and it works fine... just like gst-dsp. Many things are missing,
like error handling, and proper propagation of fatal errors.

Compared to vaapi and vdpau, this code is much simpler; frames in, frames out,
and not many parameters are required. It's also worth remembering that this
interface is asynchronous; buffers are processed in a delayed way, and polling
is required in order to see if the DSP has finished processing them.

[1] http://omapzoom.org/wiki/L23.i3.8_Release_Notes
[2] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=tree;f=drivers/staging/tidspbridge
[3] http://code.google.com/p/gst-dsp/

Felipe Contreras (8):
  tidsp: add skeletton
  tidsp: add to build
  hwaccel: add init/close methods
  avcodec: add hwaccel_private field
  tidsp: add init/close
  tidsp: add mp4v configuration
  tidsp: actually configure and start it
  tidsp: process buffers

 configure                     |    3 +
 libavcodec/Makefile           |    2 +
 libavcodec/allcodecs.c        |    1 +
 libavcodec/avcodec.h          |    5 +
 libavcodec/tidsp/dmm_buffer.h |  159 ++++++
 libavcodec/tidsp/dsp_bridge.c | 1169 +++++++++++++++++++++++++++++++++++++++++
 libavcodec/tidsp/dsp_bridge.h |  428 +++++++++++++++
 libavcodec/tidsp/log.c        |   76 +++
 libavcodec/tidsp/log.h        |   38 ++
 libavcodec/tidsp/td_mp4v.c    |  128 +++++
 libavcodec/tidsp/tidsp.c      |  555 +++++++++++++++++++
 libavcodec/tidsp/tidsp.h      |   79 +++
 libavcodec/tidsp_mpeg4.c      |  157 ++++++
 libavcodec/utils.c            |    8 +
 14 files changed, 2808 insertions(+), 0 deletions(-)
 create mode 100644 libavcodec/tidsp/dmm_buffer.h
 create mode 100644 libavcodec/tidsp/dsp_bridge.c
 create mode 100644 libavcodec/tidsp/dsp_bridge.h
 create mode 100644 libavcodec/tidsp/log.c
 create mode 100644 libavcodec/tidsp/log.h
 create mode 100644 libavcodec/tidsp/td_mp4v.c
 create mode 100644 libavcodec/tidsp/tidsp.c
 create mode 100644 libavcodec/tidsp/tidsp.h
 create mode 100644 libavcodec/tidsp_mpeg4.c


More information about the ffmpeg-devel mailing list