diff mbox

[FFmpeg-devel] avfilter/vf_bilateral: remove useless memcpy

Message ID 1572404832-49274-1-git-send-email-leozhang@qiyi.com
State Superseded
Headers show

Commit Message

leozhang Oct. 30, 2019, 3:07 a.m. UTC
Signed-off-by: leozhang <leozhang@qiyi.com>
---
 libavfilter/vf_bilateral.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Paul B Mahol Oct. 30, 2019, 8:35 a.m. UTC | #1
Why you think it is useless?

Have you checked checksums matches before and after?

On 10/30/19, leozhang <leozhang@qiyi.com> wrote:
> Signed-off-by: leozhang <leozhang@qiyi.com>
> ---
>  libavfilter/vf_bilateral.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavfilter/vf_bilateral.c b/libavfilter/vf_bilateral.c
> index 3c9d800..ba3c6e1 100644
> --- a/libavfilter/vf_bilateral.c
> +++ b/libavfilter/vf_bilateral.c
> @@ -277,8 +277,8 @@ static void bilateral_##name(BilateralContext *s, const
> uint8_t *ssrc, uint8_t *
>              factor_++;
>               \
>          }
>               \
>
>               \
> -        memcpy(ypy, ycy, sizeof(float) * width);
>               \
> -        memcpy(ypf, ycf, sizeof(float) * width);
>               \
> +        ypy = ycy;                                          \
> +        ypf = ycf;                                          \
>      }
>               \
>
>               \
>      for (int i = 0; i < height; i++)
>               \
> --
> 1.8.3.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
leozhang Oct. 30, 2019, 9:05 a.m. UTC | #2
Paul B Mahol <onemda@gmail.com> 于2019年10月30日周三 下午4:35写道:
>
> Why you think it is useless?
>
> Have you checked checksums matches before and after?
I compared md5sum were the same. Please point it out if I understand wrong.
>
> On 10/30/19, leozhang <leozhang@qiyi.com> wrote:
> > Signed-off-by: leozhang <leozhang@qiyi.com>
> > ---
> >  libavfilter/vf_bilateral.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavfilter/vf_bilateral.c b/libavfilter/vf_bilateral.c
> > index 3c9d800..ba3c6e1 100644
> > --- a/libavfilter/vf_bilateral.c
> > +++ b/libavfilter/vf_bilateral.c
> > @@ -277,8 +277,8 @@ static void bilateral_##name(BilateralContext *s, const
> > uint8_t *ssrc, uint8_t *
> >              factor_++;
> >               \
> >          }
> >               \
> >
> >               \
> > -        memcpy(ypy, ycy, sizeof(float) * width);
> >               \
> > -        memcpy(ypf, ycf, sizeof(float) * width);
> >               \
> > +        ypy = ycy;                                          \
> > +        ypf = ycf;                                          \
> >      }
> >               \
> >
> >               \
> >      for (int i = 0; i < height; i++)
> >               \
> > --
> > 1.8.3.1
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
leozhang Oct. 31, 2019, 8:52 a.m. UTC | #3
Paul B Mahol <onemda@gmail.com> 于2019年10月30日周三 下午4:35写道:
>
> Why you think it is useless?
>
> Have you checked checksums matches before and after?
Hi Paul,
I add FATE test for the bilateral filter which is
https://patchwork.ffmpeg.org/patch/16042/. Checked checksums matched
before and after. Thanks
>
> On 10/30/19, leozhang <leozhang@qiyi.com> wrote:
> > Signed-off-by: leozhang <leozhang@qiyi.com>
> > ---
> >  libavfilter/vf_bilateral.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavfilter/vf_bilateral.c b/libavfilter/vf_bilateral.c
> > index 3c9d800..ba3c6e1 100644
> > --- a/libavfilter/vf_bilateral.c
> > +++ b/libavfilter/vf_bilateral.c
> > @@ -277,8 +277,8 @@ static void bilateral_##name(BilateralContext *s, const
> > uint8_t *ssrc, uint8_t *
> >              factor_++;
> >               \
> >          }
> >               \
> >
> >               \
> > -        memcpy(ypy, ycy, sizeof(float) * width);
> >               \
> > -        memcpy(ypf, ycf, sizeof(float) * width);
> >               \
> > +        ypy = ycy;                                          \
> > +        ypf = ycf;                                          \
> >      }
> >               \
> >
> >               \
> >      for (int i = 0; i < height; i++)
> >               \
> > --
> > 1.8.3.1
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox

Patch

diff --git a/libavfilter/vf_bilateral.c b/libavfilter/vf_bilateral.c
index 3c9d800..ba3c6e1 100644
--- a/libavfilter/vf_bilateral.c
+++ b/libavfilter/vf_bilateral.c
@@ -277,8 +277,8 @@  static void bilateral_##name(BilateralContext *s, const uint8_t *ssrc, uint8_t *
             factor_++;                                                                    \
         }                                                                                 \
                                                                                           \
-        memcpy(ypy, ycy, sizeof(float) * width);                                          \
-        memcpy(ypf, ycf, sizeof(float) * width);                                          \
+        ypy = ycy;                                          \
+        ypf = ycf;                                          \
     }                                                                                     \
                                                                                           \
     for (int i = 0; i < height; i++)                                                      \