Skip to content

VA-API AV1 encoder may not set render_width/render_height for non-64-aligned input #300

@staging-devin-ai-integration

Description

Summary

The VA-API AV1 encoder (vaapi_av1.rs) aligns input 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 the 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.

Impact

This depends on how cros-codecs internally populates the AV1 sequence header OBU — if it sets render_and_frame_size_different=1 with the correct display resolution, the issue is moot. If it defaults render_size to frame_size, non-64-aligned inputs will produce visually padded output.

Steps to verify

  1. Encode a video with non-superblock-aligned dimensions (e.g. 1000×562) using the VA-API AV1 encoder
  2. Decode the output and check whether the decoded frame has visible padding bars

Location

  • crates/nodes/src/video/vaapi_av1.rsVaapiAv1Encoder::new_encoder

Origin

Flagged by automated review on PR #279.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions