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
- Encode a video with non-superblock-aligned dimensions (e.g. 1000×562) using the VA-API AV1 encoder
- Decode the output and check whether the decoded frame has visible padding bars
Location
crates/nodes/src/video/vaapi_av1.rs — VaapiAv1Encoder::new_encoder
Origin
Flagged by automated review on PR #279.
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 toCrosEncoderConfig.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_heightmay 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=1with 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
Location
crates/nodes/src/video/vaapi_av1.rs—VaapiAv1Encoder::new_encoderOrigin
Flagged by automated review on PR #279.