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

Francois Cartegnie fcvlcdev at free.fr
Tue Mar 31 16:53:45 CEST 2020


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++ )

-- 
Francois Cartegnie
VideoLAN - VLC Developer


More information about the vlc-devel mailing list