[vlc-devel] [PATCH] Intel Video QuickSync encoder support
Rafaël Carré
funman at videolan.org
Wed Jun 5 14:27:22 CEST 2013
Hello,
Le 05/06/2013 14:21, Julien 'Lta' BALLET a écrit :
> Hello Raphael,
>>> + block->i_pts = qsv_timestamp_to_mtime(bs->TimeStamp) + sys->offset_pts;
>>> + if (bs->DecodeTimeStamp && bs->DecodeTimeStamp <= bs->TimeStamp)
>>> + block->i_dts = qsv_timestamp_to_mtime(bs->DecodeTimeStamp) + sys->offset_pts;
>>> + else {
>>> + /* HW encoder (sometimes) doesn't set the DecodeTimeStamp field
>>> + so we give decoder some (100ms) headroom. */
>>
>> Not sure I understand what you are doing here, if you set the h264 dts,
>> shouldn't it take in account p / b frames ? Isn't it going to conflict
>> with the dts that were set correctly ?
>
> This handles an edge case occuring when you got buggy or outdated
> drivers. This branch will never be executed if you have correct
> hw/driver/parameters. Since this code is actually trying to fix bad
> drivers behaviors, we could just remove it and assumes it's not our
> problem. On the other hand, on some drivers/hw/paramters combinations,
> we have totally broken dts, so i supposed it was an acceptable
> solution to compute a new dts from the pts. Any suggestion for a
> better behavior is welcomed.
> There's also a chance murphy's was against me the day i experienced
> these issues and that they'll almost never happen on real life (i was
> actually woking on a 'beta cpu/chipset')
If you can detect the driver version, I think it would make more sense
to refuse to work with buggy drivers and ask the user to upgrade.
More information about the vlc-devel
mailing list