“84314fd4740ad73550c76dee4a9578979d84af48”上不存在“README.md”
提交 78aad7f8 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

[media] vivid-tpg: precalculate colorspace/xfer_func combinations

Precalculate all the colorspace/transfer function combinations in order
to easily generate the correct colors.
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 ca5316db
......@@ -61,6 +61,8 @@ enum tpg_color {
extern const struct color tpg_colors[TPG_COLOR_MAX];
extern const unsigned short tpg_rec709_to_linear[255 * 16 + 1];
extern const unsigned short tpg_linear_to_rec709[255 * 16 + 1];
extern const struct color16 tpg_csc_colors[V4L2_COLORSPACE_BT2020 + 1][TPG_COLOR_CSC_BLACK + 1];
extern const struct color16 tpg_csc_colors[V4L2_COLORSPACE_BT2020 + 1]
[V4L2_XFER_FUNC_NONE + 1]
[TPG_COLOR_CSC_BLACK + 1];
#endif
......@@ -706,9 +706,9 @@ static void precalculate_color(struct tpg_data *tpg, int k)
}
if (tpg->pattern == TPG_PAT_CSC_COLORBAR && col <= TPG_COLOR_CSC_BLACK) {
r = tpg_csc_colors[tpg->colorspace][col].r;
g = tpg_csc_colors[tpg->colorspace][col].g;
b = tpg_csc_colors[tpg->colorspace][col].b;
r = tpg_csc_colors[tpg->colorspace][tpg->real_xfer_func][col].r;
g = tpg_csc_colors[tpg->colorspace][tpg->real_xfer_func][col].g;
b = tpg_csc_colors[tpg->colorspace][tpg->real_xfer_func][col].b;
} else {
r <<= 4;
g <<= 4;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部