Why xvimagesink uses more cpu than ximagesink in this case?

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

Why xvimagesink uses more cpu than ximagesink in this case?

Yogesh Marwaha
Hi,

Just consider these simple pipelines:-

gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! ximagesink

gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! xvimagesink

2nd uses more cpu than first; though one would think xvimagesink would be
better. Any explanation?

PS: gstreamer 0.10.32, openSUSE 11.4 64-bit, intel core i3 (1st gen.) with
integrated graphics

Regards,

Yogesh Marwaha
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Why xvimagesink uses more cpu than ximagesink in this case?

Haikal
On Sun, Jul 24, 2011 at 9:55 PM, Yogesh Marwaha <[hidden email]> wrote:

> Hi,
>
> Just consider these simple pipelines:-
>
> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! ximagesink
>
> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! xvimagesink
>
> 2nd uses more cpu than first; though one would think xvimagesink would be
> better. Any explanation?
>

$ gst-inspect ximagesink
Plugin Details:
  Name: ximagesink
  Description: X11 video output element based on standard Xlib calls

$ gst-inspect xvimagesink
Plugin Details:
  Name: xvimagesink
  Description: XFree86 video output plugin using Xv extension

Based on what i read on wikipedia, xv extension [0] is more
sophisticated than xlib [1]. And of course, it will use more cpu. One
feature on xv extension that not in xlib, is scaling. Just try to
resize the window manually, you'll see the different ;)

CMIIW

--
Haikal
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Why xvimagesink uses more cpu than ximagesink in this case?

Yogesh Marwaha
On 24 July 2011 21:18, Haikal <[hidden email]> wrote:

> On Sun, Jul 24, 2011 at 9:55 PM, Yogesh Marwaha <[hidden email]> wrote:
>> Hi,
>>
>> Just consider these simple pipelines:-
>>
>> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! ximagesink
>>
>> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! xvimagesink
>>
>> 2nd uses more cpu than first; though one would think xvimagesink would be
>> better. Any explanation?
>>
>
> $ gst-inspect ximagesink
> Plugin Details:
>  Name:                 ximagesink
>  Description:          X11 video output element based on standard Xlib calls
>
> $ gst-inspect xvimagesink
> Plugin Details:
>  Name:                 xvimagesink
>  Description:          XFree86 video output plugin using Xv extension
>
> Based on what i read on wikipedia, xv extension [0] is more
> sophisticated than xlib [1]. And of course, it will use more cpu. One
> feature on xv extension that not in xlib, is scaling. Just try to
> resize the window manually, you'll see the different ;)

I agree that xvimagesink is more "sophisticated", but it is supposed
to use the gpu for its "sophisticated" stuff.

In the given pipeline, out of all sophisticated stuff it can do, all
it is needed to do is draw image to screen, yet it is taking more of
cpu.

Resizing of window (in this pipeline) is a different issue. Because
ximagesink cant resize image, it forces goom to draw with a higher
resolution, hence increased cpu usage.

Regards,

Yogesh Marwaha
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Why xvimagesink uses more cpu than ximagesink in this case?

michael smith-6-3
In reply to this post by Yogesh Marwaha
On Sun, Jul 24, 2011 at 7:55 AM, Yogesh Marwaha <[hidden email]> wrote:

> Hi,
>
> Just consider these simple pipelines:-
>
> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! ximagesink
>
> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! xvimagesink
>
> 2nd uses more cpu than first; though one would think xvimagesink would be
> better. Any explanation?

goom produces RGB video. ximagesink can directly render that;
xvimagesink (usually) cannot, so ffmpegcolorspace has to convert to a
different video format. That takes a significant amount of cpu time.

Mike
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Why xvimagesink uses more cpu than ximagesink in this case?

Yogesh Marwaha
On 24 July 2011 22:02, Michael Smith <[hidden email]> wrote:

> On Sun, Jul 24, 2011 at 7:55 AM, Yogesh Marwaha <[hidden email]> wrote:
>> Hi,
>>
>> Just consider these simple pipelines:-
>>
>> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! ximagesink
>>
>> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! xvimagesink
>>
>> 2nd uses more cpu than first; though one would think xvimagesink would be
>> better. Any explanation?
>
> goom produces RGB video. ximagesink can directly render that;
> xvimagesink (usually) cannot, so ffmpegcolorspace has to convert to a
> different video format. That takes a significant amount of cpu time.

Sounds like a valid explanation. Thanks.

Yogesh Marwaha
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: Why xvimagesink uses more cpu than ximagesink in this case?

khawkins


Should that be videotestsrc not audiotestsrc?



