[FFmpeg-trac] #8076(avfilter:new): QSV HW Context types mismach

FFmpeg trac at avcodec.org
Mon Aug 12 14:25:57 EEST 2019

#8076: QSV HW Context types mismach
             Reporter:  fortman      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avfilter     |                  Version:  git-
             Keywords:               |  master
  hwcontext_qsv                      |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
 Summary of the bug:

 When reviewing the conde of the QSV HW Context I discovered a mismatch
 between the "handle_types" and "supported_handle_types". These variables
 are used to defined the surfaces for the context: D3D11, D3D9, VAAPI, etc.

 However, the values are defined multiple times, instead of just one time:
 - libavcodec/qsv.c: handle_types
 - libavfilter/qsvvpp.c: handle_types
 - libavfilter/vf_scale_qsv.c: handle_types
 - libavfilter/vf_deinterlace_qsv.c: handle_types

 And futhermore:

 - libavutil/hwcontext_qsv.c: supported_handle_types

 As a consequence, when for example a new surface is created in Windows,
 the surface selected is D3D9, instead of D3D11. But when some other filter
 creates a context with a D3D11 surface and this surface is passed to the
 QSV HW Context, the surface is used without any problem.

 So I request to refactor the code and eliminate the multiple declarations.
 And then to initialize first to D3D11 surfaces in Windows.

 Thank you!

Ticket URL: <https://trac.ffmpeg.org/ticket/8076>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list