YUV to RGB conversion of decoder output

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

YUV to RGB conversion of decoder output

rohitratri@gmail.com
Hi,
<Newbie Warning - Question could sound lame>
I've an application which selectively decodes iFrames in a video (mpeg4 only for now) and hence I use ffdec_mpeg4 in the pipeline. The output I get is in YUV format and I need to convert it to RGB so I can build a QPixmap (Qt image representation class) from it.

How do I do that?

I tried - setting the caps as "video/x-raw-rgb" for the src pad of decoder but that didn't work. Also I tried putting a capsfilter with caps = "video/x-raw-rgb" and followed by a ffmpegcolorspace element but that didn't quite work. I don't want to set other structures such as width height depth etc since that could vary from video to video.

PS - I could just write my own yuv->rgb routine but want to check if this can be done in the pipeline itself.

Thanks
Rohit

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: YUV to RGB conversion of decoder output

Edward Hervey
Administrator
On Tue, 2010-12-21 at 20:44 +0530, Rohit Atri wrote:

> Hi,
> <Newbie Warning - Question could sound lame>
> I've an application which selectively decodes iFrames in a video
> (mpeg4 only for now) and hence I use ffdec_mpeg4 in the pipeline. The
> output I get is in YUV format and I need to convert it to RGB so I can
> build a QPixmap (Qt image representation class) from it.
>
>
> How do I do that?
>
>
> I tried - setting the caps as "video/x-raw-rgb" for the src pad of
> decoder but that didn't work. Also I tried putting a capsfilter with
> caps = "video/x-raw-rgb" and followed by a ffmpegcolorspace element
> but that didn't quite work.

  You need to put your capsfilter *after* ffmpegcolorspace (you want it
to output RGB regardless of what it has in input).

    Edward

>  I don't want to set other structures such as width height depth etc
> since that could vary from video to video.
>
>
> PS - I could just write my own yuv->rgb routine but want to check if
> this can be done in the pipeline itself.
>
>
> Thanks
> Rohit
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: YUV to RGB conversion of decoder output

rohitratri@gmail.com
Oh god! I kinda feel embarrassed now :) But the embarrassment was worth the lesson I learnt! 
Thanks Edward, that worked.



On Tue, Dec 21, 2010 at 9:16 PM, Edward Hervey <[hidden email]> wrote:
On Tue, 2010-12-21 at 20:44 +0530, Rohit Atri wrote:
> Hi,
> <Newbie Warning - Question could sound lame>
> I've an application which selectively decodes iFrames in a video
> (mpeg4 only for now) and hence I use ffdec_mpeg4 in the pipeline. The
> output I get is in YUV format and I need to convert it to RGB so I can
> build a QPixmap (Qt image representation class) from it.
>
>
> How do I do that?
>
>
> I tried - setting the caps as "video/x-raw-rgb" for the src pad of
> decoder but that didn't work. Also I tried putting a capsfilter with
> caps = "video/x-raw-rgb" and followed by a ffmpegcolorspace element
> but that didn't quite work.

 You need to put your capsfilter *after* ffmpegcolorspace (you want it
to output RGB regardless of what it has in input).

   Edward

>  I don't want to set other structures such as width height depth etc
> since that could vary from video to video.
>
>
> PS - I could just write my own yuv->rgb routine but want to check if
> this can be done in the pipeline itself.
>
>
> Thanks
> Rohit
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel