Description
The VA-API AV1 encoder (vaapi_av1.rs) aligns dimensions up to 64-pixel AV1 superblock boundaries (coded_width, coded_height) and passes only the coded resolution to CrosEncoderConfig.resolution. There is no separate display/render resolution communicated to the cros-codecs encoder.
When input dimensions aren't multiples of 64 (e.g. 720p: 1280×720 → coded 1280×768), the encoded AV1 bitstream's render_width/render_height may be set to the coded dimensions, resulting in visible padding at the bottom/right edges of the decoded video.
This depends on whether cros-codecs internally sets render_and_frame_size_different=1 with the correct display resolution in the AV1 sequence header OBU. The same pattern exists in vaapi_h264.rs with 16-pixel macroblock alignment.
Verification needed
Test with non-standard resolutions (e.g. 1280×720, 854×480) and verify decoded output doesn't show visible padding bars.
Found in
PR #279 — Devin Review comment #49
Description
The VA-API AV1 encoder (
vaapi_av1.rs) aligns dimensions up to 64-pixel AV1 superblock boundaries (coded_width,coded_height) and passes only the coded resolution toCrosEncoderConfig.resolution. There is no separate display/render resolution communicated to the cros-codecs encoder.When input dimensions aren't multiples of 64 (e.g. 720p: 1280×720 → coded 1280×768), the encoded AV1 bitstream's
render_width/render_heightmay be set to the coded dimensions, resulting in visible padding at the bottom/right edges of the decoded video.This depends on whether cros-codecs internally sets
render_and_frame_size_different=1with the correct display resolution in the AV1 sequence header OBU. The same pattern exists invaapi_h264.rswith 16-pixel macroblock alignment.Verification needed
Test with non-standard resolutions (e.g. 1280×720, 854×480) and verify decoded output doesn't show visible padding bars.
Found in
PR #279 — Devin Review comment #49