Skip to content

Commit 3cbe341

Browse files
committed
vulkan_ffv1: fix golomb coding for non-RGB streams
The run_index is reset on each plane, unlike with RGB, where its reset once per slice.
1 parent c395ad7 commit 3cbe341

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libavcodec/vulkan/ffv1_dec.comp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ void writeout_rgb(in SliceContext sc, ivec2 sp, int w, int y, bool apply_rct)
226226

227227
void decode_slice(inout SliceContext sc, const uint slice_idx)
228228
{
229-
int run_index = 0;
230229
int w = sc.slice_dim.x;
231230
ivec2 sp = sc.slice_pos;
232231

@@ -274,11 +273,13 @@ void decode_slice(inout SliceContext sc, const uint slice_idx)
274273
if (p > 0 && p < 3)
275274
h >>= chroma_shift.y;
276275

276+
int run_index = 0;
277277
for (int y = 0; y < h; y++)
278278
decode_line(sc, sp, w, y, p, bits,
279279
slice_state_off[p], quant_table_idx[p], run_index);
280280
}
281281
#else
282+
int run_index = 0;
282283
for (int y = 0; y < sc.slice_dim.y; y++) {
283284
for (int p = 0; p < color_planes; p++)
284285
decode_line(sc, sp, w, y, p, bits,

0 commit comments

Comments
 (0)