71f7ef7bca063ad6389dc81d7cd610ca19b0cfb3
Bug #2: calculateZscaleWidth previously emitted a zscale filter even when no rescale was needed (SAR 1:1, N/A, empty, or computed width equal to the source). encodeVideo then unconditionally appended it to -vf, forcing a pointless colorspace round-trip. Return an empty filter string in those cases and build the -vf chain conditionally; omit -vf entirely when no filters apply. Bug #23: the SAR-to-width math used integer truncation, producing odd or off-by-one widths (e.g. 853 instead of 854 for 32:27 at 1920), and the guard accepted SAR 0:N which zeroed the output width. Reject zero-numerator SARs and round to the nearest integer then mask to an even width for AV1/H.264 mod-2 alignment.
Description
No description provided
150 KiB
Languages
Go
100%