[FFmpeg-devel] [PATCH] Enables parsing DVD color palette directly from IFO file

TOYAMA Shin-ichi shin1 at wmail.plala.or.jp
Sat Nov 15 05:34:29 CET 2014


Thank you for discussing about this.

Michael Niedermayer wrote in <20141114203251.GX32286 at nb4>
>> +    ctx->has_palette = 0;
>> +    ret = avio_open2(&ifo, p, AVIO_FLAG_READ, NULL, NULL);
>
>libavcodec does not depend on libavformat, thus libavcodec cannot
>use avio_* directly. I should have realized/mentioned this when
>suggesting avio

O.K. 
I understood using avio-* stuffs breaks independency of 
libavcodec. Thanks for pointing it out.

Nicolas George wrote in <20141114224120.GA3820 at phare.normalesup.org>
>Le quartidi 24 brumaire, an CCXXIII, Michael Niedermayer a écrit :
>> libavformat OTOH could read the IFO file with avio_open2/avio_read
>> into extradata or some newly added ifo specific side data
>> and dvdsubdec.c could then parse the palette out of that.
>
>That would work. It can be even reasonably simple: dvdsubdec already accepts
>extradata with the Vobsub IDX syntax (the same way it is stored as codec
>private data in Matroska). Unless I am mistaken, it would suffice to use a
>BPrint buffer to write "palette: XXXXXX,XXXXXX..." and use
>avpriv_bprint_to_extradata() afterwards.
>
>OTOH, if Shin-ichi is not motivated to change the patch once again, I
>believe the version with fopen() is acceptable if marked experimental /
>temporary in the docs.

I hope I could do this in more proper way. But I'm quite new to 
inside ffmepg and my skill is immature. In addition, I have not 
enough spare time for this currently. I would like to learn more 
inside ffmpeg and look into how to use extradata method when I 
have time.

Anyway,  I revised the last patch using fopen() again and also 
marked it experimental in `decoders.texi'. Please review it and 
merge it if acceptable.

I really appreceatate many help from you all. Thanks!

-- 
TOYAMA Shin-ichi mailto:shin1 at wmail.plala.or.jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-New-option-for-obtaining-global-palette-from-.IFO-fi.patch
Type: application/octet-stream
Size: 4882 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141115/4b70692c/attachment.obj>


More information about the ffmpeg-devel mailing list