[FFmpeg-devel] [PATCH 2/2] dxva2_h264: add a workaround for old intel GPUs

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Mar 5 19:56:57 CET 2014

On Wed, Mar 05, 2014 at 10:40:38AM +0400, Anton Fedchin wrote:
> > I also wonder if it wouldn't make more sense to merge into the previous
> > patch (though that also depends on the answer to my question about the
> > first part).
> > Also, would it be possible to auto-detect whether this should be used or
> > not?
> > Lastly, which devices does this fix? Is everything but the "ClearVideo"
> > ones broken currently, or is it only some special devices that even
> > care about this?
> The latest drivers on SandyBridge and older Intel GPU's has two H.264
> decoders: DXVADDI_Intel_ModeH264_E with GUID
> {604F8E68-4951-4C54-88FE-ABD25C15B3D6} (Intel spesific
> H264_VLD_NoFGT_ClearVideo decoder) and standard Microsoft DXVA2_ModeH264_E
> decoder with GUID {1B81BE68-A0C7-11D3-B984-00C04F2E73C5}. IvyBridge and
> newer has only last one.
> Intel ClearVideo decoder has issues with decoding with refs >= 11. To avoid
> issues we should use standard Microsoft H.264 decoder (DXVA2_ModeH264_E)
> which has not issues, but in the current master there is no possibility to
> use the standard decoder on SNB and older without first path.
> The first patch fixes using the standart Microsoft H.264 decoder on Intel
> SandyBridge and older GPU's, but it breaks the Intel ClearVideo decoder.
> The second path add workaround for the Intel ClearVideo decoder. The
> application should set the workaround flag if it use Intel ClearVideo
> device.
> As for auto detect original autor of patches says:
> > I looked into that just now, and it would be possible, however this
> probing would need to happen on every call to the slice filling function,
> > because there currently is no good way to store that information, and
> also no guarantee that the user code cannot swap out the decoder
> > object mid-playback (ie. when the player is moved to another screen on
> another GPU this can happen)

If the application needs to query a special GUID and that device never
claimed to be really DXVA2 I think it's not really worth it.
However I am suspicious that everyone only mentions Intel.
What about AMD and NVidia implementations?
Do they work with the one, the other, both?
If the latter I'm even more inclined to say "their problem, if it
breaks something the users should ask Intel for fixes" (and let's
implement the correct way in FFmpeg).

More information about the ffmpeg-devel mailing list