I'm trying read or understand CMBlockBufferRef
representation of H.264 AVC
1/30 frame.
The buffer and the encapsulating CMSampleBufferRef
is created by using VTCompressionSessionRef
.
https://gist.github.com/petershine/de5e3d8487f4cfca0a1d
H.264 data is represented as AVC memory buffer, CMBlockBufferRef
from the compressed sample.
Without fully decompressing again, I'm trying to extract motion vectors or predictions
from this CMBlockBufferRef
.
I believe that for the fastest performance, byte-by-byte reading from the data buffer using CMBlockBufferGetDataPointer()
should be necessary.
However, I'm having trouble finding the right way to read the data buffer, with the intention to find and extract motion vectors or predictions
.
Is there no way at all, without decompressing, or using ffmpeg
?
来源:https://stackoverflow.com/questions/33407273/how-to-extract-motion-vectors-from-h-264-avc-cmblockbufferref-after-vtcompressio