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

Rich Felker dalias at aerifal.cx
Thu Mar 6 05:09:48 CET 2008


On Wed, Mar 05, 2008 at 10:17:28PM -0500, Calvin Walton wrote:
> 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 :)

I agree. There's nothing nonlinear about this interpolation. All it
requires is the right filter coefficients.

Rich



More information about the MPlayer-dev-eng mailing list