[x264-devel] Re: parallising the encoder
Tom Jacobs
T.R.Jacobs at lboro.ac.uk
Mon Apr 18 14:19:52 CEST 2005
thanks for all the info everyone, much appreciated.
the rest of this is probably just aimed at champ yen since it is his code i
am 'playing' with.
i am modifing it so that instead of using pthreads i can run it on my SoC
multi-processor simulator. the main loop that i need to thread is the one
containing slice_encode_thread. i am guessing that the use of
thread_data[i] was because of only being able to pass one argument with
pthread_create.
of these are h i_nal_type i_slice_type i_nal_ref_idc i_global_qp going to be
the same value for all the threads? with only the slice number, i, being
different?
so far i have got this kind of arrangemt as i have undone the loop for a
2slice encode:
if (processor ==0) {
thread_data[0].h = h;
thread_data[0].i_nal_type = i_nal_type;
thread_data[0].i_slice_type = i_slice_type;
thread_data[0].i_slice_id = 0;
thread_data[0].i_nal_ref_idc = i_nal_ref_idc;
thread_data[0].i_global_qp = i_global_qp;
rc = slice_encode_thread(&thread_data[0]);
}
if (processor==1) {
thread_data[1].h = h;
thread_data[1].i_nal_type = i_nal_type;
thread_data[1].i_slice_type = i_slice_type;
thread_data[1].i_slice_id = 1;
thread_data[1].i_nal_ref_idc = i_nal_ref_idc;
thread_data[1].i_global_qp = i_global_qp;
rc = slice_encode_thread(&thread_data[1]);
}
is this how the threaded program should work? all processor executing
slice_encode_thread at the sametime.
thanks for your help
Tom
--
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html
More information about the x264-devel
mailing list