Skip to content

media: ov5640: JPEG and test pattern improvements

Chen-Yu Tsai linux-media lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6media: ov5640: Move test_pattern_menu before ov5640_set_ctrl_test_patterndrivers/media/i2c/ov5640.c+5 -50 replies
2/6media: ov5640: Add register definition for test pattern registerdrivers/media/i2c/ov5640.c+22 -20 replies
3/6media: ov5640: Disable transparent feature for test patterndrivers/media/i2c/ov5640.c+1 -20 replies
4/6media: ov5640: Add three more test patternsdrivers/media/i2c/ov5640.c+7 -00 replies
5/6media: ov5640: Set JPEG output timings when outputting JPEG datadrivers/media/i2c/ov5640.c+21 -00 replies
6/6media: ov5640: Consolidate JPEG compression mode settingdrivers/media/i2c/ov5640.c+23 -113 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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(-)
Signature · 1 line
2.20.1