[FFmpeg-devel,V1,1/4] lavfi/colorspace: typedef ThreadData as all other filters

Submitted by Jun Zhao on Oct. 9, 2019, 2:48 p.m.

Details

Message ID 1570632533-16101-1-git-send-email-mypopydev@gmail.com
State Accepted
Commit 88a9998fe8c7197e76b71a7c53a89ff8d4adaf13
Headers show

Commit Message

Jun Zhao Oct. 9, 2019, 2:48 p.m.
From: Jun Zhao <barryjzhao@tencent.com>

typedef ThreadData as all other filters.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
---
 libavfilter/vf_colorspace.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Comments

Paul B Mahol Oct. 9, 2019, 2:52 p.m.
Whole set looks fine to me.

On 10/9/19, Jun Zhao <mypopydev@gmail.com> wrote:
> From: Jun Zhao <barryjzhao@tencent.com>
>
> typedef ThreadData as all other filters.
>
> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
> ---
>  libavfilter/vf_colorspace.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
> index 04954c1..db41f64 100644
> --- a/libavfilter/vf_colorspace.c
> +++ b/libavfilter/vf_colorspace.c
> @@ -331,15 +331,15 @@ static void apply_lut(int16_t *buf[3], ptrdiff_t
> stride,
>      }
>  }
>
> -struct ThreadData {
> +typedef struct ThreadData {
>      AVFrame *in, *out;
>      ptrdiff_t in_linesize[3], out_linesize[3];
>      int in_ss_h, out_ss_h;
> -};
> +} ThreadData;
>
>  static int convert(AVFilterContext *ctx, void *data, int job_nr, int
> n_jobs)
>  {
> -    struct ThreadData *td = data;
> +    const ThreadData *td = data;
>      ColorSpaceContext *s = ctx->priv;
>      uint8_t *in_data[3], *out_data[3];
>      int16_t *rgb[3];
> @@ -771,7 +771,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
>      int res;
>      ptrdiff_t rgb_stride = FFALIGN(in->width * sizeof(int16_t), 32);
>      unsigned rgb_sz = rgb_stride * in->height;
> -    struct ThreadData td;
> +    ThreadData td;
>
>      if (!out) {
>          av_frame_free(&in);
> --
> 1.7.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".
mypopy@gmail.com Oct. 10, 2019, 1:11 a.m.
On Wed, Oct 9, 2019 at 10:52 PM Paul B Mahol <onemda@gmail.com> wrote:
>
> Whole set looks fine to me.
Applied, thx
>
> On 10/9/19, Jun Zhao <mypopydev@gmail.com> wrote:
> > From: Jun Zhao <barryjzhao@tencent.com>
> >
> > typedef ThreadData as all other filters.
> >
> > Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
> > ---
> >  libavfilter/vf_colorspace.c |    8 ++++----
> >  1 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
> > index 04954c1..db41f64 100644
> > --- a/libavfilter/vf_colorspace.c
> > +++ b/libavfilter/vf_colorspace.c
> > @@ -331,15 +331,15 @@ static void apply_lut(int16_t *buf[3], ptrdiff_t
> > stride,
> >      }
> >  }
> >
> > -struct ThreadData {
> > +typedef struct ThreadData {
> >      AVFrame *in, *out;
> >      ptrdiff_t in_linesize[3], out_linesize[3];
> >      int in_ss_h, out_ss_h;
> > -};
> > +} ThreadData;
> >
> >  static int convert(AVFilterContext *ctx, void *data, int job_nr, int
> > n_jobs)
> >  {
> > -    struct ThreadData *td = data;
> > +    const ThreadData *td = data;
> >      ColorSpaceContext *s = ctx->priv;
> >      uint8_t *in_data[3], *out_data[3];
> >      int16_t *rgb[3];
> > @@ -771,7 +771,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
> >      int res;
> >      ptrdiff_t rgb_stride = FFALIGN(in->width * sizeof(int16_t), 32);
> >      unsigned rgb_sz = rgb_stride * in->height;
> > -    struct ThreadData td;
> > +    ThreadData td;
> >
> >      if (!out) {
> >          av_frame_free(&in);
> > --
> > 1.7.1
> >

Patch hide | download patch | download mbox

diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
index 04954c1..db41f64 100644
--- a/libavfilter/vf_colorspace.c
+++ b/libavfilter/vf_colorspace.c
@@ -331,15 +331,15 @@  static void apply_lut(int16_t *buf[3], ptrdiff_t stride,
     }
 }
 
-struct ThreadData {
+typedef struct ThreadData {
     AVFrame *in, *out;
     ptrdiff_t in_linesize[3], out_linesize[3];
     int in_ss_h, out_ss_h;
-};
+} ThreadData;
 
 static int convert(AVFilterContext *ctx, void *data, int job_nr, int n_jobs)
 {
-    struct ThreadData *td = data;
+    const ThreadData *td = data;
     ColorSpaceContext *s = ctx->priv;
     uint8_t *in_data[3], *out_data[3];
     int16_t *rgb[3];
@@ -771,7 +771,7 @@  static int filter_frame(AVFilterLink *link, AVFrame *in)
     int res;
     ptrdiff_t rgb_stride = FFALIGN(in->width * sizeof(int16_t), 32);
     unsigned rgb_sz = rgb_stride * in->height;
-    struct ThreadData td;
+    ThreadData td;
 
     if (!out) {
         av_frame_free(&in);