Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reading and writing slice data #8

Open
serhan-gul opened this issue Nov 9, 2015 · 3 comments
Open

reading and writing slice data #8

serhan-gul opened this issue Nov 9, 2015 · 3 comments

Comments

@serhan-gul
Copy link

h264_slice_data.c file provides some functions for extracting slice and macroblock information but it is not implemented in h264_analyze. Is there going to be a patch for this anytime soon? Would it be straightforward to modify slice data functions or is there still a lot of work to do? It is regarded as a "large project" in the readme file, that's why I'm asking.

@aizvorski
Copy link
Owner

Serhan,

The code in h264_slice_data.c needs work before it would be usable.
The following missing functions need to be implemented:

  • bs_read_ce - for CAVLC
  • NextMbAddress
  • MbPartPredMode
  • NumMbPart
  • NumSubMbPart
  • SubMbPredMode
  • TotalCoeff
  • TrailingOnes

They are just stubs right now. Most are relatively easy.

There would also need to be a data structure to store macroblocks - the macroblock_t struct describes what is in one macroblock, but there would have to be an array of them for a whole slice (with some way to index it - scan order, and convert scan order to row/column, plus utility functions to find neighbors of a given mb).

That's all I can think of at the moment. The code that is there now does cover a whole lot of what the standard does, it just needs the stubs to be filled in, and a bunch of testing.

@serhan-gul
Copy link
Author

Alex,

Thanks for the list of functions and detailed explanation. I will definitely try to implement them sometime. Although (open-source) parsers do exist for HEVC, I couldn't find any parser other than yours for H.264. It is definitely interesting.

@nathankopp
Copy link

Has anyone done any work on this? I'm trying to write some code that will parse (but not decode) an h264 stream, so that I can extract the motion vectors quickly for analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants