Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th January 2021, 22:23   #7961  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by LoRd_MuldeR View Post
Thanks! Any chance you can include 32-Bit binary as well, as you used to do?
What's your use case for a 32-bit version?
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 27th January 2021, 23:37   #7962  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by benwaggoner View Post
What's your use case for a 32-bit version?
I usually include 32-Bit and 64-Bit binaries with my GUI, so we can pick the "best" one for the specific machine at runtime.

Of course, you could ask whether it still makes sense to support 32-Bit systems these days. But the code for supporting multiple architectures is already there in the GUI, so I don't see much reason to drop this feature.

...unless it becomes too cumbersome to obtain 32-Bit encoder binaries

(Another possible use case is Avisynth input: If you want to use "official" AviSynth 2.6, you'll be locked to 32-Bit. And yes, I know there is Avisynth+ as well as VapurSynth now)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 27th January 2021 at 23:52.
LoRd_MuldeR is offline   Reply With Quote
Old 28th January 2021, 01:47   #7963  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by LoRd_MuldeR View Post
I usually include 32-Bit and 64-Bit binaries with my GUI, so we can pick the "best" one for the specific machine at runtime.

Of course, you could ask whether it still makes sense to support 32-Bit systems these days. But the code for supporting multiple architectures is already there in the GUI, so I don't see much reason to drop this feature.
At higher resolutions and presets, x265 can use more than 2 GB; some of my 8K tests used >>4GB of RAM. And 64-bit is just faster overall. The only use case where I can imagine 32-bit being "best" is running a 32-bit OS. If you are still supporting 32-bit OSes, you'd need a 32-bit build.

Quote:
(Another possible use case is Avisynth input: If you want to use "official" AviSynth 2.6, you'll be locked to 32-Bit. And yes, I know there is Avisynth+ as well as VapurSynth now)
And just piping from 32-bit AVS to a 64-bit encoding process is trivial. I've been doing that for more than a decade. The piping overhead is generally a lot smaller than the 64-bit encoding performance boost.

Not that I have any skin in the game or anything, just an aversion to 32-bit for anything performance-critical .
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 28th January 2021, 02:30   #7964  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by benwaggoner View Post
The only use case where I can imagine 32-bit being "best" is running a 32-bit OS. If you are still supporting 32-bit OSes, you'd need a 32-bit build.
That's exactly the point. The GUI program is 32-Bit, so can run on 32-Bit as well as 64-Bit platforms. At the same time, the encoder binary will be selected, at runtime, based on the actual CPU architecture.

So "best" means we select the 64-Bit binary, if we detect that we are running on 64-Bit system; otherwise 32-Bit binary will be selected.

As said before: You can argue that support for 32-Bit OS is mostly irrelevant these days. But since support for multiple CPU architectures has already been implemented in the GUI, supporting 32-Bit OS pretty much comes for free.

(provided 32-Bit encoder binaries are easily available )

Quote:
Originally Posted by benwaggoner View Post
And just piping from 32-bit AVS to a 64-bit encoding process is trivial.
Yeah, sure. But I was referring to LigH's "Asuna" x265 build, which features built-in Avisynth support. And if you want to use built-in Avisynth input, your Avisynth DLL has to match the "bitness" of the x265 binary.

(If you pipe from Avs2YUV or similar tool, then we don't need Avisynth support in x265 to begin with)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 28th January 2021 at 02:38.
LoRd_MuldeR is offline   Reply With Quote
Old 28th January 2021, 02:49   #7965  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 478
@Ligh, thanks very much for your build! I gotta ask, did you notice any memory leak issues? I did an overnight encode, only to wake up and find that x265.exe has ate most of my RAM. Did a bit of googling and found that DJATOM might have fixed the memory leak, not sure the same bit of code is in your code base?

https://github.com/staxrip/staxrip/issues/445
aegisofrime is offline   Reply With Quote
Old 28th January 2021, 03:32   #7966  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
Yuuki Asuna mod merged my early VS reader works. After some testing from StaxRip users and devs it was found that vspipe's strategy of requesting new frames doesn't work well, I tried different approach to the problem and now it seems no leaks spotted. You can get my build on github and try it. If leak still occurs, describe in details how to reproduce it.
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Old 29th January 2021, 12:04   #7967  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
I will try to build it again as soon as I get a fix for rust / cargo failing.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 29th January 2021, 16:23   #7968  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by DJATOM View Post
Yuuki Asuna mod
Quoted just to hail you.

Can you please explain me the meaning of the files inside your x265 build on GitHub? The ones with the processor suffix are self explanatory, I need clarifications about:

x265-x64-v3.4+65-aMod-gcc10.2.1.exe
x265-x64-v3.4+65-aMod-gcc10.2.1-opt-znver1.exe
x265-x64-v3.4+65-aMod-gcc10.2.1-opt-znver2.exe

Moreover, can you explain me how your builds are different from the LigH one? AVS support, etc?

Thanks.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 29th January 2021, 17:10   #7969  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
CPU-specific builds made with (for example, zen2 = -march=znver2) compiler flag which should optimize program for specific CPU microarchitecture. Non-opt build is just generic build without such flag.
As for differences, I tried to make commits descriptive. But yeaр, it contains 2 frameserver readers (Avisynth+/Vapoursynth) and y4m reader understand vspipe's XLENGTH header, which "says" how much frames x265 should expect from it.
LigH just uses another mod for his builds. I'm not saying that my build/mod is superior, it just contains certain feature set that I'm using for my needs. That's it.
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Old 29th January 2021, 18:01   #7970  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Quote:
Originally Posted by DJATOM View Post
But yeaр, it contains 2 frameserver readers (Avisynth+/Vapoursynth) and y4m reader understand vspipe's XLENGTH header, which "says" how much frames x265 should expect from it.
Thank you for your answer.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 29th January 2021, 22:10   #7971  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Just curious - has anyone done any perf benchmarking of x265 on ARM processors? With the Apple M1 and workstation successors coming, and the AWS Graviton EC2 instances, it seems we're on the verge of high-performance ARM w/ SIMD compute becoming available. Obviously x265 has a HUGE amount of x64 assembly optimizations, but has some ARM as well. Anyone do any testing or have any data?

I don't imagine that peak ARM perf is anywhere near the latest Ryzen, but perhaps fps/watt is interesting?
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 29th January 2021, 22:54   #7972  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
My friend recently bought a new mac mini with m1 chip, here some numbers on the same source
M1 with 8 gb ram (lpddr4x 4266 mhz) : 5.27 fps
3700x with 32 gb ram (3666 mhz ram oc): 7.73 fps
It was 1080p 8 bit bdmv, encoded in 10 bit mode.
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070

Last edited by DJATOM; 29th January 2021 at 22:57.
DJATOM is offline   Reply With Quote
Old 29th January 2021, 23:08   #7973  |  Link
Ritsuka
Registered User
 
Join Date: Mar 2007
Posts: 95
x265 had almost no arm64 assembly. Apple contributed a patch to HandBrake with some neon intrinsics. Unfortunately there seems no one interesting in getting it merged upstream.
Ritsuka is offline   Reply With Quote
Old 29th January 2021, 23:29   #7974  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
He used that patch: https://imgur.com/a/ArgJEEe
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Old 30th January 2021, 17:10   #7975  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by DJATOM View Post
CPU-specific builds made with (for example, zen2 = -march=znver2) compiler flag which should optimize program for specific CPU microarchitecture. Non-opt build is just generic build without such flag.
As for differences, I tried to make commits descriptive. But yeaр, it contains 2 frameserver readers (Avisynth+/Vapoursynth) and y4m reader understand vspipe's XLENGTH header, which "says" how much frames x265 should expect from it.
LigH just uses another mod for his builds. I'm not saying that my build/mod is superior, it just contains certain feature set that I'm using for my needs. That's it.
But are they actually any faster? If so, by what amount?
Stereodude is offline   Reply With Quote
Old 30th January 2021, 17:32   #7976  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
I didn't compared since I only have Zen2 based PC and sandy bridge based notebook... Apparenly Zen2 optimized build operates slightly faster on my machine. Did you measure some data with your CPU?
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Old 30th January 2021, 19:32   #7977  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,718
At least the Zen2 GCC builds have been faster on my Zen2 system than Visual Studio builds. I don't recall any exact figures, but it was large enough to be noticable, maybe 3-5% with my use.
__________________
And if the band you're in starts playing different tunes
I'll see you on the dark side of the Moon...
Boulder is offline   Reply With Quote
Old 31st January 2021, 01:37   #7978  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Building Asuna mod for Win32 target failed...

Code:
[ 76%] Building CXX object CMakeFiles/cli.dir/input/input.cpp.obj
In file included from F:/MABS/x265-Yuuki-Asuna-Asuna/source/input/avs.h:5,
                 from F:/MABS/x265-Yuuki-Asuna-Asuna/source/input/input.cpp:28:
F:/MABS/local32/include/avisynth/avisynth_c.h:786:39: warning: missing initializer for member 'AVS_Value::array_size' [-Wmissing-field-initializers]
  786 | static const AVS_Value avs_void = {'v'};
      |                                       ^
F:/MABS/local32/include/avisynth/avisynth_c.h:786:39: warning: missing initializer for member 'AVS_Value::d' [-Wmissing-field-initializers]
[ 77%] Building CXX object CMakeFiles/cli.dir/input/y4m.cpp.obj
[ 78%] Building CXX object CMakeFiles/cli.dir/input/yuv.cpp.obj
[ 79%] Building CXX object CMakeFiles/cli.dir/input/lavf.cpp.obj
[ 80%] Building CXX object CMakeFiles/cli.dir/input/avs.cpp.obj
In file included from F:/MABS/x265-Yuuki-Asuna-Asuna/source/input/avs.h:5,
                 from F:/MABS/x265-Yuuki-Asuna-Asuna/source/input/avs.cpp:23:
F:/MABS/local32/include/avisynth/avisynth_c.h:786:39: warning: missing initializer for member 'AVS_Value::array_size' [-Wmissing-field-initializers]
  786 | static const AVS_Value avs_void = {'v'};
      |                                       ^
F:/MABS/local32/include/avisynth/avisynth_c.h:786:39: warning: missing initializer for member 'AVS_Value::d' [-Wmissing-field-initializers]
[ 81%] Building CXX object CMakeFiles/cli.dir/input/vpy.cpp.obj
F:/MABS/x265-Yuuki-Asuna-Asuna/source/input/vpy.cpp: In function 'void frameDoneCallback(void*, const VSFrameRef*, int, VSNodeRef*, const char*)':
F:/MABS/x265-Yuuki-Asuna-Asuna/source/input/vpy.cpp:49:91: error: invalid conversion from 'void (*)(void*, const VSFrameRef*, int, VSNodeRef*, const char*)' to 'VSFrameDoneCallback' {aka 'void (__attribute__((stdcall)) *)(void*, const VSFrameRef*, int, VSNodeRef*, const char*)'} [-fpermissive]
   49 |             vpyCallbackData->vsapi->getFrameAsync(vpyCallbackData->requestedFrames, node, frameDoneCallback, vpyCallbackData);
      |                                                                                           ^~~~~~~~~~~~~~~~~
      |                                                                                           |
      |                                                                                           void (*)(void*, const VSFrameRef*, int, VSNodeRef*, const char*)
F:/MABS/x265-Yuuki-Asuna-Asuna/source/input/vpy.cpp: In member function 'virtual void x265::VPYInput::startReader()':
F:/MABS/x265-Yuuki-Asuna-Asuna/source/input/vpy.cpp:268:39: error: invalid conversion from 'void (*)(void*, const VSFrameRef*, int, VSNodeRef*, const char*)' to 'VSFrameDoneCallback' {aka 'void (__attribute__((stdcall)) *)(void*, const VSFrameRef*, int, VSNodeRef*, const char*)'} [-fpermissive]
  268 |         vsapi->getFrameAsync(n, node, frameDoneCallback, &vpyCallbackData);
      |                                       ^~~~~~~~~~~~~~~~~
      |                                       |
      |                                       void (*)(void*, const VSFrameRef*, int, VSNodeRef*, const char*)
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 31st January 2021, 01:54   #7979  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
Configure project with -fpermissive cxx flag or edit conflicting signature manually.
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Old 31st January 2021, 03:33   #7980  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Thanks @DJATOM.

@LoRd_MuldeR: x265 3.4+13-g729a838d3+41 (Asuna) — no guarantees, check thoroughly!
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:26.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.