[Announce] VA-API/VPP Support for vdr-plugin-softhddevice

  • ..and those horizontal bars exists only with softhddevice? Have you tried other vaapi mediaplayers with vpp enabled on your system? I still think this is due to a incompatible library version or buggy driver.


    Not that easy: kodi and mpv use vaapi-vpp, but only for deinterlacing, not the other filters such as the color_balance filters.
    Both (compiled) programs work perfect.


    The only user of other vpp filters I could found was
    github.com/gbeauchesne/gstreamer-vaapi
    after compiling this, I saw the horizontal bars !
    and only if setting any vaapipostproc filter.


    So you are right, it must be somethng in my system.


    Greetings Rene

  • I know, but i see many minor flaws.


    And to find the bugs, its easier to use my code, with less side effects, which i already knew.


    My code: va-api-glx HD without sound.

    Code
    1. vdr[6438]: video: decoder buffer empty, duping frame (467/4919) 8 v-buf
    2. vdr[6438]: video: 6:48:07.938+8888 0 0/\ms 8+1 v-buf


    The v-buf never fills. The +1 should become +3 or even +4.


    Same happens with va-api branch, but with random frames containing yellow or green bars.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • Yes it runs very smooth. Bob, MADI, MCDI.


    Only the bad frames are still there. Sometimes 15min without any failure, than 1min bad frames.
    I noticed, that I had denoise and sharpen activated. Changing it while the channel is running:



    And changing the scaler to HQ, produces a green grid.


    I think there is a bug, when no filter is used or needed 720p without denoise, sharpen, .... crash.


    And the horizontal bars, can be a frame not ready. I have the fealing 576i with only deinterlacer has no bad frames anymore.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • Its a general problem. The green horizontal bars happens with SDTV, HDTV, ... .
    The bars can be also yellow, red, blue, ...


    The crash only happens without any vpp filters and 720p.


    Disabling the filters didn't improved it today. I have still many of the bad frames.
    Yesterday they was less, but i let it running some hours before testing.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • Mmm, today they are complete gone from SDTV.


    720p crashs when i use anything others then 0 for Denoise or Sharpen.


    Code
    1. vdr[31990]: video/vaapi: vaSyncSurface failed: invalid VASurfaceID
    2. vdr[31990]: Surface 0 query status = 0x6: invalid VASurfaceID
    3. vdr[31990]: vaapi/vpp: Wrong number of forward references. Needed 0, got 1
    4. vdr[31990]: Changing to 0 forward reference surfaces for postprocessing
    5. kernel: softhddev video[32006]: segfault at 7f6c680de000 ip 00007f6c6ee23083 sp 00007f6c7df9f930 error 6 in i965_drv_video.so[7f6c6ede4000+1ab000]
    6. kernel: [drm] RC6 on
    7. kernel: [drm] stuck on render ring
    8. kernel: [drm] GPU HANG: ecode 9:0:0x85ddfffb, reason: Ring hung, action: reset
    9. kernel: [drm:i915_set_reset_status] *ERROR* gpu hanging too fast, banning!
    10. kernel: drm/i915: Resetting chip after gpu hang


    Same with GIT version of libva and libva-intel-driver.


    Now testing ffmpeg 2..7 and sharpen or denoise.


    Same with ffmpeg 2.7.
    Sharpen must be 0 otherwise crash.


    Seems that 720p is producing the bad frames, when i never switch to 720p i get no bad frames on SDTV channels.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

    The post was edited 2 times, last by johns ().

  • There is something wrong with the denoise parameters.
    The config says 50 = default, the default should be off.
    With 0 the denoise is disabled.


    I have now all filters disabled (inserted "break;"), now everything seems to run fine, now longer testing.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • Hi,


    johns
    sieht besser jetzt besser aus, ich hab auch keine grünen horizontale Linien mehr mit vaapi, vaapi-glx stürzt bei mir sofort ab.
    Ich kann X11 auch live von 1080 auf 4K 2160p umschalten und vdr läuft weiter :-)
    SD pumpt irgendwie, 720p sieht ok aus, 1080i Servus Logo flackert noch etwas.



    Intel(R) Celeron(R) CPU N3150


    Linux satip 4.3.0-999-generic #201510012204 SMP Fri Oct 2 02:06:34 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


    libva info: VA-API version 0.38.0
    libva info: va_getDriverName() returns 0
    libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
    libva info: Found init function __vaDriverInit_0_38
    libva info: va_openDriver() returns 0
    lt-vainfo: VA-API version: 0.38 (libva 1.6.2.pre1)
    lt-vainfo: Driver version: Intel i965 driver for Intel(R) CherryView - 1.6.2.pre1 (1.6.1-52-g589b7a8)


    ffmpeg 2.8


    http://projects.vdr-developer.…g-softhddevice/repository



    CU
    9000h

    Es ist eagl in wlehcer Reiehnfogle die Bchustebaen in Woeretrn vokrmomen. Huapstache der estre und leztte Bchustbae sitmmen.

    The post was edited 2 times, last by 9000H ().

  • johns


    As I see it, the denoise parameters are from the driver caps. I too got 720p crashes which are gone with following fix



    This situation comes up in interlaced material too, but crashes only with 720p. Maybe this can contribute to a solution


    Cheers

    vdr-2.6.0
    softhddevice,, dbus2vdr, dvd, epgsearch, femon, graphtftng, hbbtv, menuorg,
    osdteletext, radio, recsearch, satip, tvguide, vnsiserver

    ubuntu focal, yavdr-ansible, linux-5.10 ,AsRock J4105, CIne CT-V7 DVB-C

  • There is something wrong with the denoise parameters.
    The config says 50 = default, the default should be off.
    With 0 the denoise is disabled.


    Well, I disagree. The default should be set according to the driver. Also zero value shouldn't be indicated as disabled/off as the driver has a different meaning for it in Intel's VA-API implementation.

  • Than fix the code!


    You disable the denoise filter, when denoise is 0.
    When 0 is not off, than don't disable the denoise filter, when the value is 0.
    Use -1 for off, and 0 - N for the denoise filter and say 50 = default or write in the menu text "value in [] is default".
    Or an extra option to disable the filter, but not how its now.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • It should be an extra option as the some filters are using 0 as a minimum (as maximum smoothen) and some are using it as a center default while minimum being a negative value. What's the harm keeping them always on, but a little more work for the gpu?

  • It is always a problem with cheap hardware. There was NVidia cards which can't handle all the stuff.
    The VDPAU always use/setup the filter, if it was supported by the hardware.
    I don't know if Intel GPUs with less EU, can handle all the filters.


    I was adding some timeing debugs, to see where the time is spend.


    I would add an extra option to disable the filters.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • IIRC, Intel's filter pipelnes can handle max 4 filter at a time, so using more than 4 filters will surely slowdown the processing a bit as the filtering has to be done multiple time. On a low end GPUs this might be a bottleneck or not...

  • Denoise: 0 to 100, 50 is default. Is the 50 off? or 0?
    Sharpen 0 to 100, 50 is default. 50 should be off? 0 is soften, 100 is sharpen.


    Edit: Currently denoise of 0 and sharpen of 0 turns the filter off, but this is a bug.
    What I wanted to know. is which value does the less denoise or is the default the neutral position?


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

    The post was edited 1 time, last by johns ().

  • I don't quite get the problem, I can setup 720p.Denoise to 0 in the setup e.g.
    This means the denoise-filter is not applied. This has nothing to do with the default value.
    For 720p with all filters set to 0 in setup (which is the default) filter_count remains 0 in VaapiApplyFilters(),
    for interlaced resolutions at least the deinterlace-filter is called.


    The problem, that leads to a crash in my system is VaapiPostprocessSurface is called even with a filter_count of 0.
    If I apply following fix


    my system runs mostly stable without any artefacts. My previous fix is not needed anymore.

    vdr-2.6.0
    softhddevice,, dbus2vdr, dvd, epgsearch, femon, graphtftng, hbbtv, menuorg,
    osdteletext, radio, recsearch, satip, tvguide, vnsiserver

    ubuntu focal, yavdr-ansible, linux-5.10 ,AsRock J4105, CIne CT-V7 DVB-C