Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

How can I convert from the decoded image to DIB?

relay21
Beginner
252 Views
How can I convert from the decoded image(output of h264 decoder)to DIB?
The color format of decoded image is RGB24.
0 Kudos
1 Reply
Ying_H_Intel
Employee
252 Views
Quoting - relay21
How can I convert from the decoded image(output of h264 decoder)to DIB?
The color format of decoded image is RGB24.

Hi Relay21,

Are you looking at the ipp-samplesaudio-video-codecsapplicationumc_h264_dec_con, right?

The decoder can output RGB24 raw data directly. (frame by frame)
Usage:

umc_h264_dec_con.exe [Options] InputFile [OutputYUVFile]

there are also optional command line switches:

command line switch description
-t number of threads to limit (If num is equals 0 then decoder creates optimal number of threads based on the number of CPU on the host. Zero value used by default.)
-f number of frames to limit. (Unlimited number of frames will be decoded by default.)
-f select output color format

About convertthem to DIB, do you mean that toadd BMP file header to each frame, then save them frame by frame?

You mayadd code to create a DIB imageformat asthe sampleipp-samplesimage-processingimage-processing-mfcippiImage.cpp, then copy the RGB24 raw data to the DIB image.

or use some readyDIB image class provided by some software, for exampleOpenCV Image class
img=cvCreateImage(),
open the decoder RGB24 file. read data frame by frame, suppose thedata are indataBuffer
ippicopy (dataBuffer to img->imageData(
cvSaveImage("img.bmp", img);

Regards,
Ying
0 Kudos
Reply