[MPlayer-dev-eng] [PATCH] introducing -vf pretend (was: removing libmpcodecs/vf_rbg2bgr.c)

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue May 25 01:10:34 CEST 2010


On Tue, May 25, 2010 at 12:55:12AM +0200, Michael Niedermayer wrote:
> 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

Sorry if I was unclear, I never finished it, even compilation is tested
only by chance. Just wanted to dump what I had.



More information about the MPlayer-dev-eng mailing list