quietvoid / dovi_tool

dovi_tool is a CLI tool combining multiple utilities for working with Dolby Vision.
MIT License
581 stars 57 forks source link

include the function parse_rpu_file into the c-api? #164

Closed erazortt closed 2 years ago

erazortt commented 2 years ago

I would like to use the functionality parse_rpu_file in the dovi library created from the dolby_vision directory. Would that be possible?

quietvoid commented 2 years ago

Sure, it's totally possible. It would probably take a char* of the file path, and return an allocated list of the RPUs, which may be large, though.

erazortt commented 2 years ago

Yes, that would be exactly what I thought it to be like and what I’d need!

Am 13.06.2022 um 02:39 schrieb quietvoid @.***>:

 Sure, it's totally possible. It would probably take a char* of the file path, and return an allocated list of the RPUs, which may be large, though.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

quietvoid commented 2 years ago

I've implemented it as a list of the existing DoviRpuOpaque in #166. You can find a usage example here: https://github.com/quietvoid/dovi_tool/blob/remove_utilities/dolby_vision/examples/capi_rpu_file.c

Does this work for you? It's better for memory usage as the data is only allocated on request (using the opaque pointer).

The parsing currently does a lot of allocations, though. Hopefully that can be improved on later.

erazortt commented 2 years ago

Yeah, works for me. I will continue to test with some real life rpu files, but its looking good so far. Thanks a lot, Cheers!