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 30th April 2024, 14:45   #9301  |  Link
kurkosdr
Registered User
 
Join Date: Aug 2009
Posts: 333
Quote:
Originally Posted by benwaggoner View Post
it's about grain reconstruction based on metadata, ala AV1's Film Grain Synthesis. But a very old basic version originally designed for H.264. The only platform that supported it IIRC was HD-DVD, but AFAIK it wasn't ever used on actual discs. People thought it was limited at best back then.

Perhaps coupled with modern de-grain and parameterization technology, maybe?

I think AVFG1 is more likely to be important.
I am wondering, is it possible to get AVFG1 implemented on not just H.265 encoders and decoders but also H.264 encoders and decoders? (I don't see why not) I am one of those people who think that film grain should always be removed at post-production in the same way that interlaced scenes that are added to a progressive stream should always be de-interlaced. Film grain was typically removed when authoring DVDs, the whole idea of leaving film grain in was a flex of HD-DVD and Blu-Ray to advertise their large capacity (aka average bitrates) compared to AVCHD/BD9/HD-VMD and the then-nascent streaming services.

If film grain can be made into an effect instead of making the encoder scream, I'd be much happier. Yes, even if the effect isn't present on existing H.264 and H.265 decoders. Nobody else than film buffs cares.

Last edited by kurkosdr; 30th April 2024 at 17:40.
kurkosdr is offline   Reply With Quote
Old 30th April 2024, 18:25   #9302  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,819
Quote:
Originally Posted by kurkosdr View Post
I am wondering, is it possible to get AVFG1 implemented on not just H.265 encoders and decoders but also H.264 encoders and decoders? (I don't see why not) I am one of those people who think that film grain should always be removed at post-production in the same way that interlaced scenes that are added to a progressive stream should always be de-interlaced. Film grain was typically removed when authoring DVDs, the whole idea of leaving film grain in was a flex of HD-DVD and Blu-Ray to advertise their large capacity (aka average bitrates) compared to AVCHD/BD9/HD-VMD and the then-nascent streaming services.

If film grain can be made into an effect instead of making the encoder scream, I'd be much happier. Yes, even if the effect isn't present on existing H.264 and H.265 decoders. Nobody else than film buffs cares.
AVFG1 is entirely codec agnostic, and absolutely could be applied to H.264 or any other codec that supports SEI. And the grain removal and parameterization process is also codec agnostic, and takes place on uncompressed frames pre-encoder. The input to the encoder is the detrained frames and the SEI messages to embed. If one is encoding to multiple AVFG1 streams, the grain removal and parameterization would be shared across codecs, all of them getting the same frames and SEI stream.

FWIW, HD-DVD did have support for the old H.264 FGS technology mandatory. No mainstream titles used it however, due to technical limitations at the time. Degraining and parameterization were vastly more challenging in 2006 than in 2024. We can spend a couple orders of magnitude more FLOPS/pixel now, and have AI/ML, for which this is a well-suited task.

I never got to play with it enough to determine if the synthesis part was flexibile and high quality enough, though.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 30th April 2024, 18:34   #9303  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,819
Quote:
Originally Posted by excellentswordfight View Post
Intel Xeon Gold 6426Y (Sapphire Rapids) 16C/32T

Medium:
Non-AVX512: 11,72fps
AVX512: 11,87fps

slow:
Non-AVX512: 4,17fps
AVX512: 4,49fps

slower:
Non-AVX512: 1,15fps
AVX512: 1,22fps

So, yes, there has been some major improvements on avx512 load from Intel, I actually didnt see any downclocking at all! So its looks like that part is finally solved on Intel cpus as well. And without downclocking I saw the 5-10% improvement that I was expecting on the AMD side without downclocking. So it does indeed look like AMD is hurt by the "double pumping" of the avx512 load used in this scenario.
IIRC, the AVX-512 down clocking was internal, and didn't result in the actual CPU frequency dropping. But some internal components wound up running at half clock speed. It took MCW quite some time to figure out what was going on with poor AVX-512 performance, and AVX2 before that.

Quote:
So, it looks like for sapphire rapids (and newer), you might wanna run with avx512, with that said, pretty sure apples to apples, AMD will outperform Intel regardless of avx512.
I expect that there will be bigger gains with higher resolution, and less or perhaps none with lower resolutions.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 30th April 2024, 20:50   #9304  |  Link
excellentswordfight
Lost my old account :(
 
Join Date: Jul 2017
Posts: 332
Quote:
Originally Posted by benwaggoner View Post
IIRC, the AVX-512 down clocking was internal, and didn't result in the actual CPU frequency dropping. But some internal components wound up running at half clock speed. It took MCW quite some time to figure out what was going on with poor AVX-512 performance, and AVX2 before that.
No, it sure did, and it was pretty aggressive as well, the first skylake-sp models i tried it on dropped from like 2,5Ghz to 1,9Ghz, tanking performance. But it was already vastly improved in ice lake, and pretty much "fixed" now I guess in sapphire rapids.
excellentswordfight is offline   Reply With Quote
Old 30th April 2024, 20:53   #9305  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,819
Quote:
Originally Posted by excellentswordfight View Post
No, it sure did, and it was pretty aggressive as well, the first skylake-sp models i tried it on dropped from like 2,5Ghz to 1,9Ghz, tanking performance.
Yeah, but the internal SIMD clock speed dropped more in a way that was very challenging to measure. If it was only a 25% drop like above, AVX-512 still would have been a lot faster for anything >256 bits.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 30th April 2024, 21:12   #9306  |  Link
excellentswordfight
Lost my old account :(
 
Join Date: Jul 2017
Posts: 332
Quote:
Originally Posted by benwaggoner View Post
Yeah, but the internal SIMD clock speed dropped more in a way that was very challenging to measure.
Well you stated:

"and didn't result in the actual CPU frequency dropping"

But as I said, it sure did.


Quote:
If it was only a 25% drop like above, AVX-512 still would have been a lot faster for anything >256 bits.
Regardless of if there are any internal SIMD frequency things going on, even the first generation of CPUs with AVX512 support could easily double performance with the right workload (although one could argue that you might as well run that on GPUs), and still x265, even now when you dont have to make up for a lower frequency deficit only see minor performance gains, and to me that simply implies that its simply not a great fit for this workload.

Last edited by excellentswordfight; 30th April 2024 at 21:17.
excellentswordfight is offline   Reply With Quote
Old 30th April 2024, 21:17   #9307  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,819
Quote:
Originally Posted by excellentswordfight View Post
Well you stated:

"and didn't result in the actual CPU frequency dropping"

But as I said, it sure did.
Yes, absolutely. I should have said "reduced in frequency dropping unrelated to the reported CPU frequency"

Quote:
Regardless of if there are any internal SIMD frequency things going on, even the first generation of CPUs with AVX512 support could easily double performance with the right workload (although one could argue that you might as well run that on GPUs), and still x265, even now only see minor performance gains, and to me that simply implies that its simply not a great fit for this workload.
Encoding is a mix of multiple performance-stressing features. CABAC is all about single-threaded arithmetic performance, for example.

x265 turned out to be more CPU intensive than Intel's then internal "worst case" CPU stress test software, which was pretty surprising to all involved.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 9th May 2024, 15:21   #9308  |  Link
Barough
Registered User
 
Barough's Avatar
 
Join Date: Feb 2007
Location: Sweden
Posts: 491
x265 v3.6+13
https://www.mediafire.com/file/5ccmdfxvj64h3wx
__________________
Do NOT re-post any of my Mediafire links. Download & re-host the content(s) if you want to share it somewhere else.
Barough is offline   Reply With Quote
Old 15th May 2024, 02:18   #9309  |  Link
Hellboy.
Registered User
 
Join Date: Mar 2020
Posts: 42
I did some tests (slow, crf19, 4K-HDR) with this 3 settings "repeat-headers, aud, hrd", and the quality was exactly the same, the speed was almost the same and the size was almost the same.
I compared some frames using a lot of zoom and there is no different.

So i can leave this 3 settings always enables when encode 1080p, 4K-SDR and 4K-HDR?

Not 100% sure what this settings do but i think they create a more compatible file.
Thanks.

Last edited by Hellboy.; 15th May 2024 at 02:24.
Hellboy. is offline   Reply With Quote
Old 15th May 2024, 10:00   #9310  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,596
They do create a more compatible file satisfying BD restrictions in that regard,
so BD capable devices/software should have no problems if you satisfy their other restrictions as well.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Old 15th May 2024, 21:50   #9311  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,819
Quote:
Originally Posted by Emulgator View Post
They do create a more compatible file satisfying BD restrictions in that regard,
so BD capable devices/software should have no problems if you satisfy their other restrictions as well.
You need to use --repeat-headers for adaptive streaming as well, especially for HDR to make sure the 2084 metadata goes into each GOP.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 15th May 2024, 22:28   #9312  |  Link
Hellboy.
Registered User
 
Join Date: Mar 2020
Posts: 42
So there are no point in use this 3 settings if i don't create a full BD compliant file?

Edit:
Except for --repeat-headers that is needed for HDR.

Last edited by Hellboy.; 15th May 2024 at 22:39.
Hellboy. is offline   Reply With Quote
Old 16th May 2024, 01:47   #9313  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,819
Quote:
Originally Posted by Hellboy. View Post
So there are no point in use this 3 settings if i don't create a full BD compliant file?

Edit:
Except for --repeat-headers that is needed for HDR.
Or if you're making streams for something else that wants them for compatibility. They don't affect the encode itself one way or another.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 21st May 2024, 21:43   #9314  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,849
New upload: x265 3.6+13-0ed28893d

[Windows][GCC 14.1.0][32/32XP/64 bit] 8bit+10bit+12bit
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 23rd May 2024, 21:09   #9315  |  Link
Barough
Registered User
 
Barough's Avatar
 
Join Date: Feb 2007
Location: Sweden
Posts: 491
x265 v3.6+28 (GCC 14.1.0)
https://www.mediafire.com/file/p3zsun9oj3gcutu
__________________
Do NOT re-post any of my Mediafire links. Download & re-host the content(s) if you want to share it somewhere else.
Barough is offline   Reply With Quote
Old 24th May 2024, 06:41   #9316  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,849
Please note that most of the latest patches are related to AArch64 / ARM64 architecture and instruction set. There won't be any relevant improvement for intel x86-64 CPUs.
__________________

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 17:41.


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