This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 755be6f8422fa59c7372b161783e16cdc3f39cbe Author: Niklas Haas <[email protected]> AuthorDate: Thu May 21 18:38:49 2026 +0200 Commit: Niklas Haas <[email protected]> CommitDate: Fri Jul 17 13:23:21 2026 +0000 swscale/uops: add ff_sws_uop_list_remove_at() Signed-off-by: Niklas Haas <[email protected]> --- libswscale/uops.c | 11 +++++++++++ libswscale/uops.h | 1 + 2 files changed, 12 insertions(+) diff --git a/libswscale/uops.c b/libswscale/uops.c index 9cee7bcd00..1b5ee346e6 100644 --- a/libswscale/uops.c +++ b/libswscale/uops.c @@ -208,6 +208,17 @@ int ff_sws_uop_list_append(SwsUOpList *uops, SwsUOp *uop) return 0; } +void ff_sws_uop_list_remove_at(SwsUOpList *uops, int index, int count) +{ + const int end = uops->num_ops - count; + av_assert2(index >= 0 && count >= 0 && index + count <= uops->num_ops); + for (int i = 0; i < count; i++) + uop_uninit(&uops->ops[index + i]); + for (int i = index; i < end; i++) + uops->ops[i] = uops->ops[i + count]; + uops->num_ops = end; +} + int ff_sws_dither_height(const SwsDitherUOp *dither) { int max_offset = 0; diff --git a/libswscale/uops.h b/libswscale/uops.h index c75c8fbcc3..db4412ad1c 100644 --- a/libswscale/uops.h +++ b/libswscale/uops.h @@ -284,6 +284,7 @@ typedef struct SwsUOpList { SwsUOpList *ff_sws_uop_list_alloc(void); void ff_sws_uop_list_free(SwsUOpList **ops); +void ff_sws_uop_list_remove_at(SwsUOpList *uops, int index, int count); /* Takes over ownership of `uop` and sets it to {0}, even on failure. */ int ff_sws_uop_list_append(SwsUOpList *uops, SwsUOp *uop); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
