[FFmpeg-devel] [PATCH v2] lavc/vp9: reset segmentation fields when segmentation isn't enabled

llyyr llyyr.public at gmail.com
Thu May 23 11:50:50 EEST 2024


On 5/23/24 2:13 PM, Andreas Rheinhardt wrote:
> llyyr.public at gmail.com:
>> From: llyyr <llyyr.public at gmail.com>
>>
>> Fields under the segmentation switch are never reset on a new frame, and
>> retain the value from the previous frame. This bugs out a bunch of
>> hwaccel drivers when segmentation is disabled but update_map isn't
>> reset because they don't ignore values behind switches. This commit also
>> resets the temporal field, though it may not be required.
>>
>> We also do this for vp8 [1] so this commit is just mirroring the vp8
>> logic.
>>
>> This fixes an issue with certain samples [2] that causes blocky
>> artifacts with vaapi, d3d11va and cuda (and possibly others).
>> Mesa worked around [3] this by ignoring these fields if
>> segmentation.enabled is 0, but d3d11va still displays blocky artifacts.
>>
>> [1] https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/vp8.c#l811
> 
> You should probably not link to HEAD here, because the line number will
> be wrong in the future.
> 

Should I resent the patch with a v3 or could whoever applies the patch 
fix it when applying it? The correct url is 
https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/2e877090f958131accb8c7e5ac10e5b9865d1735:/libavcodec/vp8.c#l797



More information about the ffmpeg-devel mailing list