Changes between Version 3 and Version 4 of Yocto/gstreamer/video


Ignore:
Timestamp:
04/19/2018 08:48:34 PM (6 years ago)
Author:
Tim Harvey
Comment:

added additional notes about deinterlacing and vsync

Legend:

Unmodified
Added
Removed
Modified
  • Yocto/gstreamer/video

    v3 v4  
    4343
    4444 
    45 This is only recommended if you require a deinterlacer to eliminate the effect of [wiki:Yocto/gstreamer/video#interlaced-video interlaced video effects] or requires a certain video format only this video sink can provide. To enable the deinterlacer set the deinterlace property to true.
    46 
    47  
    48 The imxipuvideosink also supports vertical sync to eliminate [wiki:Yocto/gstreamer/video#tearing screen tearing]. To enable this set the {{{use-vsync}}} property to true.
     45This is only recommended if you require a deinterlacer to eliminate the effect of [wiki:Yocto/gstreamer/video#interlaced-video interlaced video effects] or requires a certain video format only this video sink can provide.
     46
     47To enable the deinterlacer set the {{{deinterlace=true}}} property.
     48
     49 
     50The imxipuvideosink also supports vertical sync to eliminate [wiki:Yocto/gstreamer/video#tearing screen tearing]. To enable this set the {{{use-vsync=true}}} property.
    4951
    5052
     
    5557This is recommended if resources are limited and you require offloading some processing to the PXP engine.
    5658
    57 Enabling the {{{use-vsync}}} property is useful to prevent [wiki:Yocto/gstreamer/video#tearing screen tearing] in the video.
     59Setting the {{{use-vsync=true}}} property is useful to prevent [wiki:Yocto/gstreamer/video#tearing screen tearing] in the video.
    5860
    5961
     
    210212=== imxipuvideotransform ===
    211213This plugin can convert between input type RGB16, BGR, RGB, BGRx, BGRA, RGBx, RGBA, ABGR, UYVY, v308, NV12, YV12, I420, Y42B, Y444 to output type RGB16, BGR, RGB, BGRx, BGRA, RGBx, RGBA, ABGR, UYVY, v308, NV12, YV12, I420, Y42B, Y444 video formats. Further, this element can deinterlace video before sending a frame on, which can be very useful depending on your video types.
    212  
     214
     215To enable deinterlacing set the {{{deinterlace=true}}} property on the element.
     216
    213217This is the recommended video transform, however please note that the IPU cannot accept non-standard video resolutions.
    214218
     
    253257Screen tearing occurs when the video output is not in sync with the display's refresh rate. The process of synchronizing the output to the refresh rate is also referred to as "vsync".
    254258
    255 If the video frames are displayed directly on the framebuffer, this is easy to fix. The blitter-based video sinks (= the IPU, G2D, PxP sinks) have a "use-vsync" property, which is set to false by default. If set to true, it reconfigures the framebuffer, enlarging its virtual height. It then performs page flipping during playback. The page flipping is synchronized to the display's refresh rate, eliminating the tearing effects. If {{{imxeglvivsink}}} is used, the {{{FB_MULTI_BUFFER}}} environment variable needs to be set to 2. This instructs the Vivante EGL libraries to set up the framebuffer in a way that is similar to what the blitter-based sinks do.
     259If the video frames are displayed directly on the framebuffer, this is easy to fix. The blitter-based video sinks (the IPU, G2D, PxP sinks: {{{imxipuvideosink}}}, {{{imxg2dvideosink}}}, {{{imxpxpvideosink}}}) have a {{{use-vsync}}} property, which is set to false by default. If set to true, it reconfigures the framebuffer, enlarging its virtual height. It then performs page flipping during playback. The page flipping is synchronized to the display's refresh rate, eliminating the tearing effects. If {{{imxeglvivsink}}} is used, the {{{FB_MULTI_BUFFER}}} environment variable needs to be set to 2. This instructs the Vivante EGL libraries to set up the framebuffer in a way that is similar to what the blitter-based sinks do.
    256260
    257261In X11, vsync is not doable from the gstreamer-imx side. It would require changes to the existing i.MX6 X11 driver. So far, no such change has been made, meaning that as of now, tearing-free video playback in X11 is not possible.
     
    267271== Interlaced Video and Deinterlacing ==
    268272Interlaced video is a technique for doubling the perceived frame rate of a video display without consuming extra bandwidth. The interlaced signal contains two fields of a video frame captured at two different times. The alternative to interlaced video is called progressive video.
    269 
    270273 
    271274While reducing bandwidth this can cause a perceived flicker effect as well as a very apparent artifact seen during motion. For example a car moving horizontally across a scene will show every other vertical line differently: the second field interlaced with the first field will be a full frame period ahead in time from the other. The visual affect can be seen in [https://en.wikipedia.org/wiki/File:Interlaced_video_frame_(car_wheel).jpg ​this image from Wikipedia]
     
    273276Television signals are typically interlaced, or at least were until recently. For example, analog television standards such as NTSC used in North America as well as the PAL and SECAM formats used abroad use interlaced video and therefore any analog video decoder such as the ADV7180 found on many Gateworks Ventana boards will capture interlaced video and are subject to interlacing artifacts. Interlaced video is still used in High Definition signals as well and the letter at the end of the format tells you if its interlaced (ie 480i, 720i, 1080i) or progressive (ie 480p, 720p, 1080p).
    274277
     278To use the IMX6 to deinterlace video you can use the {{{deinterlace=true}}} property of the {{{imxipuvideosink}}} or {{{imxipuvideotransform}}} elements.
    275279 
    276280References: