On Sat, Oct 26, 2019 at 21:44:02 +0200, Paul B Mahol wrote: > +Pick median pixel from certain rectangle defined by radius.
Is radius the correct term within a rectangle? (Just wondering, I do understand the intent.) > + memset(coarse, 0, sizeof(coarse)); > + memset(fine, 0, sizeof(fine)); > + memset(luc, 0, sizeof(luc)); Shouldn't this be memset(arrayptr, 0, sizeof(*arrayptr)); ? > + MedianContext *s = ctx->priv; > + > + for (int i = 0; i < s->nb_threads && s->coarse && s->fine; i++) { > + av_freep(&s->coarse[i]); > + av_freep(&s->fine[i]); > + } s->coarse and s->fine are constant in this scope. Instead of checking them on each iteration, you could just exit early of they are (or either is) NULL. Not that performance matters here at all. I don't understand the rest functionally, looks fine to me. Cheers, Moritz _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".