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 January 2019, 20:55   #6681  |  Link
Stephen R. Savage
Registered User
 
Stephen R. Savage's Avatar
 
Join Date: Nov 2009
Posts: 341
Quote:
Originally Posted by NikosD View Post
But it does make sense in the context of real-world code optimization/execution.

Do you really hear from me for the first time that most non-SIMD code can't utilize a modern CPU in the way that SIMD code can ?

The only way to reach TDP limits of a modern CPU is from optimized SIMD code.

There are other limits to reach before power limits for non-AVX code.
Non-AVX code can and does reach power limits. SKX 28-core can easily reach 165 W in p95 non-AVX. RyZen 2000 hits around 150 W in p95 non-AVX with power limits disabled (which implies throttling with 95 W power limit enforced).
Stephen R. Savage is offline   Reply With Quote
Old 30th January 2019, 22:35   #6682  |  Link
NikosD
Registered User
 
Join Date: Aug 2010
Location: Athens, Greece
Posts: 2,704
Quote:
Originally Posted by Stephen R. Savage View Post
Non-AVX code can and does reach power limits. SKX 28-core can easily reach 165 W in p95 non-AVX. RyZen 2000 hits around 150 W in p95 non-AVX with power limits disabled (which implies throttling with 95 W power limit enforced).
Anyway, SIMD code existed before AVX2, like MMX, SSE, SSE2, SSE3, SSSE3, SEE4.x etc.

For all those SIMD instruction sets, we never had lower clocks not even for AVX1.

AVX2 is even denser than all of those sets, but that doesn't mean that there is no architecture with no performance hit.

Zen 2 could be the first one.
__________________
Win 10 x64 (18363.476) - Core i3-9100F - nVidia 1660 (436.15)
HEVC decoding benchmarks
H.264 DXVA Benchmarks for all
NikosD is offline   Reply With Quote
Old 30th January 2019, 23:22   #6683  |  Link
katzenjoghurt
Registered User
 
Join Date: Feb 2007
Posts: 86
The frustrated encoder

Oh my.
Am I the only one having such a hard time encoding scenes with red light / red backgrounds?

E.g. if a character turns on a red light, his face would turn suddenly totally blocky.
Blue light is fine, green light also seems to be a bit bad, but red light is the devil.
Looks like x265 (also x264 I think) detects the scene as super-dark and reduces
the bitrate like crazy.

I doubt that it's just a display thing as I can see the problem on my Dell display,
my Benq display and my Samsung TV.

By now I fix it by scanning every source for red scenes before encoding and setting
zones like crazy via --zones startframe,endframe,b=1.5/startframe,endfr....
Super-tedious.

I was shocked again today after I checked my encoding of Disney's Aladdin...
Red sand with black dots -> blurred to unshaded flat areas.
Red stone wall backgrounds -> bluuuurr.

Looks like I need to double or triple the bitrate manually in these scenes just to keep
the subjectively visible detail level compared to the non-reddish scenes.

AQ3 won't help all too much either. The overall bitrate would get just too high if
I want to retain the details that way. *sigh*

Last edited by katzenjoghurt; 30th January 2019 at 23:26.
katzenjoghurt is offline   Reply With Quote
Old 31st January 2019, 06:04   #6684  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,966
Quote:
Originally Posted by katzenjoghurt View Post
AQ3 won't help all too much either. The overall bitrate would get just too high if
I want to retain the details that way. *sigh*
Raise CFR with aq-mode 3. The question is what looks best at a given bitrate.

I wish x265 gave us a way to change the SAO parameters, so we could adjust how the smoothing works in different luma ranges.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 31st January 2019, 06:06   #6685  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,966
Quote:
Originally Posted by Stephen R. Savage View Post
That is why I said that hopefully the next version will have better power management to enable higher AVX and AVX-512 frequency in low intensity workloads.
And we saw thermal throttling for AVX2 get a lot better between Haswell and Skylake SP, so there is precedent for exactly that.

