Author Topic: Qt6 Application Testing  (Read 178966 times)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2095
  • Karma: +160/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #120 on: February 19, 2023, 01:28:18 am »
Hey Martin,

Do you think you can try to compile Media Downloader 2.8.0 ?
https://github.com/mhogomchungu/media-downloader

Looks like the current cmakelists for media downloader only target Qt5, and would need adapting to build with Qt6.

Cheers,

Paul

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4808
  • Karma: +100/-1
    • View Profile
Re: Qt6 Application Testing
« Reply #121 on: February 19, 2023, 01:48:06 am »
Testing the latest drop, it still freezes the system when accessing youtube.com.
I'll do some more experimenting later but wouldn't be surprised if some ad has some JavaScript triggering the problem. Need to pay attention to memory too, AV1 trades off CPU and memory for lower bandwidth.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4808
  • Karma: +100/-1
    • View Profile
Re: Qt6 Application Testing
« Reply #122 on: February 19, 2023, 02:30:43 am »
A bit more testing, https://tools.woolyss.com/html5-audio-video-tester/?u=woolyss.com/f/caminandes-1-llama-drama-av1-opus.webm plays fine, this is webm. https://tools.woolyss.com/html5-audio-video-tester/?u=woolyss.com/f/Chimera-AV1-8bit-480x270-552kbps.mp4 freezes after 5-10 seconds here, tab can be closed, it is mp4.
The Youtube AV1 test video, https://www.youtube.com/watch?v=hSTp4iX5GsI froze my computer.
So AV1 seems to be fine now, the mp4 container might have problems, the above test had no sound in the container, which shouldn't matter. There's something still wrong with YouTube, whether the way they encode the AV1, the container they mux it into or something else.
More test videos here, https://tools.woolyss.com/html5-audio-video-tester/
I note that some H264 and H265 videos do not display any video

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2095
  • Karma: +160/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #123 on: February 19, 2023, 06:21:58 am »
Testing the latest drop, it still freezes the system when accessing youtube.com.
I'll do some more experimenting later but wouldn't be surprised if some ad has some JavaScript triggering the problem. Need to pay attention to memory too, AV1 trades off CPU and memory for lower bandwidth.

I have no idea why youtube.com would be so much worse since the 20230216 drop - it's a real mystery to me, I may even reinstall the 0216 build - perhaps by coincidence something else has changed?

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2095
  • Karma: +160/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #124 on: February 19, 2023, 06:23:34 am »
A bit more testing, https://tools.woolyss.com/html5-audio-video-tester/?u=woolyss.com/f/caminandes-1-llama-drama-av1-opus.webm plays fine, this is webm. https://tools.woolyss.com/html5-audio-video-tester/?u=woolyss.com/f/Chimera-AV1-8bit-480x270-552kbps.mp4 freezes after 5-10 seconds here, tab can be closed, it is mp4.
The Youtube AV1 test video, https://www.youtube.com/watch?v=hSTp4iX5GsI froze my computer.
So AV1 seems to be fine now, the mp4 container might have problems, the above test had no sound in the container, which shouldn't matter. There's something still wrong with YouTube, whether the way they encode the AV1, the container they mux it into or something else.
More test videos here, https://tools.woolyss.com/html5-audio-video-tester/
I note that some H264 and H265 videos do not display any video

Thanks, this is interesting and those look to be some useful links. h.264 support only appeared on html5test once I enabled proprietary codecs - so maybe I'll go hunting for anything else I may have missed. I don't think the ffmpeg asm matters as we're linking against system avcodec, etc but who knows!

I wonder if we should also modify:
Code: [Select]
src\3rdparty\chromium\third_party\libaom\source\libaom\third_party\libyuv\source\row_x86.asm

also
Code: [Select]
src\3rdparty\chromium\third_party\openh264\src\codec\common\x86\deblock.asm
and friends. openh264 doesn't seem to use x86inc.asm so would need to find somewhere else to define SECTION_TEXT or add another %else to the asm files...

edit: https://github.com/psmedley/qt6-webengine-os2/blob/main/src/3rdparty/chromium/third_party/openh264/src/codec/common/x86/asm_inc.asm seems to be the openh264 equivalent to x86inc.asm that's used in other libs.
« Last Edit: February 19, 2023, 06:34:23 am by Paul Smedley »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4808
  • Karma: +100/-1
    • View Profile
Re: Qt6 Application Testing
« Reply #125 on: February 19, 2023, 06:37:06 am »
Testing the latest drop, it still freezes the system when accessing youtube.com.
I'll do some more experimenting later but wouldn't be surprised if some ad has some JavaScript triggering the problem. Need to pay attention to memory too, AV1 trades off CPU and memory for lower bandwidth.

I have no idea why youtube.com would be so much worse since the 20230216 drop - it's a real mystery to me, I may even reinstall the 0216 build - perhaps by coincidence something else has changed?

Perhaps before it was crashing (silently exiting) trying to play an AV1 video and now that that is fixed, it gets a bit further to something that causes the system lockup? The problem with the system hang did start when you disabled SSE and prevented the AV1 crash.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4808
  • Karma: +100/-1
    • View Profile
