mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
video-format: add range extension to BGR_10XE format
This commit is contained in:
parent
cecb900704
commit
0f64126919
1 changed files with 12 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue