pytorch / torchcodec

PyTorch video decoding
BSD 3-Clause "New" or "Revised" License
83 stars 9 forks source link

Improve color accuracy of BT709 frames on CUDA #372

Closed ahmadsharif1 closed 1 week ago

ahmadsharif1 commented 1 week ago

libnpp actually has a specialized function to handle images with BT709 colorspace. So we use that instead of the generic one when appropriate. This improves the color accuracy of the image slightly.

Hat tip to @fmassa

Drive-by: fixed a test that doesn't make sense on CUDA -- we can only expect exactly equal frames on CPU.

Visual inspection. Before on the left and after on the right:

image