[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OpenDivX] General Development Discussion - All Projects -> OpenDivX Daily Forums Digest








Topic:		Postprocessing - howzabout you enable SMP to do PP on
the 2nd CPU?
Author:		Michael R. Brumm
Posted:		 2001-03-13 01:39
------------------------------------------------------------------------
--------
Why not just do this:

Part 1) When the request comes in for the nth frame, and there are no
threads decoding the nth frame, create a future_thread to decode the
[n+1]th frame. The current_thread obviously decodes the nth frame (as
usual). Return the results of the current_thread, but keep future_thread
going.

Part 2) When the next frame request comes in, check to see if
future_thread is processing it. If it is, make the current_thread =
future_thread, and create a new future_thread to process the [n+1]th
frame. Return the results of current_thread, and again keep
future_thread going.

Part 3) If a frame request comes in, and future_thread is not processing
it (for example, when someone skips or fastforward/rewinds), just kill
the future_thread (deallocating the memory, too), and perform the same
steps outlined in "Part 1".

Obviously this should only be done on dual-processor (or EXTREMELY fast
single-CPU) machines. Also, I only gave a 2 thread example for a
dual-CPU. This method could scale up to 4 threads for a quad-CPU... or 8
threads for a octa-CPU....


Topic:		Postprocessing - howzabout you enable SMP to do PP on
the 2nd CPU?
Author:		eagle
Posted:		 2001-03-13 03:09
------------------------------------------------------------------------
--------
Problem is that to decode DivX frame n, you most often need to have the
previous frame n-1, already decoded in memory.  Actually, you could the
overlap postprocessing and yuv2rgb of frame n-1 with the decode of frame
n, but it might not be worth the effort.

Decoding's not <!-- BBCode Start --><I>too</I><!-- BBCode End --> tough,
unless you have a pair of older processors, you shouldn't need SMP.
Encoding using SMP has exactly the same problem that I described for
decoding.

On a related note, does anyone have any experience with using the
pthread library in Windows?  I've written some stuff that uses pthread's
but it locks up under Win2k (using the pthreadw32 LGPL'd library.  Any
ideas or alternative solutions?

eagle[ This message was edited by: eagle on 2001-03-13 03:09 ]


Topic:		Postprocessing - howzabout you enable SMP to do PP on
the 2nd CPU?
Author:		genthons
Posted:		 2001-03-13 08:27
------------------------------------------------------------------------
--------
<!-- BBCode Start --><I> Encoding using SMP has exactly the same problem
that I described for decoding.</I><!-- BBCode End -->


For encoding, why not starting to decode two (or N) groups of images
following an I-frame, for which you do not need to know about the
previous frames ? 
Each group would be decoded by a different processor. I guess this is a
memory consuming method, but I think someone who can afford a bi-proc
can buy the necessary amount of RAM.[ This message was edited by:
genthons on 2001-03-13 08:28 ]


_______________________________________________
OpenDivX mailing list
[email protected]
http://lists.projectmayo.com/mailman/listinfo/opendivx


Reply To Poster

Local References / HOW-TO / FAQs