Page 1 of 1

OpenMAX color format problem

Posted: Thu Feb 28, 2013 7:09 am
by rudy01
Hi everyone,
I read this post, which was extremely helpful: ... 33&t=15463

In the specified post above, it talks about how you can set the color format, and here is the official example: ... XImage.cpp

I also found this page, that lists all the available color formats: ... cation.pdf

But, unfortunately, I cannot set it to an RGB color space.
I tried to change the OMX_COLOR_Format32bitABGR8888 to both OMX_COLOR_Format24bitBGR888 and
and no luck.
When I tried to set the parameter, m_omx_encoder.SetParameter(OMX_IndexParamPortDefinition, &port_def) it just crashes.

Is this a bug in OpenMAX? Because I don't see any reason why I cannot set the color space to 24-bit RGB instead of 32-bit RGBA !!!
Apparently, the SetParameter() function doesn't like to set the color space to RGB !!!

Has anyone had any success in setting the color space to RGB? Does anyone see what I am doing wrong?
I would really appreciate some help.

And, just a side question, does anyone know of any software to quickly encode an RGBA image?


Re: OpenMAX color format problem

Posted: Thu Feb 28, 2013 7:32 pm
by MattOwnby
I replied to the other thread, but just for completeness, I believe that the Pi's OpenMAX implementation does not support RGB, only RGBA. That is probably why it is giving the error.

Re: OpenMAX color format problem

Posted: Thu Feb 28, 2013 8:44 pm
by rudy01
I saw your reply on the other post: ... 3&p=298768

Since, this is about the same question, I would continue on your previous post and not be adding to this post.