Skip to content

Commit 61ad470

Browse files
author
jianfeng.zheng
committed
framereader: fix read_frame_I010
Signed-off-by: jianfeng.zheng <jianfeng.zheng@mthreads.com>
1 parent 5d9ed4f commit 61ad470

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/framereader.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ def read_frame_I010(fd, width, height):
9696
size = width * height
9797
size2 = width2 * height2
9898

99-
y = numpy.fromfile(fd, dtype=numpy.uint16, count=size).reshape((height, width)) >> 6
100-
u = numpy.fromfile(fd, dtype=numpy.uint16, count=size2).reshape((height2, width2)) >> 6
101-
v = numpy.fromfile(fd, dtype=numpy.uint16, count=size2).reshape((height2, width2)) >> 6
99+
y = numpy.fromfile(fd, dtype=numpy.uint16, count=size).reshape((height, width)) & 0x03ff
100+
u = numpy.fromfile(fd, dtype=numpy.uint16, count=size2).reshape((height2, width2)) & 0x03ff
101+
v = numpy.fromfile(fd, dtype=numpy.uint16, count=size2).reshape((height2, width2)) & 0x03ff
102102

103103
return y, u, v
104104

0 commit comments

Comments
 (0)