.4cc format Re: libcamera, Librem 5 and autofocus
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed May 7 23:48:05 CEST 2025
Hi Pavel,
On Sat, May 03, 2025 at 04:35:04PM +0200, Pavel Machek wrote:
> Hi!
>
> > > > On a side note, I want a universal container format to store images :-)
> > >
> > > I thought about this and did some research, and actually, there seems
> > > to be one.
> > >
> > > Would already estabilished binary format with width, height and fourcc
> > > be suitable? :-). Downside is, it has "Microsoft" written over it; but
> > > it is supported by gimp and does not look completely crazy.
> > >
> > > pavel at duo:/data/l$ file /tmp/delme.dds
> > > /tmp/delme.dds: Microsoft DirectDraw Surface (DDS): 1920 x 1080, 32-bit color, ABGR8888
> > > pavel at duo:/data/l$
> > >
> > > https://learn.microsoft.com/en-us/windows/win32/direct3ddds/dx-graphics-dds-pguide
> >
> > That format seems to be designed to store textures. As far as I
> > understand, it's similar in purpose to https://www.khronos.org/ktx/.
> > Neither support storing raw bayer data. We could extend the file
> > formats, but then they wouldn't be standard anymore. If we need
> > extensions, I'd rather consider KTX.
>
> I took a brief look and KTX does not seem suitable.
Could you explain why it isn't suitable ?
> I could create simple format (128-bytes fixed size header), containing
> width, height, stride, fourcc (and probably camera type and
> exposure/focus data and timestamp)... and then simple tools to view
> the pictures (and probably turn them into video).
>
> Would code to write such format be acceptable?
If the best solution is really to develop an entirely new and custom
format, it will need to be designed carefully. We would need to create
an ecosystem of tools around it, and we therefore won't be able to
afford skipping the design stage and change things later in an
incompatible way.
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list