[FFmpeg-devel] [PATCH] dnxhd parser and raw de/muxer

Baptiste Coudurier baptiste.coudurier
Sat Sep 20 01:52:59 CEST 2008


Hi Stuart,

Stuart Cunningham wrote:
> On Mon, 2008-09-15 at 20:40 +0200, Michael Niedermayer wrote:
>> On Mon, Sep 15, 2008 at 10:58:06AM -0700, Baptiste Coudurier wrote:
>>> Hi,
>>>
>>> Michael Niedermayer wrote:
>>>> On Mon, Sep 08, 2008 at 02:54:14PM -0700, Baptiste Coudurier wrote:
>>>>> Hi,
>>>>>
>>>>> $subject, to use dnxhd raw essences.
>>>> [...]
>>>>> Index: libavformat/raw.c
>>>>> ===================================================================
>>>>> --- libavformat/raw.c	(revision 15275)
>>>>> +++ libavformat/raw.c	(working copy)
>>>>> @@ -487,6 +487,15 @@
>>>>>  }
>>>>>  #endif
>>>>>  
>>>>> +static int dnxhd_probe(AVProbeData *p)
>>>>> +{
>>>>> +    static const uint8_t header[] = {0x00,0x00,0x02,0x80,0x01};
>>>>> +    if (!memcmp(p->buf, header, 5))
>>>>> +        return AVPROBE_SCORE_MAX;
>>>>> +    else
>>>>> +        return 0;
>>>>> +}
>>>> Can more than that be used for a more reliable probe?
>>>> I mean yes its 5 bytes but they are all 0 except 3 bits, thus this might
>>>> be more common in real files than expected in random data.
> [...]
>>> Besides, after these 5 bytes, I'd need to go far to fetch interesting
>>> data like cid, Im not sure.
>> well its not that important, we can always leave it until someone actually
>> finds some misdetection. I wasnt aware that these 5 bytes where the only
>> easy checkable thing ...
>>
> There's the 32bit end-of-frame marker 0x600DC0DE but that's probably not
> helpful here, but might be useful in the dnxhd_find_frame_end() function
> of libavcodec/dnxhd_parser.c (also part of the patch).
> 

Indeed, it needs special case for the first frame however, let's try
this way first and if any error happens, I'll cook something up.

Parser updated.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Smartjog USA Inc.                                http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dnxhd_parser.patch
Type: text/x-diff
Size: 5536 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080919/e8d08d50/attachment.patch>



More information about the ffmpeg-devel mailing list