selectable vaapi decoder device
Because I have this dual-gpu laptop with intel and radeon (r600) decoding devices I tried to get second (mesa/r600) device going but init failed .. I looked into decoding example: https://gist.github.com/kajott/d1b29c613be30893c855621edd1f212e and created attached patch now you can select your specific device with env variable: CIN_DRM_DEC=/dev/dri/renderD129 DRI_PRIME=1 LIBVA_DRIVER_NAME=r600 bin/cin in theory same treatment can be applied (with different variable name) to second instance of av_hwdevice_ctx_create (in hw encoder init) but I have no device to test it ...
Actually, I think this version will do encode vaapi device selection too, like this: CIN_DRM_DEC=/dev/dri/renderD129 CIN_DRM_ENC=/dev/dri/renderD128 bin/cin but for some reason decode via Radeon device (on pcie bus?) and encode on integrated GPU via i965 driver much slower! I used intel_gpu_top and radeontop (1.4 git from github) for checking each video block load. devices: root@slax:~# lspci 00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) 00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4) 00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 3 (rev b4) 00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b4) 00:1c.5 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 6 (rev b4) 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b4) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation HM65 Express Chipset LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port Mobile SATA AHCI Controller (rev 04) 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Seymour [Radeon HD 6400M/7400M Series] 24:00.0 System peripheral: JMicron Technology Corp. SD/MMC Host Controller (rev 30) 24:00.2 SD Host controller: JMicron Technology Corp. Standard SD Host Controller (rev 30) 24:00.3 System peripheral: JMicron Technology Corp. MS Host Controller (rev 30) 25:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01) 26:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06) 27:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04) there is modprobe.d config file root@slax:~# cat /mnt/live/memory/images/006_dualgpu.lzm/etc/modprobe.d/dualgpu.conf #fixes /dev/dri order on dual gpu laptop softdep radeon pre: i915 and Xorg.conf cat /mnt/live/memory/images/006_dualgpu.lzm/etc/X11/xorg.conf.d/20-nouveau.conf Section "Device" Identifier "Card0" # Driver "nouveau" Option "PageFlip" "1" Option "AccelMethod" "glamor" Option "DRI" "3" EndSection main tool being DRI "3" line. kernel uname -a Linux slax 5.6.14-x64 #1 SMP PREEMPT Thu May 21 23:01:18 MSK 2020 x86_64 Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz GenuineIntel GNU/Linux X server 1.20.13 va-api driver #1 vainfo --display drm vainfo: VA-API version: 1.13 (libva 2.13.0) vainfo: Driver version: Intel i965 driver for Intel(R) Sandybridge Mobile - 1.8.3 vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileH264StereoHigh : VAEntrypointVLD VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileNone : VAEntrypointVideoProc vaapi driver #2: DRI_PRIME=1 LIBVA_DRIVER_NAME=r600 vainfo --display drm --device /dev/dri/renderD129 vainfo: VA-API version: 1.13 (libva 2.13.0) vainfo: Driver version: Mesa Gallium driver 23.2.0-devel for AMD CAICOS (DRM 2.50.0 / 5.6.14-x64, LLVM 16.0.6) vainfo: Supported profile and entrypoints VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointVLD VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264Main : VAEntrypointVLD VAProfileH264High : VAEntrypointVLD VAProfileNone : VAEntrypointVideoProc i965 driver from 1.8 branch ===== hm, so it also works slow with just Intel device. But may be this is because I run whole thing with remote display via ssh! On Sat, Aug 26, 2023 at 10:45 AM Andrew Randrianasulu <[email protected]> wrote:
Because I have this dual-gpu laptop with intel and radeon (r600) decoding devices I tried to get second (mesa/r600) device going but init failed .. I looked into decoding example:
https://gist.github.com/kajott/d1b29c613be30893c855621edd1f212e
and created attached patch
now you can select your specific device with env variable:
CIN_DRM_DEC=/dev/dri/renderD129 DRI_PRIME=1 LIBVA_DRIVER_NAME=r600 bin/cin
in theory same treatment can be applied (with different variable name) to second instance of av_hwdevice_ctx_create (in hw encoder init) but I have no device to test it ...
On Sat, Aug 26, 2023 at 3:36 AM Andrew Randrianasulu < [email protected]> wrote:
Actually, I think this version will do encode vaapi device selection too, like this:
CIN_DRM_DEC=/dev/dri/renderD129 CIN_DRM_ENC=/dev/dri/renderD128 bin/cin
Since Andrea and I both tested a little, I have checked this version into GIT. I will update the Manual later when I add Andrea's latest changes + other minor stuff.
Also checked new Mirror video plugin (anonymous contribution) into GIT and if Andrea has time to build and check it out and update the Plugins.tex file to include it, that would be highly appreciated. I did update Info so that if Info is turned on in the Resources window and you highlight Mirror you can see that as shown next. Mirror: Mirror horizontal or vertical with the ability to swap left to right or top to bottom. And if enable reflection center checked, can vary X/Y centering. + effect can work with or without "Enable Reflection Center" but when "Enable Reflection Center" is CHECKED the swap side is automatic so that both the CheckBoxes "Swap LEFT-RIGHT side" and "Swap TOP-BOTTOM side" are hidden and disabled.
пн, 28 авг. 2023 г., 20:43 Phyllis Smith <[email protected]>:
On Sat, Aug 26, 2023 at 3:36 AM Andrew Randrianasulu < [email protected]> wrote:
Actually, I think this version will do encode vaapi device selection too, like this:
CIN_DRM_DEC=/dev/dri/renderD129 CIN_DRM_ENC=/dev/dri/renderD128 bin/cin
Since Andrea and I both tested a little, I have checked this version into GIT. I will update the Manual later when I add Andrea's latest changes + other minor stuff.
Also checked new Mirror video plugin (anonymous contribution) into GIT and if Andrea has time to build and check it out and update the Plugins.tex file to include it, that would be highly appreciated. I did update Info so that if Info is turned on in the Resources window and you highlight Mirror you can see that as shown next. Mirror: Mirror horizontal or vertical with the ability to swap left to right or top to bottom. And if enable reflection center checked, can vary X/Y centering. + effect can work with or without "Enable Reflection Center" but when "Enable Reflection Center" is CHECKED the swap side is automatic so that both the CheckBoxes "Swap LEFT-RIGHT side" and "Swap TOP-BOTTOM side" are hidden and disabled.
Effect works for me, initially I thought it will just flip sides but it works differently, visually splitting image into halfs ... So, thanks, hopefully it will be useful in itself and as example of adding new plugins!
Good plugin; thanks. I append manual plugins.tex, image and mirror.txt, for those who want to read the description but don't have latex. Please propose corrections and improvements, thank you.
Andrea, checked into GIT. That is a "cute" mirror.png image! It reads good for me and I only made 1 minor change changing "i.e." to "that is" -- I always worry about users who may be confused by the i.e. if translating from english. I append manual plugins.tex, image and mirror.txt, for those who want
to read the description but don't have latex. Please propose corrections and improvements, thank you.
@Andrea_paz about Mirror plugin. I read your text about the Mirror plugin, but I think there is a misunderstanding. Mainly in the Mirror effect there are 2 cases: CHECKED or UNCHECKED the "Enable Reflection Center" option. 1. When the "Enable Reflection Center" option is UNCHECKED, the used reflection is on the center of the frame (i.e. X=50%, Y=50%) and the options about "Reflection Center", X% and Y%, are disabled (grayed). The "Swap LEFT-RIGHT side" is for the Horizontal direction, the "Swap TOP-BOTTOM side" is for the Vertical direction. There are special combinations when both Horizontal and Vertical checkboxes are enabled (and "Enable Reflection Center" is always UNchecked, of course). You can see those in my "Cin_MirrorPlugin_AllTheCases_A4-size.png" added. And for testing purpose in Cinelerra-GG you can use "Shape_circle-square-triangle-x_1920x1080.png" image. 2. When the "Enable Reflection Center" option is CHECKED the options about "Reflection Center", i.e. X% and Y%, are enabled, and the two "Swap ... side" options disabled and hidden. These two "Swap" are disabled because the X% and Y% run the swap side automatically. The X% and Y% positions move the center of the reflection to fit to the User's need. I added a demo video (see the link below) about "Enable Reflection Center"=checked. The demo want to show an example to ce=reate a fake "mirror on the water". Cin_Mirror-plugin_test.ogv --> https://files.fm/u/zh4takhk8 I hope it is more clear. Thanks! IgorBeg Il 29/08/2023 14:45, Andrea paz via Cin ha scritto:
Good plugin; thanks. I append manual plugins.tex, image and mirror.txt, for those who want to read the description but don't have latex. Please propose corrections and improvements, thank you.
Please, I don't quite understand where I went wrong. I am confused. Can you write the exact text to put in the manual, also using your wonderful example and images, and I will translate it into latex to upload it?
For me the misunderstanding is in bolt text below (and wrong), sorry. ****** Swap LEFT-RIGHT side: Swaps the two horizontal reflection half-planes, reversing their orientation.*If this option is enabled, Enable Reflection Center is disabled.* Swap TOP-BOTTOM side: Swaps the two vertical reflection half-planes, reversing their orientation.*If this option is enabled, Enable Reflection Center is disabled. ******* I added a ODT file if you want to see/use it. Thanks! IgorBeg Il 30/08/2023 11:04, Andrea paz ha scritto:
Please, I don't quite understand where I went wrong. I am confused. Can you write the exact text to put in the manual, also using your wonderful example and images, and I will translate it into latex to upload it?
Thanks to the valuable contribution of IgorBeg the Mirror plugin section has been corrected and improved, also using a very explanatory image. I remind everyone that it is important to contribute both corrections and additions as well as totally new contributions. The manual is very large and complex and needs continuous revisions, corrections and additions. Thank you very much, IgorBeg.
@Phyllis Smith Some corrections for the manual. Thanks to IgorBeg.
Thank you. I have tested it and checked into GIT (I was in a hurry yesterday when I checked it in before I started the builds and so did not review it beforehand). On Fri, Sep 1, 2023 at 6:55 AM Andrea paz <[email protected]> wrote:
@Phyllis Smith Some corrections for the manual. Thanks to IgorBeg.
Thanks to you! Il 01/09/2023 23:55, Phyllis Smith ha scritto:
Thank you. I have tested it and checked into GIT (I was in a hurry yesterday when I checked it in before I started the builds and so did not review it beforehand).
On Fri, Sep 1, 2023 at 6:55 AM Andrea paz <[email protected] <mailto:[email protected]>> wrote:
@Phyllis Smith Some corrections for the manual. Thanks to IgorBeg.
I have done the two icons for "cinfinity" and "cinfinity"2 folders. The icon shows a cup of coffee and its mirror. If you want to use them I add the compressed file and the PNG for cinfinity2 here like a demo without downloading the file. Thanks! IgorBeg
Looks very good. Checked into GIT just now. On Thu, Sep 21, 2023 at 6:22 AM Andrea paz via Cin < [email protected]> wrote:
Really good work. Congratulations! -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Thanks! Il 22/09/2023 00:32, Phyllis Smith via Cin ha scritto:
Looks very good. Checked into GIT just now.
On Thu, Sep 21, 2023 at 6:22 AM Andrea paz via Cin <[email protected] <mailto:[email protected]>> wrote:
Really good work. Congratulations! -- Cin mailing list [email protected] <mailto:[email protected]> https://lists.cinelerra-gg.org/mailman/listinfo/cin
Andrew, I ran out of time today but will test the 2 submitted vaapi patches, although I only have 1 device, just to make sure single device works as expected still (which I am sure it does, but I like to verify whatever I can). On Sat, Aug 26, 2023 at 1:55 AM Andrew Randrianasulu < [email protected]> wrote:
Because I have this dual-gpu laptop with intel and radeon (r600) decoding devices I tried to get second (mesa/r600) device going but init failed .. I looked into decoding example:
https://gist.github.com/kajott/d1b29c613be30893c855621edd1f212e
and created attached patch
now you can select your specific device with env variable:
CIN_DRM_DEC=/dev/dri/renderD129 DRI_PRIME=1 LIBVA_DRIVER_NAME=r600 bin/cin
in theory same treatment can be applied (with different variable name) to second instance of av_hwdevice_ctx_create (in hw encoder init) but I have no device to test it ...
I tried to install the two patches but failed. It tells me: Failed do not recognize patch format Could you post them as a .patch?
try this? вс, 27 авг. 2023 г., 19:10 Andrea paz <[email protected]>:
I tried to install the two patches but failed. It tells me: Failed do not recognize patch format
Could you post them as a .patch?
participants (4)
-
Andrea paz -
Andrew Randrianasulu -
Igor BEGHETTO -
Phyllis Smith