[FFmpeg-devel] [PATCH 2/2] dxva2_h264: add a workaround for old intel GPUs
Hendrik Leppkes
h.leppkes at gmail.com
Wed Mar 5 20:10:27 CET 2014
On Wed, Mar 5, 2014 at 7:56 PM, Reimar Döffinger
<Reimar.Doeffinger at gmx.de> wrote:
> 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).
Both AMD and NVIDIA don't use the Long slice structure, they use the
Short one, so the change does not apply to them.
Intel did fix it in the latest version of their drivers, the FFmpeg
code just needs to be updated to match the official DXVA2
specification.
However, Intel does not update older cards anymore, and there is no
reason not to offer such a simple workaround for them, even if the
application code needs to add 2 lines to set the flag.
- Hendrik
More information about the ffmpeg-devel
mailing list