[FFmpeg-devel] [PATCH] avfilter/qsvvpp: Work around a bug in MSDK where VPP processing hangs under certain conditions

Soft Works softworkz at hotmail.com
Mon May 25 01:50:08 EEST 2020



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces at ffmpeg.org> On Behalf Of
> Moritz Barsnick
> Sent: Monday, May 25, 2020 12:04 AM
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] avfilter/qsvvpp: Work around a bug in
> MSDK where VPP processing hangs under certain conditions
> 
> I don't understand functionally, but:
> 
> On Sun, May 24, 2020 at 12:13:07 +0000, Soft Works wrote:
> > +    int height_align_adjust = 0;
> >      int i, ret;
> >
> > +
> >      /* check that we have a hw context */
> 
> Stray line.
> 
> >
> > +    in_format     = in_frames_ctx->sw_format;
> >      in_format     = in_frames_ctx->sw_format;
> 
> What happened here? A line got duplicated?

Hi Moritz,

thanks for the hint. I still haven't really accommodated to working with
those patch files ;-)

The nature of the bug can be roughly explained like this:

- MSDK seems to compare some width/height values between input
  and output to determine whether it should do something (e.g. scale)
- it seems to compare the wrong values for this check (probably for input
  the video dimensions and for output (incorrectly) the aligned size of the
  hw frame
- when there's no difference but a color conversion, it hangs
- the bug wasn't noted, because in most cases, the size-alignment caused
  a difference with regards to that incorrect check
- but when the original size is already aligned to 32 pixels, the bug
  becomes visible
- I fix it, by adding 32 to the hw frame height in order to make sure that
  there exists a difference, even in those cases where the video dimensions
  are already aligned

softworkz


More information about the ffmpeg-devel mailing list