Skip to content

Commit

Permalink
Call nppiNV12ToRGB_709CSC_8u_P2C3R
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasHug committed Nov 28, 2024
1 parent f9dd9b5 commit 365209e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/torchcodec/decoders/_core/CudaDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ void convertAVFrameToDecodedOutputOnCuda(
auto start = std::chrono::high_resolution_clock::now();
NppStatus status;
if (src->colorspace == AVColorSpace::AVCOL_SPC_BT709) {
status = nppiNV12ToRGB_709HDTV_8u_P2C3R(
// status = nppiNV12ToRGB_709HDTV_8u_P2C3R(
status = nppiNV12ToRGB_709CSC_8u_P2C3R(
input,
src->linesize[0],
static_cast<Npp8u*>(dst.data_ptr()),
Expand Down
2 changes: 1 addition & 1 deletion test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def assert_tensor_equal(*args, **kwargs):

# Asserts that at least `percentage`% of the values are within the absolute tolerance.
def assert_tensor_close_on_at_least(
actual_tensor, ref_tensor, percentage=90, abs_tolerance=19
actual_tensor, ref_tensor, percentage=90, abs_tolerance=5
):
assert (
actual_tensor.device == ref_tensor.device
Expand Down

0 comments on commit 365209e

Please sign in to comment.