On Wed, Dec 31, 2025 at 01:10:18AM +0530, Raja Rathour via ffmpeg-devel wrote: > v7: Squashed all changes into a single clean commit rebased on master. > > Thank you for the guidance on the patch structure and history. > This version is a standalone replacement of the original filter logic and > incorporates all requested technical improvements: > > - Renamed the results array to 'nb_black_pixels_per_slice' for clarity. > - Removed redundant comments and safety checks. > - Fixed the patchset structure to ensure it applies cleanly as a single unit. > > Thank you, > Raja Rathour > > Signed-off-by: Raja Rathour <[email protected]> > --- > libavfilter/vf_blackframe.c | 79 ++++++++++++++++++++++++++++++------- > 1 file changed, 65 insertions(+), 14 deletions(-) > > diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c > index f0aa53e133..fb531b8a4c 100644 > --- a/libavfilter/vf_blackframe.c > +++ b/libavfilter/vf_blackframe.c > @@ -32,19 +32,29 @@ > > #include "libavutil/internal.h" > #include "libavutil/opt.h" > +#include "libavutil/mem.h" > #include "avfilter.h" > #include "filters.h" > #include "video.h" >
> typedef struct BlackFrameContext {
> const AVClass *class;
> - int bamount; ///< black amount
> - int bthresh; ///< black threshold
> - unsigned int frame; ///< frame number
> - unsigned int nblack; ///< number of black pixels counted so far
> - unsigned int last_keyframe; ///< frame number of the last received
> key-frame
> + int bamount;
> + int bthresh;
> + unsigned int frame;
> + unsigned int nblack;
> + unsigned int last_keyframe;
> } BlackFrameContext;
unrelated to threads
>
> +typedef struct ThreadData {
> + const uint8_t *data;
> + int linesize;
> + int bthresh;
> + int width;
> + int height; // Added height for cleaner slice math
///<
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
