Re: soc-camera jpeg support?

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

 



On Mon, 17 Jan 2011, Qing Xu wrote:

> Hi,
> 
> Many of our sensors support directly outputting JPEG data to camera 
> controller, do you feel it's reasonable to add jpeg support into 
> soc-camera? As it seems that there is no define in v4l2-mediabus.h which 
> is suitable for our case.

In principle I have nothing against this, but, I'm afraid, it is not quite 
that simple. I haven't worked with such sensors myself, but, AFAIU, the 
JPEG image format doesn't have fixed bytes-per-line and bytes-per-frame 
values. If you add it like you propose, this would mean, that it just 
delivers "normal" 8 bits per pixel images. OTOH, soc_mbus_bytes_per_line() 
would just return -EINVAL for your JPEG format, so, unsupporting drivers 
would just error out, which is not all that bad. When the first driver 
decides to support JPEG, they will have to handle that error. But maybe 
we'll want to return a special error code for it.

But, in fact, that is in a way my problem with your patches: you propose 
extensions to generic code without showing how this is going to be used in 
specific drivers. Could you show us your host driver, please? I don't 
think this is still the pxa27x driver, is it?

Thanks
Guennadi

> 
> Such as:
> --- a/drivers/media/video/soc_mediabus.c
> +++ b/drivers/media/video/soc_mediabus.c
> @@ -130,6 +130,13 @@ static const struct soc_mbus_pixelfmt mbus_fmt[] = {
>                 .packing                = SOC_MBUS_PACKING_2X8_PADLO,
>                 .order                  = SOC_MBUS_ORDER_BE,
>         },
> +       [MBUS_IDX(JPEG_1X8)] = {
> +               .fourcc                 = V4L2_PIX_FMT_JPEG,
> +               .name                   = "JPEG",
> +               .bits_per_sample        = 8,
> +               .packing                = SOC_MBUS_PACKING_NONE,
> +               .order                  = SOC_MBUS_ORDER_LE,
> +       },
>  };
> 
> --- a/include/media/v4l2-mediabus.h
> +++ b/include/media/v4l2-mediabus.h
> @@ -41,6 +41,7 @@ enum v4l2_mbus_pixelcode {
>         V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE,
>         V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE,
>         V4L2_MBUS_FMT_SGRBG8_1X8,
> +       V4L2_MBUS_FMT_JPEG_1X8,
>  };
> 
> Any ideas will be appreciated!
> Thanks!
> Qing Xu
> 
> Email: qingx@xxxxxxxxxxx
> Application Processor Systems Engineering,
> Marvell Technology Group Ltd.
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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