Hi Everyone On Tue, Mar 17, 2026 at 04:13:33PM +0100, Lynne via ffmpeg-devel wrote: > On 17/03/2026 14:54, Michael Niedermayer via ffmpeg-devel wrote: > > Hi everyone > > > > STF is funding FFv1 Bayer video support. > > > > The FFv1 specification has no Bayer support, so obviously part of this task > > has to be to design the bitstream and compression algorithm and or how to > > map bayer onto existing non bayer FFv1. > > > > If you know an algorithm that should be considered, then please reply > > > > Similarly if you know research work that compares bayer compression > > technologies > > please reply too > > I wrote the proposal.
lets take a step back and look at this again
and break this problem down into discrete steps
to better see where we can maybe improve it
What the PR and many of these algorithms do is basically
a RGB -> YCbCr or similar decorrelation transform
But this needs the R G and B to be at the same spatial location
If we ignore this
we have
b[x,y] -= g[x,y];
r[x,y] -= g[x,y];
g[x,y] += (b[x,y] * by_coef + r[x,y] * ry_coef) >> 2;
And thats perfect, except that annoyingly Bayer CFA is missing 2/3 of the
samples
so what we really are doing is this:
b[x,y] -= interpol(g, x, y);
r[x,y] -= interpol(g, x, y);
g[x,y] += (interpol(b, x, y) * by_coef + interpol(r, x, y) * ry_coef) >> 2;
and PR22528 uses nearest neighbor for interpol()
so the obvious question is what happens if interpol() uses a more
advanaced method of interpolation ? (bilinear, directional with direction
stored in the bitstream,
optical flow, ...)
Again these are ideas, we do not have to do any of this in what we implement in
FFv1
But we should try to understand what choices there are and what their
hard nummerical cost and hard nummerical benefit is
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
