Mercurial > cgi-bin > hgwebdir.cgi > PR > Applications > VSs > VSs__H264__App
diff libavcodec/h264_numa.c @ 2:897f711a7157
rearrange to work with autoconf
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Tue, 25 Sep 2012 15:55:33 +0200 |
| parents | |
| children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libavcodec/h264_numa.c Tue Sep 25 15:55:33 2012 +0200 1.3 @@ -0,0 +1,33 @@ 1.4 + 1.5 +#include <pthread.h> 1.6 +#include "h264.h" 1.7 +#include "malloc.h" 1.8 + 1.9 +/* 1.10 +* Pthread version with affinity lock for ED and MBD threads. Deprecated 1.11 +*/ 1.12 +int av_transcode_pthread_affinity(int ifile, int ofile, int frame_width, int frame_height, h264_options *opts) { 1.13 + H264Context *h; 1.14 + pthread_t read_thr, parsenal_thr, entropy_thr, mbdec_thr, write_thr; 1.15 + 1.16 + h = ff_h264_decode_init(ifile, ofile, frame_width, frame_height, opts); 1.17 + timer_start = av_gettime(); 1.18 + 1.19 + pthread_create(&read_thr, NULL, read_thread, h); 1.20 + pthread_create(&parsenal_thr, NULL, parsenal_thread, h); 1.21 + pthread_create(&entropy_thr, NULL, entropy_IPB_thread, h); 1.22 + pthread_create(&mbdec_thr, NULL, mbdec_thread, h); 1.23 + pthread_create(&write_thr, NULL, write_thread, h); 1.24 + 1.25 + 1.26 + pthread_join(read_thr, NULL); 1.27 + pthread_join(parsenal_thr, NULL); 1.28 + pthread_join(entropy_thr, NULL); 1.29 + pthread_join(mbdec_thr, NULL); 1.30 + pthread_join(write_thr, NULL); 1.31 + 1.32 + /* finished ! */ 1.33 + ff_h264_decode_end(h); 1.34 + 1.35 + return 0; 1.36 +}
