Output render size to Y4M
This adds A<W>:<H> to the Y4M header, to preserve the intended aspect ratio for anamorphic video, assuming it is constant in the sequence.
There is probably a more accurate way to get the SAR as a fraction, but to avoid making things too complicated while keeping a reasonable accuracy, considering render size can also be rounded, this uses the largest of the width and height as an "anchor".
Sample attached: enc_file.ivf
Also tested on non-square frame sizes by using small_input.y4m and resizing it with ffmpeg, which adjusts the aspect ratio as needed, then encoding with this branch of rav1e.
Edited by Raphaël Zumer