[MPlayer-dev-eng] [PATCH] introducing -vf pretend (was: removing libmpcodecs/vf_rbg2bgr.c)
Michael Niedermayer
michaelni at gmx.at
Tue May 25 00:55:12 CEST 2010
On Tue, May 25, 2010 at 12:28:08AM +0200, Reimar Döffinger wrote:
> On Mon, May 24, 2010 at 11:30:51PM +0200, Attila Kinali wrote:
> > Moin,
> >
> > On Fri, 14 May 2010 00:40:16 +0200
> > Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
> >
> > > On Thu, May 13, 2010 at 09:54:28PM +0200, Attila Kinali wrote:
> > > > As with -vf yuy2, -vf rgb2bgr seems to be superceeded by sws a long
> > > > time ago.
> > >
> > > Unfortunately no, there is no substitute for the "swap" option.
> > > Should be trivial to implement a filter to do that (it does not
> > > need to do any conversion or anything at all, just change the format),
> > > but it is something I needed only reasonably (for a device with buggy
> > > framebuffer driver).
> >
> > Ok, here is a patch that introduces a pretend filter, that does
> > (almost) exactly what the swap option did. It is a bit more general
> > as it accepts any format parameter, not just from the RGB/BGR class.
> >
> > To apply the patch, run first
> > `svn cp libmpcodecs/vf_format.c libmpcodecs/vf_pretend.c`
> > (yes, i was lazy).
>
> Hmm... Surprised this actually works... I was working on extending
> -vf format to do something like this but expected it to not work...
> The "problem" I have with it is that
> > +The user is responsible that input and output formats are structurally
> > +similar. Otherwise all odd effects can occur.
> means you actually can only use it with a format filter in front, otherwise
> you can't know what will happen.
> Another minor annoyance is that it won't automatically select the "best" RGB/BGR
> format, however I think it's reasonable to ignore that.
> Maybe you could have a look at what I did for -vf format and see if you think
> this might be a better solution (assuming we can get it to work)?
your code doesnt override config() attilas does, that looks wrong
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Many things microsoft did are stupid, but not doing something just because
microsoft did it is even more stupid. If everything ms did were stupid they
would be bankrupt already.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100525/f4f8abdb/attachment.pgp>
More information about the MPlayer-dev-eng
mailing list