Skip to content

Commit 7f88e60

Browse files
committed
Back to RGB24
1 parent 3dc20b8 commit 7f88e60

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/torchcodec/_core/CudaDeviceInterface.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,18 +244,15 @@ UniqueAVFrame CudaDeviceInterface::maybeConvertAVFrameToNV12(
244244
// n5.0. With the earlier version of ffmpeg we have no choice but use CPU
245245
// filters. See:
246246
// https://github.com/FFmpeg/FFmpeg/commit/62dc5df941f5e196164c151691e4274195523e95
247-
//outputFormat = AV_PIX_FMT_RGB24;
248-
outputFormat = AV_PIX_FMT_CUDA;
247+
outputFormat = AV_PIX_FMT_RGB24;
249248

250-
/*
251249
auto actualFormatName = av_get_pix_fmt_name(actualFormat);
252250
TORCH_CHECK(
253251
actualFormatName != nullptr,
254252
"The actual format of a frame is unknown to FFmpeg. "
255253
"That's unexpected, please report this to the TorchCodec repo.");
256254

257-
*/
258-
filters << "hwupload,format=nv12";
255+
filters << "hwdownload,format=" << actualFormatName;
259256
} else {
260257
// Actual output color format will be set via filter options
261258
outputFormat = AV_PIX_FMT_CUDA;

0 commit comments

Comments
 (0)