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

Steve Lhomme robux4 at videolabs.io
Wed Apr 29 09:16:32 CEST 2015


On Wed, Apr 29, 2015 at 8:08 AM, Steve Lhomme <robux4 at videolabs.io> wrote:
> 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.

CopyFromNv12 and CopyFromYv12 do write YV12 on the output planes
rather than I420. I think it's safer to keep it as-is rather than
change VAAPI, VDA, OMXIL output formats and the pixel copy routines.

>>> +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 ?

I used libdxa9_plugin



More information about the vlc-devel mailing list