Avidemux Forum

Avidemux => Windows => Topic started by: User007 on October 27, 2023, 05:43:19 PM

Title: HW acceleration question.
Post by: User007 on October 27, 2023, 05:43:19 PM
Even with HW acceleration 6K video play's very slow motion, however resource usage is not even maxed out.
Its not like it lagging, but its playing very slow, not real time.

Nvidia GTX 1070

Title: Re: HW acceleration question.
Post by: eumagga0x2a on October 27, 2023, 06:58:29 PM
Transfer of decoded pictures from GPU to the main memory and back to GPU for display may be the bottleneck.
Title: Re: HW acceleration question.
Post by: User007 on October 28, 2023, 08:31:45 AM
Quote from: eumagga0x2a on October 27, 2023, 06:58:29 PMTransfer of decoded pictures from GPU to the main memory and back to GPU for display may be the bottleneck.
Any test/benchmark i can run to see if it really is the problem?
Title: Re: HW acceleration question.
Post by: User007 on October 31, 2023, 08:01:03 AM
Also why i am not facing this type of memory bandwidth limitation in any video player that supports HW acceleration or video editors like Davinci Resolve and Adobe Premiere etc?

Memory type i have is on the screenshot CPU i5-4460, GPU Nvidia GTX 1070 8GB
Title: Re: HW acceleration question.
Post by: eumagga0x2a on October 31, 2023, 01:11:18 PM
Quote from: User007 on October 31, 2023, 08:01:03 AMwhy i am not facing this type of memory bandwidth limitation in any video player that supports HW acceleration

Probably because these players use a more modern version of DirectX interface that allows submitting of decoded pictures from hw decoder to display pipeline not requiring a wasteful roundtrip via the main memory.
Title: Re: HW acceleration question.
Post by: User007 on November 06, 2023, 08:54:09 PM
My current memory is DDR3 speed about 23,000MB/s?

Is there way i calculate what memory bandwidth is needed to play 4000 x 3000 AVC encoded 100Mbit mp4 file?

Title: Re: HW acceleration question.
Post by: User007 on November 08, 2023, 09:30:13 PM
How many CPU cores/threads does AviSynth support, if i get CPU with 12cores and 24 threads will they all be used in decoding when playing back video and encoding as well?
Title: Re: HW acceleration question.
Post by: User007 on November 09, 2023, 08:28:10 PM
Funny thing when i tested the memory speed by removing second memory stick to drop DDR3 speed from 25,000 MB/s to 12,500 MB/s i was still getting same 19 frames (measured with Fraps) per second inside AviSynth with DXVA 2 video output and DXVA 2 HW acceleration.

Think slow HW acceleration has to do with something other than Memory Speed, when i switched to PCI-e v1.0 in BIOS my FPS dropped to 15FPS.

Title: Re: HW acceleration question.
Post by: eumagga0x2a on November 09, 2023, 09:47:04 PM
Quote from: User007 on November 08, 2023, 09:30:13 PMHow many CPU cores/threads does AviSynth support

I know nothing about AviSynth. If you mean Avidemux, multi-threaded decoding generally strongly depends from the way the source had been encoded. Hardware accelerated decoders (in Avidemux) require decoder multi-threading to be disabled. If the CPU is that powerful, you might be better off disabling hw decoding and enabling multi-threading (just leave display set to "DXVA2" or at least any other than "Qt").

With libavcodec multi-threading set to "auto", libavcodec-based sw decoders will be initialized with maximum number of threads equal the number of logical CPU cores. How many threads will be really used, depends on the properties of the particular video.