[vlc-devel] [PATCH] vout: android: don't overwrite projection_mode for opaque

Steve Lhomme robux4 at ycbcr.xyz
Wed Aug 22 09:44:42 CEST 2018


On 22/08/2018 09:26, Zhao Zhili wrote:
>
>
> On 2018年08月22日 11:52, Zhao Zhili wrote:
>> Fix "Failed to adapt decoder format to display" and fallback to software
>> decoder.
>
> Overwrite projection_mode can affect software decoder too, although it 
> doesn't fail. For example:
>
>  libvlc vout display: A filter to adapt decoder I420 to display I420 
> is needed
>  libvlc filter: 2048x1024 (2048x1026) chroma: I420 -> 2048x1024 
> (2048x1026) chroma: I420 with scaling using Bicubic (good quality)
>  libvlc filter: using video converter module "swscale"
>
> The swscale is almost useless.

Not only that but it's probably wrong. It pretends to transform from one 
projection to the other when in fact it doesn't.

>
>> ---
>>   modules/video_output/android/display.c | 12 ++++++------
>>   1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/modules/video_output/android/display.c 
>> b/modules/video_output/android/display.c
>> index 78c2331..7f22c41 100644
>> --- a/modules/video_output/android/display.c
>> +++ b/modules/video_output/android/display.c
>> @@ -505,12 +505,6 @@ static int OpenCommon(vout_display_t *vd)
>>       vout_display_sys_t *sys;
>>       video_format_t sub_fmt;
>>   -    /* There are three cases:
>> -     * 1. the projection_mode is PROJECTION_MODE_RECTANGULAR
>> -     * 2. gles2 vout failed
>> -     * 3. the module is forced */
>> -    vd->fmt.projection_mode = PROJECTION_MODE_RECTANGULAR;
>> -
>>       vout_window_t *embed =
>>           vout_display_NewWindow(vd, VOUT_WINDOW_TYPE_ANDROID_NATIVE);
>>   @@ -619,6 +613,12 @@ static int Open(vlc_object_t *p_this)
>>       if (vd->fmt.i_chroma == VLC_CODEC_ANDROID_OPAQUE)
>>           return VLC_EGENERIC;
>>   +    /* There are three cases:
>> +     * 1. the projection_mode is PROJECTION_MODE_RECTANGULAR
>> +     * 2. gles2 vout failed
>> +     * 3. the module is forced */
>> +    vd->fmt.projection_mode = PROJECTION_MODE_RECTANGULAR;
>> +
>>       return OpenCommon(vd);
>>   }
>
>
>
> _______________________________________________
> 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