[vlc-devel] [vlc-commits] transcode: video: align scaled visible

Rémi Denis-Courmont remi at remlab.net
Wed Jul 4 08:43:36 CEST 2018


AFAIU, the extra row/column will be populated by the scaler (unless the scaler is buggy), so there won't be bogus pixel values. Instead, the requested scale will not be respected.

However, it does feel like an arbitrary hack to round to a multiple of two.

Le 4 juillet 2018 09:39:06 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>What if the source and destination is in RGB ? There is no reason to 
>align here and will add extra bogus pixels.
>
>
>On 2018-07-03 17:53, Francois Cartegnie wrote:
>> vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed
>Jun 27 23:27:54 2018 +0200| [95e350c597e57c64db915b255ad6cd72ea03a234]
>| committer: Francois Cartegnie
>>
>> transcode: video: align scaled visible
>>
>>>
>http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=95e350c597e57c64db915b255ad6cd72ea03a234
>> ---
>>
>>   modules/stream_out/transcode/video.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/modules/stream_out/transcode/video.c
>b/modules/stream_out/transcode/video.c
>> index 784ead3ced..af2c71f1c1 100644
>> --- a/modules/stream_out/transcode/video.c
>> +++ b/modules/stream_out/transcode/video.c
>> @@ -552,6 +552,8 @@ static void transcode_video_size_init(
>sout_stream_t *p_stream,
>>        int i_dst_width =  lroundf(f_scale_width*p_vid_out->i_width);
>>        int i_dst_height =
>lroundf(f_scale_height*p_vid_out->i_height);
>>   
>> +     if( i_dst_visible_width & 1 ) ++i_dst_visible_width;
>> +     if( i_dst_visible_height & 1 ) ++i_dst_visible_height;
>>        if( i_dst_width & 1 ) ++i_dst_width;
>>        if( i_dst_height & 1 ) ++i_dst_height;
>>   
>>
>> _______________________________________________
>> vlc-commits mailing list
>> vlc-commits at videolan.org
>> https://mailman.videolan.org/listinfo/vlc-commits
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180704/7f1e2599/attachment.html>


More information about the vlc-devel mailing list