Skip to content

VA-API AV1 encoder: coded vs display resolution may cause visible padding #292

@staging-devin-ai-integration

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions