8000 Different video reading result between x86_64 and aarch64 · Issue #1093 · imageio/imageio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Different video reading result between x86_64 and aarch64 #1093
Open
@HaFred

Description

@HaFred

Hi all, I am trying to read a .mp4 video on two machine with imageio==2.34.2 imageio-ffmpeg==0.5.1, one with x86_64 and the other one with aarch64.
The system info can be found below respectively:

x86_64
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              192
On-line CPU(s) list: 0-191
Thread(s) per core:  2
Core(s) per socket:  48
Socket(s):           2
NUMA node(s):        2
CPU family:          23
Model:               49
Model name:          AMD EPYC 7642 48-Core Processor

aarch64
Architecture:                    aarch64
CPU op-mode(s):                  64-bit
Byte Order:                      Little Endian
CPU(s):                          192
On-line CPU(s) list:             0-191
Thread(s) per core:              1
Core(s) per socket:              48
Socket(s):                       4
NUMA node(s):                    8

However, the video is read in differently for two machines. A reproduciable python snippet is as below:

import imageio.v3 as iio
im = iio.imread('dino.png')
print(im.shape)  # im is a numpy array
print(im.sum())

p = 'video.mp4'
vid = iio.imread(p)
print(vid.shape)
print(f'vid max {vid.max()}')
print(f'vid sum {vid.sum()}')

I ended up having different outputs for the with the same script and same inputs above:

# x86_64
(1024, 1024, 4)
218906416
(21, 576, 576, 3)
vid max 255
vid sum 4524047347

# aarch64
(1024, 1024, 4)
218906416
(21, 576, 576, 3)
vid max 255
vid sum 4491897999

Is it caused by the cpu arch? Like maybe imageio cannot be correctly supported by aarch64. If yes, is there any workaround I can read in the .mp4 video correctly on aarch64? This video reading serves as a preprocessing process in my project and it runs smoothly on x86_64 so I believe that it's correct when it's done by x86_64. Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0