Skip to content

noise when decoding hevc yuv420p10le videos with device="cuda" #598

Open
@hanchchch

Description

@hanchchch

🐛 Describe the bug

when I try to decode videos with pixel format yuv420p10le like below,

# ffprobe result
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt709/bt709/unknown), 1920x1080, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn (default)
# decoding script
decoder = VideoDecoder("./test.mp4", device="cuda")
frames = decoder.get_frames_in_range(0, 100)

cv2.imwrite("frame.png", frames.data.permute(0, 2, 3, 1).cpu().numpy()[0])

decoded frames appears like this, with full of noise:

Image

but with h264 yuv420p videos or if I use cpu decoding it works fine.

  Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x816 [SAR 1:1 DAR 40:17], 23.98 fps, 23.98 tbr, 1k tbn (default)

why is this happening?

Versions

0.2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions