[FFmpeg-devel] [PATCH RFC] avfilter/vf_delogo: Use AVPixFmtDescriptor.nb_components
Michael Niedermayer
michaelni at gmx.at
Sat Dec 12 16:01:45 CET 2015
On Sat, Dec 12, 2015 at 12:07:25PM +0000, Paul B Mahol wrote:
> On 12/10/15, Jean Delvare <jdelvare at suse.de> wrote:
> > Relying on AVPixFmtDescriptor.nb_components is cleaner and faster than
> > checking data and linesize for every possible plane.
> >
> > Signed-off-by: Jean Delvare <jdelvare at suse.de>
> > ---
> > I see that most filters use AVPixFmtDescriptor.nb_components while
> > others still check data and linesize. Am I correct assuming that the
> > former is faster and preferred?
> >
> > libavfilter/vf_delogo.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > --- ffmpeg.orig/libavfilter/vf_delogo.c 2015-12-10 13:06:16.212908502 +0100
> > +++ ffmpeg/libavfilter/vf_delogo.c 2015-12-10 13:07:04.877966120 +0100
> > @@ -256,7 +256,7 @@ static int filter_frame(AVFilterLink *in
> > if (!sar.num)
> > sar.num = sar.den = 1;
> >
> > - for (plane = 0; plane < 4 && in->data[plane] && in->linesize[plane];
> > plane++) {
> > + for (plane = 0; plane < desc->nb_components; plane++) {
> > int hsub = plane == 1 || plane == 2 ? hsub0 : 0;
> > int vsub = plane == 1 || plane == 2 ? vsub0 : 0;
> >
> >
> >
> > --
> > Jean Delvare
> > SUSE L3 Support
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
>
> lgtm
applied
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151212/1f48a527/attachment.sig>
More information about the ffmpeg-devel
mailing list