[vlc-devel] [PATCH] When the demuxer sets dimensions use them rather than the codec values

Steve Lhomme robux4 at videolabs.io
Thu Mar 5 16:33:40 CET 2015


You mean the i_width/i_height rewriting ? I can do without. In the
sample I use, lavc reports a i_w/h or 1280x738 when i_visible_w/h of
1280x720. It seems that it actually outputs 1280x720 pixels and not
1280x738 pixels. So I thought it would be better to provide the right
value further down. It works without though, so I can get rid of it.

On Thu, Mar 5, 2015 at 4:26 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le 2015-03-05 18:04, Steve Lhomme a écrit :
>
>> Doesn't fix #13982 as most video_output don't handle the cropping
>> values attached to decoded planes properly.
>>
>> Direct3D, DirectDraw and OpenGL create bleeding as in
>> http://i.imgur.com/MzDLw9O.png
>> Direct2D or GDI create green bars.
>> ---
>>  src/input/decoder.c | 30 ++++++++++++++++--------------
>>  1 file changed, 16 insertions(+), 14 deletions(-)
>>
>> diff --git a/src/input/decoder.c b/src/input/decoder.c
>> index 451024b..cc897fb 100644
>> --- a/src/input/decoder.c
>> +++ b/src/input/decoder.c
>> @@ -2047,23 +2047,25 @@ static int vout_update_format( decoder_t *p_dec )
>>              }
>>          }
>>
>> -        if( !fmt.i_visible_width || !fmt.i_visible_height )
>> +        if( p_dec->fmt_in.video.i_visible_width &&
>> +            p_dec->fmt_in.video.i_visible_height )
>>          {
>> -            if( p_dec->fmt_in.video.i_visible_width &&
>> -                p_dec->fmt_in.video.i_visible_height )
>> +            if( fmt.i_visible_width && fmt.i_visible_height )
>>              {
>> -                fmt.i_visible_width  =
>> p_dec->fmt_in.video.i_visible_width;
>> -                fmt.i_visible_height =
>> p_dec->fmt_in.video.i_visible_height;
>> -                fmt.i_x_offset       = p_dec->fmt_in.video.i_x_offset;
>> -                fmt.i_y_offset       = p_dec->fmt_in.video.i_y_offset;
>> -            }
>> -            else
>> -            {
>> -                fmt.i_visible_width  = fmt.i_width;
>> -                fmt.i_visible_height = fmt.i_height;
>> -                fmt.i_x_offset       = 0;
>> -                fmt.i_y_offset       = 0;
>> +                fmt.i_width  = fmt.i_visible_width;
>> +                fmt.i_height = fmt.i_visible_height;
>
>
> No. Changing the physical width and height breaks alignment and padding
> assumptions in the decoders.
>
> At best, this will force indirect rendering for CPU decoding, and break GPU
> decoding. At worst, it will just crash.
>
> --
> Rémi Denis-Courmont
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list