[vlc-devel] [PATCH] filters: deinterlace: add slice threading (yadif2x)

Romain Vimont rom1v at videolabs.io
Tue Mar 31 17:12:19 CEST 2020



On 3/31/20 4:53 PM, Francois Cartegnie wrote:
> Le 31/03/2020 à 16:12, Romain Vimont a écrit :
>> On 3/31/20 3:59 PM, Francois Cartegnie wrote:
>>> +            if( i_thread_count > 1 )
>>> +            {
>>> +                if( b_worker )
>>> +                {
>>> +                    start = slice_height *
>>> (threadctx->i_thread_number - 1);
>>> +                    end = start + slice_height + 2; /* we always need
>>> to copy 2 more lines */
>>
>> Doesn't this mean that two consecutive slices overlap (causing the same
>> region of memory being written by two threads)?
> 
> Maybe I missed something but we copy line by line
> 
> for( int y = start + 1; y < end - 1; y++ )
> 
> with end += 2, becomes
> 
> for( int y = start + 1; y <= end; y++ )

OK, looks correct then :)


More information about the vlc-devel mailing list