[MPlayer-dev-eng] [PATCH] add 8 bit Bayer format and filter

Michael Niedermayer michaelni at gmx.at
Thu Mar 6 00:47:34 CET 2008


On Mon, Mar 03, 2008 at 01:40:40PM +0100, Reimar Döffinger wrote:
> On Mon, Mar 03, 2008 at 01:10:20PM +0100, Nico Sabbi wrote:
> > On Monday 03 March 2008 13:03:08 Dominik 'Rathann' Mierzejewski wrote:
> > > On Monday, 03 March 2008 at 12:06, Guennadi Liakhovetski wrote:
> > > > Hi all
> > > >
> > > > This patch implements support for a new image format - 8 bit
> > > > Bayer (BA81 / BYR1). To actually be able to represent the video a
> > > > new filter has been written. In tests a command like
> > > >
> > > > mplayer -v tv:// -tv \
> > > > driver=v4l2:input=0:width=640:height=480:device=/dev/video0:outfm
> > > >t=ba81 \ -vf ba81 -vo fbdev
> > > >
> > > > has been used.
> > >
> > > I don't know if a new video filter is the correct solution.
> > >
> > > > The patch also fixes a couple of potential NULL pointer
> > > > dereferences.
> > >
> > > Don't mix new features with bugfixes in one patch. Partial review
> > > follows.
> > >
> > 
> > new decoders belong to libavcodec
> 
> If it was a decoder, though it is more a colourspace converter and as
> such would be more suitable in libswscale. Either way a filter is the
> worst solution possible, and both of the better solutions should be
> submitted to FFmpeg...

Yes, also iam not completely sure if it fits better into pixelformat or
compressed stream.
What it technically is, is the raw data from a color CCD. It is in that
form only useable with a crop filter. Not even contrast or saturation
correction could be applied to it without converting it to a normal
pixel format.
Also the convertion to a normal pixel format is non trivial and non
linear and as such an implementation in swscale would be quite seperate from
everything else.
There are also dozens of different algorithms to do this convertion and
they result in very different output.
Converting it is pretty much identical to guessing missing samples.

The back convertion though is trivial and a matter of 2 lines of C
code which just drop 2/3 of the samples so that only of of RGB is
left in each position.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is not what we do, but why we do it that matters.
-------------- 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/20080306/6131113c/attachment.pgp>


More information about the MPlayer-dev-eng mailing list