[PATCH 0/23] MR10687: Draft: colorcnv, msvproc, resampledmo: Import and use libswresample and libswscale.
This is an attempt at importing some of FFmpeg code as a PE library, in order to use it to implement audio and video conversion. It removes the need to have the corresponding components available through Gstreamer on the unix side, improves compatibility, as well as performance by a large amount. This is the case in particular for video format conversion. Note that for now it will only benefit pipelines that use these components on the PE side, which is not the majority of use cases right now because we are still doing more than we should on the Gstreamer. I think the idea could perhaps later be extended to cover demuxers (although that could be a bit controversial, but I believe most Linux distributions are distributing them without concerns now), leaving only decoder components to be possibly delegated to the unix side to avoid going into dangerous waters. ``` Measured conversion times for a 4K video frame, average over 1000 calls: (gstreamer) (ffmpeg) I420 -> NV12 2d:0 flip:0 0.232932ms -> 0.122778ms (1.90x) I420 -> NV12 2d:1 flip:0 0.212732ms -> 0.153243ms (1.39x) I420 -> RGB565 2d:0 flip:0 0.415617ms -> 0.153634ms (2.71x) I420 -> RGB24 2d:0 flip:0 0.652448ms -> 0.147694ms (4.42x) I420 -> RGB32 2d:0 flip:0 0.468539ms -> 0.144602ms (3.24x) I420 -> RGB32 2d:0 flip:1 0.442714ms -> 0.176187ms (2.51x) I420 -> RGB32 2d:1 flip:0 0.432901ms -> 0.205248ms (2.11x) I420 -> RGB32 2d:1 flip:1 0.434456ms -> 0.164153ms (2.65x) I420 -> ARGB32 2d:0 flip:0 0.484792ms -> 0.166264ms (2.92x) NV12 -> I420 2d:0 flip:0 0.237323ms -> 0.070567ms (3.36x) NV12 -> I420 2d:1 flip:0 0.233147ms -> 0.085753ms (2.72x) NV12 -> RGB565 2d:0 flip:0 1.073673ms -> 0.628600ms (1.71x) NV12 -> RGB24 2d:0 flip:0 1.310258ms -> 0.737381ms (1.78x) NV12 -> RGB32 2d:0 flip:0 1.365511ms -> 0.810218ms (1.69x) NV12 -> RGB32 2d:0 flip:1 1.213529ms -> 0.832048ms (1.46x) NV12 -> RGB32 2d:1 flip:0 1.185173ms -> 0.821544ms (1.44x) NV12 -> RGB32 2d:1 flip:1 1.051457ms -> 0.837046ms (1.26x) NV12 -> ARGB32 2d:0 flip:0 1.111438ms -> 0.814145ms (1.37x) ``` -- This merge request has too many patches to be relayed via email. Please visit the URL below to see the contents of the merge request. https://gitlab.winehq.org/wine/wine/-/merge_requests/10687
Luckily these libraries are statically linked (which works around the main issue with FFmpeg) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10687#note_136659
participants (2)
-
Aida Jonikienė (@DodoGTA) -
Rémi Bernon (@rbernon)