Re: [PATCH] imx274: remove composition support, add V4L2_SEL_TGT_CROP_DEFAULT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/12/2020 13:46, Sakari Ailus wrote:
> Hi Hans,
> 
> Thanks for the patch.
> 
> On Mon, Dec 07, 2020 at 12:18:55PM +0100, Hans Verkuil wrote:
>> This driver does not support composition, only cropping.
>> Composition means that the sensor can output e.g. 1920x1080,
>> but can compose a cropped 1280x720 image in the middle of the
>> 1920x1080 canvas, filling in the unused area with a background
>> color.
> 
> That's how this would work on V4L2 video nodes...
> 
>>
>> That's not supported at all. So drop the bogus composition support.
> 
> But this is a sub-device driver. On sub-devices the COMPOSE target is used
> for configuring scaling, binning and sub-sampling. I don't know about the
> capabilities of this particular driver but the code
> (__imx274_change_compose function in particular) looks very much such that
> it does support binning.
> 

That should be done via set_fmt. There you select the output width and height.

So if set_fmt sets 1920x1080, and the crop is 960x540, then you scale (or
do binning/sub-sampling). Compose means composing the image into a larger
canvas. For this driver the compose rectangle is always equal to the
format, so set_selection(COMPOSE) is identical to set_fmt().

If it was real composition, then there would have to be a try_compose as
well, just as there is a try_crop. Instead set_selection(COMPOSE) fills in
try_fmt. Clearly wrong.

Regards,

	Hans



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux