diff mbox series

[FFmpeg-devel] lavc: Lower MediaFoundation encoder priority

Message ID CAB0OVGoi6YpgfQyXVQ3W1FR1Hyh-zJt5jC_xOAbUZ_aCC3DsTw@mail.gmail.com
State Accepted
Headers show
Series [FFmpeg-devel] lavc: Lower MediaFoundation encoder priority | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Carl Eugen Hoyos June 23, 2020, 4:47 p.m. UTC
Hi!

Attached patch intends to fix ticket #8699 (which I cannot reproduce).

Please comment, Carl Eugen
Subject: [PATCH] lavc: Lower MediaFoundation encoder priority.

The actual encoders may not be available.
Fixes ticket #8699.
---
 libavcodec/allcodecs.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

James Almer June 23, 2020, 4:56 p.m. UTC | #1
> From 43e8ac3e391bfa49cc426158750aed8af4252c7c Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
> Date: Tue, 23 Jun 2020 18:45:08 +0200
> Subject: [PATCH] lavc: Lower MediaFoundation encoder priority.
> 
> The actual encoders may not be available.
> Fixes ticket #8699.
> ---
>  libavcodec/allcodecs.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> index 80f128cade..5bc4f56d10 100644
> --- a/libavcodec/allcodecs.c
> +++ b/libavcodec/allcodecs.c
> @@ -679,9 +679,7 @@ extern AVCodec ff_xsub_decoder;
>  /* external libraries */
>  extern AVCodec ff_aac_at_encoder;
>  extern AVCodec ff_aac_at_decoder;
> -extern AVCodec ff_aac_mf_encoder;
>  extern AVCodec ff_ac3_at_decoder;
> -extern AVCodec ff_ac3_mf_encoder;
>  extern AVCodec ff_adpcm_ima_qt_at_decoder;
>  extern AVCodec ff_alac_at_encoder;
>  extern AVCodec ff_alac_at_decoder;
> @@ -693,7 +691,6 @@ extern AVCodec ff_ilbc_at_decoder;
>  extern AVCodec ff_mp1_at_decoder;
>  extern AVCodec ff_mp2_at_decoder;
>  extern AVCodec ff_mp3_at_decoder;
> -extern AVCodec ff_mp3_mf_encoder;
>  extern AVCodec ff_pcm_alaw_at_encoder;
>  extern AVCodec ff_pcm_alaw_at_decoder;
>  extern AVCodec ff_pcm_mulaw_at_encoder;
> @@ -750,6 +747,11 @@ extern AVCodec ff_libxavs2_encoder;
>  extern AVCodec ff_libxvid_encoder;
>  extern AVCodec ff_libzvbi_teletext_decoder;
>  
> +/* These might be compiled not actually be available */

Put them in the "external libraries, that shouldn't be used by default
if one of the above is available" section below. No need to add a new
one for essentially the same purpose. The other MF encoders are already
there.

