1

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?

petershine
  • 3,090
  • 22
  • 48
  • I couldn't understand your question completely. Are you trying to extract motion vectors from a h264 raw bit-stream? If that is the case, you can do it by parsing the bit-stream. – ARK Dec 12 '15 at 01:07
  • @ARK Because of limited knowledge, bit-stream parsing is exactly what I want to learn. Can you guide me to a kind of lessen which teach me how to do it? – petershine Dec 15 '15 at 18:26
  • Learning Bit-stream parsing is quite a task. Sure, I can help you to get better understanding. May be you can start with ffmpeg or libav code. What exactly is your objective? It may be simpler to tweak ffmpeg or libav code to get the needful, rather than spending time to learn it. – ARK Dec 16 '15 at 18:09
  • Did you solve this? – Erik Aigner Dec 05 '16 at 14:53
  • @ErikAigner Unfortunately, I couldn't make enough to re-visit this problem. It's really difficult problem. – petershine Dec 07 '16 at 16:17

0 Answers0