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

Calvin Walton calvin.walton at gmail.com
Thu Mar 6 04:17:28 CET 2008


On Thu, 2008-03-06 at 00:47 +0100, Michael Niedermayer wrote:
> 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:
> > > 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.

Guessing missing samples has to be done in lots of cases in swscale,
take a look at a common case like I420 => RGB32: not only do the colour
values need to be converted, but the U and V planes have to be
interpolated up to full picture size first.

Swscale is (at least in part) a scaler, and scaling implies
interpolating missing information :)

-- 
Calvin Walton <calvin.walton at gmail.com>




More information about the MPlayer-dev-eng mailing list