MCPcopy Create free account
hub / github.com/IENT/YUView / getRawFrameData

Method getRawFrameData

YUViewLib/src/decoder/decoderDav1d.cpp:353–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351}
352
353QByteArray decoderDav1d::getRawFrameData()
354{
355 auto s = curPicture.getFrameSize();
356 if (s.width <= 0 || s.height <= 0)
357 {
358 DEBUG_DAV1D("decoderDav1d::getRawFrameData: Current picture has invalid size.");
359 return QByteArray();
360 }
361 if (decoderState != DecoderState::RetrieveFrames)
362 {
363 DEBUG_DAV1D("decoderDav1d::getRawFrameData: Wrong decoder state.");
364 return QByteArray();
365 }
366
367 if (currentOutputBuffer.isEmpty())
368 {
369 // Put image data into buffer
370 copyImgToByteArray(curPicture, currentOutputBuffer);
371 DEBUG_DAV1D("decoderDav1d::getRawFrameData copied frame to buffer");
372
373 if (this->statisticsEnabled())
374 // Get the statistics from the image and put them into the statistics cache
375 this->cacheStatistics(curPicture);
376 }
377
378 return currentOutputBuffer;
379}
380
381bool decoderDav1d::pushData(QByteArray &data)
382{

Callers

nothing calls this directly

Calls 4

cacheStatisticsMethod · 0.95
statisticsEnabledMethod · 0.80
getFrameSizeMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected