diff mbox series

[FFmpeg-devel] lavc/vaapi_decode: fix the build failure when hevc_vaapi is disabled

Message ID 1585754282-17489-1-git-send-email-linjie.fu@intel.com
State Superseded
Headers show
Series [FFmpeg-devel] lavc/vaapi_decode: fix the build failure when hevc_vaapi is disabled | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Fu, Linjie April 1, 2020, 3:18 p.m. UTC
Verified with ./configure --enable-vaapi --disable-hwaccel=hevc_vaapi

Failure reported in:
http://fate.ffmpeg.org/report.cgi?time=20200401135031&slot=x86_64-archlinux-gcc-random

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
---
 libavcodec/vaapi_decode.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Carl Eugen Hoyos April 1, 2020, 7:21 p.m. UTC | #1
Am Mi., 1. Apr. 2020 um 17:24 Uhr schrieb Linjie Fu <linjie.fu@intel.com>:
>
> Verified with ./configure --enable-vaapi --disable-hwaccel=hevc_vaapi
>
> Failure reported in:
> http://fate.ffmpeg.org/report.cgi?time=20200401135031&slot=x86_64-archlinux-gcc-random
>
> Signed-off-by: Linjie Fu <linjie.fu@intel.com>
> ---
>  libavcodec/vaapi_decode.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
> index 54a0ecb..06916cc 100644
> --- a/libavcodec/vaapi_decode.c
> +++ b/libavcodec/vaapi_decode.c
> @@ -383,6 +383,7 @@ static const struct {
>                             H264ConstrainedBaseline),
>      MAP(H264,        H264_MAIN,       H264Main    ),
>      MAP(H264,        H264_HIGH,       H264High    ),
> +#if CONFIG_HEVC_VAAPI_HWACCEL
>  #if VA_CHECK_VERSION(0, 37, 0)

Can these lines be joined?
Or am I missing something between the chunks?

>      MAP(HEVC,        HEVC_MAIN,       HEVCMain    ),
>      MAP(HEVC,        HEVC_MAIN_10,    HEVCMain10  ),
> @@ -393,6 +394,7 @@ static const struct {
>      MAP(HEVC,        HEVC_REXT,       None,
>                   ff_vaapi_parse_hevc_rext_profile ),
>  #endif
> +#endif

Carl Eugen
Fu, Linjie April 2, 2020, 2:21 a.m. UTC | #2
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Carl Eugen Hoyos
> Sent: Thursday, April 2, 2020 03:22
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] lavc/vaapi_decode: fix the build failure
> when hevc_vaapi is disabled
> 
> Am Mi., 1. Apr. 2020 um 17:24 Uhr schrieb Linjie Fu <linjie.fu@intel.com>:
> >
> > Verified with ./configure --enable-vaapi --disable-hwaccel=hevc_vaapi
> >
> > Failure reported in:
> > http://fate.ffmpeg.org/report.cgi?time=20200401135031&slot=x86_64-
> archlinux-gcc-random
> >
> > Signed-off-by: Linjie Fu <linjie.fu@intel.com>
> > ---
> >  libavcodec/vaapi_decode.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
> > index 54a0ecb..06916cc 100644
> > --- a/libavcodec/vaapi_decode.c
> > +++ b/libavcodec/vaapi_decode.c
> > @@ -383,6 +383,7 @@ static const struct {
> >                             H264ConstrainedBaseline),
> >      MAP(H264,        H264_MAIN,       H264Main    ),
> >      MAP(H264,        H264_HIGH,       H264High    ),
> > +#if CONFIG_HEVC_VAAPI_HWACCEL
> >  #if VA_CHECK_VERSION(0, 37, 0)
> 
> Can these lines be joined?
> Or am I missing something between the chunks?

The complete code contains 2 different libva version checks for compatibility
which didn't show up in the diff chunks:

#if CONFIG_HEVC_VAAPI_HWACCEL
#if VA_CHECK_VERSION(0, 37, 0)
    MAP(HEVC,        HEVC_MAIN,       HEVCMain    ),
    MAP(HEVC,        HEVC_MAIN_10,    HEVCMain10  ),
    MAP(HEVC,        HEVC_MAIN_STILL_PICTURE,
                                      HEVCMain    ),
#endif
#if VA_CHECK_VERSION(1, 2, 0)
    MAP(HEVC,        HEVC_REXT,       None,
                 ff_vaapi_parse_hevc_rext_profile ),
#endif
#endif

hence I think maybe no need for a join?

