[media] vivid: Add support for HSV encoding

Support HSV encoding. Most of the logic is replicated from ycbcr_enc.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
このコミットが含まれているのは:
Ricardo Ribalda Delgado
2016-07-18 09:16:15 -03:00
committed by Mauro Carvalho Chehab
コミット 429175e41f
7個のファイルの変更76行の追加10行の削除

ファイルの表示

@@ -130,6 +130,7 @@ struct tpg_data {
u32 colorspace;
u32 xfer_func;
u32 ycbcr_enc;
u32 hsv_enc;
/*
* Stores the actual transfer function, i.e. will never be
* V4L2_XFER_FUNC_DEFAULT.
@@ -139,6 +140,7 @@ struct tpg_data {
* Stores the actual Y'CbCr encoding, i.e. will never be
* V4L2_YCBCR_ENC_DEFAULT.
*/
u32 real_hsv_enc;
u32 real_ycbcr_enc;
u32 quantization;
/*
@@ -341,6 +343,19 @@ static inline u32 tpg_g_ycbcr_enc(const struct tpg_data *tpg)
return tpg->ycbcr_enc;
}
static inline void tpg_s_hsv_enc(struct tpg_data *tpg, u32 hsv_enc)
{
if (tpg->hsv_enc == hsv_enc)
return;
tpg->hsv_enc = hsv_enc;
tpg->recalc_colors = true;
}
static inline u32 tpg_g_hsv_enc(const struct tpg_data *tpg)
{
return tpg->hsv_enc;
}
static inline void tpg_s_xfer_func(struct tpg_data *tpg, u32 xfer_func)
{
if (tpg->xfer_func == xfer_func)