Summary
Follow-up from #299. PR #279 extracted a shared vaapi_decode_loop_body<D>() function that deduplicated the VA-API decode loops between vaapi_h264.rs and vaapi_av1.rs.
However, dav1d.rs and av1.rs still have their own independent EAGAIN_YIELD_THRESHOLD backoff patterns that are not using the shared function.
Files involved
crates/nodes/src/video/dav1d.rs — independent EAGAIN_YIELD_THRESHOLD constant + backoff logic
crates/nodes/src/video/av1.rs — independent EAGAIN_YIELD_THRESHOLD constant + backoff logic
crates/nodes/src/video/vaapi_av1.rs — contains the shared vaapi_decode_loop_body<D>() to reference
Suggestion
Evaluate whether the backoff pattern in dav1d.rs and av1.rs can also be abstracted into the shared function, or into a similar generic helper. The decode loop structure differs from VA-API (different decoder APIs), so a direct reuse of vaapi_decode_loop_body may not be possible — but the EAGAIN_YIELD_THRESHOLD constant and retry logic could still be consolidated.
Origin
Split from #299 after the VA-API portion was addressed in PR #279.
Summary
Follow-up from #299. PR #279 extracted a shared
vaapi_decode_loop_body<D>()function that deduplicated the VA-API decode loops betweenvaapi_h264.rsandvaapi_av1.rs.However,
dav1d.rsandav1.rsstill have their own independentEAGAIN_YIELD_THRESHOLDbackoff patterns that are not using the shared function.Files involved
crates/nodes/src/video/dav1d.rs— independentEAGAIN_YIELD_THRESHOLDconstant + backoff logiccrates/nodes/src/video/av1.rs— independentEAGAIN_YIELD_THRESHOLDconstant + backoff logiccrates/nodes/src/video/vaapi_av1.rs— contains the sharedvaapi_decode_loop_body<D>()to referenceSuggestion
Evaluate whether the backoff pattern in
dav1d.rsandav1.rscan also be abstracted into the shared function, or into a similar generic helper. The decode loop structure differs from VA-API (different decoder APIs), so a direct reuse ofvaapi_decode_loop_bodymay not be possible — but theEAGAIN_YIELD_THRESHOLDconstant and retry logic could still be consolidated.Origin
Split from #299 after the VA-API portion was addressed in PR #279.