| OLD | NEW |
| (Empty) | |
| 1 diff -wurp -N orig/configure ffmpeg/configure |
| 2 --- orig/configure 2011-07-12 20:46:31.912987236 -0700 |
| 3 +++ ffmpeg/configure 2011-07-12 20:46:32.033313125 -0700 |
| 4 @@ -1946,7 +1946,7 @@ elif $cc -v 2>&1 | grep -qi ^gcc; then |
| 5 CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@' |
| 6 AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@' |
| 7 fi |
| 8 - speed_cflags='-O3' |
| 9 + speed_cflags='-O2' |
| 10 size_cflags='-Os' |
| 11 elif $cc --version 2>/dev/null | grep -q Intel; then |
| 12 cc_type=icc |
| 13 @@ -2098,6 +2098,7 @@ elif $cc -v 2>&1 | grep -q Open64; then |
| 14 cc_ident=$($cc -v 2>&1 | head -n1 | tr -d :) |
| 15 CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@' |
| 16 AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@' |
| 17 +# O2 produces smaller/faster code on P4 and same performance on Core/Atom. |
| 18 speed_cflags='-O2' |
| 19 size_cflags='-Os' |
| 20 filter_cflags='filter_out -Wdisabled-optimization|-Wtype-limits|-fno-signed
-zeros' |
| 21 @@ -2852,6 +2853,10 @@ if ! disabled pthreads && ! enabled w32t |
| 22 add_extralibs -pthreads |
| 23 elif check_func pthread_create -lpthreadGC2; then |
| 24 add_extralibs -lpthreadGC2 |
| 25 +# static pthreads improves startup time |
| 26 + elif check_func pthread_create -lpthreadGC2 -lws2_32; then |
| 27 + add_cflags -DPTW32_STATIC_LIB |
| 28 + add_extralibs -lpthreadGC2 -lws2_32 |
| 29 elif ! check_lib pthread.h pthread_create -lpthread; then |
| 30 disable pthreads |
| 31 fi |
| 32 @@ -3085,7 +3090,8 @@ elif enabled ccc; then |
| 33 elif enabled gcc; then |
| 34 check_cflags -fno-tree-vectorize |
| 35 check_cflags -Werror=implicit-function-declaration |
| 36 - check_cflags -Werror=missing-prototypes |
| 37 +# Removed to allow msys gcc 4.2.1-sjlj to compile |
| 38 +# check_cflags -Werror=missing-prototypes |
| 39 elif enabled llvm_gcc; then |
| 40 check_cflags -mllvm -stack-alignment=16 |
| 41 elif enabled clang; then |
| 42 diff -wurp -N orig/libavcodec/allcodecs.c ffmpeg/libavcodec/allcodecs.c |
| 43 --- orig/libavcodec/allcodecs.c 2011-07-12 20:46:31.952992143 -0700 |
| 44 +++ ffmpeg/libavcodec/allcodecs.c 2011-07-12 20:46:32.033313125 -0700 |
| 45 @@ -45,6 +45,15 @@ |
| 46 extern AVBitStreamFilter ff_##x##_bsf; \ |
| 47 if(CONFIG_##X##_BSF) av_register_bitstream_filter(&ff_##x##_bsf);
} |
| 48 |
| 49 +#ifdef PTW32_STATIC_LIB |
| 50 +#include "pthread.h" |
| 51 +static void detach_ptw32(void) |
| 52 +{ |
| 53 + pthread_win32_thread_detach_np(); |
| 54 + pthread_win32_process_detach_np(); |
| 55 +} |
| 56 +#endif |
| 57 + |
| 58 void avcodec_register_all(void) |
| 59 { |
| 60 static int initialized; |
| 61 @@ -53,6 +62,11 @@ void avcodec_register_all(void) |
| 62 return; |
| 63 initialized = 1; |
| 64 |
| 65 +#ifdef PTW32_STATIC_LIB |
| 66 + pthread_win32_process_attach_np(); |
| 67 + pthread_win32_thread_attach_np(); |
| 68 + atexit(detach_ptw32); |
| 69 +#endif |
| 70 /* hardware accelerators */ |
| 71 REGISTER_HWACCEL (H263_VAAPI, h263_vaapi); |
| 72 REGISTER_HWACCEL (H264_DXVA2, h264_dxva2); |
| OLD | NEW |