-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grain/detail is retained on every other frame #2468
Comments
I can't find a related open issue, but I remember this having been reported before. Will look into it when I have some time. |
hugely appreciated! i've been bashing my head into a wall trying to get aomenc to retain grain and/or detail at reasonable bitrates and this is my first hope so far! |
Does it reproduce with --low-latency true? |
At first I thought this was something about key frames vs inter frames, but there really is significant smoothing every other frame. I've uploaded my samples and logs here: https://mega.nz/folder/xMsHXTqD#4BYnbCiUVHM5-z4Fy3_Rng I used the CLI from OP, these are the stats: Interestingly, the metrics don't change much but the inter frame avg size is much smaller. |
--low-latency seemed to improve it (tho resulting in more than a 100% size increase), but it still has less detail/less prominent grain every other frame https://www.mediafire.com/file/wevkq9dufjgfwdp/fightclubsnippet-rav1e033-q72-speed6-lowlatency.ivf/file edit: oops, in spite of naming it 033 (for 0.3.3), i actually didn't use it. i used 0.3.0 |
--quantizer does not guarantee the frame average QP, it only guarantees the "base pyramid" frame QP. By default depth 2 pyramid coding is used (3 levels) so average QP will be higher. Pyramid coding is also better for compression. Thanks, I also see it on the file you provided. |
FWIW nothing obvious on the analyzer. Either incorrect reference frames are being used, or somehow lambda or distortion scale is getting set wrong every other frame. |
Another Sample: Encoding settings are ` --tiles 16 --quantizer 90 -s 5 --matrix BT2020NCL --trasnfer BT20202_10Bit `Video: |
Is this a regression for 0.5? I'm not sure whether to mark it as a blocker. |
I was looking into this a bit, and there's only one particular pattern that I found when going through the analyzer, which is present even in the low latency encode. The even numbered frames are more likely to choose larger, DCT based blocks. However, I haven't yet determined if this is the cause of the issue or a result of it. |
Furthermore, this is an instance where limited SGR in CPU-6 improves subjective quality a bit in some blocks. I also encounter the issue with even numbered frames choosing bigger partitions. |
It looks like there was a bit of this effect present in the source, which let to some red herrings in investigating. The end result we came to is that this is a natural effect of using frame pyramids, and all encoders are prone to it. aomenc definitely exhibits the same effect. I do have a couple of ideas I want to try to see if I can improve this, however, so I'll leave this ticket open but remove the "bug" tag since it's functioning "as expected". (But we want it to function better than expected.) |
For posterity and the ability to reproduce this using publicly available source files, I encoded the 1080p files from the objective-2-slow test set to a VMAF target of 93 using ab-av1. This alternating amount of grain seems to be easiest to notice in the bottom third of the frame in ducks_take_off_1080p50_60f when playing back frame-by-frame. old_town_cross_1080p50_60f is another file to reproduce this with. The alternating grain amount is visible against the gray clouds, sometimes more, sometimes less. x264 also exhibits this behavior: |
simple settings, but multiple quant and speed settings
rav1e.exe --metrics --threads 8 --speed 6 --quantizer 80 fightclubsnippet.y4m -o fightclubsnippet-rav1e-q80-speed6.ivf
also when i tried quant 72, 64, 56, and speeds down to 1
every other frame seems to have detail: https://cdn.discordapp.com/attachments/587033245061873759/736876069537316864/mpv-shot0002.png
and every other frame seems to wipe it out:
https://cdn.discordapp.com/attachments/587033245061873759/736876046753988634/mpv-shot0001.png
source: http://www.mediafire.com/file/55j542f7ws24ygo/fightclubsnippet.mkv/file
encodes: http://www.mediafire.com/file/q10922pyrepzhop/fightclubsnippet-rav1e-q72-speed6.ivf/file
http://www.mediafire.com/file/dn55dfvvlfc1gig/fightclubsnippet-rav1e-q64-speed6.ivf/file
http://www.mediafire.com/file/f5jl6ugeamjdu3h/fightclubsnippet-rav1e-q64-speed1.ivf/file
http://www.mediafire.com/file/kxzgzza2x323kby/fightclubsnippet-rav1e-q56-speed6.ivf/file
The text was updated successfully, but these errors were encountered: