1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

avcodec/vvcdec: ensure every CTU belongs to a slice

According to section 6.3.3 "Spatial or component-wise partitionings,"
CTUs should fully cover slices with no overlaps, gaps, or additions.
No overlaps are ensured by task_init_parse.
No gaps and no additions are ensured by this patch.

Co-authored-by: Frank Plowman <post@frankplowman.com>
This commit is contained in:
Nuo Mi 2024-11-23 17:32:32 +08:00
parent 46006529a1
commit 5c5a08ecb5

View File

@ -822,6 +822,13 @@ int ff_vvc_frame_submit(VVCContext *s, VVCFrameContext *fc)
}
}
}
for (int rs = 0; rs < ft->ctu_count; rs++) {
const VVCTask *t = ft->tasks + rs;
if (!t->sc) {
av_log(s->avctx, AV_LOG_ERROR, "frame %5d, CTU(%d, %d) not belong to any slice\r\n", (int)fc->decode_order, t->rx, t->ry);
return AVERROR_INVALIDDATA;
}
}
frame_thread_add_score(s, ft, 0, 0, VVC_TASK_STAGE_INIT);
return 0;