- Linjie
Carl Eugen Hoyos April 2, 2020, 8:49 p.m. UTC | #3
Am Do., 2. Apr. 2020 um 04:21 Uhr schrieb Fu, Linjie <linjie.fu@intel.com>:
>
> > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> > Carl Eugen Hoyos
> > Sent: Thursday, April 2, 2020 03:22
> > To: FFmpeg development discussions and patches <ffmpeg-
> > devel@ffmpeg.org>
> > Subject: Re: [FFmpeg-devel] [PATCH] lavc/vaapi_decode: fix the build failure
> > when hevc_vaapi is disabled
> >
> > Am Mi., 1. Apr. 2020 um 17:24 Uhr schrieb Linjie Fu <linjie.fu@intel.com>:
> > >
> > > Verified with ./configure --enable-vaapi --disable-hwaccel=hevc_vaapi
> > >
> > > Failure reported in:
> > > http://fate.ffmpeg.org/report.cgi?time=20200401135031&slot=x86_64-
> > archlinux-gcc-random
> > >
> > > Signed-off-by: Linjie Fu <linjie.fu@intel.com>
> > > ---
> > >  libavcodec/vaapi_decode.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
> > > index 54a0ecb..06916cc 100644
> > > --- a/libavcodec/vaapi_decode.c
> > > +++ b/libavcodec/vaapi_decode.c
> > > @@ -383,6 +383,7 @@ static const struct {
> > >                             H264ConstrainedBaseline),
> > >      MAP(H264,        H264_MAIN,       H264Main    ),
> > >      MAP(H264,        H264_HIGH,       H264High    ),
> > > +#if CONFIG_HEVC_VAAPI_HWACCEL
> > >  #if VA_CHECK_VERSION(0, 37, 0)
> >
> > Can these lines be joined?
> > Or am I missing something between the chunks?
>
> The complete code contains 2 different libva version checks for compatibility
> which didn't show up in the diff chunks:
>
> #if CONFIG_HEVC_VAAPI_HWACCEL
> #if VA_CHECK_VERSION(0, 37, 0)
>     MAP(HEVC,        HEVC_MAIN,       HEVCMain    ),
>     MAP(HEVC,        HEVC_MAIN_10,    HEVCMain10  ),
>     MAP(HEVC,        HEVC_MAIN_STILL_PICTURE,
>                                       HEVCMain    ),
> #endif
> #if VA_CHECK_VERSION(1, 2, 0)
>     MAP(HEVC,        HEVC_REXT,       None,
>                  ff_vaapi_parse_hevc_rext_profile ),
> #endif
> #endif

> hence I think maybe no need for a join?

Of course not, sorry for not taking the time to look myself.

