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

Unified Diff: static_pthread_O2.patch

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « r19356_theora_decode_init_error_passing.patch ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: static_pthread_O2.patch
===================================================================
--- static_pthread_O2.patch (revision 0)
+++ static_pthread_O2.patch (revision 0)
@@ -0,0 +1,61 @@
+diff -ur ffmpeg-mt.orig/configure ffmpeg-mt/configure
+--- ffmpeg-mt.orig/configure 2009-05-08 04:41:29.000000000 +0000
++++ ffmpeg-mt/configure 2009-08-07 21:16:34.000000000 +0000
+@@ -1216,7 +1216,7 @@
+ SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
+ LIB_INSTALL_EXTRA_CMD='$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
+
+-host_cflags='-O3 -g -Wall'
++host_cflags='-O2 -g -Wall'
+ host_libs='-lm'
+
+ target_path='.'
+@@ -2013,6 +2013,9 @@
+ add_extralibs -pthreads
+ elif check_func pthread_create -lpthreadGC2; then
+ add_extralibs -lpthreadGC2
++ elif check_func pthread_create -lpthreadGC2 -lws2_32; then
++ add_cflags -DPTW32_STATIC_LIB
++ add_extralibs -lpthreadGC2 -lws2_32
+ elif ! check_lib pthread.h pthread_create -lpthread; then
+ die "ERROR: can't find pthreads library"
+ fi
+@@ -2202,7 +2205,7 @@
+ elif enabled ccc; then
+ add_cflags -fast
+ else
+- add_cflags -O3
++ add_cflags -O2
+ fi
+ fi
+ check_cflags -fno-math-errno
+diff -ur ffmpeg-mt.orig/libavcodec/allcodecs.c ffmpeg-mt/libavcodec/allcodecs.c
+--- ffmpeg-mt.orig/libavcodec/allcodecs.c 2009-05-07 21:41:29.000000000 -0700
++++ ffmpeg-mt/libavcodec/allcodecs.c 2009-08-07 10:51:13.226355400 -0700
+@@ -45,6 +45,14 @@
+ extern AVBitStreamFilter x##_bsf; \
+ if(CONFIG_##X##_BSF) av_register_bitstream_filter(&x##_bsf); }
+
++#ifdef PTW32_STATIC_LIB
++static void detach_ptw32(void)
++{
++ pthread_win32_thread_detach_np();
++ pthread_win32_process_detach_np();
++}
++#endif
++
+ void avcodec_register_all(void)
+ {
+ static int initialized;
+@@ -53,6 +61,11 @@
+ return;
+ initialized = 1;
+
++#ifdef PTW32_STATIC_LIB
++ pthread_win32_process_attach_np();
++ pthread_win32_thread_attach_np();
++ atexit(detach_ptw32);
++#endif
+ /* hardware accelerators */
+ REGISTER_HWACCEL (H263_VAAPI, h263_vaapi);
+ REGISTER_HWACCEL (MPEG2_VAAPI, mpeg2_vaapi);
Property changes on: static_pthread_O2.patch
___________________________________________________________________
Name: svn:eol-style
+ LF
« no previous file with comments | « r19356_theora_decode_init_error_passing.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698