rav1e icon indicating copy to clipboard operation
rav1e copied to clipboard

WIP: Automatically set tiles according to number of CPUs.

Open tdaede opened this issue 5 years ago • 13 comments

Limit to 8 to keep quality loss acceptable.

tdaede avatar Jun 20 '19 21:06 tdaede

Coverage Status

Coverage increased (+0.08%) to 82.782% when pulling 7caa2b0f2430f9348534d05aa0e5a3840734e7d4 on tdaede:auto_tiles into eae72f992adc5f68fa082adb833dbf4285a8e691 on xiph:master.

coveralls avatar Jun 20 '19 21:06 coveralls

No resolution/speed guards?

rzumer avatar Jun 20 '19 21:06 rzumer

Not yet, I'm going to do some AWCY runs as I have no idea what reasonable guards are tbh.

tdaede avatar Jun 20 '19 21:06 tdaede

👍 Waiting to see what AWCY shows. I can't image 8 tiles on a 240p stream is great.

dwbuiten avatar Jun 20 '19 22:06 dwbuiten

Looking at AWCY results, a default constraint of tiles no smaller than 512x512 seems like a good middle ground.

tdaede avatar Jun 20 '19 23:06 tdaede

I feel like a lot of people would expect the default behavior to not use tiles at all, and it might be better to have this as '--auto-tiles' or something. Since it's at least a 2-3% BD-rate hit (and more on a lot of content), it seems like something you'd want off by default.

gnafuthegreat avatar Jun 21 '19 12:06 gnafuthegreat

Is it really that high?

dwbuiten avatar Jun 21 '19 14:06 dwbuiten

beta.AWCY shows a couple percent hit with even 2 tiles:

https://beta.arewecompressedyet.com/?job=master-343461dcbb671b601da34b3477532fa1ef2edf83&job=2tilesb-343461dcbb671b601da34b3477532fa1ef2edf83%402019-06-20T22%3A32%3A27.206Z

gnafuthegreat avatar Jun 21 '19 14:06 gnafuthegreat

Seems fairly consistent across the test clips in that last link that the difference is greatest at lower bits-per-pixel and disappears as it rises.

The bd rate reports break out averages by resolution, (and you might be able to see resolution dependent effects just by comparing the different file rows, but this effect seems the same regardlesss of resolution, how would it look if thinsg were broken down by that metric instead?

davidscotson avatar Jun 21 '19 22:06 davidscotson

It quickly becomes resolution dependent at greater tile counts: https://beta.arewecompressedyet.com/?job=4tiles-343461dcbb671b601da34b3477532fa1ef2edf83%402019-06-20T23%3A09%3A03.664Z&job=master-343461dcbb671b601da34b3477532fa1ef2edf83

I want to treat this sorta like a speed feature, e.g. for doubling encode time by going from 2->1 tiles, there might be a better speed feature to enable instead.

tdaede avatar Jun 22 '19 00:06 tdaede

Possibly I'm misreading the graphs, but I still don't see an obvious dependency on resolution even for 8 tiles. It gets worse from 360p to 720p, then better again as resolution increases to 1080p on the test set for 2,4,8 tiles (compared with one tile or a smaller number of tiles) rather than consistently worse at lower resolutions.

A more consistent dependency is on quality. Seems like whether you'd want this on by default depends more on what VMAF/quality you're targetting than the resolution of the video, as at higher qualities it seems the impact is greatly reduced and so judging by the average is perhaps misleading if you're targetting either a high or low quality. (Presumably the first few bits used are heavily affected by the split in some way, but as more and more bits are spent to increase quality it affects them less and that initial hit gets amortized across the higher bitrate as a mostly fixed cost)

davidscotson avatar Jun 22 '19 09:06 davidscotson

@tdaede I would like to run some performance and bdr tests, could you resolve the conflicts and rebase this branch?

EwoutH avatar Nov 10 '19 23:11 EwoutH

@tdaede can we have this 0.4.0 release? Is it a good idea?

vibhoothi avatar Sep 21 '20 07:09 vibhoothi