I suspect a truly optimized x265 would actually have different ASM depending on processor generation due to this kind of stuff.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 31st January 2019, 11:49   #6686  |  Link
katzenjoghurt
Registered User
 
Join Date: Feb 2007
Posts: 86
Quote:
Originally Posted by benwaggoner View Post
Raise CFR with aq-mode 3. The question is what looks best at a given bitrate.

I wish x265 gave us a way to change the SAO parameters, so we could adjust how the smoothing works in different luma ranges.
AQ3 isn't the solution for me...
I tried again yesterday... the file size doubled and still I didn't really
reach the quality I could achieve by defining zones manually.

SAO might add to it... but the issue is also there with SAO disabled.


In fact two of my past problems eventually seemed to come just from
the lighting / red area issue.

I wondered why Star Wars III gave me so much more trouble encoding than other Star Wars movies -> Answer: As Anakin turns evil here, the movie got a more reddish color coding.
https://forum.doom9.org/showpost.php...postcount=6353

Here the problem was in fact the character's dark red hair:
https://forum.doom9.org/showpost.php...6&postcount=11


With Aladdin I have the same issue now... it's dark red all over the place and super-hard to encode due to that.
It's even a problem in bright scenes.
Everything is crisp... and than there is this character wearing a dark red Fez. And the Fez is blocky and blurry.
katzenjoghurt is offline   Reply With Quote
Old 31st January 2019, 13:32   #6687  |  Link
fauxreaper
Registered User
 
Join Date: Oct 2014
Posts: 14
Quote:
Originally Posted by katzenjoghurt View Post
Oh my.
Am I the only one having such a hard time encoding scenes with red light / red backgrounds?
Use --cbqpoffs and --crqpoffs with negative values.
fauxreaper is offline   Reply With Quote
Old 31st January 2019, 17:02   #6688  |  Link
katzenjoghurt
Registered User
 
Join Date: Feb 2007
Posts: 86
Woah! These parameters sound interesting! I need to get home and try them out!
Thank you, fauxreaper!
katzenjoghurt is offline   Reply With Quote
Old 31st January 2019, 18:10   #6689  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,966
Quote:
Originally Posted by katzenjoghurt View Post
AQ3 isn't the solution for me...
I tried again yesterday... the file size doubled and still I didn't really
reach the quality I could achieve by defining zones manually.
You need to compare at the same bitrate. So try 2-pass VBR or a higher CRF. SDR content can often get away with a higher CRF with aq-mode 3.

Trying the chroma offsets is also a great idea, at least for those scenes. So glad to have ózones!
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 31st January 2019, 22:47   #6690  |  Link
katzenjoghurt
Registered User
 
Join Date: Feb 2007
Posts: 86
I'm giving up... crqpoffs and its brother also didn't work wonders. The bitrate went up... but even at the maximum of -12 it still didn't reach a detail retention level I liked.

And aq-mode 3 didn't work out for me as well... I went as far as setting aq-strength from 1 to 5, ultimately with a crf of 33 (~6000kbps) but... no.


If someone is out for a challenge... grab Aladdin and try to bring it down to a 5000kbps encoding without totally smeared red backgrounds.
You'll start to hate the ladies at the window at 0:07:19 - 00:07:24.

Personally I'll go on with zones... It'll take hours but it will work in the end.
katzenjoghurt is offline   Reply With Quote
Old 1st February 2019, 00:15   #6691  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,137
Quote:
Originally Posted by katzenjoghurt View Post
I'm giving up... crqpoffs and its brother also didn't work wonders. The bitrate went up... but even at the maximum of -12 it still didn't reach a detail retention level I liked.

And aq-mode 3 didn't work out for me as well... I went as far as setting aq-strength from 1 to 5, ultimately with a crf of 33 (~6000kbps) but... no.


