pytorch / torchcodec

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

Honor `preAllocatedOutputTensor` with filtergraph #295

Closed NicolasHug closed 1 week ago

NicolasHug commented 1 week ago

Up until now, the preAllocatedOutputTensor parameter of our low-level decoding functions was only considered for swscale. It is now honored in all cases, i.e. when filtergraph is used.

ahmadsharif1 commented 1 week ago

Can you add a TODO to write a test that confirms the data_ptr in the pre-allocated tensor is the same as the return value in both color-conversion library cases? Otherwise this can regress and we would not know any better.

Doesn't have to be this diff. You can do it later.