Commit 9587e705 authored by Janne Grunau's avatar Janne Grunau

tile-mt: reset tile tasks when the number of tile rows changes

Fixes an assert in dav1d_prepare_intra_edges_16bpc() with
clusterfuzz-testcase-minimized-dav1d_fuzzer_mt-5640098964570112. Credits
to oss-fuzz.
parent a1fb2664
Pipeline #3083 passed with stages
in 9 minutes and 23 seconds
......@@ -2505,7 +2505,8 @@ int dav1d_decode_frame(Dav1dFrameContext *const f) {
f->tile_thread.titsati_sz = f->frame_hdr->tiling.cols * f->sbh;
}
if (f->tile_thread.titsati_init[0] != f->frame_hdr->tiling.cols ||
f->tile_thread.titsati_init[1] != f->sbh)
f->tile_thread.titsati_init[1] != f->sbh ||
f->tile_thread.titsati_init[2] != f->frame_hdr->tiling.rows)
{
for (int tile_row = 0, tile_idx = 0;
tile_row < f->frame_hdr->tiling.rows; tile_row++)
......@@ -2524,6 +2525,7 @@ int dav1d_decode_frame(Dav1dFrameContext *const f) {
}
f->tile_thread.titsati_init[0] = f->frame_hdr->tiling.cols;
f->tile_thread.titsati_init[1] = f->sbh;
f->tile_thread.titsati_init[2] = f->frame_hdr->tiling.rows;
}
}
......
......@@ -224,7 +224,7 @@ struct Dav1dFrameContext {
pthread_cond_t cond, icond;
int tasks_left, num_tasks;
int (*task_idx_to_sby_and_tile_idx)[2];
int titsati_sz, titsati_init[2];
int titsati_sz, titsati_init[3];
} tile_thread;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment