[vlc-devel] [PATCH] filter: don't create blending filters for fake fmt

Steve Lhomme robux4 at videolabs.io
Tue Apr 28 10:57:05 CEST 2015


On Tue, Apr 28, 2015 at 8:45 AM, Steve Lhomme <robux4 at videolabs.io> wrote:
> On Thu, Apr 23, 2015 at 9:06 AM, Thomas Guillem <thomas at gllm.fr> wrote:
>> Since we know the filter configure will fail.
>> ---
>>  src/misc/filter.c | 12 +++++++++++-
>>  1 file changed, 11 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/misc/filter.c b/src/misc/filter.c
>> index 36f1ba4..fd2f362 100644
>> --- a/src/misc/filter.c
>> +++ b/src/misc/filter.c
>> @@ -33,7 +33,17 @@
>>  filter_t *filter_NewBlend( vlc_object_t *p_this,
>>                             const video_format_t *p_dst_chroma )
>>  {
>> -    filter_t *p_blend = vlc_custom_create( p_this, sizeof(*p_blend), "blend" );
>> +    filter_t *p_blend;
>> +    const vlc_chroma_description_t *p_desc;
>> +
>> +    p_desc = vlc_fourcc_GetChromaDescription( p_dst_chroma->i_chroma );
>> +    if( !p_desc || p_desc->plane_count == 0 )
>> +    {
>> +        msg_Err( p_this, "Could not create blending filter for fake fmt" );
>> +        return NULL;
>> +    }
>> +
>> +    p_blend = vlc_custom_create( p_this, sizeof(*p_blend), "blend" );
>>      if( !p_blend )
>>          return NULL;
>
> This effectively fix the early blending being applied to DXVA2
> surfaces. After that D3D11 and DirectDraw work fine with DXVA2
> activated.


Forget that. I was testing with the "late spu" still forced for those.
This patch mainly reduces the amount of error logs when we try to
blend on an opaque surface.



More information about the vlc-devel mailing list