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 3rd September 2021, 07:22   #1  |  Link
tonemapped
Video Fanatic
 
tonemapped's Avatar
 
Join Date: Jul 2021
Location: Surrey
Posts: 89
Chroma subsampling : 4:2:0 (Type 1 / Type 0)

I've been experimenting with DVDFab for Blu-ray to x265 (I'm happy with a CLI but find tools with GUIs fun to play around with, like Staxrip - never Handbrake as it's horrible) conversion and found - annoyingly, after converting about a dozen films - an oddity with the output.

For some reason, the blacks are washed out and I believe it's down to the chroma subsampling it's using.

Partial mediainfo output (I know it's 8-bit which I wouldn't normally choose for HEVC).

Quote:
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L4@Main
Codec ID : V_MPEGH/ISO/HEVC
Color space : YUV
Chroma subsampling : 4:2:0 (Type 1 / Type 0)
Bit depth : 8 bits
Color range : Full
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
I believe the part marked in bold is the cause of the problem. I've never encountered an issue with 4:2:0 Type 1/0 so not entirely sure what's going on. Is this something that can be fixed without encoding the Blu-rays again (e.g. a flag in mkvmerge)? As I don't seem to have this issue with x264, is it related to that in some form?

Here's a simple demonstration of the issue - the grey area should be black.

Direct link to png: https://i.ibb.co/CHfwnwZ/dvdfab-outp...roma-issue.png

Any thoughts on the matter are much appreciated.
__________________
PC: R9 5900X | 32GB 3600 MT/s RAM | 2*1TB NVMe | RTX 3080 | water-cooled

NAS: SM 48-bay 240TB+ storage | Xeon 1220 | 32GB DDR4 ECC

HTPC: Pentium J5005 | 16GB RAM | 256GB SSD | 15W
tonemapped is offline   Reply With Quote
Old 3rd September 2021, 19:18   #2  |  Link
Boulder
Pig on the wing
 
Boulder's Avatar
 
Join Date: Mar 2002
Location: Finland
Posts: 5,429
I think color range should be limited instead of full. If it's encoded with the wrong settings, it needs to be redone to correct it.
__________________
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 3rd September 2021, 19:35   #3  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,092
For 4K UHD I recommend that you always encode in 10-bit, not 8-bit...

But as with any re-encoding it all depends on your characteristics of your source content.
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |

Last edited by SeeMoreDigital; 3rd September 2021 at 19:40.
SeeMoreDigital is offline   Reply With Quote
Old 4th September 2021, 00:07   #4  |  Link
tonemapped
Video Fanatic
 
tonemapped's Avatar
 
Join Date: Jul 2021
Location: Surrey
Posts: 89
Quote:
Originally Posted by Boulder View Post
I think color range should be limited instead of full. If it's encoded with the wrong settings, it needs to be redone to correct it.
Yep, how silly - totally missed that. Cheers for pointing it out.
__________________
PC: R9 5900X | 32GB 3600 MT/s RAM | 2*1TB NVMe | RTX 3080 | water-cooled

NAS: SM 48-bay 240TB+ storage | Xeon 1220 | 32GB DDR4 ECC

HTPC: Pentium J5005 | 16GB RAM | 256GB SSD | 15W
tonemapped is offline   Reply With Quote
Old 16th September 2021, 09:50   #5  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 433
This is a latest experiment from myself and Jan in ffmpeg: we pass through chroma location. So if you have a jpeg image that (all jpeg does) uses center location it will pass through center to chroma loc in hevc VUI in SPS. Alas it looks like it effs up on R'G'B' JPEGs.
Balling is offline   Reply With Quote
Old 17th September 2021, 19:00   #6  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,225
Quote:
Originally Posted by Balling View Post
This is a latest experiment from myself and Jan in ffmpeg: we pass through chroma location. So if you have a jpeg image that (all jpeg does) uses center location it will pass through center to chroma loc in hevc VUI in SPS. Alas it looks like it effs up on R'G'B' JPEGs.
Well, R'G'B' doesn't have chroma positions, so it should be a straightforward fix.

And excellent progress! This will be a very welcome feature.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 19th September 2021, 10:21   #7  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 433
Quote:
Originally Posted by benwaggoner View Post
Well, R'G'B' doesn't have chroma positions, so it should be a straightforward fix.

And excellent progress! This will be a very welcome feature.
First of call R'G'B' can be subsampled in JPEG, yeah. In many, many different ways. https://trac.ffmpeg.org/ticket/8930#comment:4 Second of all it just always assumes center since that is the only way for jpeg, it is globally tagged, even for not subsampled R'G'B', which is wrong of course.

Last edited by Balling; 19th September 2021 at 10:26.
Balling is offline   Reply With Quote
Reply

Tags
chroma subsampling, x265

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 14:31.


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