Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hyperthreaded Decompressor



As I understand it, Hyper-threading is a cooperation between the OS and
the processor to run two threads sort-of simultaneously on a single
processor. So it's basically the same as running in multiple threads,
you just have to do it right (since execution won't be strictly
serialized in timeslices, the way it ordinarily would on a single
processor machine).

Unfortunately, if I'm right this means that you have all the standard
QuickTime threading problems, including the QuickTime mutex. You could
spawn a thread yourself, inside your decompression routine, as long as
it didn't need to talk to any QuickTime components -- for example, the
main thread grabs 2n buffers of compressed data, starts a thread and
gives it the first N buffers and a region of the output image to work
on, then does the other N buffers on the main thread (and an independent
region of the output image). It's not the most elegant structure, since
you can't amortize thread-creation cost across all of QuickTime (you'd
probably spawn a thread per component instance, or the equivalent), but
by concentrating all your QuickTime communication on the main thread,
and only doing in-memory work on the other, you should be safe AFAIK.

Hope this helps,
Seth

----
Seth Porter
Software Engineer
EyeSee360, Inc.

email@hidden wrote:

> Is the base decompressor thread-safe with respect to hyperthreading?
>
> Is there anything special an 'imdc' component needs to do to support
> hyperthreading?
>
> Should an image decompressor using the base decompressor advertise that
> it's 'cmpThreadSafe' in a hyperthreading environment on Windows?
>
> Thanks for any relevant information.
>
> Andreas Wittenstein
> BitJazz Inc.
> http://www.bitjazz.com/sheervideo/
> _______________________________________________
> quicktime-api mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/quicktime-api
> Do not post admin requests to the list. They will be ignored.

[demime 0.98b removed an attachment of type application/x-pkcs7-signature which had a name of smime.p7s]
_______________________________________________
quicktime-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-api
Do not post admin requests to the list. They will be ignored.


References: 
 >Capture images from a sequence grabber in planar format (From: Bing-Chang Lai <email@hidden>)
 >Hyperthreaded Decompressor (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.