How to extract motion vectors from H.264 AVC CMBlo

2019-04-15 10:14发布

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?

0条回答
登录 后发表回答