Is videoscale affecting alpha value?

Peter Maersk-Moller pmaersk at gmail.com
Thu Dec 19 17:08:58 PST 2013


Hi

I've come across a problem with alpha values where videoscale in some cases
seems to affect the alpha value in a not so good way for GStreamer 1.2.0
(and 1.2.1) in a way that was not the case for version 0.10.

When using the following pipeline, the alpha value of each pixels gets set
to 127, if the content decoded is not 1280x720 and set to 255, if the
content is 1280x720:

/usr/local/bin/gst-launch-1.0 -v filesrc location=../test/pmm2.mp4 !\
    decodebin !\
    videoscale !\
    videoconvert !\
    'video/x-raw, format=(string)BGRA, width=(int)1280, height=(int)720' !\
    shmsink socket-path=/tmp/feed1-control-pipe shm-size=50000000
wait-for-connection=0

The similar pipeline for GStreamer 0.10 (using ffmpegcolorspace and a
slightly different format string) always produces alpha values of 255.

Now the funny thing is, that when using the following pipeline, alpha
values always gets set to 255.

/usr/local/bin/gst-launch-1.0 -v videotestsrc is-live=true !\
    'video/x-raw, format=I420, width=1024, height=576' !\
    videoscale !\
    videoconvert !\
    'video/x-raw, format=(string)BGRA, width=(int)1280, height=(int)720' !\
    shmsink socket-path=/tmp/feed1-control-pipe shm-size=50000000
wait-for-connection=0


The desired behaviour is normally to always have the alpha value set to
255, as it might otherwise cause a bit of inconvenience when mixing video
further down the line and alpha values unintentionally set to 127.

Is there anybody else that has seen this and anybody with a workaround to
fix it?

Kind regards
Peter Maersk-Moller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131220/486413e3/attachment.html>


More information about the gstreamer-devel mailing list