view 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 source
2 #include <pthread.h>
3 #include "h264.h"
4 #include "malloc.h"
6 /*
7 * Pthread version with affinity lock for ED and MBD threads. Deprecated
8 */
9 int av_transcode_pthread_affinity(int ifile, int ofile, int frame_width, int frame_height, h264_options *opts) {
10 H264Context *h;
11 pthread_t read_thr, parsenal_thr, entropy_thr, mbdec_thr, write_thr;
13 h = ff_h264_decode_init(ifile, ofile, frame_width, frame_height, opts);
14 timer_start = av_gettime();
16 pthread_create(&read_thr, NULL, read_thread, h);
17 pthread_create(&parsenal_thr, NULL, parsenal_thread, h);
18 pthread_create(&entropy_thr, NULL, entropy_IPB_thread, h);
19 pthread_create(&mbdec_thr, NULL, mbdec_thread, h);
20 pthread_create(&write_thr, NULL, write_thread, h);
23 pthread_join(read_thr, NULL);
24 pthread_join(parsenal_thr, NULL);
25 pthread_join(entropy_thr, NULL);
26 pthread_join(mbdec_thr, NULL);
27 pthread_join(write_thr, NULL);
29 /* finished ! */
30 ff_h264_decode_end(h);
32 return 0;
33 }