video-format: add range extension to BGR_10XE format

This commit is contained in:
Wim Taymans 2014-11-06 09:38:06 +01:00
parent cecb900704
commit 0f64126919

View file

@ -1667,6 +1667,12 @@ unpack_GBR_10LE (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
B = GST_READ_UINT16_LE (srcB + i) << 6;
R = GST_READ_UINT16_LE (srcR + i) << 6;
if (!(flags & GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE)) {
R |= (R >> 10);
G |= (G >> 10);
B |= (B >> 10);
}
d[i * 4 + 0] = 0xffff;
d[i * 4 + 1] = R;
d[i * 4 + 2] = G;
@ -1715,6 +1721,12 @@ unpack_GBR_10BE (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
B = GST_READ_UINT16_BE (srcB + i) << 6;
R = GST_READ_UINT16_BE (srcR + i) << 6;
if (!(flags & GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE)) {
R |= (R >> 10);
G |= (G >> 10);
B |= (B >> 10);
}
d[i * 4 + 0] = 0xffff;
d[i * 4 + 1] = R;
d[i * 4 + 2] = G;