[FFmpeg-devel] [PATCH] Implement guessed_pts in avcodec_decode_video2.
Michael Niedermayer
michaelni
Tue Feb 1 18:05:58 CET 2011
On Tue, Feb 01, 2011 at 06:01:06PM +0100, Jean-Daniel Dupas wrote:
>
> Le 1 f?vr. 2011 ? 17:44, M?ns Rullg?rd a ?crit :
>
> > Michael Niedermayer <michaelni at gmx.at> writes:
> >
> >> On Tue, Feb 01, 2011 at 12:47:17PM +0000, M?ns Rullg?rd wrote:
> >>> Alexander Strange <astrange at ithinksw.com> writes:
> >>>
> >>>> On Jan 30, 2011, at 2:28 PM, Nicolas George wrote:
> >>>>
> >>>>>
> >>>>> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> >>>>> ---
> >>>>> cmdutils.c | 27 ---------------------------
> >>>>> cmdutils.h | 24 ------------------------
> >>>>> ffmpeg.c | 14 ++++++--------
> >>>>> ffplay.c | 10 +++-------
> >>>>> libavcodec/avcodec.h | 20 ++++++++++++++++++++
> >>>>> libavcodec/utils.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
> >>>>> 6 files changed, 71 insertions(+), 67 deletions(-)
> >>>>>
> >>>>> This patch moves the guess_correct_pts function from cmdutils to libavcodec.
> >>>>> The feature is available through a new field in AVFrame, guessed_pts.
> >>>>>
> >>>>> make test and ffplay still work, but I would like to have some more time to
> >>>>> read it carefully, but I have things to do in the next few days, and this
> >>>>> feature was discussed in another thread, so here the current version. It
> >>>>> will conflict with some patches that will certainly soon be applied, so I
> >>>>> will update and submit it again anyway.
> >>>>>
> >>>>> Regards,
> >>>>>
> >>>>> --
> >>>>> Nicolas George
> >>>>>
> >>>>> [..]
> >>>>> +\
> >>>>> + /**\
> >>>>> + * pts estimated using various heuristics, in stream time base\
> >>>>> + * - encoding: unused\
> >>>>> + * - decoding: set by libavcodec, read by user.\
> >>>>> + */\
> >>>>> + int64_t guessed_pts;\
> >>>>
> >>>> It's not quite estimated, it's chosen from either pts or dts. I
> >>>> think the name should be reassuring - though I can't think of one,
> >>>> just 'timestamp'?
> >>>> Also, the comment should say that clients can rely on this as the
> >>>> time of the frame.
> >>>
> >>> But can they? The current code certainly doesn't look reliable to me.
> >>
> >> A patch that improves it together with a bugreport that shows an example of
> >> improvment is welcome.
> >>
> >> besides in how far is this related to this patch?
> >
> > The patch pushes the broken guessing code into lavc, which was up
> > until now reliable.
>
> If it was reliable, why ffplay and ffmpeg had to implement guessing in the first place ?
Because mans didnt had the power to stop us from fixing bugs and writing
working code back then. Now he has it, remove all guessing code welcome non
functional ffmpeg
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110201/baadf963/attachment.pgp>
More information about the ffmpeg-devel
mailing list