Re: Qt6 Application Testing
« Reply #126 on: February 19, 2023, 06:55:48 am »
Libyuv should be fixed, it might be the cause of the 840H byte text segment. Probably not used much as it is for a type of raw video.
Seems you're linking against the system FFmpeg libs so they should be fine.
Have to stare at openh264 a bit, the file you linked doesn't seem to be the problem. It might not even use .text. When I started this stuff the .text segment was rarely used. The Mac macho32 stuff is a good pointer to where we will have problems as they also have similar problems.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4808
  • Karma: +100/-1
    • View Profile
Re: Qt6 Application Testing
« Reply #127 on: February 19, 2023, 07:15:42 am »
Is openH264 being used? Seems not but unsure.
If it is being used, it needs both SECTION .text and SECTION .rodata replaced by macros similar to the others. Guess best added to asm_inc.asm.

TeLLie

  • Full Member
  • ***
  • Posts: 234
  • Karma: +11/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #128 on: February 19, 2023, 08:33:30 am »
Hi Martin,

I have ported that, but it seems our python 3 build is given problems.
And indeed it's Qt5 based ..
« Last Edit: February 19, 2023, 10:37:51 am by TeLLie »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2095
  • Karma: +160/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #129 on: February 19, 2023, 09:41:57 am »
Is openH264 being used? Seems not but unsure.
If it is being used, it needs both SECTION .text and SECTION .rodata replaced by macros similar to the others. Guess best added to asm_inc.asm.

This should be in the development thread, but replying here cos it's easier :) @mods perhaps you can move the dev comments to the other thread?

Just got home from a weekend away, just confirming a couple of things.

1) re: ffmpeg - confirming that obj\third_party\ffmpeg only contains:
Code: [Select]
15/02/23  16:32             735    124  ffmpeg.ninja
 8/01/23  19:36               0    124  ffmpeg.stamp
26/01/23  17:35               0    124  ffmpeg_features.stamp
15/02/23  16:32           1,151    124  ffmpeg_internal.ninja
 8/01/23  19:36           1,536    124  libffmpeg_internal.a

2) re: openh264, confirming that obj\third_party\openh264 contains:
Code: [Select]
12/02/23  16:24         <DIR>      124  common
12/02/23  16:24         <DIR>      124  encoder
12/02/23  16:24         <DIR>      124  processing
15/02/23  16:32           4,867    124  common.ninja
12/02/23  16:24               0    124  common.stamp
15/02/23  16:32           9,129    124  encoder.ninja
12/02/23  16:24               0    124  encoder.stamp
15/02/23  16:32           6,793    124  processing.ninja
12/02/23  16:24               0    124  processing.stamp

and there are 65 .o files in the 3x directories above, so I think the asm is being used. I'll try look into making the necessary changes during the week.

Edit: openh264 isn't currently using asm on os/2:
Code: [Select]
use_assembler = (is_win || is_mac || is_linux || is_chromeos) &&
                (current_cpu == "x86" || current_cpu == "x64") && !is_msan

Edit2: I updated yuv's row_x86.asm but it didn't trigger any source to be rebuilt. Grepping the libaom I don't see anything that triggers row_x86.asm to be built :(

Edit3: I'm going to rebuild *without* proprietary codecs being enbaled - I don't believe that switch is enabled in the bww chromium build, I just enabled it to try and increase the html5test score :)
« Last Edit: February 19, 2023, 11:14:52 am by Paul Smedley »

KO Myung-Hun

  • Newbie
  • *
  • Posts: 16
  • Karma: +5/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #130 on: February 19, 2023, 04:24:38 pm »
re: the trap in dav1d - I'm still suspicious of the patches I made in https://github.com/psmedley/qt6-webengine-os2/commit/805bf77f6685a414b4688534b440b001a7c6252c & https://github.com/psmedley/qt6-webengine-os2/commit/167babc8243d00b067de3c35b4cfdb8829f6974a - particularly given the problems in libvpx as well.

Segment alignment should be 16 at least for SSE. Or use parameter macros such as %1 if possible.

In case of aout, ld aligns segments to 16 bytes boundary unconditionally, so any additional flags are not required.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4808
  • Karma: +100/-1
    • View Profile
Re: Qt6 Application Testing
« Reply #131 on: February 20, 2023, 02:01:53 am »
I tried loading YouTube on a different partition, success the first try, even played 2 videos before the browser vanished, Subsequent tries often ended up with the browser freezing and a zombie process, so needing a reboot and twice it locked the system up.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2095
  • Karma: +160/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #132 on: February 20, 2023, 03:45:59 am »
Interesting, in the next couple of hours I should have a build without enabling proprietary codecs, we'll see what difference (if any) that makes.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2095
  • Karma: +160/-0
    • View Profile
Re: Qt6 Application Testing
« Reply #133 on: February 20, 2023, 09:50:59 am »
Interesting, in the next couple of hours I should have a build without enabling proprietary codecs, we'll see what difference (if any) that makes.
OK that was a bad idea, without proprietary codecs, video is even worse as most formats aren't supported... rebuilding now with proprietary codecs re-enabled...

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4808
  • Karma: +100/-1
    • View Profile
Re: Qt6 Application Testing
« Reply #134 on: February 20, 2023, 05:43:18 pm »
Yes, most sites likely use H264/H265. Guess assembly will need fixing in OpenH264, not sure if your build supports H265.