[BUG] Encoder: a stream that needs a level above the device's maxLevelIdc fails with a generic error instead of "not supported"

Abierto Apto para principiantes
#276 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
73/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
cpp
Área
backend

Línea de trabajo

Empieza por InitEncoder() del ejemplo Encoder e inspecciona la ruta de fallo de DetermineLevelTier() y la comprobación de la extensión codificada; el issue indica que actualmente se ejecuta primero la comprobación del nivel. Compara los resultados de rechazo con otras comprobaciones de capacidades de hardware y verifica que los casos de alta resolución se indiquen como no compatibles cuando se supera el límite del dispositivo. El trabajo estará terminado cuando el runner indique N/S para esas configuraciones no compatibles en lugar de FAIL.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

Describe the bug

The large resolution tests are failing:

  • For RADV: h264_resolution_too_large
  • For ANV: h264_resolution_too_large and h265_resolution_too_large

When the encoding parameters require a codec level higher than the device's maxLevelIdc (H.264/H.265), the encoder should report the configuration as not supported. It currently reports a generic error.

Every other hardware-capability rejection in InitEncoder() returns a VkResult that IsVideoUnsupportedResult() recognizes. The encoder then exits with VVS_EXIT_UNSUPPORTED (69), and the test runner reports N/S.

The level check does not follow this pattern. When DetermineLevelTier() fails, InitEncoder() returns VK_ERROR_INITIALIZATION_FAILED. The encoder then exits with EXIT_FAILURE (1), and the runner reports FAIL. That treats a hardware limit as if it were an encoder bug.

maxLevelIdc is a hardware capability, just like maxCodedExtent. If a standard level exists for the stream but the device cannot reach it, the device does not support the stream.

A second problem makes this visible. The level check runs before the coded-extent check. When an input exceeds both limits, the generic level error hides the more specific "exceeds hardware maximum" rejection.

Setup

  • OS: Ubuntu 24.04.4 LTS
  • GPU: AMD Radeon RX 7600 (RADV NAVI33)
  • Driver Version: radv Mesa 27.0.0-devel (git-bb7494e71c)
  • Sample Application: Encoder
  • Sample Application Version: 0.5.2

Expected Behavior

  • If the stream needs a level above the device's maxLevelIdc, the encoder rejects it as not supported. It exits with 69, and the runner reports N/S.

Observed Behavior

RADV, H.264, 7680x4320:

H.264 Encoder Capabilities
  maxLevelIdc                                     : 15
...
Failed to determine a suitable level for the given encoding parameters

ERROR: InitEncoder() failed with ret(-3)
Can't create the video encoder!

Steps to Reproduce

$VVS_DIR/build/vk_video_encoder/demos/vk-video-enc-test -i $VVS_DIR/tests/resources/video/yuv/7680x4320_420_8le.yuv --codec h264 --inputWidth 7680 --inputHeight 4320 --inputNumPlanes 3 --verbose --logLevel 4 --noDeviceFallback -o $VVS_DIR/tests/results/test_output_h264_resolution_too_large.264

Additional information

  • In the case of H.264 tested with RADV, the large resolution test (7680x4320) requires levelIdc 6.0. The encoder capabilities for H.264 report maxLevelIdc is 5.2.
  • For the failing tests, the resolution is above the maxCodedExtent.
Device Codec maxLevelIdc maxCodedExtent
RADV NAVI33 H.264 5.2 4096 x 4096
RADV NAVI33 H.265 (8K passes) 8192 x 4352
ANV Arc A750 H.264 5.1 4096 x 4096
ANV Arc A750 H.265 5.1 4096 x 4096
Lenguaje dominante
C++
Estrellas
44
Forks
20
Merge medio
6 d 11 h
PR fusionados (30 d)
7

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de KhronosGroup/Vulkan-Video-Samples

Todos los issues de KhronosGroup/Vulkan-Video-Samples

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.