[MPlayer-dev-eng] [PATCH] resubmit realv4.diff

Arpi arpi at thot.banki.hu
Sun Mar 9 20:08:14 CET 2003


Hi,

> So in this part
> if ((priv->kf_pts==65535) || s[0]==0 || s[0]==1) {
> +           int tmp=(timestamp&0x1fff)-kf;
> +           if ((ABS(priv->kf_pts_error-tmp) > 100) || (priv->kf_pts==65535)) 
> drop=1;
> +           priv->kf_pts_error=tmp;
> +           mp_msg(MSGT_DEMUX,MSGL_V,"kf_pts vs. stream_pts desync: 
> %d\n",priv->kf_pts_error);
> +       }

i've just commited my fix (mostly based on your patches but a bit cleaner)
please test it.

> if you change "|| s[0]==0 || s[0]==1" to
> eg. ((unsigned char)s[0]<0x10) than it works ok.
> I don't remember why i put 0 and 1 there, maybe otherwise

for RV30 it's 0||1 while for RV40 it's <0x10 due to pict_type shifted by 2.
(actually you're checking for pict_type<=1 but such ugly way :))

so, you were right about "discontiunity" thing, they do reset their LSB
timestamp counters at I frames sometimes, so I've changed code in CVS to use
'timestamp' as-is for I frames and calculate precise value based on LSB bits
only for P/B frames, using the base difference iof the I frame's PTS.
it seems to work fine for all files i've tried. i've even compared values
given by my code and the codec (patched vd_realvid.c to print transform_out[2])
and they matched for most of frames, for the few they didn't my values seems
better (the values given by codec were smaller than I frame's PTS).
(maybe teh codec is right? and we should drop those frames??)


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
    "However, many people beg for its inclusion in Debian. Why?" - Gabucino
  "Because having new software in Debian is good." - Josselin Mouette
"Because having good software in Debian is new." - Gabucino


More information about the MPlayer-dev-eng mailing list