conver I420 to RGB

This forum is about all development around libVLC.
biga
Blank Cone
Blank Cone
Posts: 21
Joined: 11 May 2011 10:31

conver I420 to RGB

Postby biga » 12 Jul 2011 21:27

Hi!

I am writing a video filter, and the filter function's input parameter is a picture_t with format VLC_CODEC_I420. Is this the YUV422 planar format? Does the p_data_orig member contains the raw yuv data? How can I convert it to RGB (IplImage not planar)? I found a video_chroma filter i420_rgb. Can i use it for the conversion? And how? Is the filter's output a planar image?

Thanks for your answer!

biga.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: conver I420 to RGB

Postby Rémi Denis-Courmont » 12 Jul 2011 22:29

As the name partly implies, I420 is planar YUV 4:2:0. I422 would be 4:2:2, but though it is supported by many video codecs, it is much less commonly used.

In general, video filters must accept the input format for performance reasons. If you really really need the RGB components, then you need to use yuv_to_rgb() from "filter_picture.h".
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

biga
Blank Cone
Blank Cone
Posts: 21
Joined: 11 May 2011 10:31

Re: conver I420 to RGB

Postby biga » 13 Jul 2011 08:50

Thanks for your reply! I looked into filter_picture.h but I didn't find a function with that name, however I found it in blend.c and atmo.cpp. Should I use the function from the other's plugin? :)

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: conver I420 to RGB

Postby Rémi Denis-Courmont » 13 Jul 2011 09:05

It is there. You're probably not looking at the correct version.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 20 guests