If someone is out for a challenge... grab Aladdin and try to bring it down to a 5000kbps encoding without totally smeared red backgrounds.
You'll start to hate the ladies at the window at 0:07:19 - 00:07:24.

Personally I'll go on with zones... It'll take hours but it will work in the end.
What speed preset are you using? Ultrafast?
Stereodude is offline   Reply With Quote
Old 1st February 2019, 01:50   #6692  |  Link
katzenjoghurt
Registered User
 
Join Date: Feb 2007
Posts: 86
Medium
katzenjoghurt is offline   Reply With Quote
Old 1st February 2019, 02:11   #6693  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,966
Quote:
Originally Posted by katzenjoghurt View Post
Medium
Ah. I suggest slower as the fastest preset that really starts exercising HEVCís more unique features. I might throw in --tskip to see if that might help this weird case. It can sometimes help with sharp and weird edges.

Also, if you have a target file size and are comparing different encoder settings, you really should be using 2-pass VBR. Itís really hard to compare features when both output AND file size is changing.

Lastly, Are we sure that negative values reduce chroma QP? I had it in my head it was the other way around. But I rarely use that feature.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 1st February 2019, 20:31   #6694  |  Link
katzenjoghurt
Registered User
 
Join Date: Feb 2007
Posts: 86
http://forum.doom9.net/showpost.php?...postcount=2269
katzenjoghurt is offline   Reply With Quote
Old 1st February 2019, 20:49   #6695  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,966
Quote:
Originally Posted by katzenjoghurt View Post
Thanks! Yes, negative numbers reduce chroma QP and thus enhance chroma quality.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 3rd February 2019, 16:24   #6696  |  Link
jlpsvk
Registered User
 
Join Date: Dec 2014
Posts: 191
Ok... give up on Dolby Vision encoding now. Question is. How to encode my first HDR10+ bluray with x265 to preserve HDR10+? Can HDR10+ be played from MKV? Or must be m2ts?
__________________
Core i9-7960X, 64GB DDR4, RTX 2070, 1TB NVMe SSD, 56TB NAS
jlpsvk is offline   Reply With Quote
Old 3rd February 2019, 17:23   #6697  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,885
@jlpsvk: What do you use for playback on a pc? (For reencoding HDR-10+ data: 1. extract meta data using hdr10plus_parser 2. reencode with x265 while specifying the extracted data 3. multiplex to the container of your choice)
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 3rd February 2019, 19:15   #6698  |  Link
jlpsvk
Registered User
 
Join Date: Dec 2014
Posts: 191
Quote:
Originally Posted by Selur View Post
@jlpsvk: What do you use for playback on a pc? (For reencoding HDR-10+ data: 1. extract meta data using hdr10plus_parser 2. reencode with x265 while specifying the extracted data 3. multiplex to the container of your choice)
Thanks for that. I am playing on OPPO, not PC.
__________________
Core i9-7960X, 64GB DDR4, RTX 2070, 1TB NVMe SSD, 56TB NAS

Last edited by jlpsvk; 3rd February 2019 at 19:18.
jlpsvk is offline   Reply With Quote
Old 3rd February 2019, 19:21   #6699  |  Link
SeeMoreDigital
Life looks better in UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 11,453
Quote:
Originally Posted by jlpsvk View Post
Thanks for that. I am playing on OPPO, not PC.
Do you have an HDR10+ compatible TV too?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline   Reply With Quote
Old 3rd February 2019, 21:34   #6700  |  Link
jlpsvk
Registered User
 
Join Date: Dec 2014
Posts: 191
Quote:
Originally Posted by SeeMoreDigital View Post
Do you have an HDR10+ compatible TV too?
yes i have. Samsung UE65NU7442

Should I use --dhdr10-opt too??? can i crop?
__________________
Core i9-7960X, 64GB DDR4, RTX 2070, 1TB NVMe SSD, 56TB NAS

Last edited by jlpsvk; 3rd February 2019 at 21:42.
jlpsvk 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 04:54.


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