OpenCores
URL https://opencores.org/ocsvn/oc-h264-encoder/oc-h264-encoder/trunk

Subversion Repositories oc-h264-encoder

[/] [oc-h264-encoder/] [trunk/] [doc/] [x264_profiling/] [README] - Blame information for rev 17

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 17 gshankara
**************************************************************************************
2
**************************************************************************************
3
This file is targeted at newbies who are unfamiliar with what to do after obtaining the
4
X264 encoder source from videolan.org
5
 
6
Options may have to be changed as needed for a particular situation.
7
 
8
This is basically summarized from the threads in the topic
9
"VLC x264 GCC profiling" under [Home » All forums » OC H.264 project]
10
 
11
 
12
System    : Atom N270 (1.6 GHz) with 1GB DDR2 (667 MHz) running Ubuntu Netbook Remix
13
 
14
**************************************************************************************
15
**************************************************************************************
16
 
17
STEP 1 of 5:
18
 
19
To get all the x264 files:
20
test $ git clone git://git.videolan.org/x264.git
21
 
22
**************************************************************************************
23
 
24
STEP 2 of 5: Setup for enabling profiling, debug
25
 
26
test $ ./configure --disable-avis-input --disable-mp4-output --disable-pthread --enable-debug --enable-gprof
27
 
28
Platform:   X86
29
System:     LINUX
30
asm:        yes
31
avis input: no
32
mp4 output: no
33
pthread:    no
34
debug:      yes
35
gprof:      yes
36
PIC:        no
37
shared:     no
38
visualize:  no
39
 
40
You can run 'make' or 'make fprofiled' now.
41
 
42
**************************************************************************************
43
STEP 3 of 5: Run the make script to build
44
 
45
test $ make -f Makefile
46
 
