From 74fdcb2ee1786a92584e89c91006e449813527ce Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 28 Apr 2015 08:49:09 -0300 Subject: [media] videodev2.h: add support for transfer functions In the past the transfer function was implied by the colorspace. However, it is an independent entity in its own right. Add support for explicitly choosing the transfer function. This change will allow us to represent linear RGB (as is used by openGL), and it will make it easier to work with decoded video material since most codecs store the transfer function as a separate property as well. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-mediabus.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/media/v4l2-mediabus.h') diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h index 38d960d8dccd..73069e4c2796 100644 --- a/include/media/v4l2-mediabus.h +++ b/include/media/v4l2-mediabus.h @@ -96,6 +96,7 @@ static inline void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt, pix_fmt->colorspace = mbus_fmt->colorspace; pix_fmt->ycbcr_enc = mbus_fmt->ycbcr_enc; pix_fmt->quantization = mbus_fmt->quantization; + pix_fmt->xfer_func = mbus_fmt->xfer_func; } static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt, @@ -108,6 +109,7 @@ static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt, mbus_fmt->colorspace = pix_fmt->colorspace; mbus_fmt->ycbcr_enc = pix_fmt->ycbcr_enc; mbus_fmt->quantization = pix_fmt->quantization; + mbus_fmt->xfer_func = pix_fmt->xfer_func; mbus_fmt->code = code; } -- cgit