aboutsummaryrefslogtreecommitdiff
path: root/include/media/tpg
AgeCommit message (Collapse)AuthorFilesLines
2022-06-20media: v4l2-tpg: add HDMI Video Guard Band test patternHans Verkuil1-0/+16
This inserts 4 pixels of the RGB color 0xab55ab at the left hand side of the image. This is only done for 3 or 4 byte RGB pixel formats. The HDMI TMDS encoding of this pixel value equals the Video Guard Band value as defined by HDMI (see section 5.2.2.1 in the HDMI 1.3 Specification) that preceeds the first actual pixel of a video line. If an HDMI receiver doesn't handle this correctly, then it might keep skipping these Video Guard Band patterns and end up with a shorter video line. So this is a nice pattern to test with. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2020-08-26media: v4l2-tpg: Clamp hue in tpg_s_hue()Peilin Ye1-0/+1
Setting `hue` by calling tpg_s_hue() directly is risky, since it does not perform range check. Clamp `hue` to the valid range in tpg_s_hue(). Suggested-by: Hans Verkuil <[email protected]> Signed-off-by: Peilin Ye <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2020-07-19media: tpg: Add function to return colors' order of test imageKaaira Gupta1-0/+1
Currently there is no method to know the correct order of the colors for a test image generated by tpg. Write a function that returns a string of colors' order given a tpg. It returns a NULL pointer in case of test patterns which do not have a well defined colors' order. Hence add a NULL check for text in tpg_gen_text(). [hverkuil: white -> White (for consistency)] Signed-off-by: Kaaira Gupta <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Reviewed-by: Helen Koike <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2020-07-19media: tpg: change char argument to const charKaaira Gupta1-1/+1
Change the argument of type char * to const char * for function tpg_gen_text(). This function should take in a const char * as opposed to char * as it does not make changes to the text. This issue was found while passing the order of colors of tpg generated test image (which is a const char *) to this function. Signed-off-by: Kaaira Gupta <[email protected]> Reviewed-by: Helen Koike <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2018-02-14media: include/(uapi/)media: add SPDX license infoHans Verkuil1-13/+1
Replace the old license information with the corresponding SPDX license for those headers that I authored. Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-12-18media: v4l2-tpg: use __u16 instead of int for struct tpg_rbg_color16Mauro Carvalho Chehab1-1/+1
Despite the struct says "color16", it was actually using 32 bits for each color. Fix it. Suggested-by: Hans Verkuil <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-12-18media: v4l2-tpg.h: rename color structsMauro Carvalho Chehab1-4/+4
The color structs right now are just "color" and "color16". That may lead into conflicts, and don't define precisely what they meant. As those are used by two drivers (vivid and vimc), this is even on a somewhat public header! So rename them to: color -> tpg_rbg_color8 color16 -> tpg_rbg_color16 Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2017-12-18media: v4l2-tpg*.h: move headers to include/media/tpg and merge themMauro Carvalho Chehab1-0/+662
The v4l2-tpg*.h headers are meant to be used only internally by vivid and vimc. There's no sense keeping them together with the V4L2 kAPI headers. Also, one header includes the other as they're meant to be used together. So, merge them. Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>