47
rm -f .depend
48
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/mc.c -MT common/mc.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/predict.c -MT common/predict.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/pixel.c -MT common/pixel.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/macroblock.c -MT common/macroblock.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/frame.c -MT common/frame.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/dct.c -MT common/dct.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/cpu.c -MT common/cpu.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/cabac.c -MT common/cabac.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/common.c -MT common/common.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/mdate.c -MT common/mdate.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/set.c -MT common/set.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/quant.c -MT common/quant.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/vlc.c -MT common/vlc.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  encoder/analyse.c -MT encoder/analyse.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  encoder/me.c -MT encoder/me.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  encoder/ratecontrol.c -MT encoder/ratecontrol.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  encoder/set.c -MT encoder/set.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  encoder/macroblock.c -MT encoder/macroblock.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  encoder/cabac.c -MT encoder/cabac.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  encoder/cavlc.c -MT encoder/cavlc.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  encoder/encoder.c -MT encoder/encoder.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  encoder/lookahead.c -MT encoder/lookahead.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/x86/mc-c.c -MT common/x86/mc-c.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  common/x86/predict-c.c -MT common/x86/predict-c.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  x264.c -MT x264.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  matroska.c -MT matroska.o -MM -g0 1>> .depend;  gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX  muxers.c -MT muxers.o -MM -g0 1>> .depend;
49
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o x264.o x264.c
50
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o matroska.o matroska.c
51
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o muxers.o muxers.c
52
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/mc.o common/mc.c
53
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/predict.o common/predict.c
54
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/pixel.o common/pixel.c
55
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/macroblock.o common/macroblock.c
56
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/frame.o common/frame.c
57
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/dct.o common/dct.c
58
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/cpu.o common/cpu.c
59
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/cabac.o common/cabac.c
60
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/common.o common/common.c
61
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/mdate.o common/mdate.c
62
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/set.o common/set.c
63
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/quant.o common/quant.c
64
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/vlc.o common/vlc.c
65
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o encoder/analyse.o encoder/analyse.c
66
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o encoder/me.o encoder/me.c
67
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o encoder/ratecontrol.o encoder/ratecontrol.c
68
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o encoder/set.o encoder/set.c
69
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o encoder/macroblock.o encoder/macroblock.c
70
encoder/macroblock.c: In function ‘x264_macroblock_probe_skip’:
71
encoder/macroblock.c:852: warning: ‘mvp[1]’ may be used uninitialized in this function
72
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o encoder/cabac.o encoder/cabac.c
73
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o encoder/cavlc.o encoder/cavlc.c
74
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o encoder/encoder.o encoder/encoder.c
75
encoder/encoder.c: In function ‘x264_slice_write’:
76
encoder/encoder.c:1279: warning: ‘bs_bak.i_bits_encoded’ may be used uninitialized in this function
77
encoder/encoder.c:1279: warning: ‘bs_bak.i_left’ may be used uninitialized in this function
78
encoder/encoder.c:1279: warning: ‘bs_bak.cur_bits’ may be used uninitialized in this function
79
encoder/encoder.c:1279: warning: ‘bs_bak.p_end’ may be used uninitialized in this function
80
encoder/encoder.c:1279: warning: ‘bs_bak.p’ may be used uninitialized in this function
81
encoder/encoder.c:1279: warning: ‘bs_bak.p_start’ may be used uninitialized in this function
82
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o encoder/lookahead.o encoder/lookahead.c
83
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/x86/mc-c.o common/x86/mc-c.c
84
gcc -O1 -g  -Wall -I. -pg -DHAVE_MALLOC_H -march=i686 -mfpmath=sse -msse -DHAVE_MMX -DARCH_X86 -DSYS_LINUX   -c -o common/x86/predict-c.o common/x86/predict-c.c
85
yasm -O2 -f elf -Icommon/x86/ -o common/x86/cabac-a.o common/x86/cabac-a.asm
86
yasm -O2 -f elf -Icommon/x86/ -o common/x86/dct-a.o common/x86/dct-a.asm
87
yasm -O2 -f elf -Icommon/x86/ -o common/x86/deblock-a.o common/x86/deblock-a.asm
88
yasm -O2 -f elf -Icommon/x86/ -o common/x86/mc-a.o common/x86/mc-a.asm
89
yasm -O2 -f elf -Icommon/x86/ -o common/x86/mc-a2.o common/x86/mc-a2.asm
90
yasm -O2 -f elf -Icommon/x86/ -o common/x86/pixel-a.o common/x86/pixel-a.asm
91
yasm -O2 -f elf -Icommon/x86/ -o common/x86/predict-a.o common/x86/predict-a.asm
92
yasm -O2 -f elf -Icommon/x86/ -o common/x86/quant-a.o common/x86/quant-a.asm
93
yasm -O2 -f elf -Icommon/x86/ -o common/x86/sad-a.o common/x86/sad-a.asm
94
yasm -O2 -f elf -Icommon/x86/ -o common/x86/cpu-a.o common/x86/cpu-a.asm
95
yasm -O2 -f elf -Icommon/x86/ -o common/x86/dct-32.o common/x86/dct-32.asm
96
yasm -O2 -f elf -Icommon/x86/ -o common/x86/pixel-32.o common/x86/pixel-32.asm
97
ar rc libx264.a common/mc.o common/predict.o common/pixel.o common/macroblock.o common/frame.o common/dct.o common/cpu.o common/cabac.o common/common.o common/mdate.o common/set.o common/quant.o common/vlc.o encoder/analyse.o encoder/me.o encoder/ratecontrol.o encoder/set.o encoder/macroblock.o encoder/cabac.o encoder/cavlc.o encoder/encoder.o encoder/lookahead.o common/x86/mc-c.o common/x86/predict-c.o common/x86/cabac-a.o common/x86/dct-a.o common/x86/deblock-a.o common/x86/mc-a.o common/x86/mc-a2.o common/x86/pixel-a.o common/x86/predict-a.o common/x86/quant-a.o common/x86/sad-a.o common/x86/cpu-a.o common/x86/dct-32.o common/x86/pixel-32.o
98
ranlib libx264.a
99
gcc -o x264 x264.o matroska.o muxers.o libx264.a -pg -lm
100
 
101
**************************************************************************************
102
STEP 4 of 5: Setup the required profile to run, specify the input YUV file, output file and resolution
103
 
104
test $ ./x264 --profile=baseline -o test_BUS_352x288_30_orig_01.264 BUS_352x288_30_orig_01.yuv 352x288
105
 
106
x264 [info]: 352x288 @ 25.00 fps
107
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
108
x264 [info]: profile Baseline, level 1.3
109
x264 [info]: frame I:1     Avg QP:19.53  size: 34850
110
x264 [info]: frame P:149   Avg QP:27.87  size:  4395
111
x264 [info]: mb I  I16..4:  7.3%  0.0% 92.7%
112
x264 [info]: mb P  I16..4:  0.1%  0.0%  0.7%  P16..4: 47.6% 29.5% 14.0%  0.0%  0.0%    skip: 8.0%
113
x264 [info]: coded y,uvDC,uvAC intra:94.1% 82.2% 65.0% inter:44.0% 14.1% 2.1%
114
x264 [info]: ref P L0  76.0% 15.3%  8.7%
115
x264 [info]: kb/s:919.6
116
 
117
encoded 150 frames, 12.46 fps, 920.37 kb/s
118
 
119
**************************************************************************************
120
STEP 5 of 5: Run profiling and redirect the results to a text file
121
 
122
test $ gprof -b x264 gmon.out >profile_test.txt
123
 
124
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.