[MPlayer-dev-eng] [PATCH] color SPU with ass (EOSD)
Ötvös Attila
oattila at chello.hu
Tue Dec 4 11:22:51 CET 2007
Ezzel a dátummal: Tuesday 04 December 2007 05.12.23 Ulion ezt írta:
Hi Ulion!
> 2007/12/4, Ötvös Attila <oattila at chello.hu>:
> > 2007. december 3. 13.32 dátummal Ulion ezt írta:
> > Hi Ulion!
> >
> > > I tested with your patch.
> > >
> > > spudec.c:1334: warning: unused variable 'i'
> >
> > I fixed.
> >
> > > In second patch, when first happens:
> > > + h = FFMIN(bitmap_h,dmpi->h - dst_y);
> > > + w = FFMIN(bitmap_w,dmpi->w - dst_x);
> > > Beginning should be tabs instead of spaces.
> >
> > I corrected.
> >
> > > Functions you added parameters dxs, dys, you should document them if
> > > original functions have comments.
> >
> > I added.
> >
> > > And at such like this line-break places:
> > > +static void ass_eosd_generator(double pts, unsigned int dxs, unsigned
> > > int dys, + mp_eosd_images_t* dst, void* data)
> >
> > I corrected.
>
> There are other places like this or tab/space not match context, I
> will metion the line number in your patch file:
> Second patch:
> line 47, line 94, line 168, line 244, line 272 (also comments for
> dxs/dys), line 292
> Third patch:
> line 260 (if you'd like to align the parameters), line 278, line 287,
> line 326 (if you'd like to)
> , line 374 and following part codes need fix indent. line 666, u and v
> are reverted.
I corrected.
> About order of u and v, check vobsub's source read ifo file part:
>
> uchar y, u, v, tmp;
> ifo->Read(&tmp, 1);
> ifo->Read(&y, 1);
> ifo->Read(&u, 1);
> ifo->Read(&v, 1);
>
> y = (y-16)*255/219;
> m_pgc[i].pal[j].rgbRed = (uchar)min(max(1.0*y + 1.4022*(u-128), 0),
> 255); m_pgc[i].pal[j].rgbGreen = (uchar)min(max(1.0*y - 0.3456*(u-128) -
> 0.7145*(v-128), 0), 255);
> m_pgc[i].pal[j].rgbBlue = (uchar)min(max(1.0*y + 1.7710*(v-128), 0) ,
> 255);
>
> From these code, you will known the original y is in [16,235] range,
> and order of y,u,v is y,u,v in raw palette of .ifo file. spu use raw
> order of palette from dvd's .ifo, then it should also be y,u,v.
> The reason for you changed the order of u and v probably be the wrong
> caculated u and v by the wrong formula in vobsub.c and demux_mkv.c. I
> will fix the wrong formula soon, so you should switch u and v back in
> their original order.
I fixed and add swap u,v if format of dest image is YV12.
> And can eosd_register_number be replaced by some shorten words such
> like eosd_id, eosd_regid, etc? This will save some line-break for you.
I changed to eosd_regid
> > > You should make breaked line aligned with the first parameter.
> > >
> > > And when continue play more than one videos with -ass, will crash in
> > > filter_video, that should be fixed.
> >
> > I fixed (add eosd_unregister() to vf_ass and vf_vo). I hope to work.
> >
> > Please try out.
>
> Won't crash again, but should eosd_reset also be called somewhere?
I don't know.
Best regard.
Attila
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ass-unregister_and_scaler.patch
Type: text/x-diff
Size: 9348 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071204/f4270f2e/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: color-spu-with-ass.patch
Type: text/x-diff
Size: 26769 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071204/f4270f2e/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ass-fmt_and_gen-eosd.patch
Type: text/x-diff
Size: 41434 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20071204/f4270f2e/attachment-0002.patch>
More information about the MPlayer-dev-eng
mailing list