Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: README.chromium

Issue 164120: Add patches for block-level quant in theora, -O2 on build, and statically link pthread on Windows (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | r18986_theora_block_quant.patch » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Contains the sources used to compile FFmpeg binaries used by Google Chrome and 1 Contains the sources used to compile FFmpeg binaries used by Google Chrome and
2 Chromium. 2 Chromium.
3 3
4 The FFmpeg source is from Alexander Strange's ffmpeg-mt branch: 4 The FFmpeg source is from Alexander Strange's ffmpeg-mt branch:
5 git://gitorious.org/~astrange/ffmpeg/ffmpeg-mt.git 5 git://gitorious.org/~astrange/ffmpeg/ffmpeg-mt.git
6 Commit: 42b521db9177ed2d4e62845659fdcd44c59757f9 6 Commit: 42b521db9177ed2d4e62845659fdcd44c59757f9
7 7
8 The Theora patches are also from the ffmpeg-mt branch above. The git commit
9 numbers and the corresponding svn revisions for them from ffmpeg mainline can
10 be found at the top of each patch.
11
8 The libswscale source is from the public libswscale repository: 12 The libswscale source is from the public libswscale repository:
9 git://git.ffmpeg.org/libswscale 13 git://git.ffmpeg.org/libswscale
10 Commit: 69fc1002e2c92aac84dccc5047141feefc94b309 14 Commit: 69fc1002e2c92aac84dccc5047141feefc94b309
11 15
16 The static_pthread_O2.patch does two things. First, it uses -O2 instead of
17 -O3 to build ffmpeg. This yields a significant savings in binary size, and
18 also seems to improve performance (lower CPU usage). Second, the patch adds
19 a modification that statically links pthreadGC2 into avcodec-52.dll on an
20 MSYS/MinGW build in Windows. This reduces the number of DLLs required for
21 distribution, and lowers the total size of the binaries.
22
12 Steps for extracting: 23 Steps for extracting:
13 1) Extract ffmpeg-mt, which creates the directory ffmpeg-mt: 24 1) Extract ffmpeg-mt, which creates the directory ffmpeg-mt:
14 tar xzvf ffmpeg-mt.tar.gz 25 tar xzvf ffmpeg-mt.tar.gz
15 2) Descend into the newly created ffmpeg-mt directory: 26 2) Descend into the newly created ffmpeg-mt directory:
16 cd ffmpeg-mt 27 cd ffmpeg-mt
17 3) Extract libswscale in place: 28 3) Extract libswscale in place:
18 tar xzvf ../libswscale.tar.gz 29 tar xzvf ../libswscale.tar.gz
30 4) Apply the Theora patches:
31 patch -p1 < ../r18986_theora_block_quant.patch
32 patch -p1 < ../r19351_theora_decode_tables_limit127.patch
33 patch -p1 < ../r19356_theora_decode_init_error_passing.patch
34 patch -p1 < ../r19350_init_loop_filter_127fix.patch
35 patch -p1 < ../r19355_invalid_huffman_table.patch
36 5) Apply the static_pthread_O2.patch:
37 patch -p1 < ../static_pthread_O2.patch
38 6) If on mac, apply the mac_install_name.patch:
39 patch -p1 < ../mac_install_name.patch
19 40
20 NOTE: Under Windows it is recommended to use Chromium's MinGW/MSYS environment 41 NOTE: Under Windows it is recommended to use Chromium's MinGW/MSYS environment
21 or 7-Zip to extract the archives. We've experienced issues when using WinRAR. 42 or 7-Zip to extract the archives. We've experienced issues when using WinRAR.
22 43
23 Since FFmpeg is sandboxed inside the render process, we're only interested in 44 Since FFmpeg is sandboxed inside the render process, we're only interested in
24 building the absolute minimum. 45 building the absolute minimum.
25 46
26 Example configure flags suitable for Chromium (Ogg+Theora+Vorbis), which will 47 Example configure flags suitable for Chromium (Ogg+Theora+Vorbis), which will
27 build and install to the directory ./chromium-ffmpeg: 48 build and install to the directory ./chromium-ffmpeg:
28 ./configure --disable-ffmpeg --disable-ffplay --disable-ffserver \ 49 ./configure --disable-ffmpeg --disable-ffplay --disable-ffserver \
(...skipping 17 matching lines...) Expand all
46 --enable-decoder=aac --enable-decoder=h264 \ 67 --enable-decoder=aac --enable-decoder=h264 \
47 --enable-decoder=mp3 --enable-decoder=theora \ 68 --enable-decoder=mp3 --enable-decoder=theora \
48 --enable-decoder=vorbis --enable-demuxer=mp3 \ 69 --enable-decoder=vorbis --enable-demuxer=mp3 \
49 --enable-demuxer=mov --enable-demuxer=ogg \ 70 --enable-demuxer=mov --enable-demuxer=ogg \
50 --enable-parser=mpegaudio \ 71 --enable-parser=mpegaudio \
51 --prefix=./chrome-ffmpeg 72 --prefix=./chrome-ffmpeg
52 73
53 If building on Windows with Chromium's MinGW/MSYS environment, add the following : 74 If building on Windows with Chromium's MinGW/MSYS environment, add the following :
54 --target-os=mingw32 --enable-memalign-hack --cc=gcc-sjlj 75 --target-os=mingw32 --enable-memalign-hack --cc=gcc-sjlj
55 76
56 If building on Mac, apply the mac_install_name.patch first so that the configure 77 If building on Mac, do not forget to do step (6) of the extraction to apply the
57 script will generate dylibs that know how to locate themselves in an application 78 mac_install_name.patch first so that the configure script will generate dylibs
58 package. 79 that know how to locate themselves in an application package.
59 patch -p1 < mac_install_name.patch
60 80
61 To build: 81 To build:
62 make 82 make
63 83
64 To install: 84 To install:
65 make install 85 make install
66 86
67 On Windows, copy the resulting avcodec-52.dll, avformat-52.dll, and 87 On Windows, copy the resulting avcodec-52.dll, avformat-52.dll, and
68 avutil-50.dll alongside chrome.exe for windows. 88 avutil-50.dll alongside chrome.exe for windows.
69 89
70 On Mac, copy the resulting libavcodec.52.dylib, libavformat.52.dylib, and 90 On Mac, copy the resulting libavcodec.52.dylib, libavformat.52.dylib, and
71 libavutil.50.dylib into the Chromium.app/Contents/MacOS folder alongside the 91 libavutil.50.dylib into the Chromium.app/Contents/MacOS folder alongside the
72 Chromium binary. 92 Chromium binary.
73 93
74 On Linux, copy the resulting libavcodec.so.52, libavformat.so.52, and 94 On Linux, copy the resulting libavcodec.so.52, libavformat.so.52, and
75 libavutil.so.50 alongside the chrome executable. 95 libavutil.so.50 alongside the chrome executable.
OLDNEW
« no previous file with comments | « no previous file | r18986_theora_block_quant.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698