mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:36:20 +00:00
video-format: fix range extension of UYVP
We need to shift the top 6 bits to the lower 6 bits
This commit is contained in:
parent
3f44aaf810
commit
1f14077b41
1 changed files with 4 additions and 4 deletions
|
@ -1235,10 +1235,10 @@ unpack_UYVP (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
|
||||||
y1 = (((s[(i / 2) * 5 + 3] & 0x03) << 8) | s[(i / 2) * 5 + 4]) << 6;
|
y1 = (((s[(i / 2) * 5 + 3] & 0x03) << 8) | s[(i / 2) * 5 + 4]) << 6;
|
||||||
|
|
||||||
if (!(flags & GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE)) {
|
if (!(flags & GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE)) {
|
||||||
y0 |= (y0 >> 4);
|
y0 |= (y0 >> 10);
|
||||||
y1 |= (y1 >> 4);
|
y1 |= (y1 >> 10);
|
||||||
u0 |= (u0 >> 4);
|
u0 |= (u0 >> 10);
|
||||||
v0 |= (v0 >> 4);
|
v0 |= (v0 >> 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
d[i * 4 + 0] = 0xffff;
|
d[i * 4 + 0] = 0xffff;
|
||||||
|
|
Loading…
Reference in a new issue