Android内置的编解码器比较少,流媒体功能也比较薄弱,现有的android关于远程视频的程序大部分使用了FFMPEG。FFmpeg是一个开源免费跨平台的视频和音频流方案,属于自由软件,采用LGPL或GPL许可证(依据你选择的组件)。它提供了录制、转换以及流化音视频的完整解决方案。它包含了非常先进的音频/视频编解码库libavcodec,为了保证高可移植性和编解码质量,libavcodec里很多codec都是从头开发的。FFmpeg支持MPEG、DivX、MPEG4、AC3、DV、FLV等40多种编码,AVI、MPEG、OGG、Matroska、ASF等90多种解码.TCPMP, VLC, MPlayer等开源播放器都用到了FFmpeg。这些播放器也大部分移植到了Android 上,只是都是基于ARM的,本文基于目前流行的2个开源项目,介绍了如何移植FFMPEG到x86的android平台上。
simd
Use Intel® IPP on Compatible AMD* Processors
use ipp on Intel or compatible AMD* processors
Intel® Atom™ Processors support in the Intel® Integrated Performance Primitives (Intel® IPP) Library
Intel® Atom™ optimizations present in the Intel® Integrated Performance Primitives (Intel® IPP) Library
Intel® IPP 7.0 Release Notes
Summary of new features and changes in the Intel IPP 7.0
Understanding CPU Dispatching in the Intel® IPP Library
It lists all support CPUs and Identifiers used in Intel IPP.
SIMD tuning with ASM pt. 4 - Vectorization & ICC
If you remember from my first post I presented a program. Stripping out the setup, the part we care about - the part that does the work - is this:
float x[PTS],
float y[PTS];
for (int i = 0; i < PTS; i++) { // line 13 in orig source
x[i] += y[i]; // line 14 in orig source
}
SIMD tuning with ASM pt. 3 - PS good, SS bad
If you recall where we left off on my post yesterday we compiled a test program with gcc and saw this code for the 'working' part of a loop. (Yes, I will be getting to the Intel C++ compiler next post, but I'll stick with what I've got so far just so we can take baby steps).
.LBB52:
.loc 1 14 0
movss (%rbp,%rax,4), %xmm0
addss (%rdx,%rax,4), %xmm0
movss %xmm0, (%rbp,%rax,4)
addq $1, %rax
SIMD tuning with ASM pt. 2 - Your First Dump
(here's part 1 in case you missed it)
Let's take a really, really simple program. It just adds one array of things to another. This should be a SIMD slam dunk! I will call this program
Let's take a really, really simple program. It just adds one array of things to another. This should be a SIMD slam dunk! I will call this program
blah.cpp
#include
#define PTS 1000
int main()
{
float x[PTS];
float y[PTS];
for (int i = 0; i < PTS; i++) {
x[i] = 0.0f; // set up some data
Code Samples for the Intel® Integrated Performance Primitives (Intel® IPP) Library 7.0*
Intel® Integrated Performance Primitives Code Samples
