Message ID | 1586779342-32478-1-git-send-email-mypopydev@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [FFmpeg-devel,v1] fftools: fix hwaccles option dump redundancy | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make_warn | warning | New warnings during build |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On Mon, 13. Apr 20:02, Jun Zhao wrote: > From: Jun Zhao <barryjzhao@tencent.com> > > when enable the QSV in FFmpeg, used the cmd "ffmpeg -hwaccels" always > dump redundancy acceleration methods for QSV like: > > Hardware acceleration methods: > vaapi > qsv > drm > opencl > qsv > > Signed-off-by: Jun Zhao <barryjzhao@tencent.com> > --- > fftools/ffmpeg_opt.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c > index 95001a9..a4eafcd 100644 > --- a/fftools/ffmpeg_opt.c > +++ b/fftools/ffmpeg_opt.c > @@ -239,8 +239,6 @@ static int show_hwaccels(void *optctx, const char *opt, const char *arg) > while ((type = av_hwdevice_iterate_types(type)) != > AV_HWDEVICE_TYPE_NONE) > printf("%s\n", av_hwdevice_get_type_name(type)); > - for (i = 0; hwaccels[i].name; i++) > - printf("%s\n", hwaccels[i].name); The stack variable int i would no longer be used, so can also be removed.
On Mon, Apr 13, 2020 at 9:22 PM Andriy Gelman <andriy.gelman@gmail.com> wrote: > > On Mon, 13. Apr 20:02, Jun Zhao wrote: > > From: Jun Zhao <barryjzhao@tencent.com> > > > > when enable the QSV in FFmpeg, used the cmd "ffmpeg -hwaccels" always > > dump redundancy acceleration methods for QSV like: > > > > Hardware acceleration methods: > > vaapi > > qsv > > drm > > opencl > > qsv > > > > Signed-off-by: Jun Zhao <barryjzhao@tencent.com> > > --- > > fftools/ffmpeg_opt.c | 4 ---- > > 1 file changed, 4 deletions(-) > > > > diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c > > index 95001a9..a4eafcd 100644 > > --- a/fftools/ffmpeg_opt.c > > +++ b/fftools/ffmpeg_opt.c > > @@ -239,8 +239,6 @@ static int show_hwaccels(void *optctx, const char *opt, const char *arg) > > while ((type = av_hwdevice_iterate_types(type)) != > > AV_HWDEVICE_TYPE_NONE) > > printf("%s\n", av_hwdevice_get_type_name(type)); > > - for (i = 0; hwaccels[i].name; i++) > > - printf("%s\n", hwaccels[i].name); > > The stack variable int i would no longer be used, so can also be removed. > fixed in local, will re-send the patch, tks
On 13/04/2020 13:02, Jun Zhao wrote: > From: Jun Zhao <barryjzhao@tencent.com> Typo "hwaccels" in subject. > when enable the QSV in FFmpeg, used the cmd "ffmpeg -hwaccels" always > dump redundancy acceleration methods for QSV like: Perhaps: """ When QSV is enabled in FFmpeg, the command "ffmpeg -hwaccels" shows a duplicate entry in acceleration methods for QSV: """ > Hardware acceleration methods: > vaapi > qsv > drm > opencl > qsv > > Signed-off-by: Jun Zhao <barryjzhao@tencent.com> > --- > fftools/ffmpeg_opt.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c > index 95001a9..a4eafcd 100644 > --- a/fftools/ffmpeg_opt.c > +++ b/fftools/ffmpeg_opt.c > @@ -239,8 +239,6 @@ static int show_hwaccels(void *optctx, const char *opt, const char *arg) > while ((type = av_hwdevice_iterate_types(type)) != > AV_HWDEVICE_TYPE_NONE) > printf("%s\n", av_hwdevice_get_type_name(type)); > - for (i = 0; hwaccels[i].name; i++) > - printf("%s\n", hwaccels[i].name); > printf("\n"); > return 0; > } > @@ -936,8 +934,6 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) > AV_HWDEVICE_TYPE_NONE) > av_log(NULL, AV_LOG_FATAL, "%s ", > av_hwdevice_get_type_name(type)); > - for (i = 0; hwaccels[i].name; i++) > - av_log(NULL, AV_LOG_FATAL, "%s ", hwaccels[i].name); > av_log(NULL, AV_LOG_FATAL, "\n"); > exit_program(1); > } > Yeah, this code was there to ensure that "cuvid" still appeared in the list. Since that's gone now, LGTM. Thanks, - Mark
On Mon, Apr 13, 2020 at 9:30 PM Mark Thompson <sw@jkqxz.net> wrote: > > On 13/04/2020 13:02, Jun Zhao wrote: > > From: Jun Zhao <barryjzhao@tencent.com> > > Typo "hwaccels" in subject. > Missed this comment,sadly, > > when enable the QSV in FFmpeg, used the cmd "ffmpeg -hwaccels" always > > dump redundancy acceleration methods for QSV like: > > Perhaps: > > """ > When QSV is enabled in FFmpeg, the command "ffmpeg -hwaccels" shows a > duplicate entry in acceleration methods for QSV: > """ > Sound good > > Hardware acceleration methods: > > vaapi > > qsv > > drm > > opencl > > qsv > > > > Signed-off-by: Jun Zhao <barryjzhao@tencent.com> > > --- > > fftools/ffmpeg_opt.c | 4 ---- > > 1 file changed, 4 deletions(-) > > > > diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c > > index 95001a9..a4eafcd 100644 > > --- a/fftools/ffmpeg_opt.c > > +++ b/fftools/ffmpeg_opt.c > > @@ -239,8 +239,6 @@ static int show_hwaccels(void *optctx, const char *opt, const char *arg) > > while ((type = av_hwdevice_iterate_types(type)) != > > AV_HWDEVICE_TYPE_NONE) > > printf("%s\n", av_hwdevice_get_type_name(type)); > > - for (i = 0; hwaccels[i].name; i++) > > - printf("%s\n", hwaccels[i].name); > > printf("\n"); > > return 0; > > } > > @@ -936,8 +934,6 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) > > AV_HWDEVICE_TYPE_NONE) > > av_log(NULL, AV_LOG_FATAL, "%s ", > > av_hwdevice_get_type_name(type)); > > - for (i = 0; hwaccels[i].name; i++) > > - av_log(NULL, AV_LOG_FATAL, "%s ", hwaccels[i].name); > > av_log(NULL, AV_LOG_FATAL, "\n"); > > exit_program(1); > > } > > > > Yeah, this code was there to ensure that "cuvid" still appeared in the list. Since that's gone now, LGTM.
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 95001a9..a4eafcd 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -239,8 +239,6 @@ static int show_hwaccels(void *optctx, const char *opt, const char *arg) while ((type = av_hwdevice_iterate_types(type)) != AV_HWDEVICE_TYPE_NONE) printf("%s\n", av_hwdevice_get_type_name(type)); - for (i = 0; hwaccels[i].name; i++) - printf("%s\n", hwaccels[i].name); printf("\n"); return 0; } @@ -936,8 +934,6 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) AV_HWDEVICE_TYPE_NONE) av_log(NULL, AV_LOG_FATAL, "%s ", av_hwdevice_get_type_name(type)); - for (i = 0; hwaccels[i].name; i++) - av_log(NULL, AV_LOG_FATAL, "%s ", hwaccels[i].name); av_log(NULL, AV_LOG_FATAL, "\n"); exit_program(1); }