HAL_PIXEL_FORMAT_CUSTOM_MAX
};
-// Colorspace Gamuts
+// Gamut (colorspace range)
enum {
HAL_PIXEL_GAMUT_DEFAULT = 0,
// Values range 0-255
- HAL_PIXEL_GAMUT_JFIF_8,
+ HAL_PIXEL_GAMUT_WIDE_8,
// Values range 16-235
- HAL_PIXEL_GAMUT_BT601_8
+ HAL_PIXEL_GAMUT_NARROW_8
+};
+
+// Chromaticities (colorspace parameters)
+enum {
+ HAL_PIXEL_CHROMA_DEFAULT = 0,
+ // BT.601 "Standard Definition" color space
+ HAL_PIXEL_CHROMA_BT601_8,
+ // BT.709 "High Definition" color space
+ HAL_PIXEL_CHROMA_BT709_8
};
struct ADDRS {
int stride;
int vstride;
int gamut;
+ int chroma;
// FIXME: the attributes below should be out-of-line
void *base;
#ifdef __cplusplus
static const int sNumFds = 3;
- static const int sNumInts = 16;
+ static const int sNumInts = 17;
static const int sMagic = 0x3141592;
int h, int format, int stride, int vstride) :
fd(fd), fd1(-1), fd2(-1), magic(sMagic), flags(flags), size(size),
offset(0), format(format), width(w), height(h), stride(stride),
- vstride(vstride), gamut(0), base(0), handle(0), handle1(0), handle2(0)
+ vstride(vstride), gamut(0), chroma(0), base(0), handle(0), handle1(0),
+ handle2(0)
{
version = sizeof(native_handle);
numInts = sNumInts + 2;
int h, int format, int stride, int vstride) :
fd(fd), fd1(fd1), fd2(-1), magic(sMagic), flags(flags), size(size),
offset(0), format(format), width(w), height(h), stride(stride),
- vstride(vstride), gamut(0), base(0), base1(0), base2(0), handle(0),
- handle1(0), handle2(0)
+ vstride(vstride), gamut(0), chroma(0), base(0), base1(0), base2(0),
+ handle(0), handle1(0), handle2(0)
{
version = sizeof(native_handle);
numInts = sNumInts + 1;
int h, int format, int stride, int vstride) :
fd(fd), fd1(fd1), fd2(fd2), magic(sMagic), flags(flags), size(size),
offset(0), format(format), width(w), height(h), stride(stride),
- vstride(vstride), gamut(0), base(0), base1(0), base2(0), handle(0),
- handle1(0), handle2(0)
+ vstride(vstride), gamut(0), chroma(0), base(0), base1(0), base2(0),
+ handle(0), handle1(0), handle2(0)
{
version = sizeof(native_handle);
numInts = sNumInts;