[FFmpeg-devel] [PATCH] R3D REDCODE demuxer

Michael Niedermayer michaelni
Tue Jan 20 13:53:18 CET 2009


On Mon, Jan 19, 2009 at 11:43:52PM -0800, Baptiste Coudurier wrote:
> Hi Michael,
> 
> Michael Niedermayer wrote:
> > On Sun, Jan 18, 2009 at 05:42:36PM -0800, Baptiste Coudurier wrote:
> >> Hi Michael,
> >>
> >> Michael Niedermayer wrote:
> > [...]
> >>>> [...]
> >>>> +
> >>>> +    st->filename = av_mallocz(258);
> >>>> +    if (!st->filename)
> >>>> +        return AVERROR(ENOMEM);
> >>>> +    get_buffer(s->pb, st->filename, 257);
> >>>> +    dprintf(s, "filename %s\n", st->filename);
> >>> it might be cleaner to merge all the dprintf() and put them at the end of
> >>> each function
> >> Ok, factorized some debug print.
> > 
> > hmm, ive more thought of something like what is done in h264.c:
> > if(s->avctx->debug&FF_DEBUG_PICT_INFO){
> >         av_log(h->s.avctx, AV_LOG_DEBUG, "slice:%d %s mb:%d %c%s%s pps:%u frame:%d poc:%d/%d ref:%d/%d qp:%d loop:%d:%d:%d weight:%d%s %s\n",
> >                h->slice_num,
> >                (s->picture_structure==PICT_FRAME ? "F" : s->picture_structure==PICT_TOP_FIELD ? "T" : "B"),
> >                first_mb_in_slice,
> >                av_get_pict_type_char(h->slice_type), h->slice_type_fixed ? " fix" : "", h->nal_unit_type == NAL_IDR_SLICE ? " IDR" : "",
> >                pps_id, h->frame_num,
> >                s->current_picture_ptr->field_poc[0], s->current_picture_ptr->field_poc[1],
> >                h->ref_count[0], h->ref_count[1],
> >                s->qscale,
> >                h->deblocking_filter, h->slice_alpha_c0_offset/2, h->slice_beta_offset/2,
> >                h->use_weight,
> >                h->use_weight==1 && h->use_weight_chroma ? "c" : "",
> >                h->slice_type == FF_B_TYPE ? (h->direct_spatial_mv_pred ? "SPAT" : "TEMP") : ""
> >                );
> > 
> > but its your code, this is just how i would do it, a nice sideeffect is that
> > no #define DEBUG & recompile is needed to see the stuff
> 
> I agree, however as a sideeffect this would activate debug for decoder
> as well, like -v <num> activate decoder debug too.
> Having a separate debug for AVFormatContext would be nice I guess.

AVFormatContext.debug exists too ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct awnser.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090120/567108ac/attachment.pgp>



More information about the ffmpeg-devel mailing list