[x264-devel] Yet another slicetype patch

Leon Woestenberg leon.woestenberg at gmail.com
Fri Feb 20 23:09:23 CET 2009


Hello,

On Fri, Feb 20, 2009 at 7:11 PM, Mike Kazmier <DaKaZ at zenbe.com> wrote:
>
> So after doing some more testing I am seeing a huge performance penalty with this patch versus the previous v9 patch (which had the usleeps).  Can anyone determine why.  This patch is only a few % faster than r1114 without the patch.
>
That can only happen if the while loop testing the condition triggers falsely.

This is the design pattern with added instrumentation:

int wait_count = 0;
pthread_mutex_lock()
while (!shared_data.cond) {
  wait_count++;
  pthread_cond_wait()
}
pthread_mutex_unlock()
if (wait_count > 1) printf("hmmf\n");


In all cases pthread_cond_wait/broadcast() should be an improvement over usleep.

Regards,
-- 
Leon


More information about the x264-devel mailing list