iter30 DIAG: LIBVA_TS_SCALE env-gated timestamp multiplier

Default behavior unchanged: counter*1000ns same as before.
With LIBVA_TS_SCALE=N, multiplies the ns timestamp by N. Lets us
sweep timestamp magnitude to test whether small-ts collides with
stale CAPTURE entries in vb2_find_buffer for HEVC frame 2+ bug.

Also keeps iter29 slice-tail probe from previous commit.
This commit is contained in:
2026-05-14 15:16:40 +00:00
parent 0eca3ffc6b
commit 68dbbdd4b7
+15 -4
View File
@@ -468,12 +468,23 @@ VAStatus RequestEndPicture(VADriverContextP context, VAContextID context_id)
* not be load-bearing for rkvdec's reference resolution — Phase 5
* reviewer flagged this as low-probability (VP9/MPEG-2 use the same
* pattern and PASS), but this is the only remaining wire-byte diff.
*
* iter30 DIAG: LIBVA_TS_SCALE env-gated multiplier so we can sweep
* timestamp magnitude to test whether small-ts collides with stale
* CAPTURE entries in vb2_find_buffer for HEVC frame 2+ divergence.
*/
context_object->timestamp_counter++;
surface_object->timestamp.tv_sec =
(time_t)(context_object->timestamp_counter / 1000000);
surface_object->timestamp.tv_usec =
(suseconds_t)(context_object->timestamp_counter % 1000000);
{
uint64_t ns = (uint64_t)context_object->timestamp_counter * 1000;
const char *scale = getenv("LIBVA_TS_SCALE");
if (scale && scale[0] != '\0') {
uint64_t mul = (uint64_t)strtoull(scale, NULL, 0);
if (mul > 0)
ns *= mul;
}
surface_object->timestamp.tv_sec = (time_t)(ns / 1000000000ULL);
surface_object->timestamp.tv_usec = (suseconds_t)((ns / 1000ULL) % 1000000ULL);
}
/*
* iter6: request_fd was bound to the surface in BeginPicture from