Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
6628 Discussions

Decoding H.264 stream from memory, not file

Chris1
Beginner
175 Views
I need to decode an H.264 stream which is in a buffer in memory, i.e. I just want to supply a pointer and a buffer size. I had this working using the decoder supplied in the ipp-samples for IPP 5.3 but I had to override the H264AnnexBSplitter::Init method to get it to point to the appropriate place in memory since the examples only provide the facility for reading from a file.

Now, I've upgraded to 6.0-1 and it seems a lot harder to do. There is the class FileReader but that's not particularly easy to modify or override as it relies on other things like vm_mmap_create.

Is there a recommended simple way to do this or will I have to derive a class from DataReader (seems like quite a lot of work for such a simple, common task)?

Thanks...
0 Kudos
1 Solution
Chao_Y_Intel
Employee
175 Views

Writing a derive class from DataReader is one of the way. I also attached another sample code. This sample code read raw H.264 data to memory and
then decode the H.264 data.

Thanks,
Chao

View solution in original post

2 Replies
Chao_Y_Intel
Employee
176 Views

Writing a derive class from DataReader is one of the way. I also attached another sample code. This sample code read raw H.264 data to memory and
then decode the H.264 data.

Thanks,
Chao
Chris1
Beginner
175 Views
Thanks for that. I've been playing with that code and I'm having problems getting it to work. You seem to not be using a splitter so does this work for streams that include audio?

I ask this because when I first implemented my decode, I did it in this way and I had the problem that after calling H264VideoDecoder::Init(...), when I call GetInfo, it returns "not initialised". I fixed this by using a splitter first.

Now the splitter has changed in IPP 6.0. I think I might have to derive from DataReader to get it to work but it's a shame there is no BufferReader class built in with the examples.

Thanks, Chris.
Reply