1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

vulkan_ffv1: small cleanup for golomb

Split up computation of the offset in the same way that
the range coder version does it.
This commit is contained in:
Lynne
2025-05-27 06:32:55 +09:00
parent 9d229440ac
commit c395ad7c2c

View File

@ -139,7 +139,8 @@ void decode_line(inout SliceContext sc, ivec2 sp, int w,
ivec2 pr = get_pred(dec[p], sp, ivec2(x, y), 0, w,
quant_table_idx, extend_lookup[quant_table_idx] > 0);
VlcState sb = VlcState(uint64_t(slice_state) + state_off + VLC_STATE_SIZE*abs(pr[0]));
uint context_off = state_off + VLC_STATE_SIZE*abs(pr[0]);
VlcState sb = VlcState(uint64_t(slice_state) + context_off);
if (pr[0] == 0 && run_mode == 0)
run_mode = 1;