Hello,

I am writing a driver for the sensor MT9D131.  This device supports digital 
zoom and JPEG compression.

Although I am writing it for my company's internal purposes, it will be made 
open-source, so I would like to keep the API as portable as possible.

The hardware reads AxB sensor pixels from its array, resamples them to CxD 
image pixels, and then compresses them to ExF bytes.

The subdevice driver sets size AxB to the value it receives from 
v4l2_subdev_video_ops.s_crop().

To enable compression then v4l2_subdev_video_ops.s_mbus_fmt() is called with 
fmt->code=V4L2_MBUS_FMT_JPEG_1X8.

fmt->width and fmt->height then ought to specify the size of the compressed 
image ExF, that is, the size specified is the size in the format specified (the 
number of JPEG_1X8), not the size it would be in a raw format.

This allows the bridge driver to be compression agnostic.  It gets told how 
many bytes to allocate per buffer and it reads that many bytes.  It doesn't 
have to understand that the number of bytes isn't directly related to the 
number of pixels.

So how does the user tell the driver what size image to capture before 
compression, CxD?

(or alternatively, if you disagree and think CxD should be specified by 
s_fmt(), then how does the user specify ExF?)

Regards,
Tom

--
Mr T. Vajzovic
Software Engineer
Infrared Integrated Systems Ltd
Visit us at www.irisys.co.uk
Disclaimer: This e-mail message is confidential and for use by the addressee 
only. If the message is received by anyone other than the addressee, please 
return the message to the sender by replying to it and then delete the original 
message and the sent message from your computer. Infrared Integrated Systems 
Limited Park Circle Tithe Barn Way Swan Valley Northampton NN4 9BG Registration 
Number: 3186364.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to