+/*
+ * DISCUSSION : How to Write an efficient Frame-Dropping Algorithm
+ * ==========
+ *
+ * This implementation is based on mathematical and statistical
+ * developments. Older implementations used an enslavement, considering
+ * that if we're late when reading an I picture, we will decode one frame
+ * less. It had a tendancy to derive, and wasn't responsive enough, which
+ * would have caused trouble with the stream control stuff.
+ *
+ * 1. Structure of a picture stream
+ * =============================
+ * Between 2 I's, we have for instance :
+ * I B P B P B P B P B P B I
+ * t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12
+ * Please bear in mind that B's and IP's will be inverted when displaying
+ * (decoding order != presentation order). Thus, t1 < t0.
+ *
+ * 2. Definitions
+ * ===========
+ * t[0..12] : Presentation timestamps of pictures 0..12.
+ * t : Current timestamp, at the moment of the decoding.
+ * T : Picture period, T = 1/frame_rate.
+ * tau[I,P,B] : Mean time to decode an [I,P,B] picture.
+ * tauYUV : Mean time to render a picture (given by the video_output).
+ * tau´[I,P,B] = 2 * tau[I,P,B] + tauYUV
+ * : Mean time + typical difference (estimated to tau/2, that
+ * needs to be confirmed) + render time.
+ * DELTA : A given error margin.
+ *
+ * 3. General considerations
+ * ======================
+ * We define three types of machines :
+ * 14T > tauI : machines capable of decoding all I pictures
+ * 2T > tauP : machines capable of decoding all P pictures
+ * T > tauB : machines capable of decoding all B pictures
+ *
+ * 4. Decoding of an I picture
+ * ========================
+ * On fast machines, we decode all I's.
+ * Otherwise :
+ * We can decode an I picture if we simply have enough time to decode it
+ * before displaying :
+ * t0 - t > tau´I + DELTA
+ *
+ * 5. Decoding of a P picture
+ * =======================
+ * On fast machines, we decode all P's.
+ * Otherwise :
+ * First criterion : have time to decode it.
+ * t2 - t > tau´P + DELTA
+ *
+ * Second criterion : it shouldn't prevent us from displaying the forthcoming
+ * I picture, which is more important.
+ * t12 - t > tau´P + tau´I + DELTA
+ *
+ * 6. Decoding of a B picture
+ * =======================
+ * On fast machines, we decode all B's. Otherwise :
+ * t1 - t > tau´B + DELTA
+ * Since the next displayed I or P is already decoded, we don't have to
+ * worry about it.
+ *
+ * I hope you will have a pleasant flight and do not forget your life
+ * jacket.
+ * --Meuuh (2000-12-29)
+ */
+