[FFmpeg-devel] [PATCH] Patches to fix issue453 in libdiracschroedinger

Anuradha Suraparaju anuradha
Mon Jun 9 06:26:41 CEST 2008


Hi,


On Tue, 2008-06-03 at 23:48 +0200, Michael Niedermayer wrote:
> On Sun, Jun 01, 2008 at 06:03:12PM +1000, Anuradha Suraparaju wrote:
> > Hi, 
> > 
> > I have addressed most of the issues mentioned in your email in the new
> > patches. 
> [...]
> 
> > > [...]
> > > > Index: libavcodec/dirac_parser.c
> > > > ===================================================================
> > > > --- libavcodec/dirac_parser.c	(revision 13233)
> > > > +++ libavcodec/dirac_parser.c	(working copy)
> > > > @@ -62,16 +62,12 @@
> > > >      ParseContext *pc = s->priv_data;
> > > >      int next;
> > > >  
> > > > -    if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) {
> > > > -        next = buf_size;
> > > > -    }else{
> > > > -        next = find_frame_end(pc, buf, buf_size);
> > > > +    next = find_frame_end(pc, buf, buf_size);
> > > >  
> > > > -        if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
> > > > -            *poutbuf = NULL;
> > > > -            *poutbuf_size = 0;
> > > > -            return buf_size;
> > > > -        }
> > > > +    if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
> > > > +        *poutbuf = NULL;
> > > > +        *poutbuf_size = 0;
> > > > +        return buf_size;
> > > >      }
> > > >  
> > > >      *poutbuf = buf;
> > > 
> > > The current code in dirac_parser.c looks correct to me, this change should
> > > not be needed.
> > > PARSER_FLAG_COMPLETE_FRAMES is supposed to mean "complete" in the ffmpeg
> > > sense.
> > > 
> > 
> > As I mentioned in another email, libschroedinger requires that packet
> > sent to it be Dirac byte stream parse units. If a packet contains more
> > than one parse-unit the second gets ignored. Hence the change I made is
> > required.
> 
> What ffmpeg calls complete frames is what a parser should output, hence
> if PARSER_FLAG_COMPLETE_FRAMES is set there is no spliting to do for a
> parser.
> 
> If i understand the current code correctly the parser does not behave that
> way and the decoder would not work if it did.
> If true -vcodec copy will likely not work with dirac currently
> 

I've left dirac_parser.c unchanged from the svn version and have modfied
libschroedingerdec.c to to sub-parse "complete" ffmpeg frames into
individual parse unit. I am attaching two patches to this email

issue453_fix_pts_bug_common_libdirac_libschroedinger_svn_13724.diff -
files common to libdirac and libschroedinger
fix_pts_bug_libdirac_svn_13594.diff
issue453_fix_pts_bug_libschroedingerdec_svn_13724.diff

The earlier patches fix_pts_bug_libdirac_svn_13594.diff (libdiracenc.c)
and issue453_fix_pts_bug_libschroedinger_svn_13594.diff
libschroedingerenc.c) work as is with svn revision 17324.

Regards,
Anuradha


-------------- next part --------------
A non-text attachment was scrubbed...
Name: issue453_fix_pts_bug_libschroedingerdec_svn_13724.diff
Type: text/x-patch
Size: 4299 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080609/66a6e548/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: issue453_fix_pts_bug_common_libdirac_libschroedinger_svn_13724.diff
Type: text/x-patch
Size: 1640 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080609/66a6e548/attachment-0001.bin>



More information about the ffmpeg-devel mailing list