Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Chris1
Beginner
106 Views

Decoding H.264 stream from memory, not file

Jump to solution
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
106 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
107 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

Chris1
Beginner
106 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