iter37: revert α-26 — decode_params.short_term_ref_pic_set_size back to 0

α-26 (iter26) wrote VAAPI's picture->st_rps_bits to the V4L2 decode_params
field of the same name based on field-name match. Per V4L2 spec, this field
is the bit-count of st_ref_pic_set() *in the SPS* — VAAPI doesn't expose
that. The slice-header bit-count (which IS what VAAPI's st_rps_bits provides)
belongs in slice_params->short_term_ref_pic_set_size (handled correctly in
α-29).

rkvdec doesn't read decode_params->short_term_ref_pic_set_size, so the
misroute was harmless but stale. This revert restores spec-correct semantics
(0 when SPS bit-count is unknown).

Cosmetic cleanup; no functional change.
This commit is contained in:
2026-05-14 18:38:26 +00:00
parent 7db15a5685
commit 25d3e5f06f
+11 -10
View File
@@ -314,18 +314,19 @@ static void h265_fill_decode_params(struct request_data *driver_data,
decode_params->num_poc_st_curr_after = n_st_after; decode_params->num_poc_st_curr_after = n_st_after;
decode_params->num_poc_lt_curr = n_lt; decode_params->num_poc_lt_curr = n_lt;
/* /*
* iter26 α-26: VAAPI DOES expose short_term_ref_pic_set bit-count * decode_params->short_term_ref_pic_set_size is the bit-count of
* via picture->st_rps_bits. Without populating this, rkvdec's * short_term_ref_pic_set() inside the **SPS** (per V4L2 spec
* DPB reference resolution for P/B frames uses the wrong slice- * v4l2-controls.h doc). VAAPI doesn't expose this — it exposes
* header skip and reads the wrong reference; frame 1 (IDR) decodes * picture->st_rps_bits which is the bit-count of st_ref_pic_set()
* correctly but frames 2+ diverge (iter25 evidence: cmp differs at * inside the **slice header** when short_term_ref_pic_set_sps_flag=0.
* byte 1382401 = frame 2 boundary, kdirect bytes 4-5 = 0x0a 0x00, * That value belongs in slice_params->short_term_ref_pic_set_size,
* libva = 0x00 0x00). * not here (see [[va-st-rps-bits-is-slice-field]] memory + α-29).
* *
* long_term_ref_pic_set_size and num_delta_pocs_of_ref_rps_idx still * α-26 wrote st_rps_bits to this decode_params field in iter26 by
* left zero (VAAPI doesn't expose either). * field-name match; rkvdec doesn't read this field at all, so the
* misroute was harmless but stale. iter36 reverts to 0.
*/ */
decode_params->short_term_ref_pic_set_size = picture->st_rps_bits; decode_params->short_term_ref_pic_set_size = 0;
/* /*
* iter11 α-14: IRAP/IDR/NO_OUTPUT_OF_PRIOR flags. VAAPI doesn't * iter11 α-14: IRAP/IDR/NO_OUTPUT_OF_PRIOR flags. VAAPI doesn't