[XviD-devel] mulithread rework

iibot iibot at gmx.at
Thu Apr 24 12:41:50 CEST 2008


Con Kolivas schrieb:
> On Wed, 23 Apr 2008 17:37:09 iibot wrote:
>> If possible you could try to change when a thread starts working again
>> by setting it to use larger sets of macroblocks, i.e. only start when
>> the above row has proceeded by k blocks (and not 1 as in current code).
>> This alone will make things worse but together with setting more threads
>> (at least 2x number of cores) I guess there will be enough additional
>> work for the CPUs to do.

> Unfortunately that's worse.

Did you try it?

> We have in the case of 8 threads:
> 
> thread 1 XXXXXXXX
> thread 2 XXXXXXX
> thread 3 XXXXXX
> thread 4 XXXXX
> thread 5 XXXX
> thread 6 XXX
> thread 7 XX
> thread 8 X

That scenario will not happen with k>1.

> Basically each next thread can't make progress till the thread above makes 
> progress. Enlarging the X size doesn't really help, you need to keep the CPUs 
> idle for as little duration as possible, so smaller appears better.

Yes. Each thread is idle a bit longer. But that's why there are more 
threads than cores. Expected result: less overhead.

I don't think it takes more than 5mins to try. Alternatively you could 
send me the current code and I will do.

bis besser,
Tobias


More information about the XviD-devel mailing list