-----Original Message-----
From:
gstreamer-devel-bounces+khawkins=[hidden email]
[mailto:gstreamer-devel-bounces+khawkins=[hidden email]
op.org] On Behalf Of Yogesh Marwaha
Sent: Sunday, July 24, 2011 1:16 PM
To: Discussion of the development of and with GStreamer
Subject: Re: Why xvimagesink uses more cpu than ximagesink in this case?

On 24 July 2011 22:02, Michael Smith <[hidden email]> wrote:
> On Sun, Jul 24, 2011 at 7:55 AM, Yogesh Marwaha <[hidden email]>
wrote:

>> Hi,
>>
>> Just consider these simple pipelines:-
>>
>> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! ximagesink
>>
>> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! xvimagesink
>>
>> 2nd uses more cpu than first; though one would think xvimagesink would be
>> better. Any explanation?
>
> goom produces RGB video. ximagesink can directly render that;
> xvimagesink (usually) cannot, so ffmpegcolorspace has to convert to a
> different video format. That takes a significant amount of cpu time.

Sounds like a valid explanation. Thanks.

Yogesh Marwaha
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE: Why xvimagesink uses more cpu than ximagesink in this case?

khawkins

Sorry didn't see goom.



-----Original Message-----
From:
gstreamer-devel-bounces+khawkins=[hidden email]
[mailto:gstreamer-devel-bounces+khawkins=[hidden email]
op.org] On Behalf Of Kevin Hawkins
Sent: Sunday, July 24, 2011 4:35 PM
To: 'Discussion of the development of and with GStreamer'
Subject: RE: Why xvimagesink uses more cpu than ximagesink in this case?



Should that be videotestsrc not audiotestsrc?



-----Original Message-----
From:
gstreamer-devel-bounces+khawkins=[hidden email]
[mailto:gstreamer-devel-bounces+khawkins=[hidden email]
op.org] On Behalf Of Yogesh Marwaha
Sent: Sunday, July 24, 2011 1:16 PM
To: Discussion of the development of and with GStreamer
Subject: Re: Why xvimagesink uses more cpu than ximagesink in this case?

On 24 July 2011 22:02, Michael Smith <[hidden email]> wrote:
> On Sun, Jul 24, 2011 at 7:55 AM, Yogesh Marwaha <[hidden email]>
wrote:

>> Hi,
>>
>> Just consider these simple pipelines:-
>>
>> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! ximagesink
>>
>> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! xvimagesink
>>
>> 2nd uses more cpu than first; though one would think xvimagesink would be
>> better. Any explanation?
>
> goom produces RGB video. ximagesink can directly render that;
> xvimagesink (usually) cannot, so ffmpegcolorspace has to convert to a
> different video format. That takes a significant amount of cpu time.

Sounds like a valid explanation. Thanks.

Yogesh Marwaha
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Why xvimagesink uses more cpu than ximagesink in this case?

Stefan Sauer
In reply to this post by Haikal
On 07/24/11 17:48, Haikal wrote:

> On Sun, Jul 24, 2011 at 9:55 PM, Yogesh Marwaha <[hidden email]> wrote:
>> Hi,
>>
>> Just consider these simple pipelines:-
>>
>> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! ximagesink
>>
>> gst-launch -v audiotestsrc ! goom ! ffmpegcolorspace ! xvimagesink
>>
>> 2nd uses more cpu than first; though one would think xvimagesink would be
>> better. Any explanation?
>>
> $ gst-inspect ximagesink
> Plugin Details:
>   Name: ximagesink
>   Description: X11 video output element based on standard Xlib calls
>
> $ gst-inspect xvimagesink
> Plugin Details:
>   Name: xvimagesink
>   Description: XFree86 video output plugin using Xv extension
>
> Based on what i read on wikipedia, xv extension [0] is more
> sophisticated than xlib [1]. And of course, it will use more cpu. One
> feature on xv extension that not in xlib, is scaling. Just try to
> resize the window manually, you'll see the different ;)
The point of xv is to defer the processing to hardware. It usually uses
less cpu. But then xv is just an interface and in times of OpenGL most
drivers emulate the xv interface. It should still be faster the plain x
though.

Stefan

> CMIIW
>
> --
> Haikal
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Why xvimagesink uses more cpu than ximagesink in this case?

Andrey Nikitin
В Mon, 25 Jul 2011 10:29:25 +0200
Stefan Kost <[hidden email]> пишет:

> It should still be faster the plain x
> though.

nVidia Corporation G84 [GeForce 8600 GTS]

xvinfo            
X-Video Extension version 2.2
screen #0
  Adaptor #0: "NV17 Video Texture"
    number of ports: 32

xv vs soft(X): xv slow about 50%, but picture scalling is better
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel