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

2014-11-15 Thread Michael Niedermayer
On Sat, Nov 15, 2014 at 01:34:29PM +0900, TOYAMA Shin-ichi wrote: > Thank you for discussing about this. > > Michael Niedermayer wrote in <20141114203251.GX32286@nb4> > >> +ctx->has_palette = 0; > >> +ret = avio_open2(&ifo, p, AVIO_FLAG_READ, NULL, NULL); > > > >libavcodec does not depend

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

2014-11-14 Thread TOYAMA Shin-ichi
Thank you for discussing about this. Michael Niedermayer wrote in <20141114203251.GX32286@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 reali

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

2014-11-14 Thread Nicolas George
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

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

2014-11-14 Thread Michael Niedermayer
On Sat, Nov 15, 2014 at 02:25:48AM +0900, TOYAMA Shin-ichi wrote: > Thanks for many comments. > Attached is the forth try. > Please review it. > > -- > TOYAMA Shin-ichi mailto:sh...@wmail.plala.or.jp > doc/decoders.texi |3 ++ > libavcodec/dvdsubdec.c | 58 >

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

2014-11-14 Thread TOYAMA Shin-ichi
Thanks for many comments. Attached is the forth try. Please review it. -- TOYAMA Shin-ichi mailto:sh...@wmail.plala.or.jp 0001-New-option-for-obtaining-global-palette-from-.IFO-fi.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-deve

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

2014-11-13 Thread Clément Bœsch
On Thu, Nov 13, 2014 at 09:39:49PM +0900, TOYAMA Shin-ichi wrote: > Michael Niedermayer wrote in <2014172026.GS32286@nb4> > >> +if ((in = fopen(p, "r")) == NULL) { > > > >why does this not use avio_open2() ? > >this would permit to also use ifo files in other locations than > >local files >

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

2014-11-13 Thread TOYAMA Shin-ichi
Michael Niedermayer wrote in <2014172026.GS32286@nb4> >> +if ((in = fopen(p, "r")) == NULL) { > >why does this not use avio_open2() ? >this would permit to also use ifo files in other locations than >local files Thank you for your suggestion. I revised the patch to use avio_open2(). -- T

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

2014-11-11 Thread Michael Niedermayer
On Tue, Nov 11, 2014 at 11:41:53PM +0900, TOYAMA Shin-ichi wrote: > Nicolas George wrote in <20141110140122.ga22...@phare.normalesup.org> > >Thanks for the patch. See comments below. > > O.K. I've finished to revise the patch. > Please see attached. > > >The update for the documentation is missin

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

2014-11-11 Thread TOYAMA Shin-ichi
Nicolas George wrote in <20141110140122.ga22...@phare.normalesup.org> >Thanks for the patch. See comments below. O.K. I've finished to revise the patch. Please see attached. >The update for the documentation is missing. Added short description to doc/decoders.texi. >> + if (strncmp(p, "ifo:",

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

2014-11-10 Thread Carl Eugen Hoyos
TOYAMA Shin-ichi wmail.plala.or.jp> writes: > # I think it will take long for me to update documents ... Then please send your next patch with a note that you are unable to update the documentation. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-de

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

2014-11-10 Thread TOYAMA Shin-ichi
Nicolas George wrote in <20141110140122.ga22...@phare.normalesup.org> >Thanks for the patch. See comments below. Thank you for your quick reply. I will go through many comments from you and others, and will post revised patch in some time. # I think it will take long for me to update documents .

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

2014-11-10 Thread Hendrik Leppkes
On Mon, Nov 10, 2014 at 3:01 PM, Nicolas George wrote: > > > + > > + /* YCrCb - RGB conversion */ > > + Cr = Cr - 128; > > + Cb = Cb - 128; > > > + R = Y + Cr + (Cr>>2) + (Cr>>3) + (Cr>>5); > > + G = Y - ((Cb>>2) + (Cb>>4) + (Cb>>5)) - ((Cr>>1) + (Cr>>3) + > (Cr>>4) + (Cr

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

2014-11-10 Thread James Darnley
On 2014-11-10 15:01, Nicolas George wrote: >> + fread(&c, 1, 1, in); >> + fread(&Y, 1, 1, in); >> + fread(&Cr, 1, 1, in); >> + fread(&Cb, 1, 1, in); > > You could replace that with a single read into an array; that would not > allow to call the variables R, Cr, Cb, but that d

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

2014-11-10 Thread Nicolas George
Le decadi 20 brumaire, an CCXXIII, TOYAMA Shin-ichi a écrit : > Attached patch enables parsing DVD color palette directly from IFO > file via -palette option using syntax `-palette ifo:filename` > > This is a straightforward implementation of the procedure > described in the following post to ff

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

2014-11-10 Thread TOYAMA Shin-ichi
Attached patch enables parsing DVD color palette directly from IFO file via -palette option using syntax `-palette ifo:filename` This is a straightforward implementation of the procedure described in the following post to ffmpeg-user mailing list. http://ffmpeg.org/pipermail/ffmpeg-user/2013-Se