H.264 samples and building on Linux

H.264 samples and building on Linux

Hellom

1) Unfortunately,there are only H.264 samples for windows and
not for Linux (Encoder/Decoder) in IPP site.
http://www.intel.com/software/products/ipp/video.htm.

Did anyone tried to build and run h.264 samples on Linux ?

Or is trying to build thesw sources is bound to fail ?

2) Facing the growing popularity of Linux,does Intel intend to release soon such samples fpr Linux ?

(for MPEG-2 , for example, there are samples for Linux).

regards,
Rami Rosen

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Dear Customer,
Thanks for your interest in Intel IPP samples. We will take your inputs into our consideration for future possible feature enhancements.
As you may know, allIntel IPP samples build bythe latest version of IPP 4.1 can be easily ported from Windows* to Linux*, simply you can modify the path for complier and IPP library path in Makefile and build.sh file.

You may refer the environment setting from samplesMPEG-2 codec for Linux* to see how it can help you on H.264 codec samples.
Hope it helps.
Thanks,
Ying

Hello,

FIrst I downloaded the Linux video samples; I did not see there
H.263 sample.
Second,
I looked at MPEG2 examples;
This is the 10 changes I did so that it will build:

1) copied the Makefile from MPEG2 , and adjusted it for
H264 (The Makefile is at the end of this posting).

2) when running ./build.sh the compiler gave error
about vm_var64 undefined.
SO:

in cpl/include/sys:

I had copied vm_types_linux32.h to cpl/include/sys
(I took it from Intel g729 evaluation sample I had.)

3) in vm_types.h:
instead:
#include "sys/vm_types_win32.h"
comes:
#include sys/vm_types_linux32.h

4)
added:
#include "stdlib.h"

in h264_enc_con.cpp
for enabling exit() call (see man 3 exit).

5) marked QueryPerformanceFrequency in h264_enc_con.cpp

(It is a windows method)

6) marked typedef char vm_char; in vm_types_linux32.h
(beacuse we have a double definition of it; it is also
in vm_strings.h).

7) in crc264.cpp
method: Ipp32u CConstRateControl::UpdateMBComplexity(Ipp32u number)
I had changed
for (int h=0;h16;h++)
to :
int h
for (int h=0;h16;h++)

because in linux it causes an error (scoping).

8) marked __asm emms in 2 methods (crc264.cpp)
(Is it correct ?? ?? : I would appreciate getting a response regarding this)

9) added #include
in e3queue.cpp (beacuse of NULL undeclared error).

10)
in ecsad.cpp :
instead
static const Ipp8u block_subblock_mapping[16] =
{0,1,4,5,2,3,6,7,8,9,12,13,10,11,14,15};

comes:
const Ipp8u block_subblock_mapping[16] =
{0,1,4,5,2,3,6,7,8,9,12,13,10,11,14,15};

because of follwoing error:
`block_subblock_mapping' was declared `extern' and
later `static'

Now build passes and it creates an executable; I did not tested
running an checking the result.

again , I would appreciate
getting a response to step no 8:
marked __asm emms in 2 methods (crc264.cpp)
Is it OK to do this ?

here is the Makefile:

#############################################################################
# Makefile for building: player
#############################################################################
.SUFFIXES: .cpp .c .o .h

ifndef IPPROOT
IPPROOT=/opt/intel/ipp41/ia32_itanium
endif

####### Compiler, tools and options
CXXFLAGS= -g -O -w
INCLUDE = -I$(IPPROOT)/include
INCLUDE+= -Icpl/include
INCLUDE+= -Ih264_enc/header

LIBDIR = $(IPPROOT)/lib
DEFINES = -DNDEBUG -DLINUX32

LIBS = -L$(LIBDIR) -L/usr/X11R6/lib --start-group -lSDL -lSDLmain -lX11 -lXext -lpthread -lippvc -lipps -lippi -lippcore -lm -ldl --end-group
MOC = moc

####### Implicit rules

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCLUDE) $(DEFINES) -o$@ $

.c.o:
$(CC) -c $(CXXFLAGS) $(INCLUDE) $(DEFINES) -o$@ $

all: h264Encoder

####### Build rules for h264Encoder
INCLUDE+=-Iinclude
SOURCES+=$(wildcard coder/*.cpp)
SOURCES+=$(wildcard cpl/src/*.c)
SOURCES+=$(wildcard h264_enc/src/*.cpp)

OBJECTS=$(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SOURCES)))

h264Encoder: $(OBJECTS)
$(CXX) $(CXXFLAGS) -o$@ $^ $(LIBS)

clean:
-rm -f $(OBJECTS) h264Encoder

Regards,
Rami

Hi Rami,

yes, you can safely comment this line, it was part of old code and do not used now.

Regards,
Vladimir

Leave a Comment

Please sign in to add a comment. Not a member? Join today