[FFmpeg-devel] [PATCH] R3D REDCODE demuxer
Baptiste Coudurier
baptiste.coudurier
Tue Jan 20 08:43:52 CET 2009
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.
>>> [...]
>>>> +static int r3d_read_reos(AVFormatContext *s)
>>>> +{
>>>> + R3DContext *r3d = s->priv_data;
>>>> + int tmp;
>>>> +
>>>> + r3d->rdvo_offset = get_be32(s->pb);
>>>> + get_be32(s->pb); // rdvs offset
>>>> + get_be32(s->pb); // rdao offset
>>>> + get_be32(s->pb); // rdas offset
>>>> +
>>>> + tmp = get_be32(s->pb);
>>>> + dprintf(s, "num video chunks %d\n", tmp);
>>>> +
>>>> + tmp = get_be32(s->pb);
>>>> + dprintf(s, "num audio chunks %d\n", tmp);
>>>> +
>>>> + url_fskip(s->pb, 6*4);
>>>> + return 0;
>>>> +}
>>> always returns 0 thus doesnt need to return anything yet
>> Changed.
>>
>> Thanks for the review. Updated patch attached.
>
> looks ok
>
Applied then, again thanks for the review.
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no
More information about the ffmpeg-devel
mailing list