Dne 2.5.2017 v 16:43 Robert Jarzmik napsal(a):
> Petr Cvek <[email protected]> writes:
>
>> During the transfer from the soc_camera a test in pxa_mbus_image_size()
>> got removed. Without it any PXA_MBUS_LAYOUT_PACKED format causes either
>> the return of a wrong value (PXA_MBUS_PACKING_2X8_PADHI doubles
>> the correct value) or EINVAL (PXA_MBUS_PACKING_NONE and
>> PXA_MBUS_PACKING_EXTEND16). This was observed in an error from the ffmpeg
>> (for some of the YUYV subvariants).
>>
>> This patch re-adds the same test as in soc_camera version.
>>
>> Signed-off-by: Petr Cvek <[email protected]>
> Did you test that with YUV422P format ?
> If yes, then you can have my ack.
>
I was trying to add RGB888 and then I've noticed that "YVYU 16bit" formats (and
permutation) and "Bayer 12" formats have incorrect values in the
bits_per_sample field. I didn't notice it in the patch creation, because it
doesn't affect the computations of the image size. And later in the code it
just defaults to 8.
A comment for a switch in the pxa_camera_setup_cicr() function:
"Datawidth is now guaranteed to be equal to one of the three values..."
Values are 10, 9 and 8 and they describe a bit-vector length of the interface
for a sensor.
So I will include a fix for the patchset v2 for this. I will test the YUYV
formats, but my sensor does not support the Bayer 12 formats.
In the addition I propose a patch for an enum type (or define) of the interface
configuration field. Something like:
#define PXA_MBUS_BUSWIDTH_8 8
#define PXA_MBUS_BUSWIDTH_9 9
#define PXA_MBUS_BUSWIDTH_10 10
and a patch for something like:
s/bits_per_sample/buswidth/g
and a formatting patch for excessive tabulators in the mbus_fmt structure
initialization ;-).
Petr