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

Get stereo frame buffer when decoding H.264 MVC #601

Open
CommanderLake opened this issue Jun 14, 2024 · 4 comments
Open

Get stereo frame buffer when decoding H.264 MVC #601

CommanderLake opened this issue Jun 14, 2024 · 4 comments

Comments

@CommanderLake
Copy link

I've been trying to figure out how i can get access to the stereo frame buffer when decoding H.264 MVC when using the video decoder in a graph in my application and decoding a ripped 3D blue ray, I know GetPointer3D in the IMediaSample3D interface gets the stereo frame pointer but I cant get access to it so how does MadVR for example get the stereo frame buffer?

@Nevcairiel
Copy link
Owner

LAV Video does not actually implement IMediaSample3D, rather it expects a renderer that supports 3D rendering to provide an allocator that implements it, and then just writes the samples into it.

This inversion of sample allocation is typical for the renderer <> decoder relationship, as renderers typically have certain requirements for their sample allocation and management. Practically all renderers provide their own allocator - and thus is the natural place to also require IMediaSample3D to be implemented. Once its implemented and exposed, LAV will use it to store the second view.

@CommanderLake
Copy link
Author

CommanderLake commented Jun 14, 2024

Thanks but I'm still struggling with this, how does the allocation of the buffer work and when is it allocated, does the decoder allocate the memory?
I'm so confused, is any of this documented?

@clsid2
Copy link
Contributor

clsid2 commented Jun 15, 2024

@CommanderLake
Copy link
Author

So I allocate the stereo frame buffer in GetPointer3D and that gets called only once?
Or do I only allocate the frame buffer if it is not yet allocated and return it with subsequent calls?
How do I get the required size of the frame buffer?

Thanks.

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

No branches or pull requests

3 participants