[vlc-devel] [PATCH] DXVA2: output D3D9 GPU surfaces

Steve Lhomme robux4 at videolabs.io
Wed Apr 29 08:08:07 CEST 2015


On Tue, Apr 28, 2015 at 10:30 PM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> On 28 Apr, Steve Lhomme wrote :
>> +    if (dst->format.i_chroma == VLC_CODEC_I420) {
>> +        uint8_t *tmp = dst->p[1].p_pixels;
>> +        dst->p[1].p_pixels = dst->p[2].p_pixels;
>> +        dst->p[2].p_pixels = tmp;
>> +    }
>> +
>> +    if (desc.Format == MAKEFOURCC('Y','V','1','2') ||
>> +        desc.Format == MAKEFOURCC('I','M','C','3')) {
>> +        bool imc3 = desc.Format == MAKEFOURCC('I','M','C','3');
>
> Some hw decoder actually output IMC3?

No idea, but since the code was there I kept it.

>> +    if (dst->format.i_chroma == VLC_CODEC_I420) {
>> +        uint8_t *tmp = dst->p[1].p_pixels;
>> +        dst->p[1].p_pixels = dst->p[2].p_pixels;
>> +        dst->p[2].p_pixels = tmp;
>> +    }
>
> This (I420) should be changed to be the default, IMHO.

OK, I'll have to check all callers to CopyFromNv12 because they likely
assume YV12 on the outside too.

>> +static void DXA9_NV12(filter_t *p_filter, picture_t *src, picture_t *dst)
>
> Can't we use a common function for most of the code of DXA9_NV12 and DXA9_YV12 ?

I'll check.

>> +static int OpenConverter( vlc_object_t *obj )
>
> This does not use any code from the decoder, right?
> This filter could almost be split from the decoder file, right?


Yes I can make a separate module that would go with the other chroma
filters. What would be a good name ?

Steve



More information about the vlc-devel mailing list