[FFmpeg-devel] [PATCH]Fix bug in setting the pts when decoding or transcoding Dirac video wrapped in MPEG-TS using libschroedingerdec.c
Anuradha Suraparaju
asuraparaju
Tue Dec 14 00:18:15 CET 2010
Hi,
On Sun, Dec 12, 2010 at 6:51 AM, Reimar D?ffinger
<Reimar.Doeffinger at gmx.de>wrote:
> On Mon, Nov 29, 2010 at 02:03:51PM +1100, Anuradha Suraparaju wrote:
> > + int64_t *pkttag;
>
> Why two spaces?
>
>
Done.
> > @@ -234,6 +246,11 @@
> > if (SCHRO_PARSE_CODE_IS_PICTURE(enc_buf->data[4]) &&
> > SCHRO_PARSE_CODE_NUM_REFS(enc_buf->data[4]) > 0)
> > avccontext->has_b_frames = 1;
> > +
> > + pkttag = av_mallocz(sizeof(int64_t));
>
> sizeof(*pkttag) possibly.
> Not sure about the performance impact, it's not exactly efficient,
> also for memory fragmentation.
>
>
Done
> > - if (frame)
> > + if (frame) {
> > + FfmpegSchroFrame *p_frame =
> av_mallocz(sizeof(FfmpegSchroFrame));
>
> Same comments as above.
>
> Done
> > @@ -285,30 +309,33 @@
> > } while (outer);
> >
> > /* Grab next frame to be returned from the top of the queue. */
> > - frame = ff_dirac_schro_queue_pop(&p_schro_params->dec_frame_queue);
> > + f = ff_dirac_schro_queue_pop(&p_schro_params->dec_frame_queue);
> >
> > - if (frame) {
> > + if (f) {
> > memcpy(p_schro_params->dec_pic.data[0],
> > - frame->components[0].data,
> > - frame->components[0].length);
> > + f->frame->components[0].data,
> > + f->frame->components[0].length);
> >
> > memcpy(p_schro_params->dec_pic.data[1],
> > - frame->components[1].data,
> > - frame->components[1].length);
> > + f->frame->components[1].data,
> > + f->frame->components[1].length);
> >
> > memcpy(p_schro_params->dec_pic.data[2],
> > - frame->components[2].data,
> > - frame->components[2].length);
> > + f->frame->components[2].data,
> > + f->frame->components[2].length);
>
> Adding a local "frame" variable would reduce the diff a bit.
>
> Done.
> > + if (f->p_tag) {
> > + picture->reordered_opaque = *((int64_t *)f->p_tag->value);
> > + }
>
That's a {} and () more than really necessary.
>
Done
> Otherwise I can't really comment on whether it is correct/works
> as intended/whatever.
>
When decoding Schro encoded data with presentation time stamps (e.g in a
Transport Stream or Matroska stream), frames are not or duplicated as would
happen earlier.
New patch attached.
Regards,
Anuradha
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpegsvn_25943_schro_decoding_patch.diff
Type: text/x-patch
Size: 3979 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101214/52652c2d/attachment.bin>
More information about the ffmpeg-devel
mailing list