[FFmpeg-devel] [PATCH] improve DV probe score

Baptiste Coudurier baptiste.coudurier
Tue Sep 15 07:22:34 CEST 2009


On 09/14/2009 06:54 PM, Michael Niedermayer wrote:
> On Mon, Sep 14, 2009 at 03:38:53PM +0200, Reimar D?ffinger wrote:
>> On Mon, Sep 14, 2009 at 03:06:06PM +0200, Michael Niedermayer wrote:
>>> On Mon, Sep 14, 2009 at 09:59:31AM +0200, Reimar D?ffinger wrote:
> [...]
>>> that said, while i disagree with how you solve this, i
>>> do not object to the patch, it is an improvment to what we have now
>>> i just think it can be done quite a bit more solidly, even a check
>>> of the number of startcodes per byte&&  the matches being>  3 would
>>> be better than what its now, also as you return a score>0 for a single
>>> match, am i missing something or shouldnt a single valid frame have at
>>> least 10 matches? it seems requireing 3 before a non 0 score is returned
>>> seems quite reasonable to me
>>
>> How did you come up with the number 10? These checks are exactly like
>> that used to find the start of the frame, so there should be at most 2
>> matches per frame, and we have a sample with only one match per frame
>
> static void dv_format_frame(DVVideoContext* c, uint8_t* buf)
> {
>      int chan, i, j, k;
>
>      for (chan = 0; chan<  c->sys->n_difchan; chan++) {
>          for (i = 0; i<  c->sys->difseg_size; i++) {
> [...]
>              buf += dv_write_dif_id(dv_sect_header, chan, i, 0, buf);
>              buf += dv_write_pack((c->sys->dsf ? dv_header625 : dv_header525), c, buf);
>
> difseg_size being at least 10 in dvdata.h
>
>
> PS: why are some functions in dvdata.h? iam asking because it drives me
> nuts having to hunt them down when RTFS ...
>

I think to avoid code duplication between avformat and avcodec.
Code is still in both .o though.

-- 
Baptiste COUDURIER
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer                                  http://www.ffmpeg.org



More information about the ffmpeg-devel mailing list