mbox series

[0/6] media: ov5640: JPEG and test pattern improvements

Message ID 20190118085206.2598-1-wens@csie.org (mailing list archive)
Headers show
Series media: ov5640: JPEG and test pattern improvements | expand

Message

Chen-Yu Tsai Jan. 18, 2019, 8:52 a.m. UTC
Hi everyone,

This series improves the JPEG compression output mode handling of the
OV5640 sensor, and adds some more test patterns for users to use.

The JPEG compression output mode of the sensor works, but the data
framing is incorrect. Additional registers need to be set to configure
the framing / timing of the data. This was found when adding support for
JPEG_1X8 for the sun6i CSI sensor interface driver (improvements which
I'll send in a separate series). Because the default timings might not
be the same as the resolution timings, the capture device would either
truncate or pad each line as it is captured. This corrupts the JPEG
data. With the timings fixed, the captured data is once again a
continuous JPEG file.

While using the test pattern for testing, I found that the test pattern
was superimposed on top of an actual captured image. This made it
slightly harder to compare results, as the underlying image would change
with scenery and static from the sensor. Disabling the transparency
feature makes the result a "true" test pattern.

I also added the "rolling bar" variant of the color bar test pattern,
which is much better for testing video captures, as the image changes
in a predictable way, instead of being static.

Finally, another test pattern, "color squares", along with a rolling bar
variant, were added as an alternative.

Patch 1 is some simple code movement, in preparation for the next patch.

Patch 2 adds definitions for the test pattern configuration register, to
be used in the next patch.

Patch 3 disables the transparency feature of the test pattern generator.

Patch 4 adds more test pattern options.

Patch 5 fixes the JPEG compression output data framing.

Patch 6 consolidates the JPEG compression mode setting in one place,
instead of being listed in the register dumps.

Please have a look.


Regards
ChenYu


Chen-Yu Tsai (6):
  media: ov5640: Move test_pattern_menu before
    ov5640_set_ctrl_test_pattern
  media: ov5640: Add register definition for test pattern register
  media: ov5640: Disable transparent feature for test pattern
  media: ov5640: Add three more test patterns
  media: ov5640: Set JPEG output timings when outputting JPEG data
  media: ov5640: Consolidate JPEG compression mode setting

 drivers/media/i2c/ov5640.c | 95 ++++++++++++++++++++++++++++++--------
 1 file changed, 77 insertions(+), 18 deletions(-)