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. |
|
19th July 2020, 15:47 | #1 | Link |
Registered User
Join Date: Feb 2002
Posts: 758
|
Resolution Mod 4
The more you do encoding and learn, the more you find new flaws. Ignorance is bliss!
Recently I realized again I have been encoding wrong. This time about cropping. I always wanted to go mod 2 for resolution but always said, to be on the safe side, I will go mod 4. Now I see that even mod 4 is not good enough. This is especially visible on TV and less on PC. For example for a 1920 x 804 video, you see a distorted last line on the button. Only trained eyes will notice it, especially visible with lines with an angle. So I realized that I should go mod 8 not to get that bottom line distortion. To my eyes, I don't see difference with mod 8 or mod 16. Should I go mod 16? What are your experiences? Is this more visible in H265 encoding? Does this exist in H264 also? |
19th July 2020, 18:52 | #3 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
That must be a decoder issue. I've never had problems with mod-4 resolutions that I use all the time.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
19th July 2020, 22:18 | #4 | Link |
Registered User
Join Date: Feb 2002
Posts: 758
|
It is indeed hardware dependent also. For example I have an Amlogic CoreELEC that amplifies the problem and it's easily visible. But it is there, less visible, you have to pixel hunt and once you see it, you never unsee it. I'm definitely leaving mod 4 behind and go mod 8. I will see if I can do screengrabs.
|
20th July 2020, 19:08 | #5 | Link |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
I generally only do mod4 for square pixel frame sizes below 640x480. mod8 up through 1080p, and then mod16 for higher.
In theory mod2 should work fine with modern codecs. Alas, it's hard to test that something works on everything. |
20th July 2020, 22:58 | #7 | Link |
Registered User
Join Date: Feb 2002
Posts: 758
|
So I did a little search and this thing is a little more complicated. There is indeed a hardware limitation in Amlogic hardware that does not show mod 4 videos correctly. It supposedly repeats the last lines to make it mod 8.
But this caused me to look a little closer at the encodes on PC and I see a second different issue. This happens at the edges of the video where the black lines start. Even if I do a perfect mod 16 crop on picture, I see a little artifact on the last line. It's not 100% smooth. So in some cases I find that if I keep a little more black lines, the encodes are better on the edges. Have you seen this? What is this encode difficulty at the edges of the video? |
21st July 2020, 16:07 | #8 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Quote:
I can imagine cases where if letterboxing is mod4 or even mod2, AMP would help in making that bottom line solid. But if it is dimmer from being from the edge, you could get some weirdness. |
|
21st July 2020, 22:26 | #9 | Link |
Registered User
Join Date: Feb 2002
Posts: 758
|
These are very subtle things that only zooming in on PC and pixel hunting will show them. It is not visible on TV. I suppose I shouldn't even go down this path but it's "fun" and I have discovered even stranger things!
Discovered that if you just add 4 lines, 2 on the top and 2 on the bottom to go from mod 4 to mod 8 (1920 x 804 to 1920 x 808) the entire encode looks different and not just the edges. Even in the middle of the picture it is different. The mod 8 encode looks better, sharper with less artifacts than the mod 4 encode! |
27th July 2020, 22:12 | #10 | Link | |
Registered User
Join Date: May 2006
Posts: 3,997
|
Quote:
(Assuming that the comparison was based on equal file size). Last edited by Sharc; 27th July 2020 at 23:06. |
|
28th July 2020, 05:43 | #11 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Quote:
Getting the right combination of cropping and scaling can be a thing. I've certainly had content where I cropped more off the top than the bottom in order to get mod8 on both instead of mod4 on both. Rember you need to count down from the top to figure out mod, since things like 1088-in-1080 mean that counting from the bottom isn't reliable. |
|
28th July 2020, 08:26 | #12 | Link |
Registered User
Join Date: May 2006
Posts: 3,997
|
Indeed. Even more so when the video is interlaced and one wants to apply filters on the fields. The cropping must comply with the colorspace (4:x:x) and the size of the fields need to comply with the filter constraints.
|
|
|