Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
Zhao, Halley edited this page Aug 14, 2014 · 97 revisions

Yet Another Media Infrastructure.

It is YUMMY to your video experience on Linux like platform.

Yami is core building block for media solution. it parses video stream and decodes them leverage hardware acceleration. one usage is to encapsulate yami into openMAX component, to be used on Chromeos, Android or Linux (by gst-omx).

related links:

Coding style

  • we general follows WebKit coding style in C++ code (common/, vaapi/, decoder/, encoder/): http://www.webkit.org/coding/coding-style.html
  • codecparsers keeps the existing style from gst
  • you can apply the style check by "cp pre-commit .git/hooks/"; it is applied after git commit. so you can check/accept/reject the suggest coding style after initial commit.

Code Review Process

  1. start work on libyami by 'fork' it to your home
  2. enable coding style check by: cp pre-commit .git/hooks/
    then follows by prompt.
  3. commit/push to your home's repo, test it on chromeos/ubuntu
  4. create 'pull requests'
  5. wait for other's review
  6. update your home's repo following feedbacks
    we recommend force update to avoid unnecessary commit history, your pull requests get update automatically.
  7. repeat the above two steps until no disagree
  8. you can integrate your patch (home repo) with the condition met:
  • 1+ member flags ok when patches are less than 50 lines.
  • 2+ members flag ok when patches are more than 50 lines
  • at least one work day passed after latest patch update
  1. integrate the patches manually (NOT the button on web page)
  • git push git@github.com/01org/libyami.git HEAD:master

we do not use the 'Merge pull request' button on web page, because:

  • it creates redundant commit log.
  • it creates unclear parent-child relation between commits when two merge requests basing on unique commit id.
  1. now, the pull request is automatically close on web page.

Build & Run

related git repos

  1. git clone git://anongit.freedesktop.org/vaapi/libva
  2. git clone git://anongit.freedesktop.org/vaapi/intel-driver
  3. git clone https://github.com/01org/libyami.git

environments:

we don't find special requirement up to now

my sample build env

#!/bin/sh
export YAMI_ROOT_DIR="/opt/yami"

export VAAPI_PREFIX="${YAMI_ROOT_DIR}/vaapi"
export LIBYAMI_PREFIX="${YAMI_ROOT_DIR}/libyami"
ADD_PKG_CONFIG_PATH="${VAAPI_PREFIX}/lib/pkgconfig/:${LIBYAMI_PREFIX}/lib/pkgconfig/"
ADD_LD_LIBRARY_PATH="${VAAPI_PREFIX}/lib/:${LIBYAMI_PREFIX}/lib/"
ADD_PATH="${VAAPI_PREFIX}/bin/"

PLATFORM_ARCH_64=`uname -a | grep x86_64`
if [ -n "$PKG_CONFIG_PATH" ]; then
    export PKG_CONFIG_PATH="${ADD_PKG_CONFIG_PATH}:$PKG_CONFIG_PATH"
elif [ -n "$PLATFORM_ARCH_64" ]; then
    export PKG_CONFIG_PATH="${ADD_PKG_CONFIG_PATH}:/usr/lib/pkgconfig/:/usr/lib/i386-linux-gnu/pkgconfig/"
else 
    export PKG_CONFIG_PATH="${ADD_PKG_CONFIG_PATH}:/usr/lib/pkgconfig/:/usr/lib/x86_64-linux-gnu/pkgconfig/"
fi

export LD_LIBRARY_PATH="${ADD_LD_LIBRARY_PATH}:$LD_LIBRARY_PATH"

export PATH="${ADD_PATH}:$PATH"

echo "*======================current configuration============================="
echo "* VAAPI_PREFIX:               $VAAPI_PREFIX"
echo "* LIBYAMI_PREFIX:             ${LIBYAMI_PREFIX}"
echo "* LD_LIBRARY_PATH:            ${LD_LIBRARY_PATH}"
echo "* PATH:                       $PATH"
echo "*========================================================================="

echo "* vaapi:      git clean -dxf && ./autogen.sh --prefix=\$VAAPI_PREFIX && make -j8 && make install"
echo "* libyami:    git clean -dxf && ./autogen.sh --prefix=\$LIBYAMI_PREFIX --enable-tests && make -j8 && make install"

run the unit test

   // h264 playback
      ./decode test.h264
   // h264 encoder
      ./h264encode -i raw.yuv -s IYUV -W width_value -H height_value -c AVC -o out.h264
       // ./h264encode -i /home/halley/media/video/raw/bear_320x192_40frames.yuv -s IYUV -W 320 -H 192 -c AVC -o out.h264

Quick Links

in progress features

  1. VP8 encoder
  2. V4L2 wrapper for yami

TODO

*. legacy codec: mpeg2 decoder/encoder, vc1 decoder, mpeg4/h263 decoder/encoder *. vasink on ubuntu

*. test for vp8dec, jpegdec and h264enc; then camera + jpegdec; camera+jpegdec+h264enc *. va drm backend support. (in chrome v4l2vda/vea, there is no X display) *. coded buffer pool, support mmap of coded data *. h264 decode optimization to avoid scan start code again for nalu input (use VideoDecodeBuffer.flag to indicate buffer type) *. EGLImage support for decoded surface: getImage with RGBX first, then multiple-eglImage support *. more fourcc/format support for encode input frame *. get hw aligned width/height after start() *. pure C language interface, both API and data structure *. B frame h264 encoder support

Clone this wiki locally