MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / get_next_frames

Method get_next_frames

bench/python/nvcodec_utils.py:202–211  ·  view source on GitHub ↗
(self, N)

Source from the content-addressed store, hash-verified

200 raise ValueError("Unexpected tensor layout, NCHW expected.")
201
202 def get_next_frames(self, N):
203 decoded_frames = list(itertools.islice(self.generate_decoded_frames(), N))
204 if len(decoded_frames) == 0:
205 return None
206 elif len(decoded_frames) == 1: # this case we dont need stack the tensor
207 return decoded_frames[0]
208 else:
209 # convert from list of tensors to a single tensor (NHWC)
210 tensorNHWC = cvcuda.stack(decoded_frames)
211 return tensorNHWC
212
213
214# docs_tag: end_imp_nvvideodecoder

Callers 1

__call__Method · 0.80

Calls 1

Tested by

no test coverage detected