This is how to add hardware decoder to ffmpeg on linux for firefly-rk3288.
First, choose the vpu driver librarys.
We use the hybris library made by mac_l1,also you can choose rockchip’s vpu driver library ,which they has put it on a websites.
For convenience ,I put a mac_l1’s hybris lib’s copy to “baidu pan”. here is the link:
http://pan.baidu.com/s/1pKdqUQR
Install the driver library:
sudo dpkg -i machybris-0.1.0_armhf.deb
if you get a mistake. please run this:
sudo apt-get -f install
and try again.
After install done ,reboot your board .
Install dependencies library :
sudo apt-get install libsdl-dev
this source code need compiled on the development board. if you want to compiled on PC ,you need modify the source code.
Install compile environment:
sudo apt-get install build-essential
Get the source code:
git clone https://github.com/isle0118/firefly-vpu-linux.git
Compile and Install:
./configure --enable-shared --prefix=/usr --disable-ffmpeg --disable-ffprobe --disable-ffserver --disable-static
make && sudo make install
Now, you can test the hardware decoder with ffplay .
the source file is here :
libavcodec/rkdec_decoder.c
if you want use other driver library or compiled on PC ,just need to modify this file.
Have fun !