-
Notifications
You must be signed in to change notification settings - Fork 169
Port vainfo and tests for libva-win32 #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
As a draft this is great. For the final PR please consider:
The final pieces don't make sense to port IMHO:
|
b28f64b to
2525817
Compare
|
@evelikov thanks for taking a look, please see inline.
[sivileri] Will do.
[sivileri] Got it. I ran it through the files I changed, no changes needed.
[sivileri] I tried doing this earlier today, I could use a similar win32_compat like the one used for the libva repo for some of the it like the time.h functions and variadic macros, but in here the changes need to be a bit more invasive and will change significant parts of the existing code, the biggest reason being the explicit initialization with To avoid doing such a disruptive change on existing code, and considering there are open source samples for VA on Windows here that do adapter enumeration and selection, encode, video processing, importing/exporting of surfaces and interop with D3D12 to present surfaces to screen, maybe we can add those to this repo and/or link them here to the project where those live? I'll work on porting a decode example in that sample app for completeness. Edit: Added decode sample based on llibva-utils sample
[sivileri] Sounds good. |
Off the top of my head, tests/gtest should just work with MSVC, do shout if it does not. Actual tests like
Not familiar with the details off the top of my head. If you have references I might come-up with some half-crazy idea :-)
No idea if copying these into the repo will try. Although having at least one actual example ported (apart from vainfo of course) - decode or others, would be amazing IMHO. |
2525817 to
ee9b724
Compare
|
Glancing at the in-repo tools - they have been bit-rotting since 2016 when they were split out of libva itself. In libva we've had a dozen APIs and even more enum additions, while this repo has predominantly seen static analyser fixes. There is one notable exception - porting the tests to GTest \o/ Now I see why you saw more value in writing fresh HelloWorld demos instead of digging into the graveyard 👍 Personally I would strongly recommend porting the tests and not worrying about the rest. They should be trivial to fix, plus the Mesa CI should be using them already (or is about to soon). |
ee9b724 to
aad3399
Compare
I went ahead and ported the tests too now, I was able to build and run them. |
aad3399 to
4e9b024
Compare
|
Incoming some nitpicks and a question for the mid-long run. Overall I'm in favour of the PR and don't see anything being off. |
We are waiting for @XinfengZhang to try libva and libva-utils changes. This won't happen earlier than next week due to holidays in China. |
|
@dvrogozh @XinfengZhang now that intel/libva#621 is merged, could you please enable the workflows execution? I'll work on making them work with the libva-win32 dependency from libva/master |
0f391c8 to
d46dd7e
Compare
d114d7e to
b9d961e
Compare
There we go: https://github.com/sivileri/libva-utils/actions/runs/3244558566/jobs/5320888674 :) Please let me know if I can do anything else before we can merge this MR too. |
Approved. But mind that this is a manual action which needs to be done each time till you won't have at least 1 commit merged:). So, if you will push an update it will need a new approval. |
|
freebsd build fails (you need to open "test" stage to see actual error): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
What did you do to fix freebsd build? Can you point to the change, please?
The "Compare" button shows them - aka |
Thanks! DHAVE_VA_WIN32=1 was being always set disregarding of the dependency check. Here's the fix from the latest push: |
|
Thank you for pointing out. I am fine with the change. @XinfengZhang : can you, please, take a look and merge? |
| subdir('vendor/intel/sfcsample') | ||
|
|
||
| if not use_win32 | ||
| subdir('decode') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to make sample codes work on windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For most of them we don't have driver support yet to test it (ie. mpeg2, jpeg decode, vp8/vp9 encode and most VPP effects tested). I think the ones we could port and test today are: encode H264/HEVC and VPP scaling and color conversion (only NV12, P010 and RGBX supported in driver at the moment).
From those we could port and test at the moment, cross-platform porting is needed, the most notable port needed would be pthreads for the encode samples.
As we're also in the process of writing new samples for Windows that cover those same Decode/Encode/VPP scenarios implemented by the driver today, also showing D3D12/Libva interoperability and adapter enumeration/selection, could we maybe point to those samples instead in the documentation? The goal is to upstream the open source samples to DirectX-Graphics-Samples when finished.
You can find the in-progress samples in: H264 decode sample similar to intel/sfcsample and VPP Color Conversion + H264 encode that show encode and color conversion
Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
Added windows.yml and EnterDevShell.ps1 for MSVC/mingw building with ninja/meson backend. Signed-off-by: Sil Vilerino <sivileri@microsoft.com>



This MR ports vainfo and the gtest suite for Windows using libva-win32
Requires: intel/libva#621