> +extern AVCodec ff_aac_mf_encoder;
> +extern AVCodec ff_ac3_mf_encoder;
> +extern AVCodec ff_mp3_mf_encoder;
> +
>  /* text */
>  extern AVCodec ff_bintext_decoder;
>  extern AVCodec ff_xbin_decoder;
> -- 
> 2.24.1
>
Carl Eugen Hoyos June 23, 2020, 6:43 p.m. UTC | #2
Am Di., 23. Juni 2020 um 18:56 Uhr schrieb James Almer <jamrial@gmail.com>:
>
> > From 43e8ac3e391bfa49cc426158750aed8af4252c7c Mon Sep 17 00:00:00 2001
> > From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
> > Date: Tue, 23 Jun 2020 18:45:08 +0200
> > Subject: [PATCH] lavc: Lower MediaFoundation encoder priority.
> >
> > The actual encoders may not be available.
> > Fixes ticket #8699.
> > ---
> >  libavcodec/allcodecs.c | 8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> > index 80f128cade..5bc4f56d10 100644
> > --- a/libavcodec/allcodecs.c
> > +++ b/libavcodec/allcodecs.c
> > @@ -679,9 +679,7 @@ extern AVCodec ff_xsub_decoder;
> >  /* external libraries */
> >  extern AVCodec ff_aac_at_encoder;
> >  extern AVCodec ff_aac_at_decoder;
> > -extern AVCodec ff_aac_mf_encoder;
> >  extern AVCodec ff_ac3_at_decoder;
> > -extern AVCodec ff_ac3_mf_encoder;
> >  extern AVCodec ff_adpcm_ima_qt_at_decoder;
> >  extern AVCodec ff_alac_at_encoder;
> >  extern AVCodec ff_alac_at_decoder;
> > @@ -693,7 +691,6 @@ extern AVCodec ff_ilbc_at_decoder;
> >  extern AVCodec ff_mp1_at_decoder;
> >  extern AVCodec ff_mp2_at_decoder;
> >  extern AVCodec ff_mp3_at_decoder;
> > -extern AVCodec ff_mp3_mf_encoder;
> >  extern AVCodec ff_pcm_alaw_at_encoder;
> >  extern AVCodec ff_pcm_alaw_at_decoder;
> >  extern AVCodec ff_pcm_mulaw_at_encoder;
> > @@ -750,6 +747,11 @@ extern AVCodec ff_libxavs2_encoder;
> >  extern AVCodec ff_libxvid_encoder;
> >  extern AVCodec ff_libzvbi_teletext_decoder;
> >
> > +/* These might be compiled not actually be available */
>
> Put them in the "external libraries, that shouldn't be used by default
> if one of the above is available" section below. No need to add a new
> one for essentially the same purpose. The other MF encoders are already
> there.

Indeed, thank you!

Pushed with that change, Carl Eugen
Moritz Barsnick June 24, 2020, 10:02 a.m. UTC | #3
On Tue, Jun 23, 2020 at 20:43:34 +0200, Carl Eugen Hoyos wrote:
> Pushed with that change, Carl Eugen

I suggest backporting this to 4.3, where MediaFoundation support was
added (and this issue is present).

Thanks,
Moritz
Carl Eugen Hoyos Aug. 25, 2020, 5 p.m. UTC | #4
Am Mi., 24. Juni 2020 um 12:02 Uhr schrieb Moritz Barsnick <barsnick@gmx.net>:
>
> On Tue, Jun 23, 2020 at 20:43:34 +0200, Carl Eugen Hoyos wrote:
> > Pushed with that change, Carl Eugen
>
> I suggest backporting this to 4.3, where MediaFoundation support was
> added (and this issue is present).

Done.

Carl Eugen
diff mbox series

Patch

diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 80f128cade..5bc4f56d10 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -679,9 +679,7 @@  extern AVCodec ff_xsub_decoder;
 /* external libraries */
 extern AVCodec ff_aac_at_encoder;
 extern AVCodec ff_aac_at_decoder;
-extern AVCodec ff_aac_mf_encoder;
 extern AVCodec ff_ac3_at_decoder;
-extern AVCodec ff_ac3_mf_encoder;
 extern AVCodec ff_adpcm_ima_qt_at_decoder;
 extern AVCodec ff_alac_at_encoder;
 extern AVCodec ff_alac_at_decoder;
@@ -693,7 +691,6 @@  extern AVCodec ff_ilbc_at_decoder;
 extern AVCodec ff_mp1_at_decoder;
 extern AVCodec ff_mp2_at_decoder;
 extern AVCodec ff_mp3_at_decoder;
-extern AVCodec ff_mp3_mf_encoder;
 extern AVCodec ff_pcm_alaw_at_encoder;
 extern AVCodec ff_pcm_alaw_at_decoder;
 extern AVCodec ff_pcm_mulaw_at_encoder;
@@ -750,6 +747,11 @@  extern AVCodec ff_libxavs2_encoder;
 extern AVCodec ff_libxvid_encoder;
 extern AVCodec ff_libzvbi_teletext_decoder;
 
+/* These might be compiled not actually be available */
+extern AVCodec ff_aac_mf_encoder;
+extern AVCodec ff_ac3_mf_encoder;
+extern AVCodec ff_mp3_mf_encoder;
+
 /* text */
 extern AVCodec ff_bintext_decoder;
 extern AVCodec ff_xbin_decoder;