-
Notifications
You must be signed in to change notification settings - Fork 207
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
Add support for all profiles of SVT-AV1 #2422
base: main
Are you sure you want to change the base?
Add support for all profiles of SVT-AV1 #2422
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not check thoroughly but this change looks good overall.
This does not look like a widespread use case so I wonder if silently allowing up to 13 in the libavif API when SVT-AV1 is selected without changing the value of AVIF_SPEED_FASTEST
is safer.
An alternative approach would be to allow up to 13 for all codecs but to make 11,12,13 the same as 10 for libaom and rav1e. This avoids the need for a separate AVIF_SPEED_LIBAOM_RAV1E_FASTEST
constant. It should just be written in a comment somewhere.
Another alternative approach could be a custom key
passed to avifEncoderSetCodecSpecificOption()
to avoid changing the current API or constant values. I do not expect speeds 11,12,13 to be widely used anyway.
So you can actually encode in 11-13 with SVT-AV1 in the current code. You can pass I think I like your first alternative approach. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you can actually encode in 11-13 with SVT-AV1 in the current code. You can pass -a preset=13 to avifenc, but I think the output would confuse people
What about (also or instead) fixing stdout for this use case then? Because this PR does not prevent people from using -a preset=13
and have a confusing console output.
I'm not sure I want to do this as then we may need to establish precedence rules. E.g. if you specify preset and speed. For simplicity I think it is better this way. |
I am a bit uneasy about changing the value of a define in a public header. Vincent suggested just changing |
So what about keeping |
@FrankGalligan @y-guyon I am sorry I forgot to answer Yannis's question. I will take a look tomorrow. But very quickly, this is very likely a gray area. That is, changing the value of |
I have two proposals that avoid changing Proposal 1: Use
I think this proposal is easy to understand even though the link between Proposal 2: Add an
This proposal is fully backward compatible, but requires adding a new |
Proposal 2 seems too complicated and do not think that is good to implement. So for proposal 1 to get SVT-AV1 to encode with speed 13 you would need to set this command: And if you used this command, even with svt the only encoder: You would get speed 10 instead of 13. How about proposal 3
With proposal 3 you will get speed 13 with both of these commands: And if you used this command, even with svt the only encoder: |
SVT-AV1 profiles (speed) can be set from 0 to 13, while libaom and Rav1e speed settings range is 0-10. This CL adds support to set the speed paramter up to 13.
Added comment and avifenc help text that libaom and rav1e range is 0-10.
d13c207
to
a410bd2
Compare
This based on comments from AOMediaCodec#2422 (comment)
I also changed the avifenc help text to output the encoder speed range as 0-13 |
SVT-AV1 profiles (speed) can be set from 0 to 13, while libaom and Rav1e speed settings range is 0-10. This CL adds support to set the speed paramter up to 13.