Carl Eugen
Andreas Rheinhardt April 12, 2020, 11:55 a.m. UTC | #4
Linjie Fu:
> Verified with ./configure --enable-vaapi --disable-hwaccel=hevc_vaapi
> 
> Failure reported in:
> http://fate.ffmpeg.org/report.cgi?time=20200401135031&slot=x86_64-archlinux-gcc-random
> 
> Signed-off-by: Linjie Fu <linjie.fu@intel.com>
> ---
>  libavcodec/vaapi_decode.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
> index 54a0ecb..06916cc 100644
> --- a/libavcodec/vaapi_decode.c
> +++ b/libavcodec/vaapi_decode.c
> @@ -383,6 +383,7 @@ static const struct {
>                             H264ConstrainedBaseline),
>      MAP(H264,        H264_MAIN,       H264Main    ),
>      MAP(H264,        H264_HIGH,       H264High    ),
> +#if CONFIG_HEVC_VAAPI_HWACCEL
>  #if VA_CHECK_VERSION(0, 37, 0)
>      MAP(HEVC,        HEVC_MAIN,       HEVCMain    ),
>      MAP(HEVC,        HEVC_MAIN_10,    HEVCMain10  ),
> @@ -393,6 +394,7 @@ static const struct {
>      MAP(HEVC,        HEVC_REXT,       None,
>                   ff_vaapi_parse_hevc_rext_profile ),
>  #endif
> +#endif
>      MAP(MJPEG,       MJPEG_HUFFMAN_BASELINE_DCT,
>                                        JPEGBaseline),
>      MAP(WMV3,        VC1_SIMPLE,      VC1Simple   ),
> 
Any more comments? If not, I'll apply this soon (i.e. in a few hours).

- Andreas
Mark Thompson April 12, 2020, 12:14 p.m. UTC | #5
On 12/04/2020 12:55, Andreas Rheinhardt wrote:
> Linjie Fu:
>> Verified with ./configure --enable-vaapi --disable-hwaccel=hevc_vaapi
>>
>> Failure reported in:
>> http://fate.ffmpeg.org/report.cgi?time=20200401135031&slot=x86_64-archlinux-gcc-random
>>
>> Signed-off-by: Linjie Fu <linjie.fu@intel.com>
>> ---
>>  libavcodec/vaapi_decode.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
>> index 54a0ecb..06916cc 100644
>> --- a/libavcodec/vaapi_decode.c
>> +++ b/libavcodec/vaapi_decode.c
>> @@ -383,6 +383,7 @@ static const struct {
>>                             H264ConstrainedBaseline),
>>      MAP(H264,        H264_MAIN,       H264Main    ),
>>      MAP(H264,        H264_HIGH,       H264High    ),
>> +#if CONFIG_HEVC_VAAPI_HWACCEL
>>  #if VA_CHECK_VERSION(0, 37, 0)
>>      MAP(HEVC,        HEVC_MAIN,       HEVCMain    ),
>>      MAP(HEVC,        HEVC_MAIN_10,    HEVCMain10  ),
>> @@ -393,6 +394,7 @@ static const struct {
>>      MAP(HEVC,        HEVC_REXT,       None,
>>                   ff_vaapi_parse_hevc_rext_profile ),
>>  #endif
>> +#endif
>>      MAP(MJPEG,       MJPEG_HUFFMAN_BASELINE_DCT,
>>                                        JPEGBaseline),
>>      MAP(WMV3,        VC1_SIMPLE,      VC1Simple   ),
>>
> Any more comments? If not, I'll apply this soon (i.e. in a few hours).

I'd put it around the RExt part only, to be more consistent with other codecs.  This does rather suggest that the error messages in that file should be clearer, though - it would be nice if it could distinguish between "this codec isn't supported by libavcodec at all", "this codec might work but hasn't built into this libavcodec" and "this codec is supported by libavcodec but not by your hardware".

- Mark
Fu, Linjie April 12, 2020, 3:55 p.m. UTC | #6
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Mark Thompson
> Sent: Sunday, April 12, 2020 20:14
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] lavc/vaapi_decode: fix the build failure
> when hevc_vaapi is disabled
> 
> On 12/04/2020 12:55, Andreas Rheinhardt wrote:
> > Linjie Fu:
> >> Verified with ./configure --enable-vaapi --disable-hwaccel=hevc_vaapi
> >>
> >> Failure reported in:
> >> http://fate.ffmpeg.org/report.cgi?time=20200401135031&slot=x86_64-
> archlinux-gcc-random
> >>
> >> Signed-off-by: Linjie Fu <linjie.fu@intel.com>
> >> ---
> >>  libavcodec/vaapi_decode.c | 2 ++
> >>  1 file changed, 2 insertions(+)
> >>
> >> diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
> >> index 54a0ecb..06916cc 100644
> >> --- a/libavcodec/vaapi_decode.c
> >> +++ b/libavcodec/vaapi_decode.c
> >> @@ -383,6 +383,7 @@ static const struct {
> >>                             H264ConstrainedBaseline),
> >>      MAP(H264,        H264_MAIN,       H264Main    ),
> >>      MAP(H264,        H264_HIGH,       H264High    ),
> >> +#if CONFIG_HEVC_VAAPI_HWACCEL
> >>  #if VA_CHECK_VERSION(0, 37, 0)
> >>      MAP(HEVC,        HEVC_MAIN,       HEVCMain    ),
> >>      MAP(HEVC,        HEVC_MAIN_10,    HEVCMain10  ),
> >> @@ -393,6 +394,7 @@ static const struct {
> >>      MAP(HEVC,        HEVC_REXT,       None,
> >>                   ff_vaapi_parse_hevc_rext_profile ),
> >>  #endif
> >> +#endif
> >>      MAP(MJPEG,       MJPEG_HUFFMAN_BASELINE_DCT,
> >>                                        JPEGBaseline),
> >>      MAP(WMV3,        VC1_SIMPLE,      VC1Simple   ),
> >>
> > Any more comments? If not, I'll apply this soon (i.e. in a few hours).
> 
> I'd put it around the RExt part only, to be more consistent with other codecs.
Ok, and  also combined with VA_CHECK_VERSION as Carl has suggested, thx.

- Linjie
diff mbox series

Patch

diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
index 54a0ecb..06916cc 100644
--- a/libavcodec/vaapi_decode.c
+++ b/libavcodec/vaapi_decode.c
@@ -383,6 +383,7 @@  static const struct {
                            H264ConstrainedBaseline),
     MAP(H264,        H264_MAIN,       H264Main    ),
     MAP(H264,        H264_HIGH,       H264High    ),
+#if CONFIG_HEVC_VAAPI_HWACCEL
 #if VA_CHECK_VERSION(0, 37, 0)
     MAP(HEVC,        HEVC_MAIN,       HEVCMain    ),
     MAP(HEVC,        HEVC_MAIN_10,    HEVCMain10  ),
@@ -393,6 +394,7 @@  static const struct {
     MAP(HEVC,        HEVC_REXT,       None,
                  ff_vaapi_parse_hevc_rext_profile ),
 #endif
+#endif
     MAP(MJPEG,       MJPEG_HUFFMAN_BASELINE_DCT,
                                       JPEGBaseline),
     MAP(WMV3,        VC1_SIMPLE,      VC1Simple   ),